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
myCacheMask="*/%s-analyseQscan_%s_%s*_seis_rds*.cache"%(sngl.ifo,sngl.ifo,timeString)
myCacheMask="*%s*/%s-analyseQscan_%s_%s*_seis_rds*.cache"%\ (self.coinc.type,sngl.ifo,sngl.ifo,timeString)
def get_analyzeQscan_SEIS(self): """ This seeks out the html and png files associated with SEIS result of an analyzeQscan job. """ cacheList=list() cacheFiles=list() for sngl in self.coinc.sngls: timeString=str(float(sngl.time)).replace(".","_") myCacheMask="*/%s-analyseQscan_%s_%s*_seis_rds*.cache"%(sngl.ifo,sngl.ifo,timeString) #Read the cache file or files cacheList.extend(fnmatch.filter(self.fsys,myCacheMask)) cacheFiles=self.__readCache__(cacheList) return cacheFiles
b5036db122ffd4acba48f4b4049b118c8bb775f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b5036db122ffd4acba48f4b4049b118c8bb775f4/makeCheckListWiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 304, 9508, 53, 9871, 67, 1090, 5127, 12, 2890, 4672, 3536, 1220, 6520, 87, 596, 326, 1729, 471, 14476, 1390, 3627, 598, 3174, 5127, 563, 434, 392, 12375, 53, 9871, 1719, 18, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 304, 9508, 53, 9871, 67, 1090, 5127, 12, 2890, 4672, 3536, 1220, 6520, 87, 596, 326, 1729, 471, 14476, 1390, 3627, 598, 3174, 5127, 563, 434, 392, 12375, 53, 9871, 1719, 18, 3...
grp = a.getGroup(args.group)
grp = a.getGroup(args.GROUP)
def insert(self, args): import omero c = self.ctx.conn(args) a = c.sf.getAdminService() grp = a.getGroup(args.group) self.addusersbyid(c, grp, args.user) self.ctx.out("Added %s users to %s" % (len(args.user), args.group))
62c199b66e3251f9ae4540a6ce0df6e17600fd2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/62c199b66e3251f9ae4540a6ce0df6e17600fd2e/group.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 12, 2890, 16, 833, 4672, 1930, 8068, 2439, 276, 273, 365, 18, 5900, 18, 4646, 12, 1968, 13, 279, 273, 276, 18, 21668, 18, 588, 4446, 1179, 1435, 14295, 273, 279, 18, 588, 1114, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 12, 2890, 16, 833, 4672, 1930, 8068, 2439, 276, 273, 365, 18, 5900, 18, 4646, 12, 1968, 13, 279, 273, 276, 18, 21668, 18, 588, 4446, 1179, 1435, 14295, 273, 279, 18, 588, 1114, ...
sys.exit(1)
sys.exit(1)
def check_quality(uri, user, pwd, dbname, modules): uid = login(uri, dbname, user, pwd) if uid: conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') qualityresult = {} final = {} test_detail = {} for module in modules: quality_result = execute(conn,'execute', dbname, uid, pwd,'module.quality.check','check_quality',module) detail_html = '' html = '''<html><html><html><html><body><a name="TOP"></a>''' html +="<h1> Module : %s </h1>"%(quality_result['name']) html += "<h2> Final score : %s</h2>"%(quality_result['final_score']) html += "<div id='tabs'>" html += "<ul>" for x,y,detail in quality_result['check_detail_ids']: test = detail.get('name') msg = detail.get('message','') score = round(float(detail.get('score',0)),2) html += "<li><a href=\"#%s\">%s</a></li>"%(test.replace(' ','-'),test) detail_html +="<div id=\"%s\"><h3>%s (Score : %s)</h3>%s</div>"%(test.replace(' ','-'),test,score,detail.get('detail')) test_detail[test] = (score,msg,detail.get('detail','')) html += "</ul>%s</body></html></html></html></html></html>"%(detail_html) html += "</div>" final[quality_result['name']] = (quality_result['final_score'],html,test_detail) fp = open('quality_log.pck','wb') pck_obj = pickle.dump(final,fp) fp.close() print "LOG PATH%s"%(os.path.realpath('quality_log.pck')) return final else: print 'Login Failed...' clean() sys.exit(1)
acfd835091f38c29a91dec8de08265c8a9800759 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/acfd835091f38c29a91dec8de08265c8a9800759/base_quality_interrogation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 16495, 12, 1650, 16, 729, 16, 14720, 16, 18448, 16, 4381, 4672, 4555, 273, 3925, 12, 1650, 16, 18448, 16, 729, 16, 14720, 13, 309, 4555, 30, 1487, 273, 2025, 13832, 830, 495, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 16495, 12, 1650, 16, 729, 16, 14720, 16, 18448, 16, 4381, 4672, 4555, 273, 3925, 12, 1650, 16, 18448, 16, 729, 16, 14720, 13, 309, 4555, 30, 1487, 273, 2025, 13832, 830, 495, ...
location=kwargs.get('location', location), location_name=kwargs['location_name'],
location=location, location_name=location_name,
def create_newsitem(self, attributes, **kwargs): """ Creates and saves a NewsItem with the given kwargs. Returns the new NewsItem.
5a90202aeded824785a2f1fea2c81c4c232757b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10327/5a90202aeded824785a2f1fea2c81c4c232757b4/newsitem_list_detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 18443, 1726, 12, 2890, 16, 1677, 16, 2826, 4333, 4672, 3536, 10210, 471, 14649, 279, 27061, 1180, 598, 326, 864, 1205, 18, 2860, 326, 394, 27061, 1180, 18, 2, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 18443, 1726, 12, 2890, 16, 1677, 16, 2826, 4333, 4672, 3536, 10210, 471, 14649, 279, 27061, 1180, 598, 326, 864, 1205, 18, 2860, 326, 394, 27061, 1180, 18, 2, -100, -100, -100, ...
can_read_incognito_database = False try: if len(self._GetRecords()) == 1: can_read_incognito_database = True except SQLExecutionError: pass self.assertFalse(can_read_incognito_database)
self.assertFalse(self._HasTable()) self._CreateTable() self.assertFalse(self._GetRecords())
def testRegularCannotReadIncognitoDatabase(self): """Attempt to read a database created in an incognito browser from a regular browser. """ self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) self.NavigateToURL(self.TEST_PAGE_URL, 1, 0) self._CreateTable(windex=1) self._InsertRecord('text', windex=1)
be25bc545483881097ba9ba1eadafbcfdaf1f6e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/be25bc545483881097ba9ba1eadafbcfdaf1f6e7/databases.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 17974, 4515, 1994, 14559, 13567, 4254, 12, 2890, 4672, 3536, 7744, 358, 855, 279, 2063, 2522, 316, 392, 7290, 13567, 4748, 628, 279, 6736, 4748, 18, 3536, 365, 18, 1997, 2189, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 17974, 4515, 1994, 14559, 13567, 4254, 12, 2890, 4672, 3536, 7744, 358, 855, 279, 2063, 2522, 316, 392, 7290, 13567, 4748, 628, 279, 6736, 4748, 18, 3536, 365, 18, 1997, 2189, 12, ...
fontsize=12, label="Subflow: " + activity.name + \
fontsize='12', label="Subflow: " + activity.name + \
def graph_get(self, cursor, user, graph, workflow_id, nested=False, workitem=None, context=None): import pydot if workitem is None: workitem = {} activity_obj = self.pool.get('workflow.activity') workflow_obj = self.pool.get('workflow') transition_obj = self.pool.get('workflow.transition') activity_ids = activity_obj.search(cursor, user, [ ('workflow', '=', workflow_id), ], context=context) id2activities = {} actfrom = {} actto = {} activities = activity_obj.browse(cursor, user, activity_ids, context=context) start = 0 stop = {} for activity in activities: if activity.flow_start: start = activity.id if activity.flow_stop: stop['subflow.' + activity.name] = activity.id id2activities[activity.id] = activity if activity.subflow and nested: workflow = workflow_obj.browse(cursor, user, activity.subflow.id, context=context) subgraph = pydot.Cluster('subflow' + str(workflow.id), fontsize=12, label="Subflow: " + activity.name + \ '\\nOSV: ' + workflow.osv) (substart, substop) = self.graph_get(cursor, user, subgraph, workflow.id, nested, workitem, context=context) graph.add_subgraph(subgraph) actfrom[activity.id] = substart actto[activity.id] = substop else: args = {} if activity.flow_start or activity.flow_stop: args['style'] = 'filled' args['color'] = 'lightgrey' args['label'] = activity.name if activity.subflow: args['shape'] = 'box' if activity.id in workitem: args['label'] += '\\nx ' + str(workitem[activity.id]) args['color'] = 'red' graph.add_node(pydot.Node(activity.id, **args)) actfrom[activity.id] = (activity.id, {}) actto[activity.id] = (activity.id, {}) transition_ids = transition_obj.search(cursor, user, [ ('act_from', 'in', [x.id for x in activities]), ], context=context) transitions = transition_obj.browse(cursor, user, transition_ids, context=context) for transition in transitions: args = {} args['label'] = str(transition.condition).replace(' or ', '\\nor ').replace(' and ', '\\nand ') if transition.signal: args['label'] += '\\n' + str(transition.signal) args['style'] = 'bold' if id2activities[transition.act_from.id].split_mode == 'AND': args['arrowtail'] = 'box' elif id2activities[transition.act_from.id].split_mode == 'OR': args['arrowtail'] = 'inv' if id2activities[transition.act_to.id].join_mode == 'AND': args['arrowhead'] = 'crow'
8a0520dd74304131875f7c10ab1191c62e7079e7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/8a0520dd74304131875f7c10ab1191c62e7079e7/workflow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2667, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 2667, 16, 6095, 67, 350, 16, 4764, 33, 8381, 16, 26409, 33, 7036, 16, 819, 33, 7036, 4672, 1930, 2395, 9811, 309, 26409, 353, 599, 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, 2667, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 2667, 16, 6095, 67, 350, 16, 4764, 33, 8381, 16, 26409, 33, 7036, 16, 819, 33, 7036, 4672, 1930, 2395, 9811, 309, 26409, 353, 599, 30,...
record, RecordReader.EndsWith, ("//",))
record, RecordReader.StartsWith, ("LOCUS ",))
def do_nothing(martel_info): return martel_info
83d7b4f7360840c6835b284f44ed8060641c4ecc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/83d7b4f7360840c6835b284f44ed8060641c4ecc/genbank.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 30874, 12, 81, 485, 292, 67, 1376, 4672, 327, 312, 485, 292, 67, 1376, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 30874, 12, 81, 485, 292, 67, 1376, 4672, 327, 312, 485, 292, 67, 1376, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
('f', 'rcfile', [], _('read maps from rcfile'))],
('f', 'rcfile', '', _('read maps from rcfile'))],
def kwweb_skip(orig, web, req, tmpl): '''Wraps webcommands.x turning off keyword expansion.''' kwt.match = util.never return orig(web, req, tmpl)
94ac4b8e5cb4369cfae9b4274d481b34f531f19b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/94ac4b8e5cb4369cfae9b4274d481b34f531f19b/keyword.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5323, 4875, 67, 7457, 12, 4949, 16, 3311, 16, 1111, 16, 10720, 4672, 9163, 20785, 3311, 7847, 18, 92, 7005, 310, 3397, 4932, 17965, 1093, 6309, 5323, 88, 18, 1916, 273, 1709, 18, 4644, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5323, 4875, 67, 7457, 12, 4949, 16, 3311, 16, 1111, 16, 10720, 4672, 9163, 20785, 3311, 7847, 18, 92, 7005, 310, 3397, 4932, 17965, 1093, 6309, 5323, 88, 18, 1916, 273, 1709, 18, 4644, ...
lowertext = string.lower(text)
lowertext = text.lower()
def sucktitle(path): f = open(path) text = f.read(1024) # assume the title is in the first 1024 bytes f.close() lowertext = string.lower(text) matcher = _titlepat.search(lowertext) if matcher: return matcher.group(1) return path
c4637cd08a9bbc96efb42cb813b77be74b9dae66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c4637cd08a9bbc96efb42cb813b77be74b9dae66/PyDocSearch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1597, 363, 2649, 12, 803, 4672, 284, 273, 1696, 12, 803, 13, 977, 273, 284, 18, 896, 12, 2163, 3247, 13, 468, 6750, 326, 2077, 353, 316, 326, 1122, 6250, 1731, 284, 18, 4412, 1435, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1597, 363, 2649, 12, 803, 4672, 284, 273, 1696, 12, 803, 13, 977, 273, 284, 18, 896, 12, 2163, 3247, 13, 468, 6750, 326, 2077, 353, 316, 326, 1122, 6250, 1731, 284, 18, 4412, 1435, 2...
self.set_socket (sock, map)
self.set_socket(sock, map)
def __init__ (self, sock=None, map=None): if sock: self.set_socket (sock, map) # I think it should inherit this anyway self.socket.setblocking (0) self.connected = 1 # XXX Does the constructor require that the socket passed # be connected? try: self.addr = sock.getpeername() except socket.error: # The addr isn't crucial pass else: self.socket = None
52c4de7c23c31563e4f0316b68865e17bb8c0f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52c4de7c23c31563e4f0316b68865e17bb8c0f33/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 7313, 33, 7036, 16, 852, 33, 7036, 4672, 309, 7313, 30, 365, 18, 542, 67, 7814, 12, 15031, 16, 852, 13, 468, 467, 15507, 518, 1410, 6811, 333, 13466, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 7313, 33, 7036, 16, 852, 33, 7036, 4672, 309, 7313, 30, 365, 18, 542, 67, 7814, 12, 15031, 16, 852, 13, 468, 467, 15507, 518, 1410, 6811, 333, 13466, ...
download_url='http://pypi.python.org/pypi/grok/',
download_url='http://pypi.python.org/pypi/grokcore.component',
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
b960a28631f1e97d7edbac66120d91abe5622c5c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9622/b960a28631f1e97d7edbac66120d91abe5622c5c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
slave_fd = _slave_open(slave_name)
slave_fd = slave_open(slave_name)
def openpty(): """openpty() -> (master_fd, slave_fd) Open a pty master/slave pair, using os.openpty() if possible.""" try: return os.openpty() except (AttributeError, OSError): pass master_fd, slave_name = _open_terminal() slave_fd = _slave_open(slave_name) return master_fd, slave_fd
ab2694c7aed425ee423740fbb9989eea78ae6d2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ab2694c7aed425ee423740fbb9989eea78ae6d2a/pty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 825, 13332, 3536, 3190, 825, 1435, 317, 261, 7525, 67, 8313, 16, 11735, 67, 8313, 13, 3502, 279, 293, 4098, 4171, 19, 27352, 3082, 16, 1450, 1140, 18, 3190, 825, 1435, 309, 3323, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 825, 13332, 3536, 3190, 825, 1435, 317, 261, 7525, 67, 8313, 16, 11735, 67, 8313, 13, 3502, 279, 293, 4098, 4171, 19, 27352, 3082, 16, 1450, 1140, 18, 3190, 825, 1435, 309, 3323, ...
return render_response('mako', '/index.mak')
return render_response('mako', '/index.mak') @authorize(RemoteUser())
def view(self,id): c.quote = self.session.query(Quote).select_by(Quote.c.id==id)[0] return render_response('mako', '/index.mak')
cc8e808d1dd4d4f4673c905389bc538b03ce3265 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4908/cc8e808d1dd4d4f4673c905389bc538b03ce3265/quote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 12, 2890, 16, 350, 4672, 276, 18, 6889, 273, 365, 18, 3184, 18, 2271, 12, 10257, 2934, 4025, 67, 1637, 12, 10257, 18, 71, 18, 350, 631, 350, 25146, 20, 65, 327, 1743, 67, 2740,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 12, 2890, 16, 350, 4672, 276, 18, 6889, 273, 365, 18, 3184, 18, 2271, 12, 10257, 2934, 4025, 67, 1637, 12, 10257, 18, 71, 18, 350, 631, 350, 25146, 20, 65, 327, 1743, 67, 2740,...
def notify(self, op, other): self.sourceChanged(op, 'notification', None, None, False, other)
def _setView(self, view):
fe5adb9fa5d8d716275efb76833feadd0883eaf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/fe5adb9fa5d8d716275efb76833feadd0883eaf3/Sets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 1767, 12, 2890, 16, 1476, 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, 389, 542, 1767, 12, 2890, 16, 1476, 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,...
def get(self): user = util.get_current_user()
def get(self): user = util.get_current_user() student = user
def get(self): user = util.get_current_user() if user: user_data = UserData.get_for_current_user() user_data_dict = {'moderator': user_data.moderator, 'joined': self.datetime_to_str(user_data.joined), 'last_login': self.datetime_to_str(user_data.last_login), 'proficient_exercises': user_data.proficient_exercises, 'all_proficient_exercises': user_data.all_proficient_exercises, 'suggested_exercises': user_data.suggested_exercises, 'assigned_exercises': user_data.assigned_exercises, 'need_to_reassess': user_data.need_to_reassess, 'points': user_data.points, 'coaches': user_data.coaches, } user_exercises = [] for ue in UserExercise.all().filter('user =', user): ue_dict = {'exercise': ue.exercise, 'streak': ue.streak, 'longest_streak': ue.longest_streak, 'first_done': self.datetime_to_str(ue.first_done), 'last_done': self.datetime_to_str(ue.last_done), 'total_done': ue.total_done, 'last_review': self.datetime_to_str(ue.last_review), 'review_interval_secs': ue.review_interval_secs, 'proficient_date': self.datetime_to_str(ue.proficient_date), } user_exercises.append(ue_dict) problems = [] for problem in ProblemLog.all().filter('user =', user): problem_dict = {'exercise': problem.exercise, 'correct': problem.correct, 'time_done': self.datetime_to_str(problem.time_done), 'time_taken': problem.time_taken, } problems.append(problem_dict) export_dict = {'UserData': user_data_dict, 'UserExercise': user_exercises, 'ProblemLog': problems} self.response.out.write(json.dumps(export_dict, sort_keys=True, indent=4)) else: self.redirect(util.create_login_url(self.request.uri))
aa56b8ce3c56598cdf57706e6219774a42d5bac2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/aa56b8ce3c56598cdf57706e6219774a42d5bac2/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 729, 273, 1709, 18, 588, 67, 2972, 67, 1355, 1435, 18110, 273, 729, 309, 729, 30, 729, 67, 892, 273, 31109, 18, 588, 67, 1884, 67, 2972, 67, 1355, 1435, 729, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 729, 273, 1709, 18, 588, 67, 2972, 67, 1355, 1435, 18110, 273, 729, 309, 729, 30, 729, 67, 892, 273, 31109, 18, 588, 67, 1884, 67, 2972, 67, 1355, 1435, 729, 67,...
if type(optionlist) == type(()): option = optionlist[idx][0] else: option = optionlist[idx]
option = optionlist[idx] if type(option) == type(()): option = option[0]
def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfolder=1, id=ARGV_ID): d = GetNewDialog(id, -1) if not d: print "Can't get DLOG resource with id =", id return
4227340a8bad85ccbc649c9eb7648c9f3229f58d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4227340a8bad85ccbc649c9eb7648c9f3229f58d/EasyDialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4117, 90, 12, 3482, 1098, 33, 7036, 16, 1296, 1098, 33, 7036, 16, 527, 1673, 768, 33, 21, 16, 527, 2704, 768, 33, 21, 16, 527, 5609, 33, 21, 16, 612, 33, 10973, 58, 67, 734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4117, 90, 12, 3482, 1098, 33, 7036, 16, 1296, 1098, 33, 7036, 16, 527, 1673, 768, 33, 21, 16, 527, 2704, 768, 33, 21, 16, 527, 5609, 33, 21, 16, 612, 33, 10973, 58, 67, 734, ...
logger.notifyChannel('init', netsvc.LOG_ERROR, "the columns %s on object must be set as ondelete='cascasde'" % (self._name, self._parent_name))
logger.notifyChannel('orm', netsvc.LOG_ERROR, "the columns %s on object must be set as ondelete='cascasde'" % (self._name, self._parent_name))
def _auto_init(self, cr, context={}): store_compute = False logger = netsvc.Logger() create = False todo_end = [] self._field_create(cr, context=context) if not hasattr(self, "_auto") or self._auto: cr.execute("SELECT relname FROM pg_class WHERE relkind in ('r','v') AND relname='%s'" % self._table) if not cr.rowcount: cr.execute("CREATE TABLE \"%s\" (id SERIAL NOT NULL, PRIMARY KEY(id)) WITH OIDS" % self._table) create = True cr.commit() if self._parent_store: cr.execute("""SELECT c.relname FROM pg_class c, pg_attribute a WHERE c.relname=%s AND a.attname=%s AND c.oid=a.attrelid """, (self._table, 'parent_left')) if not cr.rowcount: if 'parent_left' not in self._columns: logger.notifyChannel('init', netsvc.LOG_ERROR, 'create a column parent_left on object %s: fields.integer(\'Left Parent\', select=1)' % (self._table, )) if 'parent_right' not in self._columns: logger.notifyChannel('init', netsvc.LOG_ERROR, 'create a column parent_right on object %s: fields.integer(\'Right Parent\', select=1)' % (self._table, )) if self._columns[self._parent_name].ondelete<>'cascade': logger.notifyChannel('init', netsvc.LOG_ERROR, "the columns %s on object must be set as ondelete='cascasde'" % (self._name, self._parent_name)) cr.execute('ALTER TABLE "%s" ADD COLUMN "parent_left" INTEGER' % (self._table,)) cr.execute('ALTER TABLE "%s" ADD COLUMN "parent_right" INTEGER' % (self._table,)) cr.commit() store_compute = True
ab41714295af23aa5c95790777fbe2e65dff8efa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/ab41714295af23aa5c95790777fbe2e65dff8efa/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6079, 67, 2738, 12, 2890, 16, 4422, 16, 819, 12938, 4672, 1707, 67, 9200, 273, 225, 1083, 1194, 273, 21954, 4227, 18, 3328, 1435, 752, 273, 1083, 10621, 67, 409, 273, 5378, 365, 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, 389, 6079, 67, 2738, 12, 2890, 16, 4422, 16, 819, 12938, 4672, 1707, 67, 9200, 273, 225, 1083, 1194, 273, 21954, 4227, 18, 3328, 1435, 752, 273, 1083, 10621, 67, 409, 273, 5378, 365, 6...
c.privmsg(target, parser.descs[0]) c.privmsg(target, parser.links[0])
if len(parser.descs) and parser.descs[0]: c.privmsg(target, parser.descs[0]) if len(parser.links) and parser.links[0]: c.privmsg(target, parser.links[0])
def handle_data(self, text): if self.inh2: self.title.append(text) elif self.indesc: self.desc.append(text)
5b4142ee9f8c8d3bda9ad11e96ad49d9ec635240 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10627/5b4142ee9f8c8d3bda9ad11e96ad49d9ec635240/events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 892, 12, 2890, 16, 977, 4672, 309, 365, 18, 267, 76, 22, 30, 365, 18, 2649, 18, 6923, 12, 955, 13, 1327, 365, 18, 728, 742, 30, 365, 18, 5569, 18, 6923, 12, 955, 13, 2,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1640, 67, 892, 12, 2890, 16, 977, 4672, 309, 365, 18, 267, 76, 22, 30, 365, 18, 2649, 18, 6923, 12, 955, 13, 1327, 365, 18, 728, 742, 30, 365, 18, 5569, 18, 6923, 12, 955, 13, 2,...
'%(mandir)s/man(2|3)/',
def updateArgs(self, *args, **keywords):
34e2bdfe7b0992ad4de4f60cf7e4eb20d94a958f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/34e2bdfe7b0992ad4de4f60cf7e4eb20d94a958f/packagepolicy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2615, 12, 2890, 16, 380, 1968, 16, 2826, 11771, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2615, 12, 2890, 16, 380, 1968, 16, 2826, 11771, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
r""" The sequence of Uppuluri-Carpenter numbers. The Uppuluri-Carpenter number $C_n$ counts the imbalance in the number of ways to put $n$ distinguishable things into an even number of indistinguishable boxes versus into an odd number of indistinguishable boxes, such that no box is empty. Let $S(n, k)$ denote the Stirling number of the second kind. Then $$C_n = \sum{k=0}^{n} (-1)^k S(n, k) .$$ INPUT: n -- integer >= 0 OUTPUT: integer -- $C_n$ EXAMPLES: sage: a = sloane.A000587; a Sequence of Uppuluri-Carpenter numbers sage: a.offset 0 sage: a(0) 1 sage: a(100) 397577026456518507969762382254187048845620355238545130875069912944235105204434466095862371032124545552161 sage: a.list(10) [1, -1, 0, 1, 1, -2, -9, -9, 50, 267] AUTHOR: -- Nick Alexander """ def __init__(self):
def __init__(self): r""" The sequence of Uppuluri-Carpenter numbers. The Uppuluri-Carpenter number $C_n$ counts the imbalance in the number of ways to put $n$ distinguishable things into an even number of indistinguishable boxes versus into an odd number of indistinguishable boxes, such that no box is empty. Let $S(n, k)$ denote the Stirling number of the second kind. Then $$C_n = \sum{k=0}^{n} (-1)^k S(n, k) .$$ INPUT: n -- integer >= 0 OUTPUT: integer -- $C_n$ EXAMPLES: sage: a = sloane.A000587; a Sequence of Uppuluri-Carpenter numbers sage: a.offset 0 sage: a(0) 1 sage: a(100) 397577026456518507969762382254187048845620355238545130875069912944235105204434466095862371032124545552161 sage: a.list(10) [1, -1, 0, 1, 1, -2, -9, -9, 50, 267] AUTHOR: -- Nick Alexander """
def _repr_(self): return "Sequence of Bell numbers"
7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 327, 315, 4021, 434, 605, 1165, 5600, 6, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 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, 389, 12715, 67, 12, 2890, 4672, 327, 315, 4021, 434, 605, 1165, 5600, 6, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if level in lu.needed_locks:
if level not in locking.LEVELS: result = self._ExecLU(lu) elif level in lu.needed_locks:
def _LockAndExecLU(self, lu, level): """Execute a Logical Unit, with the needed locks.
8a2941c44a3bfedcce91fdcf464b283b2fd76160 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/8a2941c44a3bfedcce91fdcf464b283b2fd76160/mcpu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2531, 1876, 1905, 11778, 12, 2890, 16, 20072, 16, 1801, 4672, 3536, 5289, 279, 17085, 8380, 16, 598, 326, 3577, 13046, 18, 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, 389, 2531, 1876, 1905, 11778, 12, 2890, 16, 20072, 16, 1801, 4672, 3536, 5289, 279, 17085, 8380, 16, 598, 326, 3577, 13046, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
editmodule.template_defaults for the recognised templates.
edit_module.template_defaults for the recognised templates.
def set_edit_template(template_string): r""" Sets default edit template string. It should reference ${file} and ${line}. This routine normally needs to be called prior to using 'edit'. However, if the editor set in the shell variable EDITOR is known, then the system will substitute an appropriate template for you. See editmodule.template_defaults for the recognised templates. AUTHOR: Nils Bruin (2007-10-03) EXAMPLE: sage: from sage.misc.editmodule import set_edit_template sage: set_edit_template("echo EDIT ${file}:${line}") sage.: edit(sage) # not automatically tested. EDIT /usr/local/sage/default/devel/sage/sage/__init__.py:1 """ global edit_template if template_string in template_defaults.keys(): template_string = template_defaults[template_string] edit_template = Template(template_string)
b004e29230804d5c920603dcc5f2b1be485358f6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b004e29230804d5c920603dcc5f2b1be485358f6/edit_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4619, 67, 3202, 12, 3202, 67, 1080, 4672, 436, 8395, 11511, 805, 3874, 1542, 533, 18, 225, 2597, 1410, 2114, 3531, 768, 97, 471, 3531, 1369, 5496, 1220, 12245, 15849, 4260, 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, 444, 67, 4619, 67, 3202, 12, 3202, 67, 1080, 4672, 436, 8395, 11511, 805, 3874, 1542, 533, 18, 225, 2597, 1410, 2114, 3531, 768, 97, 471, 3531, 1369, 5496, 1220, 12245, 15849, 4260, 358,...
'ut':'Universal',
'ut':'Universal',
def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')]
dac48d40f92c430f5ac9efaf8d551dd274897852 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/dac48d40f92c430f5ac9efaf8d551dd274897852/DateTime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 12, 2890, 16, 88, 33, 7036, 4672, 2067, 33, 2890, 18, 1615, 12, 88, 25146, 20, 65, 998, 87, 273, 2890, 18, 1561, 63, 2890, 18, 88, 1376, 63, 3465, 6362, 22, 14542, 65, 327, 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, 1123, 12, 2890, 16, 88, 33, 7036, 4672, 2067, 33, 2890, 18, 1615, 12, 88, 25146, 20, 65, 998, 87, 273, 2890, 18, 1561, 63, 2890, 18, 88, 1376, 63, 3465, 6362, 22, 14542, 65, 327, 3...
({(?P<arg>[^\\\\{}]*)}|[^A-Za-z{])?"
({(?P<arg>[^\\\\{}]*)}|(?=[^A-Za-z]))"
def update_seq (self): """ Update the regular expression used to match macro calls using the keys in the `hook' dictionary. We don't match all control sequences for obvious efficiency reasons. """ self.seq = re.compile("\
8b37ef090907546ad41b0670f69825c5ee4442db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10102/8b37ef090907546ad41b0670f69825c5ee4442db/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 5436, 261, 2890, 4672, 3536, 2315, 326, 6736, 2652, 1399, 358, 845, 11522, 4097, 1450, 326, 1311, 316, 326, 1375, 4476, 11, 3880, 18, 1660, 2727, 1404, 845, 777, 3325, 8463, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 5436, 261, 2890, 4672, 3536, 2315, 326, 6736, 2652, 1399, 358, 845, 11522, 4097, 1450, 326, 1311, 316, 326, 1375, 4476, 11, 3880, 18, 1660, 2727, 1404, 845, 777, 3325, 8463, 36...
testdir = os.path.join(HERE, 'absolute') themefn = os.path.join(testdir, "theme.html") rulesfn = os.path.join(testdir, "rules.xml")
themefn = os.path.join(HERE, "absolute_theme.html") rulesfn = os.path.join(HERE, "absolute_rules.xml")
def testDisabled(self): testdir = os.path.join(HERE, 'absolute') themefn = os.path.join(testdir, "theme.html") rulesfn = os.path.join(testdir, "rules.xml") compiled = xdv.compiler.compile_theme(rules=rulesfn, theme=themefn) styleTag = compiled.xpath('//style')[0] styleLines = [x.strip() for x in styleTag.getchildren()[0].text.split('\n') if x.strip()] expectedLines = [ '@import "foo.css";', '@import url("foo.css");', "@import url('./foo.css');", "@import url('../foo.css');", "@import url('/foo.css');", "@import url('http://site.com/foo.css');" ] for line, expected in zip(styleLines, expectedLines): self.assertEquals(line, expected) linkTags = compiled.xpath('//link') self.assertEquals([ 'foo.css', './foo.css', '../foo.css', '/foo.css', 'http://site.com/foo.css' ], [x.get('href') for x in linkTags]) scriptTags = compiled.xpath('//script') self.assertEquals([ 'foo.js', './foo.js', '../foo.js', '/foo.js', 'http://site.com/foo.js' ], [x.get('src') for x in scriptTags]) imgTags = compiled.xpath('//img') self.assertEquals([ 'foo.jpg', './foo.jpg', '../foo.jpg', '/foo.jpg', 'http://site.com/foo.jpg' ], [x.get('src') for x in imgTags])
c3d409a9025a55cb67b29a5f102ae66c189345b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12188/c3d409a9025a55cb67b29a5f102ae66c189345b7/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 8853, 12, 2890, 4672, 5006, 4293, 273, 1140, 18, 803, 18, 5701, 12, 4298, 16, 315, 12547, 67, 7997, 18, 2620, 7923, 2931, 4293, 273, 1140, 18, 803, 18, 5701, 12, 4298, 16, 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, 8853, 12, 2890, 4672, 5006, 4293, 273, 1140, 18, 803, 18, 5701, 12, 4298, 16, 315, 12547, 67, 7997, 18, 2620, 7923, 2931, 4293, 273, 1140, 18, 803, 18, 5701, 12, 4298, 16, 315, ...
if newStatus in FINAL_PILOT_STATUS:
if newStatus in FINAL_PILOT_STATUS:
def updatePilotStatus(self): """ Update status of pilots in transient states """ for queue in self.queueDict: ce = self.queueDict[queue]['CE'] ceName = self.queueDict[queue]['CEName'] queueName = self.queueDict[queue]['QueueName'] result = pilotAgentsDB.selectPilots({'DestinationSite':ceName, 'Queue':queueName, 'GridType':'DIRAC', 'GridSite':self.siteName, 'Status':TRANSIENT_PILOT_STATUS}) if not result['OK']: self.log.error('Failed to select pilots: %s' % result['Message']) continue pilotRefs = result['Value'] if not pilotRefs: continue #print "AT >>> pilotRefs", pilotRefs result = pilotAgentsDB.getPilotInfo(pilotRefs) if not result['OK']: self.log.error('Failed to get pilots info: %s' % result['Message']) continue pilotDict = result['Value'] #print "AT >>> pilotDict", pilotDict result = ce.getJobStatus(pilotRefs) if not result['OK']: self.log.error('Failed to get pilots status from CE: %s' % result['Message']) continue pilotCEDict = result['Value'] #print "AT >>> pilotCEDict", pilotCEDict for pRef in pilotRefs: newStatus = '' oldStatus = pilotDict[pRef]['Status'] ceStatus = pilotCEDict[pRef] if oldStatus == ceStatus: # Status did not change, continue continue elif ceStatus == "Unknown" and not oldStatus in FINAL_PILOT_STATUS: # Pilot finished without reporting, consider it Aborted newStatus = 'Aborted' elif ceStatus != 'Unknown' : # Update the pilot status to the new value newStatus = ceStatus if newStatus: self.log.info('Updating status to %s for pilot %s' % (newStatus,pRef) ) result = pilotAgentsDB.setPilotStatus(pRef,newStatus,'','Updated by SiteDirector') # Retrieve the pilot output now if newStatus in FINAL_PILOT_STATUS: if pilotDict[pRef]['OutputReady'].lower() == 'false' and self.getOutput: self.log.info('Retrieving output for pilot %s' % pRef ) pilotStamp = pilotDict[pRef]['PilotStamp'] pRefStamp = pRef if pilotStamp: pRefStamp = pRef+':::'+pilotStamp result = ce.getJobOutput(pRefStamp) if not result['OK']: self.log.error('Failed to get pilot output: %s' % result['Message']) else: output,error = result['Value'] result = pilotAgentsDB.storePilotOutput(pRef,output,error) if not result['OK']: self.log.error('Failed to store pilot output: %s' % result['Message'])
fecf3d418a4e3a08002c58982e809e7e4b152546 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/fecf3d418a4e3a08002c58982e809e7e4b152546/SiteDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 52, 22797, 1482, 12, 2890, 4672, 3536, 2315, 1267, 434, 24970, 6968, 316, 12315, 5493, 3536, 364, 2389, 316, 365, 18, 4000, 5014, 30, 5898, 273, 365, 18, 4000, 5014, 63, 4000, 2396...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 52, 22797, 1482, 12, 2890, 4672, 3536, 2315, 1267, 434, 24970, 6968, 316, 12315, 5493, 3536, 364, 2389, 316, 365, 18, 4000, 5014, 30, 5898, 273, 365, 18, 4000, 5014, 63, 4000, 2396...
sf = spec.SpecDataFile('/home/tardis/spartzsch/2010_09_X1A2/ymn2o5_sep10_1', ccdbase = '/mounts/davros/nasshare/images/sept10')
sf = spec.SpecDataFile('/home/tardis/spartzsch/2010_09_X1A2/ymn2o5_sep10_1', ccdpath = '/mounts/davros/nasshare/images/sept10')
def processOneImage(self, imNum): """Process one image to (Qx, Qy, Qz, I) modes of frames are: theta- (1), phi- (2), cartesian- (3) and hkl-frame (4)"""
0ac0ccb3ff3f7c2a5554b84199874f3c9dfab4e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8436/0ac0ccb3ff3f7c2a5554b84199874f3c9dfab4e1/transformations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3335, 2040, 12, 2890, 16, 709, 2578, 4672, 3536, 2227, 1245, 1316, 358, 261, 53, 92, 16, 2238, 93, 16, 2238, 94, 16, 467, 13, 12382, 434, 7793, 854, 30, 7338, 17, 261, 21, 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, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3335, 2040, 12, 2890, 16, 709, 2578, 4672, 3536, 2227, 1245, 1316, 358, 261, 53, 92, 16, 2238, 93, 16, 2238, 94, 16, 467, 13, 12382, 434, 7793, 854, 30, 7338, 17, 261, 21, 3631...
variable = getattr(var, test), command=(lambda row=row: onPress(row-1))).grid(row=row, column=0, sticky=W)
variable = getattr(var, test), command=(lambda row=row: onPress_cmd(row-1))).grid(row=row, column=0, sticky=W)
def main(): global root, info_line, menu_frame root = Tkinter.Tk() root.title('Monitor configure') #-- Create the menu frame, and add menus to the menu frame menu_frame = Tkinter.Frame(root) menu_frame.pack(fill=Tkinter.X, side=Tkinter.TOP) menu_frame.tk_menuBar(file_menu(), help_menu()) #-- Create the info frame and fill with initial contents info_frame = Tkinter.Frame(root) info_frame.pack(fill=Tkinter.X, side=Tkinter.BOTTOM, pady=1) #-- config tests frame config = Tkinter.Frame(info_frame, relief=Tkinter.RAISED, borderwidth=2) config.pack(side=Tkinter.LEFT, padx=2, pady=1) Label(config, text="Test", width=15, background="lightblue").grid(row=0, column=0) Label(config, text="Description", width=35, background="lightblue").grid(row=0, column=1) var = IntVar() row = 1 for test, pack, inc, status, desc in packages: setattr(var, test, IntVar()) Checkbutton(config, text=test, state=status, anchor=W, variable = getattr(var, test), command=(lambda row=row: onPress(row-1))).grid(row=row, column=0, sticky=W) getattr(var, test).set(inc) Label(config, text=desc, state=status, width=35, anchor=W).grid(row=row, column=1, sticky=W) row = row + 1 #-- arch frame global arc_v arc_v = IntVar() arc = Tkinter.Frame(info_frame, relief=Tkinter.RAISED, borderwidth=2) arc.pack(side=Tkinter.TOP, padx=3, pady=2) Label(arc, text="Arch", width=15, background="lightblue").grid(row=0, column=0) for ar, value in arch: Radiobutton(arc, text=ar, value=value, variable=arc_v, anchor=W).grid(row=value+1, column=0, sticky=W) arc_v.set(0) #-- compiler frame global cmpl compil = Tkinter.Frame(info_frame, relief=Tkinter.RAISED, borderwidth=2) compil.pack(side=Tkinter.TOP, padx=3, pady=2) Label(compil, text="Compiler", width=15, background="lightblue").grid(row=0, column=0) cmpl = StringVar() Entry(compil, width=15, textvariable=cmpl).grid(row=1, column=0) cmpl.set("sparc-elf") #-- Target global trg targ = Tkinter.Frame(info_frame, relief=Tkinter.RAISED, borderwidth=2) targ.pack(side=Tkinter.TOP, padx=3, pady=2) Label(targ, text="Target", width=15, background="lightblue").grid(row=0, column=0) trg = StringVar() Entry(targ, width=15, textvariable=trg).grid(row=1, column=0) trg.set("monitor") #-- level frame global error_level, trace_level, warn_level, debug_level, test_system_level, leon3_level level = Tkinter.Frame(info_frame, relief=Tkinter.RAISED, borderwidth=2) level.pack(side=Tkinter.TOP, padx=3, pady=2) Label(level, text="Verbous level", width=15, background="lightblue").grid(row=0, column=0) error_level, trace_level, warn_level, debug_level, test_system_level, leon3_level = (IntVar(), IntVar(), IntVar(), IntVar(), IntVar(), IntVar()) Checkbutton(level, text="Error", state=NORMAL, anchor=W, variable = error_level).grid(row=1, column=0, sticky=W) error_level.set(1) Checkbutton(level, text="Trace", state=NORMAL, anchor=W, variable = trace_level).grid(row=2, column=0, sticky=W) trace_level.set(1) Checkbutton(level, text="Warn", state=NORMAL, anchor=W, variable = warn_level).grid(row=3, column=0, sticky=W) Checkbutton(level, text="Debug", state=NORMAL, anchor=W, variable = debug_level).grid(row=4, column=0, sticky=W) Checkbutton(level, text="Test system", state=NORMAL, anchor=W, variable = test_system_level).grid(row=5, column=0, sticky=W) test_system_level.set(1) Checkbutton(level, text="Leon3", state=NORMAL, anchor=W, variable = leon3_level).grid(row=6, column=0, sticky=W) leon3_level.set(1) #-- build global debug, release, simulation, docs build = Tkinter.Frame(info_frame, relief=Tkinter.RAISED, borderwidth=2) build.pack(side=Tkinter.TOP, padx=3, pady=2) Label(build, text="Build", width=15, background="lightblue").grid(row=0, column=0) debug, release, simulation, docs = (IntVar(), IntVar(), IntVar(), IntVar()) Checkbutton(build, text="Debug", state=NORMAL, anchor=W, variable = debug).grid(row=1, column=0, sticky=W) debug.set(1) Checkbutton(build, text="Release", state=NORMAL, anchor=W, variable = release).grid(row=2, column=0, sticky=W) release.set(1) Checkbutton(build, text="Simulation", state=NORMAL, anchor=W, variable = simulation).grid(row=3, column=0, sticky=W) Checkbutton(build, text="Doxygen", state=NORMAL, anchor=W, variable = docs).grid(row=4, column=0, sticky=W) root.mainloop()
cc40dec060e09efd47951c4b5d743a4e421e18c6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2128/cc40dec060e09efd47951c4b5d743a4e421e18c6/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 1365, 16, 1123, 67, 1369, 16, 3824, 67, 3789, 1365, 273, 399, 79, 2761, 18, 56, 79, 1435, 1365, 18, 2649, 2668, 7187, 5068, 6134, 225, 468, 413, 1788, 326, 3824, 262...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2552, 1365, 16, 1123, 67, 1369, 16, 3824, 67, 3789, 1365, 273, 399, 79, 2761, 18, 56, 79, 1435, 1365, 18, 2649, 2668, 7187, 5068, 6134, 225, 468, 413, 1788, 326, 3824, 262...
if tools.config['db_password']: logger.notifyChannel("web-service", netsvc.LOG_ERROR, 'RESTORE DB: %s doesn\'t work with password' % (db_name,)) raise Exception, "Couldn't restore database with password"
def restore(self, password, db_name, data): security.check_super(password) logger = netsvc.Logger()
be08323c6207f01f0d1f1c20ecc8ee14e4f7d790 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/be08323c6207f01f0d1f1c20ecc8ee14e4f7d790/web_services.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 12, 2890, 16, 2201, 16, 1319, 67, 529, 16, 501, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 12, 2890, 16, 2201, 16, 1319, 67, 529, 16, 501, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 2, -100, -100, -100, -100, -100, -100, -100,...
return self.tk.call(self._w, 'info', 'anchor')
return self.tk.call(self._w, 'info', 'anchor')
def info_anchor(self):
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 67, 16215, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 67, 16215, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def setGeomery(self, ellipse):
def setGeometry(self, ellipse):
def setGeomery(self, ellipse): ellipse.setTheZ(self.coord.theZ); ellipse.setTheT(self.coord.theZ); ellipse.setCx(self.cx); ellipse.setCy(self.cy); ellipse.setRx(self.rx); ellipse.setRy(self.ry);
f0bdd8df3ad2c2d884653d30a298452010b0e426 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/f0bdd8df3ad2c2d884653d30a298452010b0e426/ROI_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 9823, 12, 2890, 16, 26838, 4672, 26838, 18, 542, 1986, 62, 12, 2890, 18, 5732, 18, 5787, 62, 1769, 26838, 18, 542, 1986, 56, 12, 2890, 18, 5732, 18, 5787, 62, 1769, 26838, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 9823, 12, 2890, 16, 26838, 4672, 26838, 18, 542, 1986, 62, 12, 2890, 18, 5732, 18, 5787, 62, 1769, 26838, 18, 542, 1986, 56, 12, 2890, 18, 5732, 18, 5787, 62, 1769, 26838, 18, 5...
elif e.tag() == "CHIL": self.__children.append(e.value())
def __parse(self): for e in self.children(): if e.value() != None: if e.tag() == "HUSB": self.__husband = e.value() elif e.tag() == "WIFE": self.__wife = e.value() elif e.tag() == "CHIL": self.__children.append(e.value())
6e13e5073937ac3ff3d53c28d787cb23d82dd721 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14621/6e13e5073937ac3ff3d53c28d787cb23d82dd721/simplepyged.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 12, 2890, 4672, 364, 425, 316, 365, 18, 5906, 13332, 309, 425, 18, 1132, 1435, 480, 599, 30, 309, 425, 18, 2692, 1435, 422, 315, 44, 24128, 6877, 365, 16186, 76, 407, 12752...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 12, 2890, 4672, 364, 425, 316, 365, 18, 5906, 13332, 309, 425, 18, 1132, 1435, 480, 599, 30, 309, 425, 18, 2692, 1435, 422, 315, 44, 24128, 6877, 365, 16186, 76, 407, 12752...
if isCloser(m.group(1)):
if isCloser(m.group(2)):
#enddef - closes a scope
0ae3bc473d70b671840d2febe0a653a31a4589b5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9355/0ae3bc473d70b671840d2febe0a653a31a4589b5/wmliterator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 409, 536, 300, 13445, 279, 2146, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 409, 536, 300, 13445, 279, 2146, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.binaries['testing'][arch][0][p[0]]['source'] == pkg_name or \
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst()
0ef270283d494acfb65d58fb8123811e47c21a74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/0ef270283d494acfb65d58fb8123811e47c21a74/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, -100, -100, -100, -100, -100, -100, -100, ...
cmd = "glite-proxy-cert -o " + tmpfile + " -e PROXY_REQUEST " \ + self.getUserProxy()
cmd = "glite-proxy-cert -o " + tmpfile + " -e PROXY_REQUEST "
def delegateProxy( self, wmproxy ): """ delegate proxy to a wms """
d49eb0538dc5a1b9a48384c63e49a204fbe31d6c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/d49eb0538dc5a1b9a48384c63e49a204fbe31d6c/SchedulerGLiteAPI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7152, 3886, 12, 365, 16, 18200, 5656, 262, 30, 3536, 7152, 2889, 358, 279, 341, 959, 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,...
[ 1, 1, 1, 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, 7152, 3886, 12, 365, 16, 18200, 5656, 262, 30, 3536, 7152, 2889, 358, 279, 341, 959, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
@echo
def fcomp(l, r): if (l.is_leaf() or r.is_leaf() or l.right != r.left or l.direction != FORWARD or l.direction != r.direction): return None return fake_unify(l, r, l.left / r.right)
bd94265a5bf830eb3eaa8754e2892a32b6ab575e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8383/bd94265a5bf830eb3eaa8754e2892a32b6ab575e/fix_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 2919, 12, 80, 16, 436, 4672, 309, 261, 80, 18, 291, 67, 12070, 1435, 578, 436, 18, 291, 67, 12070, 1435, 578, 328, 18, 4083, 480, 436, 18, 4482, 578, 328, 18, 9855, 480, 12108, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 2919, 12, 80, 16, 436, 4672, 309, 261, 80, 18, 291, 67, 12070, 1435, 578, 436, 18, 291, 67, 12070, 1435, 578, 328, 18, 4083, 480, 436, 18, 4482, 578, 328, 18, 9855, 480, 12108, ...
PageSetup.print_data = wx.PrintData(data.GetPrintData())
self.print_data = wx.PrintData(data.GetPrintData())
def showPrint(self): pdd = wx.PrintDialogData(self.getPrintData()) printer = wx.Printer(pdd) printout = STCPrintout(self.stc) result = printer.Print(self.stc, printout) if result: data = printer.GetPrintDialogData() PageSetup.print_data = wx.PrintData(data.GetPrintData()) elif printer.GetLastError() == wx.PRINTER_ERROR: wx.MessageBox(_("There was an error when printing.\n" "Check that your printer is properly connected."), _("Printer Error"), style=wx.ICON_ERROR|wx.OK) printout.Destroy()
4bebb256853615ba19e6f179b242b1cab3934f85 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/4bebb256853615ba19e6f179b242b1cab3934f85/stcprint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 5108, 12, 2890, 4672, 293, 449, 273, 7075, 18, 5108, 6353, 751, 12, 2890, 18, 588, 5108, 751, 10756, 12539, 273, 7075, 18, 12149, 12, 84, 449, 13, 1172, 659, 273, 2347, 39, 5108,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 5108, 12, 2890, 4672, 293, 449, 273, 7075, 18, 5108, 6353, 751, 12, 2890, 18, 588, 5108, 751, 10756, 12539, 273, 7075, 18, 12149, 12, 84, 449, 13, 1172, 659, 273, 2347, 39, 5108,...
logger.error("If you want to delete the incomplete objects, you can type 'for i in %s.incomplete_ids(): %s(i).remove()' (press 'Enter' twice)" % (self.registry.name, self.registry.name))
global printed_explanation if not printed_explanation: logger.error("If you want to delete the incomplete objects, you can type 'for i in %s.incomplete_ids(): %s(i).remove()' (press 'Enter' twice)" % (self.registry.name, self.registry.name)) printed_explanation = True
def update_index(self,id = None,verbose=False): """ Update the list of available objects Raise RepositoryError""" # First locate and load the index files logger.debug("updating index...") objs = self.get_index_listing() summary = [] for id, idx in objs.iteritems(): # Make sure we do not overwrite older jobs if someone deleted the count file if id > self.sessionlock.count: self.sessionlock.count = id + 1 # Locked IDs can be ignored if id in self.sessionlock.locked: continue # Now we treat unlocked IDs try: self.index_load(id) # if this succeeds, all is well and we are done continue except IOError, x: logger.debug("IOError: Failed to load index %i: %s" % (id,x)) except OSError, x: logger.debug("OSError: Failed to load index %i: %s" % (id,x)) except PluginManagerError, x: logger.debug("PluginManagerError: Failed to load index %i: %s" % (id,x)) # Probably should be DEBUG summary.append((id,x)) # This is a FATAL error - do not try to load the main file, it will fail as well continue if not id in self.objects: # this is bad - no or corrupted index but object not loaded yet! Try to load it! try: self.load([id]) # Write out a new index if the file can be locked if len(self.lock([id])) != 0: self.index_write(id) self.unlock([id]) except KeyError: pass # deleted job except InaccessibleObjectError, x: logger.debug("Failed to load id %i: %s %s" % (id, x.orig.__class__.__name__, x.orig)) summary.append((id,x.orig))
23fc760a800c139b2abc302602fa1e8f8ecfb0d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/23fc760a800c139b2abc302602fa1e8f8ecfb0d5/GangaRepositoryXML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1615, 12, 2890, 16, 350, 273, 599, 16, 11369, 33, 8381, 4672, 3536, 2315, 326, 666, 434, 2319, 2184, 20539, 6281, 668, 8395, 468, 5783, 10627, 471, 1262, 326, 770, 1390, 1194, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1615, 12, 2890, 16, 350, 273, 599, 16, 11369, 33, 8381, 4672, 3536, 2315, 326, 666, 434, 2319, 2184, 20539, 6281, 668, 8395, 468, 5783, 10627, 471, 1262, 326, 770, 1390, 1194, ...
"""Finds the pyname at the offset This function is inefficient for multiple calls because of the recalculation of initialization data. """
"""Find the pyname at the offset"""
def get_pyname_at(pymodule, offset): """Finds the pyname at the offset This function is inefficient for multiple calls because of the recalculation of initialization data. """ return get_primary_and_pyname_at(pymodule, offset)[1]
40aeb93a1b8374662d216abe6e8c99bbdc54bcba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8286/40aeb93a1b8374662d216abe6e8c99bbdc54bcba/evaluate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2074, 529, 67, 270, 12, 2074, 2978, 16, 1384, 4672, 3536, 3125, 326, 2395, 529, 622, 326, 1384, 8395, 327, 336, 67, 8258, 67, 464, 67, 2074, 529, 67, 270, 12, 2074, 2978, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2074, 529, 67, 270, 12, 2074, 2978, 16, 1384, 4672, 3536, 3125, 326, 2395, 529, 622, 326, 1384, 8395, 327, 336, 67, 8258, 67, 464, 67, 2074, 529, 67, 270, 12, 2074, 2978, 16...
if skey == 'name': skey = 0 elif skey == 'fn': skey = 1 elif skey == 'ln': skey = 2 elif skey == 'email': skey = 3 elif skey == 'instant': skey = 4 elif skey == 'lang': skey = 5 else: skey = 0
def getFlashUsers(self, query='', skey=0, rkey=''): """ return the users list """ site = self.getSite() profiles_tool = site.getProfilesTool() if skey == 'name': skey = 0 elif skey == 'fn': skey = 1 elif skey == 'ln': skey = 2 elif skey == 'email': skey = 3 elif skey == 'instant': skey = 4 elif skey == 'lang': skey = 5 else: skey = 0 users = [] results= [] users_a = users.append for user in site.getAuthenticationTool().getUsers(): profile = profiles_tool.getProfile(user.name) sheet_ob = profile.getSheetById(self.getInstanceSheetId()) if sheet_ob.notify or sheet_ob.flash: if query: if self.utToUnicode(user.name).find(query)!=-1 or user.email.find(query)!=-1 or \ self.utToUnicode(user.firstname).find(query)!=-1 or self.utToUnicode(user.lastname).find(query)!=-1: users_a((user.name, user.firstname, user.lastname, user.email, sheet_ob.notify, sheet_ob.language)) else: users_a((user.name, user.firstname, user.lastname, user.email, sheet_ob.notify, sheet_ob.language)) results = [(x[skey], x) for x in users] results.sort() if rkey: results.reverse() return ObjectPaginator([val for (key, val) in results], num_per_page=15, orphans=5)
79ef911dad5f6dc68ddc65ae925be355352a8ff3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/79ef911dad5f6dc68ddc65ae925be355352a8ff3/FlashTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28081, 6588, 12, 2890, 16, 843, 2218, 2187, 272, 856, 33, 20, 16, 436, 856, 2218, 11, 4672, 3536, 327, 326, 3677, 666, 3536, 2834, 273, 365, 18, 588, 4956, 1435, 11788, 67, 6738, 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, 28081, 6588, 12, 2890, 16, 843, 2218, 2187, 272, 856, 33, 20, 16, 436, 856, 2218, 11, 4672, 3536, 327, 326, 3677, 666, 3536, 2834, 273, 365, 18, 588, 4956, 1435, 11788, 67, 6738, 273, ...
auth = self.auth if auth.has_key("password"):
self.open(self.address, self.port, self.ssl) @listener("connect") def onCONNECT(self, host, port): if self.auth.has_key("password"):
def connect(self): """B.connect()
2c55d32e64feb602002700e2a4cb7d999bab61f8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3020/2c55d32e64feb602002700e2a4cb7d999bab61f8/bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 4672, 3536, 38, 18, 3612, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 4672, 3536, 38, 18, 3612, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
suffixes = [".py", ".pyc", ".pyo"]
suffixes = [] for triple in imp.get_suffixes(): suffixes.append(triple[0])
def find_all_submodules(self, m): if not m.__path__: return modules = {} suffixes = [".py", ".pyc", ".pyo"] for dir in m.__path__: try: names = os.listdir(dir) except os.error: self.msg(2, "can't list directory", dir) continue for name in names: mod = None for suff in suffixes: n = len(suff) if name[-n:] == suff: mod = name[:-n] break if mod and mod != "__init__": modules[mod] = mod return modules.keys()
50db1906644a60a322aaacb4468d07ce187eddbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/50db1906644a60a322aaacb4468d07ce187eddbf/modulefinder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 454, 67, 1717, 6400, 12, 2890, 16, 312, 4672, 309, 486, 312, 16186, 803, 972, 30, 327, 4381, 273, 2618, 565, 18333, 273, 5378, 364, 14543, 316, 1646, 18, 588, 67, 8477, 281, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 454, 67, 1717, 6400, 12, 2890, 16, 312, 4672, 309, 486, 312, 16186, 803, 972, 30, 327, 4381, 273, 2618, 565, 18333, 273, 5378, 364, 14543, 316, 1646, 18, 588, 67, 8477, 281, ...
hits = "%d record" % query_bis_hits if query_bis_hits > 1: hits = hits + "s" req.write("""<br>&nbsp;&nbsp;&nbsp;%s ... <a href="%s/search.py?p=%s&f=%s">%s</a>""" % (bx_val, weburl, bx_val, t, hits)) return
try: browsed_words_hits[bx_val] += query_bis_hits except: browsed_words_hits[bx_val] = query_bis_hits return browsed_words_hits
def browse_in_bibxxx(req, colls, p, f, rg): """Browse bibliographic phrases for the given pattern in the given field.""" print_warning(req, "The browse functionality is about to be expanded and prettyfied.", "Warning") ## determine browse field: if string.find(p, ":") > 0: # does 'p' contain ':'? f, p = split(p, ":", 2) ## check arguments: if not f: print_warning(req, "Sorry, cannot browse within any field. Please choose a field to browse in (e.g. <em>within title</em>).", "Error") return 1 ## wash 'p' argument: p = re_quotes.sub("", p) ## construct 'tl' which defines the tag list (MARC tags) to search in: tl = [] if str(f[0]).isdigit() and str(f[1]).isdigit(): tl.append(f) # 'f' seems to be okay as it starts by two digits else: # deduce desired MARC tags on the basis of chosen 'f' tl = get_field_tags(f) if not tl: # by default we are searching in author index: tl = get_field_tags("author") print_warning(req, "The browse does not work in this field. Choosing author index instead.", "Warning") ## okay, start browse: for t in tl: req.write("<p><strong>Browsing in '%s' field:</strong>" % t) # deduce into which bibxxx table we will search: digit1, digit2 = int(t[0]), int(t[1]) bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) # construct query: if len(t) != 6 or t[-1:]=='%': # only the beginning of field 't' is defined, so add wildcard character: query = "SELECT bx.id, bx.value FROM %s AS bx WHERE bx.value >= '%s' AND bx.tag LIKE '%s%%' ORDER BY bx.value ASC LIMIT %d" \ % (bx, p, t, rg) else: query = "SELECT bx.id, bx.value FROM %s AS bx WHERE bx.value >= '%s' AND bx.tag='%s' ORDER BY bx.value ASC LIMIT %d" \ % (bx, p, t, rg) # launch the query: res = run_sql(query) # display results: for row in res: bx_id, bx_val = row[0], row[1] # deduce number of hits (=different RECIDs) for 'bx_val': query_bis = "SELECT COUNT(DISTINCT(bibx.id_bibrec)) FROM %s AS bibx WHERE bibx.id_bibxxx='%s'" % (bibx, bx_id) query_bis_hits = 0 res_bis = run_sql(query_bis, None, 1) if res_bis: query_bis_hits = res_bis[0][0] hits = "%d record" % query_bis_hits if query_bis_hits > 1: hits = hits + "s" req.write("""<br>&nbsp;&nbsp;&nbsp;%s ... <a href="%s/search.py?p=%s&f=%s">%s</a>""" % (bx_val, weburl, bx_val, t, hits)) return
620cac641ba839b8d458726c5bcd42752af2f02c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/620cac641ba839b8d458726c5bcd42752af2f02c/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 67, 267, 67, 70, 495, 18310, 12, 3658, 16, 645, 3251, 16, 293, 16, 284, 16, 14524, 4672, 3536, 27304, 25581, 549, 16983, 31413, 364, 326, 864, 1936, 316, 326, 864, 652, 12123, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 67, 267, 67, 70, 495, 18310, 12, 3658, 16, 645, 3251, 16, 293, 16, 284, 16, 14524, 4672, 3536, 27304, 25581, 549, 16983, 31413, 364, 326, 864, 1936, 316, 326, 864, 652, 12123, 1...
eq(msg.get_payload(decode=1), None)
eq(msg.get_payload(decode=True), None)
def test_get_decoded_payload(self): eq = self.assertEqual msg = self._msgobj('msg_10.txt') # The outer message is a multipart eq(msg.get_payload(decode=1), None) # Subpart 1 is 7bit encoded eq(msg.get_payload(0).get_payload(decode=1), 'This is a 7bit encoded message.\n') # Subpart 2 is quopri eq(msg.get_payload(1).get_payload(decode=1), '\xa1This is a Quoted Printable encoded message!\n') # Subpart 3 is base64 eq(msg.get_payload(2).get_payload(decode=1), 'This is a Base64 encoded message.') # Subpart 4 has no Content-Transfer-Encoding: header. eq(msg.get_payload(3).get_payload(decode=1), 'This has no Content-Transfer-Encoding: header.\n')
b36834747c3a469dec3b8cd4b2797d3571eb7537 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b36834747c3a469dec3b8cd4b2797d3571eb7537/test_email.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 67, 26646, 67, 7648, 12, 2890, 4672, 7555, 273, 365, 18, 11231, 5812, 1234, 273, 365, 6315, 3576, 2603, 2668, 3576, 67, 2163, 18, 5830, 6134, 468, 1021, 6390, 883, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 67, 26646, 67, 7648, 12, 2890, 4672, 7555, 273, 365, 18, 11231, 5812, 1234, 273, 365, 6315, 3576, 2603, 2668, 3576, 67, 2163, 18, 5830, 6134, 468, 1021, 6390, 883, 353, ...
.. warning:: all images must have the same shape either 2D or 3D and an alpha channel .. warning:: the resulting image has no alpha channel
.. warning:: all images must have the same nD shape and an alpha channel (except maybe for the first one) If alpha is True, the resulting image will use the max of all alpha channels as an alpha channel. .. warning:: if the first image is a SpatialImage, the resulting image will also be a SpatialImage but no test is made to ensure consistency in the resolution of the layers
def flatten (img_list) : """Concatenate all images into a single image Use alpha to blend images one on top of each other .. warning:: all images must have the same shape either 2D or 3D and an alpha channel .. warning:: the resulting image has no alpha channel :Parameters: - `img_list` (list of NxM(xP)x4 array of uint8) :Returns Type: NxM(xP)x3 array of uint8 """ R = img_list[0][...,0] G = img_list[0][...,1] B = img_list[0][...,2] for lay in img_list[1:] : alpha = lay[...,3] / 255. ialpha = 1. - alpha R = R * ialpha + lay[...,0] * alpha G = G * ialpha + lay[...,1] * alpha B = B * ialpha + lay[...,2] * alpha return rollaxis(array([R,G,B],img_list[0].dtype),0,len(img_list[0].shape) )
3ae94eee765b4a7b30650a3bc7bee2b2c39262a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4914/3ae94eee765b4a7b30650a3bc7bee2b2c39262a0/basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5341, 261, 6081, 67, 1098, 13, 294, 3536, 21432, 340, 777, 4602, 1368, 279, 2202, 1316, 225, 2672, 4190, 358, 24052, 4602, 1245, 603, 1760, 434, 1517, 1308, 225, 6116, 3436, 2866, 777, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5341, 261, 6081, 67, 1098, 13, 294, 3536, 21432, 340, 777, 4602, 1368, 279, 2202, 1316, 225, 2672, 4190, 358, 24052, 4602, 1245, 603, 1760, 434, 1517, 1308, 225, 6116, 3436, 2866, 777, 4...
if self.cur and frame.f_back is not self.cur[4]: raise "Bad call[2]", self.cur[3]
if self.cur and frame.f_back is not self.cur[-2]: raise "Bad call[2]", self.cur[-3]
def trace_dispatch_call(self, frame, t): if self.cur and frame.f_back is not self.cur[4]: rt, rtt, rct, rfn, rframe, rcur = self.cur if not isinstance(rframe, Profile.fake_frame): if rframe.f_back is not frame.f_back: print rframe, rframe.f_back print frame, frame.f_back raise "Bad call", self.cur[3] self.trace_dispatch_return(rframe, 0) if self.cur and frame.f_back is not self.cur[4]: raise "Bad call[2]", self.cur[3] fcode = frame.f_code fn = (fcode.co_filename, fcode.co_firstlineno, fcode.co_name) self.cur = (t, 0, 0, fn, frame, self.cur) timings = self.timings if timings.has_key(fn): cc, ns, tt, ct, callers = timings[fn] timings[fn] = cc, ns + 1, tt, ct, callers else: timings[fn] = 0, 0, 0, 0, {} return 1
df5cfd884d5da8a9a0b620b232f9ecfea6f77224 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/df5cfd884d5da8a9a0b620b232f9ecfea6f77224/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 67, 10739, 67, 1991, 12, 2890, 16, 2623, 16, 268, 4672, 309, 365, 18, 1397, 471, 2623, 18, 74, 67, 823, 353, 486, 365, 18, 1397, 63, 24, 14542, 8253, 16, 31525, 16, 436, 299, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 67, 10739, 67, 1991, 12, 2890, 16, 2623, 16, 268, 4672, 309, 365, 18, 1397, 471, 2623, 18, 74, 67, 823, 353, 486, 365, 18, 1397, 63, 24, 14542, 8253, 16, 31525, 16, 436, 299, ...
node.parent.removeChild(node)
if escapeRemovedMarkup: node.parent.insertBefore(self.nodeToText(node, endTag=True), node) node.parent.removeChild(node)
def _sanitizeTree(self, tree): tree_copy = copy.copy(tree) #Set up a correspondence between the nodes in the original tree and the #ones in the new tree for originalNode, copyNode in itertools.izip(tree, tree_copy): copyNode._orig = originalNode #Iterate over a copy of the tree for nodeCopy in tree_copy: node = nodeCopy._orig print node.name, node.name in self.acceptable_elements #XXX Need to nead with non-nodes if (isinstance(node, simpletree.TextNode) or isinstance(node, simpletree.DocumentFragment)): continue #XXX Need to remove the dependence on parent elif (node.name not in self.acceptable_elements): for child in node.childNodes: node.parent.insertBefore(child, node) node.parent.removeChild(node)
7a1eb39d402d4adfdb308cb3528215f5f5c6aa12 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4487/7a1eb39d402d4adfdb308cb3528215f5f5c6aa12/sanitizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 20266, 2471, 12, 2890, 16, 2151, 4672, 2151, 67, 3530, 273, 1610, 18, 3530, 12, 3413, 13, 468, 694, 731, 279, 4325, 802, 3086, 326, 2199, 316, 326, 2282, 2151, 471, 326, 468, 5322...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20266, 2471, 12, 2890, 16, 2151, 4672, 2151, 67, 3530, 273, 1610, 18, 3530, 12, 3413, 13, 468, 694, 731, 279, 4325, 802, 3086, 326, 2199, 316, 326, 2282, 2151, 471, 326, 468, 5322...
sage: sage.symbolic.units.unit_derivations_expr('invalid') Traceback (most recent call last): ... KeyError: 'invalid'
sage: sage.symbolic.units.unit_derivations_expr('invalid') Traceback (most recent call last): ... KeyError: 'invalid'
def unit_derivations_expr(v): """ Given derived units name, returns the corresponding units expression. For example, given 'acceleration' output the symbolic expression length/time^2. INPUT: - `v` -- string, name of a unit type such as 'area', 'volume', etc. OUTPUT: - symbolic expression EXAMPLES:: sage: sage.symbolic.units.unit_derivations_expr('volume') length^3 sage: sage.symbolic.units.unit_derivations_expr('electric_potential') length^2*mass/(current*time^3) If the unit name is unknown, a KeyError is raised:: sage: sage.symbolic.units.unit_derivations_expr('invalid') Traceback (most recent call last): ... KeyError: 'invalid' """ v = str(v) Z = unit_derivations[v] if isinstance(Z,str): d = dict([(x,str_to_unit(x)) for x in vars_in_str(Z)]) from sage.misc.all import sage_eval Z = sage_eval(Z, d) unit_derivations[v] = Z return Z
04717bf1b9b9ac138edf5b9001954a2a12d3790d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/04717bf1b9b9ac138edf5b9001954a2a12d3790d/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2836, 67, 20615, 1012, 67, 8638, 12, 90, 4672, 3536, 16803, 10379, 4971, 508, 16, 1135, 326, 4656, 4971, 2652, 18, 225, 2457, 3454, 16, 864, 296, 30737, 7067, 11, 876, 326, 16754, 2652, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2836, 67, 20615, 1012, 67, 8638, 12, 90, 4672, 3536, 16803, 10379, 4971, 508, 16, 1135, 326, 4656, 4971, 2652, 18, 225, 2457, 3454, 16, 864, 296, 30737, 7067, 11, 876, 326, 16754, 2652, ...
warnings.filterwarnings("ignore", msg, DeprecationWarning)
warnings.filterwarnings("ignore", _msg, DeprecationWarning)
def assertSameElements(self, expected_seq, actual_seq, msg=None): """An unordered sequence specific comparison.
6887589604f772544d40ccac5ac3e84e0ce37d13 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/6887589604f772544d40ccac5ac3e84e0ce37d13/case.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 8650, 3471, 12, 2890, 16, 2665, 67, 5436, 16, 3214, 67, 5436, 16, 1234, 33, 7036, 4672, 3536, 979, 29573, 3102, 2923, 5826, 18, 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, 1815, 8650, 3471, 12, 2890, 16, 2665, 67, 5436, 16, 3214, 67, 5436, 16, 1234, 33, 7036, 4672, 3536, 979, 29573, 3102, 2923, 5826, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.notice(event.quelle['nick'],'Ungültige URL')
event.parent.notice(event.quelle['nick'],'Ungültige URL')
def parse(event): print event.ziel if event.ziel == '#tdm': try: url = event.befehl['argumente'][0] except IndexError: event.parent.notice(event.quelle['nick'],'Bitte URL angeben') else: logger.info('%s lässt %s parsen' % (event.quelle, url)) kampfbericht = xwars.kampfbericht(url) try: kampfbericht.analyze() except (IOError), meldung: self.notice(event.quelle['nick'],meldung) except AttributeError: self.notice(event.quelle['nick'],'Ungültige URL') else: kampfbericht.manipulate() kampfbericht.save() event.parent.notice(event.quelle['nick'],'URL: ' + kampfbericht.dateiname)
8692a4f1137c24d57141d8b16298ba3d0b9ae270 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/8692a4f1137c24d57141d8b16298ba3d0b9ae270/befehle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2575, 4672, 1172, 871, 18, 94, 77, 292, 309, 871, 18, 94, 77, 292, 422, 2946, 4465, 81, 4278, 775, 30, 880, 273, 871, 18, 2196, 3030, 25356, 3292, 3446, 73, 3546, 63, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2575, 4672, 1172, 871, 18, 94, 77, 292, 309, 871, 18, 94, 77, 292, 422, 2946, 4465, 81, 4278, 775, 30, 880, 273, 871, 18, 2196, 3030, 25356, 3292, 3446, 73, 3546, 63, 20, ...
output += '\n'.join([self.markup(line, 'except') for line in want.split('\n')])
output += self.NEWLINE.join([self.markup(line, 'except') for line in want.split('\n')])
def colorize_doctest(self, s, strip_directives=False): """ Colorize a string containing one or more doctest examples. """ output = [] charno = 0 for m in self.DOCTEST_EXAMPLE_RE.finditer(s): # Parse the doctest example: pysrc, want = m.group('source', 'want') # Pre-example text: output.append(s[charno:m.start()]) # Example source code: output.append(self.DOCTEST_RE.sub(self.subfunc, pysrc)) # Example output: if want: if self.EXCEPT_RE.match(want): output += '\n'.join([self.markup(line, 'except') for line in want.split('\n')]) else: output += '\n'.join([self.markup(line, 'output') for line in want.split('\n')]) # Update charno charno = m.end() # Add any remaining post-example text. output.append(s[charno:]) return self.PREFIX + ''.join(output) + self.SUFFIX
34fa141212cd065ec34c07f027d315059d9e82cb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3512/34fa141212cd065ec34c07f027d315059d9e82cb/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21077, 67, 2896, 299, 395, 12, 2890, 16, 272, 16, 2569, 67, 30850, 33, 8381, 4672, 3536, 5563, 554, 279, 533, 4191, 1245, 578, 1898, 31263, 395, 10991, 18, 3536, 876, 273, 5378, 1149, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21077, 67, 2896, 299, 395, 12, 2890, 16, 272, 16, 2569, 67, 30850, 33, 8381, 4672, 3536, 5563, 554, 279, 533, 4191, 1245, 578, 1898, 31263, 395, 10991, 18, 3536, 876, 273, 5378, 1149, ...
self.next_sync = self.tick_count + min(10, ticks_per_20_sec)
next_sync_tick = self.tick_count + int(max(10, ticks_per_20_sec))
def tick(self): from time import time start_time = time()
b5af14daa2f1967a49e58413cef62b78984573cc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12871/b5af14daa2f1967a49e58413cef62b78984573cc/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4024, 12, 2890, 4672, 628, 813, 1930, 813, 787, 67, 957, 273, 813, 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, 4024, 12, 2890, 4672, 628, 813, 1930, 813, 787, 67, 957, 273, 813, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if not bpdb.enabled or not bpdb.verifyEnabled():
def functor(*cArgs, **ckArgs): return if bpdb.enabled and bpdb.verifyEnabled(): argsCopy = args[:]
def bpGroup(*args, **kArgs): if not bpdb.enabled or not bpdb.verifyEnabled(): def functor(*cArgs, **ckArgs): return return functor argsCopy = args[:] def functor(*cArgs, **ckArgs): kwArgs = kArgs kwArgs.update(ckArgs) kwArgs.pop('static', None) kwArgs['frameCount'] = ckArgs.get('frameCount',1)+1 return bpdb.bp(*(cArgs), **kwArgs) if kArgs.get('static'): return staticmethod(functor) else: return functor
ff599cf9abda48677c7e0cc83e14db348aa882e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8543/ff599cf9abda48677c7e0cc83e14db348aa882e5/PythonUtil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9107, 1114, 30857, 1968, 16, 2826, 79, 2615, 4672, 1652, 12882, 280, 30857, 71, 2615, 16, 2826, 363, 2615, 4672, 327, 225, 309, 9107, 1966, 18, 5745, 471, 9107, 1966, 18, 8705, 1526, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9107, 1114, 30857, 1968, 16, 2826, 79, 2615, 4672, 1652, 12882, 280, 30857, 71, 2615, 16, 2826, 363, 2615, 4672, 327, 225, 309, 9107, 1966, 18, 5745, 471, 9107, 1966, 18, 8705, 1526, 133...
_MethodType, _BuiltinMethodType)
_MethodType, _BuiltinMethodType, _WrapperDescriptorType, _MethodDescriptorType)
def is_routine(self): return type(self._obj) in (_FunctionType, _BuiltinFunctionType, _MethodType, _BuiltinMethodType)
f0b775424bcce0909bd1f7a706c6cfdc3470be31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/f0b775424bcce0909bd1f7a706c6cfdc3470be31/uid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 22640, 12, 2890, 4672, 327, 618, 12, 2890, 6315, 2603, 13, 316, 261, 67, 2083, 559, 16, 389, 28032, 2083, 559, 16, 389, 21988, 16, 389, 28032, 21988, 13, 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, 353, 67, 22640, 12, 2890, 4672, 327, 618, 12, 2890, 6315, 2603, 13, 316, 261, 67, 2083, 559, 16, 389, 28032, 2083, 559, 16, 389, 21988, 16, 389, 28032, 21988, 13, 2, -100, -100, -100, ...
dr = spa[0]/numpy.linalg.norm(spa) da = spa[1]/numpy.linalg.norm(spa) ds = spa[2]/numpy.linalg.norm(spa)
dr = numpy.abs(spa[0]/numpy.linalg.norm(spa)) da = numpy.abs(spa[1]/numpy.linalg.norm(spa)) ds = numpy.abs(spa[2]/numpy.linalg.norm(spa))
def TrackFiber40(data, vectors, b, G, IJKstartpoints, R2I, I2R, lV, EV, xVTensor, dl=1, Nsteps=300, anisoT=0.2, useSpacing = False, seed=None):
1573b9b30163aa3b4b0ab5a304cec878d57d1fda /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12580/1573b9b30163aa3b4b0ab5a304cec878d57d1fda/TrackFiber4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 225, 11065, 22041, 7132, 12, 892, 16, 10046, 16, 324, 16, 611, 16, 467, 19474, 1937, 4139, 16, 534, 22, 45, 16, 467, 22, 54, 16, 328, 58, 16, 14839, 16, 619, 58, 16914, 16, 8910, 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, 225, 11065, 22041, 7132, 12, 892, 16, 10046, 16, 324, 16, 611, 16, 467, 19474, 1937, 4139, 16, 534, 22, 45, 16, 467, 22, 54, 16, 328, 58, 16, 14839, 16, 619, 58, 16914, 16, 8910, 3...
f_l_dict = {(None,None):[(tuple([x]),tuple(self._vertex_face_indexset([x])))
f_l_dict = {(None,tuple(range(self.n_Hrepresentation()))):[(tuple([x]),tuple(self._vertex_face_indexset([x])))
def face_lattice(self): """ Computes the face-lattice poset. Elements are tuples of (vertices, facets) - i.e. this keeps track of both the vertices in each face, and all the facets containing them.
bdb331416d79f2f16dad258d2fb80722f0f71db8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/bdb331416d79f2f16dad258d2fb80722f0f71db8/polyhedra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7945, 67, 80, 24966, 12, 2890, 4672, 3536, 14169, 281, 326, 7945, 17, 80, 24966, 949, 278, 18, 17219, 854, 10384, 434, 261, 17476, 16, 21681, 13, 300, 277, 18, 73, 18, 333, 20948, 3298...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7945, 67, 80, 24966, 12, 2890, 4672, 3536, 14169, 281, 326, 7945, 17, 80, 24966, 949, 278, 18, 17219, 854, 10384, 434, 261, 17476, 16, 21681, 13, 300, 277, 18, 73, 18, 333, 20948, 3298...
import Numeric import numeric_version import _numpy import umath import Precision
def __import__(*args, **kws): arg = args[0] print >>sys.stderr, "about to import " + arg # helps determine which module had the problem return _old_import(*args, **kws)
b128a3e33d34c4973ef3c73f191ef346245b4c5e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/b128a3e33d34c4973ef3c73f191ef346245b4c5e/all_mac_imports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5666, 972, 30857, 1968, 16, 2826, 79, 4749, 4672, 1501, 273, 833, 63, 20, 65, 1172, 1671, 9499, 18, 11241, 16, 315, 21071, 358, 1930, 315, 397, 1501, 468, 21814, 4199, 1492, 1605, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5666, 972, 30857, 1968, 16, 2826, 79, 4749, 4672, 1501, 273, 833, 63, 20, 65, 1172, 1671, 9499, 18, 11241, 16, 315, 21071, 358, 1930, 315, 397, 1501, 468, 21814, 4199, 1492, 1605, ...
fil = path + '/' + archivo parser.feed(open(fil).read())
f = open(path + '/' + indexpage) parser.feed(f.read())
def index(path, archivo, output): f = formatter.AbstractFormatter(AlmostNullWriter()) parser = IdxHlpHtmlParser(f) parser.path = path parser.ft = output fil = path + '/' + archivo parser.feed(open(fil).read()) parser.close()
d9a10509ace3fc749d299bd5c117c745f72275d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d9a10509ace3fc749d299bd5c117c745f72275d7/prechm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 803, 16, 6637, 20593, 16, 876, 4672, 284, 273, 4453, 18, 7469, 5074, 12, 1067, 10329, 2041, 2289, 10756, 2082, 273, 3124, 92, 44, 9953, 4353, 2678, 12, 74, 13, 2082, 18, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 803, 16, 6637, 20593, 16, 876, 4672, 284, 273, 4453, 18, 7469, 5074, 12, 1067, 10329, 2041, 2289, 10756, 2082, 273, 3124, 92, 44, 9953, 4353, 2678, 12, 74, 13, 2082, 18, 803, ...
pass else:
if True:
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate change to the last lastx=self.lastx[aFullPNString] lasty=self.lasty[aFullPNString] self.lastx[aFullPNString]=x self.lasty[aFullPNString]=y last_point_within_frame=self.withinframes([lastx,lasty]) lastymax=self.lastymax[aFullPNString] lastymin=self.lastymin[aFullPNString] if lastx!=None : dx=abs(lastx-x)
8f18e3850a6316681f1074fff213ca716c4f5df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/8f18e3850a6316681f1074fff213ca716c4f5df5/Plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1153, 67, 3612, 12, 2890, 16, 279, 5080, 15124, 780, 16, 25252, 4672, 468, 588, 25252, 619, 677, 924, 468, 6283, 358, 3207, 5513, 309, 365, 18, 5129, 67, 265, 3674, 63, 69, 5080,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1153, 67, 3612, 12, 2890, 16, 279, 5080, 15124, 780, 16, 25252, 4672, 468, 588, 25252, 619, 677, 924, 468, 6283, 358, 3207, 5513, 309, 365, 18, 5129, 67, 265, 3674, 63, 69, 5080,...
return self.queue.pop(0)
char = self.queue.pop(0) if char == "\n": self.lineLengths.append(self.col) self.line += 1 self.col = 0 return char
def char(self): """ Read one character from the stream or queue if available. Return EOF when EOF is reached. """ if self.queue: return self.queue.pop(0) else: c = self.dataStream.read(1, 1) if not c: self.col += 1 return EOF
8a9c570a6761627ab5ce531ab9c675e944195730 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4487/8a9c570a6761627ab5ce531ab9c675e944195730/inputstream.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1149, 12, 2890, 4672, 3536, 2720, 1245, 3351, 628, 326, 1407, 578, 2389, 309, 2319, 18, 2000, 6431, 1347, 6431, 353, 8675, 18, 3536, 309, 365, 18, 4000, 30, 1149, 273, 365, 18, 4000, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1149, 12, 2890, 4672, 3536, 2720, 1245, 3351, 628, 326, 1407, 578, 2389, 309, 2319, 18, 2000, 6431, 1347, 6431, 353, 8675, 18, 3536, 309, 365, 18, 4000, 30, 1149, 273, 365, 18, 4000, 1...
if all(move.state == 'cancle' for move in pick.move_lines):
if all(move.state == 'cancel' for move in pick.move_lines):
def action_cancel(self, cr, uid, ids, context={}): if not len(ids): return True pickings = {} for move in self.browse(cr, uid, ids): if move.state in ('confirmed','waiting','assigned','draft'): if move.picking_id: pickings[move.picking_id.id] = True if move.move_dest_id and move.move_dest_id.state=='waiting': self.write(cr, uid, [move.move_dest_id.id], {'state':'assigned'}) if move.move_dest_id.picking_id: wf_service = netsvc.LocalService("workflow") wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr) self.write(cr, uid, ids, {'state':'cancel', 'move_dest_id': False})
5efacb33f0b63ff17e8325143769e86b6edb6130 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/5efacb33f0b63ff17e8325143769e86b6edb6130/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 309, 486, 562, 12, 2232, 4672, 327, 1053, 6002, 899, 273, 2618, 364, 3635, 316, 365, 18, 25731, 12, 3353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 309, 486, 562, 12, 2232, 4672, 327, 1053, 6002, 899, 273, 2618, 364, 3635, 316, 365, 18, 25731, 12, 3353,...
else:
self.bondable_pairs = [] self.ways_of_bonding = {} else:
def EndPick(self, event, selSense): """Pick if click. Only one chunk can be selected . """ if not self.picking: return self.picking = False
0abb4ef8c26dc738f8eb93ad491026cdaa71858a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/0abb4ef8c26dc738f8eb93ad491026cdaa71858a/fusechunksMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4403, 17968, 12, 2890, 16, 871, 16, 357, 29713, 4672, 3536, 17968, 309, 4682, 18, 225, 5098, 1245, 2441, 848, 506, 3170, 263, 3536, 309, 486, 365, 18, 11503, 310, 30, 327, 365, 18, 115...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4403, 17968, 12, 2890, 16, 871, 16, 357, 29713, 4672, 3536, 17968, 309, 4682, 18, 225, 5098, 1245, 2441, 848, 506, 3170, 263, 3536, 309, 486, 365, 18, 11503, 310, 30, 327, 365, 18, 115...
text.data = re.sub(signature_re, '', text.data, 1)
text.data = FuncDoc._SIGNATURE_RE.sub('', text.data, 1)
def _init_builtin_signature(self, func): self._params = [] self._kwarg_param = None self._vararg_param = None self._return = Var('return') # Check if there's a "builtin signature" available. signature_re = (r'^\s*((?P<class>\w+)\.)?' + r'(?P<func>%s)' % func.__name__ + r'\((?P<params>(\w+(,\s*\w+)*)?)\)' + r'(\s*->\s*(?P<return>\S.*))?'+ r'\s*(\n|\s+--\s+|$)') m = re.match(signature_re, (_getdoc(func) or '')) if m: # Extract the parameters from the signature if m.group('params'): for name in m.group('params').split(','): name = name.strip() if name == '...': self._vararg_param = Var('...') elif name.startswith('**'): self._kwarg_param = Var(name[1:]) elif name.startswith('*'): self._vararg_param = Var(name[1:]) else: self._params.append(Var(name.strip())) # Extract the return type from the signature if m.group('return'): rtype = m.group('return') self._return.set_type(epytext.parse(rtype))
d3395d508175517a8a8289ffc33bd81b4ee231c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/d3395d508175517a8a8289ffc33bd81b4ee231c2/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 24553, 67, 8195, 12, 2890, 16, 1326, 4672, 365, 6315, 2010, 273, 5378, 365, 6315, 31029, 67, 891, 273, 599, 365, 6315, 24823, 67, 891, 273, 599, 365, 6315, 2463, 273, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 67, 24553, 67, 8195, 12, 2890, 16, 1326, 4672, 365, 6315, 2010, 273, 5378, 365, 6315, 31029, 67, 891, 273, 599, 365, 6315, 24823, 67, 891, 273, 599, 365, 6315, 2463, 273, 45...
summary.append([t,s,f,g,l,p,d,F,v,h,m,s,j])
summary.append([t,d,f,F,h,v,j,m,s,l,p])
def dumpCandidateKurveSummary(self): """ This method creates a variable object that contains the summary associated with all the elements in the input structure self.curves. This output can be used to write the summary information to a .summary text file. This method is closely related to createSummaryStructure method. We have as output of this method """ summary=[] for lineInfo in self.curves: curveID,l,p=lineInfo.getKurveHeader() #See notes in methods below for explaination #Offsets in d,F are likely wrong...Tina-Thu-Oct-04-2007:200710041448 d=lineInfo.getCandidateDuration()+self.gpsWidth.getAsFloat() F=lineInfo.getCandidateBandwidth()+self.freqWidth t=float(lineInfo.printStartGPS()) s=float(lineInfo.printStopGPS()) f=float(lineInfo.printStartFreq()) g=float(lineInfo.printStopFreq()) tmp=lineInfo.getBrightPixelAndStats() v=tmp[0][3] #Freq of Bright Pixel h=tmp[0][2].getAsFloat() #GPS time of Bright Pixel j=tmp[0][4] #The pixel power value for brightest pixel m=tmp[1] #Mean power of pixels in curve s=tmp[2] #stddev^2 of pixel power in curve #summary.append([t,s,f,g,l,p,d,F]) summary.append([t,s,f,g,l,p,d,F,v,h,m,s,j]) return summary
f8356864ebd3e4f4c62944a76ace8501c23ac979 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/f8356864ebd3e4f4c62944a76ace8501c23ac979/tracksearchutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 11910, 47, 295, 537, 4733, 12, 2890, 4672, 3536, 1220, 707, 3414, 279, 2190, 733, 716, 1914, 326, 4916, 3627, 598, 777, 326, 2186, 316, 326, 810, 3695, 365, 18, 1397, 3324, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 11910, 47, 295, 537, 4733, 12, 2890, 4672, 3536, 1220, 707, 3414, 279, 2190, 733, 716, 1914, 326, 4916, 3627, 598, 777, 326, 2186, 316, 326, 810, 3695, 365, 18, 1397, 3324, 18, 2...
if '-' in operands: op1 = int(operands[0], 8) if symbol: context.symtab.add(symbol, operands[0], op1) else: context.error("syntax error: %s %s" % (self.mnemonic, operand))
self.ignore(context)
def parse_MEMORY(self, context, symbol, operands): if '-' in operands: op1 = int(operands[0], 8) if symbol: context.symtab.add(symbol, operands[0], op1) else: context.error("syntax error: %s %s" % (self.mnemonic, operand))
a20335890d6f75220c7bdf258aa64d2f7c455261 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/a20335890d6f75220c7bdf258aa64d2f7c455261/directives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 24329, 12, 2890, 16, 819, 16, 3273, 16, 14883, 4672, 4202, 365, 18, 6185, 12, 2472, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 24329, 12, 2890, 16, 819, 16, 3273, 16, 14883, 4672, 4202, 365, 18, 6185, 12, 2472, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.x = component.width + component.padding_bottom - width - 2
self.x = component.width + component.padding_left - width - 2
def _do_layout(self, component=None): if component is None: component = self.component
cd26d086eb854957e9f8da859dbc19d599a034a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13167/cd26d086eb854957e9f8da859dbc19d599a034a5/plot_toolbar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 6741, 12, 2890, 16, 1794, 33, 7036, 4672, 309, 1794, 353, 599, 30, 1794, 273, 365, 18, 4652, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 6741, 12, 2890, 16, 1794, 33, 7036, 4672, 309, 1794, 353, 599, 30, 1794, 273, 365, 18, 4652, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
'attachment/ticket/123/foo.txt" '
'raw-attachment/ticket/123/foo.txt" '
def test_wiki_link_foreign(self): attachment = Attachment(self.env, 'ticket', 123) attachment.insert('foo.txt', tempfile.TemporaryFile(), 0)
f662173629056ac8b011b2bf0b13859787fab073 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f662173629056ac8b011b2bf0b13859787fab073/attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13044, 67, 1232, 67, 12774, 12, 2890, 4672, 6042, 273, 15939, 12, 2890, 18, 3074, 16, 296, 16282, 2187, 17335, 13, 6042, 18, 6387, 2668, 11351, 18, 5830, 2187, 13275, 18, 23808...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 13044, 67, 1232, 67, 12774, 12, 2890, 4672, 6042, 273, 15939, 12, 2890, 18, 3074, 16, 296, 16282, 2187, 17335, 13, 6042, 18, 6387, 2668, 11351, 18, 5830, 2187, 13275, 18, 23808...
f.write('MODULES+="squashfs ext4 ext3 ext2 vfat msdos "\n') f.write('MODULES+="sr_mod sd_mod ide-cd cdrom "\n') for module in self.__modules: if module == "=usb": f.write('MODULES+="ehci_hcd uhci_hcd ohci_hcd "\n') f.write('MODULES+="usb_storage usbhid "\n') elif module == "=firewire": f.write('MODULES+="firewire-sbp2 firewire-ohci "\n') f.write('MODULES+="sbp2 ohci1394 ieee1394 "\n') elif module == "=mmc": f.write('MODULES+="mmc_block sdhci sdhci-pci "\n') elif module == "=pcmcia": f.write('MODULES+="pata_pcmcia "\n') else: f.write('MODULES+="' + module + ' "\n')
f.write('MODULES+="' + self.__extra_filesystems() + '"\n') f.write('MODULES+="' + self.__extra_drivers() + '"\n') f.close() def __write_dracut_conf(self, path): if not os.path.exists(os.path.dirname(path)): makedirs(os.path.dirname(path)) f = open(path, "a") f.write('filesystems+="' + self.__extra_filesystems() + ' "\n') f.write('drivers+="' + self.__extra_drivers() + ' "\n')
def __write_initrd_conf(self, path): if not os.path.exists(os.path.dirname(path)): makedirs(os.path.dirname(path)) f = open(path, "a")
43c4758b0bc27d054c4705c0e8a301496c0f7aca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9342/43c4758b0bc27d054c4705c0e8a301496c0f7aca/live.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2626, 67, 2738, 13623, 67, 3923, 12, 2890, 16, 589, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 12287, 12, 803, 3719, 30, 12151, 12, 538, 18, 803, 18, 12287,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2626, 67, 2738, 13623, 67, 3923, 12, 2890, 16, 589, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 12287, 12, 803, 3719, 30, 12151, 12, 538, 18, 803, 18, 12287,...
def WriteDestinationInitalizationValidation(self, file): """Writes the client side destintion initialization validation.""" self.type_handler.WriteDestinationInitalizationValidation(self, file)
def WriteGLES2ImplementationHeader(self, file): """Writes the GLES2 Implemention declaration.""" self.type_handler.WriteGLES2ImplementationHeader(self, file)
aaac7103f5260edebf7bdc287b0b59e94d419cc8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/aaac7103f5260edebf7bdc287b0b59e94d419cc8/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 585, 4672, 3536, 8368, 326, 611, 11386, 22, 10886, 285, 8266, 12123, 365, 18, 723, 67, 4176, 18, 3067, 43, 11386, 22, 13621, 1864, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 585, 4672, 3536, 8368, 326, 611, 11386, 22, 10886, 285, 8266, 12123, 365, 18, 723, 67, 4176, 18, 3067, 43, 11386, 22, 13621, 1864, 12, 2...
jsonned = simplejson.dumps([data], default=encode_datetime) return HttpResponse( callback_function_name + '(' + jsonned + ')' )
data_list = [data] json_array = simplejson.dumps(data_list, default=encode_datetime) return HttpResponse( callback_function_name + '(' + json_array + ')' )
def bugs_to_json_response(data, bunch_of_bugs, callback_function_name=''): # {{{ json_serializer = serializers.get_serializer('python')() bugs = json_serializer.serialize(bunch_of_bugs) # Throughout the list, replace project primary keys with project names. for bug in bugs: project = Project.objects.get(pk=int(bug['fields']['project'])) bug['fields']['project'] = project.name data['bugs'] = bugs jsonned = simplejson.dumps([data], default=encode_datetime) return HttpResponse( callback_function_name + '(' + jsonned + ')' ) # }}}
c579f11741c04141e221b5f8a5da25d392739c0b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/c579f11741c04141e221b5f8a5da25d392739c0b/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22398, 67, 869, 67, 1977, 67, 2740, 12, 892, 16, 25606, 67, 792, 67, 19381, 16, 1348, 67, 915, 67, 529, 2218, 11, 4672, 468, 10179, 95, 1163, 67, 15663, 273, 24782, 18, 588, 67, 1566...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22398, 67, 869, 67, 1977, 67, 2740, 12, 892, 16, 25606, 67, 792, 67, 19381, 16, 1348, 67, 915, 67, 529, 2218, 11, 4672, 468, 10179, 95, 1163, 67, 15663, 273, 24782, 18, 588, 67, 1566...
xprevcompress = FactorChanges(flatb, mpw.group(3))
xprevcompress = FactorChanges(flatb, mpw.group(2))
def RunFilterFile(FILTERfunction, xprev, sdate, sdatever, dname, jfin, patchfile, jfout, forcereparse, bquietc): # now apply patches and parse patchtempfilename = tempfile.mktemp("", "pw-applypatchtemp-", miscfuncs.tmppath) print "reading " + jfin # apply patch filter kfin = jfin if os.path.isfile(patchfile) and ApplyPatches(jfin, patchtempfilename, patchfile): kfin = patchtempfilename # read the text of the file ofin = open(kfin) text = ofin.read() ofin.close() tempfilenameoldxml = None # do the filtering according to the type. Some stuff is being inlined here if dname == 'regmem': regmemout = open(tempfilename, 'w') FILTERfunction(regmemout, text, sdate) # totally different filter function format regmemout.close() # all other hansard types else: assert dname in ('wrans', 'debates', 'wms', 'westminhall', 'lordspages') (flatb, gidname) = FILTERfunction(text, sdate) CreateGIDs(gidname, sdate, sdatever, flatb) # wrans case is special, with its question-id numbered gids if dname == 'wrans': majblocks = CreateWransGIDs(flatb, (sdate + sdatever)) # combine the date and datever. the old style gids stand on the paragraphs still bMakeOldWransGidsToNew = (sdate < "2005") fout = open(tempfilename, "w") WriteXMLHeader(fout); fout.write('<publicwhip scrapeversion="%s" latest="yes">\n' % sdatever) # go through and output all the records into the file if dname == 'wrans': for majblock in majblocks: WriteXMLspeechrecord(fout, majblock[0], bMakeOldWransGidsToNew, True) for qblock in majblock[1]: qblock.WriteXMLrecords(fout, bMakeOldWransGidsToNew) else: for qb in flatb: WriteXMLspeechrecord(fout, qb, False, False) fout.write("</publicwhip>\n\n") fout.close() # load in a previous file and over-write it if necessary if xprev: xin = open(xprev[0], "r") xprevs = xin.read() xin.close() # separate out the scrape versions mpw = re.search('<publicwhip scrapeversion="([^"]*)" latest="([^"]*)">\n([\s\S]*?)</publicwhip>', xprevs) if not mpw: print "mismatch with pw header" print re.search('<publicwhip[^>]*>', xprevs).group(0) assert mpw.group(1) == xprev[1] assert mpw.group(2) == "yes" if dname == 'wrans': xprevcompress = FactorChangesWrans(majblocks, mpw.group(3)) else: xprevcompress = FactorChanges(flatb, mpw.group(3)) tempfilenameoldxml = tempfile.mktemp(".xml", "pw-filtertempold-", miscfuncs.tmppath) foout = open(tempfilenameoldxml, "w") WriteXMLHeader(foout) foout.write('<publicwhip scrapeversion="%s" latest="no">\n' % xprev[1]) foout.writelines(xprevcompress) foout.write("</publicwhip>\n\n") foout.close() # in win32 this function leaves the file open and stops it being renamed if sys.platform != "win32": xmlvalidate.parse(tempfilename) # validate XML before renaming # in case of error, an exception is thrown, so this line would not be reached # we rename both files (the old and new xml) at once if os.path.isfile(jfout): os.remove(jfout) os.rename(tempfilename, jfout) # copy over onto old xml file if tempfilenameoldxml: if sys.platform != "win32": xmlvalidate.parse(tempfilenameoldxml) # validate XML before renaming assert os.path.isfile(xprev[0]) os.remove(xprev[0]) os.rename(tempfilenameoldxml, xprev[0])
6aa8513e8e90851caac5696e618fe8af9e8c8a79 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8428/6aa8513e8e90851caac5696e618fe8af9e8c8a79/runfilters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 1586, 812, 12, 11126, 915, 16, 619, 10001, 16, 272, 712, 16, 272, 712, 502, 16, 302, 529, 16, 525, 926, 16, 4729, 768, 16, 525, 617, 322, 16, 364, 71, 822, 2670, 16, 324, 203...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 1586, 812, 12, 11126, 915, 16, 619, 10001, 16, 272, 712, 16, 272, 712, 502, 16, 302, 529, 16, 525, 926, 16, 4729, 768, 16, 525, 617, 322, 16, 364, 71, 822, 2670, 16, 324, 203...
self.prefix = '
self.prefix = '
def set_relay_mode(self): self.prefix = '#NowPlaying (relaying *LIVE*) :' song = self.relay_url self.song = song.encode('utf-8') self.artist = 'Various' self.channel.set_metadata({'song': self.short_name + ' relaying : ' + self.song, 'charset': 'utf8',}) self.stream = self.player.relay_read()
8e1466724c6a2bc0f91ae5d26dd365f3233ce05c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/8e1466724c6a2bc0f91ae5d26dd365f3233ce05c/station.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2878, 528, 67, 3188, 12, 2890, 4672, 365, 18, 3239, 273, 2946, 8674, 11765, 310, 261, 2878, 528, 310, 380, 2053, 3412, 12437, 22974, 17180, 273, 365, 18, 2878, 528, 67, 718, 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, 444, 67, 2878, 528, 67, 3188, 12, 2890, 4672, 365, 18, 3239, 273, 2946, 8674, 11765, 310, 261, 2878, 528, 310, 380, 2053, 3412, 12437, 22974, 17180, 273, 365, 18, 2878, 528, 67, 718, 3...
t = os.path.normpath(os.path.join(os.getcwd(), t))
global _cwd if not _cwd: _cwd = os.getcwd() t = os.path.normpath(os.path.join(_cwd, t))
def relpath(t, base): t = os.path.normpath(os.path.join(os.getcwd(), t)) tparts = t.split('/') bparts = base.split('/') for tp,bp in zip(tparts,bparts): if tp != bp: break tparts.pop(0) bparts.pop(0) while bparts: tparts.insert(0, '..') bparts.pop(0) return '/'.join(tparts)
9fc5ae1b565afbda01f89adc360affa346565240 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14019/9fc5ae1b565afbda01f89adc360affa346565240/state.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14614, 12, 88, 16, 1026, 4672, 2552, 389, 11089, 309, 486, 389, 11089, 30, 389, 11089, 273, 1140, 18, 588, 11089, 1435, 268, 273, 1140, 18, 803, 18, 7959, 803, 12, 538, 18, 803, 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, 14614, 12, 88, 16, 1026, 4672, 2552, 389, 11089, 309, 486, 389, 11089, 30, 389, 11089, 273, 1140, 18, 588, 11089, 1435, 268, 273, 1140, 18, 803, 18, 7959, 803, 12, 538, 18, 803, 18, ...
try: common.loggedCmd(["wineprefixcreate", "-w"], cwd=statusObj.tmpdir, logger=logger, env=env )
shutil.copytree(wineprefix, thiswineprefix, symlinks=True) try: common.loggedCmd( ["ls","-laR", statusObj.tmpdir], timeout=75, raiseExc=0, cwd=statusObj.tmpdir, logger=logger, env=env)
def biosFromPrecisionWindowsExe(statusObj, outputTopdir, logger, *args, **kargs): common.assertFileExt( statusObj.file, '.exe') common.copyToTmp(statusObj) env={ "DISPLAY":"", "TERM":"", "PATH":os.environ["PATH"], "HOME":os.environ["HOME"], "WINEPREFIX": statusObj.tmpdir, } try: common.loggedCmd(["wineprefixcreate", "-w"], cwd=statusObj.tmpdir, logger=logger, env=env ) common.loggedCmd( ["wine", os.path.basename(statusObj.tmpfile), "-writehdrfile", "-nopause",], timeout=75, raiseExc=0, cwd=statusObj.tmpdir, logger=logger, env=env) common.loggedCmd(["wineserver", "-k"], cwd=statusObj.tmpdir, logger=logger, env=env) except common.CommandFailed, e: raise common.skip, "couldnt extract with wine" except OSError, e: raise common.skip, "wine not installed" for hdr, id, ver in getHdrIdVer(statusObj.tmpdir): dest, packageIni = copyHdr(hdr, id, ver, outputTopdir, logger) return True
8e1d2e9756b09d1cdc596e4b138159819f6ce57b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/36/8e1d2e9756b09d1cdc596e4b138159819f6ce57b/extract_bios.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 7441, 1265, 15410, 10399, 424, 73, 12, 2327, 2675, 16, 876, 3401, 1214, 16, 1194, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 2975, 18, 11231, 812, 2482, 12, 1267, 2675, 18, 768, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 7441, 1265, 15410, 10399, 424, 73, 12, 2327, 2675, 16, 876, 3401, 1214, 16, 1194, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 2975, 18, 11231, 812, 2482, 12, 1267, 2675, 18, 768, 16,...
action="append_const", dest="relax", const="1",
action="append_const", dest="relax", const=1,
def add_bake_parser_options(parser): parser.add_option("-t", "--task", action="store", type="str", default=None, help="task(s) to do") parser.add_option("--rebuild", action="append_const", dest="rebuild", const="1", help="rebuild specified recipes") parser.add_option("--rebuildall", action="append_const", dest="rebuild", const="2", help="rebuild specified recipes and all dependencies (except cross and native)") parser.add_option("--reallyrebuildall", action="append_const", dest="rebuild", const="3", help="rebuild specified recipes and all dependencies") parser.add_option("--relaxed", action="append_const", dest="relax", const="1", help="don't rebuild ${RELAXED} recipes because of metadata changes") parser.add_option("--sloppy", action="append_const", dest="relax", const="2", help="don't rebuild dependencies because of metadata changes") return
d0bf5ec39494eece51f03cceb2c3f8620bea5763 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5897/d0bf5ec39494eece51f03cceb2c3f8620bea5763/baker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 70, 911, 67, 4288, 67, 2116, 12, 4288, 4672, 2082, 18, 1289, 67, 3482, 2932, 17, 88, 3113, 5238, 4146, 3113, 1301, 1546, 2233, 3113, 618, 1546, 701, 3113, 805, 33, 7036, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 70, 911, 67, 4288, 67, 2116, 12, 4288, 4672, 2082, 18, 1289, 67, 3482, 2932, 17, 88, 3113, 5238, 4146, 3113, 1301, 1546, 2233, 3113, 618, 1546, 701, 3113, 805, 33, 7036, 16, ...
verbose('finished add column', t0)
def add_column(B, H_B, a): """ The add column procedure. INPUT: B -- a non-singular square matrix H_B -- the Hermite normal form of B a -- a column vector OUTPUT: x -- a vector such that H' = H_B.augment(x) is the HNF of A = B.augment(a). """ t0 = verbose('starting add_column') # We use a direct solve method without inverse. This # is more clever than what is in Allan Steel's talk and # what is in that paper, in 2 ways -- (1) no inverse need # to be computed, and (2) we cleverly solve a vastly easier # system and recover the solution to the original system. # Here's how: # 1. We make a copy of B but with the last *nasty* row of B replaced # by a random very nice row. C = copy(B) C[C.nrows()-1] = [1]*C.ncols() # 2. Then we find the unique solution to C * x = a # (todo -- recover from bad case.) x = C.solve_right(a) # 3. We next delete the last row of B and find a basis vector k # for the 1-dimensional kernel. D = B.matrix_from_rows(range(C.nrows()-1)) N = D._rational_kernel_iml() if N.ncols() != 1: raise NotImplementedError, "need to recover gracefully from rank issues with matrix." k = N.matrix_from_columns([0]) # 4. The sought for solution z to B*z = a is some linear combination # z = x + alpha*k # and setting w to be the last row of B, this column vector z satisfies # w * z = a' # where a' is the last entry of a. Thus # w * (x + alpha*k) = a' # so w * x + alpha*w*k = a' # so alpha*w*k = a' - w*x. w = B[-1] # last row of B a_prime = a[-1] lhs = w*k rhs = a_prime - w * x alpha = rhs[0] / lhs[0] z = x + alpha*k zd, d = z._clear_denom() x = H_B * zd if d > 1: for i in range(x.ncols()): x[i,0] = x[i,0]/d verbose('finished add column', t0) return x
897969dba2933af625d2342ba5317298d92f1122 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/897969dba2933af625d2342ba5317298d92f1122/matrix_integer_dense_hnf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2827, 12, 38, 16, 670, 67, 38, 16, 279, 4672, 3536, 1021, 527, 1057, 12131, 18, 225, 12943, 30, 605, 282, 1493, 279, 1661, 17, 17835, 8576, 3148, 670, 67, 38, 1493, 326, 670...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2827, 12, 38, 16, 670, 67, 38, 16, 279, 4672, 3536, 1021, 527, 1057, 12131, 18, 225, 12943, 30, 605, 282, 1493, 279, 1661, 17, 17835, 8576, 3148, 670, 67, 38, 1493, 326, 670...
print "install failed and returned %d." % ret print "Command was: %s" % " ".join(args)
print >> sys.stderr, \ "install failed and returned %d." % ret print >> sys.stderr, \ "Command was: %s" % " ".join(args)
def install_sw(swname, swver, swarc, swdir, swurl, swidir, swhash): swarc = os.path.join(extern_dir, swarc) swdir = os.path.join(extern_dir, swdir) if not os.path.exists(extern_dir): os.mkdir(extern_dir) if not os.path.exists(swarc): print "downloading %s" % swname try: fname, hdr = urllib.urlretrieve(swurl, swarc) except IOError: pass if not os.path.exists(swarc) or \ (hdr.gettype() != "application/x-gzip" and hdr.gettype() != "application/x-tar"): print "Unable to retrieve %s.\nPlease retrieve the file " \ "and place it at: %s\n" % (swurl, swarc) # remove a partial download or error message from proxy remove_sw(swname) sys.exit(1) if not os.path.exists(swdir): if not hash_sw(swname, swarc, swhash): sys.exit(1) print "unpacking %s" % swname tar = tarfile.open(swarc) # extractall doesn't exist until python 2.5 for m in tar.getmembers(): tar.extract(m, extern_dir) tar.close() # If there are patches, apply them now. patchdir = os.path.join("patch", swname) already_patched = os.path.join(swdir, ".patched") if os.path.exists(patchdir) and not os.path.exists(already_patched): patches = os.listdir(patchdir) for p in patches: patchpath = os.path.join(os.path.pardir, os.path.pardir, patchdir, p) print "Applying %s to %s" % (p, swname) subprocess.Popen(['patch', '-d', swdir, '-i', patchpath]).wait() file(already_patched, "w").close() swinst_dir = os.path.join(root_dir, py_install_dir, swidir) if not os.path.exists(swinst_dir): print "installing %s" % swname args = ['python', 'setup.py', 'install', '--root=%s' % root_dir, '--install-lib=%s' % py_install_dir, '--install-data=%s' % py_install_dir] ret = subprocess.Popen(args, cwd = swdir).wait() if ret != 0: print "install failed and returned %d." % ret print "Command was: %s" % " ".join(args) sys.exit(1)
9bc819427a499a7d71b623a3fb0a22db005026b4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12612/9bc819427a499a7d71b623a3fb0a22db005026b4/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 5328, 12, 5328, 529, 16, 1352, 502, 16, 272, 905, 71, 16, 1352, 1214, 16, 1352, 718, 16, 1352, 350, 481, 16, 1352, 2816, 4672, 272, 905, 71, 273, 1140, 18, 803, 18, 5701, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 5328, 12, 5328, 529, 16, 1352, 502, 16, 272, 905, 71, 16, 1352, 1214, 16, 1352, 718, 16, 1352, 350, 481, 16, 1352, 2816, 4672, 272, 905, 71, 273, 1140, 18, 803, 18, 5701, ...
"""Usage: [-i] tag ...
"""Usage: [-i] [-p] tag ...
def blobs(program, *tags): """Usage: [-i] tag ... List all blobs reachable from tag[s]. """ ignore_missing = program.options.ignore_missing for tag in tags: for replicas in program.ddfs.blobs(tag, ignore_missing=ignore_missing): print '\t'.join(replicas)
e6aa9de2684f069606c67a8e46032ef03085c1b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/e6aa9de2684f069606c67a8e46032ef03085c1b3/ddfscli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21542, 12, 12890, 16, 380, 4156, 4672, 3536, 5357, 30, 23059, 77, 65, 23059, 84, 65, 1047, 1372, 225, 987, 777, 21542, 19234, 628, 1047, 63, 87, 8009, 3536, 2305, 67, 7337, 273, 5402, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21542, 12, 12890, 16, 380, 4156, 4672, 3536, 5357, 30, 23059, 77, 65, 23059, 84, 65, 1047, 1372, 225, 987, 777, 21542, 19234, 628, 1047, 63, 87, 8009, 3536, 2305, 67, 7337, 273, 5402, ...
raise exceptions.FailedDryRun(sys.exc_info())
raise exceptions.FailedDryRun(migration, sys.exc_info())
def _run_migration(self, migration): if migration.no_dry_run() and self.verbosity: print " - Migration '%s' is marked for no-dry-run." return db.dry_run = True db.debug, old_debug = False, db.debug pending_creates = db.get_pending_creates() db.start_transaction() migration_function = self.direction(migration) try: try: migration_function() except: raise exceptions.FailedDryRun(sys.exc_info()) finally: db.rollback_transactions_dry_run() db.debug = old_debug db.clear_run_data(pending_creates) db.dry_run = False
591ae1e4d9190be9ec76ab7c907a318af99eccb2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/591ae1e4d9190be9ec76ab7c907a318af99eccb2/migrators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 15746, 12, 2890, 16, 6333, 4672, 309, 6333, 18, 2135, 67, 25011, 67, 2681, 1435, 471, 365, 18, 16629, 8807, 30, 1172, 315, 300, 15309, 1995, 87, 11, 353, 9350, 364, 1158...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2681, 67, 15746, 12, 2890, 16, 6333, 4672, 309, 6333, 18, 2135, 67, 25011, 67, 2681, 1435, 471, 365, 18, 16629, 8807, 30, 1172, 315, 300, 15309, 1995, 87, 11, 353, 9350, 364, 1158...
DCENABLED = 1
DCENABLED = 0 dc_deprecated = "dircache function calls (dcdisable,dclistdir,dcreset) are deprecated, please fix caller"
def realPathCase(path): return None
002fb7f6e5fbc6885cb8c44ce71c37d386e9e5f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/888/002fb7f6e5fbc6885cb8c44ce71c37d386e9e5f9/filesys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22728, 2449, 12, 803, 4672, 327, 599, 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, 1652, 22728, 2449, 12, 803, 4672, 327, 599, 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...
n = int(float(timepointStr)) except ValueError:
n = int(timepointStr) except:
def onUpdateNumberOfTimepoints(self, evt): """ set the number of timepoints, and adjust the number of slices per timepoint accordingly """ timepointStr = self.timepointEdit.GetValue().strip() if not timepointStr: zAmnt = self.dataSource.getSlicesPerTimepoint() n = self.imageAmount / float(zAmnt) self.timepointEdit.SetValue("%d"%n) else: try: n = int(float(timepointStr)) except ValueError: return #currentTime = self.timepointEdit.GetValue() currentTime = n self.timeslider.SetRange(1, n) if currentTime < 1: currentTime = 1 if currentTime > n: currentTime = n self.timeslider.SetValue(currentTime)
24d61fb7ed3fd0784cc4231099e43bd6ab8eac45 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2877/24d61fb7ed3fd0784cc4231099e43bd6ab8eac45/ImportDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27728, 9226, 950, 4139, 12, 2890, 16, 6324, 4672, 3536, 444, 326, 1300, 434, 813, 4139, 16, 471, 5765, 326, 1300, 434, 12390, 1534, 813, 1153, 15905, 3536, 813, 1153, 1585, 273, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27728, 9226, 950, 4139, 12, 2890, 16, 6324, 4672, 3536, 444, 326, 1300, 434, 813, 4139, 16, 471, 5765, 326, 1300, 434, 12390, 1534, 813, 1153, 15905, 3536, 813, 1153, 1585, 273, 365, 18,...
self.regex = "^(weather|w)( [^ ]+){0,2}"
self.regex = "^(weather|w)($|( [^ ]+){1,2})"
def __init__(self): self.regex = "^(weather|w)( [^ ]+){0,2}"
d0f1bbac00a761b0016dc9bc88dc6f9f32432278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10749/d0f1bbac00a761b0016dc9bc88dc6f9f32432278/weblookup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 7584, 273, 15017, 12, 1814, 4806, 96, 91, 21433, 306, 66, 308, 6975, 95, 20, 16, 22, 1532, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 7584, 273, 15017, 12, 1814, 4806, 96, 91, 21433, 306, 66, 308, 6975, 95, 20, 16, 22, 1532, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
Return true iff the ordinal is valid and the second line is blank,
Return true if the ordinal is valid and the second line is blank,
def is_enumerated_list_item(self, ordinal, sequence, format): """ Check validity based on the ordinal value and the second line.
7602ba6a2e445160d1cd22b7bd642fd750896bf5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1278/7602ba6a2e445160d1cd22b7bd642fd750896bf5/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 7924, 19007, 67, 1098, 67, 1726, 12, 2890, 16, 12675, 16, 3102, 16, 740, 4672, 3536, 2073, 13800, 2511, 603, 326, 12675, 460, 471, 326, 2205, 980, 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, 353, 67, 7924, 19007, 67, 1098, 67, 1726, 12, 2890, 16, 12675, 16, 3102, 16, 740, 4672, 3536, 2073, 13800, 2511, 603, 326, 12675, 460, 471, 326, 2205, 980, 18, 2, -100, -100, -100, -10...
if not canUsePotion( char, potion ): return OOPS
def agilityPotion( char, potion, agilitytype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if agilitytype == 6: bonus = 10 # Greater Agility elif agilitytype == 7: bonus = 20 else: return OOPS char.dexterity = char.dexterity + bonus char.maxstamina = char.maxstamina + bonus wolfpack.addtimer( AGILITY_TIME, "potions.effecttimer", [ char, agilitytype, bonus ], 1 ) char.settag( 'agility_effect', 'true' ) char.updatestamina() char.updatestats() char.action( ANIM_FIDGET3 ) char.soundeffect( SOUND_DRINK1 ) char.effect( 0x375a, 10, 15 ) char.soundeffect( SOUND_AGILITY_UP ) consumePotion( char, potion, potions[ agilitytype ][ POT_RETURN_BOTTLE ] ) return
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1737, 1889, 52, 8240, 12, 1149, 16, 5974, 285, 16, 1737, 1889, 723, 262, 30, 225, 324, 22889, 273, 374, 225, 468, 5495, 1889, 309, 1737, 1889, 723, 422, 1666, 30, 324, 22889, 273, 1728...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1737, 1889, 52, 8240, 12, 1149, 16, 5974, 285, 16, 1737, 1889, 723, 262, 30, 225, 324, 22889, 273, 374, 225, 468, 5495, 1889, 309, 1737, 1889, 723, 422, 1666, 30, 324, 22889, 273, 1728...
'key-format':'ssh-rsa 1111111111111111 user%d-key%d',
'key-format':'ssh-rsa 11key4plc11 user%d-key%d',
def huge(): global number_sites, number_keys, number_persons, number_nodes, number_slices normal() (number_sites,number_keys,number_persons,number_nodes,number_slices) = [ huge_factor * x for x in (number_sites,number_keys,number_persons,number_nodes,number_slices)]
e12b56d5b3d0bf32ad1d930f36276184dea09d45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/e12b56d5b3d0bf32ad1d930f36276184dea09d45/TestPeers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 21627, 13332, 2552, 1300, 67, 12180, 16, 1300, 67, 2452, 16, 1300, 67, 12479, 87, 16, 1300, 67, 4690, 16, 1300, 67, 21562, 2212, 1435, 261, 2696, 67, 12180, 16, 2696, 67, 2452, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 21627, 13332, 2552, 1300, 67, 12180, 16, 1300, 67, 2452, 16, 1300, 67, 12479, 87, 16, 1300, 67, 4690, 16, 1300, 67, 21562, 2212, 1435, 261, 2696, 67, 12180, 16, 2696, 67, 2452, 16...
if os.path.isfile(os.path.normpath(self.Opt.DSCFILE)) == True:
if os.path.isfile(os.path.normpath(build.Opt.DSCFILE)) == True:
def main():
f168a282e53224f1e8c2d7db976b913a3f294ebe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/f168a282e53224f1e8c2d7db976b913a3f294ebe/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Return the ambient group related to self. EXAMPLES: An example involving the dihedral group on four elements,
Return the ambient group related to ``self``. EXAMPLES: An example involving the dihedral group on four elements,
def ambient_group(self): """ Return the ambient group related to self. EXAMPLES: An example involving the dihedral group on four elements, `D_8`:: sage: G = DihedralGroup(4) sage: H = CyclicPermutationGroup(4) sage: gens = H.gens() sage: S = PermutationGroup_subgroup(G, list(gens)) sage: S.ambient_group() Dihedral group of order 8 as a permutation group sage: S.ambient_group() == G True """ return self.__ambient_group
f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13232, 1979, 67, 1655, 12, 2890, 4672, 3536, 2000, 326, 13232, 1979, 1041, 3746, 358, 12176, 2890, 68, 8338, 225, 5675, 8900, 11386, 30, 225, 1922, 3454, 29876, 6282, 326, 4314, 28351, 104...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13232, 1979, 67, 1655, 12, 2890, 4672, 3536, 2000, 326, 13232, 1979, 1041, 3746, 358, 12176, 2890, 68, 8338, 225, 5675, 8900, 11386, 30, 225, 1922, 3454, 29876, 6282, 326, 4314, 28351, 104...
sys.stderr.write(_("Can't read --exclude-file: %s") % options.excludefilename)
print >> sys.stderr, _( "Can't read --exclude-file: %s") % options.excludefilename
def main(): global default_keywords try: opts, args = getopt.getopt( sys.argv[1:], 'ad:DEhk:Kno:p:S:Vvw:x:', ['extract-all', 'default-domain', 'escape', 'help', 'keyword=', 'no-default-keywords', 'add-location', 'no-location', 'output=', 'output-dir=', 'style=', 'verbose', 'version', 'width=', 'exclude-file=', 'docstrings', ]) except getopt.error, msg: usage(1, msg) # for holding option values class Options: # constants GNU = 1 SOLARIS = 2 # defaults extractall = 0 # FIXME: currently this option has no effect at all. escape = 0 keywords = [] outpath = '' outfile = 'messages.pot' writelocations = 1 locationstyle = GNU verbose = 0 width = 78 excludefilename = '' docstrings = 0 options = Options() locations = {'gnu' : options.GNU, 'solaris' : options.SOLARIS, } # parse options for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-a', '--extract-all'): options.extractall = 1 elif opt in ('-d', '--default-domain'): options.outfile = arg + '.pot' elif opt in ('-E', '--escape'): options.escape = 1 elif opt in ('-D', '--docstrings'): options.docstrings = 1 elif opt in ('-k', '--keyword'): options.keywords.append(arg) elif opt in ('-K', '--no-default-keywords'): default_keywords = [] elif opt in ('-n', '--add-location'): options.writelocations = 1 elif opt in ('--no-location',): options.writelocations = 0 elif opt in ('-S', '--style'): options.locationstyle = locations.get(arg.lower()) if options.locationstyle is None: usage(1, _('Invalid value for --style: %s') % arg) elif opt in ('-o', '--output'): options.outfile = arg elif opt in ('-p', '--output-dir'): options.outpath = arg elif opt in ('-v', '--verbose'): options.verbose = 1 elif opt in ('-V', '--version'): print _('pygettext.py (xgettext for Python) %s') % __version__ sys.exit(0) elif opt in ('-w', '--width'): try: options.width = int(arg) except ValueError: usage(1, _('--width argument must be an integer: %s') % arg) elif opt in ('-x', '--exclude-file'): options.excludefilename = arg # calculate escapes make_escapes(options.escape) # calculate all keywords options.keywords.extend(default_keywords) # initialize list of strings to exclude if options.excludefilename: try: fp = open(options.excludefilename) options.toexclude = fp.readlines() fp.close() except IOError: sys.stderr.write(_("Can't read --exclude-file: %s") % options.excludefilename) sys.exit(1) else: options.toexclude = [] # slurp through all the files eater = TokenEater(options) for filename in args: if filename == '-': if options.verbose: print _('Reading standard input') fp = sys.stdin closep = 0 else: if options.verbose: print _('Working on %s') % filename fp = open(filename) closep = 1 try: eater.set_filename(filename) try: tokenize.tokenize(fp.readline, eater) except tokenize.TokenError, e: sys.stderr.write('%s: %s, line %d, column %d\n' % (e[0], filename, e[1][0], e[1][1])) finally: if closep: fp.close() # write the output if options.outfile == '-': fp = sys.stdout closep = 0 else: if options.outpath: options.outfile = os.path.join(options.outpath, options.outfile) fp = open(options.outfile, 'w') closep = 1 try: eater.write(fp) finally: if closep: fp.close()
6e972414bec063ce953df9dea5a13239ac7e5604 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6e972414bec063ce953df9dea5a13239ac7e5604/pygettext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 805, 67, 11771, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 296, 361, 30, 1639, 76, 79, 30, 47, 2135, 30, 84, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 805, 67, 11771, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 296, 361, 30, 1639, 76, 79, 30, 47, 2135, 30, 84, 3...
return u_symb.encode('utf8')[:self.size]
return u_symb[:self.size].encode('utf8')
def _symbol_set_char(self, symb): #TODO: # * we need to remove the "symb==False" from the next line BUT # for now too many things rely on this broken behavior # * the symb==None test should be common to all data types if symb == None or symb == False: return None
9e05ad2f3294e330ab5886f273b68174f26a82a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/9e05ad2f3294e330ab5886f273b68174f26a82a7/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7175, 67, 542, 67, 3001, 12, 2890, 16, 1393, 1627, 4672, 468, 6241, 30, 468, 380, 732, 1608, 358, 1206, 326, 315, 9009, 1627, 631, 8381, 6, 628, 326, 1024, 980, 605, 1693, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7175, 67, 542, 67, 3001, 12, 2890, 16, 1393, 1627, 4672, 468, 6241, 30, 468, 380, 732, 1608, 358, 1206, 326, 315, 9009, 1627, 631, 8381, 6, 628, 326, 1024, 980, 605, 1693, 468, ...
"numeric: %s" % buildCount)
" numeric: %s" % buildCount)
def __init__(self, value, template = None, frozen = False): """ Initialize a Revision object from a string representation of a version release. ParseError exceptions are thrown if the string representation is ill-formed.
f63a6d3817bb9ea0b262cb604354a66fd74de034 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/f63a6d3817bb9ea0b262cb604354a66fd74de034/versions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 16, 1542, 273, 599, 16, 12810, 273, 1083, 4672, 3536, 9190, 279, 13132, 733, 628, 279, 533, 4335, 434, 279, 1177, 3992, 18, 17372, 4798, 854, 6718, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 16, 1542, 273, 599, 16, 12810, 273, 1083, 4672, 3536, 9190, 279, 13132, 733, 628, 279, 533, 4335, 434, 279, 1177, 3992, 18, 17372, 4798, 854, 6718, ...
toolsStartOverActionText = "<u><b>Start Over</b></u><br>"\ "Cancels the current operation, leaving the user in the current mode."\
toolsStartOverActionText =\ "<u><b>Start Over</b></u><br>"\ "Cancels the current operation, leaving the user "\ "in the current mode."\
def createWhatsThisTextForMainWindowWidgets(win): """ Adds the "What's This" help text to items found in the NE1 mainwindow toolbars and menus . @param win: NE1's mainwindow object. @type win: U{B{QMainWindow}<http://doc.trolltech.com/4/qmainwindow.html>} @note: Property Managers specify "What's This" text for their own widgets, usually in a method called add_whats_this_text(), not in this file. """ # # File Toolbar # # Open File fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)<br> "\ "<p><img source=\"ui/actions/File/Open.png\"><br> "\ "Opens a new file."\ "</p>" win.fileOpenAction.setWhatsThis( fileOpenText ) # Import File fileImportText = "<u><b>Import File</b></u><br>"\ "Inserts a file of any chemical file format supported by "\ "<b>Openbabel</b> into the current Part" win.fileImportAction.setWhatsThis(fileImportText) #Export File fileExportText = "<u><b>Export File</b></u><br>"\ "Save the current Part in any chemical file format supported by "\ "<b>Openbabel</b>. Note that exclusive features of NanoEngineer-1 "\ "are not saved to the exported file" win.fileExportAction.setWhatsThis(fileExportText) # Save File fileSaveText = "<u><b>Save File</b></u> (Ctrl + S)<br> "\ "<p><img source=\"ui/actions//Save.png\"><br> "\ "Saves the current file."\ "</p>" win.fileSaveAction.setWhatsThis( fileSaveText ) # # Edit Toolbar # # Make Checkpoint ### editMakeCheckpointText = \ "<u><b>Make Checkpoint</b></u>"\ "<p>"\ "<img source=\"ui/actions/Edit/Make_CheckPoint.png\"><br> "\ "Make Undo checkpoint."\ "</p>" win.editMakeCheckpointAction.setWhatsThis( editMakeCheckpointText ) # Automatic Checkpointing ### [minor changes, bruce 060319] editAutoCheckpointingText = \ "<u><b>Automatic Checkpointing</b></u>"\ "<p>"\ "Enables/Disables <b>Automatic Checkpointing</b>. When enabled, "\ "the program maintains the Undo stack automatically. When disabled, "\ "the user is required to manually create Undo checkpoints using the "\ "<b>Make Checkpoint</b> button: "\ "</p>"\ "<p><img source=\"ui/actions/Edit/Make_CheckPoint.png\">"\ "</p>"\ "<p><b>Automatic Checkpointing</b> can impact program performance. "\ "By disabling Automatic Checkpointing, the program will run faster. "\ "</p>"\ "<p><b><i>Remember that you must make your own Undo checkpoints "\ "manually when Automatic Checkpointing is disabled.</i></b>"\ "</p>" win.editAutoCheckpointingAction.setWhatsThis( editAutoCheckpointingText ) # Clear Undo Stack ### [minor changes, bruce 060319] editClearUndoStackText = "<u><b>Clear Undo Stack</b></u>"\ "<p>Clears all checkpoints on the Undo and Redo stacks, freeing up memory."\ "</p>" win.editClearUndoStackAction.setWhatsThis( editClearUndoStackText ) # Undo editUndoText = "<u><b>Undo</b></u> (Ctrl + Z)<br> "\ "<p><img source=\"ui/actions/Undo.png\"><br> "\ "Reverses the last edit or command which changed structure or selection. "\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Undo "\ "only works if you got this popup from the Edit menu item for Undo, "\ "not from the Undo toolbutton."\ "</font>"\ "</p>" #bruce 060317 revised this text to reflect what it does in A7; 060320 added 1421-not-fixed warning win.editUndoAction.setWhatsThis( editUndoText ) win.editUndoText = editUndoText #bruce 060317 to help fix bug 1421 in Undo whatsthis wiki help link # Redo from PlatformDependent import is_macintosh if is_macintosh(): redo_accel = "(Ctrl + Shift + Z)" # note: this is further modified (Ctrl -> Cmd) by other code # changing this is partly redundant with code in undo*.py, but as of 060317 it's desirable in editRedoText too else: redo_accel = "(Ctrl + Y)" editRedoText = "<u><b>Redo</b></u> %s<br> "\ "<p><img source=\"ui/actions/Edit/Redo.png\"> <br>"\ "Restores a change which was undone using the Undo command."\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Redo "\ "only works if you got this popup from the Edit menu item for Redo, "\ "not from the Redo toolbutton."\ "</font>"\ "</p>" % redo_accel #bruce 060317 revised this text to be more accurate, and split out redo_accel; 060320 added 1421-not-fixed warning win.editRedoAction.setWhatsThis( editRedoText ) win.editRedoText = editRedoText #bruce 060317 to help fix bug 1421 in Redo whatsthis wiki help link # Cut editCutText = "<u><b>Cut</b></u> (Ctrl + X)<br> "\ "<p><img source=\"ui/actions/Edit/Cut.png\"><br> "\ "Removes the selected object(s) and stores the cut data on the"\ "clipboard."\ "</p>" win.editCutAction.setWhatsThis( editCutText ) # Copy editCopyText = "<u><b>Copy</b></u> (Ctrl + C)<br> "\ "<p><img source=\"ui/actions/Edit/Copy.png\"><br> "\ "Places a copy of the selected chunk(s) on the clipboard "\ "while leaving the original chunk(s) unaffected."\ "</p>" win.editCopyAction.setWhatsThis( editCopyText ) # Paste editPasteText = "<u><b>Paste</b></u> (Ctrl + V)<br> "\ "<p><img source=\"ui/actions/Edit/Paste_On.png\"><br> "\ "<b>Paste</b> places the user in <b>Build</b> mode where copied chunks on "\ "the clipboard can be pasted into the model by double clicking in empty space. "\ "If the current clipboard chunk has a <b><i>hotspot</i></b>, it can be bonded to "\ "another chunk by single clicking on one of the chunk's bondpoints."\ "</p>"\ "<p>A <b><i>Hotspot</i></b> is a green bondpoint on a clipboard chunk indicating "\ "it will be the active bondpoint which will connect to another chunk's bondpoint. "\ "To specify a hotspot on the clipboard chunk, click on one of its bondpoints in the "\ "<b><i>MMKit's Thumbview</i></b>."\ "</p>" win.editPasteAction.setWhatsThis( editPasteText ) # Delete editDeleteText = "<u><b>Delete</b></u> (DEL)<br> "\ "<p><img source=\"ui/actions/Delete.png\"><br> "\ "Deletes the selected object(s). "\ "For this Alpha release, deleted objects may be permanently lost, or they might be recoverable using Undo.</p>" #bruce 060212 revised above text (and fixed spelling error); should be revised again before A7 release win.editDeleteAction.setWhatsThis( editDeleteText ) #Preferences Dialog editPrefsText = "<u><b>Preferences Dialog</b></u>"\ "<p>Allows you to edit various user preferences "\ "such as changing atom, bond display properties,"\ "lighting, background color, window position and"\ "size, plugins etc. </p>" win.editPrefsAction.setWhatsThis( editPrefsText ) # # View Toolbar # # Home View setViewHomeActionText = \ "<u><b>Home</b></u> (Home)<br>"\ "<p>"\ "<img source=\"ui/actions/View/Modify/Home.png\"><br>"\ "When you create a new model, it appears in a "\ "default view orientation (FRONT view). When you "\ "open an existing model, it appears in the "\ "orientation it was last saved. You can change the "\ "default orientation by selecting <b>Set Home View "\ "to Current View</b> from the <b>View</b> menu."\ "</p>" win.setViewHomeAction.setWhatsThis( setViewHomeActionText ) # Fit to Window setViewFitToWindowActionText = "<u><b>Fit To Window</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom_To_Fit.png\"><br> "\ "Refits the model to the screen so you can view the entire model."\ "</p>" win.setViewFitToWindowAction.setWhatsThis( setViewFitToWindowActionText ) # Recenter setViewRecenterActionText = "<u><b>Recenter</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Recenter.png\"><br> "\ "Changes the view center and zoom factor so that the origin is in the "\ "center of the view and you can view the entire model."\ "</p>" win.setViewRecenterAction.setWhatsThis( setViewRecenterActionText ) # Zoom Tool setzoomToolActionText = "<u><b>Zoom Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom.png\"><br> "\ "Allows the user to zoom into a specific area of the model by specifying a rectangular area. "\ "This is done by holding down the left button and dragging the mouse.</p>"\ "<p>A mouse with a mouse wheel can also be used to zoom in and out "\ "at any time, without using the Zoom Tool.</p>" win.zoomToolAction.setWhatsThis( setzoomToolActionText ) # Pan Tool setpanToolActionText = "<u><b>Pan Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Pan.png\"><br> "\ "Allows X-Y panning using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can pan the model at any time by pressing "\ "the middle mouse button while holding down the Shift key.</p>" win.panToolAction.setWhatsThis( setpanToolActionText ) # Rotate Tool setrotateToolActionText = "<u><b>Rotate Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Rotate.png\"><br> "\ "Allows free rotation using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can rotate the model at any time by pressing "\ "the middle mouse button and dragging the mouse.</p>" win.rotateToolAction.setWhatsThis( setrotateToolActionText ) # Orthographic Projection setViewOrthoActionText = "<u><b>Orthographic Projection</b></u><br>"\ "<p>Sets nonperspective (or parallel) projection, with no foreshortening."\ "</p>" win.setViewOrthoAction.setWhatsThis( setViewOrthoActionText ) # Perspective Projection setViewPerspecActionText = "<u><b>Perspective Projection</b></u><br>"\ "<p>Set perspective projection, drawing objects slightly larger "\ "that are closer to the viewer."\ "</p>" win.setViewPerspecAction.setWhatsThis( setViewPerspecActionText ) # Normal To viewNormalToActionText = "<u><b>Set View Normal To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Normal_To.png/\"><br> "\ "Orients view to the normal vector of the plane defined by "\ "3 or more selected atoms, or a jig's axis."\ "</p>" win.viewNormalToAction.setWhatsThis( viewNormalToActionText ) # Parallel To viewParallelToActionText = "<u><b>Set View Parallel To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Parallel_To.png\"><br> "\ "Orients view parallel to the vector defined by 2 selected atoms."\ "</p>" win.viewParallelToAction.setWhatsThis( viewParallelToActionText ) # Save Named View saveNamedViewActionText = "<u><b>Save Named View</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Save_Named_View.png\"><br> "\ "Saves the current view as a custom <b>named view</b> and places it in the Model Tree.</p>" \ "<p>The view can be restored by selecting <b>Change View</b> from its context menu in the Model Tree."\ "</p>" win.saveNamedViewAction.setWhatsThis( saveNamedViewActionText ) # Front View viewFrontActionText = "<u><b>Front View</b></u><br>"\ "<p><img source=\"ui/actions/View/Front.png\"><br> "\ "Orients the view to the Front View."\ "</p>" win.viewFrontAction.setWhatsThis( viewFrontActionText ) # Back View viewBackActionText = "<u><b>Back View</b></u><br>"\ "<p><img source=\"ui/actions/View/Back.png\"><br> "\ "Orients the view to the Back View."\ "</p>" win.viewBackAction.setWhatsThis( viewBackActionText ) # Top View viewTopActionText = "<u><b>Top View</b></u><br>"\ "<p><img source=\"ui/actions/View/Top.png\"><br> "\ "Orients the view to the Top View."\ "</p>" win.viewTopAction.setWhatsThis( viewTopActionText ) # Bottom View viewBottomActionText = "<u><b>Bottom View</b></u><br>"\ "<p><img source=\"ui/actions/View/Bottom.png\"><br> "\ "Orients the view to the Bottom View."\ "</p>" win.viewBottomAction.setWhatsThis( viewBottomActionText ) # Left View viewLeftActionText = "<u><b>Left View</b></u><br>"\ "<p><img source=\"ui/actions/View/Left.png\"><br> "\ "Orients the view to the Left View."\ "</p>" win.viewLeftAction.setWhatsThis( viewLeftActionText ) # Right View viewRightActionText = "<u><b>Right View</b></u><br>"\ "<p><img source=\"ui/actions/View/Right.png\"><br> "\ "Orients the view to the Right View."\ "</p>" win.viewRightAction.setWhatsThis( viewRightActionText ) #Isometric View viewIsometricActionText = "<u><b>IsometricView</b></u><br>"\ "<p><img source=\"ui/actions/View/Isometric.png\"><br> "\ "Orients the view to the Isometric View."\ "</p>" win.viewIsometricAction.setWhatsThis( viewIsometricActionText ) # Rotate View 180 viewRotate180ActionText = "<u><b>Rotate View 180</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_180.png.png\"><br> "\ "Rotates the view 180 degrees."\ "</p>" win.viewRotate180Action.setWhatsThis( viewRotate180ActionText ) # Rotate View +90 viewRotatePlus90ActionText = "<u><b>Rotate View +90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_+90.png\"><br> "\ "Increment the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotatePlus90Action.setWhatsThis( viewRotatePlus90ActionText ) # Rotate View -90 viewRotateMinus90ActionText = "<u><b>Rotate View -90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_-90.png\"><br> "\ "Decrement the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotateMinus90Action.setWhatsThis( viewRotateMinus90ActionText ) # QuteMol viewQuteMolActionText = \ "<u><b>QuteMol</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/QuteMol.png\"><br> "\ "Starts QuteMol and loads a PDB file of the current model."\ "</p>" \ "QuteMol must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewQuteMolAction.setWhatsThis( viewQuteMolActionText ) # POV-Ray (was Raytrace Scene) viewRaytraceSceneActionText = "<u><b>POV-Ray</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Raytrace_Scene.png\"><br> "\ "Raytrace the current scene using POV-Ray. "\ "</p>" \ "POV-Ray must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewRaytraceSceneAction.setWhatsThis( viewRaytraceSceneActionText ) # # Grids Toolbar # # Surface 100 orient100ActionText = "<u><b>Surface 100</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface100.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,0,0) surface of a diamond lattice."\ "</p>" win.orient100Action.setWhatsThis(orient100ActionText ) # Surface 110 orient110ActionText = "<u><b>Surface 110</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface110.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,0) surface of a diamond lattice."\ "</p>" win.orient110Action.setWhatsThis(orient110ActionText ) # Surface 111 orient111ActionText = "<u><b>Surface 111</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface111.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,1) surface of a diamond lattice."\ "</p>" win.orient111Action.setWhatsThis(orient111ActionText ) # # Insert toolbar # # Graphene insertGrapheneActionText = \ "<u><b>Build Graphene</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Graphene.png\"><br> "\ "Inserts a 2D sheet of graphene in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertGrapheneAction.setWhatsThis(insertGrapheneActionText ) # Build Nanotube insertNanotubeActionText = \ "<u><b>Build Nanotube</b></u>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Nanotube.png\"> <br>"\ "Inserts a carbon or boron nitride nanotube in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertNanotubeAction.setWhatsThis(insertNanotubeActionText ) # Build DNA buildDnaActionText = \ "<u><b>Build DNA</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/DNA.png\"><br> "\ "Inserts DNA in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.buildDnaAction.setWhatsThis(buildDnaActionText ) # POV-Ray Scene insertPovraySceneActionText = "<u><b>Insert POV-Ray Scene</b></u><br>"\ "<p><img source=\"ui/actions/POV-Ray_Scene.png\"><br> "\ "Inserts a POV-Ray Scene file based on the current model and viewpoint. "\ "</p>" win.insertPovraySceneAction.setWhatsThis(insertPovraySceneActionText ) # Comment insertCommentActionText = "<u><b>Insert Comment</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Comment.png\"><br> "\ "Inserts a comment in the current part. "\ "</p>" win.insertCommentAction.setWhatsThis(insertCommentActionText ) # # Display toolbar # # Display Default dispDefaultActionText = "<u><b>Display Default</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Default.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Default</b> , rendering them in the <b>Current Display Mode</b>."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to the <b>Default Display Mode</b>. " \ "All chunks with their display setting set to <b>Default</b> will be rendered in the "\ "<b>Default Display Mode</b>."\ "</p>"\ "<p>The <b>Default Display Mode</b> can be changed via the "\ "<b>Edit > Preferences</b> menu and selecting the <b>Modes</b> tab."\ "</p>"\ "<p>The <b>Current or Default Display Mode</b> is displayed in the status bar in the "\ "lower right corner of the main window."\ "</p>" win.dispDefaultAction.setWhatsThis(dispDefaultActionText ) # Display Invisible dispInvisActionText = "<u><b>Display Invisible</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Invisible.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Invisible</b>, making them invisible."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Invisible</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispInvisAction.setWhatsThis(dispInvisActionText ) # Display Lines dispLinesActionText = "<u><b>Display Lines</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Lines.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ " <b>Lines</b>. Only bonds are rendered as colored lines."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Lines</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispLinesAction.setWhatsThis(dispLinesActionText ) # Display Tubes dispTubesActionText = "<u><b>Display Tubes</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Tubes.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Tubes</b>. Atoms and bonds are rendered as colored tubes."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Tubes</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispTubesAction.setWhatsThis(dispTubesActionText ) # Display Ball and Stick dispBallActionText = "<u><b>Display Ball and Stick</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Ball_and_Stick.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Ball and Stick</b> mode. Atoms are rendered "\ "as spheres and bonds are rendered as narrow cylinders."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Ball and Stick</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres and cylinders can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispBallAction.setWhatsThis(dispBallActionText ) # Display CPK # [bruce extended and slightly corrected text, 060307] dispCPKActionText = "<u><b>Display CPK</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/CPK.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>CPK</b> mode. Atoms are rendered as spheres with "\ "a size equal to 0.78 of their VdW radius, corresponding "\ "to a contact force of approximately 0.1 nN with neighboring "\ "nonbonded atoms. Bonds are not rendered."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>CPK</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispCPKAction.setWhatsThis(dispCPKActionText ) # Display Cylinder dispCylinderActionText = "<u><b>Display Cylinder</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Cylinder.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Cylinder</b> mode. Chunks are rendered as cylinders."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Cylinder</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispCylinderAction.setWhatsThis(dispCylinderActionText ) # Display Surface dispSurfaceActionText = "<u><b>Display Surface</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Surface.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Surface</b> mode. Chunks are rendered as a smooth surface."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Surface</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispSurfaceAction.setWhatsThis(dispSurfaceActionText ) #Reset Chunk Color dispResetChunkColorText = "<u><b>Reset Chunk Color</b></u><br>"\ "Resets the user defined chunk color and renders the atoms " \ "(in the chunk) with their own element colors" win.dispResetChunkColorAction.setWhatsThis(dispResetChunkColorText ) #Reset Atoms Display dispResetAtomsDisplayText = "<u><b>Reset Atoms Display</b></u><br>"\ "Renders the selected atoms (or the atoms in the"\ "selected chunks) with the same display style as "\ "that of their parent chunk" win.dispResetAtomsDisplayAction.setWhatsThis(dispResetAtomsDisplayText) #Show Invisible Atoms dispShowInvisAtomsText = "<u><b>Show Invisible Atoms</b></u><br>"\ "Renders the selected atoms (or the atoms in the selected "\ "chunks) with the same display style as their parent chunk. "\ "However, if the parent chunk is set as invisible, this feature " \ "will not work. " win.dispShowInvisAtomsAction.setWhatsThis(dispShowInvisAtomsText) #Element Color Settings Dialog dispElementColorSettingsText = "<u><b>Element Color Settings Dialog</b></u><br>"\ "Element colors can be manually changed " \ "using this dialog. Also, the user can load"\ "or save the element colors" win.dispElementColorSettingsAction.setWhatsThis(dispElementColorSettingsText) # # Select toolbar # # Select All selectAllActionText = "<u><b>Select All</b></u> (Ctrl + A)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_All.png\"><br> "\ "When in <b>Build</b> mode, this will select all the atoms in "\ "the model. Otherwise, this will select all the chunks in the model."\ "</p>" win.selectAllAction.setWhatsThis(selectAllActionText ) # Select None selectNoneActionText = "<u><b>Select None</b></u></p><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_None.png\"><br> "\ "Unselects everything currently selected.</p>" win.selectNoneAction.setWhatsThis(selectNoneActionText ) # InvertSelection selectInvertActionText = "<u><b>Invert Selection</b></u> (Ctrl + Shift + I)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Invert.png\"><br> "\ "Inverts the current selection.</p>" win.selectInvertAction.setWhatsThis(selectInvertActionText ) # Select Connected selectConnectedActionText = "<u><b>Select Connected</b></u> (Ctrl + Shift + C)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Connected.png\"><br> "\ "Selects all the atoms that can be reached by the currently selected atom "\ "via an unbroken chain of bonds. </p>"\ "<p>You can also select all connected atoms by double clicking on an atom or bond "\ "while in <b>Build</b> mode.</p>" win.selectConnectedAction.setWhatsThis(selectConnectedActionText ) # Select Doubly selectDoublyActionText = "<u><b>Select Doubly</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Doubly.png\"><br> "\ "Selects all the atoms that can be reached from a currently selected "\ "atom through two disjoint unbroken chains of bonds. Atoms singly "\ "connected to this group and unconnected to anything else are also "\ "included in the selection."\ "</p>" win.selectDoublyAction.setWhatsThis(selectDoublyActionText ) # Expand Selection selectExpandActionText = "<u><b>Expand Selection</b></u> (Ctrl + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Expand.png\"><br> "\ "Selects any atom that is a neighbor of a currently selected atom."\ "</p>" win.selectExpandAction.setWhatsThis(selectExpandActionText ) # Contract Selection selectContractActionText = "<u><b>Contract Selection</b></u> (Ctrl + Shift + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Contract.png\"><br> "\ "Deselects any atom that is a neighbor of a non-picked atom or has a bondpoint."\ "</p>" win.selectContractAction.setWhatsThis(selectContractActionText ) # # Modify Toolbar # # Adjust Selection modifyAdjustSelActionText = "<u><b>Adjust Selection</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_Selection.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the selection</i>) to make the geometry more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustSelAction.setWhatsThis(modifyAdjustSelActionText ) # Adjust All modifyAdjustAllActionText = "<u><b>Adjust All</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_All.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the entire part</i>) to make the geometry of the part more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustAllAction.setWhatsThis(modifyAdjustAllActionText ) # Hydrogenate modifyHydrogenateActionText = "<u><b>Hydrogenate</b></u> <br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Hydrogenate.png\"><br> "\ "Adds hydrogen atoms to all the bondpoints in the selection.</p>" win.modifyHydrogenateAction.setWhatsThis(modifyHydrogenateActionText ) # Dehydrogenate modifyDehydrogenateActionText = "<u><b>Dehydrogenate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Dehydrogenate.png\"><br> "\ "Removes all hydrogen atoms from the selection.</p>" win.modifyDehydrogenateAction.setWhatsThis(modifyDehydrogenateActionText ) # Passivate modifyPassivateActionText = "<u><b>Passivate</b></u> (Ctrl + P)<br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Passivate.png\"><br> "\ "Changes the types of incompletely bonded atoms to atoms with the "\ "right number of bonds, using atoms with the best atomic radius."\ "</p>" win.modifyPassivateAction.setWhatsThis(modifyPassivateActionText ) # Stretch modifyStretchActionText = "<u><b>Stretch</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Stretch.png\"><br> "\ "Stretches the bonds of the selected chunk(s).</p>" win.modifyStretchAction.setWhatsThis(modifyStretchActionText ) # Delete Bonds modifyDeleteBondsActionText = "<u><b>Cut Bonds</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Delete_Bonds.png\"><br> "\ "Delete all bonds between selected and unselected atoms or chunks.</p>" win.modifyDeleteBondsAction.setWhatsThis(modifyDeleteBondsActionText ) # Separate/New Chunk modifySeparateActionText = "<u><b>Separate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Separate.png\"><br> "\ "Creates a new chunk(s) from the currently selected atoms. "\ "If the selected atoms belong to different chunks, multiple new "\ "chunks are created.</p>" win.modifySeparateAction.setWhatsThis(modifySeparateActionText ) # New Chunk makeChunkFromSelectedAtomsActionText = "<u><b>New Chunk</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/New_Chunk.png\"><br> "\ "Creates a new chunk from the currently selected atoms. "\ "All atoms end up in a single chunk.</p>" win.makeChunkFromSelectedAtomsAction.setWhatsThis(makeChunkFromSelectedAtomsActionText ) # Merge Chunks modifyMergeActionText = "<u><b>Merge Chunks</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Merge.png\"><br> "\ "Merges two or more chunks into a single chunk.</p>" win.modifyMergeAction.setWhatsThis(modifyMergeActionText ) # Invert Chunks modifyInvertActionText = "<u><b>Invert</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Invert.png\"><br> "\ "Inverts the atoms of the selected chunks.</p>" win.modifyInvertAction.setWhatsThis(modifyInvertActionText ) # Mirror Selected Chunks #Note that the the feature name is intentionally kept "Mirror" instead of "Mirror Chunks" because # in future we will support mirrroing atoms as well. -- ninad060814 modifyMirrorActionText = "<u><b>Mirror</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Mirror.png\"><br> "\ "Mirrors the selected <b> chunks </b> about a reference Grid Plane.<br>"\ "<font color=\"#808080\">Note: In this version, it doesn't mirror jigs or individual atoms.</font> </p>" win.modifyMirrorAction.setWhatsThis(modifyMirrorActionText ) # Align to Common Axis modifyAlignCommonAxisActionText = "<u><b>Align To Common Axis</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/AlignToCommonAxis.png\"><br> "\ "Aligns one or more chunks to the axis of the first selected chunk."\ "You must select two or more chunks before using this feature."\ "</p>" win. modifyAlignCommonAxisAction.setWhatsThis( modifyAlignCommonAxisActionText ) #Center on Common Axis modifyCenterCommonAxisActionText= "<u><b>Center On Common Axis</b></u><br>"\ "<p><b> Moves</b> all selected chunks to the center of the <b> first </b> selected chunk "\ "and also <b>aligns</b> them to the axis of the first one ."\ "You must select two or more chunks before using this feature. </p>" win.modifyCenterCommonAxisAction.setWhatsThis(modifyCenterCommonAxisActionText) # # Tools Toolbar # # Select Chunks toolsSelectMoleculesActionText = "<u><b>Select Chunks</b></u><!-- [[Feature:Select Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/63.png\"><br> "\ "<b>Select Chunks</b> allows you to select/unselect chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click/Drag</b> - selects a chunk(s).</p>"\ "<p><b>Ctrl+Left Click/Drag</b> - removes chunk(s) from selection.</p>"\ "<p><b>Shift+Left Click/Drag</b> - adds chunk(s) to selection."\ "</p>" win. toolsSelectMoleculesAction.setWhatsThis( toolsSelectMoleculesActionText ) # Move Chunks toolsMoveMoleculeActionText = "<u><b>Move Chunks</b></u><!-- [[Feature:Move Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/64.png\"><br> "\ "Activates <b>Move Chunks</b> mode, allowing you to select, "\ "move and rotate one of more chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Drag</b> - moves the selected chunk(s).</p>"\ "<p><b>Ctrl+Left Drag</b> - freely rotates selected chunk(s).</p>"\ "<p><b>Shift+Left Drag</b> - constrained movement and rotation of a chunk about its own axis."\ "</p>" win. toolsMoveMoleculeAction.setWhatsThis( toolsMoveMoleculeActionText ) # Build Atoms toolsDepositAtomActionText = \ "<u><b>Build Atoms</b></u><!-- [[Feature:Build Atoms]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Atoms.png\"><br> "\ "<b>Build Atoms</b> allows you to build structures one atom at a time or by depositing objects "\ "that are on the paste clipboard. You can also insert structures from the "\ "NanoEngineer-1 Parts Library.</p>"\ "<p>It is also possible to change bond types between atoms using the <b>Bond Tool</b> or by "\ "simply dragging and dropping one bondpoint onto another."\ "</p>" win. toolsDepositAtomAction.setWhatsThis( toolsDepositAtomActionText ) # Build Crystal (was Cookie Cutter Mode) toolsCookieCutActionText = "<u><b>Build Crystal</b></u><!-- [[Feature:Build Crystal]] --><br>"\ "<p><><img source=\"ui/actions/Tools/Build Structures/Cookie_Cutter.png\"><br> "\ "<b>Build Crystal</b> provides tools for cutting out multi-layered shapes from "\ "slabs of diamond or lonsdaleite lattice.</p>" win. toolsCookieCutAction.setWhatsThis( toolsCookieCutActionText ) # Tools > Extrude toolsExtrudeActionText = "<u><b>Extrude</b></u><!-- [[Feature:Extrude Mode]] --><br>"\ "<p><img source=\"ui/actions/Insert/Features/Extrude.png\"><br> "\ "Activates <b>Extrude</b> mode, allowing you to create a rod or ring using a chunk as "\ "a repeating unit.</p>" win. toolsExtrudeAction.setWhatsThis( toolsExtrudeActionText ) # Fuse Chunks Mode toolsFuseChunksActionText = "<u><b>Fuse Chunks Mode</b></u><!-- [[Feature:Fuse Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Fuse.png\"><br> "\ "<b>Fuse Chunks</b> can be used to interactively join two or more "\ "chunks by dragging chunks around and fusing them together. "\ "Two fusing options are supported:<br><br>"\ "<b>Make Bonds</b> creates bonds between the existing bondpoints "\ "of two or more chunks. Bondpoints are highlighted and lines are drawn (and undrawn) as chunks "\ "are dragged to indicate bonding relationships between bondpoints. Bondpoints with "\ "multiple bonding relationships are highlighted in magenta to indicate that they cannot "\ "make bonds.<br><br>"\ "<b>Fuse Atoms</b> fuses pairs of overlapping atoms between chunks. The set of overlapping "\ "atoms in the selected chunk(s) are highlighted in green while the set of atoms that will be deleted "\ "in non-selected chunks are highlighted in dark red. It is possible that deleted atoms will not fuse "\ "properly, leaving bondpoints on the selected chunk(s) atoms. This is a bug. To help "\ "minimize this problem, try to get the bonds of overlapping atoms oriented similarly.<br>"\ "</p>" win.toolsFuseChunksAction.setWhatsThis( toolsFuseChunksActionText ) # # Simulator Toolbar # # Minimize Energy simMinimizeEnergyActionText = "<u><b>Minimize Energy</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Minimize_Energy.png\"><br> "\ "The potential energy of a chemical structure is a function of the relative positions of its atoms. " \ "To obtain this energy with complete accuracy involves a lot of computer time spent on quantum " \ "mechanical calculations, which cannot be practically done on a desktop computer. "\ "To get an approximate potential energy without all that, we represent the energy as a series of " \ "terms involving geometric properties of the structure: lengths of chemical bonds, angles between " \ "pairs and triples of chemical bonds, etc. </p>" \ "<p>" \ "As is generally the case with physical systems, the gradient of the potential energy represents " \ "the forces acting on various particles. The atoms want to move in the direction that most reduces " \ "the potential energy. Energy minimization is a process of adjusting the atom positions to try to find " \ "a global minimum of the potential energy. Each atom contributes three variables (its x, y, and z " \ "coordinates) so the search space is multi-dimensional. The global minimum is the configuration " \ "that the atoms will settle into if lowered to zero Kelvin. </p>" win. simMinimizeEnergyAction.setWhatsThis( simMinimizeEnergyActionText ) # Run Dynamics (was NanoDynamics-1). Mark 060807. simSetupActionText = "<u><b>Run Dynamics</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Run_Dynamics.png\"><br> "\ "This is the interface to the NanoEngineer-1 molecular dynamics simulator. "\ "Enter the parameters of the simulation and click <b>Run Simulation</b>."\ "The simulator creates a trajectory (movie) file by calculating the inter-atomic potentials and bonding "\ "of the entire model.</p>" win. simSetupAction.setWhatsThis( simSetupActionText ) # Play Movie (was Movie Player) Mark 060807. simMoviePlayerActionText = "<u><b>Play Movie</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Play_Movie.png\"><br> "\ "Plays the most recent trajectory (movie) file created by the NanoEngineer-1 molecular dynamics simulator."\ "To create a movie file, select <b>Run Dynamics</b>.</p>" win. simMoviePlayerAction.setWhatsThis( simMoviePlayerActionText ) # Make Graphs (was Plot Tool) Mark 060807. simPlotToolActionText = "<u><b>Make Graphs</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Make_Graphs.png\"><br> "\ "Make a graph of a simulator trace file using GNUplot. A simulation must be run to create "\ "the trace file and the part must have a jig that writes output to the trace file. <br><br>"\ "The following list of jigs write data to the trace file:<br>"\ "<b>Rotary Motors:</b> speed (GHz) and torque (nn-nm)<br>"\ "<b>Linear Motors:</b> displacement (pm)<br>"\ "<b>Anchors:</b> torque (nn-nm)<br>"\ "<b>Thermostats:</b> energy added (zJ)<br>"\ "<b>Thermometer:</b> temperature (K)<br>"\ "<b>Measure Distance:</b> distance(angstroms)<br>"\ "<b>Measure Angle:</b> angle (degrees)<br>"\ "<b>Measure Dihedral:</b> dihedral(degrees)<br>"\ "</p>" win. simPlotToolAction.setWhatsThis( simPlotToolActionText ) # # Dashboard Buttons # # Done toolsDoneActionText = "<u><b>Done</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Done.png\"><br> "\ "Completes the current operation and enters the default mode."\ "</p>" win. toolsDoneAction.setWhatsThis( toolsDoneActionText ) # Cancel toolsCancelActionText = "<u><b>Cancel</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Cancel.png\"><br> "\ "Cancels the current operation and enters the default mode."\ "</p>" win. toolsCancelAction.setWhatsThis( toolsCancelActionText ) # Back up toolsBackUpActionText = "<u><b>Back Up</b></u><br>"\ "Undoes the previous operation."\ "</p>" win. toolsBackUpAction.setWhatsThis( toolsBackUpActionText ) # Start Over toolsStartOverActionText = "<u><b>Start Over</b></u><br>"\ "Cancels the current operation, leaving the user in the current mode."\ "</p>" win.toolsStartOverAction.setWhatsThis(toolsStartOverActionText ) # Add Layers ccAddLayerActionText = "<u><b>Add Layer</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/addlayer.png\"><br> "\ "Adds a new layer of diamond lattice to the existing layer."\ "</p>" win.ccAddLayerAction.setWhatsThis(ccAddLayerActionText ) # # Jigs # # Anchor jigsAnchorActionText = "<u><b>Anchor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Anchor.png\"><br> "\ "Attaches an <b>Anchor</b> to the selected atom(s), which "\ "constrains its motion during a minimization or simulation."\ "</p>"\ "<p>To create an Anchor, enter <b>Build</b> mode, "\ "select the atom(s) you want to anchor and then select this action. "\ "Anchors are drawn as a black wireframe box around each selected atom."\ "</p>" win.jigsAnchorAction.setWhatsThis(jigsAnchorActionText ) # Rotary Motor jigsMotorActionText = "<u><b>Rotary Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Rotary_Motor.png\"><br> "\ "Attaches a <b>Rotary Motor</b> to the selected atoms. The Rotary Motor is used by "\ "the simulator to apply rotary motion to a set of atoms during a simulation run. You may "\ "specify the <b>torque (in nN*nm)</b> and <b>speed (in Ghz)</b> of the motor."\ "</p>"\ "<p>To create a Rotary Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsMotorAction.setWhatsThis(jigsMotorActionText ) # Linear Motor jigsLinearMotorActionText = "<u><b>Linear Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Linear_Motor.png\"><br> "\ "Attaches a <b>Linear Motor</b> to the selected atoms. The Linear Motor is used by "\ "the simulator to apply linear motion to a set of atoms during a simulation run. You may "\ "specify the <b>force (in nN*nm)</b> and <b>stiffness (in N/m)</b> of the motor."\ "</p>"\ "<p>To create a Linear Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsLinearMotorAction.setWhatsThis(jigsLinearMotorActionText ) # Thermostat jigsStatActionText = "<u><b>Thermostat</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Thermostat.png\"><br> "\ "Attaches a <b>Langevin Thermostat</b> to a single selected atom, thereby associating "\ "the themostat to the entire molecule of which the selected atom is a member. The user "\ "specifies the temperature (in Kelvin)."\ "</p>"\ "<p>The Langevin Thermostat is used to set and hold the temperature "\ "of a molecule during a simulation run."\ "</p>"\ "<p>To create a Langevin Thermostat, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermostat is drawn as a "\ "blue wireframe box around the selected atom."\ "</p>" win.jigsStatAction.setWhatsThis(jigsStatActionText ) # Thermometer jigsThermoActionText = "<u><b>Thermometer</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Thermometer.png\"><br> "\ "Attaches a <b>Thermometer</b> to a single selected atom, thereby associating "\ "the themometer to the entire molecule of which the selected atom is a member. "\ "<p>The temperature of the molecule will be recorded and written to a trace file "\ "during a simulation run."\ "</p>"\ "<p>To create a Thermometer, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermometer is drawn as a "\ "dark red wireframe box around the selected atom."\ "</p>" win.jigsThermoAction.setWhatsThis(jigsThermoActionText ) # ESP Image jigsESPImageActionText = "<u><b>ESP Image</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/ESP_Image.png\"><br> "\ "An <b>ESP Image</b> allows the user to visualize the electrostatic potential "\ "of points on the face of a square 2D surface. Nano-Hive's MPQC ESP Plane plug-in "\ "is used to calculate the electrostatic potential."\ "</p>"\ "<p>To create an ESP Image, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. The ESP Image is drawn as a "\ "plane with a bounding volume."\ "</p>" win.jigsESPImageAction.setWhatsThis(jigsESPImageActionText ) # Atom Set jigsAtomSetActionText = "<u><b>Atom Set</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Atom_Set.png\"><br> "\ "An <b>Atom Set</b> jig provides a convienient way to save an atom "\ "selection which can be reselected later."\ "</p>"\ "<p>To create an Atom Set, enter <b>Build</b> mode, "\ "select any number of atoms and then select this jig. The Atom Set is "\ "drawn as a set of wireframe boxes around each atom in the selection."\ "</p>"\ "<p>To reselect the atoms in an Atom Set, select it's context "\ "menu in the Model Tree and click the menu item that states "\ "<b>Select this jig's atoms</b>."\ "</p>" win.jigsAtomSetAction.setWhatsThis(jigsAtomSetActionText ) # Measure Distance jigsDistanceActionText = "<u><b>Measure Distance Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Distance.png\"><br> "\ "A <b>Measure Distance Jig</b> functions as a dimension to display the "\ "distance between two atoms."\ "</p>"\ "<p>To create the Measure Distance Jig, enter <b>Build</b> mode, "\ "select two atoms and then select this jig. The Measure Distance Jig is "\ "drawn as a pair of wireframe boxes around each atom connected by "\ "a line and a pair of numbers. The first number is the distance between the "\ "VdW radii (this can be a negative number for atoms that are close together). "\ "The second number is the distance between the nuclei."\ "</p>"\ "<p>The Measure Distance Jig will write the two distance values to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDistanceAction.setWhatsThis(jigsDistanceActionText ) # Measure Angle jigsAngleActionText = "<u><b>Measure Angle Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Angle.png\"><br> "\ "A <b>Measure Angle Jig</b> functions as a dimension to display the "\ "angle between three atoms.</p>"\ "<p>To create the Measure Angle Jig, enter <b>Build</b> mode, "\ "select three atoms and then select this jig. The Measure Angle Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the angle between the three atoms."\ "</p>"\ "<p>The Measure Angle Jig will write the angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsAngleAction.setWhatsThis(jigsAngleActionText ) # Measure Dihedral jigsDihedralActionText = "<u><b>Measure Dihedral Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Dihedral.png\"><br> "\ "A <b>Measure Dihedral Jig</b> functions as a dimension to display the "\ "dihedral angle of a four atom sequence.</p>"\ "<p>To create the Measure Dihedral Jig, enter <b>Build</b> mode, "\ "select four atoms and then select this jig. The Measure Dihedral Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the dihedral angle value."\ "</p>"\ "<p>The Measure Dihedral Jig will write the dihedral angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDihedralAction.setWhatsThis(jigsDihedralActionText ) # GAMESS Jig jigsGamessActionText = "<u><b>GAMESS Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Gamess.png\"><br> "\ "A <b>GAMESS Jig</b> is used to tag a set of atoms for running a GAMESS "\ "calculation. <b>Energy</b> and <b>Geometry Optimization</b> calculations are supported."\ "</p>"\ "<p>To create the GAMESS Jig, enter <b>Build</b> mode, "\ "select the atoms to tag and then select this jig. The GAMESS Jig is drawn as a "\ "set of magenta wireframe boxes around each atom."\ "</p>" win.jigsGamessAction.setWhatsThis(jigsGamessActionText ) # Grid Plane Jig jigsGridPlaneActionText = "<u><b>Grid Plane</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Reference Geometry/Grid_Plane.png\"><br> "\ "A <b>Grid Plane</b> jig is a rectanglar plane that can display a square or SiC grid "\ "within its boundary. It is often used as an aid in constructing large lattice "\ "structures made of silicon carbide (SiC). It is also used as a visual aid in estimating "\ "distances between atoms and/or other structures."\ "</p>"\ "<p>To create the Grid Plane jig, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. "\ "</p>"\ "<p>The Grid Plane jig is drawn as a rectanglar plane with a grid."\ "</p>" win.jigsGridPlaneAction.setWhatsThis(jigsGridPlaneActionText ) # # Help Toolbar # # What's This helpWhatsThisText = "<u><b>What's This</b></u><br>"\ "<p><img source=\"ui/actions/Help/WhatsThis.png\"><br> "\ "Click this option to invoke a small question mark that is attached to the mouse pointer. "\ "Click on a feature which you would like more information about. "\ "A popup box appears with information about the feature.</p>" win.helpWhatsThisAction.setWhatsThis( helpWhatsThisText ) win.helpMouseControlsAction.setWhatsThis('Displays help for mouse controls') win.helpKeyboardShortcutsAction.setWhatsThis('Displays help for keyboard shortcuts')
596540c24ceb3b478e904a42e26d7d5dd8809d95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/596540c24ceb3b478e904a42e26d7d5dd8809d95/whatsthis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2888, 2323, 2503, 1528, 1290, 6376, 3829, 16166, 12, 8082, 4672, 3536, 15605, 326, 315, 23801, 1807, 1220, 6, 2809, 977, 358, 1516, 1392, 316, 326, 12901, 21, 2774, 5668, 12748, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2888, 2323, 2503, 1528, 1290, 6376, 3829, 16166, 12, 8082, 4672, 3536, 15605, 326, 315, 23801, 1807, 1220, 6, 2809, 977, 358, 1516, 1392, 316, 326, 12901, 21, 2774, 5668, 12748, 87, ...
sage: hash(repr(x^2+1))
sage: hash(repr(x^2+1))
def __hash__(self): """ Returns the hash of this symbolic expression.
89fd08655f9cb6ef2711bfd6c92ad96e8a6e6c9b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/89fd08655f9cb6ef2711bfd6c92ad96e8a6e6c9b/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 4672, 3536, 2860, 326, 1651, 434, 333, 16754, 2652, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1001, 2816, 972, 12, 2890, 4672, 3536, 2860, 326, 1651, 434, 333, 16754, 2652, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
myEcos = [e for e in Ecomap.select(AND(Ecomap.q.ownerID == Ecouser.q.id, Ecouser.q.uni == uni, Ecomap.q.courseID == self.course.id), orderBy=['name'])] publicEcos = [e for e in Ecomap.select(AND(Ecomap.q.ownerID == Ecouser.q.id, Ecouser.q.uni != uni, Ecomap.q.courseID == self.course.id, Ecomap.q.public == True), orderBy=['name'])]
myEcos = [e for e in Ecomap.select(AND(Ecomap.q.ownerID == Ecouser.q.id, Ecouser.q.uni == uni, Ecomap.q.courseID == course.id), orderBy=['name'])] publicEcos = [e for e in Ecomap.select(AND(Ecomap.q.ownerID == Ecouser.q.id, Ecouser.q.uni != uni, Ecomap.q.courseID == course.id, Ecomap.q.public == True), orderBy=['name'])]
def view_course(self,**kwargs):
bd620ed6e7bc94139cb8bd730d5c5775ee916a14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5854/bd620ed6e7bc94139cb8bd730d5c5775ee916a14/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 5566, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 5566, 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, ...
def phrase_ref(self, before, after, text, rawsource):
def phrase_ref(self, before, after, rawsource, text):
def phrase_ref(self, before, after, text, rawsource): refname = normalize_name(text) reference = nodes.reference(rawsource, text) if rawsource[-2:] == '__': reference['anonymous'] = 1 self.document.note_anonymous_ref(reference) else: reference['refname'] = refname self.document.note_refname(reference) return before, [reference], after, []
018a79821ccb1056404d43dbe32e444d1a0e03c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/018a79821ccb1056404d43dbe32e444d1a0e03c1/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13045, 67, 1734, 12, 2890, 16, 1865, 16, 1839, 16, 1831, 3168, 16, 977, 4672, 1278, 529, 273, 3883, 67, 529, 12, 955, 13, 2114, 273, 2199, 18, 6180, 12, 1899, 3168, 16, 977, 13, 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, 13045, 67, 1734, 12, 2890, 16, 1865, 16, 1839, 16, 1831, 3168, 16, 977, 4672, 1278, 529, 273, 3883, 67, 529, 12, 955, 13, 2114, 273, 2199, 18, 6180, 12, 1899, 3168, 16, 977, 13, 309,...
event = Event(start_time, end_time, name, category) self._timeline.add_event(event)
self._event = Event(start_time, end_time, name, category) self._timeline.add_event(self._event)
def _on_ok(self,e): """Add new or update existing event""" try: start_time = self.__validate_start_time() end_time = self.__validate_end_time() name = self.__validate_name() category = self._category_choice.GetClientData( self._category_choice.GetSelection()) if start_time > end_time: display_error_message("End must be > Start") set_focus_on_textctrl(self._textctrl_start_time) return if self._updatemode: self._event.update(start_time, end_time, name, category) self._timeline.event_edited(self._event) else: event = Event(start_time, end_time, name, category) self._timeline.add_event(event) if self._cb_close_on_ok.GetValue(): self.Close() except: pass
5e536432e6c9d25da46ff5c5562f1c02d7b6cc8c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/5e536432e6c9d25da46ff5c5562f1c02d7b6cc8c/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 265, 67, 601, 12, 2890, 16, 73, 4672, 3536, 986, 394, 578, 1089, 2062, 871, 8395, 775, 30, 787, 67, 957, 273, 365, 16186, 5662, 67, 1937, 67, 957, 1435, 679, 67, 957, 282, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 265, 67, 601, 12, 2890, 16, 73, 4672, 3536, 986, 394, 578, 1089, 2062, 871, 8395, 775, 30, 787, 67, 957, 273, 365, 16186, 5662, 67, 1937, 67, 957, 1435, 679, 67, 957, 282, 273, ...
static xmlListPtr gen_xmlListPtr(int no) {
static xmlListPtr gen_xmlListPtr(int no, int nr ATTRIBUTE_UNUSED) {
def is_known_param_type(name): for type in known_param_types: if type == name: return 1 return 0
3d97e669eca6f4849c7b3014f472cacc57817015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/3d97e669eca6f4849c7b3014f472cacc57817015/gentest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2994, 67, 891, 67, 723, 12, 529, 4672, 364, 618, 316, 4846, 67, 891, 67, 2352, 30, 309, 618, 422, 508, 30, 327, 404, 327, 374, 225, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2994, 67, 891, 67, 723, 12, 529, 4672, 364, 618, 316, 4846, 67, 891, 67, 2352, 30, 309, 618, 422, 508, 30, 327, 404, 327, 374, 225, 2, -100, -100, -100, -100, -100, -100, ...
fields should be the attribute names that
``fields`` should be the attribute names that
def _loadFromRow(self, result, fields, cursor): """Load from a database row, described by fields. fields should be the attribute names that will be set. Note that userclasses will be created (but not loaded).""" position = 0 for elem in fields: value = result[position] valueType = cursor.description[position][1] if hasattr(self._dbModule, 'BOOLEAN') and \ valueType == self._dbModule.BOOLEAN and \ (value is not True or value is not False): # convert to a python boolean value = value and True or False if value and self._userClasses.has_key(elem): userClass = self._userClasses[elem] # create an instance value = userClass(value) self._values[elem] = value position += 1
6f065d7f40e2cd8ad1cba00bf68d639f5bb58726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1051/6f065d7f40e2cd8ad1cba00bf68d639f5bb58726/forgetSQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 1265, 1999, 12, 2890, 16, 563, 16, 1466, 16, 3347, 4672, 3536, 2563, 628, 279, 2063, 1027, 16, 11893, 635, 1466, 18, 225, 12176, 2821, 10335, 1410, 506, 326, 1566, 1257, 716, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 945, 1265, 1999, 12, 2890, 16, 563, 16, 1466, 16, 3347, 4672, 3536, 2563, 628, 279, 2063, 1027, 16, 11893, 635, 1466, 18, 225, 12176, 2821, 10335, 1410, 506, 326, 1566, 1257, 716, ...
self.path(src="%s/secondlife-bin.exe.config" % self.args['configuration'], dst=self.final_exe() + ".config")
def construct(self): super(WindowsManifest, self).construct() # the final exe is complicated because we're not sure where it's coming from, # nor do we have a fixed name for the executable self.path(self.find_existing_file('debug/secondlife-bin.exe', 'releaseSSE2/secondlife-bin.exe', 'relwithdebinfo/secondlife-bin.exe'), dst=self.final_exe())
9417eadb4c1e927dc0278cafe3116d9e2b8462dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8599/9417eadb4c1e927dc0278cafe3116d9e2b8462dc/viewer_manifest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4872, 12, 2890, 4672, 2240, 12, 10399, 9121, 16, 365, 2934, 10062, 1435, 468, 326, 727, 15073, 353, 31312, 2724, 732, 4565, 486, 3071, 1625, 518, 1807, 19283, 628, 16, 468, 12517, 741, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4872, 12, 2890, 4672, 2240, 12, 10399, 9121, 16, 365, 2934, 10062, 1435, 468, 326, 727, 15073, 353, 31312, 2724, 732, 4565, 486, 3071, 1625, 518, 1807, 19283, 628, 16, 468, 12517, 741, 7...
def fl_set_timer_countup(ob, yes): """ fl_set_timer_countup(ob, yes) """ _fl_set_timer_countup(ob, yes)
def fl_set_timer_countup(pObject, yes): """ fl_set_timer_countup(pObject, yes) """ _fl_set_timer_countup(pObject, yes)
def fl_set_timer_countup(ob, yes): """ fl_set_timer_countup(ob, yes) """ _fl_set_timer_countup(ob, yes)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 12542, 67, 1883, 416, 12, 84, 921, 16, 12465, 4672, 3536, 1183, 67, 542, 67, 12542, 67, 1883, 416, 12, 84, 921, 16, 12465, 13, 3536, 225, 389, 2242, 67, 542, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 12542, 67, 1883, 416, 12, 84, 921, 16, 12465, 4672, 3536, 1183, 67, 542, 67, 12542, 67, 1883, 416, 12, 84, 921, 16, 12465, 13, 3536, 225, 389, 2242, 67, 542, 67, ...
self['QTDIR'],
self['QTDIR'], self['QTDIR'],
def enable_modules(self, modules, debug=False) : import sys validModules = [ 'QtCore', 'QtGui', 'QtOpenGL', 'Qt3Support', # The next modules have not been tested yet so, please # maybe they require additional work on non Linux platforms 'QtSql', 'QtNetwork', 'QtSvg', 'QtTest', 'QtXml', 'QtUiTools', ] pclessModules = [ 'QtUiTools', 'QtUiTools_debug', ] invalidModules=[] for module in modules: if module not in validModules : invalidModules.append(module) if invalidModules : raise "Modules %s are not Qt4 modules. Valid Qt4 modules are: %s"% \ (str(invalidModules),str(validModules)) # TODO: Check whether we should add QT_CORE_LIB, QT_XML_LIB, QT_NETWORK_LIB... if 'QtGui' in modules: self.AppendUnique(CPPFLAGS='-DQT_GUI_LIB') if sys.platform == "linux2" : if debug : modules = [module+"_debug" for module in modules] for module in modules : if module in pclessModules : # self.AppendUnique(LIBS=[module]) self.AppendUnique(LIBPATH=[os.path.join(self["QTDIR"],"lib",module)]) self.AppendUnique(CPPPATH=[os.path.join(self["QTDIR"],"include","qt4",module)]) modules.remove(module) self.ParseConfig('PKG_CONFIG_PATH=%s/lib/pkgconfig pkg-config %s --libs --cflags'% ( self['QTDIR'], ' '.join(modules))) return if sys.platform == "win32" : if debug : debugSuffix = 'd' else : debugSuffix = '' self.AppendUnique(LIBS=[lib+'4'+debugSuffix for lib in modules]) if 'QtOpenGL' in modules: self.AppendUnique(LIBS=['opengl32']) self.AppendUnique(CPPPATH=[ '$QTDIR/include/'+module for module in modules]) self.AppendUnique(LIBPATH=['$QTDIR/lib'])
ddd29a37bc2408141e163dfa7499908d0fdf9aef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/ddd29a37bc2408141e163dfa7499908d0fdf9aef/qt4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 6400, 12, 2890, 16, 4381, 16, 1198, 33, 8381, 13, 294, 1930, 2589, 225, 923, 7782, 273, 306, 296, 23310, 4670, 2187, 296, 23310, 18070, 2187, 296, 23310, 3678, 11261, 2187, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 6400, 12, 2890, 16, 4381, 16, 1198, 33, 8381, 13, 294, 1930, 2589, 225, 923, 7782, 273, 306, 296, 23310, 4670, 2187, 296, 23310, 18070, 2187, 296, 23310, 3678, 11261, 2187, 296...