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
team_map[team_name] = 1 + team_map.get(team_name, 0)
team_count_map[team_name] = 1 + team_count_map.get(team_name, 0)
def testing_status() : server_name = 'rcssserver' server_user = '' process_list = get_cmd_output('export LANG="POSIX"; ps -e -o comm,user=').strip().split('\n') process_list.pop(0) team_map = {} cmd_count_map = {} matched_cmds = {} for process in process_list : info = process.split() (cmd, user) = (info[0], info[1]) cmd_count_map[cmd] = 1 + cmd_count_map.get(cmd, 0) for pattern in team_name_map.keys() : if pattern.match(cmd) : matched_cmds[cmd] = 1 team_name = team_name_map[pattern] team_map[team_name] = 1 + team_map.get(team_name, 0) break if not server_user and cmd == server_name : server_user = user message = ' #rcssserver: ' if server_user : server_count = cmd_count_map[server_name] if len(team_map) <= 1 : count_cmd_map = {} sucess = False for cmd in cmd_count_map.keys() : count_cmd_map.setdefault(cmd_count_map[cmd], []).append(cmd) count_list = count_cmd_map.keys() count_list.sort() count_list.reverse() for count in count_list : for cmd in count_cmd_map[count] : if not matched_cmds.has_key(cmd) : team_map['[' + cmd + ']'] = cmd_count_map[cmd] if len(team_map) >= 2 : sucess = True break if sucess : break message += '%d, %s (' % (server_count, server_user) for team in sorted(team_map.keys()) : message += '%s x %s, ' % (team, team_map[team]) message = message.rstrip(', ') + ')' else : message += '0' return message
fda0c75e81e4171fbfd5b7da1e054db790bac19c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/228/fda0c75e81e4171fbfd5b7da1e054db790bac19c/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7769, 67, 2327, 1435, 294, 1438, 67, 529, 273, 296, 1310, 1049, 3567, 11, 1438, 67, 1355, 273, 875, 225, 1207, 67, 1098, 273, 336, 67, 4172, 67, 2844, 2668, 6530, 19913, 1546, 2419, 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, 7769, 67, 2327, 1435, 294, 1438, 67, 529, 273, 296, 1310, 1049, 3567, 11, 1438, 67, 1355, 273, 875, 225, 1207, 67, 1098, 273, 336, 67, 4172, 67, 2844, 2668, 6530, 19913, 1546, 2419, 31...
BoolParam(True))
BoolParam(default_warn))
def warning(*msg): _logger.warning('WARNING theano.configdefaults: '+' '.join(msg))
43947ed93f0c38cb412ff0085e1e1de998a69522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/43947ed93f0c38cb412ff0085e1e1de998a69522/configdefaults.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3436, 30857, 3576, 4672, 389, 4901, 18, 8551, 2668, 9511, 326, 31922, 18, 1425, 7606, 30, 10058, 2418, 5701, 12, 3576, 3719, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 3436, 30857, 3576, 4672, 389, 4901, 18, 8551, 2668, 9511, 326, 31922, 18, 1425, 7606, 30, 10058, 2418, 5701, 12, 3576, 3719, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
class PerforceTests(unittest.TestCase):
class PerforceTests(DjangoTestCase):
def testKeywordDiff(self): """Testing parsing SVN diff with keywords""" # 'svn cat' will expand special variables in svn:keywords, # but 'svn diff' doesn't expand anything. This causes the # patch to fail if those variables appear in the patch context. diff = "Index: Makefile\n" \ "===========================================================" \ "========\n" \ "--- Makefile (revision 4)\n" \ "+++ Makefile (working copy)\n" \ "@@ -1,6 +1,7 @@\n" \ " # $Id$\n" \ " # $Rev$\n" \ " # $Revision:: $\n" \ "+# foo\n" \ " include ../tools/Makefile.base-vars\n" \ " NAME = misc-docs\n" \ " OUTNAME = svn-misc-docs\n"
0e4a713b40cd9da0364a55af4c7b049f4cb172b5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/0e4a713b40cd9da0364a55af4c7b049f4cb172b5/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 8736, 5938, 12, 2890, 4672, 3536, 22218, 5811, 29537, 50, 3122, 598, 7093, 8395, 468, 296, 31505, 6573, 11, 903, 4542, 4582, 3152, 316, 5893, 82, 30, 11771, 16, 468, 1496, 296, 315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8736, 5938, 12, 2890, 4672, 3536, 22218, 5811, 29537, 50, 3122, 598, 7093, 8395, 468, 296, 31505, 6573, 11, 903, 4542, 4582, 3152, 316, 5893, 82, 30, 11771, 16, 468, 1496, 296, 315...
result = S_OK({}) return result
result = S_OK( {} ) return result
def getCompatibleMetadata(self,metaDict,credDict): """ Get distinct metadata values compatible with the given already defined metadata """ # Get the list of metadata fields to inspect result = self.getMetadataFields(credDict) if not result['OK']: return result metaFields = result['Value'] comFields = metaFields.keys() for m in metaDict: if m in comFields: del comFields[comFields.index(m)] fromList = [] any = True if metaDict: any = False for meta,value in metaDict.items(): result = self.__findCompatibleDirectories(meta,value,fromList) if not result['OK']: return result cdirList = result['Value'] if cdirList: fromList = cdirList else: fromList = [] break
127f98379e5064d0a5d5df2ba7ce74c780770faa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/127f98379e5064d0a5d5df2ba7ce74c780770faa/DirectoryMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 14599, 2277, 12, 2890, 16, 3901, 5014, 16, 20610, 5014, 4672, 3536, 968, 10217, 1982, 924, 7318, 598, 326, 864, 1818, 2553, 1982, 3536, 225, 468, 968, 326, 666, 434, 1982, 1466, 358...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14599, 2277, 12, 2890, 16, 3901, 5014, 16, 20610, 5014, 4672, 3536, 968, 10217, 1982, 924, 7318, 598, 326, 864, 1818, 2553, 1982, 3536, 225, 468, 968, 326, 666, 434, 1982, 1466, 358...
"""This hook can replace sys.excepthook (for Python 2.1 or higher)."""
def __call__(self, etype, evalue, etb): """This hook can replace sys.excepthook (for Python 2.1 or higher).""" self.handle((etype, evalue, etb))
09029ec15c2b61a0aa506286a6bb485f468ac920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/09029ec15c2b61a0aa506286a6bb485f468ac920/cgitb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 24700, 16, 425, 1132, 16, 3393, 70, 4672, 365, 18, 4110, 12443, 5872, 16, 425, 1132, 16, 3393, 70, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 24700, 16, 425, 1132, 16, 3393, 70, 4672, 365, 18, 4110, 12443, 5872, 16, 425, 1132, 16, 3393, 70, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -10...
if x > self.width or x < -self.width or y > self.height or y < -self.height:
max_x = self.width/2.0 max_y = self.height/2.0 if x > max_x or x < -max_x or y > max_y or y < -max_y:
def _draw_circle(self, x, y, r, c): if x > self.width or x < -self.width or y > self.height or y < -self.height: return self.output.append("\\draw[color=%s] (%.2f,%.2f) circle (%.2f);" % (c,x,y,r))
0e9f3b3c91b7396be2a362c9e1d68c15a25747c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14940/0e9f3b3c91b7396be2a362c9e1d68c15a25747c6/drawing_tikz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9446, 67, 18970, 12, 2890, 16, 619, 16, 677, 16, 436, 16, 276, 4672, 943, 67, 92, 273, 365, 18, 2819, 19, 22, 18, 20, 943, 67, 93, 273, 365, 18, 4210, 19, 22, 18, 20, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9446, 67, 18970, 12, 2890, 16, 619, 16, 677, 16, 436, 16, 276, 4672, 943, 67, 92, 273, 365, 18, 2819, 19, 22, 18, 20, 943, 67, 93, 273, 365, 18, 4210, 19, 22, 18, 20, 309, ...
>>> request.form = {'REMOVE_MEMBER.ignas': 'on', 'REMOVE_MEMBERS': 'Apply'}
>>> request.form = {'REMOVE_MEMBER.ignas': 'on', ... 'REMOVE_MEMBERS': 'Apply'}
def doctest_MemberListView(): r"""Test for MemberListView We will be (ab)using a group and three test subjects: >>> from schoolbell.app.app import Group >>> pov = Group('PoV') >>> from schoolbell.app.app import Person >>> gintas = Person('gintas', 'Gintas') >>> ignas = Person('ignas', 'Ignas') >>> alga = Person('alga', 'Albertas') We need these objects to live in an application: >>> from schoolbell.app.app import SchoolBellApplication >>> app = SchoolBellApplication() >>> directlyProvides(app, IContainmentRoot) >>> app['groups']['pov'] = pov >>> app['persons']['gintas'] = gintas >>> app['persons']['ignas'] = ignas >>> app['persons']['alga'] = alga Let's create a view for our group: >>> from schoolbell.app.browser.app import MemberViewPersons >>> request = TestRequest() >>> view = MemberViewPersons(pov, request) Rendering the view does no harm: >>> view.update() First, all persons should be listed in alphabetical order: >>> [g.title for g in view.getPotentialMembers()] ['Albertas', 'Gintas', 'Ignas'] We can search persons not in the group >>> [g.title for g in view.searchPotentialMembers('al')] ['Albertas'] >>> [g.title for g in view.searchPotentialMembers('i')] ['Gintas', 'Ignas'] Let's make Ignas a member of PoV: >>> request = TestRequest() >>> request.form = {'ADD_MEMBER.ignas': 'on', 'ADD_MEMBERS': 'Apply'} >>> view = MemberViewPersons(pov, request) >>> view.update() He should have joined: >>> [person.title for person in pov.members] ['Ignas'] Search again to make sure members do not appear in the results: >>> [g.title for g in view.searchPotentialMembers('as')] ['Albertas', 'Gintas'] We can cancel an action if we want to: >>> request = TestRequest() >>> request.form = {'ADD_MEMBER.gintas': 'on', 'DONE': 'Done'} >>> view = MemberViewPersons(pov, request) >>> view.update() >>> [person.title for person in pov.members] ['Ignas'] >>> request.response.getStatus() 302 >>> request.response.getHeaders()['Location'] 'http://127.0.0.1/groups/pov' Let's remove Ignas from PoV (he went home early today); >>> request = TestRequest() >>> request.form = {'REMOVE_MEMBER.ignas': 'on', 'REMOVE_MEMBERS': 'Apply'} >>> view = MemberViewPersons(pov, request) >>> view.update() and add Albert, who came in late and has to work after-hours: >>> request = TestRequest() >>> request.form = {'ADD_MEMBER.alga': 'on', 'ADD_MEMBERS': 'Apply'} >>> view = MemberViewPersons(pov, request) >>> view.update() Mission accomplished: >>> [person.title for person in pov.members] ['Albertas'] Click 'Done' when we are finished and we go back to the group view >>> request = TestRequest() >>> request.form = {'DONE': 'Done'} >>> view = MemberViewPersons(pov, request) >>> view.update() >>> request.response.getStatus() 302 >>> request.response.getHeaders()['Location'] 'http://127.0.0.1/groups/pov' TODO: check resource view """
492081c988dd0c846f19a6b18ebdd23544055fe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/492081c988dd0c846f19a6b18ebdd23544055fe5/test_app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31263, 395, 67, 4419, 682, 1767, 13332, 436, 8395, 4709, 364, 8596, 682, 1767, 225, 1660, 903, 506, 261, 378, 13, 9940, 279, 1041, 471, 8925, 1842, 16782, 30, 225, 4080, 628, 18551, 1371...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31263, 395, 67, 4419, 682, 1767, 13332, 436, 8395, 4709, 364, 8596, 682, 1767, 225, 1660, 903, 506, 261, 378, 13, 9940, 279, 1041, 471, 8925, 1842, 16782, 30, 225, 4080, 628, 18551, 1371...
s = gzip.GzipFile(fileobj=BytesIO(f.getvalue())).read()
gzfile = gzip.GzipFile(fileobj=BytesIO(f.getvalue())) try: s = gzfile.read() finally: gzfile.close()
def test_write_gzip(self): tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>')) f = BytesIO() tree.write(f, compression=9) s = gzip.GzipFile(fileobj=BytesIO(f.getvalue())).read() self.assertEquals(_bytes('<a>'+'<b/>'*200+'</a>'), s)
b14f67842b88f2fcecb24166f1ffb7de156066b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13107/b14f67842b88f2fcecb24166f1ffb7de156066b1/test_etree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2626, 67, 17380, 12, 2890, 4672, 2151, 273, 365, 18, 2670, 24899, 3890, 2668, 32, 69, 1870, 6797, 32, 70, 18280, 14, 6976, 6797, 1757, 69, 1870, 3719, 284, 273, 20650, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2626, 67, 17380, 12, 2890, 4672, 2151, 273, 365, 18, 2670, 24899, 3890, 2668, 32, 69, 1870, 6797, 32, 70, 18280, 14, 6976, 6797, 1757, 69, 1870, 3719, 284, 273, 20650, 1435, ...
penality += (mirrordata["size"]/1000000.)/mirrordata["time"]
penality += float(mirrordata["time"])/mirrordata["size"]
def updatePenality(self): if not self._changed: return self._changed = False self._penality.clear() data = {} for mirror, info in self._history: if mirror not in data: mirrordata = data.setdefault(mirror, {"size": 0, "time": 0, "failed": 0}) else: mirrordata = data[mirror] mirrordata["size"] += info.get("size", 0) mirrordata["time"] += info.get("time", 0) mirrordata["failed"] += info.get("failed", 0) for mirror in data: mirrordata = data[mirror] penality = 0 if mirrordata["size"] and mirrordata["time"] >= 1: penality += (mirrordata["size"]/1000000.)/mirrordata["time"] penality += mirrordata["failed"]*((penality or 1)*0.1) if penality: self._penality[mirror] = penality
8233fcb33e986a9d40fc6c86a60b261f42e753cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/8233fcb33e986a9d40fc6c86a60b261f42e753cd/mirror.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 24251, 7919, 12, 2890, 4672, 309, 486, 365, 6315, 6703, 30, 327, 365, 6315, 6703, 273, 1083, 365, 6315, 1907, 7919, 18, 8507, 1435, 501, 273, 2618, 364, 15593, 16, 1123, 316, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 24251, 7919, 12, 2890, 4672, 309, 486, 365, 6315, 6703, 30, 327, 365, 6315, 6703, 273, 1083, 365, 6315, 1907, 7919, 18, 8507, 1435, 501, 273, 2618, 364, 15593, 16, 1123, 316, 365, ...
xsd_file = "security_policy.xsd" files = [ xsd_file ] for file in files: if not os.path.isfile(policiesdir + "/" + file ): try: shutil.copyfile(instdir + "/" + file, policiesdir + "/" + file) except Exception, e: log.info("could not copy '%s': %s" % (file, str(e)))
def initialize(): xoptions = XendOptions.instance() basedir = xoptions.get_xend_security_path() policiesdir = basedir + "/policies" mkdir.parents(policiesdir, stat.S_IRWXU) instdir = security.install_policy_dir_prefix DEF_policy_file = "DEFAULT-security_policy.xml" xsd_file = "security_policy.xsd" files = [ xsd_file ] for file in files: if not os.path.isfile(policiesdir + "/" + file ): try: shutil.copyfile(instdir + "/" + file, policiesdir + "/" + file) except Exception, e: log.info("could not copy '%s': %s" % (file, str(e))) #Install default policy. f = open(policiesdir + "/" + DEF_policy_file, 'w') if f: f.write(get_DEFAULT_policy()) f.close() else: log.error("Could not write the default policy's file.") defpol = ACMPolicy(xml=get_DEFAULT_policy()) defpol.compile()
6f19307bafccfe88c04980ebdfb317dd5f70f28b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6195/6f19307bafccfe88c04980ebdfb317dd5f70f28b/acmpolicy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 13332, 619, 2116, 273, 1139, 409, 1320, 18, 1336, 1435, 15573, 273, 619, 2116, 18, 588, 67, 92, 409, 67, 7462, 67, 803, 1435, 8923, 1214, 273, 15573, 397, 2206, 17407, 6, 6535, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 619, 2116, 273, 1139, 409, 1320, 18, 1336, 1435, 15573, 273, 619, 2116, 18, 588, 67, 92, 409, 67, 7462, 67, 803, 1435, 8923, 1214, 273, 15573, 397, 2206, 17407, 6, 6535, 1...
def __exc_info(self): """Return a version of sys.exc_info() with the traceback frame minimised; usually the top level of the traceback frame is not needed. """ exctype, excvalue, tb = sys.exc_info() newtb = tb.tb_next if newtb is None: return (exctype, excvalue, tb) return (exctype, excvalue, newtb)
def __exc_info(self): """Return a version of sys.exc_info() with the traceback frame minimised; usually the top level of the traceback frame is not needed. """ exctype, excvalue, tb = sys.exc_info() newtb = tb.tb_next if newtb is None: return (exctype, excvalue, tb) return (exctype, excvalue, newtb)
17a781bc69d73326455ca7f129bdf57528f4ad8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/17a781bc69d73326455ca7f129bdf57528f4ad8b/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10075, 67, 1376, 12, 2890, 4672, 3536, 990, 279, 1177, 434, 2589, 18, 10075, 67, 1376, 1435, 598, 326, 10820, 2623, 18172, 5918, 31, 11234, 326, 1760, 1801, 434, 326, 10820, 2623, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10075, 67, 1376, 12, 2890, 4672, 3536, 990, 279, 1177, 434, 2589, 18, 10075, 67, 1376, 1435, 598, 326, 10820, 2623, 18172, 5918, 31, 11234, 326, 1760, 1801, 434, 326, 10820, 2623, ...
t=tx1.get()[0:n+1]
t2=tx1.get()[0:n+1]
def dbl_click_call(t,t1,rpt,event): global hiscall
3d154ae144e41747a40f31f9c185b0babc8e9667 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2394/3d154ae144e41747a40f31f9c185b0babc8e9667/wsjt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 80, 67, 7475, 67, 1991, 12, 88, 16, 88, 21, 16, 86, 337, 16, 2575, 4672, 2552, 18423, 1991, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 80, 67, 7475, 67, 1991, 12, 88, 16, 88, 21, 16, 86, 337, 16, 2575, 4672, 2552, 18423, 1991, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.povray_path_linedit.setGeometry(QRect(113,62,350,24))
def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl)
7cc18611a6df93ebc9707a8878e31fb8451f8ff6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/7cc18611a6df93ebc9707a8878e31fb8451f8ff6/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
moveOffset += scale * self.assy.o.down
moveOffset += scale * self.assy.o.down moveOffset += initial_offset_for_chunks self._initial_paste_offset_for_chunks = moveOffset
def _pasteChunk(self, chunkToPaste, mousePosition = None): """ Paste the given chunk in the 3 D workspace. @param chunkToPaste: The chunk to be pasted in the 3D workspace @type chunkToPaste: L{Chunk} @param mousePosition: These are the coordinates during mouse double click. @type mousePosition: Array containing the x, y, z positions on the screen or 'None' @see: L{self.paste} for implementation notes. """ assert isinstance(chunkToPaste, Chunk) pastable = chunkToPaste pos = mousePosition newChunk = None errorMsg = None moveOffset = V(0, 0, 0) newChunk = pastable.copy_single_chunk(None) chunkCenter = newChunk.center if pos: #Paste from clipboard (by Double clicking) moveOffset = pos - chunkCenter else: #Single Shot paste (Ctrl + V) boundingBox = BBox() boundingBox.merge(newChunk.bbox) scale = float(boundingBox.scale() * 0.06) if scale < 0.001: scale = 0.1 moveOffset = scale * self.assy.o.right moveOffset += scale * self.assy.o.down newChunk.move(moveOffset) self.assy.addmol(newChunk) return newChunk, errorMsg
8b748f35206882452325a1386b28bfd7edbaaa4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/8b748f35206882452325a1386b28bfd7edbaaa4f/ops_copy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29795, 5579, 12, 2890, 16, 2441, 774, 52, 14725, 16, 7644, 2555, 273, 599, 4672, 3536, 453, 14725, 326, 864, 2441, 316, 326, 890, 463, 6003, 18, 632, 891, 2441, 774, 52, 14725, 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, 389, 29795, 5579, 12, 2890, 16, 2441, 774, 52, 14725, 16, 7644, 2555, 273, 599, 4672, 3536, 453, 14725, 326, 864, 2441, 316, 326, 890, 463, 6003, 18, 632, 891, 2441, 774, 52, 14725, 30...
INPUT: - ``d`` - state array or something coercible to a state array
def sub_bytes(self, d): r""" Perform the non-linear transform on ``d``.
361ee6a2b2c797fdc77944b615cb058df81aca2e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/361ee6a2b2c797fdc77944b615cb058df81aca2e/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 67, 3890, 12, 2890, 16, 302, 4672, 436, 8395, 11217, 326, 1661, 17, 12379, 2510, 603, 12176, 72, 68, 8338, 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, 720, 67, 3890, 12, 2890, 16, 302, 4672, 436, 8395, 11217, 326, 1661, 17, 12379, 2510, 603, 12176, 72, 68, 8338, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
startlogging()
def main(args): """Main function: deal with command line arguments and start calculation as reqd.""" #Start the logging module startlogging() #Set up arguments shortargs = "hf:mstadpb:e:" longargs = ["help", "filename=", "fomodel", "somodel", "source", "all", "debug", "kinit=", "kend=", "deltak=", "parallelsrc", "begin=", "end="] try: opts, args = getopt.getopt(args, shortargs, longargs) except getopt.GetoptError: print __doc__ sys.exit(2) filename = None func = None kinit = kend = deltak = None ninit = 0 nfinal = -1 for opt, arg in opts: if opt in ("-h", "--help"): print __doc__ sys.exit() elif opt in ("-f", "--filename"): filename = arg elif opt in ("-m", "--fomodel"): func = "fomodel" elif opt in ("-s", "--somodel"): func = "somodel" elif opt in ("-t", "--source"): func = "source" elif opt in ("-a", "--all"): func = "all" elif opt in ("-d", "--debug"): LOGLEVEL = logging.DEBUG elif opt in ("--kinit",): kinit = float(arg) elif opt in ("--kend",): kend = float(arg) elif opt in ("--deltak",): deltak = float(arg) elif opt in ("-p", "--parallelsrc"): func = "parallelsrc" elif opt in ("-b", "--begin"): ninit = int(arg) elif opt in ("-e", "--end"): nfinal = int(arg) if func == "fomodel": logging.info("-----------First order run requested------------------") try: if not filename: filename = None except AttributeError: filename = None #start model run if kinit and deltak: if not kend: kend = 2*(hconfig.NUMSOKS*deltak + kinit) logging.info("Set kend to %d.", kend) elif kend < 2*(hconfig.NUMSOKS*deltak + kinit): logging.info("Requested k range will not satisfy condition for second order run!") else: kinit, deltak, kend = hconfig.kinit, hconfig.deltak, hconfig.kend foargs = hconfig.FOARGS foargs["k"] = stb.seq(kinit, kend, deltak) runfomodel(filename=filename, foargs=foargs) elif func == "somodel": logging.info("-----------Second order run requested------------------") try: if not filename: raise AttributeError("Need to specify first order file!") except AttributeError: harness_logger.exception("Error starting second order model!") #start model run runsomodel(fofile=filename) elif func == "source": logging.info("-----------Source integral run requested------------------") try: runfullsourceintegration(modelfile=filename, ninit=ninit, nfinal=nfinal) except Exception: harness_logger.exception("Error getting source integral!") elif func == "parallelsrc": try: try: runparallelintegration(modelfile=filename, ninit=ninit, nfinal=nfinal) except ImportError: harness_logger.exception("Parallel module not available!") sys.exit(1) except Exception: harness_logger.exception("Error getting source integral in parallel!") elif func == "all": try: dofullrun() except Exception: harness_logger.exception("Error doing full run!") else: print __doc__ sys.exit()
dcdb1b008b0e19c9fae70c2b35fa575069e7ec2e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7283/dcdb1b008b0e19c9fae70c2b35fa575069e7ec2e/harness.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 3536, 6376, 445, 30, 10490, 598, 1296, 980, 1775, 471, 787, 11096, 487, 1111, 72, 12123, 225, 468, 1685, 326, 2907, 1605, 7, 694, 731, 1775, 3025, 1968, 273, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1968, 4672, 3536, 6376, 445, 30, 10490, 598, 1296, 980, 1775, 471, 787, 11096, 487, 1111, 72, 12123, 225, 468, 1685, 326, 2907, 1605, 7, 694, 731, 1775, 3025, 1968, 273, 315, ...
group = UnitGroup(self.unitData, self.option)
else: group.parenthClosed = False
def parseGroup(self, text): """Return list of units from text string""" unitList = [] parts = [part.strip() for part in UnitGroup.operGroupRegEx.split(text) if part.strip()] numerator = True while parts: part = parts.pop(0) if part == '*' or part == '/': parts.insert(0, part) part = u'' # add blank invalid unit if order wrong if part.startswith('('): part = part[1:] if part.endswith(')'): part = part[:-1] group = UnitGroup(self.unitData, self.option) group.update(part) if not group.unitList: group.unitList.append(group.parseUnit('')) if not numerator: for unit in group.flatUnitList(): unit.exp = -unit.exp unitList.append(group) else: unit = self.parseUnit(part) if not numerator: unit.exp = -unit.exp unitList.append(unit) if parts: oper = parts.pop(0) if oper == '*' or oper == '/': numerator = oper == '*' and True or False if not parts: parts.insert(0, u'') # add blank invalid unit at end else: parts.insert(0, oper) # put unit back if order wrong return unitList
f540789e31bf3407050f593b81835ced84727d3f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3070/f540789e31bf3407050f593b81835ced84727d3f/unitgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1114, 12, 2890, 16, 977, 4672, 3536, 990, 666, 434, 4971, 628, 977, 533, 8395, 2836, 682, 273, 5378, 2140, 273, 306, 2680, 18, 6406, 1435, 364, 1087, 316, 8380, 1114, 18, 4063, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1114, 12, 2890, 16, 977, 4672, 3536, 990, 666, 434, 4971, 628, 977, 533, 8395, 2836, 682, 273, 5378, 2140, 273, 306, 2680, 18, 6406, 1435, 364, 1087, 316, 8380, 1114, 18, 4063, 1...
res = self.removeStorageDirectory( storageDirectory, storageElement, recursive=True, singleDirectory=True )
res = self.removeStorageDirectory( storageDirectory, storageElement, recursive = True, singleDirectory = True )
def __removeStorageDirectory( self, directory, storageElement ): gLogger.info( 'Removing the contents of %s at %s' % ( directory, storageElement ) ) res = self.getPfnForLfn( [directory], storageElement ) if not res['OK']: gLogger.error( "Failed to get PFN for directory", res['Message'] ) return res for directory, error in res['Value']['Failed'].items(): gLogger.error( 'Failed to obtain directory PFN from LFN', '%s %s' % ( directory, error ) ) if res['Value']['Failed']: return S_ERROR( 'Failed to obtain directory PFN from LFNs' ) storageDirectory = res['Value']['Successful'].values()[0] res = self.getStorageFileExists( storageDirectory, storageElement, singleFile=True ) if not res['OK']: gLogger.error( "Failed to obtain existance of directory", res['Message'] ) return res exists = res['Value'] if not exists: gLogger.info( "The directory %s does not exist at %s " % ( directory, storageElement ) ) return S_OK() res = self.removeStorageDirectory( storageDirectory, storageElement, recursive=True, singleDirectory=True ) if not res['OK']: gLogger.error( "Failed to remove storage directory", res['Message'] ) return res gLogger.info( "Successfully removed %d files from %s at %s" % ( res['Value']['FilesRemoved'], directory, storageElement ) ) return S_OK()
8cfc8d124489ba672254aee3d1fff4f748757c6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8cfc8d124489ba672254aee3d1fff4f748757c6c/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4479, 3245, 2853, 12, 365, 16, 1867, 16, 2502, 1046, 262, 30, 314, 3328, 18, 1376, 12, 296, 18939, 326, 2939, 434, 738, 87, 622, 738, 87, 11, 738, 261, 1867, 16, 2502, 1046, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4479, 3245, 2853, 12, 365, 16, 1867, 16, 2502, 1046, 262, 30, 314, 3328, 18, 1376, 12, 296, 18939, 326, 2939, 434, 738, 87, 622, 738, 87, 11, 738, 261, 1867, 16, 2502, 1046, 26...
out.append((LITERAL, p)) else: out.append((RANGE, (p, p+n-1)))
outappend((LITERAL, p)) else: outappend((RANGE, (p, p+n-1)))
def _optimize_charset(charset, fixup): # internal: optimize character set out = [] charmap = [False]*256 try: for op, av in charset: if op is NEGATE: out.append((op, av)) elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: # XXX: could append to charmap tail return charset # cannot compress except IndexError: # character set contains unicode characters return _optimize_unicode(charset, fixup) # compress character map i = p = n = 0 runs = [] for c in charmap: if c: if n == 0: p = i n = n + 1 elif n: runs.append((p, n)) n = 0 i = i + 1 if n: runs.append((p, n)) if len(runs) <= 2: # use literal/range for p, n in runs: if n == 1: out.append((LITERAL, p)) else: out.append((RANGE, (p, p+n-1))) if len(out) < len(charset): return out else: # use bitmap data = _mk_bitmap(charmap) out.append((CHARSET, data)) return out return charset
01c9f8c35f583338e3638906ceeef9d2f29a0254 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/01c9f8c35f583338e3638906ceeef9d2f29a0254/sre_compile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29155, 67, 9999, 12, 9999, 16, 2917, 416, 4672, 468, 2713, 30, 10979, 3351, 444, 596, 273, 5378, 1149, 1458, 273, 306, 8381, 5772, 5034, 775, 30, 364, 1061, 16, 1712, 316, 4856, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29155, 67, 9999, 12, 9999, 16, 2917, 416, 4672, 468, 2713, 30, 10979, 3351, 444, 596, 273, 5378, 1149, 1458, 273, 306, 8381, 5772, 5034, 775, 30, 364, 1061, 16, 1712, 316, 4856, 3...
self.__buttonUp(0)
def scrollTo(self, index, centered=0): """ scrolls list so selected index is at top, or centered in box""" assert self.notify.debugStateCall(self) #print "scrollTo[", index,"] called, len(self[items])=", len(self["items"])," self[numItemsVisible]=", self["numItemsVisible"] try: self["numItemsVisible"] except: # RAU hack to kill 27633 self.notify.info('crash 27633 fixed!') return
65e016c551594bdcdb1226b6862c1919e169e55c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/65e016c551594bdcdb1226b6862c1919e169e55c/DirectScrolledList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5532, 774, 12, 2890, 16, 770, 16, 25340, 33, 20, 4672, 3536, 5532, 87, 666, 1427, 3170, 770, 353, 622, 1760, 16, 578, 25340, 316, 3919, 8395, 1815, 365, 18, 12336, 18, 4148, 1119, 1477...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5532, 774, 12, 2890, 16, 770, 16, 25340, 33, 20, 4672, 3536, 5532, 87, 666, 1427, 3170, 770, 353, 622, 1760, 16, 578, 25340, 316, 3919, 8395, 1815, 365, 18, 12336, 18, 4148, 1119, 1477...
songs, playtime, num_songs = self.library.library_return_search_items(album=album)
songs, _playtime, _num_songs = self.library.library_return_search_items(album=album)
def album_return_artist_and_tracks(self): # Includes logic for Various Artists albums to determine # the tracks. datalist = [] album = mpdh.get(self.songinfo, 'album') songs, playtime, num_songs = self.library.library_return_search_items(album=album) for song in songs: year = mpdh.get(song, 'date', '') artist = mpdh.get(song, 'artist', '') path = os.path.dirname(mpdh.get(song, 'file')) data = library.library_set_data(album=album, artist=artist, year=year, path=path) datalist.append(data) if len(datalist) > 0: datalist = misc.remove_list_duplicates(datalist, case=False) datalist = self.library.list_identify_VA_albums(datalist) # Find all songs in album: retsongs = [] for song in songs: if unicode(mpdh.get(song, 'album')).lower() == unicode(library.library_get_data(datalist[0], 'album')).lower() \ and mpdh.get(song, 'date', '') == library.library_get_data(datalist[0], 'year'): retsongs.append(song) artist = library.library_get_data(datalist[0], 'artist') return artist, retsongs else: return None, None
a611157e0fc7d242d58df67886095dce4cc46388 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/a611157e0fc7d242d58df67886095dce4cc46388/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14844, 67, 2463, 67, 25737, 67, 464, 67, 21499, 12, 2890, 4672, 468, 657, 8993, 4058, 364, 11487, 1481, 9042, 1486, 14844, 87, 358, 4199, 468, 326, 13933, 18, 18462, 376, 273, 5378, 1484...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14844, 67, 2463, 67, 25737, 67, 464, 67, 21499, 12, 2890, 4672, 468, 657, 8993, 4058, 364, 11487, 1481, 9042, 1486, 14844, 87, 358, 4199, 468, 326, 13933, 18, 18462, 376, 273, 5378, 1484...
ctx = vortex.Ctx ();
ctx = vortex.Ctx ()
def test_03 (): # call to initialize a context ctx = vortex.Ctx (); # call to init ctx if not ctx.init (): error ("Failed to init Vortex context"); return False; # call to create a connection conn = vortex.Connection (ctx, host, port); # check connection status after if if not conn.is_ok (): error ("Expected to find proper connection result, but found error. Error code was: " + str(conn.status) + ", message: " + conn.error_msg); return False; # now shutdown conn.shutdown (); # now close the connection (already shutted down) conn.close (); ctx.exit () # finish ctx del ctx return True;
44bc361f3b497230e1d601079e2df89085d4b1cd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1306/44bc361f3b497230e1d601079e2df89085d4b1cd/vortex-regression-client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4630, 1832, 30, 468, 745, 358, 4046, 279, 819, 1103, 273, 331, 20873, 18, 6442, 1832, 225, 468, 745, 358, 1208, 1103, 309, 486, 1103, 18, 2738, 1832, 30, 555, 7566, 2925, 358...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4630, 1832, 30, 468, 745, 358, 4046, 279, 819, 1103, 273, 331, 20873, 18, 6442, 1832, 225, 468, 745, 358, 1208, 1103, 309, 486, 1103, 18, 2738, 1832, 30, 555, 7566, 2925, 358...
return str(self.title)
return self.title()
def __str__(self): return str(self.title)
65f30fd0720c16cc25a2258f90213137566d2b21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12041/65f30fd0720c16cc25a2258f90213137566d2b21/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 609, 12, 2890, 18, 2649, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 701, 972, 12, 2890, 4672, 327, 609, 12, 2890, 18, 2649, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
ok = 0
ok = False
def recolorize_main(self): next = "1.0" while 1: item = self.tag_nextrange("TODO", next) if not item: break head, tail = item self.tag_remove("SYNC", head, tail) item = self.tag_prevrange("SYNC", head) if item: head = item[1] else: head = "1.0"
273f22459c5052879287efc0c1575734822927da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/273f22459c5052879287efc0c1575734822927da/ColorDelegator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 3266, 554, 67, 5254, 12, 2890, 4672, 1024, 273, 315, 21, 18, 20, 6, 1323, 404, 30, 761, 273, 365, 18, 2692, 67, 82, 14523, 726, 2932, 6241, 3113, 1024, 13, 309, 486, 761, 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, 283, 3266, 554, 67, 5254, 12, 2890, 4672, 1024, 273, 315, 21, 18, 20, 6, 1323, 404, 30, 761, 273, 365, 18, 2692, 67, 82, 14523, 726, 2932, 6241, 3113, 1024, 13, 309, 486, 761, 30, ...
def graph_get(cr, graph, wkf_id, nested=False, workitem={}):
def graph_get(cr, graph, wkf_ids, nested=False, workitem={}):
def graph_get(cr, graph, wkf_id, nested=False, workitem={}): import pydot cr.execute('select * from wkf_activity where wkf_id=%s', (wkf_id,)) nodes = cr.dictfetchall() activities = {} actfrom = {} actto = {} for n in nodes: activities[n['id']] = n if n['subflow_id'] and nested: cr.execute('select * from wkf where id=%s', (n['subflow_id'],)) wkfinfo = cr.dictfetchone() graph2 = pydot.Cluster('subflow'+str(n['subflow_id']), fontsize='12', label = """\"Subflow: %s\\nOSV: %s\"""" % ( n['name'], wkfinfo['osv']) ) (s1,s2) = graph_get(cr, graph2, n['subflow_id'], nested,workitem) graph.add_subgraph(graph2) actfrom[n['id']] = s2 actto[n['id']] = s1 else: args = {} if n['flow_start'] or n['flow_stop']: args['style']='filled' args['color']='lightgrey' args['label']=n['name'] if n['subflow_id']: args['shape'] = 'box' if n['id'] in workitem: args['label']+='\\nx '+str(workitem[n['id']]) args['color'] = "red" graph.add_node(pydot.Node(n['id'], **args)) actfrom[n['id']] = (n['id'],{}) actto[n['id']] = (n['id'],{}) cr.execute('select * from wkf_transition where act_from in ('+','.join(map(lambda x: str(x['id']),nodes))+')') transitions = cr.dictfetchall() for t in transitions: args = {} args['label'] = str(t['condition']).replace(' or ', '\\nor ').replace(' and ', '\\nand ') if t['signal']: args['label'] += '\\n'+str(t['signal']) args['style'] = 'bold' if activities[t['act_from']]['split_mode']=='AND': args['arrowtail']='box' elif str(activities[t['act_from']]['split_mode'])=='OR ': args['arrowtail']='inv' if activities[t['act_to']]['join_mode']=='AND': args['arrowhead']='crow' activity_from = actfrom[t['act_from']][1].get(t['signal'], actfrom[t['act_from']][0]) activity_to = actto[t['act_to']][1].get(t['signal'], actto[t['act_to']][0]) graph.add_edge(pydot.Edge( str(activity_from) ,str(activity_to), fontsize='10', **args)) nodes = cr.dictfetchall() cr.execute('select id from wkf_activity where flow_start=True and wkf_id=%s limit 1', (wkf_id,)) start = cr.fetchone()[0] cr.execute("select 'subflow.'||name,id from wkf_activity where flow_stop=True and wkf_id=%s", (wkf_id,)) stop = cr.fetchall() if (stop): stop = (stop[0][1], dict(stop)) else: stop = ("stop",{}) return ((start,{}),stop)
434a1fe36a56a45122c70f08134eab2beef42892 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/434a1fe36a56a45122c70f08134eab2beef42892/print_instance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2667, 67, 588, 12, 3353, 16, 2667, 16, 26987, 74, 67, 2232, 16, 4764, 33, 8381, 16, 26409, 12938, 4672, 1930, 2395, 9811, 4422, 18, 8837, 2668, 4025, 380, 628, 26987, 74, 67, 9653, 162...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2667, 67, 588, 12, 3353, 16, 2667, 16, 26987, 74, 67, 2232, 16, 4764, 33, 8381, 16, 26409, 12938, 4672, 1930, 2395, 9811, 4422, 18, 8837, 2668, 4025, 380, 628, 26987, 74, 67, 9653, 162...
'pnmimagetypes_composite.obj', 'pnmimagetypes_pnmFileTypePNG.obj', 'pnmimagetypes_pnmFileTypeTIFF.obj',
'pnmimagetypes_composite.obj',
def CreatePandaVersionFiles(): version1=int(VERSION.split(".")[0]) version2=int(VERSION.split(".")[1]) version3=int(VERSION.split(".")[2]) nversion=version1*1000000+version2*1000+version3 pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1)) pandaversion_h = pandaversion_h.replace("VERSION2",str(version2)) pandaversion_h = pandaversion_h.replace("VERSION3",str(version3)) pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion)) checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3)) checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion)) checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1)) checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2)) checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3)) checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion)) ConditionalWriteFile('built/include/pandaVersion.h', pandaversion_h) ConditionalWriteFile('built/include/checkPandaVersion.cxx', checkpandaversion_cxx) ConditionalWriteFile('built/include/checkPandaVersion.h', checkpandaversion_h) if (OMIT.count("PYTHON")==0): ConditionalWriteFile("built/tmp/pythonversion", os.path.basename(PYTHONSDK)) ConditionalWriteFile("built/tmp/null.cxx","")
a20a220e47917af619d7b2113fc7b38ba9301800 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/a20a220e47917af619d7b2113fc7b38ba9301800/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 23, ...
return retval.view(recarray)
res = retval.view(recarray) res.dtype = sb.dtype((record, res.dtype)) return res
def fromrecords(recList, formats=None, names=None, titles=None, shape=None, aligned=0): """ create a recarray from a list of records in text form The data in the same field can be heterogeneous, they will be promoted to the highest data type. This method is intended for creating smaller record arrays. If used to create large array without formats defined r=fromrecords([(2,3.,'abc')]*100000) it can be slow. If formats is None, then this will auto-detect formats. Use list of tuples rather than list of lists for faster processing. >>> r=fromrecords([(456,'dbe',1.2),(2,'de',1.3)],names='col1,col2,col3') >>> print r[0] (456, 'dbe', 1.2) >>> r.col1 array([456, 2]) >>> r.col2 chararray(['dbe', 'de']) >>> import cPickle >>> print cPickle.loads(cPickle.dumps(r)) recarray[ (456, 'dbe', 1.2), (2, 'de', 1.3) ] """ nfields = len(recList[0]) if formats is None: # slower obj = sb.array(recList,dtype=object) arrlist = [sb.array(obj[...,i].tolist()) for i in xrange(nfields)] return fromarrays(arrlist, formats=formats, shape=shape, names=names, titles=titles, aligned=aligned) parsed = format_parser(formats, names, titles, aligned) try: retval = sb.array(recList, dtype = parsed._descr) except TypeError: # list of lists instead of list of tuples if (shape is None or shape == 0): shape = len(recList) if isinstance(shape, (int, long)): shape = (shape,) if len(shape) > 1: raise ValueError, "Can only deal with 1-d array." _array = recarray(shape, parsed._descr) for k in xrange(_array.size): _array[k] = tuple(recList[k]) return _array else: if shape is not None and retval.shape != shape: retval.shape = shape return retval.view(recarray)
ca90e3eba3c94de3bd13266ccfd9f96dbf23693a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/ca90e3eba3c94de3bd13266ccfd9f96dbf23693a/records.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 7094, 12, 3927, 682, 16, 6449, 33, 7036, 16, 1257, 33, 7036, 16, 14693, 33, 7036, 16, 2179, 33, 7036, 16, 13939, 33, 20, 4672, 3536, 752, 279, 1950, 1126, 628, 279, 666, 434, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 7094, 12, 3927, 682, 16, 6449, 33, 7036, 16, 1257, 33, 7036, 16, 14693, 33, 7036, 16, 2179, 33, 7036, 16, 13939, 33, 20, 4672, 3536, 752, 279, 1950, 1126, 628, 279, 666, 434, 38...
cr.execute('update "' + self._table + '" set ' + \ string.join(upd0, ',') + ' where id = %s', upd1)
if upd0 and upd1: cr.execute('update "' + self._table + '" set ' + \ string.join(upd0, ',') + ' where id = %s', upd1)
def _store_set_values(self, cr, uid, ids, fields, context): field_flag = False field_dict = {} if self._log_access: cr.execute('select id,write_date from '+self._table+' where id in ('+','.join(map(str, ids))+')') res = cr.fetchall() for r in res: if r[1]: field_dict.setdefault(r[0], []) res_date = time.strptime((r[1])[:19], '%Y-%m-%d %H:%M:%S') write_date = datetime.datetime.fromtimestamp(time.mktime(res_date)) for i in self.pool._store_function.get(self._name, []): if i[5]: up_write_date = write_date + datetime.timedelta(hours=i[5]) if datetime.datetime.now() < up_write_date: if i[1] in fields: field_dict[r[0]].append(i[1]) if not field_flag: field_flag = True todo = {} keys = [] for f in fields: if self._columns[f]._multi not in keys: keys.append(self._columns[f]._multi) todo.setdefault(self._columns[f]._multi, []) todo[self._columns[f]._multi].append(f) for key in keys: val = todo[key] if key: # uid == 1 for accessing objects having rules defined on store fields result = self._columns[val[0]].get(cr, self, ids, val, 1, context=context) for id,value in result.items(): if field_flag: for f in value.keys(): if f in field_dict[id]: value.pop(f) upd0 = [] upd1 = [] for v in value: if v not in val: continue if self._columns[v]._type in ('many2one', 'one2one'): try: value[v] = value[v][0] except: pass upd0.append('"'+v+'"='+self._columns[v]._symbol_set[0]) upd1.append(self._columns[v]._symbol_set[1](value[v])) upd1.append(id) cr.execute('update "' + self._table + '" set ' + \ string.join(upd0, ',') + ' where id = %s', upd1)
ee854ffcf19de888170d8a9fc62b7664f8b82b3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ee854ffcf19de888170d8a9fc62b7664f8b82b3a/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2233, 67, 542, 67, 2372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 16, 819, 4672, 652, 67, 6420, 273, 1083, 652, 67, 1576, 273, 2618, 309, 365, 6315, 1330, 67, 3860, 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, 389, 2233, 67, 542, 67, 2372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 16, 819, 4672, 652, 67, 6420, 273, 1083, 652, 67, 1576, 273, 2618, 309, 365, 6315, 1330, 67, 3860, 30,...
last_modifed = models.DateTimeField(_('Last modified'), auto_now_add=True)
last_modified = models.DateTimeField(_('Last modified'), auto_now_add=True)
def __unicode__(self): if self.comment is not None: return smart_unicode("%s: %s" % (self.date, self.comment)) else: return smart_unicode(self.date)
99411e46f370ea53351bc1feb3c86553e0e9d8a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12178/99411e46f370ea53351bc1feb3c86553e0e9d8a8/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9124, 972, 12, 2890, 4672, 309, 365, 18, 3469, 353, 486, 599, 30, 327, 13706, 67, 9124, 27188, 87, 30, 738, 87, 6, 738, 261, 2890, 18, 712, 16, 365, 18, 3469, 3719, 469, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9124, 972, 12, 2890, 4672, 309, 365, 18, 3469, 353, 486, 599, 30, 327, 13706, 67, 9124, 27188, 87, 30, 738, 87, 6, 738, 261, 2890, 18, 712, 16, 365, 18, 3469, 3719, 469, 30, ...
P.show()
plt.show()
def plot_overlap(n): # Select an overlapping pixel and highlight it p1 = grid1[n] p2 = grid2[n] overlap = zip(*ext.poly_clip(p2.x, p2.y, p1.x.min(), p1.x.max(), p1.y.max(), p1.y.min())) ax = P.subplot(121) ax.add_patch(patches.Polygon(zip(p1.x,p1.y), facecolor=[0.7, 0.7, 0.9])) ax.add_patch(patches.Polygon(zip(p2.x,p2.y), facecolor=[0.9, 0.8, 0.9])) ax.add_patch(patches.Polygon(overlap, facecolor=[0.3,0.9,0.3])) plotgrid(ax, grid1, 'r-') plotgrid(ax, grid2, 'b-') ax.axis('equal') ax.set_xticks([]) ax.set_yticks([]) ax.axis([-2,12,-2,12]) f = P.subplot(122).get_frame()
e9d82bbc4a98399d2df9e6423312d38dffca7d73 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12843/e9d82bbc4a98399d2df9e6423312d38dffca7d73/gridoverlap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 17946, 12, 82, 4672, 468, 6766, 392, 18620, 4957, 471, 8839, 518, 293, 21, 273, 3068, 21, 63, 82, 65, 293, 22, 273, 3068, 22, 63, 82, 65, 7227, 273, 3144, 30857, 408, 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, 3207, 67, 17946, 12, 82, 4672, 468, 6766, 392, 18620, 4957, 471, 8839, 518, 293, 21, 273, 3068, 21, 63, 82, 65, 293, 22, 273, 3068, 22, 63, 82, 65, 7227, 273, 3144, 30857, 408, 18, ...
if image_re.match(urlTuple[3][-4:]): return '%s %s %s' % (method, blocked or self.block_image, 'image/gif')
if blocked: doc = blocked elif image_re.match(urlTuple[3][-4:]): doc = self.block_image
def doit (self, data, **args): debug(FILTER, "block filter working on %s", `data`) splitted = data.split() if len(splitted)!=3: error(FILTER, "invalid request: %s", `data`) return data method,url,protocol = splitted urlTuple = list(urlparse.urlparse(url)) netloc = urlTuple[1] s = netloc.split(":") if len(s)==2: urlTuple[1:2] = s else: urlTuple[1:2] = [netloc,80] if self.allowed(urlTuple): return data blocked = self.strict_whitelist or self.blocked(urlTuple) if blocked is not None: debug(FILTER, "blocked url %s", url) # index 3, not 2! if image_re.match(urlTuple[3][-4:]): return '%s %s %s' % (method, blocked or self.block_image, 'image/gif') else: # XXX hmmm, what about CGI images? # make HTTP HEAD request? return '%s %s %s' % (method, blocked or self.block_url, 'text/html') return data
ae583cb21e7ac3b4e5a9b35d754719b5c63beaa1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/ae583cb21e7ac3b4e5a9b35d754719b5c63beaa1/Blocker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 305, 261, 2890, 16, 501, 16, 2826, 1968, 4672, 1198, 12, 11126, 16, 315, 2629, 1034, 5960, 603, 738, 87, 3113, 1375, 892, 24065, 17687, 273, 501, 18, 4939, 1435, 309, 562, 12, 493...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 305, 261, 2890, 16, 501, 16, 2826, 1968, 4672, 1198, 12, 11126, 16, 315, 2629, 1034, 5960, 603, 738, 87, 3113, 1375, 892, 24065, 17687, 273, 501, 18, 4939, 1435, 309, 562, 12, 493...
doc = minidom.getDOMImplementation().createDocument(None, "D:multistatus", None)
doc = minidom.getDOMImplementation().createDocument(None, "multistatus", None)
def make_xmlresponse(result): """ construct a response from a dict of uri:error_code elements """ doc = minidom.getDOMImplementation().createDocument(None, "D:multistatus", None) doc.documentElement.setAttribute("xmlns:D","DAV:") for el,ec in result.items(): re=doc.createElementNS("DAV:","response") hr=doc.createElementNS("DAV:","href") st=doc.createElementNS("DAV:","status") huri=doc.createTextNode(quote_uri(el)) t=doc.createTextNode(gen_estring(ec)) st.appendChild(t) hr.appendChild(huri) re.appendChild(hr) re.appendChild(st) doc.documentElement.appendChild(re) return doc.toxml(encoding="utf-8")
ce7e152b5d6868c0a5658968edcc5ca83058e334 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4009/ce7e152b5d6868c0a5658968edcc5ca83058e334/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2902, 2740, 12, 2088, 4672, 3536, 4872, 279, 766, 628, 279, 2065, 434, 2003, 30, 1636, 67, 710, 2186, 3536, 997, 273, 1131, 350, 362, 18, 588, 8168, 13621, 7675, 2640, 2519, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2902, 2740, 12, 2088, 4672, 3536, 4872, 279, 766, 628, 279, 2065, 434, 2003, 30, 1636, 67, 710, 2186, 3536, 997, 273, 1131, 350, 362, 18, 588, 8168, 13621, 7675, 2640, 2519, ...
pass
return _completer_delims
def get_completer_delims(): pass
24d3df536f1a55ecda3dd9e7f94f30c1a507dddb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6753/24d3df536f1a55ecda3dd9e7f94f30c1a507dddb/readline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 832, 17754, 67, 3771, 12097, 13332, 327, 389, 832, 17754, 67, 3771, 12097, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 832, 17754, 67, 3771, 12097, 13332, 327, 389, 832, 17754, 67, 3771, 12097, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
@dec.knownfailureif(is_longdouble_finfo_bogus(), "Bogus floating-point information for long doubles")
@dec.knownfailureif(is_longdouble_finfo_bogus(), "Bogus long double finfo")
def test_loss_of_precision(self): for dtype in [np.complex64, np.complex_]: yield self.check_loss_of_precision, dtype
a122b90e7b952dd4a1cbf1753aaf753d53f29487 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/a122b90e7b952dd4a1cbf1753aaf753d53f29487/test_umath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7873, 67, 792, 67, 14548, 12, 2890, 4672, 364, 3182, 316, 306, 6782, 18, 14259, 1105, 16, 1130, 18, 14259, 67, 14542, 2824, 365, 18, 1893, 67, 7873, 67, 792, 67, 14548, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7873, 67, 792, 67, 14548, 12, 2890, 4672, 364, 3182, 316, 306, 6782, 18, 14259, 1105, 16, 1130, 18, 14259, 67, 14542, 2824, 365, 18, 1893, 67, 7873, 67, 792, 67, 14548, 16, ...
ProductSchema.add_field('partner_email', validators.Email())
ProductSchema.add_field('partner_email', validators.Email()) ProductSchema.add_field('partner_mobile', validators.String())
def _generate_product_schema(self): # Since the form is arbitrarily defined by what product types there are, the validation # (aka schema) also needs to be dynamic. # Thus, this function generates a dynamic schema to validate a given set of products. # class ProductSchema(BaseSchema): # This schema is used to validate the products submitted by the form. # It is populated below # EG: # ProductSchema.add_field('count', validators.Int(min=1, max=100)) # is the same as doing this inline: # count = validators.Int(min=1, max=100) # 2009-05-07 Josh H: Not sure why, but there is a reason this class is declaired within this method and not earlier on like in the voucher controller. Or maybe I just did this poorly... pass ProductSchema.add_field('partner_email', validators.Email()) # placed here so prevalidator can refer to it. This means we need a hacky method to save it :S # Go through each category and each product and add generic validation for category in c.product_categories: clean_cat_name = category.clean_name()
608339703662e62c0bf48c6c77494ba74af2d217 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12856/608339703662e62c0bf48c6c77494ba74af2d217/registration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 67, 5896, 67, 4821, 12, 2890, 4672, 468, 7897, 326, 646, 353, 10056, 86, 10243, 2553, 635, 4121, 3017, 1953, 1915, 854, 16, 326, 3379, 468, 282, 261, 581, 69, 1963, 13, 2546...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7163, 67, 5896, 67, 4821, 12, 2890, 4672, 468, 7897, 326, 646, 353, 10056, 86, 10243, 2553, 635, 4121, 3017, 1953, 1915, 854, 16, 326, 3379, 468, 282, 261, 581, 69, 1963, 13, 2546...
try: ret = ol.new(q, comment='initial import') except: print q raise
for attempt in range(5): if attempt > 0: print 'retrying' try: ret = ol.new(q, comment='initial import') except httplib.BadStatusLine: sleep(10) continue except: print q raise break
def write_edition(loc, edition): add_lang(edition) q = build_query(loc, edition) authors = [] for a in q.get('authors', []): if 'key' in a: authors.append({'key': a['key']}) else: try: ret = ol.new(a, comment='new author') except: print a raise print 'ret:', ret assert isinstance(ret, basestring)
c86afd92e42ac258f8c92f39004f46439ca07c68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3913/c86afd92e42ac258f8c92f39004f46439ca07c68/import_marc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 329, 608, 12, 1829, 16, 28432, 4672, 527, 67, 4936, 12, 329, 608, 13, 1043, 273, 1361, 67, 2271, 12, 1829, 16, 28432, 13, 14494, 273, 5378, 364, 279, 316, 1043, 18, 588, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 329, 608, 12, 1829, 16, 28432, 4672, 527, 67, 4936, 12, 329, 608, 13, 1043, 273, 1361, 67, 2271, 12, 1829, 16, 28432, 13, 14494, 273, 5378, 364, 279, 316, 1043, 18, 588, 26...
self.encs[self.filename] = content[19:]
self.enc = content[19:]
def startElement(self, name, attrs):
46150b618daa12147dcf6582726c44fc81523cee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6851/46150b618daa12147dcf6582726c44fc81523cee/obfusmail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 12, 2890, 16, 508, 16, 3422, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 12, 2890, 16, 508, 16, 3422, 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,...
if "profile" in sys.argv[1:]:
if False:
def main(): app = QApplication(sys.argv) cr = Jello() cr.app = app app.setMainWidget(cr) cr.show() cr.update() app.exec_loop()
a345b3a7256c53c6d1e33b9e6f4af9771ffc75e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/a345b3a7256c53c6d1e33b9e6f4af9771ffc75e7/jello.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 595, 273, 2238, 3208, 12, 9499, 18, 19485, 13, 4422, 273, 804, 8996, 1435, 4422, 18, 2910, 273, 595, 595, 18, 542, 6376, 4609, 12, 3353, 13, 4422, 18, 4500, 1435, 4422, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 595, 273, 2238, 3208, 12, 9499, 18, 19485, 13, 4422, 273, 804, 8996, 1435, 4422, 18, 2910, 273, 595, 595, 18, 542, 6376, 4609, 12, 3353, 13, 4422, 18, 4500, 1435, 4422, 18...
1/(1 - (1/r))
1/(1 - 1/r)
def _repr_(self, simplify=True): """ TESTS: sage: a = (1-1/r)^(-1); a 1/(1 - (1/r)) sage: a.derivative(r) -1/((1 - (1/r))^2*r^2)
c01bc61bd25d9363f0356f86672ff77562a9b5da /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c01bc61bd25d9363f0356f86672ff77562a9b5da/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 16, 16499, 33, 5510, 4672, 3536, 22130, 55, 30, 272, 410, 30, 279, 273, 261, 21, 17, 21, 19, 86, 13, 66, 19236, 21, 1769, 279, 404, 19, 12, 21, 300, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 16, 16499, 33, 5510, 4672, 3536, 22130, 55, 30, 272, 410, 30, 279, 273, 261, 21, 17, 21, 19, 86, 13, 66, 19236, 21, 1769, 279, 404, 19, 12, 21, 300, 404, ...
qty)[res['base_pricelist_id']]
qty, context=context)[res['base_pricelist_id']]
def _create_parent_category_list(id, lst): if not id: return [] parent = product_category_tree.get(id) if parent: lst.append(parent) return _create_parent_category_list(parent, lst) else: return lst
94fb037ba42700d5d1fedf44ce1aeaa61c6ad90a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/94fb037ba42700d5d1fedf44ce1aeaa61c6ad90a/pricelist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 2938, 67, 4743, 67, 1098, 12, 350, 16, 9441, 4672, 309, 486, 612, 30, 327, 5378, 982, 273, 3017, 67, 4743, 67, 3413, 18, 588, 12, 350, 13, 309, 982, 30, 9441, 18, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 2938, 67, 4743, 67, 1098, 12, 350, 16, 9441, 4672, 309, 486, 612, 30, 327, 5378, 982, 273, 3017, 67, 4743, 67, 3413, 18, 588, 12, 350, 13, 309, 982, 30, 9441, 18, 69...
print output
def mkfs(self, fstype=None, args='', record=True): """ Format a partition to fstype """ if list_mount_devices().count(self.device): raise NameError('Attempted to format mounted device')
6b5073dd62649753a49ef1349fe0c2acb6707b07 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/6b5073dd62649753a49ef1349fe0c2acb6707b07/partition.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5028, 2556, 12, 2890, 16, 20223, 388, 33, 7036, 16, 833, 2218, 2187, 1409, 33, 5510, 4672, 3536, 4077, 279, 3590, 358, 20223, 388, 3536, 309, 666, 67, 4778, 67, 12506, 7675, 1883, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5028, 2556, 12, 2890, 16, 20223, 388, 33, 7036, 16, 833, 2218, 2187, 1409, 33, 5510, 4672, 3536, 4077, 279, 3590, 358, 20223, 388, 3536, 309, 666, 67, 4778, 67, 12506, 7675, 1883, 12, ...
octperms = oct(targetperms)
def checkwalk(arg, dirname, names): # Short-circuit duplicates if seen.has_key(dirname): return seen[dirname] = True for name in names: path = os.path.join(dirname, name) if arg.VERBOSE: print _(' checking gid and mode for $path') try: mode, gid = statgidmode(path) except OSError, e: if e.errno <> errno.ENOENT: raise continue if gid <> MAILMAN_GID: try: groupname = getgrgid(gid)[0] except KeyError: groupname = '<anon gid %d>' % gid arg.ERRORS += 1 print _( '$path bad group (has: $groupname, expected $MAILMAN_GROUP)'), if STATE.FIX: print _('(fixing)') os.chown(path, -1, MAILMAN_GID) else: print # All directories must be at least rwxrwsr-x. Don't check the private # archive directory or database directory themselves since these are # checked in checkarchives() and checkarchivedbs() below. private = config.PRIVATE_ARCHIVE_FILE_DIR if path == private or (os.path.commonprefix((path, private)) == private and os.path.split(path)[1] == 'database'): continue # The directories under qfiles should have a more limited permission if os.path.commonprefix((path, config.QUEUE_DIR)) == config.QUEUE_DIR: targetperms = QFILEPERMS octperms = oct(targetperms) else: targetperms = DIRPERMS octperms = oct(targetperms) if S_ISDIR(mode) and (mode & targetperms) <> targetperms: arg.ERRORS += 1 print _('directory permissions must be $octperms: $path'), if STATE.FIX: print _('(fixing)') os.chmod(path, mode | targetperms) else: print elif os.path.splitext(path)[1] in ('.py', '.pyc', '.pyo'): octperms = oct(PYFILEPERMS) if mode & PYFILEPERMS <> PYFILEPERMS: print _('source perms must be $octperms: $path'), arg.ERRORS += 1 if STATE.FIX: print _('(fixing)') os.chmod(path, mode | PYFILEPERMS) else: print elif path.endswith('-article'): # Article files must be group writeable octperms = oct(ARTICLEFILEPERMS) if mode & ARTICLEFILEPERMS <> ARTICLEFILEPERMS: print _('article db files must be $octperms: $path'), arg.ERRORS += 1 if STATE.FIX: print _('(fixing)') os.chmod(path, mode | ARTICLEFILEPERMS) else: print
31129a667ef55b89ec0a0be920d80a9e31409664 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2120/31129a667ef55b89ec0a0be920d80a9e31409664/check_perms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 11348, 12, 3175, 16, 4283, 16, 1257, 4672, 468, 7925, 17, 24987, 11211, 309, 5881, 18, 5332, 67, 856, 12, 12287, 4672, 327, 5881, 63, 12287, 65, 273, 1053, 364, 508, 316, 1257, 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, 866, 11348, 12, 3175, 16, 4283, 16, 1257, 4672, 468, 7925, 17, 24987, 11211, 309, 5881, 18, 5332, 67, 856, 12, 12287, 4672, 327, 5881, 63, 12287, 65, 273, 1053, 364, 508, 316, 1257, 30...
if os.path.exists(self.floppy_img): os.remove(self.floppy_img) c_cmd = '%s create -f raw %s 1440k' % (self.qemu_img_bin, self.floppy_img)
if os.path.exists(self.floppy): os.remove(self.floppy) c_cmd = '%s create -f raw %s 1440k' % (self.qemu_img_binary, self.floppy)
def create_boot_floppy(self): """ Prepares a boot floppy by creating a floppy image file, mounting it and copying an answer file (kickstarts for RH based distros, answer files for windows) to it. After that the image is umounted. """ print "Creating boot floppy"
d245408f9a2fd5877bf4770afc7b97ad08147815 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/d245408f9a2fd5877bf4770afc7b97ad08147815/unattended.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7137, 67, 74, 16884, 2074, 12, 2890, 4672, 3536, 2962, 84, 4807, 279, 4835, 284, 16884, 2074, 635, 4979, 279, 284, 16884, 2074, 1316, 585, 16, 5344, 310, 518, 471, 8933, 392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7137, 67, 74, 16884, 2074, 12, 2890, 4672, 3536, 2962, 84, 4807, 279, 4835, 284, 16884, 2074, 635, 4979, 279, 284, 16884, 2074, 1316, 585, 16, 5344, 310, 518, 471, 8933, 392, ...
Either upload a message file: <input type='file' name='file'><br> Or paste the whole message (incuding headers) here:<br> <textarea name='text' rows='3' cols='60'></textarea><br> Is this message <input type='radio' name='which' value='ham'>Ham</input> or <input type='radio' name='which' value='spam' checked>Spam</input>?<br> <input type='submit' value='Train on this message'> </form>""" def __init__(self, clientSocket, bayes): BrighterAsyncChat.__init__(self, clientSocket)
Either upload a message file: <input type='file' name='file' value=''><br> Or paste the whole message (incuding headers) here:<br> <textarea name='text' rows='3' cols='60'></textarea><br> %s </form>""" uploadSumbit = """<input type='submit' name='which' value='%s'>""" train = upload % ('train', (uploadSumbit % "Train as Spam") + "&nbsp;" + \ (uploadSumbit % "Train as Ham")) classify = upload % ('classify', uploadSumbit % "Classify") def __init__(self, clientSocket, bayes, socketMap=asyncore.socket_map): BrighterAsyncChat.__init__(self) BrighterAsyncChat.set_socket(self, clientSocket, socketMap)
def __init__(self, uiPort, bayes): uiArgs = (bayes,) Listener.__init__(self, uiPort, UserInterface, uiArgs)
687201dd0422d531b52815cedabcca48f312f1ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/687201dd0422d531b52815cedabcca48f312f1ba/pop3proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 324, 528, 281, 4672, 5915, 2615, 273, 261, 70, 528, 281, 16, 13, 10652, 16186, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 21369, 16, 5915, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 324, 528, 281, 4672, 5915, 2615, 273, 261, 70, 528, 281, 16, 13, 10652, 16186, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 21369, 16, 5915, ...
self.start_server() self.stop_server(True, False)
self.stop_server(None, True, False) self.start_server(None, True)
def restart_server(self): """ Restarts the Twisted server. """
10ae0026350bb29ab0641b3c5ea3f1575c17cd74 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/943/10ae0026350bb29ab0641b3c5ea3f1575c17cd74/uigtk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7870, 67, 3567, 12, 2890, 4672, 3536, 20709, 87, 326, 12694, 25444, 1438, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7870, 67, 3567, 12, 2890, 4672, 3536, 20709, 87, 326, 12694, 25444, 1438, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
context.invokeFactory('Booking', id=str(idx), title=title, hours=hours, minutes=minutes, description=description, bookingDate=day)
booking_id = context.invokeFactory( 'Booking', id=str(idx), title=title, hours=hours, minutes=minutes, description=description, bookingDate=day) obj = context.get(booking_id) obj.unmarkCreationFlag()
... def objectIds(self):
11b478972152a15fce1de03ba52e6a7774bb2569 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10444/11b478972152a15fce1de03ba52e6a7774bb2569/add.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 733, 2673, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 733, 2673, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
"""Returns string items"""
"""Returns a string item or None"""
def __getitem__(self, index): """Returns string items""" if index >= self.size: raise StopIteration if idaapi.get_strlist_item(index, self._si): return Strings.StringItem(self._si) return None
92c66d4f2422559aa676c8bf3e76f2f7bd45c7d3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3410/92c66d4f2422559aa676c8bf3e76f2f7bd45c7d3/idautils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 770, 4672, 3536, 1356, 279, 533, 761, 578, 599, 8395, 309, 770, 1545, 365, 18, 1467, 30, 1002, 16179, 309, 612, 69, 2425, 18, 588, 67, 701, 1098, 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, 1001, 31571, 972, 12, 2890, 16, 770, 4672, 3536, 1356, 279, 533, 761, 578, 599, 8395, 309, 770, 1545, 365, 18, 1467, 30, 1002, 16179, 309, 612, 69, 2425, 18, 588, 67, 701, 1098, 67, ...
if( mod.startswith( "enstaller" ) and (mod in sys.modules.keys()) ) :
if( (mod.startswith( "enstaller" ) or mod.startswith( "enthought.enstaller" )) and (mod in sys.modules.keys()) ) :
def _bootstrap( self ) : """ Downloads the latest Enstaller egg to a temp directory to access its bootstrap code, where the bootstrap code will then handle the formal installation of Enstaller and all necessary dependencies.
4d61807760965f137bb4259f2347c38da59949e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7707/4d61807760965f137bb4259f2347c38da59949e5/ez_enstaller_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12722, 12, 365, 262, 294, 3536, 13059, 87, 326, 4891, 1374, 3429, 264, 25144, 358, 279, 1906, 1867, 358, 2006, 2097, 7065, 981, 16, 1625, 326, 7065, 981, 903, 1508, 1640, 326, 25739...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12722, 12, 365, 262, 294, 3536, 13059, 87, 326, 4891, 1374, 3429, 264, 25144, 358, 279, 1906, 1867, 358, 2006, 2097, 7065, 981, 16, 1625, 326, 7065, 981, 903, 1508, 1640, 326, 25739...
useSSL=False, repositoryView=None):
useSSL=False, repositoryView=None):
def __init__(self, host=None, port=None, username=None, password=None, useSSL=False, repositoryView=None): super(ChandlerServerHandle, self).__init__(host=host, port=port, username=username, password=password, useSSL=useSSL) if useSSL and repositoryView != None: self.factory.startTLS = True # Starts SSL immediately. # zanshin.webdav is already smart enough to set up a wrapping # factory if it can find M2Crypto. However, to do certificate # verification, it needs the following customizations (e.g., # to check the user's certstore for trusted certs). if self.factory.sslContextFactory == None: verifyCallback = ssl._VerifyCallback(repositoryView) self.factory.getContext = lambda: \ ssl.getContext(repositoryView=repositoryView, verifyCallback=verifyCallback) self.factory.sslChecker = ssl.postConnectionCheck
7010103423b8abc8d70e2c523218d1504b0c18e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/7010103423b8abc8d70e2c523218d1504b0c18e0/WebDAV.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 33, 7036, 16, 1756, 33, 7036, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 999, 6745, 33, 8381, 16, 3352, 1767, 33, 7036, 4672, 225, 2240, 12, 782...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1479, 33, 7036, 16, 1756, 33, 7036, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 999, 6745, 33, 8381, 16, 3352, 1767, 33, 7036, 4672, 225, 2240, 12, 782...
if self.args.has_key('delete'):
if not self.args.has_key('cancel'):
def delete_report(self, id): self.perm.assert_permission(perm.REPORT_DELETE)
5e8e0422246437cc2f84ac34bf4e22bc8067b18e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5e8e0422246437cc2f84ac34bf4e22bc8067b18e/Report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 6006, 12, 2890, 16, 612, 4672, 365, 18, 12160, 18, 11231, 67, 9827, 12, 12160, 18, 22710, 67, 6460, 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, 1430, 67, 6006, 12, 2890, 16, 612, 4672, 365, 18, 12160, 18, 11231, 67, 9827, 12, 12160, 18, 22710, 67, 6460, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
vt.checkin(object)
vt.checkin(object, message)
def unlock(self, object): '''Unlocks an object''' locker = self.locker(object) if not locker: raise LockingError, ("Unlocking an unlocked item: %s" % pathOf(object))
95dcd171d8584ce2c80b49ea965cff02c2b7b528 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/95dcd171d8584ce2c80b49ea965cff02c2b7b528/LockTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7186, 12, 2890, 16, 733, 4672, 9163, 7087, 87, 392, 733, 26418, 28152, 273, 365, 18, 739, 264, 12, 1612, 13, 309, 486, 28152, 30, 1002, 3488, 310, 668, 16, 7566, 7087, 310, 392, 25966,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7186, 12, 2890, 16, 733, 4672, 9163, 7087, 87, 392, 733, 26418, 28152, 273, 365, 18, 739, 264, 12, 1612, 13, 309, 486, 28152, 30, 1002, 3488, 310, 668, 16, 7566, 7087, 310, 392, 25966,...
def BuildExcerpts (self, docs, index, words, opts={}):
def BuildExcerpts (self, docs, index, words, opts=None):
def BuildExcerpts (self, docs, index, words, opts={}): """ connect to searchd server and generate exceprts from given documents
11587961f6bb176bc0da442100898f2a5ee74ce0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5754/11587961f6bb176bc0da442100898f2a5ee74ce0/sphinxapi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3998, 424, 2750, 1092, 261, 2890, 16, 3270, 16, 770, 16, 4511, 16, 1500, 33, 7036, 4672, 3536, 3077, 358, 1623, 72, 1438, 471, 2103, 431, 311, 683, 3428, 628, 864, 7429, 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, 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, 3998, 424, 2750, 1092, 261, 2890, 16, 3270, 16, 770, 16, 4511, 16, 1500, 33, 7036, 4672, 3536, 3077, 358, 1623, 72, 1438, 471, 2103, 431, 311, 683, 3428, 628, 864, 7429, 2, -100, -100,...
self.ax.semilogy(x, y*normalization, symbol + color, label=label)
self.ax.plot(x, y*normalization, symbol + color, label=label)
def finalize(self, num_bins=20, normalization=1): epsilon = 1e-8
5b46d4663d8d449bf087b6ead4c29d32311db905 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/5b46d4663d8d449bf087b6ead4c29d32311db905/plotutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 12, 2890, 16, 818, 67, 11862, 33, 3462, 16, 13728, 33, 21, 4672, 12263, 273, 404, 73, 17, 28, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 12, 2890, 16, 818, 67, 11862, 33, 3462, 16, 13728, 33, 21, 4672, 12263, 273, 404, 73, 17, 28, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
try: fname, outfn = render_dot(self, code, options, 'png', prefix)
format = self.builder.config.graphviz_output_format try: if format not in ('png', 'svg'): raise GraphvizError("graphviz_output_format must be one of 'png', " "'svg', but is %r" % format) fname, outfn = render_dot(self, code, options, format, prefix)
def render_dot_html(self, node, code, options, prefix='graphviz', imgcls=None): try: fname, outfn = render_dot(self, code, options, 'png', prefix) except GraphvizError, exc: self.builder.warn('dot code %r: ' % code + str(exc)) raise nodes.SkipNode self.body.append(self.starttag(node, 'p', CLASS='graphviz')) if fname is None: self.body.append(self.encode(code)) else: mapfile = open(outfn + '.map', 'rb') try: imgmap = mapfile.readlines() finally: mapfile.close() imgcss = imgcls and 'class="%s"' % imgcls or '' if len(imgmap) == 2: # nothing in image map (the lines are <map> and </map>) self.body.append('<img src="%s" alt="%s" %s/>\n' % (fname, self.encode(code).strip(), imgcss)) else: # has a map: get the name of the map and connect the parts mapname = mapname_re.match(imgmap[0]).group(1) self.body.append('<img src="%s" alt="%s" usemap="#%s" %s/>\n' % (fname, self.encode(code).strip(), mapname, imgcss)) self.body.extend(imgmap) self.body.append('</p>\n') raise nodes.SkipNode
d32bd22ae78cf14622476b41b238df7ccff25064 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/d32bd22ae78cf14622476b41b238df7ccff25064/graphviz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 9811, 67, 2620, 12, 2890, 16, 756, 16, 981, 16, 702, 16, 1633, 2218, 4660, 23167, 2187, 3774, 6429, 33, 7036, 4672, 740, 273, 365, 18, 9574, 18, 1425, 18, 4660, 23167, 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, 1743, 67, 9811, 67, 2620, 12, 2890, 16, 756, 16, 981, 16, 702, 16, 1633, 2218, 4660, 23167, 2187, 3774, 6429, 33, 7036, 4672, 740, 273, 365, 18, 9574, 18, 1425, 18, 4660, 23167, 67, ...
format = format.replace('.jpg', '.jpeg')
format = { '.jpg' : '.jpeg', '.htm' : '.html', '.tif' : '.tiff' }.get(format, format)
def normalize_format(format): """Normalize the format.""" if format and format[0] != '.': format = '.' + format if CFG_BIBDOCFILE_STRONG_FORMAT_NORMALIZATION: if format not in ('.Z', '.H', '.C', '.CC'): format = format.lower() format = format.replace('.jpg', '.jpeg') return format
1a2db681bfa617f025e8542d264b3fefe1734a88 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/1a2db681bfa617f025e8542d264b3fefe1734a88/bibdocfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 67, 2139, 12, 2139, 4672, 3536, 14380, 326, 740, 12123, 309, 740, 471, 740, 63, 20, 65, 480, 2611, 30, 740, 273, 2611, 397, 740, 309, 7577, 67, 38, 13450, 19693, 3776, 67, 3902, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 67, 2139, 12, 2139, 4672, 3536, 14380, 326, 740, 12123, 309, 740, 471, 740, 63, 20, 65, 480, 2611, 30, 740, 273, 2611, 397, 740, 309, 7577, 67, 38, 13450, 19693, 3776, 67, 3902, ...
paramsDict['OutputSandbox']['value']=extraFiles paramsDict['OutputSandbox']['type']='JDL'
paramsDict['OutputSandbox']['value'] = extraFiles paramsDict['OutputSandbox']['type'] = 'JDL'
def _toJDL(self,xmlFile=''): #messy but need to account for xml file being in /tmp/guid dir """Creates a JDL representation of itself as a Job. """ #Check if we have to do old bootstrap... classadJob = ClassAd('[]')
50b3322668816ba92ea3f9b253d993dc34c53a21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/50b3322668816ba92ea3f9b253d993dc34c53a21/Job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 46, 8914, 12, 2890, 16, 2902, 812, 2218, 11, 4672, 468, 81, 403, 93, 1496, 1608, 358, 2236, 364, 2025, 585, 3832, 316, 342, 5645, 19, 14066, 1577, 3536, 2729, 279, 804, 8914,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 46, 8914, 12, 2890, 16, 2902, 812, 2218, 11, 4672, 468, 81, 403, 93, 1496, 1608, 358, 2236, 364, 2025, 585, 3832, 316, 342, 5645, 19, 14066, 1577, 3536, 2729, 279, 804, 8914,...
print >>sys.stderr, error_msg
logging.error(error_msg)
def main(): """ Find all ExternalPackage classes defined in this file and ask them to fetch, build and install themselves. """ logging_manager.configure_logging(BuildExternalsLoggingConfig(), verbose=True) os.umask(022) top_of_tree = external_packages.find_top_of_autotest_tree() package_dir = os.path.join(top_of_tree, PACKAGE_DIR) install_dir = os.path.join(top_of_tree, INSTALL_DIR) # Make sure the install_dir is in our python module search path # as well as the PYTHONPATH being used by all our setup.py # install subprocesses. if install_dir not in sys.path: sys.path.insert(0, install_dir) env_python_path_varname = 'PYTHONPATH' env_python_path = os.environ.get(env_python_path_varname, '') if install_dir+':' not in env_python_path: os.environ[env_python_path_varname] = ':'.join([ install_dir, env_python_path]) fetched_packages, fetch_errors = fetch_necessary_packages(package_dir, install_dir) install_errors = build_and_install_packages(fetched_packages, install_dir) # Byte compile the code after it has been installed in its final # location as .pyc files contain the path passed to compile_dir(). # When printing exception tracebacks, python uses that path first to look # for the source code before checking the directory of the .pyc file. # Don't leave references to our temporary build dir in the files. logging.info('compiling .py files in %s to .pyc', install_dir) compileall.compile_dir(install_dir, quiet=True) # Some things install with whacky permissions, fix that. external_packages.system("chmod -R a+rX '%s'" % install_dir) errors = fetch_errors + install_errors for error_msg in errors: print >>sys.stderr, error_msg return len(errors)
aaa64b05b41f883cb8ca474f725ff423f96ccd86 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/aaa64b05b41f883cb8ca474f725ff423f96ccd86/build_externals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 4163, 777, 11352, 2261, 3318, 2553, 316, 333, 585, 471, 6827, 2182, 358, 2158, 16, 1361, 471, 3799, 20968, 18, 3536, 2907, 67, 4181, 18, 14895, 67, 11167, 12, 3116, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 4163, 777, 11352, 2261, 3318, 2553, 316, 333, 585, 471, 6827, 2182, 358, 2158, 16, 1361, 471, 3799, 20968, 18, 3536, 2907, 67, 4181, 18, 14895, 67, 11167, 12, 3116, 29...
if (inspect.getmodule(value) or object) is object:
if (all is not None or (inspect.getmodule(value) or object) is object):
def docmodule(self, object, name=None, mod=None): """Produce text documentation for a given module object.""" name = object.__name__ # ignore the passed-in name synop, desc = splitdoc(getdoc(object)) result = self.section('NAME', name + (synop and ' - ' + synop))
4c11f6088af5c2b3b97ed4352df3e39c4c7c9732 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c11f6088af5c2b3b97ed4352df3e39c4c7c9732/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275,...
{"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_file_list_handler)
{"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_file_list_handler)
def blosxom_handler(request): """ This is the default blosxom handler. It calls the renderer callback to get a renderer. If there is no renderer, it uses the blosxom renderer. It calls the pathinfo callback to process the path_info http variable. It calls the filelist callback to build a list of entries to display. It calls the prepare callback to do any additional preparation before rendering the entries. Then it tells the renderer to render the entries. @param request: A standard request object @type request: L{Pyblosxom.pyblosxom.Request} object """ config = request.getConfiguration() data = request.getData() # go through the renderer callback to see if anyone else # wants to render. this renderer gets stored in the data dict # for downstream processing. rend = tools.run_callback('renderer', {'request': request}, donefunc = lambda x: x != None, defaultfunc = lambda x: None) if not rend: # get the renderer we want to use rend = config.get("renderer", "blosxom") # import the renderer rend = tools.importname("Pyblosxom.renderers", rend) # get the renderer object rend = rend.Renderer(request, config.get("stdoutput", sys.stdout)) data['renderer'] = rend # generate the timezone variable data["timezone"] = time.tzname[time.localtime()[8]] # process the path info to determine what kind of blog entry(ies) # this is tools.run_callback("pathinfo", {"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_process_path_info) # call the filelist callback to generate a list of entries data["entry_list"] = tools.run_callback("filelist", {"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_file_list_handler) # figure out the blog-level mtime which is the mtime of the head of # the entry_list entry_list = data["entry_list"] if isinstance(entry_list, list) and len(entry_list) > 0: mtime = entry_list[0].get("mtime", time.time()) else: mtime = time.time() mtime_tuple = time.localtime(mtime) mtime_gmtuple = time.gmtime(mtime) data["latest_date"] = time.strftime('%a, %d %b %Y', mtime_tuple) # Make sure we get proper 'English' dates when using standards loc = locale.getlocale(locale.LC_ALL) locale.setlocale(locale.LC_ALL, 'C') data["latest_w3cdate"] = time.strftime('%Y-%m-%dT%H:%M:%SZ', mtime_gmtuple) data['latest_rfc822date'] = time.strftime('%a, %d %b %Y %H:%M GMT', mtime_gmtuple) # set the locale back locale.setlocale(locale.LC_ALL, loc) # we pass the request with the entry_list through the prepare callback # giving everyone a chance to transform the data. the request is # modified in place. tools.run_callback("prepare", {"request": request}) # now we pass the entry_list through the renderer entry_list = data["entry_list"] renderer = data['renderer'] if renderer and not renderer.rendered: if entry_list: renderer.setContent(entry_list) # Log it as success tools.run_callback("logrequest", {'filename':config.get('logfile',''), 'return_code': '200', 'request': request}) else: renderer.addHeader('Status', '404 Not Found') renderer.setContent( {'title': 'The page you are looking for is not available', 'body': 'Somehow I cannot find the page you want. ' + 'Go Back to <a href="%s">%s</a>?' % (config["base_url"], config["blog_title"])}) # Log it as failure tools.run_callback("logrequest", {'filename':config.get('logfile',''), 'return_code': '404', 'request': request}) renderer.render() elif not renderer: output = config.get('stdoutput', sys.stdout) output.write("Content-Type: text/plain\n\n" + \ "There is something wrong with your setup.\n" + \ "Check your config files and verify that your " + \ "configuration is correct.\n") cache = tools.get_cache(request) if cache: cache.close()
2d889182f07a1e20247eba2168cf4d18f81fcdab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11836/2d889182f07a1e20247eba2168cf4d18f81fcdab/pyblosxom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 383, 30319, 362, 67, 4176, 12, 2293, 4672, 3536, 1220, 353, 326, 805, 324, 383, 30319, 362, 1838, 18, 225, 2597, 4097, 326, 5690, 1348, 358, 336, 279, 5690, 18, 225, 971, 1915, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 383, 30319, 362, 67, 4176, 12, 2293, 4672, 3536, 1220, 353, 326, 805, 324, 383, 30319, 362, 1838, 18, 225, 2597, 4097, 326, 5690, 1348, 358, 336, 279, 5690, 18, 225, 971, 1915, 35...
return '0X%8.8X' % i
return '0X%8.8X' % (long(i)&0xFFFFFFFFL) try: add32 = _rl_accel.add32 except: if sys.hexversion>=0x02030000: def add32(x, y): "Calculate (x + y) modulo 2**32" return _L2U32((long(x)+y) & 0xffffffffL) else: def add32(x, y): "Calculate (x + y) modulo 2**32" lo = (x & 0xFFFF) + (y & 0xFFFF) hi = (x >> 16) + (y >> 16) + (lo >> 16) return (hi << 16) | (lo & 0xFFFF)
def hex32(i): return '0X%8.8X' % i
aa0d50a54c0641f63f0ec7acd3202e2dee7880e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/aa0d50a54c0641f63f0ec7acd3202e2dee7880e3/ttfonts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 1578, 12, 77, 4672, 327, 296, 20, 60, 9, 28, 18, 28, 60, 11, 738, 277, 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, ...
[ 1, 1, 1, 1, 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, 3827, 1578, 12, 77, 4672, 327, 296, 20, 60, 9, 28, 18, 28, 60, 11, 738, 277, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
src_syspath = src_fs.getsyspath(src_path, default="") dst_syspath = dst_fs.getsyspath(dst_path, default="")
src_syspath = src_fs.getsyspath(src_path) or "" dst_syspath = dst_fs.getsyspath(dst_path) or ""
def movefile(src_fs, src_path, dst_fs, dst_path, chunk_size=16384): """Move a file from one filesystem to another. Will use system copyfile, if both files have a syspath. Otherwise file will be copied a chunk at a time. src_fs -- Source filesystem object src_path -- Source path dst_fs -- Destination filesystem object dst_path -- Destination filesystem object chunk_size -- Size of chunks to move if system copyfile is not available (default 16K) """ src_syspath = src_fs.getsyspath(src_path, default="") dst_syspath = dst_fs.getsyspath(dst_path, default="") # System copy if there are two sys paths if src_syspath and dst_syspath: shutil.movefile(src_syspath, dst_syspath) return src, dst = None try: # Chunk copy src = src_fs.open(src_path, 'rb') dst = dst_fs.open(dst_path, 'wb') while True: chunk = src.read(chunk_size) if not chunk: break dst.write(chunk) src_fs.remove(src) finally: if src is not None: src.close() if dst is not None: dst.close()
f41f2266269823cc78cdc865dd1efa2ac0e2d988 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5578/f41f2266269823cc78cdc865dd1efa2ac0e2d988/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 768, 12, 4816, 67, 2556, 16, 1705, 67, 803, 16, 3046, 67, 2556, 16, 3046, 67, 803, 16, 2441, 67, 1467, 33, 2313, 17295, 4672, 3536, 7607, 279, 585, 628, 1245, 6496, 358, 4042, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 768, 12, 4816, 67, 2556, 16, 1705, 67, 803, 16, 3046, 67, 2556, 16, 3046, 67, 803, 16, 2441, 67, 1467, 33, 2313, 17295, 4672, 3536, 7607, 279, 585, 628, 1245, 6496, 358, 4042, ...
return self._simple_command(name, arg1, arg2)
return apply(self._simple_command, (name,) + args)
def xatom(self, name, arg1=None, arg2=None): """Allow simple extension commands notified by server in CAPABILITY response.
a470565476fb5e33733d1be0bbc4cb80f186235a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a470565476fb5e33733d1be0bbc4cb80f186235a/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 7466, 12, 2890, 16, 508, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 4672, 3536, 7009, 4143, 2710, 4364, 18791, 635, 1438, 316, 29720, 22879, 766, 18, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 7466, 12, 2890, 16, 508, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 4672, 3536, 7009, 4143, 2710, 4364, 18791, 635, 1438, 316, 29720, 22879, 766, 18, 2, -100, -100, -100, -10...
self.filename = _normpath(filename)
self.orig_filename = filename null_byte = filename.find(chr(0)) if null_byte >= 0: filename = filename[0:null_byte] print "File name %s contains a suspicious null byte!" % filename if os.sep != "/": filename = filename.replace(os.sep, "/") self.filename = filename
def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)): self.filename = _normpath(filename) # Name of the file in the archive self.date_time = date_time # year, month, day, hour, min, sec # Standard values: self.compress_type = ZIP_STORED # Type of compression for the file self.comment = "" # Comment for each file self.extra = "" # ZIP extra data self.create_system = 0 # System which created ZIP archive self.create_version = 20 # Version which created ZIP archive self.extract_version = 20 # Version needed to extract archive self.reserved = 0 # Must be zero self.flag_bits = 0 # ZIP flag bits self.volume = 0 # Volume number of file header self.internal_attr = 0 # Internal attributes self.external_attr = 0 # External file attributes # Other attributes are set by class ZipFile: # header_offset Byte offset to the file header # file_offset Byte offset to the start of the file data # CRC CRC-32 of the uncompressed file # compress_size Size of the compressed file # file_size Size of the uncompressed file
7b15e69e500ca2b46f241e02d4d3e29131ed65b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7b15e69e500ca2b46f241e02d4d3e29131ed65b1/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 1546, 2279, 461, 3113, 1509, 67, 957, 28657, 3657, 3672, 16, 21, 16, 21, 16, 20, 16, 20, 16, 20, 3719, 30, 365, 18, 4949, 67, 3459, 273, 1544, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1544, 1546, 2279, 461, 3113, 1509, 67, 957, 28657, 3657, 3672, 16, 21, 16, 21, 16, 20, 16, 20, 16, 20, 3719, 30, 365, 18, 4949, 67, 3459, 273, 1544, ...
def _login(self, *args, **kwargs): d = self.factory.login(args[0], (pb.Referenceable(), hf)) d.addCallback(self._logged_in) d.addCallback(self._job_done, jdict) return d factory = ClientFactory(_login, (self.creds), {}) factory.continueTrying = False self.connection = reactor.connectTCP(self.hostname, self.port, factory)
def _login(self, *args, **kwargs): d = self.factory.login(args[0], (pb.Referenceable(), hf)) d.addCallback(self._logged_in) d.addCallback(self._job_done, jdict) return d
53db6e6d94620c51267e1f2f876662c701f8b791 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/53db6e6d94620c51267e1f2f876662c701f8b791/test_remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5819, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 302, 273, 365, 18, 6848, 18, 5819, 12, 1968, 63, 20, 6487, 261, 5733, 18, 2404, 429, 9334, 366, 74, 3719, 302, 18, 1289, 242...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5819, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 302, 273, 365, 18, 6848, 18, 5819, 12, 1968, 63, 20, 6487, 261, 5733, 18, 2404, 429, 9334, 366, 74, 3719, 302, 18, 1289, 242...
tboxfile.write('<tr><th rowspan="2">Test</th><th rowspan="2">0.6<br/>Target</th>')
tboxfile.write('<tr><th rowspan="2">Test<br/>Latest results as of %s</th><th rowspan="2">0.6<br/>Target</th>' % latest)
def generateSummaryPage(self, pagename, tests, startdate, enddate): # tests { testname: { build: { date: { hour: [ (testname, itemDateTime, delta.days, buildname, hour, revision, runtime) ] }}}}
87df0f27bcaf190b9f18a04aca4e5bcf1476a35d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/87df0f27bcaf190b9f18a04aca4e5bcf1476a35d/perf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 4733, 1964, 12, 2890, 16, 4262, 1069, 16, 7434, 16, 787, 712, 16, 679, 712, 4672, 468, 7434, 288, 1842, 529, 30, 288, 1361, 30, 288, 1509, 30, 288, 6126, 30, 306, 261, 3813, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4733, 1964, 12, 2890, 16, 4262, 1069, 16, 7434, 16, 787, 712, 16, 679, 712, 4672, 468, 7434, 288, 1842, 529, 30, 288, 1361, 30, 288, 1509, 30, 288, 6126, 30, 306, 261, 3813, 52...
"Return the number of transmitted bytes"
"Return the number of transmitted bytes."
def get_transmitted_bytes(self): "Return the number of transmitted bytes" return self.tot_bytes_sent + self.tot_bytes_received
367a95e4363ae8b7515230480fff6ef354b95226 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/367a95e4363ae8b7515230480fff6ef354b95226/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2338, 7948, 67, 3890, 12, 2890, 4672, 315, 990, 326, 1300, 434, 906, 7948, 1731, 1199, 327, 365, 18, 3307, 67, 3890, 67, 7569, 397, 365, 18, 3307, 67, 3890, 67, 15213, 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, 336, 67, 2338, 7948, 67, 3890, 12, 2890, 4672, 315, 990, 326, 1300, 434, 906, 7948, 1731, 1199, 327, 365, 18, 3307, 67, 3890, 67, 7569, 397, 365, 18, 3307, 67, 3890, 67, 15213, 2, -1...
path_regex = re.compile(r'^(?P<root>/(([^/]+)/)*)(?P<auid>[^/]+)/((?P<globaltree>global)|(users/(?P<userstree>[^/]+)))/(?P<document>~?(([^~]+~)|([^~]+))*)(/~~(?P<node>.*))?$')
path_regex = re.compile(r'^(?P<root>/(([^/]+)/)*)?(?P<auid>[^/]+)/((?P<globaltree>global)|(users/(?P<userstree>[^/]+)))/(?P<document>~?(([^~]+~)|([^~]+))*)(/~~(?P<node>.*))?$')
def __new__(cls, value): obj = str.__new__(cls, value) uri = urlparse.urlparse(obj)
c2915635e6bda93a78f293c09d7231121bca190e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/c2915635e6bda93a78f293c09d7231121bca190e/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 460, 4672, 1081, 273, 609, 16186, 2704, 972, 12, 6429, 16, 460, 13, 2003, 273, 15185, 18, 718, 2670, 12, 2603, 13, 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, 2704, 972, 12, 6429, 16, 460, 4672, 1081, 273, 609, 16186, 2704, 972, 12, 6429, 16, 460, 13, 2003, 273, 15185, 18, 718, 2670, 12, 2603, 13, 2, -100, -100, -100, -100, -100, -100,...
uids = uids[offset, offset + limit]
uids = uids[offset:offset + limit]
def find(self, query, properties): t = time.time()
3372fa019060d53c5d91ded892d9795926dd1605 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9394/3372fa019060d53c5d91ded892d9795926dd1605/datastore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 12, 2890, 16, 843, 16, 1790, 4672, 268, 273, 813, 18, 957, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1104, 12, 2890, 16, 843, 16, 1790, 4672, 268, 273, 813, 18, 957, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
box = gtk.HBox()
box = gtk.HBox(spacing=4)
def append_page(self, contentview): tab_label = gtk.EventBox() tab_label.show() l = gtk.Label(contentview.short_title) pos = self.notebook.get_tab_pos() if pos in [gtk.POS_LEFT, gtk.POS_RIGHT]: box = gtk.VBox() if pos == gtk.POS_LEFT: l.set_angle(90) else: l.set_angle(270) else: box = gtk.HBox() box.pack_start(contentview.icon, expand=False) box.pack_start(l, expand=False) tab_label.add(box) tab_label.show_all() # Set the tooltip text tooltiptext = contentview.LONG_TITLE if not tooltiptext: tooltiptext = contentview.SHORT_TITLE if not tooltiptext: tooltiptext = 'No tooltip set for %s' % contentview icons.tips.set_tip(tab_label, tooltiptext) # Add the content view contentview.show() self.__notebook.append_page(contentview, tab_label=tab_label) self.__views[contentview.unique_id] = contentview contentview.holder = self contentview.connect('short-title-changed', self.cb_view_short_title_changed) if self.__list_widget is not None: self.__list_widget.append_page(contentview)
d0434ad7fbb810788ee92702622b45bcd59a0025 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/d0434ad7fbb810788ee92702622b45bcd59a0025/contentbook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 2433, 12, 2890, 16, 913, 1945, 4672, 3246, 67, 1925, 273, 22718, 18, 1133, 3514, 1435, 3246, 67, 1925, 18, 4500, 1435, 328, 273, 22718, 18, 2224, 12, 1745, 1945, 18, 6620, 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, 714, 67, 2433, 12, 2890, 16, 913, 1945, 4672, 3246, 67, 1925, 273, 22718, 18, 1133, 3514, 1435, 3246, 67, 1925, 18, 4500, 1435, 328, 273, 22718, 18, 2224, 12, 1745, 1945, 18, 6620, 67,...
def get_alphabetically_ordered_collection_list(level=0):
def get_alphabetically_ordered_collection_list(level=0, ln=cdslang):
def get_alphabetically_ordered_collection_list(level=0): """Returns nicely ordered (score respected) list of collections, more exactly list of tuples (collection name, printable collection name). Suitable for create_search_box().""" out = [] query = "SELECT id,name FROM collection ORDER BY name ASC" res = run_sql(query) for c_id, c_name in res: # make a nice printable name (e.g. truncate c_printable for for long collection names): if len(c_name)>30: c_printable = c_name[:30] + "..." else: c_printable = c_name if level: c_printable = " " + level * '-' + " " + c_printable out.append([c_name, c_printable]) return out
95ee4b50bf0be0d738e293b8303987b9ecca5b6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/95ee4b50bf0be0d738e293b8303987b9ecca5b6f/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 287, 8907, 6478, 67, 9885, 67, 5548, 67, 1098, 12, 2815, 33, 20, 16, 7211, 33, 4315, 2069, 539, 4672, 3536, 1356, 11562, 2357, 5901, 261, 6355, 400, 1789, 13, 666, 434, 6980, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 287, 8907, 6478, 67, 9885, 67, 5548, 67, 1098, 12, 2815, 33, 20, 16, 7211, 33, 4315, 2069, 539, 4672, 3536, 1356, 11562, 2357, 5901, 261, 6355, 400, 1789, 13, 666, 434, 6980, ...
f.write('plot "%s" using 1:%d title \"Data Points\" with lines lt 2,\\\n'%(traceFile, col)) f.write(' "%s" using 1:%d:(0.5) smooth acsplines title \"Average\" lt 3\n'%(traceFile, col))
f.write("plot \"%s\" using 1:%d title \"Data Points\" with lines lt 2,\\\n"%(traceFile, col)) f.write(" \"%s\" using 1:%d:(0.5) smooth acsplines title \"Average\" lt 3\n"%(traceFile, col))
def genPlot(self): """Generates GNUplot plotfile, then calls self.runGNUplot. """ col = self.plot_combox.currentItem() + 2 # Column number to plot # If this plot was the same as the last plot, just run GNUplot on the plotfile. # This allows us to edit the current plotfile in a text editor via "Open GNUplot File" # and replot without overwriting it. if col == self.lastplot: self.runGNUplot(self.plotFile) return else: self.lastplot = col title = str(self.plot_combox.currentText()) # Plot title tlist = string.split(title, ":") ytitle = str(tlist[1]) # Y Axis title # Write GNUplot file f = open(self.plotFile,"w") if sys.platform == 'darwin': f.write("set terminal aqua\n") # GNUplot for Mac needs this. # On Windows, self.traceFile can have backward slashes (\) as separators. # GNUplot commands interpret backslashes as escape characters. This requires two backslash # characters in place of one as a separator. This is only a problem on Windows since # Linux and MacOS always use forward slashes as file separators. # If a backslash appears in a Linux/MacOS tracefile name, GNUplot would very likely puke # on it, too. I recommend always replacing a single backslash with double backslashes, but # for now only do this on Windows. # Fixes bug 1894. Mark 060424. if sys.platform == 'win32': traceFile = self.traceFile.replace('\\','\\\\') f.write("set title \"%s\\n Trace file: %s\\n Created: %s\"\n"%(title, traceFile, self.date)) f.write("set key left box\n") f.write("set xlabel \"time (picoseconds)\"\n") f.write("set ylabel \"%s\"\n"%(ytitle)) f.write('plot "%s" using 1:%d title \"Data Points\" with lines lt 2,\\\n'%(traceFile, col)) f.write(' "%s" using 1:%d:(0.5) smooth acsplines title \"Average\" lt 3\n'%(traceFile, col)) # Fixed bug 712 by swapping single quote (') with double quote(") around traceFile (%s). if sys.platform == 'win32': # The plot will stay up until the OK or Cancel button is clicked. f.write("pause mouse \"Click OK or Cancel to Quit\"") else: # "pause mouse" doesn't work on Linux as it does on Windows. # I suspect this is because QProcess doesn't spawn a child, but forks a sibling process. # The workaround is thus: plot will stick around for 3600 seconds (1 hr). # Mark 050310 f.write("pause 3600") f.close()
d34386630e2befebf4fd52206bbcda4770612d10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/d34386630e2befebf4fd52206bbcda4770612d10/PlotTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 11532, 12, 2890, 4672, 3536, 6653, 611, 50, 57, 4032, 3207, 768, 16, 1508, 4097, 365, 18, 2681, 8318, 57, 4032, 18, 3536, 645, 273, 365, 18, 4032, 67, 832, 2147, 18, 2972, 1180, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 11532, 12, 2890, 4672, 3536, 6653, 611, 50, 57, 4032, 3207, 768, 16, 1508, 4097, 365, 18, 2681, 8318, 57, 4032, 18, 3536, 645, 273, 365, 18, 4032, 67, 832, 2147, 18, 2972, 1180, ...
])
] + PARAM_TESTS)
def testNegativeFilters(self): self.RunAndVerify('*-FooTest.Abc', [ 'FooTest.Xyz',
8811cad3eac09720ff023f0230f7f78253ae10a9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14009/8811cad3eac09720ff023f0230f7f78253ae10a9/gtest_filter_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 14959, 5422, 12, 2890, 4672, 365, 18, 1997, 1876, 8097, 2668, 14, 17, 42, 5161, 4709, 18, 5895, 71, 2187, 306, 296, 42, 5161, 4709, 18, 60, 93, 94, 2187, 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, 1842, 14959, 5422, 12, 2890, 4672, 365, 18, 1997, 1876, 8097, 2668, 14, 17, 42, 5161, 4709, 18, 5895, 71, 2187, 306, 296, 42, 5161, 4709, 18, 60, 93, 94, 2187, 2, -100, -100, -100, -...
track.mark_unplayed = 0x02
if track.playcount > 0 or track.bookmark_time > 0: track.mark_unplayed = 0x01 else: track.mark_unplayed = 0x02
def set_podcast_flags(self, track): try: # Set blue bullet for unplayed tracks on 5G iPods episode = db.load_episode(track.podcasturl) if episode['is_played']: track.mark_unplayed = 0x01 if track.playcount == 0: track.playcount = 1 else: track.mark_unplayed = 0x02
b06f6751e1099642d3654dda51d291ce53da02de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12778/b06f6751e1099642d3654dda51d291ce53da02de/sync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 7832, 4155, 67, 7133, 12, 2890, 16, 3298, 4672, 775, 30, 468, 1000, 8024, 31650, 364, 640, 1601, 329, 13933, 603, 1381, 43, 277, 16496, 17054, 273, 1319, 18, 945, 67, 29687, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 7832, 4155, 67, 7133, 12, 2890, 16, 3298, 4672, 775, 30, 468, 1000, 8024, 31650, 364, 640, 1601, 329, 13933, 603, 1381, 43, 277, 16496, 17054, 273, 1319, 18, 945, 67, 29687, 1...
field=self._label[0].lower(),
field=label[0].lower(),
def _render_admin_panel(self, req, cat, page, path_info): data = {'label_singular': gettext(self._label[0]), 'label_plural': gettext(self._label[1])}
f95c2eeffa7b4806113132f0e07740c640aaf4fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/f95c2eeffa7b4806113132f0e07740c640aaf4fc/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 589, 67, 1376, 4672, 501, 273, 13666, 1925, 67, 17835, 4278, 24972, 12, 2890, 6315, 1925, 63, 20, 65, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 5902, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 589, 67, 1376, 4672, 501, 273, 13666, 1925, 67, 17835, 4278, 24972, 12, 2890, 6315, 1925, 63, 20, 65, 3631, ...
def run_testcases(self):
def runTestCases(self):
def run_testcases(self): if not self.cases: self.statusBar().showMessage('No TestCases selected.') else: suite = TestSuite(self.cases) self.runner.run(suite)
958f10c55a04380a7b01daf5a841383cfd9f91bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14942/958f10c55a04380a7b01daf5a841383cfd9f91bd/qtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 4709, 30744, 12, 2890, 4672, 309, 486, 365, 18, 22186, 30, 365, 18, 2327, 5190, 7675, 4500, 1079, 2668, 2279, 7766, 30744, 3170, 1093, 13, 469, 30, 11371, 273, 7766, 13587, 12, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 4709, 30744, 12, 2890, 4672, 309, 486, 365, 18, 22186, 30, 365, 18, 2327, 5190, 7675, 4500, 1079, 2668, 2279, 7766, 30744, 3170, 1093, 13, 469, 30, 11371, 273, 7766, 13587, 12, 289...
pass
pass
def preparesocket(socketobject): if ostype == 'Windows': # we need to set a timeout because on rare occasions Windows will block # on recvmess with a bad socket. This prevents it from locking the system. # We use select, so the timeout should never be actually used. # The actual value doesn't seem to matter, so I'll use 100 years socketobject.settimeout(60*60*24*365*100) elif ostype == 'Linux' or ostype == 'Darwin': # Linux seems not to care if we set the timeout, Mac goes nuts and refuses # to let you send from a socket you're receiving on (why?) pass elif ostype == "WindowsCE": # No known issues, so just go pass else: raise UnsupportedSystemException, "Unsupported system type: '"+osrealtype+"' (alias: "+ostype+")"
2049c9b89bd1118d6d0b65999af0da36540c9d5b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/2049c9b89bd1118d6d0b65999af0da36540c9d5b/nonportable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29294, 1861, 12, 7814, 1612, 4672, 225, 309, 320, 27273, 422, 296, 10399, 4278, 468, 732, 1608, 358, 444, 279, 2021, 2724, 603, 25671, 9145, 345, 1115, 8202, 903, 1203, 468, 603, 1950, 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, 29294, 1861, 12, 7814, 1612, 4672, 225, 309, 320, 27273, 422, 296, 10399, 4278, 468, 732, 1608, 358, 444, 279, 2021, 2724, 603, 25671, 9145, 345, 1115, 8202, 903, 1203, 468, 603, 1950, 3...
calls = self.callers.keys() calls.sort()
def write_results(self, show_missing=True, summary=False, coverdir=None): """ @param coverdir """ if self.calledfuncs: print() print("functions called:") calls = self.calledfuncs.keys() calls.sort() for filename, modulename, funcname in calls: print(("filename: %s, modulename: %s, funcname: %s" % (filename, modulename, funcname)))
8efc62cc3f2df2ec0f26a2c4083fc6ed6a8f597b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/8efc62cc3f2df2ec0f26a2c4083fc6ed6a8f597b/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4717, 12, 2890, 16, 2405, 67, 7337, 33, 5510, 16, 4916, 33, 8381, 16, 5590, 1214, 33, 7036, 4672, 3536, 632, 891, 5590, 1214, 3536, 309, 365, 18, 11777, 17728, 30, 1172, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4717, 12, 2890, 16, 2405, 67, 7337, 33, 5510, 16, 4916, 33, 8381, 16, 5590, 1214, 33, 7036, 4672, 3536, 632, 891, 5590, 1214, 3536, 309, 365, 18, 11777, 17728, 30, 1172, 1435...
def resolve_anonymous(self): """ Link anonymous references to targets. Given::
class ChainedTargetResolver(nodes.SparseNodeVisitor): """ Copy reference attributes up the length of a hyperlink target chain. "Chained targets" are multiple adjacent internal hyperlink targets which "point to" an external or indirect target. After the transform, all chained targets will effectively point to the same place. Given the following ``document`` as input:: <document> <target id="a" name="a"> <target id="b" name="b"> <target id="c" name="c" refuri="http://chained.external.targets"> <target id="d" name="d">
def resolve_anonymous(self): """ Link anonymous references to targets. Given::
69d88205a75fc1ceab363dabf7da05f95aaa827e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/69d88205a75fc1ceab363dabf7da05f95aaa827e/references.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 67, 19070, 12, 2890, 4672, 3536, 4048, 13236, 5351, 358, 5774, 18, 225, 16803, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 67, 19070, 12, 2890, 4672, 3536, 4048, 13236, 5351, 358, 5774, 18, 225, 16803, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
elif mode == "conflate"
elif mode == "conflate":
def process_transit_street_graph(graphdb_filename, gtfsdb_filename, osmdb_filename, agency_id=None): g = Graph() # Load gtfsdb ============================== gtfsdb = GTFSDatabase( gtfsdb_filename ) service_ids = [x.encode("ascii") for x in gtfsdb.service_ids()] load_gtfsdb_to_boardalight_graph(g, gtfsdb, agency_id=agency_id, service_ids=service_ids) # Load osmdb =============================== print( "Opening OSM-DB '%s'"%osmdb_filename ) osmdb = OSMDB( osmdb_filename ) load_streets_to_graph( g, osmdb, sys.stdout ) # Link osm to transit ====================== load_transit_street_links_to_graph( g, osmdb, gtfsdb, reporter=sys.stdout ) # Export to graphdb ======================== graphdb = GraphDatabase( graphdb_filename, overwrite=True ) graphdb.populate( g, reporter=sys.stdout )
612ee51a2be04fafcceeee425749489a4b9e280b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10974/612ee51a2be04fafcceeee425749489a4b9e280b/compile_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2338, 305, 67, 22424, 67, 4660, 12, 4660, 1966, 67, 3459, 16, 9879, 2556, 1966, 67, 3459, 16, 1140, 27574, 67, 3459, 16, 1737, 2075, 67, 350, 33, 7036, 4672, 314, 273, 5601, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2338, 305, 67, 22424, 67, 4660, 12, 4660, 1966, 67, 3459, 16, 9879, 2556, 1966, 67, 3459, 16, 1140, 27574, 67, 3459, 16, 1737, 2075, 67, 350, 33, 7036, 4672, 314, 273, 5601, ...
self.show_progress_bar = self.data.state == 'downloading'
self.show_progress_bar = (self.data.state in ('downloading', 'paused'))
def calc_show_progress_bar(self): self.show_progress_bar = self.data.state == 'downloading'
da75e698261c61e125be568de20bb007d28ead4e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/da75e698261c61e125be568de20bb007d28ead4e/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 4500, 67, 8298, 67, 3215, 12, 2890, 4672, 365, 18, 4500, 67, 8298, 67, 3215, 273, 365, 18, 892, 18, 2019, 422, 296, 7813, 310, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 4500, 67, 8298, 67, 3215, 12, 2890, 4672, 365, 18, 4500, 67, 8298, 67, 3215, 273, 365, 18, 892, 18, 2019, 422, 296, 7813, 310, 11, 2, -100, -100, -100, -100, -100, -100, -1...
w("%s:%s%s%s" % (pn.upper(), whenV, z, CRLF))
w("%s:%s%s%s" % (self.unCamel(pn), whenV, z, CRLF))
def timeProp(self, sts, pn, subj): w = self._w when = sts.any(subj, ICAL.sym(pn))
04829bd0c6467d1a5ceb640d5981b3facc7553d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/04829bd0c6467d1a5ceb640d5981b3facc7553d5/toIcal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 813, 4658, 12, 2890, 16, 27099, 16, 11059, 16, 15333, 4672, 341, 273, 365, 6315, 91, 1347, 273, 27099, 18, 2273, 12, 1717, 78, 16, 467, 7913, 18, 8117, 12, 7449, 3719, 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, 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, 813, 4658, 12, 2890, 16, 27099, 16, 11059, 16, 15333, 4672, 341, 273, 365, 6315, 91, 1347, 273, 27099, 18, 2273, 12, 1717, 78, 16, 467, 7913, 18, 8117, 12, 7449, 3719, 2, -100, -100, ...
if self.testPath:
if self.testPath is not None:
def buildTestPath(self): """ If we specifiy a testpath, set the self.testPath variable to be the given directory or file.
427937ff35ea20b5cbfb1e6dd1fb45dae71131c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/427937ff35ea20b5cbfb1e6dd1fb45dae71131c3/runxpcshelltests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4709, 743, 12, 2890, 4672, 3536, 971, 732, 857, 704, 93, 279, 1842, 803, 16, 444, 326, 365, 18, 3813, 743, 2190, 358, 506, 326, 864, 1867, 578, 585, 18, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4709, 743, 12, 2890, 4672, 3536, 971, 732, 857, 704, 93, 279, 1842, 803, 16, 444, 326, 365, 18, 3813, 743, 2190, 358, 506, 326, 864, 1867, 578, 585, 18, 2, -100, -100, -100, -1...
self.any_issue = False
self.any_issue = False
def write_doc(self, docname, doctree): self.any_issue = False # set when any issue is encountered in this document self.docname = docname visitor = SuspiciousVisitor(doctree, self) doctree.walk(visitor)
265f533c108c6859634fe50d980e0d80c6b0ca63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/265f533c108c6859634fe50d980e0d80c6b0ca63/suspicious.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2434, 12, 2890, 16, 997, 529, 16, 31263, 992, 4672, 225, 365, 18, 2273, 67, 13882, 273, 1083, 468, 444, 1347, 1281, 5672, 353, 9919, 316, 333, 1668, 365, 18, 2434, 529, 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, 1045, 67, 2434, 12, 2890, 16, 997, 529, 16, 31263, 992, 4672, 225, 365, 18, 2273, 67, 13882, 273, 1083, 468, 444, 1347, 1281, 5672, 353, 9919, 316, 333, 1668, 365, 18, 2434, 529, 273, ...
box = wx.BoxSizer(wx.HORIZONTAL) label = wx.StaticText(self.values, -1, "Value(s):") box.Add(label, 0, wx.ALIGN_CENTRE | wx.ALL, 5) box2 = wx.BoxSizer(wx.VERTICAL) self.fields = [ ]
self.lights = [ ] box = wx.BoxSizer(wx.VERTICAL)
def modval(self, event): dialog = wx.Dialog(None, -1, "Set Light Values", size=wx.Size(300, 300)) self.dialog = dialog sizer = wx.BoxSizer(wx.VERTICAL) sizer2 = wx.BoxSizer(wx.VERTICAL) self.values = scrolled.ScrolledPanel(dialog, -1, size=wx.Size(300, 200)) box = wx.BoxSizer(wx.HORIZONTAL) label = wx.StaticText(self.values, -1, "Value(s):") box.Add(label, 0, wx.ALIGN_CENTRE | wx.ALL, 5) box2 = wx.BoxSizer(wx.VERTICAL) self.fields = [ ] for i in range(0, self.c.num_vals): if (i >= len(self.c.vals)): v = '0' else: v = str(self.c.vals[i]) field = wx.TextCtrl(self.values, -1, v) self.fields.append(field) box2.Add(field, 0, wx.ALIGN_CENTRE | wx.ALL, 5) box.Add(box2, 0, wx.ALIGN_CENTRE | wx.ALL, 5) self.values.SetSizer(box) sizer.Add(self.values, 0, wx.ALIGN_CENTRE | wx.ALL, 2) bbox = wx.BoxSizer(wx.HORIZONTAL) cancel = wx.Button(dialog, -1, "Cancel") dialog.Bind(wx.EVT_BUTTON, self.cancel, cancel); bbox.Add(cancel, 0, wx.ALIGN_LEFT | wx.ALL, 5); ok = wx.Button(dialog, -1, "Ok") dialog.Bind(wx.EVT_BUTTON, self.ok, ok); bbox.Add(ok, 0, wx.ALIGN_LEFT | wx.ALL, 5); sizer.Add(bbox, 0, wx.ALIGN_CENTRE | wx.ALL, 2)
e4a495f473299f3234d1d57514918996b249814d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3867/e4a495f473299f3234d1d57514918996b249814d/_control.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 681, 1125, 12, 2890, 16, 871, 4672, 6176, 273, 7075, 18, 6353, 12, 7036, 16, 300, 21, 16, 315, 694, 15992, 6876, 3113, 963, 33, 27226, 18, 1225, 12, 19249, 16, 11631, 3719, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 681, 1125, 12, 2890, 16, 871, 4672, 6176, 273, 7075, 18, 6353, 12, 7036, 16, 300, 21, 16, 315, 694, 15992, 6876, 3113, 963, 33, 27226, 18, 1225, 12, 19249, 16, 11631, 3719, 365, 18, ...
return K(self._pari_().trace())
return K(self._pari_('x').trace())
def trace(self): K = self.parent().base_ring() return K(self._pari_().trace())
7c881670e631b3c5c7ff357f6fa892f0db442471 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7c881670e631b3c5c7ff357f6fa892f0db442471/number_field_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 12, 2890, 4672, 1475, 273, 365, 18, 2938, 7675, 1969, 67, 8022, 1435, 327, 1475, 12, 2890, 6315, 1065, 77, 67, 7675, 5129, 10756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 12, 2890, 4672, 1475, 273, 365, 18, 2938, 7675, 1969, 67, 8022, 1435, 327, 1475, 12, 2890, 6315, 1065, 77, 67, 7675, 5129, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
'except': 'except',
'except': 'try',
def writedocs(dir, pkgpath='', done=None): """Write out HTML documentation for all modules in a directory tree.""" if done is None: done = {} for importer, modname, ispkg in pkgutil.walk_packages([dir], pkgpath): writedoc(modname) return
13cafca1a3db5497c69686221a53259f44dba36b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/13cafca1a3db5497c69686221a53259f44dba36b/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2518, 329, 22280, 12, 1214, 16, 3475, 803, 2218, 2187, 2731, 33, 7036, 4672, 3536, 3067, 596, 3982, 7323, 364, 777, 4381, 316, 279, 1867, 2151, 12123, 309, 2731, 353, 599, 30, 2731, 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, 2518, 329, 22280, 12, 1214, 16, 3475, 803, 2218, 2187, 2731, 33, 7036, 4672, 3536, 3067, 596, 3982, 7323, 364, 777, 4381, 316, 279, 1867, 2151, 12123, 309, 2731, 353, 599, 30, 2731, 273,...
>>> import operator >>> prime_factors = Counter(dict([(2,2), (3,3), (17,1)])) >>> sorted(prime_factors.elements()) [2, 2, 3, 3, 3, 17] >>> reduce(operator.mul, prime_factors.elements(), 1)
>>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) >>> product = 1 >>> for factor in prime_factors.elements(): ... product *= factor >>> product
def elements(self): '''Iterator over elements repeating each as many times as its count.
783d73fc2f5ca7ca0a2c84380f3ddd6bce01de93 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/783d73fc2f5ca7ca0a2c84380f3ddd6bce01de93/collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2186, 12, 2890, 4672, 9163, 3198, 1879, 2186, 30571, 1517, 487, 4906, 4124, 487, 2097, 1056, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2186, 12, 2890, 4672, 9163, 3198, 1879, 2186, 30571, 1517, 487, 4906, 4124, 487, 2097, 1056, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
pattern = re.compile(r'''_array_data.header_convention[ "]*SLS_1.0''')
pattern = re.compile(r'''_array_data.header_convention[ "]*SLS''')
def readHeader(self,maxlength=12288): # usually 1024 is OK; require 12288 for ID19 if not self.parameters: rawdata = open(self.filename,"rb").read(maxlength) # The tag _array_data.header_convention "SLS_1.0" could be with/without quotes "..." pattern = re.compile(r'''_array_data.header_convention[ "]*SLS_1.0''') match = pattern.findall(rawdata) assert len(match)>=1
923836f78192fbd6b24f7bfab4013aee545a7d0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/923836f78192fbd6b24f7bfab4013aee545a7d0f/pilatus_minicbf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 1864, 12, 2890, 16, 27875, 33, 22266, 5482, 4672, 468, 11234, 6250, 353, 7791, 31, 2583, 31501, 5482, 364, 1599, 3657, 309, 486, 365, 18, 3977, 30, 1831, 892, 273, 1696, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 1864, 12, 2890, 16, 27875, 33, 22266, 5482, 4672, 468, 11234, 6250, 353, 7791, 31, 2583, 31501, 5482, 364, 1599, 3657, 309, 486, 365, 18, 3977, 30, 1831, 892, 273, 1696, 12, 2890, ...
self.getEventFromSeishub(self.streams[0][0].stats.starttime,
self.getNextEventFromSeishub(self.streams[0][0].stats.starttime,
def on_select(item): print '--> ', item.labelstr if item.labelstr == 'quit': plt.close() elif item.labelstr == 'do3dloc': self.do3dLoc() elif item.labelstr == 'showMap': self.load3dlocData() self.show3dlocEventMap() elif item.labelstr == 'send2seishub': self.uploadSeishub() elif item.labelstr == 'getEventFromSeishub': message = "Using start and endtime of first trace in " + \ "first stream to search for events." warnings.warn(message) print "Clearing previous event data." self.delAllItems() self.clearDictionaries() self.getEventFromSeishub(self.streams[0][0].stats.starttime, self.streams[0][0].stats.endtime) print "Event data from seishub loaded." self.drawAllItems() self.redraw()
c125be19b512de17e01b7dd6a96c9d14c6665bad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/c125be19b512de17e01b7dd6a96c9d14c6665bad/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 4025, 12, 1726, 4672, 1172, 3534, 34, 2265, 761, 18, 1925, 701, 309, 761, 18, 1925, 701, 422, 296, 27176, 4278, 5451, 18, 4412, 1435, 1327, 761, 18, 1925, 701, 422, 296, 2896,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4025, 12, 1726, 4672, 1172, 3534, 34, 2265, 761, 18, 1925, 701, 309, 761, 18, 1925, 701, 422, 296, 27176, 4278, 5451, 18, 4412, 1435, 1327, 761, 18, 1925, 701, 422, 296, 2896,...
else:
elif entry:
def main(): # Each decay divided by 2 UttererNode.__decay = 5 SentimentNode.__decay = 5 ExpressionNode.__decay = 20 SentenceNode.__decay = 25 TokenNode.__decay = 20 from optparse import OptionParser usage="usage: %prog [-p username][-n botname=Ector][-v|-q][-l logfilepath=ector.log][-s|-g][-h]" parser = OptionParser(usage=usage,version="%prog 0.3") parser.add_option("-p", "--person", dest="username", default="User", help="set the name of the utterer") parser.add_option("-n", "--name", dest="botname", default="Ector", help="set the name of the bot") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=True, help="say all that you can say") parser.add_option("-q", "--quiet", action="store_false", dest="verbose", help="shut up!") parser.add_option("-l", "--log", dest="logname", default="ector.log", help="log the dialogue in log file") parser.add_option("-s", "--sentence", action="store_true", dest="sentence", default=True, help="set sentence reply mode on") parser.add_option("-g", "--generate", action="store_false", dest="sentence", help="set generate reply mode on") parser.add_option("-d", "--debug", action="store_true", dest="debug", default=False, help="set debug mode on") (options, args) = parser.parse_args() license = None stdin = sys.stdin stdout = sys.stdout username = options.username botname = options.botname.capitalize() logfilename = options.logname version = "0.3" sentence_mode = options.sentence generate_mode = not sentence_mode # sentence and generate modes are antagonist verbose = options.verbose debug = options.debug # Quiet mode is above sentence or generate modes if not verbose: sentence_mode = False generate_mode = False ector = Ector(botname, username) previousSentenceNode = None print """pyECTOR version %s, Copyright (C) 2008 Francois PARMENTIER
8e1235056f34134b4407cd34d81f66b1b71e2c24 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13131/8e1235056f34134b4407cd34d81f66b1b71e2c24/Ector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 8315, 22286, 26057, 635, 576, 587, 88, 387, 264, 907, 16186, 26039, 565, 273, 1381, 16695, 5670, 907, 16186, 26039, 225, 273, 1381, 5371, 907, 16186, 26039, 273, 4200, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 8315, 22286, 26057, 635, 576, 587, 88, 387, 264, 907, 16186, 26039, 565, 273, 1381, 16695, 5670, 907, 16186, 26039, 225, 273, 1381, 5371, 907, 16186, 26039, 273, 4200, 29...
assert i == 102
def jit_simple_inplace_add(): print "simple loop with inplace_add" i = 0 while i < 200: i += 3 print i assert i == 102
56beaea54414347d01255c4c9ac576e296adfc4b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/56beaea54414347d01255c4c9ac576e296adfc4b/jitcrashers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 525, 305, 67, 9647, 67, 267, 964, 67, 1289, 13332, 1172, 315, 9647, 2798, 598, 11783, 67, 1289, 6, 225, 277, 273, 374, 1323, 277, 411, 4044, 30, 277, 1011, 890, 1172, 277, 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, 525, 305, 67, 9647, 67, 267, 964, 67, 1289, 13332, 1172, 315, 9647, 2798, 598, 11783, 67, 1289, 6, 225, 277, 273, 374, 1323, 277, 411, 4044, 30, 277, 1011, 890, 1172, 277, 225, 2, -1...
self.notebook.props.page = self.notebook.props.page - 1 vt = self.notebook.get_nth_page(self.notebook.get_current_page()).vt
self._notebook.props.page = self._notebook.props.page - 1 vt = self._notebook.get_nth_page(self._notebook.get_current_page()).vt
def __prev_tab_cb(self, btn): if self.notebook.props.page == 0: self.notebook.props.page = self.notebook.get_n_pages() - 1 else: self.notebook.props.page = self.notebook.props.page - 1 vt = self.notebook.get_nth_page(self.notebook.get_current_page()).vt vt.grab_focus()
8b3134e082eb3e50149ea7f88b746b58649abe1c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6697/8b3134e082eb3e50149ea7f88b746b58649abe1c/terminal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10001, 67, 7032, 67, 7358, 12, 2890, 16, 10638, 4672, 309, 365, 18, 24422, 18, 9693, 18, 2433, 422, 374, 30, 365, 18, 24422, 18, 9693, 18, 2433, 273, 365, 18, 24422, 18, 588, 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, 10001, 67, 7032, 67, 7358, 12, 2890, 16, 10638, 4672, 309, 365, 18, 24422, 18, 9693, 18, 2433, 422, 374, 30, 365, 18, 24422, 18, 9693, 18, 2433, 273, 365, 18, 24422, 18, 588, 6...
modulo `m\*n`.
modulo `m*n`.
def crt(a,b,m=None,n=None): r""" Use the Chinese Remainder Theorem to find some `x` such that `x=a \bmod m` and `x=b \bmod n`. Note that `x` is only well-defined modulo `m\*n`. EXAMPLES:: sage: crt(2, 1, 3, 5) -4 sage: crt(13,20,100,301) -2087 You can also use upper case:: sage: c = CRT(2,3, 3, 5); c 8 sage: c % 3 == 2 True sage: c % 5 == 3 True Note that this also works for polynomial rings:: sage: K.<a> = NumberField(x^3 - 7) sage: R.<y> = K[] sage: f = y^2 + 3 sage: g = y^3 - 5 sage: CRT(1,3,f,g) -3/26*y^4 + 5/26*y^3 + 15/26*y + 53/26 sage: CRT(1,a,f,g) (-3/52*a + 3/52)*y^4 + (5/52*a - 5/52)*y^3 + (15/52*a - 15/52)*y + 27/52*a + 25/52 You can also do this for any number of moduli:: sage: K.<a> = NumberField(x^3 - 7) sage: R.<x> = K[] sage: CRT([], []) 0 sage: CRT([a], [x]) a sage: f = x^2 + 3 sage: g = x^3 - 5 sage: h = x^5 + x^2 - 9 sage: k = CRT([1, a, 3], [f, g, h]); k (127/26988*a - 5807/386828)*x^9 + (45/8996*a - 33677/1160484)*x^8 + (2/173*a - 6/173)*x^7 + (133/6747*a - 5373/96707)*x^6 + (-6/2249*a + 18584/290121)*x^5 + (-277/8996*a + 38847/386828)*x^4 + (-135/4498*a + 42673/193414)*x^3 + (-1005/8996*a + 470245/1160484)*x^2 + (-1215/8996*a + 141165/386828)*x + 621/8996*a + 836445/386828 sage: k.mod(f) 1 sage: k.mod(g) a sage: k.mod(h) 3 """ if isinstance(a,list): return CRT_list(a,b) g, alpha, beta = XGCD(m,n) if g != 1: raise ValueError, "arguments a and b must be coprime" return a+(b-a)*alpha*m
07a0e7a1987887a17f526710029b60138c7463cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/07a0e7a1987887a17f526710029b60138c7463cb/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30677, 12, 69, 16, 70, 16, 81, 33, 7036, 16, 82, 33, 7036, 4672, 436, 8395, 2672, 326, 1680, 25331, 2663, 25407, 1021, 479, 81, 358, 1104, 2690, 1375, 92, 68, 4123, 716, 1375, 92, 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, 30677, 12, 69, 16, 70, 16, 81, 33, 7036, 16, 82, 33, 7036, 4672, 436, 8395, 2672, 326, 1680, 25331, 2663, 25407, 1021, 479, 81, 358, 1104, 2690, 1375, 92, 68, 4123, 716, 1375, 92, 33...
self.info("Changing ID from %r to %r, with parentID %r", root.attrib['refID'], root.attrib['id'], root.attrib['parentID'])
if(kwargs.get('upnp_client','') != 'XBox'): self.info("Changing ID from %r to %r, with parentID %r", root.attrib['refID'], root.attrib['id'], root.attrib['parentID']) else: self.info("Changing ID from %r to %r, with parentID %r", self.id, root.attrib['id'], root.attrib['parentID'])
def toElement(self,**kwargs):
6e55ae75597d6be494296aaf4e56d916df5b3489 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11626/6e55ae75597d6be494296aaf4e56d916df5b3489/DIDLLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 1046, 12, 2890, 16, 636, 4333, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 1046, 12, 2890, 16, 636, 4333, 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,...
return;
return
def parent(self): """ Tests self.model's implementation of QtCore.QAbstractItemModel::parent() """ # Make sure the self.model wont crash and will return an invalid QtCore.QModelIndex # when asked for the parent of an invalid index assert(self.model.parent(QtCore.QModelIndex()) == QtCore.QModelIndex())
ed4ea4fec39587cca2aeb18d36a0fa5f722ca150 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/ed4ea4fec39587cca2aeb18d36a0fa5f722ca150/modeltest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 982, 12, 2890, 4672, 3536, 7766, 87, 365, 18, 2284, 1807, 4471, 434, 20193, 18, 53, 7469, 1180, 1488, 2866, 2938, 1435, 3536, 468, 4344, 3071, 326, 365, 18, 2284, 341, 1580, 17053, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 982, 12, 2890, 4672, 3536, 7766, 87, 365, 18, 2284, 1807, 4471, 434, 20193, 18, 53, 7469, 1180, 1488, 2866, 2938, 1435, 3536, 468, 4344, 3071, 326, 365, 18, 2284, 341, 1580, 17053, 471, ...
self.pastable = self.o.assy.shelf.members[-1-cx]
self.pastable = self.o.assy.shelf.members[cx]
def setPaste(self): "called from radiobutton presses and spinbox changes" self.w.pasteP = True self.w.depositAtomDashboard.pasteRB.setOn(True) cx = self.w.pasteComboBox.currentItem() if self.o.assy.shelf.members: try: self.pastable = self.o.assy.shelf.members[-1-cx] # bruce 041124 - changed [cx] to [-1-cx] (should just fix model tree) # bruce 041124: the following status bar message (by me) # is a good idea, but first we need to figure out how to # remove it from the statusbar when it's no longer # accurate! # ## self.w.history.message("Ready to paste %r" % self.pastable.name) except: # IndexError (or its name is messed up) # should never happen, but be robust [bruce 041124] self.pastable = None else: self.pastable = None # bruce 041124 # bruce 041124 adding more -- I think it's needed to fully fix bug 169: # update clipboard selection status to match the spinbox, # but prevent it from recursing into our spinbox updater self.dont_update_gui = 1 try: self.o.assy.shelf.unpick() if self.pastable: self.pastable.pick() finally: self.dont_update_gui = 0 self.o.assy.mt.mt_update() # update model tree return
7a270f9f6ee02acadf205e2adc265e363c9eee4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/7a270f9f6ee02acadf205e2adc265e363c9eee4e/depositMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17004, 14725, 12, 2890, 4672, 315, 11777, 628, 12094, 947, 2644, 11779, 281, 471, 12490, 2147, 3478, 6, 365, 18, 91, 18, 29795, 52, 273, 1053, 365, 18, 91, 18, 323, 1724, 3641, 14830, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17004, 14725, 12, 2890, 4672, 315, 11777, 628, 12094, 947, 2644, 11779, 281, 471, 12490, 2147, 3478, 6, 365, 18, 91, 18, 29795, 52, 273, 1053, 365, 18, 91, 18, 323, 1724, 3641, 14830, ...
xmlfile.write(' <update>%s</update>\n' % (status1.potcreationdate[0:10])) xmlfile.write(' <strings>\n') xmlfile.write(' <count>%u</count>\n' % (status1.count)) xmlfile.write(' <translated>%u</translated>\n' % (status1.count)) xmlfile.write(' <fuzzy>0</fuzzy>\n') xmlfile.write(' <untranslated>0</untranslated>\n') xmlfile.write(' </strings>\n')
xmlfile.write(' <update>%s</update>\n' % (status1.potcreationdate[0:10])) xmlfile.write(' <strings>\n') xmlfile.write(' <count>%u</count>\n' % (status1.count)) xmlfile.write(' <translated>%u</translated>\n' % (status1.count)) xmlfile.write(' <fuzzy>0</fuzzy>\n') xmlfile.write(' <untranslated>0</untranslated>\n') xmlfile.write(' </strings>\n')
def writeToXmlFile(self, xmlpath): xmlfile = open(xmlpath, 'w') for project in self.__projects: #For all projects... xmlfile.write('<translations project="%s">\n' % (project.name)) xmlfile.write(' <update>%s</update>\n' % (time.strftime('%Y-%m-%d'))) for status1 in project.status: #For all ... xmlfile.write(' <translation>\n') xmlfile.write(' <language>%s</language>\n' % (status1.language)) xmlfile.write(' <file>%s</file>\n' % (status1.filename)) if status1.filetype == 'PO': #If a PO file... xmlfile.write(' <update>%s</update>\n' % (status1.porevisiondate[0:10])) xmlfile.write(' <strings>\n') xmlfile.write(' <count>%u</count>\n' % (status1.count)) xmlfile.write(' <translated>%u</translated>\n' % (status1.translated)) xmlfile.write(' <fuzzy>%u</fuzzy>\n' % (status1.fuzzy)) xmlfile.write(' <untranslated>%u</untranslated>\n' % (status1.untranslated)) xmlfile.write(' </strings>\n') else: #If a POT file... xmlfile.write(' <update>%s</update>\n' % (status1.potcreationdate[0:10])) xmlfile.write(' <strings>\n') xmlfile.write(' <count>%u</count>\n' % (status1.count)) xmlfile.write(' <translated>%u</translated>\n' % (status1.count)) xmlfile.write(' <fuzzy>0</fuzzy>\n') xmlfile.write(' <untranslated>0</untranslated>\n') xmlfile.write(' </strings>\n') if status1.translators: #If translators exists... xmlfile.write(' <translators>\n') for translator in status1.translators: #For all translators... if (translator.ismaintainer): #If maintainer... xmlfile.write(' <translator maintainer="1">\n') else: #If NOT maintainer... xmlfile.write(' <translator>\n') xmlfile.write(' <name>%s</name>\n' % (translator.name)) if (translator.mail): #If mail address exists... xmlfile.write(' <mail>%s</mail>\n' % (translator.mail)) xmlfile.write(' </translator>\n') xmlfile.write(' </translators>\n') xmlfile.write(' </translation>\n') xmlfile.write('</translations>\n') xmlfile.close()
3dd31321b378fc1fb6df21dca72b973ea8dd5d0c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5857/3dd31321b378fc1fb6df21dca72b973ea8dd5d0c/GetTranslationsStatus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12870, 4432, 812, 12, 2890, 16, 2025, 803, 4672, 2025, 768, 273, 1696, 12, 2902, 803, 16, 296, 91, 6134, 364, 1984, 316, 365, 16186, 13582, 30, 468, 1290, 777, 10137, 2777, 2025, 768, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12870, 4432, 812, 12, 2890, 16, 2025, 803, 4672, 2025, 768, 273, 1696, 12, 2902, 803, 16, 296, 91, 6134, 364, 1984, 316, 365, 16186, 13582, 30, 468, 1290, 777, 10137, 2777, 2025, 768, ...
if not type(i) in t:
if not i in t:
def func(val): if not type(val) in [types.ListType, types.TupleType]: return False if type(t) in [types.ListType, types.TupleType]: for i in val: if not type(i) in t: return False elif type(t) == types.FunctionType: for i in val: if not t(i): return False else: for i in val: if type(i) != t: return False return True
d5fce590961b3fd0369b15cc0281019b67d95a79 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/401/d5fce590961b3fd0369b15cc0281019b67d95a79/simuOpt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 12, 1125, 4672, 309, 486, 618, 12, 1125, 13, 316, 306, 2352, 18, 19366, 16, 1953, 18, 9038, 559, 14542, 327, 1083, 309, 618, 12, 88, 13, 316, 306, 2352, 18, 19366, 16, 1953, 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, 1326, 12, 1125, 4672, 309, 486, 618, 12, 1125, 13, 316, 306, 2352, 18, 19366, 16, 1953, 18, 9038, 559, 14542, 327, 1083, 309, 618, 12, 88, 13, 316, 306, 2352, 18, 19366, 16, 1953, 18...
self.valueChanged.connect(self.i_changed)
def __init__(self, name, callback): QSlider.__init__(self) self.name = name self.callback = callback self.valueChanged.connect(self.i_changed)
eed8d6f23f28319e7dd30afc31b28c044dfdbb65 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12573/eed8d6f23f28319e7dd30afc31b28c044dfdbb65/qt_plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 1348, 4672, 2238, 21824, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 508, 365, 18, 3394, 273, 1348, 365, 18, 1132, 5033, 18, 3612, 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, 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, 508, 16, 1348, 4672, 2238, 21824, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 508, 365, 18, 3394, 273, 1348, 365, 18, 1132, 5033, 18, 3612, 12, ...
try: self.failedJobsPublished[jobId[0]+"_"+jobSpecId] += 0 except StandardError: self.archiveJob("Failed",jobId) msg=self.reportfilename logging.info("JobFailed: %s" % msg) self.msThread.publish("JobFailed", msg) self.msThread.commit() logging.info("published JobFailed with payload %s"%msg) self.failedJobsPublished[jobId[0]+"_"+jobSpecId] = 1
self.archiveJob("Failed",jobId) msg=self.reportfilename logging.info("JobFailed: %s" % msg) self.ms.publish("JobFailed", msg) self.ms.commit() logging.info("published JobFailed with payload %s"%msg)
def jobFailed(self, jobId): """ _jobFailed_ Pull the error report for the jobId from the DB, present it in some way that the rest of the prodAgent components can find it and transmit the JobFailure event to the prodAgent """ #if it's the first time we see this failed job we publish JobFailed event and add the job in failedJobsPublished dict
b299645affb60052912599346c5588880cf6034e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/b299645affb60052912599346c5588880cf6034e/TrackingComponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1719, 2925, 12, 2890, 16, 13845, 4672, 3536, 389, 4688, 2925, 67, 225, 14899, 326, 555, 2605, 364, 326, 13845, 628, 326, 2383, 16, 3430, 518, 316, 2690, 4031, 716, 326, 3127, 434, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1719, 2925, 12, 2890, 16, 13845, 4672, 3536, 389, 4688, 2925, 67, 225, 14899, 326, 555, 2605, 364, 326, 13845, 628, 326, 2383, 16, 3430, 518, 316, 2690, 4031, 716, 326, 3127, 434, 326, ...