rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
why = os.strerror(err.errno)
why = _strerror(err)
def ftp_STOR(self, line, mode='w'): """Store a file (transfer from the client to the server).""" # A resume could occur in case of APPE or REST commands. # In that case we have to open file object in different ways: # STOR: mode = 'w' # APPE: mode = 'a' # REST: mode = 'r+' (to permit seeking on file object) if 'a' in mode: cmd = 'APPE' else: cmd = 'STOR' file = self.fs.translate(line)
93acc72ebc75fdf3b1931c4e1f9e2f2d830514c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/93acc72ebc75fdf3b1931c4e1f9e2f2d830514c9/ftpserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 882, 916, 12, 2890, 16, 980, 16, 1965, 2218, 91, 11, 4672, 3536, 2257, 279, 585, 261, 13866, 628, 326, 1004, 358, 326, 1438, 13, 12123, 468, 432, 10774, 3377, 3334, 316, 648...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 882, 916, 12, 2890, 16, 980, 16, 1965, 2218, 91, 11, 4672, 3536, 2257, 279, 585, 261, 13866, 628, 326, 1004, 358, 326, 1438, 13, 12123, 468, 432, 10774, 3377, 3334, 316, 648...
if not tag.startswith('00'):
if not line.startswith('00'):
def get_tag_line(data, line): length = int(line[3:7]) offset = int(line[7:12]) # handle off-by-one errors in MARC records if data[offset] != '\x1e': offset += data[offset:].find('\x1e') last = offset+length if data[last] != '\x1e': length += data[last:].find('\x1e') tag_line = data[offset + 1:offset + length + 1] if not tag.startswith('00'): # marc_western_washington_univ/wwu_bibs.mrc_revrev.mrc:636441290:1277 if tag_line[1:8] == '{llig}\x1f': tag_line = tag_line[0] + u'\uFE20' + tag_line[7:] return tag_line
6c7d271aae40b31887f8bff026d8c195b155d1a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/6c7d271aae40b31887f8bff026d8c195b155d1a5/fast_parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2692, 67, 1369, 12, 892, 16, 980, 4672, 769, 273, 509, 12, 1369, 63, 23, 30, 27, 5717, 1384, 273, 509, 12, 1369, 63, 27, 30, 2138, 5717, 225, 468, 1640, 3397, 17, 1637, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2692, 67, 1369, 12, 892, 16, 980, 4672, 769, 273, 509, 12, 1369, 63, 23, 30, 27, 5717, 1384, 273, 509, 12, 1369, 63, 27, 30, 2138, 5717, 225, 468, 1640, 3397, 17, 1637, 17...
def __showSeekEditor (self, seeknumber, challengemode=False):
def __updateSeekEditor (self, seeknumber, challengemode=False): self.in_challenge_mode = challengemode
def __showSeekEditor (self, seeknumber, challengemode=False): self.seeknumber = seeknumber if not challengemode: self.widgets["strengthFrame"].set_sensitive(True) self.widgets["manualAcceptCheck"].set_sensitive(True) else: self.widgets["strengthFrame"].set_sensitive(False) self.widgets["manualAcceptCheck"].set_sensitive(False) self.widgets["chainAlignment"].show_all() self.__loadSeekEditor(seeknumber) self.widgets["seek%dRadio" % seeknumber].set_active(True) self.widgets["challenge%dRadio" % seeknumber].set_active(True) self.__updateYourRatingHBox() self.__updateRatingCenterInfoBox() self.__updateToleranceButton() self.onUntimedCheckToggled(self.widgets["untimedCheck"]) title = _("Edit Seek: ") + self.widgets["seek%dRadio" % seeknumber].get_label()[:-1] self.widgets["editSeekDialog"].set_title(title) self.widgets["editSeekDialog"].present()
d1986716756bd3ab698c1a3ca65ebbe935e13af3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/d1986716756bd3ab698c1a3ca65ebbe935e13af3/ICLounge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2725, 16134, 6946, 261, 2890, 16, 6520, 2696, 16, 462, 7862, 23465, 390, 33, 8381, 4672, 365, 18, 267, 67, 25092, 67, 3188, 273, 462, 7862, 23465, 390, 365, 18, 16508, 2696, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2725, 16134, 6946, 261, 2890, 16, 6520, 2696, 16, 462, 7862, 23465, 390, 33, 8381, 4672, 365, 18, 267, 67, 25092, 67, 3188, 273, 462, 7862, 23465, 390, 365, 18, 16508, 2696, 273, ...
self.setdefault("ProdMgr", ConfigBlock("ProdMgr")) self.setdefault("ProdMgrDB", ConfigBlock("ProdMgrDB"))
self.setdefault("ProdAgent", ConfigBlock("ProdAgent")) self.setdefault("ProdAgentDB", ConfigBlock("ProdAgentDB")) self.setdefault("JobStates", ConfigBlock("JobStates")) self.setdefault("MessageService", ConfigBlock("MessageService")) self.setdefault("LocalDBS", ConfigBlock("LocalDBS"))
def __init__(self): dict.__init__(self) self.components = [] # // # // Core non-component pieces are included by default #// self.setdefault("ProdMgr", ConfigBlock("ProdMgr")) self.setdefault("ProdMgrDB", ConfigBlock("ProdMgrDB"))
2e75e0b77d8fd3fb6b9c99147ca9e6610aa64f55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/2e75e0b77d8fd3fb6b9c99147ca9e6610aa64f55/Configuration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2065, 16186, 2738, 972, 12, 2890, 13, 365, 18, 8119, 273, 5378, 468, 225, 368, 468, 368, 4586, 1661, 17, 4652, 10167, 854, 5849, 635, 805, 468, 759, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2065, 16186, 2738, 972, 12, 2890, 13, 365, 18, 8119, 273, 5378, 468, 225, 368, 468, 368, 4586, 1661, 17, 4652, 10167, 854, 5849, 635, 805, 468, 759, 36...
return self.ExecuteCommand(self.sPreviousCommand, self.dPreviousParams)
return self.ReexecuteCommand()
def ExecuteCommand(self, sCommand, dParams): # execute command if sCommand == 'showhelp': self.StoreCommand(sCommand, dParams) # return help page return self.cHelpDataGrabber.GetHtml(dParams) elif sCommand == 'showabout': self.StoreCommand(sCommand, dParams) # return about page return self.cAboutDataGrabber.GetHtml(dParams) elif sCommand == 'showhistory': self.StoreCommand(sCommand, dParams) # return history page # --> return default page return self.cDefaultDataGrabber.GetHtml(dParams) elif sCommand == 'showlog': self.StoreCommand(sCommand, dParams) # return logfile page return self.cLogfileGrabber.GetHtml(dParams) elif sCommand == 'showconfig': self.StoreCommand(sCommand, dParams) # return configuration page return self.cConfigureGrabber.GetHtml(dParams) elif sCommand == 'singlerecommendation': self.StoreCommand(sCommand, dParams) # return single recommendation for url stored in dParams return self.cSingleRecommendationDataGrabber.GetHtml(dParams) elif sCommand == 'sessionrecommendation': self.StoreCommand(sCommand, dParams) # return recommendations for current session return self.cSessionRecommendationDataGrabber.GetHtml(dParams) elif sCommand == 'longtermrecommendation': self.StoreCommand(sCommand, dParams) # return all-time recommendations return self.cLongtermRecommendationDataGrabber.GetHtml(dParams) elif sCommand == 'getrecommendations': self.StoreCommand(sCommand, dParams) # return single recommendation for url stored in dParams return self.cGetRecommendationsDataGrabber.GetHtml(dParams) elif sCommand == 'activate': # activate clickstream recording pManager.manager.UpdateConfig('pProxy','recording','1') return self.ExecuteCommand(self.sPreviousCommand, self.dPreviousParams) # return mainpage elif sCommand == 'deactivate': # deactivate clickstream recording pManager.manager.UpdateConfig('pProxy','recording','0') # return mainpage return self.ExecuteCommand(self.sPreviousCommand, self.dPreviousParams) elif sCommand == 'remove': # remove url from clickstream # get clickstreaminterface cs = pManager.manager.GetClickstreamInterface() # remove url from clickstream cs.RemoveUrl(dParams['sUrl']) return self.cDefaultDataGrabber.GetHtml(dParams) elif sCommand == 'updateconfig': self.StoreCommand(sCommand, dParams) # update configuration pManager.manager.UpdateConfig(dParams['section'], dParams['option'], dParams['value']) # return updated config dialog return self.cConfigureGrabber.GetHtml(dParams) elif sCommand == 'showrules': self.StoreCommand(sCommand, dParams) return self.cRulesGrabber.GetHtml(dParams) elif sCommand == 'showstats': self.StoreCommand(sCommand, dParams) return self.cStatsDataGrabber.GetHtml(dParams) elif sCommand == 'error': # return error page return self.cErrorDataGrabber.GetHtml(dParams)
ad1639bb0301a8b2ea14bf1a46e90b6d97a0a696 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2853/ad1639bb0301a8b2ea14bf1a46e90b6d97a0a696/cGuiRequestHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 2189, 12, 2890, 16, 272, 2189, 16, 302, 1370, 4672, 468, 1836, 1296, 309, 272, 2189, 422, 296, 4500, 5201, 4278, 365, 18, 2257, 2189, 12, 87, 2189, 16, 302, 1370, 13, 468, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 2189, 12, 2890, 16, 272, 2189, 16, 302, 1370, 4672, 468, 1836, 1296, 309, 272, 2189, 422, 296, 4500, 5201, 4278, 365, 18, 2257, 2189, 12, 87, 2189, 16, 302, 1370, 13, 468, 327, ...
'yearly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, int(config['price_accuracy']))), 'yearly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, int(config['price_accuracy']))), 'monthly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, int(config['price_accuracy']))), 'monthly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, int(config['price_accuracy']))),
'yearly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, 4)), 'yearly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, 4)), 'monthly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, 4)), 'monthly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, 4)),
def _total_contrib(self, cr, uid, ids, field_names, arg, context={}): line_pool = self.pool.get('hr.contibution.register.line') period_id = self.pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d')),('date_stop','>=',time.strftime('%Y-%m-%d'))])[0] fiscalyear_id = self.pool.get('account.period').browse(cr, uid, period_id).fiscalyear_id res = {} for cur in self.browse(cr, uid, ids): current = line_pool.search(cr, uid, [('period_id','=',period_id),('register_id','=',cur.id)]) years = line_pool.search(cr, uid, [('period_id.fiscalyear_id','=',fiscalyear_id.id), ('register_id','=',cur.id)])
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4963, 67, 26930, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 1973, 16, 1501, 16, 819, 12938, 4672, 980, 67, 6011, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 1213, 495...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4963, 67, 26930, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 1973, 16, 1501, 16, 819, 12938, 4672, 980, 67, 6011, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 1213, 495...
if self.debug > 0: print 'returning total energy' print nc.variables['TotalEnergy'][:]
def get_potential_energy(self,atoms=None,force_consistent=False): ''' return the potential energy. ''' if self.calculation_required(atoms): if self.debug > 0: print 'calculation required for energy' self.calculate() else: if self.debug > 0: print 'no calculation required for energy' nc = netCDF(self.get_nc(),'r') try: if force_consistent: e = nc.variables['TotalFreeEnergy'][-1] else: if self.debug > 0: print 'returning total energy' print nc.variables['TotalEnergy'][:] e = nc.variables['TotalEnergy'][-1] nc.close() return e except (TypeError,KeyError): raise RuntimeError('Error in calculating the total energy\n' + 'Check ascii out file for error messages')
97d65b7f6de853ae8bd02694f63966f3dfe9ab9e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/97d65b7f6de853ae8bd02694f63966f3dfe9ab9e/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26451, 67, 15358, 12, 2890, 16, 14937, 33, 7036, 16, 5734, 67, 16952, 33, 8381, 4672, 9163, 327, 326, 8555, 12929, 18, 9163, 309, 365, 18, 29916, 67, 4718, 12, 14937, 4672, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26451, 67, 15358, 12, 2890, 16, 14937, 33, 7036, 16, 5734, 67, 16952, 33, 8381, 4672, 9163, 327, 326, 8555, 12929, 18, 9163, 309, 365, 18, 29916, 67, 4718, 12, 14937, 4672, 30...
return bool(self.__flags & DEF_STARSTAR)
return bool(self.__flags & DEF_DOUBLESTAR)
def is_keywordarg(self): return bool(self.__flags & DEF_STARSTAR)
5030cf1c2db98d5e83ef0c2b21e3d7a1fed50047 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5030cf1c2db98d5e83ef0c2b21e3d7a1fed50047/symtable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 11041, 3175, 12, 2890, 4672, 327, 1426, 12, 2890, 16186, 7133, 473, 25957, 67, 20943, 20943, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 353, 67, 11041, 3175, 12, 2890, 4672, 327, 1426, 12, 2890, 16186, 7133, 473, 25957, 67, 20943, 20943, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
class _WritelnDecorator:
class _WritelnDecorator(object):
def findTestCases(module, prefix='test', sortUsing=cmp, suiteClass=TestSuite): return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromModule(module)
17322bbb89cc284ccf9b00c40cc8dfa84e535b81 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/17322bbb89cc284ccf9b00c40cc8dfa84e535b81/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 4709, 30744, 12, 2978, 16, 1633, 2218, 3813, 2187, 1524, 7736, 33, 9625, 16, 11371, 797, 33, 4709, 13587, 4672, 327, 389, 6540, 2886, 12, 3239, 16, 1524, 7736, 16, 11371, 797, 2934...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 4709, 30744, 12, 2978, 16, 1633, 2218, 3813, 2187, 1524, 7736, 33, 9625, 16, 11371, 797, 33, 4709, 13587, 4672, 327, 389, 6540, 2886, 12, 3239, 16, 1524, 7736, 16, 11371, 797, 2934...
self.push(Stop(), "stop", "core")
if self.core._running: self.push(Stop(), "stop", self.core.channel)
def error(self, *args, **kwargs): if len(args) == 3 and issubclass(args[0], BaseException): type, value, traceback = args
c3dac4bb294b6ad544481379b92db15aa4f9cdb0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3020/c3dac4bb294b6ad544481379b92db15aa4f9cdb0/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 555, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 562, 12, 1968, 13, 422, 890, 471, 14664, 12, 1968, 63, 20, 6487, 26778, 4672, 618, 16, 460, 16, 10820, 273, 833, 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, 555, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 562, 12, 1968, 13, 422, 890, 471, 14664, 12, 1968, 63, 20, 6487, 26778, 4672, 618, 16, 460, 16, 10820, 273, 833, 2, -100, -10...
self._manager.store_key_value(self, name, value)
self._manager.set_key_value(self, name, value)
def __setattr__(self, name, value): if name in self._prop_names: object.__setattr__(self, name, value) elif name.startswith('_'): object.__setattr__(self, name, value) elif name == 'id': object.__setattr__(self, name, value) else: self._manager.store_key_value(self, name, value) object.__setattr__(self, name, value)
cd5ccc8a63c201445e994dda7447b4afe4008854 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/cd5ccc8a63c201445e994dda7447b4afe4008854/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 4672, 309, 508, 316, 365, 6315, 5986, 67, 1973, 30, 733, 16186, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 13, 1327, 508, 18, 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, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 4672, 309, 508, 316, 365, 6315, 5986, 67, 1973, 30, 733, 16186, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 13, 1327, 508, 18, 17514...
vs_ide_path = os.path.join(vs_path, rel_path)
vs_ide_path = os.path.join(prog.vs_path, rel_path)
def get_vs_ide_bin(): """Gets a full path to the Visual Studio IDE executable to run.""" # These are identical for VS2003.Net, VS2005 and VS2008 rel_path = 'Common7/IDE' vs_bin = 'devenv.com' vs_ide_path = os.path.join(vs_path, rel_path) vs_cmd_path = os.path.join(vs_ide_path, vs_bin) return vs_cmd_path
00a1fb5d68080ec3c9ad49bb9ef5c23d4d340126 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5344/00a1fb5d68080ec3c9ad49bb9ef5c23d4d340126/create_release.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6904, 67, 831, 67, 4757, 13332, 3536, 3002, 279, 1983, 589, 358, 326, 26832, 934, 4484, 1599, 41, 9070, 358, 1086, 12123, 225, 468, 8646, 854, 12529, 364, 776, 55, 6976, 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, 1, 1, 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, 6904, 67, 831, 67, 4757, 13332, 3536, 3002, 279, 1983, 589, 358, 326, 26832, 934, 4484, 1599, 41, 9070, 358, 1086, 12123, 225, 468, 8646, 854, 12529, 364, 776, 55, 6976, 23, 1...
value += self._safe_read(chunk_left)
value.append(self._safe_read(chunk_left))
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = b""
9c33cbfbef5858e83a0079e89d81ae6fb15fc360 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/9c33cbfbef5858e83a0079e89d81ae6fb15fc360/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 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, 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, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 2, -100, -100, -100, ...
for base in (win32con.HKEY_CLASSES_ROOT, win32con.HKEY_LOCAL_MACHINE, win32con.HKEY_CURRENT_USER, win32con.HKEY_USERS):
for base in (_HKEY_CLASSES_ROOT, _HKEY_LOCAL_MACHINE, _HKEY_CURRENT_USER, _HKEY_USERS):
def get_devstudio_versions (): """Get list of devstudio versions from the Windows registry. Return a list of strings containing version numbers; the list will be empty if we were unable to access the registry (eg. couldn't import a registry-access module) or the appropriate registry keys weren't found.""" try: import win32api import win32con except ImportError: return [] K = 'Software\\Microsoft\\Devstudio' L = [] for base in (win32con.HKEY_CLASSES_ROOT, win32con.HKEY_LOCAL_MACHINE, win32con.HKEY_CURRENT_USER, win32con.HKEY_USERS): try: k = win32api.RegOpenKeyEx(base,K) i = 0 while 1: try: p = win32api.RegEnumKey(k,i) if p[0] in '123456789' and p not in L: L.append(p) except win32api.error: break i = i + 1 except win32api.error: pass L.sort() L.reverse() return L
a7bdf4c41f468872cf58877a70eddba91276467e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a7bdf4c41f468872cf58877a70eddba91276467e/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5206, 334, 4484, 67, 10169, 1832, 30, 3536, 967, 666, 434, 4461, 334, 4484, 5244, 628, 326, 8202, 4023, 18, 225, 2000, 279, 666, 434, 2064, 4191, 1177, 5600, 31, 326, 666, 903...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5206, 334, 4484, 67, 10169, 1832, 30, 3536, 967, 666, 434, 4461, 334, 4484, 5244, 628, 326, 8202, 4023, 18, 225, 2000, 279, 666, 434, 2064, 4191, 1177, 5600, 31, 326, 666, 903...
return S_OK(result['Value'][0][0]) else: return result def insertJobIntoDB(self, jobID, JDL):
return S_OK( result['Value'][0][0] ) else: return result def insertJobIntoDB( self, jobID, JDL ):
def getJobJDL(self,jobID,original=False,status=''): """ Get JDL for job specified by its jobID. By default the current job JDL is returned. If 'original' argument is True, original JDL is returned """ ret = self._escapeString(jobID) if not ret['OK']: return ret jobID = ret['Value']
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13024, 46, 8914, 12, 2890, 16, 4688, 734, 16, 8830, 33, 8381, 16, 2327, 2218, 11, 4672, 3536, 968, 804, 8914, 364, 1719, 1269, 635, 2097, 28913, 18, 2525, 805, 326, 783, 1719, 804, 891...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13024, 46, 8914, 12, 2890, 16, 4688, 734, 16, 8830, 33, 8381, 16, 2327, 2218, 11, 4672, 3536, 968, 804, 8914, 364, 1719, 1269, 635, 2097, 28913, 18, 2525, 805, 326, 783, 1719, 804, 891...
state, track, min, sec, frame, abs_min, abs_sec, abs_frame, \ total_min, total_sec, total_frame, first, last, scsi_audio, \ cur_block, dum1, dum2, dum3 = player.getstatus()
state, track, curtime, abstime, totaltime, first, last, \ scsi_audio, cur_block, dummy = player.getstatus()
def prstatus(player): state, track, min, sec, frame, abs_min, abs_sec, abs_frame, \ total_min, total_sec, total_frame, first, last, scsi_audio, \ cur_block, dum1, dum2, dum3 = player.getstatus() print 'Status:', if 0 <= state < len(statedict): print statedict[state] else: print state print 'Track: ', track print 'Time: ', triple(min, sec, frame) print 'Abs: ', triple(abs_min, abs_sec, abs_frame) print 'Total: ', triple(total_min, total_sec, total_frame) print 'First: ', first print 'Last: ', last print 'SCSI: ', scsi_audio print 'Block: ', cur_block print 'Future:', (dum1, dum2, dum3)
f4be726da206ed1c34817a7b63a0c6e0281879ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f4be726da206ed1c34817a7b63a0c6e0281879ee/sendcd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 846, 2327, 12, 14872, 4672, 919, 16, 3298, 16, 662, 957, 16, 1223, 334, 494, 16, 2078, 957, 16, 1122, 16, 1142, 16, 521, 888, 7722, 67, 11509, 16, 662, 67, 2629, 16, 9609, 273, 7291,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 846, 2327, 12, 14872, 4672, 919, 16, 3298, 16, 662, 957, 16, 1223, 334, 494, 16, 2078, 957, 16, 1122, 16, 1142, 16, 521, 888, 7722, 67, 11509, 16, 662, 67, 2629, 16, 9609, 273, 7291,...
@return: Instance of class LDRdataFindClientException
@return: Instance of class LSCsegFindClientException
def __init__(self, args=None): """ Create an instance of this class, ie. an LSCsegFindClient exception.
99f3c8a95daab623425a71c7275384312b5fffb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/99f3c8a95daab623425a71c7275384312b5fffb2/LSCsegFindClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 833, 33, 7036, 4672, 3536, 1788, 392, 791, 434, 333, 667, 16, 9228, 18, 392, 511, 2312, 5680, 3125, 1227, 1520, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 833, 33, 7036, 4672, 3536, 1788, 392, 791, 434, 333, 667, 16, 9228, 18, 392, 511, 2312, 5680, 3125, 1227, 1520, 18, 2, -100, -100, -100, -100, -100, -100...
message = _("Error: DockbarX couldn't set global keybinding '%(keystr)' for %(function).")%{'keystr':keystr, 'function':translations[s]}
message = _("Error: DockbarX couldn't set global keybinding '%(keystr)s' for %(function)s.")%{'keystr':keystr, 'function':translations[s]}
def on_gkeys_changed(self, arg=None, dialog=True): functions = { "gkeys_select_next_group": self.gkey_select_next_group, "gkeys_select_previous_group": self.gkey_select_previous_group, "gkeys_select_next_window": self.gkey_select_next_window_in_group, "gkeys_select_previous_window": self.gkey_select_previous_window_in_group, } translations = { 'gkeys_select_next_group': _('Select next group'), 'gkeys_select_previous_group': _('Select previous group'), 'gkeys_select_next_window': _('Select next window in group'), 'gkeys_select_previous_window': _('Select previous window in group') } for (s, f) in functions.items(): if self.gkeys[s] != None: keybinder.unbind(self.gkeys[s]) self.gkeys[s] = None if not self.globals.settings[s]: # The global key is not in use continue keystr = self.globals.settings['%s_keystr'%s] try: if keybinder.bind(keystr, f): # Key succesfully bound. self.gkeys[s]= keystr error = False else: error = True reason = "" # Keybinder sometimes doesn't unbind faulty binds. # We have to do it manually. try: keybinder.unbind(keystr) except: pass except KeyError: error = True reason = _("The key is already bound elsewhere.") if error: message = _("Error: DockbarX couldn't set global keybinding '%(keystr)' for %(function).")%{'keystr':keystr, 'function':translations[s]} text = "%s %s"%(message, reason) print text if dialog: md = gtk.MessageDialog( None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, text ) md.run() md.destroy()
9db599ea70f71dda957a1d1cc697cb350b81e015 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/9db599ea70f71dda957a1d1cc697cb350b81e015/dockbar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 75, 2452, 67, 6703, 12, 2890, 16, 1501, 33, 7036, 16, 6176, 33, 5510, 4672, 4186, 273, 288, 315, 75, 2452, 67, 4025, 67, 4285, 67, 1655, 6877, 365, 18, 75, 856, 67, 4025, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 75, 2452, 67, 6703, 12, 2890, 16, 1501, 33, 7036, 16, 6176, 33, 5510, 4672, 4186, 273, 288, 315, 75, 2452, 67, 4025, 67, 4285, 67, 1655, 6877, 365, 18, 75, 856, 67, 4025, ...
If `format` does not use string formatting a `ValueError` is raised.
The behavior of this function is undefined if the string does not use string formattings.
def _validate_format(format, alternative): """Test format string `alternative` against `format`. `format` can be the msgid of a message and `alternative` one of the `msgstr`\s. The two arguments are not interchangeable as `alternative` may contain less placeholders if `format` uses named placeholders. If `format` does not use string formatting a `ValueError` is raised. If the string formatting of `alternative` is compatible to `format` the function returns `None`, otherwise a `TranslationError` is raised. Examples for compatible format strings: >>> _validate_format('Hello %s!', 'Hallo %s!') >>> _validate_format('Hello %i!', 'Hallo %d!') Example for an incompatible format strings: >>> _validate_format('Hello %(name)s!', 'Hallo %s!') Traceback (most recent call last): ... TranslationError: the format strings are of different kinds This function is used by the `python_format` checker. :param format: The original format string :param alternative: The alternative format string that should be checked against format :return: None on success :raises TranslationError: on formatting errors """ def _parse(string): result = [] for match in PYTHON_FORMAT.finditer(string): name, format, typechar = match.groups() if typechar == '%' and name is None: continue result.append((name, str(typechar))) return result def _compatible(a, b): if a == b: return True for set in _string_format_compatibilities: if a in set and b in set: return True return False def _check_positional(results): positional = None for name, char in results: if positional is None: positional = name is None else: if (name is None) != positional: raise TranslationError('format string mixes positional ' 'and named placeholders') return bool(positional) a, b = map(_parse, (format, alternative)) # if a does not use string formattings, we are dealing with invalid # input data. This function only works if the first string provided # does contain string format chars if not a: raise ValueError('original string provided does not use string ' 'formatting.') # now check if both strings are positional or named a_positional, b_positional = map(_check_positional, (a, b)) if a_positional and not b_positional and not b: raise TranslationError('placeholders are incompatible') elif a_positional != b_positional: raise TranslationError('the format strings are of different kinds') # if we are operating on positional strings both must have the # same number of format chars and those must be compatible if a_positional: if len(a) != len(b): raise TranslationError('positional format placeholders are ' 'unbalanced') for idx, ((_, first), (_, second)) in enumerate(izip(a, b)): if not _compatible(first, second): raise TranslationError('incompatible format for placeholder ' '%d: %r and %r are not compatible' % (idx + 1, first, second)) # otherwise the second string must not have names the first one # doesn't have and the types of those included must be compatible else: type_map = dict(a) for name, typechar in b: if name not in type_map: raise TranslationError('unknown named placeholder %r' % name) elif not _compatible(typechar, type_map[name]): raise TranslationError('incompatible format for ' 'placeholder %r: ' '%r and %r are not compatible' % (name, typechar, type_map[name]))
dc573a044e35581b9805606883010421d666d463 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8909/dc573a044e35581b9805606883010421d666d463/checkers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 67, 2139, 12, 2139, 16, 10355, 4672, 3536, 4709, 740, 533, 1375, 27071, 68, 5314, 1375, 2139, 8338, 225, 1375, 2139, 68, 848, 506, 326, 24389, 434, 279, 883, 471, 1375, 27071,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5662, 67, 2139, 12, 2139, 16, 10355, 4672, 3536, 4709, 740, 533, 1375, 27071, 68, 5314, 1375, 2139, 8338, 225, 1375, 2139, 68, 848, 506, 326, 24389, 434, 279, 883, 471, 1375, 27071,...
self.hatari.debug_command("s %s %06x %06x" % (filename, address, length))
self.hatari.debug_command("s %s $%06x $%06x" % (filename, address, length))
def memsave_cb(self, widget): if not self.dialog_save: self.dialog_save = SaveDialog(self.window) (filename, address, length) = self.dialog_save.run(self.address.get()) if filename and address and length: self.hatari.debug_command("s %s %06x %06x" % (filename, address, length))
d52b90bd76120f4b552050f4d17ee86f490a82c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8501/d52b90bd76120f4b552050f4d17ee86f490a82c5/debugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1663, 5688, 67, 7358, 12, 2890, 16, 3604, 4672, 309, 486, 365, 18, 12730, 67, 5688, 30, 365, 18, 12730, 67, 5688, 273, 7074, 6353, 12, 2890, 18, 5668, 13, 261, 3459, 16, 1758, 16, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1663, 5688, 67, 7358, 12, 2890, 16, 3604, 4672, 309, 486, 365, 18, 12730, 67, 5688, 30, 365, 18, 12730, 67, 5688, 273, 7074, 6353, 12, 2890, 18, 5668, 13, 261, 3459, 16, 1758, 16, 76...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 796) else quickfix.IntField.__init__(self, 796, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 10525, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 10525, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738,...
self.tmpDir = os.path.dirname(statusPath)
if statusPath: self.tmpDir = os.path.dirname(statusPath)
def __init__(self, statusPath, trustThreshold, keyCache): self.path = statusPath self.tmpDir = os.path.dirname(statusPath) callbacks.UpdateCallback.__init__(self, trustThreshold, keyCache)
d86d8e91f254883427ba42703fa2ef52b91bdece /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8747/d86d8e91f254883427ba42703fa2ef52b91bdece/fsrepos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1267, 743, 16, 10267, 7614, 16, 498, 1649, 4672, 365, 18, 803, 273, 1267, 743, 309, 1267, 743, 30, 365, 18, 5645, 1621, 273, 1140, 18, 803, 18, 12287, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1267, 743, 16, 10267, 7614, 16, 498, 1649, 4672, 365, 18, 803, 273, 1267, 743, 309, 1267, 743, 30, 365, 18, 5645, 1621, 273, 1140, 18, 803, 18, 12287, ...
'--chandlerTestDebug=0',
'--chandlerTestDebug=1',
def doFunctionalTests(releaseMode, workingDir, log): chandlerDir = os.path.join(workingDir, 'chandler') logDir = os.path.join(chandlerDir, 'test_profile') chandlerLog = os.path.join(logDir, 'chandler.log') FuncTestLog = os.path.join(logDir, 'FunctionalTestSuite.log') if buildenv['os'] == 'win': runChandler = 'RunChandler.bat' else: runChandler = 'RunChandler' if releaseMode == 'debug': runChandler = os.path.join(chandlerDir, 'debug', runChandler) elif releaseMode == 'release': runChandler = os.path.join(chandlerDir, 'release', runChandler) os.chdir(chandlerDir) try: print "Running %s Functional Tests" % releaseMode log.write(separator) log.write("Running %s Functional Tests ...\n" % releaseMode) try: os.remove(chandlerLog) except OSError: pass args = [runChandler, '--create', '--nocatch', '--profileDir=%s' % logDir, '--parcelPath=tools/QATestScripts/DataFiles', '--scriptTimeout=600', '--scriptFile=tools/cats/Functional/FunctionalTestSuite.py', # '--chandlerTestLogfile=FunctionalTestSuite.log', #new framework defaults to no log without this '--chandlerTestDebug=0', '--chandlerTestMask=0',] outputList = hardhatutil.executeCommandReturnOutput(args) hardhatutil.dumpOutputList(outputList, log) dumpTestLogs(log, chandlerLog, FuncTestLog) for line in outputList: if line.find('#TINDERBOX# Status = FAIL') >= 0 or \ line.find('#TINDERBOX# Status = UNCHECKED') >= 0: print "functional tests failed" log.write("***Error during functional tests***\n") forceBuildNextCycle(log, workingDir) return "test_failed" except hardhatutil.ExternalCommandErrorWithOutputList, e: dumpTestLogs(log, chandlerLog, FuncTestLog, e.args) print "functional tests failed", e log.write("***Error during functional tests***\n") forceBuildNextCycle(log, workingDir) return "test_failed" except Exception, e: print "functional tests failed", e log.write("***Error during functional tests***\n") log.write("Exception:\n") log.write(str(e) + "\n") forceBuildNextCycle(log, workingDir) return "test_failed" else: log.write("Functional tests exit code=0\n") return "success"
5bae227d6069048b3c78b69b9c21b853532145b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5bae227d6069048b3c78b69b9c21b853532145b9/newchandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 2083, 287, 14650, 12, 9340, 2309, 16, 5960, 1621, 16, 613, 4672, 462, 464, 749, 1621, 273, 1140, 18, 803, 18, 5701, 12, 20478, 1621, 16, 225, 296, 343, 464, 749, 6134, 31101, 1377...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2083, 287, 14650, 12, 9340, 2309, 16, 5960, 1621, 16, 613, 4672, 462, 464, 749, 1621, 273, 1140, 18, 803, 18, 5701, 12, 20478, 1621, 16, 225, 296, 343, 464, 749, 6134, 31101, 1377...
except SSL.WantReadError:
wc.log.debug(wc.LOG_NET, 'data %r', data) except SSL.WantReadError, err: wc.log.debug(wc.LOG_NET, '%s want read error %s', self, err)
def handle_read (self): """read data from SSL connection, put it into recv_buffer and call process_read""" assert self.connected wc.log.debug(wc.LOG_PROXY, '%s SslConnection.handle_read', self) if len(self.recv_buffer) > wc.proxy.Connection.MAX_BUFSIZE: wc.log.warn(wc.LOG_PROXY, '%s read buffer full', self) return try: data = self.socket.read(wc.proxy.Connection.RECV_BUFSIZE) except SSL.WantReadError: # you _are_ already reading, stupid return except SSL.WantWriteError: # you want to write? here you go self.handle_write() return except SSL.WantX509LookupError, err: wc.log.exception(wc.LOG_PROXY, "%s ssl read message", self) return except SSL.ZeroReturnError, err: wc.log.debug(wc.LOG_PROXY, "%s ssl finished successfully", self) self.delayed_close() return except SSL.Error, err: wc.log.exception(wc.LOG_PROXY, "read error %s", err) self.handle_error('read error') return if not data: # It's been closed, and handle_close has been called wc.log.debug(wc.LOG_PROXY, "%s closed, got empty data", self) return wc.log.debug(wc.LOG_NET, '%s <= read %d', self, len(data)) wc.log.debug(wc.LOG_NET, 'data %r', data) self.recv_buffer += data self.process_read()
2c6283b225556a48147643da0a0cb5f0a3536753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/2c6283b225556a48147643da0a0cb5f0a3536753/SslConnection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 896, 261, 2890, 4672, 3536, 896, 501, 628, 7419, 1459, 16, 1378, 518, 1368, 10665, 67, 4106, 471, 745, 1207, 67, 896, 8395, 1815, 365, 18, 8537, 14310, 18, 1330, 18, 4148, 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, 1640, 67, 896, 261, 2890, 4672, 3536, 896, 501, 628, 7419, 1459, 16, 1378, 518, 1368, 10665, 67, 4106, 471, 745, 1207, 67, 896, 8395, 1815, 365, 18, 8537, 14310, 18, 1330, 18, 4148, 12...
get_file( 'conffiles' ).write( tags['install_location'] )
get_file( 'conffiles' ).write( tags['install_location'][0].get_path() ) get_file( 'conffiles' ).write( '\n' )
def get_file( file ): target = filter( lambda x: x.get_path().rfind(file) != -1, target )[0] if not output_files.has_key(file): output_files[file] = open(file, 'w')
dd28faf6a766226f0961160e0d048f801d980bda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/dd28faf6a766226f0961160e0d048f801d980bda/ipk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 12, 585, 262, 30, 1018, 273, 1034, 12, 3195, 619, 30, 619, 18, 588, 67, 803, 7675, 86, 4720, 12, 768, 13, 480, 300, 21, 16, 1018, 262, 63, 20, 65, 309, 486, 876, 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, 336, 67, 768, 12, 585, 262, 30, 1018, 273, 1034, 12, 3195, 619, 30, 619, 18, 588, 67, 803, 7675, 86, 4720, 12, 768, 13, 480, 300, 21, 16, 1018, 262, 63, 20, 65, 309, 486, 876, 67...
raw = RawData(path, SYSLOG, strip_comments=False)
raw = RawData(path, strip_comments=False)
def __init__(self, path, fix_comments=False): if not os.path.isfile(path) or os.path.splitext(path)[1][1:].upper() \ not in _valid_extensions: raise DataError("Input format must be either HTML or TSV.") raw = RawData(path, SYSLOG, strip_comments=False) if raw.is_empty(): raise DataError("'%s' contains no test data" % path) self.settings = Settings(raw.settings, fix_comments) self.variables = Variables(raw.variables, fix_comments) self.testcases = TestCases(raw.testcases, fix_comments) self.keywords = UserKeywords(raw.keywords, fix_comments)
446a52133f84bbf96f47358710d5f0d9a10b024e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6988/446a52133f84bbf96f47358710d5f0d9a10b024e/robotidy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 16, 2917, 67, 9231, 33, 8381, 4672, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 803, 13, 578, 1140, 18, 803, 18, 4939, 408, 12, 803, 25146, 21, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 16, 2917, 67, 9231, 33, 8381, 4672, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 803, 13, 578, 1140, 18, 803, 18, 4939, 408, 12, 803, 25146, 21, 6...
s = """ include "interrupt.pxi" include "stdsage.pxi" """ + s
s = """\ninclude "interrupt.pxi"
def pyx_preparse(s): r""" Preparse a Pyx file * include cdefs.pxi, interrupt.pxi, stdsage.pxi * parse clang pragma (c or c++) * parse clib pragma (additional libraries to link in) * parse cinclude (additional include directories) The pragmas: \begin{description} \item[clang] may be either c or c++ indicating whether a C or C++ compiler should be used \item[clib] additional libraries to be linked in, the space separated list is split and passed to distutils. \item[cinclude] additional directories to search for header files. The space separated list is split and passed to distutils. \end{description} EXAMPLE: sage: from sage.misc.cython import pyx_preparse sage: pyx_preparse("") ('\ninclude "interrupt.pxi" # ctrl-c interrupt block support\ninclude "stdsage.pxi" # ctrl-c interrupt block support\n\ninclude "cdefs.pxi"\n', ['mpfr', 'gmp', 'gmpxx', 'stdc++', 'pari', 'm', 'curvesntl', 'g0nntl', 'jcntl', 'rankntl', 'gsl', 'cblas', 'atlas', 'ntl', 'csage'], ['.../local/include/csage/', '.../local/include/', '.../local/include/python2.5/', '.../devel/sage/sage/ext/', '.../devel/sage/', '.../devel/sage/sage/gsl/'], 'c', []) sage: s, libs, inc, lang, f = pyx_preparse("# clang c++\n #clib foo\n # cinclude bar\n") sage: lang 'c++' sage: libs ['foo', 'mpfr', 'gmp', 'gmpxx', 'stdc++', 'pari', 'm', 'curvesntl', 'g0nntl', 'jcntl', 'rankntl', 'gsl', 'cblas', 'atlas', 'ntl', 'csage'] sage: inc ['bar', '.../local/include/csage/', '.../local/include/', '.../local/include/python2.5/', '.../devel/sage/sage/ext/', '.../devel/sage/', '.../devel/sage/sage/gsl/'] """ lang = parse_keywords('clang', s) if lang[0]: lang = lang[0][0] else: lang = "c" v, s = parse_keywords('clib', s) libs = v + standard_libs additional_source_files, s = parse_keywords('cfile', s) v, s = parse_keywords('cinclude', s) inc = [environ_parse(x.replace('"','').replace("'","")) for x in v] + include_dirs s = """
1024054bfbf27d3c733245ecf6fa0b5aca716ffb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1024054bfbf27d3c733245ecf6fa0b5aca716ffb/cython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 92, 67, 1484, 2670, 12, 87, 4672, 436, 8395, 2962, 2670, 279, 4707, 92, 585, 380, 2341, 276, 12537, 18, 4430, 77, 16, 13123, 18, 4430, 77, 16, 2044, 87, 410, 18, 4430, 77, 380,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 92, 67, 1484, 2670, 12, 87, 4672, 436, 8395, 2962, 2670, 279, 4707, 92, 585, 380, 2341, 276, 12537, 18, 4430, 77, 16, 13123, 18, 4430, 77, 16, 2044, 87, 410, 18, 4430, 77, 380,...
r.concatTransform( M44f.createTranslated( V3f( 0, 0, -5 ) ) )
r.concatTransform( M44f.createTranslated( V3f( 0, 0, 5 ) ) )
def test( self ) : r = Renderer() r.setOption( "gl:mode", StringData( "deferred" ) ) r.setOption( "gl:searchPath:shader", StringData( "test/shaders" ) ) r.worldBegin() #c = PerspectiveCamera( horizontalFOV = 90 ) c = OrthographicCamera() w = SceneViewer( "scene", r.scene(), c ) r.setAttribute( "gl:blend:srcFactor", StringData( "one" ) ) r.setAttribute( "gl:blend:dstFactor", StringData( "one" ) ) r.setAttribute( "gl:blend:equation", StringData( "add" ) ) r.concatTransform( M44f.createTranslated( V3f( 0, 0, -5 ) ) ) r.concatTransform( M44f.createScaled( V3f( 0.004 ) ) ) r.concatTransform( M44f.createTranslated( V3f( -150, -200, 0 ) ) ) i = Reader.create( "test/images/numberWithAlpha.exr" ).read() i.render( r ) r.concatTransform( M44f.createTranslated( V3f( 300, 300, 1 ) ) ) i.render( r ) r.worldEnd() w.start()
50b44341755b6928c4623af7d853272c93e57733 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/50b44341755b6928c4623af7d853272c93e57733/CameraController.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 365, 262, 294, 225, 436, 273, 17589, 1435, 436, 18, 542, 1895, 12, 315, 7043, 30, 3188, 3113, 514, 751, 12, 315, 26622, 6, 262, 262, 436, 18, 542, 1895, 12, 315, 7043, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 365, 262, 294, 225, 436, 273, 17589, 1435, 436, 18, 542, 1895, 12, 315, 7043, 30, 3188, 3113, 514, 751, 12, 315, 26622, 6, 262, 262, 436, 18, 542, 1895, 12, 315, 7043, 30, ...
rospy.loginfo("[%s]:\n current step = " + i + "\n signal = %s\n" %(self.node_name, i, vehicleSignals[i]))
def Interpreter(self, msg): rospy.loginfo("[%s] Read a message from Detector" %(self.node_name)) if self.active: if self.setIntersectionType: self.hasObservedSignals = True
3f0dac3f7c4ad704825dbccc66c163a7044e5144 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1128/3f0dac3f7c4ad704825dbccc66c163a7044e5144/LED_interpreter_node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5294, 11599, 12, 2890, 16, 1234, 4672, 721, 30884, 18, 1330, 1376, 2932, 14451, 87, 65, 2720, 279, 883, 628, 22198, 6, 8975, 2890, 18, 2159, 67, 529, 3719, 309, 365, 18, 3535, 30, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5294, 11599, 12, 2890, 16, 1234, 4672, 721, 30884, 18, 1330, 1376, 2932, 14451, 87, 65, 2720, 279, 883, 628, 22198, 6, 8975, 2890, 18, 2159, 67, 529, 3719, 309, 365, 18, 3535, 30, 309,...
cursect[self.optionxform(optname)] = optval
optname = self.optionxform(optname) cursect[optname] = optval
def __read(self, fp, fpname): """Parse a sectioned setup file.
05e74c488d7085fb533b40a9d6860ee732e784e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/05e74c488d7085fb533b40a9d6860ee732e784e4/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 12, 2890, 16, 4253, 16, 4253, 529, 4672, 3536, 3201, 279, 2442, 329, 3875, 585, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 12, 2890, 16, 4253, 16, 4253, 529, 4672, 3536, 3201, 279, 2442, 329, 3875, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if self.runtime_library_dirs:
if runtime_library_dirs:
def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None):
1e6aca8fac8e2d940a907218e823ce1caf48d5da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1e6aca8fac8e2d940a907218e823ce1caf48d5da/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 11574, 67, 1612, 261, 2890, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 11574, 67, 1612, 261, 2890, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 33, ...
_ABSOLUTE_URL=r'((http|https|ftp|mailto|file|about)[:/]+?[%s0-9_\@\.\,\?\!\/\:\;\-\ _ABS_AND_RELATIVE_URL=r'([%s0-9_\@\.\,\?\!\/\:\;\-\
_ABSOLUTE_URL=r'((http|https|ftp|mailto|file|about)[:/]+?[%s0-9_\@\.\,\?\!\/\:\;\-\ _ABS_AND_RELATIVE_URL=r'([%s0-9_\@\.\,\?\!\/\:\;\-\
def doc_strong(self, s, expr = re.compile(r'\*\*([%s%s%s\s]+?)\*\*' % (letters, digits, strongem_punc)).search #expr = re.compile(r'\s*\*\*([ \n\r%s0-9.:/;,\'\"\?\-\_\/\=\-\>\<\(\)]+)\*\*(?!\*|-)' % letters).search, # old expr, inconsistent punc, failed to cross newlines. ):
a786f8a4bcc2743ba6651f0e5516638aff9403fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a786f8a4bcc2743ba6651f0e5516638aff9403fc/DocumentClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 67, 9110, 12, 2890, 16, 272, 16, 3065, 273, 283, 18, 11100, 12, 86, 8314, 12174, 14, 3816, 9, 87, 9, 87, 9, 87, 64, 87, 3737, 16626, 12174, 4035, 738, 261, 26054, 16, 6815, 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, 997, 67, 9110, 12, 2890, 16, 272, 16, 3065, 273, 283, 18, 11100, 12, 86, 8314, 12174, 14, 3816, 9, 87, 9, 87, 9, 87, 64, 87, 3737, 16626, 12174, 4035, 738, 261, 26054, 16, 6815, 16...
readwarnings(args[0]) def usage(exit, msg=None): if msg: sys.stderr.write("%s: %s\n" % (sys.argv[0], msg))
warnings = readwarnings(args[0]) if warnings is None: return 1 files = warnings.keys() if not files: print "No classic division warnings read from", args[0] return files.sort() exit = None for file in files: x = process(file, warnings[file]) exit = exit or x return exit def usage(msg): sys.stderr.write("%s: %s\n" % (sys.argv[0], msg))
def main(): try: opts, args = getopt.getopt(sys.argv[1:], "h") except getopt.error, msg: usage(2, msg) for o, a in opts: if o == "-h": help() if not args: usage(2, "at least one file argument is required") if args[1:]: sys.stderr.write("%s: extra file arguments ignored\n", sys.argv[0]) readwarnings(args[0])
1411e89cd48fda4dab58a672e67677772c9670ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1411e89cd48fda4dab58a672e67677772c9670ec/fixdiv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 76, 7923, 1335, 336, 3838, 18, 1636, 16, 1234, 30, 4084, 12, 22, 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, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 76, 7923, 1335, 336, 3838, 18, 1636, 16, 1234, 30, 4084, 12, 22, 16, ...
types_setProblematicStatus = [[IntType,LongType],StringType] def export_setProblematicStatus(self,fileID,status):
types_setProblematicStatus = [[IntType, LongType], StringType] def export_setProblematicStatus( self, fileID, status ):
def export_getPrognosisProblematics(self,prognosis): """ Get problematic files from the problematics table of the IntegrityDB """ gLogger.info("DataIntegrityHandler.getPrognosisProblematics: Attempting to get files with %s prognosis." % prognosis) res = integrityDB.getPrognosisProblematics(prognosis) if not res['OK']: gLogger.error("DataIntegrityHandler.getPrognosisProblematics: Failed to get prognosis files.", res['Message']) return res
c1b7c4db986dd1c0291dea482456ba2b1cdb51b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c1b7c4db986dd1c0291dea482456ba2b1cdb51b8/DataIntegrityHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 588, 626, 1600, 538, 291, 13719, 270, 2102, 12, 2890, 16, 685, 1600, 538, 291, 4672, 3536, 968, 6199, 2126, 1390, 628, 326, 6199, 270, 2102, 1014, 434, 326, 15285, 560, 2290, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 588, 626, 1600, 538, 291, 13719, 270, 2102, 12, 2890, 16, 685, 1600, 538, 291, 4672, 3536, 968, 6199, 2126, 1390, 628, 326, 6199, 270, 2102, 1014, 434, 326, 15285, 560, 2290, ...
return res.getChild(path, request)
return res.getChildWithDefault(path, request)
def getChild(self, path, request): res = ResourceScript(self.path, self.registry) return res.getChild(path, request)
e56188189e23ab296c708d7dbdd27a68b8ae7205 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e56188189e23ab296c708d7dbdd27a68b8ae7205/script.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8154, 12, 2890, 16, 589, 16, 590, 4672, 400, 273, 2591, 3651, 12, 2890, 18, 803, 16, 365, 18, 9893, 13, 327, 400, 18, 588, 1763, 12, 803, 16, 590, 13, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8154, 12, 2890, 16, 589, 16, 590, 4672, 400, 273, 2591, 3651, 12, 2890, 18, 803, 16, 365, 18, 9893, 13, 327, 400, 18, 588, 1763, 12, 803, 16, 590, 13, 2, -100, -100, -100, -100, -1...
self.threads = []
def fetch(self): self.threads = [] for feed in self.feeds: # If feed doesn't need an update, don't fire off a thread. if not self.needs_update(feed): continue
12d2f5a677e3f237e80528e6c850a654417b0568 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12359/12d2f5a677e3f237e80528e6c850a654417b0568/fetch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 12, 2890, 4672, 364, 4746, 316, 365, 18, 7848, 87, 30, 468, 971, 4746, 3302, 1404, 1608, 392, 1089, 16, 2727, 1404, 4452, 3397, 279, 2650, 18, 309, 486, 365, 18, 20600, 67, 2725,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 12, 2890, 4672, 364, 4746, 316, 365, 18, 7848, 87, 30, 468, 971, 4746, 3302, 1404, 1608, 392, 1089, 16, 2727, 1404, 4452, 3397, 279, 2650, 18, 309, 486, 365, 18, 20600, 67, 2725,...
def parseJobSubmitStdout(self, proxy, cmd, taskQueueID):
def parseJobSubmitStdout(self, proxy, cmd, taskQueueID, rb):
def parseJobSubmitStdout(self, proxy, cmd, taskQueueID): """ Parse Job Submit stdout to return pilot reference """ start = time.time() self.log.verbose( 'Executing Job Submit for TaskQueue', taskQueueID )
d53f0bc2ec0148dae624abbed41f55ad577693a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/d53f0bc2ec0148dae624abbed41f55ad577693a8/TaskQueueDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2278, 11620, 27334, 12, 2890, 16, 2889, 16, 1797, 16, 1562, 3183, 734, 16, 7138, 4672, 3536, 2884, 3956, 17320, 3909, 358, 327, 293, 22797, 2114, 3536, 787, 273, 813, 18, 957, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2278, 11620, 27334, 12, 2890, 16, 2889, 16, 1797, 16, 1562, 3183, 734, 16, 7138, 4672, 3536, 2884, 3956, 17320, 3909, 358, 327, 293, 22797, 2114, 3536, 787, 273, 813, 18, 957, 1435...
except Exception:
except Exception, e:
def run_group(self, function, *args, **dargs): """\ function: subroutine to run *args: arguments for the function """
a4f84a3cf51abfc6e256821e36f00a25221c4241 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/a4f84a3cf51abfc6e256821e36f00a25221c4241/server_job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 1655, 12, 2890, 16, 445, 16, 380, 1968, 16, 2826, 72, 1968, 4672, 3536, 64, 445, 30, 720, 22640, 358, 1086, 380, 1968, 30, 1775, 364, 326, 445, 3536, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 1655, 12, 2890, 16, 445, 16, 380, 1968, 16, 2826, 72, 1968, 4672, 3536, 64, 445, 30, 720, 22640, 358, 1086, 380, 1968, 30, 1775, 364, 326, 445, 3536, 2, -100, -100, -100, -...
el1 = SubElement(el1, 'draw:frame', attrib=attrib)
el3 = SubElement(current_element, 'draw:frame', attrib=attrib)
def generate_figure(self, node, source, destination): caption = None for node1 in node.parent.children: if node1.tagname == 'caption': caption = node1.astext() self.image_style_count += 1 style_name = 'rstframestyle%d' % self.image_style_count if 'scale' in node.attributes: try: scale = int(node.attributes['scale']) if scale < 1 or scale > 100: raise ValueError scale = scale * 0.01 except ValueError, e: print 'Error: Invalid scale for image: "%s"' % ( node.attributes['scale'], ) else: scale = 1.0 width = None if 'width' in node.attributes: try: width = int(node.attributes['width']) width = width * (35.278 / 1000.0) width *= scale #attrib['svg:width'] = '%.2fcm' % (width, ) except ValueError, e: print 'Error: Invalid width for image: "%s"' % ( node.attributes['width'], ) height = None if 'height' in node.attributes: try: height = int(node.attributes['height']) height = height * (35.278 / 1000.0) height *= scale #attrib['svg:height'] = '%.2fcm' % (height, ) except ValueError, e: print 'Error: Invalid height for image: "%s"' % ( node.attributes['height'], ) # Add the styles attrib = { 'style:name': style_name, 'style:family': 'graphic', 'style:parent-style-name': 'Frame', } el1 = SubElement(self.automatic_styles, 'style:style', attrib=attrib, nsdict=SNSD) halign = 'center' valign = 'top' if 'align' in node.attributes: align = node.attributes['align'].split() for val in align: if val in ('left', 'center', 'right'): halign = val elif val in ('top', 'middle', 'bottom'): valign = val attrib = { 'fo:margin-left': '0cm', 'fo:margin-right': '0cm', 'fo:margin-top': '0cm', 'fo:margin-bottom': '0cm', 'style:wrap': 'dynamic', 'style:number-wrapped-paragraphs': 'no-limit', 'style:vertical-pos': valign, 'style:vertical-rel': 'paragraph', 'style:horizontal-pos': halign, 'style:horizontal-rel': 'paragraph', 'fo:padding': '0cm', 'fo:border': 'none', } #ipshell('At generate_figure') el2 = SubElement(el1, 'style:graphic-properties', attrib=attrib, nsdict=SNSD) # Add the content attrib = {'text:style-name': 'rststyle-textbody'} el1 = SubElement(self.current_element, 'text:p', attrib=attrib) attrib = { 'draw:style-name': style_name, 'draw:name': 'Frame1', 'text:anchor-type': 'paragraph', 'draw:z-index': '1', } if width is not None: attrib['svg:width'] = '%.2fcm' % (width, ) el1 = SubElement(el1, 'draw:frame', attrib=attrib) attrib = {} if height is not None: attrib['fo:min-height'] = '%.2fcm' % (height, ) el1 = SubElement(el1, 'draw:text-box', attrib=attrib) attrib = {'text:style-name': 'rststyle-caption', } el1 = SubElement(el1, 'text:p', attrib=attrib) # Add the image (frame) inside the figure/caption frame. #ipshell('At visit_image #1') el2 = self.generate_image(node, source, destination, el1) if caption: el2.tail = caption
086c03a394bb4fe54c588e814ac2435862cc205a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1278/086c03a394bb4fe54c588e814ac2435862cc205a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 19675, 12, 2890, 16, 756, 16, 1084, 16, 2929, 4672, 11006, 273, 599, 364, 756, 21, 316, 756, 18, 2938, 18, 5906, 30, 309, 756, 21, 18, 2692, 529, 422, 296, 15386, 4278, 110...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 19675, 12, 2890, 16, 756, 16, 1084, 16, 2929, 4672, 11006, 273, 599, 364, 756, 21, 316, 756, 18, 2938, 18, 5906, 30, 309, 756, 21, 18, 2692, 529, 422, 296, 15386, 4278, 110...
while map: poll_fun(timeout, map)
if count is None: while map: poll_fun(timeout, map) else: while map and count > 0: poll_fun(timeout, map) count = count - 1
def loop(timeout=30.0, use_poll=False, map=None): if map is None: map = socket_map if use_poll and hasattr(select, 'poll'): poll_fun = poll2 else: poll_fun = poll while map: poll_fun(timeout, map)
48dbcbcca054c0b85a2ade5e721d386bdf08f5e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/48dbcbcca054c0b85a2ade5e721d386bdf08f5e0/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 12, 4538, 33, 5082, 18, 20, 16, 999, 67, 13835, 33, 8381, 16, 852, 33, 7036, 4672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 225, 309, 999, 67, 13835, 471, 3859, 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, 2798, 12, 4538, 33, 5082, 18, 20, 16, 999, 67, 13835, 33, 8381, 16, 852, 33, 7036, 4672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 225, 309, 999, 67, 13835, 471, 3859, 12, ...
Parser(ewb)
build.Parser(ewb)
def MyOptionParser(): parser = OptionParser(description=__copyright__,version=__version__,prog="build.exe",usage="%prog [options] [target]") parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32','X64','IPF','EBC'], dest="TARGET_ARCH", help="ARCHS is one of list: IA32, X64, IPF or EBC, which overrides target.txt's TARGET_ARCH definition. To specify more archs, please repeat this option.") parser.add_option("-p", "--platform", action="store", type="string", dest="DSCFILE", help="Build the platform specified by the DSC file name argument, overrides target.txt's ACTIVE_PLATFORM definition.") parser.add_option("-m", "--module", action="store", type="string", dest="INFFILE", help="Build the module specified by the INF file name argument.") parser.add_option("-b", "--buildtarget", action="append", type="choice", choices=['DEBUG','RELEASE'], dest="TARGET", help="TARGET is one of list: DEBUG, RELEASE, which overrides target.txt's TARGET definition. To specify more TARGET, please repeat this option.") parser.add_option("-t", "--tagname", action="append", type="string", dest="TOOL_CHAIN_TAG", help="Using the Tool Chain Tagname to build the platform, overrides target.txt's TOOL_CHAIN_TAG definition.") parser.add_option("-s", "--spawn", action="store_true", type=None, help="If this flag is specified, as soon as a module can be built, the build will start, without waiting for AutoGen to complete remaining modules. While this option provides feedback that looks fast, due to overhead of the AutoGen function, this option is slower than letting AutoGen complete before starting the MAKE phase.") parser.add_option("-n", action="store", type="int", dest="NUM", help="Build the platform using multi-threaded compiler, this option must combine with spawn option. The value overrides target.txt's MULTIPLE_THREAD and MAX_CONCURRENT_THREAD_NUMBER, less than 2 will disable multi-thread builds.") parser.add_option("-f", "--fdf", action="store", type="string", dest="FDFFILE", help="The name of the FDF file to use, which overrides the setting in the DSC file.") parser.add_option("-k", "--msft", action="store_true", type=None, help="Make Option: Generate only NMAKE Makefiles: Makefile") parser.add_option("-g", "--gcc", action="store_true", type=None, help="Make Option: Generate only GMAKE Makefiles: GNUmakefile") parser.add_option("-l", "--all", action="store_true", type=None, help="Make Option: Generate both NMAKE and GMAKE makefiles.") parser.add_option("-q", "--quiet", action="store_true", type=None, help="Disable all messages except FATAL ERRORS.") parser.add_option("-v", "--verbose", action="store_true", type=None, help="Turn on verbose output with informational messages printed.") parser.add_option("-d", "--debug", action="store", type="int", help="Enable debug messages at specified level.") (opt, args)=parser.parse_args() return (opt, args)
c00be440a988bdc5f867d4cd1f47514f2561e4d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/c00be440a988bdc5f867d4cd1f47514f2561e4d8/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8005, 1895, 2678, 13332, 2082, 273, 18862, 12, 3384, 33, 972, 29187, 972, 16, 1589, 33, 972, 1589, 972, 16, 14654, 1546, 3510, 18, 14880, 3113, 9167, 11613, 14654, 306, 2116, 65, 306, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8005, 1895, 2678, 13332, 2082, 273, 18862, 12, 3384, 33, 972, 29187, 972, 16, 1589, 33, 972, 1589, 972, 16, 14654, 1546, 3510, 18, 14880, 3113, 9167, 11613, 14654, 306, 2116, 65, 306, 32...
sage: rectangular=(u,v,w,w) sage: spherical=(w*cos(u)*sin(v),w*sin(u)*sin(v),w*cos(v),w) sage: cylindric_radial=(w*cos(u),w*sin(u),v,w) sage: cylindric_axial=(v*cos(u),v*sin(u),w,w) sage: parabolic_cylindrical=(w*v,(v^2-w^2)/2,u,w)
sage: rectangular=(u,v,w) sage: spherical=(w*cos(u)*sin(v),w*sin(u)*sin(v),w*cos(v)) sage: cylindric_radial=(w*cos(u),w*sin(u),v) sage: cylindric_axial=(v*cos(u),v*sin(u),w) sage: parabolic_cylindrical=(w*v,(v^2-w^2)/2,u)
def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): """ INPUT: - ``f`` - a symbolic expression or function of 2 variables - ``urange`` - a 2-tuple (u_min, u_max) or a 3-tuple (u, u_min, u_max) - ``vrange`` - a 2-tuple (v_min, v_max) or a 3-tuple (v, v_min, v_max) - ``adaptive`` - (default: False) whether to use adaptive refinement to draw the plot (slower, but may look better). This option does NOT work in conjuction with a transformation (see below). - ``mesh`` - bool (default: False) whether to display mesh grid lines - ``dots`` - bool (default: False) whether to display dots at mesh grid points - ``plot_points`` - (default: "automatic") initial number of sample points in each direction; an integer or a pair of integers - ``transformation`` - (default: None) a transformation to apply. May be a 4-tuple (x_func, y_func, z_func, fvar) where the first 3 items indicate a transformation to cartesian coordinates (from your coordinate system) in terms of u, v, and the function variable fvar (for which the value of f will be substituted). May also be a predefined coordinate system transformation like Spherical or Cylindrical. .. note:: ``mesh`` and ``dots`` are not supported when using the Tachyon raytracer renderer. EXAMPLES: We plot a 3d function defined as a Python function:: sage: plot3d(lambda x, y: x^2 + y^2, (-2,2), (-2,2)) We plot the same 3d function but using adaptive refinement:: sage: plot3d(lambda x, y: x^2 + y^2, (-2,2), (-2,2), adaptive=True) Adaptive refinement but with more points:: sage: plot3d(lambda x, y: x^2 + y^2, (-2,2), (-2,2), adaptive=True, initial_depth=5) We plot some 3d symbolic functions:: sage: var('x,y') (x, y) sage: plot3d(x^2 + y^2, (x,-2,2), (y,-2,2)) sage: plot3d(sin(x*y), (x, -pi, pi), (y, -pi, pi)) We give a plot with extra sample points:: sage: var('x,y') (x, y) sage: plot3d(sin(x^2+y^2),(x,-5,5),(y,-5,5), plot_points=200) sage: plot3d(sin(x^2+y^2),(x,-5,5),(y,-5,5), plot_points=[10,100]) A 3d plot with a mesh:: sage: var('x,y') (x, y) sage: plot3d(sin(x-y)*y*cos(x),(x,-3,3),(y,-3,3), mesh=True) Two wobby translucent planes:: sage: x,y = var('x,y') sage: P = plot3d(x+y+sin(x*y), (x,-10,10),(y,-10,10), opacity=0.87, color='blue') sage: Q = plot3d(x-2*y-cos(x*y),(x,-10,10),(y,-10,10),opacity=0.3,color='red') sage: P + Q We draw two parametric surfaces and a transparent plane:: sage: L = plot3d(lambda x,y: 0, (-5,5), (-5,5), color="lightblue", opacity=0.8) sage: P = plot3d(lambda x,y: 4 - x^3 - y^2, (-2,2), (-2,2), color='green') sage: Q = plot3d(lambda x,y: x^3 + y^2 - 4, (-2,2), (-2,2), color='orange') sage: L + P + Q We draw the "Sinus" function (water ripple-like surface):: sage: x, y = var('x y') sage: plot3d(sin(pi*(x^2+y^2))/2,(x,-1,1),(y,-1,1)) Hill and valley (flat surface with a bump and a dent):: sage: x, y = var('x y') sage: plot3d( 4*x*exp(-x^2-y^2), (x,-2,2), (y,-2,2)) An example of a transformation:: sage: r, phi, z = var('r phi z') sage: trans=(r*cos(phi),r*sin(phi),z,z) sage: plot3d(cos(r),(r,0,17*pi/2),(phi,0,2*pi),transformation=trans,opacity=0.87).show(aspect_ratio=(1,1,2),frame=False) Many more examples of transformations:: sage: u, v, w = var('u v w') sage: rectangular=(u,v,w,w) sage: spherical=(w*cos(u)*sin(v),w*sin(u)*sin(v),w*cos(v),w) sage: cylindric_radial=(w*cos(u),w*sin(u),v,w) sage: cylindric_axial=(v*cos(u),v*sin(u),w,w) sage: parabolic_cylindrical=(w*v,(v^2-w^2)/2,u,w) Plot a constant function of each of these to get an idea of what it does:: sage: A = plot3d(2,(u,-pi,pi),(v,0,pi),transformation=rectangular,plot_points=[100,100]) sage: B = plot3d(2,(u,-pi,pi),(v,0,pi),transformation=spherical,plot_points=[100,100]) sage: C = plot3d(2,(u,-pi,pi),(v,0,pi),transformation=cylindric_radial,plot_points=[100,100]) sage: D = plot3d(2,(u,-pi,pi),(v,0,pi),transformation=cylindric_axial,plot_points=[100,100]) sage: E = plot3d(2,(u,-pi,pi),(v,-pi,pi),transformation=parabolic_cylindrical,plot_points=[100,100]) sage: @interact sage: def _(which_plot=[A,B,C,D,E]): ... show(which_plot) Now plot a function:: sage: g=3+sin(4*u)/2+cos(4*v)/2 sage: F = plot3d(g,(u,-pi,pi),(v,0,pi),transformation=rectangular,plot_points=[100,100]) sage: G = plot3d(g,(u,-pi,pi),(v,0,pi),transformation=spherical,plot_points=[100,100]) sage: H = plot3d(g,(u,-pi,pi),(v,0,pi),transformation=cylindric_radial,plot_points=[100,100]) sage: I = plot3d(g,(u,-pi,pi),(v,0,pi),transformation=cylindric_axial,plot_points=[100,100]) sage: J = plot3d(g,(u,-pi,pi),(v,0,pi),transformation=parabolic_cylindrical,plot_points=[100,100]) sage: @interact sage: def _(which_plot=[F, G, H, I, J]): ... show(which_plot) TESTS: Make sure the transformation plots work:: sage: show(A + B + C + D + E) sage: show(F + G + H + I + J) Listing the same plot variable twice gives an error:: sage: x, y = var('x y') sage: plot3d( 4*x*exp(-x^2-y^2), (x,-2,2), (x,-2,2)) Traceback (most recent call last): ... ValueError: range variables should be distinct, but there are duplicates """ if transformation is not None: from sage.symbolic.callable import is_CallableSymbolicExpression # First, determine the parameters for f (from the first item of urange # and vrange, preferably). if len(urange) == 3 and len(vrange) == 3: params = (urange[0], vrange[0]) elif is_CallableSymbolicExpression(f): params = f.variables() else: # There's no way to find out raise ValueError, 'expected 3-tuple for urange and vrange' if isinstance(transformation, (tuple, list)): transformation = _ArbCoordTrans(transformation[0:3], transformation[3]) if isinstance(transformation, _CoordTrans): R = transformation.to_cartesian(f, params) return parametric_plot3d.parametric_plot3d(R, urange, vrange, **kwds) else: raise ValueError, 'unknown transformation type' elif adaptive: P = plot3d_adaptive(f, urange, vrange, **kwds) else: u=fast_float_arg(0) v=fast_float_arg(1) P=parametric_plot3d.parametric_plot3d((u,v,f), urange, vrange, **kwds) P.frame_aspect_ratio([1.0,1.0,0.5]) return P
6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 23, 72, 12, 74, 16, 8896, 726, 16, 331, 3676, 16, 5855, 688, 33, 8381, 16, 8620, 33, 7036, 16, 2826, 25577, 4672, 3536, 12943, 30, 282, 300, 225, 12176, 74, 10335, 300, 279, 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, 3207, 23, 72, 12, 74, 16, 8896, 726, 16, 331, 3676, 16, 5855, 688, 33, 8381, 16, 8620, 33, 7036, 16, 2826, 25577, 4672, 3536, 12943, 30, 282, 300, 225, 12176, 74, 10335, 300, 279, 16...
self.points=[]
self.points=points
def __init__(self,points): self.points=[]
d59d1b6dc48d9a5103ea50db296c5f66f5108839 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/553/d59d1b6dc48d9a5103ea50db296c5f66f5108839/nef.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4139, 4672, 365, 18, 4139, 33, 4139, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4139, 4672, 365, 18, 4139, 33, 4139, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
<<<<<<< HEAD:pylal/bin/makeCheckList.py =======
def getFileMatchingTrigger(jobname,string_id,file_list=False): if os.access(jobname,os.F_OK): filesInDir = os.listdir(jobname) fileList = [] for paramFile in filesInDir: if fnmatch.fnmatch(paramFile, "*"+string_id+"*.html"): if file_list: fileList.append("../"+jobname+"/"+paramFile) else: return "../"+jobname+"/"+paramFile if fileList: return fileList else: return False else: return False
ad7d739ec0d5d627680e2d9368a00eb43869538f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/ad7d739ec0d5d627680e2d9368a00eb43869538f/makeCheckList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 9517, 6518, 12, 4688, 529, 16, 1080, 67, 350, 16, 768, 67, 1098, 33, 8381, 4672, 309, 1140, 18, 3860, 12, 4688, 529, 16, 538, 18, 42, 67, 3141, 4672, 1390, 382, 1621, 273, 1140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 9517, 6518, 12, 4688, 529, 16, 1080, 67, 350, 16, 768, 67, 1098, 33, 8381, 4672, 309, 1140, 18, 3860, 12, 4688, 529, 16, 538, 18, 42, 67, 3141, 4672, 1390, 382, 1621, 273, 1140...
if flags & select.POLLPRI: obj.handle_expt_event()
except socket.error, e: if e.args[0] not in (EBADF, ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED): obj.handle_error() else: obj.handle_close()
def readwrite(obj, flags): try: if flags & select.POLLIN: obj.handle_read_event() if flags & select.POLLOUT: obj.handle_write_event() if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL): obj.handle_close() if flags & select.POLLPRI: obj.handle_expt_event() except _reraised_exceptions: raise except: obj.handle_error()
ad728627f2610585efc7c8db96d9dc806befa100 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/ad728627f2610585efc7c8db96d9dc806befa100/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2626, 12, 2603, 16, 2943, 4672, 775, 30, 309, 2943, 473, 2027, 18, 14232, 20663, 30, 1081, 18, 4110, 67, 896, 67, 2575, 1435, 309, 2943, 473, 2027, 18, 14232, 1502, 1693, 30, 1081...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 12, 2603, 16, 2943, 4672, 775, 30, 309, 2943, 473, 2027, 18, 14232, 20663, 30, 1081, 18, 4110, 67, 896, 67, 2575, 1435, 309, 2943, 473, 2027, 18, 14232, 1502, 1693, 30, 1081...
raise NotImplementedError
def stopProducing(self): """Stop producing data. This tells a producer that its consumer has died, so it must stop producing data for good. """ raise NotImplementedError
27be84b2f6f11800d9a861b244d0396c905261e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/27be84b2f6f11800d9a861b244d0396c905261e0/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 8390, 2822, 12, 2890, 4672, 3536, 4947, 4810, 2822, 501, 18, 225, 1220, 24551, 279, 12608, 716, 2097, 4765, 711, 302, 2092, 16, 1427, 518, 1297, 2132, 4810, 2822, 501, 364, 7494, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2132, 8390, 2822, 12, 2890, 4672, 3536, 4947, 4810, 2822, 501, 18, 225, 1220, 24551, 279, 12608, 716, 2097, 4765, 711, 302, 2092, 16, 1427, 518, 1297, 2132, 4810, 2822, 501, 364, 7494, 1...
if shouldround and numdigits > len(other.int) + prec + 1 -len(tmp.int): extend = prec + 2 -len(tmp.int) if extend <= 0: extend = 1 tmp.int.extend([0]*extend) tmp.exp -= extend other.int[:] = [0]*(len(tmp.int)-1)+[1] other.exp = tmp.exp return op1, op2 tmp.int.extend([0] * numdigits) tmp.exp = tmp.exp - numdigits numdigits = len(op1.int) - len(op2.int) if numdigits < 0: numdigits = -numdigits tmp = op1 else: tmp = op2 tmp.int[0:0] = [0] * numdigits
if shouldround and numdigits > prec + 1: tmp_len = len(str(tmp.int)) other_len = len(str(other.int)) if numdigits > (other_len + prec + 1 - tmp_len): extend = prec + 2 - tmp_len if extend <= 0: extend = 1 tmp.int *= 10 ** extend tmp.exp -= extend other.int = 1 other.exp = tmp.exp return op1, op2 tmp.int *= 10 ** numdigits tmp.exp -= numdigits
def _normalize(op1, op2, shouldround = 0, prec = 0): """Normalizes op1, op2 to have the same exp and length of coefficient. Done during addition. """ # Yes, the exponent is a long, but the difference between exponents # must be an int-- otherwise you'd get a big memory problem. numdigits = int(op1.exp - op2.exp) if numdigits < 0: numdigits = -numdigits tmp = op2 other = op1 else: tmp = op1 other = op2 if shouldround and numdigits > len(other.int) + prec + 1 -len(tmp.int): # If the difference in adjusted exps is > prec+1, we know # other is insignificant, so might as well put a 1 after the precision. # (since this is only for addition.) Also stops MemoryErrors. extend = prec + 2 -len(tmp.int) if extend <= 0: extend = 1 tmp.int.extend([0]*extend) tmp.exp -= extend other.int[:] = [0]*(len(tmp.int)-1)+[1] other.exp = tmp.exp return op1, op2 tmp.int.extend([0] * numdigits) tmp.exp = tmp.exp - numdigits numdigits = len(op1.int) - len(op2.int) # numdigits != 0 => They have the same exponent, but not the same length # of the coefficient. if numdigits < 0: numdigits = -numdigits tmp = op1 else: tmp = op2 tmp.int[0:0] = [0] * numdigits return op1, op2
323d0b30a64964b89a85e1b02e8fcc4017ce9fa7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/323d0b30a64964b89a85e1b02e8fcc4017ce9fa7/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12237, 12, 556, 21, 16, 1061, 22, 16, 1410, 2260, 273, 374, 16, 13382, 273, 374, 4672, 3536, 26265, 1061, 21, 16, 1061, 22, 358, 1240, 326, 1967, 1329, 471, 769, 434, 16554, 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, 12237, 12, 556, 21, 16, 1061, 22, 16, 1410, 2260, 273, 374, 16, 13382, 273, 374, 4672, 3536, 26265, 1061, 21, 16, 1061, 22, 358, 1240, 326, 1967, 1329, 471, 769, 434, 16554, 18, ...
%(name)s"
%(name)s
def macro_EmbedObject(macro, target=None, pagename=None, width=wikiutil.UnitArgument(None, float, ['px', 'em', 'mm', '%']), height=wikiutil.UnitArgument(None, float, ['px', 'em', 'mm', '%']), alt=u'', play=False, stop=True, loop=False, quality=(u'high', u'low', u'medium'), op=True, repeat=False, autostart=False, align=(u'middle', u'top', u'bottom'), hidden=False, menu=True, wmode=u'transparent', url_mimetype=None): """ This macro is used to embed an object into a wiki page """ # Join unit arguments with their units if width: if width[1] == 'px': width = '%dpx' % int(width[0]) else: width = '%g%s' % width if height: if height[1] == 'px': height = '%dpx' % int(height[0]) else: height = '%g%s' % height request = macro.request _ = macro.request.getText fmt = macro.formatter # AttachFile calls always with pagename. Users can call the macro from a different page as the attachment is saved. if not pagename: pagename = fmt.page.page_name if not target: return fmt.text(_('%(extension_name)s %(extension_type)s: Required argument %(argument_name)s missing.') % { "extension_name": extension_name, "extension_type": extension_type, "argument_name": "target", }) if not wikiutil.is_URL(target): pagename, fname = AttachFile.absoluteName(target, pagename) if not AttachFile.exists(request, pagename, fname): linktext = _('Upload new attachment "%(filename)s"') % {'filename': fname} target = AttachFile.getAttachUrl(pagename, fname, request, upload=True) return (fmt.url(1, target) + fmt.text(linktext) + fmt.url(0)) url = AttachFile.getAttachUrl(pagename, fname, request) mt = wikiutil.MimeType(filename=fname) else: if not url_mimetype: return fmt.text(_('%(extension_name)s %(extension_type)s: Required argument %(argument_name)s missing.') % { "extension_name": extension_name, "extension_type": extension_type, "argument_name": "url_mimetype", }) else: url = target mt = wikiutil.MimeType() # initialize dict try: mt.major, mt.minor = url_mimetype.split('/') except ValueError: return fmt.text(_('%(extension_name)s %(extension_type)s: Invalid %(argument_name)s=%(argument_value)s!') % { "extension_name": extension_name, "extension_type": extension_type, "argument_name": "url_mimetype", "argument_value": str(url_mimetype), }) mime_type = "%s/%s" % (mt.major, mt.minor, ) dangerous = mime_type in request.cfg.mimetypes_xss_protect if not mime_type in request.cfg.mimetypes_embed or dangerous: return "%s: %s%s%s" % (fmt.text( _("Current configuration does not allow embedding of the file %(file)s because of its mimetype %(mimetype)s.") % { "mimetype": mime_type, "file": target}), fmt.url(1, url), fmt.text(target), fmt.url(0)) if not alt: alt = "%(text)s %(mime_type)s" % {'text': _("Embedded"), 'mime_type': mime_type} embed_src = '' if mt.major == 'video': if not width and not height: width = '400px' height = '400px' embed_src = '''
74e4c1f9cbb41815b38c13708f209f31d533a37c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/74e4c1f9cbb41815b38c13708f209f31d533a37c/EmbedObject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 67, 9538, 921, 12, 26448, 16, 1018, 33, 7036, 16, 4262, 1069, 33, 7036, 16, 1835, 33, 13044, 1367, 18, 2802, 1379, 12, 7036, 16, 1431, 16, 10228, 4430, 2187, 296, 351, 2187, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 67, 9538, 921, 12, 26448, 16, 1018, 33, 7036, 16, 4262, 1069, 33, 7036, 16, 1835, 33, 13044, 1367, 18, 2802, 1379, 12, 7036, 16, 1431, 16, 10228, 4430, 2187, 296, 351, 2187, 296...
self.__importedNamespaces = []
def __init__ (self, *args, **kw): assert 'schema' not in kw self.__schemaLocation = kw.get('schema_location', None) if self.__schemaLocation is not None: redundant = _ImportElementInformationItem._BookmarkIngest(self.__schemaLocation) #assert not redundant super(Schema, self).__init__(*args, **kw) self.__targetNamespace = kw.get('target_namespace', self._namespaceContext().targetNamespace()) if not isinstance(self.__targetNamespace, pyxb.namespace.Namespace): raise pyxb.LogicError('Schema constructor requires valid Namespace instance as target_namespace') self.__defaultNamespace = kw.get('default_namespace', self._namespaceContext().defaultNamespace()) if not ((self.__defaultNamespace is None) or isinstance(self.__defaultNamespace, pyxb.namespace.Namespace)): raise pyxb.LogicError('Schema default namespace must be None or a valid Namespace instance')
bb770071f948b326a685c6c08e3108a4ab982198 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/bb770071f948b326a685c6c08e3108a4ab982198/structures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 1815, 296, 4821, 11, 486, 316, 5323, 365, 16186, 4821, 2735, 273, 5323, 18, 588, 2668, 4821, 67, 3562, 2187, 599, 13, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 1815, 296, 4821, 11, 486, 316, 5323, 365, 16186, 4821, 2735, 273, 5323, 18, 588, 2668, 4821, 67, 3562, 2187, 599, 13, 3...
row.setdefault('translation', trad)
if ('translation' not in row) or (not row['translation']): row['translation'] = trad
def _process(format, modules, rows, buffer, lang, newlang): if format == 'csv': writer=csv.writer(buffer, 'UNIX') for row in rows: writer.writerow(row) elif format == 'po': rows.pop(0) writer = tools.TinyPoFile(buffer) writer.write_infos(modules)
2a54df0171cffbe3f57dad8b055d60ba7d278677 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/2a54df0171cffbe3f57dad8b055d60ba7d278677/translate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 12, 2139, 16, 4381, 16, 2595, 16, 1613, 16, 3303, 16, 394, 4936, 4672, 309, 740, 422, 296, 6715, 4278, 2633, 33, 6715, 18, 6299, 12, 4106, 16, 296, 10377, 60, 6134, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 12, 2139, 16, 4381, 16, 2595, 16, 1613, 16, 3303, 16, 394, 4936, 4672, 309, 740, 422, 296, 6715, 4278, 2633, 33, 6715, 18, 6299, 12, 4106, 16, 296, 10377, 60, 6134, 364, 1...
res = self._checkAdminPermission()
res = self._checkAdminPermission(credDict)
def getGroups(self,credDict): res = self._checkAdminPermission() if not res['OK']: return res if not res['Value']: return S_ERROR("Permission denied") return self.ugManager.getGroups(userName)
1fab4af2a2efe3dcf87ee8515cc87998ad9cf2f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/1fab4af2a2efe3dcf87ee8515cc87998ad9cf2f6/FileCatalogDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22708, 12, 2890, 16, 20610, 5014, 4672, 400, 273, 365, 6315, 1893, 4446, 5041, 12, 20610, 5014, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 309, 486, 400, 3292, 620, 3546, 30, 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, 22708, 12, 2890, 16, 20610, 5014, 4672, 400, 273, 365, 6315, 1893, 4446, 5041, 12, 20610, 5014, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 309, 486, 400, 3292, 620, 3546, 30, 3...
if baseclass and not utils.isTGVFalse(element.getTaggedValue('base_class',1)) \ and not element.hasStereoType('mixin', umlprofile=self.uml_profile): baseclasses = baseclass.split(',') if utils.isTGVTrue(element.getTaggedValue('parentclass_first')) or utils.isTGVTrue(element.getTaggedValue('parentclasses_first')): parentnames = parentnames + baseclasses else: parentnames = baseclasses + parentnames
if (baseclass and not utils.isTGVFalse(element.getTaggedValue('base_class',1)) and not element.hasStereoType('mixin', umlprofile=self.uml_profile)): baseclasses = baseclass.split(',') if (utils.isTGVTrue(element.getTaggedValue('parentclass_first')) or utils.isTGVTrue(element.getTaggedValue('parentclasses_first')) or element.hasStereoType(self.remember_stereotype, umlprofile=self.uml_profile)): parentnames = parentnames + baseclasses else: parentnames = baseclasses + parentnames
def getArchetypesBase(self, element, parentnames, parent_is_archetype): """ find bases (baseclass and baseschema) and return a 3-tuple (baseclass, baseschema, parentnames)
5c12f67a605867ef951286afa685d601114e82c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11941/5c12f67a605867ef951286afa685d601114e82c7/ArchetypesGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12269, 15180, 2171, 12, 2890, 16, 930, 16, 982, 1973, 16, 982, 67, 291, 67, 991, 5872, 4672, 3536, 1104, 8337, 261, 1969, 1106, 471, 8337, 1243, 13, 471, 327, 279, 890, 17, 8052, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12269, 15180, 2171, 12, 2890, 16, 930, 16, 982, 1973, 16, 982, 67, 291, 67, 991, 5872, 4672, 3536, 1104, 8337, 261, 1969, 1106, 471, 8337, 1243, 13, 471, 327, 279, 890, 17, 8052, ...
majorVersion = version
if len(versionData) == 3: majorVersion = versionData[0] minorVersion = versionData[1] releaseVersion = versionData[2] else: majorVersion = version
def _getVersionInfo(buildenv): majorVersion = '' minorVersion = '' releaseVersion = '' versionFilename = 'version.py' versionFile = open(versionFilename, 'r') lines = versionFile.readlines() versionFile.close() data = {} for line in lines: line = line.lstrip() if not line.startswith('#'): linedata = line.split('=') if len(linedata) == 2: id = linedata[0].strip().lower() value = linedata[1].lstrip() value = value[:-1] #strip off newline if value.startswith('"'): value = value[1:-1] #remove ""'s hack data[id] = value del data['buildrevision'] # remove the lowercase item data['build'] = buildenv['buildVersion'] data['buildRevision'] = _getSVNRevisionInfo(buildenv) version = data['release'] versionData = version.split('.') if len(versionData) == 2: majorVersion = versionData[0] versionData = versionData[1].split('-') if len(versionData) == 2: minorVersion = versionData[0] releaseVersion = versionData[1] else: majorVersion = version versionFile = open(versionFilename, 'w') headerData = ' # Note:\n \
7851977b533220e151181cfb7b16da7384e21b35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/7851977b533220e151181cfb7b16da7384e21b35/__hardhat__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 28571, 12, 3510, 3074, 4672, 7888, 1444, 565, 273, 875, 8439, 1444, 565, 273, 875, 3992, 1444, 225, 273, 875, 1177, 5359, 273, 296, 1589, 18, 2074, 11, 225, 1177, 812, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 28571, 12, 3510, 3074, 4672, 7888, 1444, 565, 273, 875, 8439, 1444, 565, 273, 875, 3992, 1444, 225, 273, 875, 1177, 5359, 273, 296, 1589, 18, 2074, 11, 225, 1177, 812, 273, 1...
if aProperty not in (CO_ENDPOINT1, CO_ENDPOINT2, CO_PROCESS_ATTACHED, CO_VARIABLE_ATTACHED): aValue = conBuffer.getProperty( aProperty ) conObject.setProperty( aProperty, aValue )
def __pasteConnectionObjectBuffer( self, aLayout, conBuffer, translationList ): anID = conBuffer.getID() processID = conBuffer.getProperty( CO_PROCESS_ATTACHED )
9cc676874a79bf1b520a447ac6a22c63d9fae212 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/9cc676874a79bf1b520a447ac6a22c63d9fae212/LayoutBufferFactory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 29795, 1952, 921, 1892, 12, 365, 16, 279, 3744, 16, 356, 1892, 16, 4794, 682, 262, 30, 392, 734, 273, 356, 1892, 18, 588, 734, 1435, 225, 1207, 734, 273, 356, 1892, 18, 588, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 29795, 1952, 921, 1892, 12, 365, 16, 279, 3744, 16, 356, 1892, 16, 4794, 682, 262, 30, 392, 734, 273, 356, 1892, 18, 588, 734, 1435, 225, 1207, 734, 273, 356, 1892, 18, 588, 13...
print (Y1-Y2).max()
if verbose > 2: print (Y1-Y2).max()
def test_cdist_russellrao_random(self): "Tests cdist(X, 'russellrao') on random data." eps = 1e-07 # Get the data: the input matrix and the right output. X1 = eo['cdist-X1'] < 0.5 X2 = eo['cdist-X2'] < 0.5 Y1 = cdist(X1, X2, 'russellrao') Y2 = cdist(X1, X2, 'test_russellrao') print (Y1-Y2).max() self.failUnless(within_tol(Y1, Y2, eps))
379f39dc44f5ae0fd8f3f6a7e63e65fd4421b6f9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/379f39dc44f5ae0fd8f3f6a7e63e65fd4421b6f9/test_distance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4315, 376, 67, 86, 5567, 1165, 354, 83, 67, 9188, 12, 2890, 4672, 315, 14650, 276, 4413, 12, 60, 16, 296, 86, 5567, 1165, 354, 83, 6134, 603, 2744, 501, 1199, 7785, 273, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4315, 376, 67, 86, 5567, 1165, 354, 83, 67, 9188, 12, 2890, 4672, 315, 14650, 276, 4413, 12, 60, 16, 296, 86, 5567, 1165, 354, 83, 6134, 603, 2744, 501, 1199, 7785, 273, 40...
ntext.append((type,val))
tokens.append((type,val))
def show_token(tok): reprs = map(repr, tok) print ' ' + reprs[1] + ' ' + ' ' * (29-len(reprs[1])) + reprs[0], if debug_lexer: print ' ' + ' ' * (29-len(reprs[0])) + repr(states[i]), print
038509c11d029dd1bd0adef2c29f472cad5f0ea6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6148/038509c11d029dd1bd0adef2c29f472cad5f0ea6/find_error.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 2316, 12, 17692, 4672, 8480, 87, 273, 852, 12, 12715, 16, 946, 13, 1172, 296, 282, 296, 397, 8480, 87, 63, 21, 65, 397, 296, 296, 397, 296, 296, 380, 261, 5540, 17, 1897, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 2316, 12, 17692, 4672, 8480, 87, 273, 852, 12, 12715, 16, 946, 13, 1172, 296, 282, 296, 397, 8480, 87, 63, 21, 65, 397, 296, 296, 397, 296, 296, 380, 261, 5540, 17, 1897, ...
exts.append( Extension("_bytesio", ["_bytesio.c"]) ) exts.append( Extension("_stringio", ["_stringio.c"]) )
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
791dc2f32c3fb707319d0c8d93d6cde6175d1e01 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/791dc2f32c3fb707319d0c8d93d6cde6175d1e01/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
""" % videoDecoder)
""" % (options.location, videoDecoder))
def __init__(self, options, name="player"): Thread.__init__(self, name)
5659c22ac95e77f0c22088e8e083a148d754a0e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/5659c22ac95e77f0c22088e8e083a148d754a0e6/dvdplayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 508, 1546, 14872, 6, 4672, 4884, 16186, 2738, 972, 12, 2890, 16, 508, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 508, 1546, 14872, 6, 4672, 4884, 16186, 2738, 972, 12, 2890, 16, 508, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
matches = get_matches(context.get_iter(), self.ctx) snippets = [s for s in loaded_snippets[self.ctx].values() if s.snippet in matches]
match = get_match(context.get_iter(), self.ctx) snippets = [s for s in loaded_snippets[self.ctx].values() if s.snippet == match]
def do_populate(self, context): matches = get_matches(context.get_iter(), self.ctx)
26933a85771c8cceb710a2c2d0f15717e0bb54e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/26933a85771c8cceb710a2c2d0f15717e0bb54e1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 19936, 12, 2890, 16, 819, 4672, 1885, 273, 336, 67, 8436, 12, 2472, 18, 588, 67, 2165, 9334, 365, 18, 5900, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 19936, 12, 2890, 16, 819, 4672, 1885, 273, 336, 67, 8436, 12, 2472, 18, 588, 67, 2165, 9334, 365, 18, 5900, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
del self._data[element]
self.remove(element)
def discard(self, element): """Remove an element from a set if it is a member.
678be6ba4c07486886e895233f28092e42c89151 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/678be6ba4c07486886e895233f28092e42c89151/sets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10388, 12, 2890, 16, 930, 4672, 3536, 3288, 392, 930, 628, 279, 444, 309, 518, 353, 279, 3140, 18, 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, 10388, 12, 2890, 16, 930, 4672, 3536, 3288, 392, 930, 628, 279, 444, 309, 518, 353, 279, 3140, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.xml_file = None if parent and hasattr(self.parent, 'xml_file'):
if parent and hasattr(self.parent, 'xml_file') and not self.xml_file:
def __init__(self, filename, parent): Item.__init__(self, parent)
b81d5bd9212f849ca94464f24ce76d0ae68f2ec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/b81d5bd9212f849ca94464f24ce76d0ae68f2ec5/videoitem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 982, 4672, 4342, 16186, 2738, 972, 12, 2890, 16, 982, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 982, 4672, 4342, 16186, 2738, 972, 12, 2890, 16, 982, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print 'usage: %s inspector_html devtools_html css_and_js_files_list' % argv[0]
print('usage: %s ignored inspector_html devtools_html' ' css_and_js_files_list' % argv[0])
def main(argv): if len(argv) < 4: print 'usage: %s inspector_html devtools_html css_and_js_files_list' % argv[0] return 1 inspector_html_name = argv[1] devtools_html_name = argv[2] inspector_html = open(inspector_html_name, 'r') devtools_html = open(devtools_html_name, 'w') for line in inspector_html: if '</head>' in line: devtools_html.write('\n <!-- The following lines are added to include DevTools resources -->\n') for resource in argv[3:]: devtools_html.write(GenerateIncludeTag(resource)) devtools_html.write(' <!-- End of auto-added files list -->\n') devtools_html.write(line) devtools_html.close() inspector_html.close() # Touch output file directory to make sure that Xcode will copy # modified resource files. if sys.platform == 'darwin': output_dir_name = os.path.dirname(devtools_html_name) os.utime(output_dir_name, None)
44fd8e6abe01c557072f6c22476c4b32a782350c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/44fd8e6abe01c557072f6c22476c4b32a782350c/generate_devtools_html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 225, 309, 562, 12, 19485, 13, 411, 1059, 30, 1172, 2668, 9167, 30, 738, 87, 5455, 22700, 67, 2620, 4461, 6642, 67, 2620, 11, 296, 3747, 67, 464, 67, 2924, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 225, 309, 562, 12, 19485, 13, 411, 1059, 30, 1172, 2668, 9167, 30, 738, 87, 5455, 22700, 67, 2620, 4461, 6642, 67, 2620, 11, 296, 3747, 67, 464, 67, 2924, 67, ...
exc_type, exc_value, exc_trace = sys.exc_info()
def f(): try: for thunk, op in zip(thunks, order): thunk() except: try: trace = op.trace except AttributeError: trace = () exc_type, exc_value, exc_trace = sys.exc_info() class X:pass __x = X() __x.__thunk_trace__ = trace __x.__str__ = lambda: str(exc_value) + " (in op: " + str(op) + ")" raise exc_type, __x, exc_trace
688ad973e02ff775769afb07c4e798959c7723cb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12438/688ad973e02ff775769afb07c4e798959c7723cb/link.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 13332, 775, 30, 364, 286, 1683, 16, 1061, 316, 3144, 12, 451, 1683, 87, 16, 1353, 4672, 286, 1683, 1435, 1335, 30, 775, 30, 2606, 273, 1061, 18, 5129, 1335, 6394, 30, 2606, 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, 284, 13332, 775, 30, 364, 286, 1683, 16, 1061, 316, 3144, 12, 451, 1683, 87, 16, 1353, 4672, 286, 1683, 1435, 1335, 30, 775, 30, 2606, 273, 1061, 18, 5129, 1335, 6394, 30, 2606, 273, ...
return Dec_p1 return Dec_0
return _Dec_p1 return _Dec_0
def compare_total(self, other): """Compares self to other using the abstract representations.
7ea2d399fb15e34ed3695ca0160f84f982b9194c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/7ea2d399fb15e34ed3695ca0160f84f982b9194c/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 4963, 12, 2890, 16, 1308, 4672, 3536, 19199, 365, 358, 1308, 1450, 326, 8770, 27851, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 4963, 12, 2890, 16, 1308, 4672, 3536, 19199, 365, 358, 1308, 1450, 326, 8770, 27851, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.ambient=Thermometer('amb_F',0,0,os.path.join("images",'ambient_F.png'),self) self.kiln=Thermometer('kiln_F_H',675,0,os.path.join("images",'kiln_FH.png'),self)
self.ambient=Thermometer('amb_F',0,5,os.path.join("images",'ambient_F.png'),self) self.kiln=Thermometer('kiln_F_H',675,5,os.path.join("images",'kiln_FH.png'),self)
def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size = (800,425)) self.SetBackgroundColour('BLACK') self.Center() #Unique Sensor IDs self.id1 = '30ED284B1000008F' self.id2 = '3063294B100000BB' #Starting Temperatures for the gauges self.ambient_F = 70 self.kiln_F = 1000 #Initialize the plot data arrays self.kiln_temp = [] self.date = [] self.count = 0 self.x = [] #Setup the Plotting Figure and Canvas Load Blank Graph self.figure = Figure((8,4) , 75) pnl = wx.Panel(self, -1) self.canvas = FigureCanvasWx(pnl, -1, self.figure) #self.canvas = FigureCanvasWx(self, -1, self.figure) self.canvas.CenterOnParent() self.toolbar = Toolbar(self.canvas) self.toolbar.Realize() self.load_graph() #Instantiate the Two Thermometers One for the Kiln One for ambient self.ambient=Thermometer('amb_F',0,0,os.path.join("images",'ambient_F.png'),self) self.kiln=Thermometer('kiln_F_H',675,0,os.path.join("images",'kiln_FH.png'),self) #Startup the Event timer set it for 3 second roll over self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.onTick,self.timer) self.timer.Start(3000) #Bind the screen redraws to the PaintAll method in the Thermometer Class self.Bind(wx.EVT_PAINT, self.PaintAll) #Menu Items ################################################ menubar = wx.MenuBar() file = wx.Menu() edit = wx.Menu() help = wx.Menu() file.Append(100, '&Open', 'Open a new document') file.Append(101, '&Save', 'Save the document') file.AppendSeparator() file.Append(102, '&Quit', 'Quit') help.Append(103,'&About', 'About') menubar.Append(file, '&File') menubar.Append(help, '&Help') self.SetMenuBar(menubar) self.CreateStatusBar() #Menu Bindings Go here self.Bind(wx.EVT_MENU, self.openfile, id=100) self.Bind(wx.EVT_MENU, self.about_message, id=103) ###################################################
2a435186544ecbdffa555e4197d5db273ee1077e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12345/2a435186544ecbdffa555e4197d5db273ee1077e/wxthermo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 4672, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 16, 963, 273, 261, 17374, 16, 24, 2947, 3719, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 4672, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 16, 963, 273, 261, 17374, 16, 24, 2947, 3719, 365...
del not_found[i]
def __get_observables_array__(cls): """Returns a set of strings by expanding wilcards found in class field __observables__. Expansion works only with names not prefixed with __""" import fnmatch res_set = set()
58dc2fb516629b074638c0917bee1caa903c1c84 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4095/58dc2fb516629b074638c0917bee1caa903c1c84/metaclasses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 12199, 90, 1538, 67, 1126, 972, 12, 6429, 4672, 3536, 1356, 279, 444, 434, 2064, 635, 31283, 341, 330, 3327, 87, 1392, 316, 667, 652, 1001, 12199, 90, 1538, 25648, 7784, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 588, 67, 12199, 90, 1538, 67, 1126, 972, 12, 6429, 4672, 3536, 1356, 279, 444, 434, 2064, 635, 31283, 341, 330, 3327, 87, 1392, 316, 667, 652, 1001, 12199, 90, 1538, 25648, 7784, ...
numargs = f.__call__.func_code.co_argcount if hasattr(f.__call__,"im_self"): numargs -= 1
numargs = call_func_code.co_argcount if not _PY3K: if hasattr(f.__call__,"im_self"): numargs -= 1 else: if hasattr(f.__call__,"__self__"): numargs -= 1
def _normalizeParseActionArgs( f ): """Internal method used to decorate parse actions that take fewer than 3 arguments, so that all parse actions can be called as f(s,l,t).""" STAR_ARGS = 4
c6e5c5fcf7fe09d7390a6d3525397e48c03606ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3693/c6e5c5fcf7fe09d7390a6d3525397e48c03606ea/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12237, 3201, 1803, 2615, 12, 284, 262, 30, 3536, 3061, 707, 1399, 358, 15752, 1109, 4209, 716, 4862, 27886, 2353, 890, 1775, 16, 1427, 716, 777, 1109, 4209, 848, 506, 2566, 487, 284...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12237, 3201, 1803, 2615, 12, 284, 262, 30, 3536, 3061, 707, 1399, 358, 15752, 1109, 4209, 716, 4862, 27886, 2353, 890, 1775, 16, 1427, 716, 777, 1109, 4209, 848, 506, 2566, 487, 284...
item = package_relation() item.name = self.substitute(in_item.name, vars) if in_item.version is not None: item.version = self.substitute(in_item.version, vars) item.arches = in_item.arches groups.append(item)
groups.append(PackageRelationEntry(str(in_item)))
def process_relation(self, key, e, in_e, vars): in_dep = in_e[key] dep = package_relation_list() for in_groups in in_dep: groups = package_relation_group() for in_item in in_groups: item = package_relation() item.name = self.substitute(in_item.name, vars) if in_item.version is not None: item.version = self.substitute(in_item.version, vars) item.arches = in_item.arches groups.append(item) dep.append(groups) e[key] = dep
136c33d961d0ff02562a22ebb9d444eca0f3f543 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5794/136c33d961d0ff02562a22ebb9d444eca0f3f543/gencontrol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 5488, 12, 2890, 16, 498, 16, 425, 16, 316, 67, 73, 16, 4153, 4672, 316, 67, 15037, 273, 316, 67, 73, 63, 856, 65, 5993, 273, 2181, 67, 5488, 67, 1098, 1435, 364, 316, 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, 1207, 67, 5488, 12, 2890, 16, 498, 16, 425, 16, 316, 67, 73, 16, 4153, 4672, 316, 67, 15037, 273, 316, 67, 73, 63, 856, 65, 5993, 273, 2181, 67, 5488, 67, 1098, 1435, 364, 316, 67,...
else: tzinfo = dt.tzinfo if tzinfo.utcoffset(None) == datetime.timedelta(0): return dt.replace(tzinfo=pytz.UTC) tzu = tzinfo.fromutc(dt).tzinfo dt = dt.replace(tzinfo=tzu) return dt.astimezone(pytz.utc)
dt = tzinfo.localize(dt, is_dst=None) return dt.astimezone(pytz.utc)
... def tzinfo(request):
1f8af1f7df2d328dea6009f7160121c932f6fa6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9504/1f8af1f7df2d328dea6009f7160121c932f6fa6a/date.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 1652, 15732, 12, 2293, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 1652, 15732, 12, 2293, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
(4 + 4*5^2 + O(5^4) + (1 + O(5))*T + (4 + O(5))*T^2 + (1 + O(5))*T^3 + (2 + O(5))*T^4 + O(T^5), O(5^4) + O(5^1)*T + O(5^1)*T^2 + O(5^1)*T^3 + (1 + O(5))*T^4+ O(T^5))
(4 + 4*5^2 + O(5^4) + (1 + O(5))*T + (4 + O(5))*T^2 + (1 + O(5))*T^3 + (3 + O(5))*T^4 + O(T^5), O(5^4) + O(5^1)*T + O(5^1)*T^2 + O(5^1)*T^3 + (3 + O(5))*T^4 + O(T^5))
def Dp_valued_series(self, n=3, prec=5): r""" Returns a vector of two components which are p-adic power series. The answer v is such that $$(1-\varphi)^(-2)* L_p(E,T) = v[1] * \omega + v[2] * \varphi(\omega)$$ as an element of the Dieudonne module $D_p(E) = H^1_{dR}(E/\QQ_p)$ where $\omega$ is the invariant differential and $\varphi$ is the Frobenius on $D_p(E)$. According to the p-adic BSD this function has a zero of order rank(E(Q)) and it's leading term is \begin{verbatim} +- #Sha(E/Q) * Tamagawa product / Torsion^2 * padic height regulator with values in D_p(E). \end{verbatim} INPUT: n -- (default: 3) a positive integer prec -- (default: 5) a positive integer
f84dbff957b17eadccb4c294a5e1cde84af1cd4a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f84dbff957b17eadccb4c294a5e1cde84af1cd4a/padic_lseries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 84, 67, 4531, 329, 67, 10222, 12, 2890, 16, 290, 33, 23, 16, 13382, 33, 25, 4672, 436, 8395, 2860, 279, 3806, 434, 2795, 4085, 1492, 854, 293, 17, 20333, 7212, 4166, 18, 1021, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 84, 67, 4531, 329, 67, 10222, 12, 2890, 16, 290, 33, 23, 16, 13382, 33, 25, 4672, 436, 8395, 2860, 279, 3806, 434, 2795, 4085, 1492, 854, 293, 17, 20333, 7212, 4166, 18, 1021, 5...
if opt_verbose: sys.stderr.write(' %d items found\n' % num_found)
def get_snmp_explicit(hostname, ipaddress, community, mib, baseoid, suffixes): if opt_verbose: sys.stderr.write('Fetching misc values from OID %s%s%s%s from IP %s\n' % \ (tty_bold, tty_green, baseoid, tty_normal, ipaddress)) info = [] if is_bulkwalk_host(hostname): cmd = "snmpbulkwalk -v2c" else: cmd = "snmpwalk -v1" for suffix in suffixes: if mib: mibinfo = " -m %s" % mib else: mibinfo = "" command = cmd + "%s -OQ -Oe -c %s %s %s.%s 2>/dev/null" % \ (mibinfo, community, ipaddress, baseoid, suffix) if opt_debug: sys.stderr.write(' Running %s\n' % (command,)) num_found = 0 snmp_process = os.popen(command, "r") for line in snmp_process.readlines(): if not '=' in line: # TODO: join onto previous line continue item, value = line.split("=") value_text = strip_snmp_value(value) # try to remove text, only keep number value_num = value_text.split(" ")[0] value_num = value_num.lstrip("+") value_num = value_num.rstrip("%") item = strip_snmp_value(item.split(":")[-1]) if item.endswith(".0"): item = item[:-2] info.append( [ item, value_num, value_text ] ) num_found += 1 exitstatus = snmp_process.close() if exitstatus: if opt_verbose: sys.stderr.write(tty_red + tty_bold + "ERROR: " + tty_normal + "SNMP error\n") return None if opt_verbose: sys.stderr.write(' %d items found\n' % num_found) return info
f21cc05798a05cc1a501330a8838ca3bf380277e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/f21cc05798a05cc1a501330a8838ca3bf380277e/snmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26527, 67, 16511, 12, 10358, 16, 24964, 16, 19833, 16, 312, 495, 16, 1026, 839, 16, 18333, 4672, 309, 2153, 67, 11369, 30, 2589, 18, 11241, 18, 2626, 2668, 30806, 20448, 924, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26527, 67, 16511, 12, 10358, 16, 24964, 16, 19833, 16, 312, 495, 16, 1026, 839, 16, 18333, 4672, 309, 2153, 67, 11369, 30, 2589, 18, 11241, 18, 2626, 2668, 30806, 20448, 924, ...
self.networks = '/var/lib/wicd/configurations/'
self.varlib = '/var/lib/wicd/' self.networks = self.varlib + 'configurations/'
def initialize_options(self): self.lib = '/usr/lib/wicd/' self.share = '/usr/share/wicd/' self.etc = '/etc/wicd/' self.scripts = self.etc + "scripts/" self.icons = '/usr/share/icons/hicolor/' self.images = '/usr/share/pixmaps/wicd/' self.encryption = self.etc + 'encryption/templates/' self.bin = '/usr/bin/' self.sbin = '/usr/sbin/' self.backends = self.lib + 'backends' self.networks = '/var/lib/wicd/configurations/' self.log = '/var/log/wicd/' self.resume = '/etc/acpi/resume.d/' self.suspend = '/etc/acpi/suspend.d/' self.pmutils = '/usr/lib/pm-utils/sleep.d/' self.dbus = '/etc/dbus-1/system.d/' self.desktop = '/usr/share/applications/' self.translations = '/usr/share/locale/' self.autostart = '/etc/xdg/autostart/' self.docdir = '/usr/share/doc/wicd/' self.mandir = '/usr/share/man/' self.kdedir = '/usr/share/autostart/' self.no_install_init = False self.no_install_man = False self.no_install_kde = False self.no_install_acpi = False self.no_install_pmutils = False self.no_install_docs = False self.no_install_ncurses = False
45eae059e5c6f629850e11b45de4e8e16984d1b8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12280/45eae059e5c6f629850e11b45de4e8e16984d1b8/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 2116, 12, 2890, 4672, 365, 18, 2941, 273, 1173, 13640, 19, 2941, 19, 91, 335, 72, 2473, 365, 18, 14419, 273, 1173, 13640, 19, 14419, 19, 91, 335, 72, 2473, 365, 18, 14175, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 2116, 12, 2890, 4672, 365, 18, 2941, 273, 1173, 13640, 19, 2941, 19, 91, 335, 72, 2473, 365, 18, 14419, 273, 1173, 13640, 19, 14419, 19, 91, 335, 72, 2473, 365, 18, 14175, ...
def extended_linecache_checkcache(orig_checkcache=linecache.checkcache):
def extended_linecache_checkcache(filename=None, orig_checkcache=linecache.checkcache):
def extended_linecache_checkcache(orig_checkcache=linecache.checkcache): """Extend linecache.checkcache to preserve the <pyshell#...> entries Rather than repeating the linecache code, patch it to save the pyshell# entries, call the original linecache.checkcache(), and then restore the saved entries. Assigning the orig_checkcache keyword arg freezes its value at definition time to the (original) method linecache.checkcache(), i.e. makes orig_checkcache lexical. """ cache = linecache.cache save = {} for filename in cache.keys(): if filename[:1] + filename[-1:] == '<>': save[filename] = cache[filename] orig_checkcache() cache.update(save)
85c95aa365a7cfaa7c40185445fe0648906f12e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/85c95aa365a7cfaa7c40185445fe0648906f12e4/PyShell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7021, 67, 7511, 557, 807, 67, 1893, 2493, 12, 3459, 33, 7036, 16, 1647, 67, 1893, 2493, 33, 7511, 557, 807, 18, 1893, 2493, 4672, 3536, 16675, 4739, 557, 807, 18, 1893, 2493, 358, 9420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7021, 67, 7511, 557, 807, 67, 1893, 2493, 12, 3459, 33, 7036, 16, 1647, 67, 1893, 2493, 33, 7511, 557, 807, 18, 1893, 2493, 4672, 3536, 16675, 4739, 557, 807, 18, 1893, 2493, 358, 9420...
op, src_mode, dst_mode, op_alpha, src_alpha, dst_alpha, &result); _AL_INLINE_PUT_PIXEL(dst_format, dst_data, result, true);
&result); _AL_INLINE_PUT_PIXEL(
def make_drawer(name): texture = (name.find("_texture_") != -1) grad = (name.find("_grad_") != -1) solid = (name.find("_solid_") != -1) shade = (name.find("_shade") != -1) opaque = (name.find("_opaque") != -1) white = (name.find("_white") != -1) if grad and solid: print "#error grad and solid" if grad and white: print "#error grad and white" if shade and opaque: print "#error shade and opaque" print "static void", name, "(uintptr_t state, int x1, int y, int x2) {" if not texture: if grad: print """\ state_grad_any_2d *gs = (state_grad_any_2d *)state; state_solid_any_2d *s = &gs->solid; ALLEGRO_COLOR cur_color = s->cur_color; """ else: print """\ state_solid_any_2d *s = (state_solid_any_2d *)state; ALLEGRO_COLOR cur_color = s->cur_color; """ else: if grad: print """\ state_texture_grad_any_2d *gs = (state_texture_grad_any_2d *)state; state_texture_solid_any_2d *s = &gs->solid; ALLEGRO_COLOR cur_color = s->cur_color; """ else: print """\ state_texture_solid_any_2d *s = (state_texture_solid_any_2d *)state; """ print """\ float u = s->u; float v = s->v; """ # XXX keep target in the state # XXX still don't understand why y-1 is required print """\ ALLEGRO_BITMAP *target = al_get_target_bitmap(); x1 -= target->lock_x; x2 -= target->lock_x; y -= target->lock_y; y--; if (y < 0 || y >= target->lock_h) { return; } if (x1 < 0) { """ if texture: print """\ u += s->du_dx * -x1; v += s->dv_dx * -x1; """ if grad: print """\ cur_color.r += gs->color_dx.r * -x1; cur_color.g += gs->color_dx.g * -x1; cur_color.b += gs->color_dx.b * -x1; cur_color.a += gs->color_dx.a * -x1; """ print """\ x1 = 0; } if (x2 > target->lock_w - 1) { x2 = target->lock_w - 1; } """ print "{" if shade: print """\ int op, src_mode, dst_mode; int op_alpha, src_alpha, dst_alpha; al_get_separate_blender(&op, &src_mode, &dst_mode, &op_alpha, &src_alpha, &dst_alpha); """ print "{" if texture: print """\ const int src_format = s->texture->locked_region.format; const int src_size = al_get_pixel_size(src_format); ALLEGRO_COLOR src_color = {0, 0, 0, 0}; /* Ensure u in [0, s->w) and v in [0, s->h). */ while (u < 0) u += s->w; while (v < 0) v += s->h; u = fmodf(u, s->w); v = fmodf(v, s->h); ASSERT(0 <= u); ASSERT(u < s->w); ASSERT(0 <= v); ASSERT(v < s->h); """ print """\ const int dst_format = target->locked_region.format; uint8_t *dst_data = (uint8_t *)target->locked_region.data + y * target->locked_region.pitch + x1 * al_get_pixel_size(dst_format); """ print """\ for (; x1 <= x2; x1++) { """ if not texture: print """\ ALLEGRO_COLOR src_color = cur_color; """ else: print """\ const int src_x = _al_fast_float_to_int(u); const int src_y = _al_fast_float_to_int(v); uint8_t *src_data = (uint8_t *)s->texture->locked_region.data + (src_y - s->texture->lock_y) * s->texture->locked_region.pitch + (src_x - s->texture->lock_x) * src_size; _AL_INLINE_GET_PIXEL(src_format, src_data, src_color, false); """ if grad: print """\ SHADE_COLORS(src_color, cur_color); """ elif not white: print """\ SHADE_COLORS(src_color, s->cur_color); """ if shade: print """\ { ALLEGRO_COLOR dst_color; ALLEGRO_COLOR result; _AL_INLINE_GET_PIXEL(dst_format, dst_data, dst_color, false); _al_blend_inline(&src_color, &dst_color, op, src_mode, dst_mode, op_alpha, src_alpha, dst_alpha, &result); _AL_INLINE_PUT_PIXEL(dst_format, dst_data, result, true); } """ else: print """\ _AL_INLINE_PUT_PIXEL(dst_format, dst_data, src_color, true); """ if texture: print """\ u += s->du_dx; v += s->dv_dx; if (u < 0) u += s->w; else if (u >= s->w) u -= s->w; if (v < 0) v += s->h; else if (v >= s->h) v -= s->h; """ if grad: print """\ cur_color.r += gs->color_dx.r; cur_color.g += gs->color_dx.g; cur_color.b += gs->color_dx.b; cur_color.a += gs->color_dx.a; """ print """\ } } } } """
45b2735ddbc24779c2277b5afafaede5a9314d1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14418/45b2735ddbc24779c2277b5afafaede5a9314d1b/make_scanline_drawers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 9446, 264, 12, 529, 4672, 11428, 273, 261, 529, 18, 4720, 2932, 67, 955, 594, 67, 7923, 480, 300, 21, 13, 6058, 273, 261, 529, 18, 4720, 2932, 67, 9974, 67, 7923, 480, 300,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 9446, 264, 12, 529, 4672, 11428, 273, 261, 529, 18, 4720, 2932, 67, 955, 594, 67, 7923, 480, 300, 21, 13, 6058, 273, 261, 529, 18, 4720, 2932, 67, 9974, 67, 7923, 480, 300,...
if t == Decimal: v = str(v) v = v.strip()
def validate(user_input, valid): d = dict(zip(valid.keys(), (None,))) for k, v in user_input.items(): if k in valid.keys(): # redundant t = valid[k] if t == bool: if v in ('false', 'False', 'FALSE', 'f', 'F', 0, 'off', 'no', 'OFF', 'No', 'n', 'N'): v = False if t == Decimal: v = str(v) v = v.strip() if t == 'chart_type': # if string then switch to int if v in CHART_TYPE_ENUM: v = CHART_TYPE_ENUM.index(v) elif (int(v) < len(CHART_TYPE_ENUM)) and (int(v) >= 0): v = int(v) else: raise ValueError("invalid type for chart_type") elif t == 'status': # if string then switch to int if v in TRANSACTION_STATUS_ENUM: v = TRANSACTION_STATUS_ENUM.index(v) elif (int(v) < len(TRANSACTION_STATUS_ENUM)) and (int(v) >= 0): v = int(v) else: raise ValueError("invalid type for status") else: v = t(v) if t == str: v = v.strip() v = v[:255] v = v.lower() if t == Decimal: v = str(v) v = v.strip() d[k] = v else: raise ValueError("keys are not valid. expected: %s but got %s" % (valid.keys(), user_input.keys())) return d
c1b405e7b76ee374ecb1e3fca3072ef6e0007414 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14271/c1b405e7b76ee374ecb1e3fca3072ef6e0007414/view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 1355, 67, 2630, 16, 923, 4672, 302, 273, 2065, 12, 4450, 12, 877, 18, 2452, 9334, 261, 7036, 16, 20349, 364, 417, 16, 331, 316, 729, 67, 2630, 18, 3319, 13332, 309, 417, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 1355, 67, 2630, 16, 923, 4672, 302, 273, 2065, 12, 4450, 12, 877, 18, 2452, 9334, 261, 7036, 16, 20349, 364, 417, 16, 331, 316, 729, 67, 2630, 18, 3319, 13332, 309, 417, 31...
self.becomes = "single"
def __init__(self, orig_v): if isinstance(orig_v, Variable): self.copy_v = Variable(orig_v) self.copy_v.concretetype = orig_v.concretetype elif isinstance(orig_v, Constant): # we can share the Constant() self.copy_v = orig_v self.origin = [] self.becomes = "single" elif isinstance(orig_v, lltype.LowLevelType): # hackish interface :-( we accept a type too self.copy_v = newvar(orig_v) else: raise TypeError(repr(orig_v))
9ff1bb8b5ef2e3bd2c28b6210ffb0f9937ee702f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/9ff1bb8b5ef2e3bd2c28b6210ffb0f9937ee702f/llabstractinterp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1647, 67, 90, 4672, 309, 1549, 12, 4949, 67, 90, 16, 7110, 4672, 365, 18, 3530, 67, 90, 273, 7110, 12, 4949, 67, 90, 13, 365, 18, 3530, 67, 90, 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, 2738, 972, 12, 2890, 16, 1647, 67, 90, 4672, 309, 1549, 12, 4949, 67, 90, 16, 7110, 4672, 365, 18, 3530, 67, 90, 273, 7110, 12, 4949, 67, 90, 13, 365, 18, 3530, 67, 90, 18, ...
@param ops: The list of OpCodes that will becom the new job.
@param ops: The list of OpCodes that will become the new job.
def AddJob(self, ops, nodes): """Create and store on disk a new job.
205d71fdeea18dc1ee3c02e34f4989a2ec6f41cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/205d71fdeea18dc1ee3c02e34f4989a2ec6f41cf/jqueue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 2278, 12, 2890, 16, 6727, 16, 2199, 4672, 3536, 1684, 471, 1707, 603, 4234, 279, 394, 1719, 18, 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, 1436, 2278, 12, 2890, 16, 6727, 16, 2199, 4672, 3536, 1684, 471, 1707, 603, 4234, 279, 394, 1719, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
fext = self._getExtension(fname)
fext = self._getExtension(fileName)
def load(self, fname): ''' Load data from a csv or a pickle file of the DataStore class. The encoding is determined by the filename's extension: 'csv' : When the filename ends in '.csv' the routine tries to interpret the file as comma seperated values. The variable names must be in the first row Any other extension is considered to mean a file in Python's pickle format. Arguments: fname : filename; string Returns: None ''' # setting the ascii/csv file name used for input #self.DBname = os.getcwd() + '/' + fname
45268ff49ddb4f963530947d7202a5e0642e2fda /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2720/45268ff49ddb4f963530947d7202a5e0642e2fda/storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 5299, 4672, 9163, 4444, 501, 628, 279, 6101, 578, 279, 13379, 585, 434, 326, 22961, 667, 18, 225, 1021, 2688, 353, 11383, 635, 326, 1544, 1807, 2710, 30, 296, 6715, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 5299, 4672, 9163, 4444, 501, 628, 279, 6101, 578, 279, 13379, 585, 434, 326, 22961, 667, 18, 225, 1021, 2688, 353, 11383, 635, 326, 1544, 1807, 2710, 30, 296, 6715, ...
print >> sys.stderr, ''' synopsis: ganga_setup.py --version=VERSION --interactive --experiment=EXP cmd cmd: csh, sh : print shell setup commands (to be used with eval or source), --experiment=EXP specifies how the setup is done (atlas, lhcb, generic) dir : print the release directory only version : print the latest production release in the installation tree (default choice at interactive prompt) if VERSION is not specified or is specified as "last","latest" or "default" then the latest production version is assumed --interactive : enters the interactive mode to confirm the version --show-all : in interactive mode show all versions including development releases (-alpha, -beta or -pre) ''' if error: print print 'ERROR:',error sys.exit(2)
print >> sys.stderr, ''' synopsis: ganga_setup.py --version=VERSION --interactive --experiment=EXP cmd cmd: csh, sh : print shell setup commands (to be used with eval or source), --experiment=EXP specifies how the setup is done (atlas, lhcb, generic) dir : print the release directory only version : print the latest production release in the installation tree (default choice at interactive prompt) if VERSION is not specified or is specified as "last","latest" or "default" then the latest production version is assumed --interactive : enters the interactive mode to confirm the version --show-all : in interactive mode show all versions including development releases (-alpha, -beta or -pre) ''' if error: print print 'ERROR:',error sys.exit(2)
def usage(error=None): print >> sys.stderr, ''' synopsis: ganga_setup.py --version=VERSION --interactive --experiment=EXP cmd cmd: csh, sh : print shell setup commands (to be used with eval or source), --experiment=EXP specifies how the setup is done (atlas, lhcb, generic) dir : print the release directory only version : print the latest production release in the installation tree (default choice at interactive prompt) if VERSION is not specified or is specified as "last","latest" or "default" then the latest production version is assumed --interactive : enters the interactive mode to confirm the version --show-all : in interactive mode show all versions including development releases (-alpha, -beta or -pre) ''' if error: print print 'ERROR:',error sys.exit(2)
2379c2f53950ecf327966e75adef9bde63f974f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/2379c2f53950ecf327966e75adef9bde63f974f9/ganga_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 1636, 33, 7036, 4672, 1172, 1671, 2589, 18, 11241, 16, 9163, 6194, 29522, 30, 314, 539, 69, 67, 8401, 18, 2074, 1493, 1589, 33, 5757, 1493, 24761, 1493, 18142, 33, 16109, 1797,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 1636, 33, 7036, 4672, 1172, 1671, 2589, 18, 11241, 16, 9163, 6194, 29522, 30, 314, 539, 69, 67, 8401, 18, 2074, 1493, 1589, 33, 5757, 1493, 24761, 1493, 18142, 33, 16109, 1797,...
req.hdf['query.groupdesc'] = 1
req.hdf['query.groupdesc'] = True
def display_html(self, req, query): req.hdf['title'] = 'Custom Query' add_stylesheet(req, 'common/css/report.css')
2263ea8c93b55f55a518f2d4a5c890dd01b309f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2263ea8c93b55f55a518f2d4a5c890dd01b309f4/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 2620, 12, 2890, 16, 1111, 16, 843, 4672, 1111, 18, 26428, 3292, 2649, 3546, 273, 296, 3802, 2770, 11, 527, 67, 19403, 12, 3658, 16, 296, 6054, 19, 5212, 19, 6006, 18, 5212, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 2620, 12, 2890, 16, 1111, 16, 843, 4672, 1111, 18, 26428, 3292, 2649, 3546, 273, 296, 3802, 2770, 11, 527, 67, 19403, 12, 3658, 16, 296, 6054, 19, 5212, 19, 6006, 18, 5212, ...
self.vars = ('system', 'user', 'total')
self.vars = ('user', 'system', 'total')
def __init__(self): self.name = 'dstat cputime' self.vars = ('system', 'user', 'total') self.type = 'd' self.width = 4 self.scale = 100
ad557b2966d22156cf38510eb6775c5733ed11c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1442/ad557b2966d22156cf38510eb6775c5733ed11c4/dstat_dstat_cpu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 529, 273, 296, 72, 5642, 276, 458, 494, 11, 365, 18, 4699, 273, 7707, 1355, 2187, 296, 4299, 2187, 296, 4963, 6134, 365, 18, 723, 273, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 529, 273, 296, 72, 5642, 276, 458, 494, 11, 365, 18, 4699, 273, 7707, 1355, 2187, 296, 4299, 2187, 296, 4963, 6134, 365, 18, 723, 273, 296, ...
linecache.checkcache(source_name) source = open(source_name)
linecache.checkcache(source_name) with open(source_name) as source:
def test_checkcache(self): getline = linecache.getline try: # Create a source file and cache its contents source_name = support.TESTFN + '.py' with open(source_name, 'w') as source: source.write(SOURCE_1) source.close() getline(source_name, 1)
c2037ed2b9ceebb973d58f88cf4fec8c6435df25 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/c2037ed2b9ceebb973d58f88cf4fec8c6435df25/test_linecache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1893, 2493, 12, 2890, 4672, 336, 1369, 273, 4739, 557, 807, 18, 588, 1369, 775, 30, 468, 1788, 279, 1084, 585, 471, 1247, 2097, 2939, 1084, 67, 529, 273, 2865, 18, 16961, 197...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 2493, 12, 2890, 4672, 336, 1369, 273, 4739, 557, 807, 18, 588, 1369, 775, 30, 468, 1788, 279, 1084, 585, 471, 1247, 2097, 2939, 1084, 67, 529, 273, 2865, 18, 16961, 197...
if not min_date: if min_date_qty < min_quantity: return ( datetime.date.today(), min_date_qty) else: return (None, None) if not max_date: max_date = min_date
def get_shortage(self, cursor, user, location_id, product_id, min_date, max_date, min_date_qty, order_point=None,context=None): """ Compute stock quantities between the two given dates. If given the order point, one date will be lacking in products this date is returned alongside the stock level at this date.
8c8517580636d558b218fc076f207f9adef721f4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9299/8c8517580636d558b218fc076f207f9adef721f4/purchase_request.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6620, 410, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 350, 16, 3017, 67, 350, 16, 1131, 67, 712, 16, 943, 67, 712, 16, 1131, 67, 712, 67, 85, 4098, 16, 1353, 67, 1153, 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, 336, 67, 6620, 410, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 350, 16, 3017, 67, 350, 16, 1131, 67, 712, 16, 943, 67, 712, 16, 1131, 67, 712, 67, 85, 4098, 16, 1353, 67, 1153, 3...
self.settings["CFLAGS"]="-Os -march=armv4t -pipe" class arch_armv5l(generic_arm): "Builder class for armv5l target" def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv5l-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv5 -pipe"
self.settings["CFLAGS"]+=" -march=armv4t"
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv4tl-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv4t -pipe"
423613d4d63f3a603ff416edd814c78b4f729c55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7327/423613d4d63f3a603ff416edd814c78b4f729c55/arm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 81, 1900, 705, 4672, 5210, 67, 4610, 16186, 2738, 972, 12, 2890, 16, 81, 1900, 705, 13, 365, 18, 4272, 9614, 1792, 4005, 11929, 1546, 4610, 90, 24, 6172,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 81, 1900, 705, 4672, 5210, 67, 4610, 16186, 2738, 972, 12, 2890, 16, 81, 1900, 705, 13, 365, 18, 4272, 9614, 1792, 4005, 11929, 1546, 4610, 90, 24, 6172,...
return tuple(self.categories)
return self.categories[:]
def get_categories(self): # Make sure the original list can't be modified return tuple(self.categories)
d15af4b3af87cf3e272c4423ecf4fd79a9bc9573 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/d15af4b3af87cf3e272c4423ecf4fd79a9bc9573/file.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8995, 12, 2890, 4672, 468, 4344, 3071, 326, 2282, 666, 848, 1404, 506, 4358, 327, 3193, 12, 2890, 18, 8995, 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, 336, 67, 8995, 12, 2890, 4672, 468, 4344, 3071, 326, 2282, 666, 848, 1404, 506, 4358, 327, 3193, 12, 2890, 18, 8995, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
propertylist : property propertylist
propertylist : propertylist property
def p_propertylist(t): ''' propertylist : property propertylist | property | empty ''' t[0] = createList( 'propertylist', t )
1a8e540808c326b13fcc3d7ecf1906c80d3bce53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/1a8e540808c326b13fcc3d7ecf1906c80d3bce53/emparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 4468, 1098, 12, 88, 4672, 9163, 1272, 1098, 294, 1272, 1098, 1272, 571, 1272, 571, 1008, 9163, 268, 63, 20, 65, 273, 752, 682, 12, 296, 4468, 1098, 2187, 268, 262, 225, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 4468, 1098, 12, 88, 4672, 9163, 1272, 1098, 294, 1272, 1098, 1272, 571, 1272, 571, 1008, 9163, 268, 63, 20, 65, 273, 752, 682, 12, 296, 4468, 1098, 2187, 268, 262, 225, 2, -...
raise ValueError, "file is closed"
raise ValueError("file is closed")
def _readsparse(self, size=None): """Read operation for sparse files. """ if self.closed: raise ValueError, "file is closed"
e4751e3cdc8c271f24e46a6155f255b6e33da158 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e4751e3cdc8c271f24e46a6155f255b6e33da158/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11904, 2670, 12, 2890, 16, 963, 33, 7036, 4672, 3536, 1994, 1674, 364, 9387, 1390, 18, 3536, 309, 365, 18, 12204, 30, 1002, 2068, 16, 315, 768, 353, 4375, 6, 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, 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, 11904, 2670, 12, 2890, 16, 963, 33, 7036, 4672, 3536, 1994, 1674, 364, 9387, 1390, 18, 3536, 309, 365, 18, 12204, 30, 1002, 2068, 16, 315, 768, 353, 4375, 6, 2, -100, -100, -100, ...
step_id = db.get_last_id(cursor, 'bitten_step')
def insert(self, db=None): """Insert a new build step into the database.""" if not db: db = self.env.get_db_cnx() handle_ta = True else: handle_ta = False
fdc36724ca9d84c792dd8c8d6696980098b3daae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4547/fdc36724ca9d84c792dd8c8d6696980098b3daae/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 12, 2890, 16, 1319, 33, 7036, 4672, 3536, 4600, 279, 394, 1361, 2235, 1368, 326, 2063, 12123, 309, 486, 1319, 30, 1319, 273, 365, 18, 3074, 18, 588, 67, 1966, 67, 10305, 92, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 12, 2890, 16, 1319, 33, 7036, 4672, 3536, 4600, 279, 394, 1361, 2235, 1368, 326, 2063, 12123, 309, 486, 1319, 30, 1319, 273, 365, 18, 3074, 18, 588, 67, 1966, 67, 10305, 92, 1435...
print "flatformats-->", flatFormats
def array(buffer=None, formats=None, shape=0, names=None, byteorder=sys.byteorder, aligned=0, descr=None): """ Create a new instance of a `NestedRecArray`. This function can be used to build a new array of nested records. The new array is returned as a result. The function works much like ``numarray.records.array()``, with some differences: 1. In addition to flat buffers and regular sequences of non-nested elements, the `buffer` argument can take regular sequences where each element has a structure nested to an arbitrary depth. Of course, all elements in a non-flat buffer must have the same format. 2. The `formats` argument only supports sequences of strings and other sequences. Each string defines the shape and type of a non-nested field. Each sequence contains the formats of the sub-fields of a nested field. The structure of this argument must match that of the elements in `buffer`. This argument may have a recursive structure. 3. The `names` argument only supports lists of strings and 2-tuples. Each string defines the name of a non-nested field. Each 2-tuple contains the name of a nested field and a list describing the names of its sub-fields. The structure of this argument must match that of the elements in `buffer`. This argument may have a recursive structure. The `descr` argument is a new-style description of the structure of the `buffer`. It is intended to replace the `formats` and `names` arguments, so they can not be used at the same time [#descr]_. The `descr` argument is a list of 2-tuples, each of them describing a field. The first value in a tuple is the *name* of the field, while the second one is a description of its *structure*. If the second value is a string, it defines the format (shape and type) of a non-nested field. Else, it is a list of 2-tuples describing the sub-fields of a nested field. If `descr` is ``None`` (or omitted), the whole structure of the array is tried to be inferred from that of the `buffer`, and automatic names (``c1``, ``c2`` etc. on each nested field) are assigned to all fields. The `descr` argument may have a recursive structure. Please note that names used in `names` or `descr` should *not* contain the string ``'/'``, since it is used as the field/sub-field separator by `NestedRecArray.asRecArray()`. If the separator is found in a name, a ``ValueError`` is raised. .. [#descr] The syntax of `descr` is based on that of the ``__array_descr__`` attribute in the proposed standard `N-dimensional array interface`__. __ http://numeric.scipy.org/array_interface.html When to use `descr` or `formats` ================================ Since `descr` requires both the name and structure of fields to always be specified, the `formats` argument comes more handy when one does not want to explicitly specify names. However it is not allowed to use the `names` argument without the `formats` one. This is due to the fact that automatic inferrence of the `buffer` structure is not implemented. When fully specifying names and structure, the `descr` argument is preferred over `formats` and `names` for the sake of code legibility and conciseness. Examples ======== The following examples will help to clarify the words above. In them, an array of two elements is created. Each element has three fields: a 64-bit integer (``id``), a bi-dimensional 32-bit floating point (``pos``) and a nested field (``info``); the nested field has two sub-fields: a two-character string (``name``) and a 64-bit complex (``value``). Example 1 --------- In this example the array is created by specifying both its contents and its structure, so the structure of the used arguments must be coherent. This is how the array would be created in the old-style way, i.e. using the `formats` and `names` arguments: >>> nra = array( ... [(1, (0.5, 1.0), ('a1', 1j)), (2, (0, 0), ('a2', 1+.1j))], ... names=['id', 'pos', ('info', ['name', 'value'])], ... formats=['Int64', '(2,)Float32', ['a2', 'Complex64']]) And this is how the array would be created in the new-style way, i.e. using the `descr` argument: >>> nra = array( ... [(1, (0.5, 1.0), ('a1', 1j)), (2, (0, 0), ('a2', 1+.1j))], ... descr=[('id', 'Int64'), ('pos', '(2,)Float32'), ... ('info', [('name', 'a2'), ('value', 'Complex64')])]) Note how `formats` and `descr` mimic the structure of each element in `buffer`. Example 2 --------- Now the array is created from a flat string representing the data in memory. Names will be automatically assigned. For that to work, the resulting array shape and record format must be fully specified. >>> datastring = binary_representation_of_data >>> nra = array( ... datastring, shape=2, ... formats=['Int64', '(2,)Float32', ['a2', 'Complex64']]) Byte ordering and alignment is assumed to be that of the host machine, since it has not been explicitly stated via the `byteorder` and `aligned` arguments. """ # Check if buffer structure is specified using descr OR formats (and, # optionally, names) _onlyOneSyntax(descr, formats, names) # Create or check the descr format if descr is None: if formats is not None: descr = makeDescr(formats, names) # `buffer` can still be some object which describes its own structure, # so `descr`/`formats` are not yet required. else: _checkDescr(descr) _checkFieldsInDescr(descr) # After this, if it exists a formats, it will always exists a descr # This is to keep compatibility with numarray.records.array function if isinstance(formats, str): formats = formats.split(',') if isinstance(names, str): names = names.split(',') # First, check for easily convertible objects (NRA, NA and NumPy # objects) # F. Altet 2006-01-20 if isinstance(buffer, NestedRecArray): buffer = buffer.copy() # Always return a copy of the data # Return as soon as possible is not descr, formats or names specified if (descr is None and formats is None and names is None): return buffer # Check that descriptions are consistent if descr is not None: fmts = [item for item in nriterators.flattenFormats(makeFormats(descr))] # Check just the formats, not the names if _matchFormats(fmts, buffer._formats): raise ValueError, \
4797a53f17c7540c955c03fe2a72ef2783e207eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12687/4797a53f17c7540c955c03fe2a72ef2783e207eb/nestedrecords.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 526, 12, 4106, 33, 7036, 16, 6449, 33, 7036, 16, 2179, 33, 20, 16, 1257, 33, 7036, 16, 1160, 1019, 33, 9499, 18, 7229, 1019, 16, 13939, 33, 20, 16, 18426, 33, 7036, 4672, 3536, 1788,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 526, 12, 4106, 33, 7036, 16, 6449, 33, 7036, 16, 2179, 33, 20, 16, 1257, 33, 7036, 16, 1160, 1019, 33, 9499, 18, 7229, 1019, 16, 13939, 33, 20, 16, 18426, 33, 7036, 4672, 3536, 1788,...
big=[] for f in fields: if not tkt.has_key(f): continue
big = [] for i, f in enum([f['name'] for f in fields]): if not tkt.values.has_key(f): continue
def format_props(self): tkt = self.ticket tkt['id'] = '%s' % tkt['id'] t = self.modtime or tkt['time'] tkt['modified'] = time.strftime('%c', time.localtime(t)) fields = ['id', 'status', 'component', 'modified', 'severity', 'milestone', 'priority', 'version', 'owner', 'reporter'] fields.extend(filter(lambda f: f.startswith('custom_'), self.ticket.keys())) i = 1 width = [0,0,0,0] for f in fields: if not tkt.has_key(f): continue fval = str(tkt[f]) if fval.find('\n') > -1: continue fname = f.startswith('custom_') and f[7:] or f idx = 2*(i % 2) if len(fname) > width[idx]: width[idx] = len(fname) if len(fval) > width[idx+1]: width[idx+1] = len(fval) i += 1 format = (' %%%is: %%-%is%s' % (width[0], width[1], CRLF), '%%%is: %%-%is | ' % (width[2], width[3])) i = 1 l = (width[2] + width[3] + 5) sep = l*'-' + '+' + (self.COLS-l)*'-' txt = sep + CRLF big=[] for f in fields: if not tkt.has_key(f): continue fval = tkt[f] fname = f.startswith('custom_') and f[7:] or f if '\n' in str(fval): big.append((fname.capitalize(), fval)) else: txt += format[i%2] % (fname.capitalize(), fval) i += 1 if i % 2 == 0: txt += '\n' if big: txt += sep for k,v in big: txt += '\n%s:\n%s\n\n' % (k,v) txt += sep return txt
e955cc298b14d4c8585186dd50d2db31c6327444 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/e955cc298b14d4c8585186dd50d2db31c6327444/Notify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 9693, 12, 2890, 4672, 268, 8629, 273, 365, 18, 16282, 268, 8629, 3292, 350, 3546, 273, 1995, 87, 11, 738, 268, 8629, 3292, 350, 3546, 268, 273, 365, 18, 1711, 957, 578, 268, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 9693, 12, 2890, 4672, 268, 8629, 273, 365, 18, 16282, 268, 8629, 3292, 350, 3546, 273, 1995, 87, 11, 738, 268, 8629, 3292, 350, 3546, 268, 273, 365, 18, 1711, 957, 578, 268, ...
for base in (_HKEY_CLASSES_ROOT, _HKEY_LOCAL_MACHINE, _HKEY_CURRENT_USER, _HKEY_USERS):
for base in (HKEY_CLASSES_ROOT, HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER, HKEY_USERS):
def get_devstudio_versions (): """Get list of devstudio versions from the Windows registry. Return a list of strings containing version numbers; the list will be empty if we were unable to access the registry (eg. couldn't import a registry-access module) or the appropriate registry keys weren't found.""" if not _can_read_reg: return [] K = 'Software\\Microsoft\\Devstudio' L = [] for base in (_HKEY_CLASSES_ROOT, _HKEY_LOCAL_MACHINE, _HKEY_CURRENT_USER, _HKEY_USERS): try: k = _RegOpenKeyEx(base,K) i = 0 while 1: try: p = _RegEnumKey(k,i) if p[0] in '123456789' and p not in L: L.append(p) except _RegError: break i = i + 1 except _RegError: pass L.sort() L.reverse() return L
f524abb944b7edf65acd200dfe2f4076696b42e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f524abb944b7edf65acd200dfe2f4076696b42e3/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5206, 334, 4484, 67, 10169, 1832, 30, 3536, 967, 666, 434, 4461, 334, 4484, 5244, 628, 326, 8202, 4023, 18, 225, 2000, 279, 666, 434, 2064, 4191, 1177, 5600, 31, 326, 666, 903...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5206, 334, 4484, 67, 10169, 1832, 30, 3536, 967, 666, 434, 4461, 334, 4484, 5244, 628, 326, 8202, 4023, 18, 225, 2000, 279, 666, 434, 2064, 4191, 1177, 5600, 31, 326, 666, 903...
temp_db = 'glitch-temp.db'
temp_db = 'glitch-temp.db'
def setup_files(dir_name, gps_start_time, gps_end_time): # extract directory from URL glob_pattern = dir_name + '/*.xml' # Filter out the ones that are outside our time range xml_files = filter(lambda x: file_filter(x, gps_start_time, gps_end_time), glob.glob(glob_pattern)) # TODO: This should have a better name that includes the # start and end times temp_db = 'glitch-temp.db' target = dbtables.get_connection_filename(temp_db, None, True, False) connection = ligolw_sqlite.setup(target) ligolw_sqlite.insert(connection, xml_files) # [temp_xml]) return connection
74cfcafb9b989d9984116365ea47245045a00514 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/74cfcafb9b989d9984116365ea47245045a00514/ligolw_glitch_page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 2354, 12, 1214, 67, 529, 16, 20985, 67, 1937, 67, 957, 16, 20985, 67, 409, 67, 957, 4672, 468, 2608, 1867, 628, 1976, 4715, 67, 4951, 273, 1577, 67, 529, 397, 1173, 11146, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 2354, 12, 1214, 67, 529, 16, 20985, 67, 1937, 67, 957, 16, 20985, 67, 409, 67, 957, 4672, 468, 2608, 1867, 628, 1976, 4715, 67, 4951, 273, 1577, 67, 529, 397, 1173, 11146, ...
col1 = DateCol() col2 = DateTimeCol()
col1 = DateTimeCol() col2 = DateCol(dateFormat="%Y-%m-%d %H:%M:%S")
def test_dateTime(): setupClass(DateTime1) _now = now() dt1 = DateTime1(col1=_now, col2=_now) assert isinstance(dt1.col1, date) assert isinstance(dt1.col2, datetime)
a101f7ad5936356b05ec10f3422af8cd8ca2d3fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/a101f7ad5936356b05ec10f3422af8cd8ca2d3fa/test_datetime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 712, 950, 13332, 3875, 797, 12, 5096, 21, 13, 389, 3338, 273, 2037, 1435, 3681, 21, 273, 3716, 21, 12, 1293, 21, 33, 67, 3338, 16, 645, 22, 33, 67, 3338, 13, 1815, 1549, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 712, 950, 13332, 3875, 797, 12, 5096, 21, 13, 389, 3338, 273, 2037, 1435, 3681, 21, 273, 3716, 21, 12, 1293, 21, 33, 67, 3338, 16, 645, 22, 33, 67, 3338, 13, 1815, 1549, ...
except:
except Exception, ex:
def init_logger(): from tools import config import os if config['logfile']: logf = config['logfile'] # test if the directories exist, else create them try: dirname = os.path.dirname(logf) if not os.path.isdir(dirname): res = os.makedirs(dirname) handler = logging.handlers.TimedRotatingFileHandler(logf,'D',1,30) except: sys.stderr.write("ERROR: couldn't create the logfile directory\n") handler = logging.StreamHandler(sys.stdout) else: handler = logging.StreamHandler(sys.stdout) # create a format for log messages and dates formatter = logging.Formatter('[%(asctime)s] %(levelname)s:%(name)s:%(message)s', '%a %b %d %H:%M:%S %Y') # tell the handler to use this format handler.setFormatter(formatter) # add the handler to the root logger logging.getLogger().addHandler(handler) logging.getLogger().setLevel(config['log_level']) if isinstance(handler, logging.StreamHandler) and os.name != 'nt': # change color of level names # uses of ANSI color codes # see http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html # maybe use http://code.activestate.com/recipes/574451/ colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', None, 'default'] foreground = lambda f: 30 + colors.index(f) background = lambda f: 40 + colors.index(f) mapping = { 'DEBUG': ('blue', 'default'), 'INFO': ('green', 'default'), 'WARNING': ('yellow', 'default'), 'ERROR': ('red', 'default'), 'CRITICAL': ('white', 'red'), } for level, (fg, bg) in mapping.items(): msg = "\x1b[%dm\x1b[%dm%s\x1b[0m" % (foreground(fg), background(bg), level) logging.addLevelName(getattr(logging, level), msg)
38df72d010f490aef64f5379e60ded510d0b9283 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/38df72d010f490aef64f5379e60ded510d0b9283/netsvc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 4901, 13332, 628, 8513, 1930, 642, 1930, 1140, 225, 309, 642, 3292, 28806, 3546, 30, 27345, 273, 642, 3292, 28806, 3546, 468, 1842, 309, 326, 6402, 1005, 16, 469, 752, 2182, 77...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 4901, 13332, 628, 8513, 1930, 642, 1930, 1140, 225, 309, 642, 3292, 28806, 3546, 30, 27345, 273, 642, 3292, 28806, 3546, 468, 1842, 309, 326, 6402, 1005, 16, 469, 752, 2182, 77...
Returns a list of the immediate super categories of self.
Returns a list of the immediate super categories of ``self``.
def super_categories(self): """ Returns a list of the immediate super categories of self.
eda1aa3ffdb57ef7907cbd3de37a32cfd1f0fe01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/eda1aa3ffdb57ef7907cbd3de37a32cfd1f0fe01/monoids.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2240, 67, 8995, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 326, 14483, 2240, 6477, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2240, 67, 8995, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 326, 14483, 2240, 6477, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
data['location'] = item.find('./preview/large').text trailer = Trailer(ROOT_ID, **data)
data['url'] = item.find('./preview/large').text trailer = Trailer(ROOT_ID, self.urlbase, **data)
def _parse_into_trailer(self, item): """ info = item.find('info')
3e59731383d1904a129c56be697069bddf59b494 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/3e59731383d1904a129c56be697069bddf59b494/appletrailers_storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 18591, 67, 15565, 264, 12, 2890, 16, 761, 4672, 3536, 1123, 273, 761, 18, 4720, 2668, 1376, 6134, 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, 389, 2670, 67, 18591, 67, 15565, 264, 12, 2890, 16, 761, 4672, 3536, 1123, 273, 761, 18, 4720, 2668, 1376, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
share2.activate(sid)
def test1157(self): uuid = self.root.sf.getAdminService().getEventContext().sessionUuid share = self.root.sf.getShareService() query = self.root.sf.getQueryService() update = self.root.sf.getUpdateService() admin = self.root.sf.getAdminService() ### create two users in one group #group1 new_gr1 = ExperimenterGroupI() new_gr1.name = rstring("group1_%s" % uuid) gid = admin.createGroup(new_gr1) #new user1 new_exp = ExperimenterI() new_exp.omeName = rstring("user1_%s" % uuid) new_exp.firstName = rstring("New") new_exp.lastName = rstring("Test") new_exp.email = rstring("newtest@emaildomain.com") defaultGroup = admin.getGroup(gid) listOfGroups = list() listOfGroups.append(admin.lookupGroup("user")) eid = admin.createExperimenterWithPassword(new_exp, rstring("ome"), defaultGroup, listOfGroups) #new user2 new_exp2 = ExperimenterI() new_exp2.omeName = rstring("user2_%s" % uuid) new_exp2.firstName = rstring("New2") new_exp2.lastName = rstring("Test2") new_exp2.email = rstring("newtest2@emaildomain.com") eid2 = admin.createExperimenterWithPassword(new_exp2, rstring("ome"), defaultGroup, listOfGroups) ## get users user1 = admin.getExperimenter(eid) user2 = admin.getExperimenter(eid2) ## login as user1 client_share1 = omero.client() client_share1.createSession(user1.omeName.val,"ome") share1 = client_share1.sf.getShareService() update1 = client_share1.sf.getUpdateService() # create image img = ImageI() img.setName(rstring('test1154-img-%s' % (uuid))) img.setAcquisitionDate(rtime(0)) # permission 'rw----': img.details.permissions.setUserRead(True) img.details.permissions.setUserWrite(True) img.details.permissions.setGroupRead(False) img.details.permissions.setGroupWrite(False) img.details.permissions.setWorldRead(False) img.details.permissions.setWorldWrite(False) img = update1.saveAndReturnObject(img) img.unload() # create share description = "my description" timeout = None objects = [img] experimenters = [user2] guests = [] enabled = True sid = share.createShare(description, timeout, objects,experimenters, guests, enabled) self.assert_(len(share1.getContents(sid)) == 1) # add comment by the owner share.addComment(sid, 'test comment by the owner %s' % (uuid)) ## login as user2 client_share2 = omero.client() client_share2.createSession(user2.omeName.val,"ome") share2 = client_share2.sf.getShareService() query2 = client_share2.sf.getQueryService() sh = share2.getShare(sid) # add comment by the member share2.addComment(sid, 'test comment by the member %s' % (uuid))
e97f2194053b9558758fd730267e6752afdbf71a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/e97f2194053b9558758fd730267e6752afdbf71a/ishare.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2499, 10321, 12, 2890, 4672, 3822, 273, 365, 18, 3085, 18, 21668, 18, 588, 4446, 1179, 7675, 588, 1133, 1042, 7675, 3184, 5897, 7433, 273, 365, 18, 3085, 18, 21668, 18, 588, 9535, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2499, 10321, 12, 2890, 4672, 3822, 273, 365, 18, 3085, 18, 21668, 18, 588, 4446, 1179, 7675, 588, 1133, 1042, 7675, 3184, 5897, 7433, 273, 365, 18, 3085, 18, 21668, 18, 588, 9535, ...
DB = ZODB.DB(m.Storage, databases=dbtab.databases)
DB = ZODB.DB(m.Storage, databases=databases)
def startup(): global app # Import products OFS.Application.import_products() configuration = getConfiguration() # Open the database dbtab = configuration.dbtab try: # Try to use custom storage try: m=imp.find_module('custom_zodb',[configuration.testinghome]) except: m=imp.find_module('custom_zodb',[configuration.instancehome]) except: # if there is no custom_zodb, use the config file specified databases DB = dbtab.getDatabase('/', is_root=1) else: m=imp.load_module('Zope2.custom_zodb', m[0], m[1], m[2]) sys.modules['Zope2.custom_zodb']=m if hasattr(m,'DB'): DB=m.DB dbtab.databases.update(getattr(DB, 'databases', {})) DB.databases = dbtab.databases else: DB = ZODB.DB(m.Storage, databases=dbtab.databases) Globals.BobobaseName = DB.getName() if DB.getActivityMonitor() is None: from ZODB.ActivityMonitor import ActivityMonitor DB.setActivityMonitor(ActivityMonitor()) Globals.DB = DB # Ick, this is temporary until we come up with some registry Zope2.DB = DB # Hook for providing multiple transaction object manager undo support: Globals.UndoManager=DB Globals.opened.append(DB) import ClassFactory DB.classFactory = ClassFactory.ClassFactory # "Log on" as system user newSecurityManager(None, AccessControl.User.system) # Set up the "app" object that automagically opens # connections app = App.ZApplication.ZApplicationWrapper( DB, 'Application', OFS.Application.Application, (), Globals.VersionNameName) Zope2.bobo_application = app # Initialize the app object application = app() OFS.Application.initialize(application) if Globals.DevelopmentMode: # Set up auto-refresh. from App.RefreshFuncs import setupAutoRefresh setupAutoRefresh(application._p_jar) application._p_jar.close() # "Log off" as system user noSecurityManager() global startup_time startup_time = asctime() Zope2.zpublisher_transactions_manager = TransactionsManager() Zope2.zpublisher_exception_hook = zpublisher_exception_hook Zope2.zpublisher_validated_hook = validated_hook Zope2.__bobo_before__ = noSecurityManager
68b3ae5a2d9ec6dafff1ea05d981c6a0d55bcdd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/68b3ae5a2d9ec6dafff1ea05d981c6a0d55bcdd3/startup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11850, 13332, 2552, 595, 225, 468, 6164, 10406, 531, 4931, 18, 3208, 18, 5666, 67, 18736, 1435, 225, 1664, 273, 10316, 1435, 225, 468, 3502, 326, 2063, 1319, 7032, 273, 1664, 18, 1966, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11850, 13332, 2552, 595, 225, 468, 6164, 10406, 531, 4931, 18, 3208, 18, 5666, 67, 18736, 1435, 225, 1664, 273, 10316, 1435, 225, 468, 3502, 326, 2063, 1319, 7032, 273, 1664, 18, 1966, 7...
em.children = node.children
for c in node.children: em.appendChild(c)
def fixStyle(node): """ parser.Style Nodes are mapped to logical markup dection of DefinitionList depends on removeNodes and removeNewlines """ if not node.__class__ == Style: return # replace this node by a more apporiate if node.caption == "''": node.__class__ = Emphasized node.caption = "" elif node.caption=="'''''": node.__class__ = Strong node.caption = "" em = Emphasized("''") em.children = node.children node.children = [] node.appendChild(em) elif node.caption == "'''": node.__class__ = Strong node.caption = "" elif node.caption == ";": # this starts a definition list ? DL [DT->DD, ...] # check if previous node is DefinitionList, if not create one if node.previous.__class__ == DefinitionList: node.__class__ = DefinitionTerm node.moveto(node.previous.lastchild) else: node.__class__ = DefinitionList dt = DefinitionTerm() for c in node.children: dt.appendChild(c) node.children = [] node.appendChild(dt) elif node.caption.startswith(":"): if node.previous.__class__ == DefinitionList: node.__class__ = DefinitionDescription node.moveto(node.previous.lastchild) node.caption = "" else: node.__class__ = Indented elif node.caption in _styleNodeMap: node.__class__ = _styleNodeMap[node.caption] node.caption = "" else: log.warn("fixStyle, unknownstyle %r" % node) #raise Exception, "unknown style %s" % node.caption # FIXME pass return node
bdc928f18ce917c83431ac1c547392b06c0ae633 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/bdc928f18ce917c83431ac1c547392b06c0ae633/advtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 2885, 12, 2159, 4672, 3536, 2082, 18, 2885, 14037, 854, 5525, 358, 6374, 9813, 443, 349, 434, 10849, 682, 10935, 603, 1206, 3205, 471, 1206, 1908, 3548, 3536, 309, 486, 756, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2885, 12, 2159, 4672, 3536, 2082, 18, 2885, 14037, 854, 5525, 358, 6374, 9813, 443, 349, 434, 10849, 682, 10935, 603, 1206, 3205, 471, 1206, 1908, 3548, 3536, 309, 486, 756, 16186, ...
raise TracError, 'Unable to instantiate component %r (%s)' \ % (cls, e)
raise TracError('Unable to instantiate component %r (%s)' % (cls, e))
def __getitem__(self, cls): """Activate the component instance for the given class, or return the existing the instance if the component has already been activated.""" if cls not in self.enabled: self.enabled[cls] = self.is_component_enabled(cls) if not self.enabled[cls]: return None component = self.components.get(cls) if not component: if cls not in ComponentMeta._components: raise TracError, 'Component "%s" not registered' % cls.__name__ try: component = cls(self) except TypeError, e: raise TracError, 'Unable to instantiate component %r (%s)' \ % (cls, e) return component
dd8869999b70525c4fd3c1390323acdc254d0b3f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/dd8869999b70525c4fd3c1390323acdc254d0b3f/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 2028, 4672, 3536, 21370, 326, 1794, 791, 364, 326, 864, 667, 16, 578, 327, 326, 2062, 326, 791, 309, 326, 1794, 711, 1818, 2118, 14892, 12123, 309, 2028, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31571, 972, 12, 2890, 16, 2028, 4672, 3536, 21370, 326, 1794, 791, 364, 326, 864, 667, 16, 578, 327, 326, 2062, 326, 791, 309, 326, 1794, 711, 1818, 2118, 14892, 12123, 309, 2028, ...