rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
parentId = simbase.air.districtId self.parentId = parentId
if not hasattr(self, 'parentId'): parentId = simbase.air.districtId self.parentId = parentId
def generateWithRequired(self, zoneId, optionalFields=[]): assert self.notify.debugStateCall(self) # have we already allocated a doId? if self.__preallocDoId: self.__preallocDoId = 0 return self.generateWithRequiredAndId( self.doId, zoneId, optionalFields) # The repository is the one that really does the work self.air.generateWithRequired(self, zoneId, optionalFields) if wantOtpServer: #HACK: parentId = simbase.air.districtId self.parentId = parentId self.zoneId = zoneId self.generate()
a14e7211bf84bab9ba1dfeecc9c2d8bf630bde81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/a14e7211bf84bab9ba1dfeecc9c2d8bf630bde81/DistributedObjectAI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 1190, 3705, 12, 2890, 16, 29939, 16, 3129, 2314, 33, 8526, 4672, 1815, 365, 18, 12336, 18, 4148, 1119, 1477, 12, 2890, 13, 468, 1240, 732, 1818, 11977, 279, 741, 548, 35, 309, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 1190, 3705, 12, 2890, 16, 29939, 16, 3129, 2314, 33, 8526, 4672, 1815, 365, 18, 12336, 18, 4148, 1119, 1477, 12, 2890, 13, 468, 1240, 732, 1818, 11977, 279, 741, 548, 35, 309, 36...
global localhostname, vid_graphics_dirs, dir_dict, storagegroups for key in storagegroups.keys(): vid_graphics_dirs[key] = storagegroups[key]
global localhostname, vid_graphics_dirs, dir_dict, storagegroups, local_only if storagegroups.has_key(u'mythvideo'): local_only = False for key in storagegroups.keys(): vid_graphics_dirs[key] = storagegroups[key] for key in dir_dict.keys(): if key == u'default' or key == u'mythvideo': continue if not storagegroups.has_key(key): vid_graphics_dirs[key] = storagegroups[u'mythvideo'] storagegroups[key] = storagegroups[u'mythvideo'] else: local_only = True if storagegroups.has_key(u'default'): vid_graphics_dirs[u'default'] = storagegroups[u'default'] if local_only: logger.warning(u'There is no "Videos" Storage Group set so ONLY MythTV Frontend local paths for videos and graphics that are accessable from this MythTV Backend can be used.')
def getMythtvDirectories(): """Get all video and graphics directories found in the MythTV DB and add them to the dictionary. Ignore any MythTV Frontend setting when there is already a storage group configured. """ # Stop processing if this local host has any storage groups global localhostname, vid_graphics_dirs, dir_dict, storagegroups # Pick up storage groups first for key in storagegroups.keys(): vid_graphics_dirs[key] = storagegroups[key] for key in dir_dict.keys(): if vid_graphics_dirs[key]: continue graphics_dir = mythdb.getSetting(dir_dict[key], hostname = localhostname) # Only use path from MythTV if one was found if key == u'mythvideo' and graphics_dir: tmp_directories = graphics_dir.split(u':') if len(tmp_directories): for i in range(len(tmp_directories)): tmp_directories[i] = tmp_directories[i].strip() if tmp_directories[i] != u'': if os.path.exists(tmp_directories[i]): if tmp_directories[i][-1] != u'/': tmp_directories[i]+=u'/' vid_graphics_dirs[key] = tmp_directories[i] break else: logger.error(u"MythTV video directory (%s) is not set or does not exist(%s)" % (key, tmp_directories[i])) if key != u'mythvideo': if graphics_dir and os.path.exists(graphics_dir): if graphics_dir[-1] != u'/': graphics_dir+=u'/' vid_graphics_dirs[key] = graphics_dir else: # There is the chance that MythTv DB does not have a dir logger.error(u"(%s) directory is not set or does not exist(%s)" % (key, dir_dict[key])) # Make sure there is a directory set for Videos and other graphics directories on this host for key in vid_graphics_dirs.keys(): if not vid_graphics_dirs[key]: logger.critical(u"There must be a directory for Videos and each graphics type. The (%s) directory is missing." % (key)) sys.exit(False) # Make sure that there is read/write access to all the directories Miro Bridge uses access_issue = False for key in vid_graphics_dirs.keys(): if not os.access(vid_graphics_dirs[key], os.F_OK | os.R_OK | os.W_OK): logger.critical(u"\nEvery Video and graphics directory must be read/writable for Miro Bridge to function. There is a permissions issue with (%s)." % (vid_graphics_dirs[key], )) access_issue = True if access_issue: sys.exit(False) # end getMythtvDirectories()
cefa7947527c8e9e2184befa6fb1cdca04096461 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/cefa7947527c8e9e2184befa6fb1cdca04096461/mirobridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 93, 451, 24161, 13071, 13332, 3536, 967, 777, 6191, 471, 17313, 6402, 1392, 316, 326, 8005, 451, 15579, 2383, 471, 527, 2182, 358, 326, 3880, 18, 8049, 1281, 8005, 451, 15579, 27162,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 93, 451, 24161, 13071, 13332, 3536, 967, 777, 6191, 471, 17313, 6402, 1392, 316, 326, 8005, 451, 15579, 2383, 471, 527, 2182, 358, 326, 3880, 18, 8049, 1281, 8005, 451, 15579, 27162,...
key = None if key not in state.copyblocks: self.flowin(state, key) block = state.copyblocks[key]
merged_key = [] recompute = False for c1, c2 in zip(block.inputargs, next.args): if isinstance(c1, Constant) and c1 != c2: merged_key.append(None) recompute = True else: merged_key.append(c1) if recompute: print 'flowin() merged as', merged_key block = self.flowin(state, merged_key) state.copyblocks[key] = block raise RestartCompleting
def try_to_complete(self): graph = self.copygraph interp = self.interp pending = [self] seen = {} # follow all possible links, forcing the blocks along the way to be # computed while pending: next = pending.pop() state = interp.pendingstates[next] if interp.policy.const_propagate: key = tuple(state.getruntimevars(VarMemo(next.args))) else: key = None if key not in state.copyblocks: self.flowin(state, key) block = state.copyblocks[key] next.settarget(block) for link in block.exits: if link.target is None or link.target.operations != (): if link not in seen: seen[link] = True pending.append(link) else: # link.target is a return or except block; make sure # that it is really the one from 'graph' -- by patching # 'graph' if necessary. if len(link.target.inputargs) == 1: self.a_return = state.args_a[0] graph.returnblock = link.target elif len(link.target.inputargs) == 2: graph.exceptblock = link.target else: raise Exception("uh?")
9ff1bb8b5ef2e3bd2c28b6210ffb0f9937ee702f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/9ff1bb8b5ef2e3bd2c28b6210ffb0f9937ee702f/llabstractinterp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 869, 67, 6226, 12, 2890, 4672, 2667, 273, 365, 18, 3530, 4660, 8174, 273, 365, 18, 24940, 4634, 273, 306, 2890, 65, 5881, 273, 2618, 468, 2805, 777, 3323, 4716, 16, 364, 2822,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 869, 67, 6226, 12, 2890, 4672, 2667, 273, 365, 18, 3530, 4660, 8174, 273, 365, 18, 24940, 4634, 273, 306, 2890, 65, 5881, 273, 2618, 468, 2805, 777, 3323, 4716, 16, 364, 2822,...
elements = [ InodeType(case=query['case']),
elements = [ InodeIDType(case=query['case']),
def display(self, query, result): result.table( elements = [ InodeType(case=query['case']), StringType('Property','property'), StringType('Value','value')], table = 'xattr,inode', case = query['case'], where = 'inode.inode_id=xattr.inode_id', )
3f332eb15513f1943e246716b5c7ff4fef8eea62 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5568/3f332eb15513f1943e246716b5c7ff4fef8eea62/Extractor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 2890, 16, 843, 16, 563, 4672, 563, 18, 2121, 12, 2186, 273, 306, 657, 390, 734, 559, 12, 3593, 33, 2271, 3292, 3593, 3546, 3631, 31570, 2668, 1396, 17023, 4468, 19899, 31570, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 2890, 16, 843, 16, 563, 4672, 563, 18, 2121, 12, 2186, 273, 306, 657, 390, 734, 559, 12, 3593, 33, 2271, 3292, 3593, 3546, 3631, 31570, 2668, 1396, 17023, 4468, 19899, 31570, ...
self.bpmedit = gtk.Entry() self.bpmedit.set_width_chars(3)
self.bpmedit = gtk.SpinButton() self.bpmedit.set_range(1, 400) self.bpmedit.set_increments(1, 5)
def OnEditBPM(self, widget, event): #self.parentUpdateMethod() if event.type == gtk.gdk.BUTTON_PRESS: self.bpmframe.remove(self.bpmeventbox) self.bpmedit = gtk.Entry() self.bpmedit.set_width_chars(3) self.bpmedit.set_text(str(self.project.transport.bpm)) self.bpmedit.connect("activate", self.OnAcceptEditBPM)
af3db0adaf362ee9d77de2b43b8573295de6265e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/af3db0adaf362ee9d77de2b43b8573295de6265e/TimeLineBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 4666, 38, 12728, 12, 2890, 16, 3604, 16, 871, 4672, 468, 2890, 18, 2938, 1891, 1305, 1435, 309, 871, 18, 723, 422, 22718, 18, 75, 2883, 18, 20068, 67, 22526, 30, 365, 18, 70, 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, 2755, 4666, 38, 12728, 12, 2890, 16, 3604, 16, 871, 4672, 468, 2890, 18, 2938, 1891, 1305, 1435, 309, 871, 18, 723, 422, 22718, 18, 75, 2883, 18, 20068, 67, 22526, 30, 365, 18, 70, 7...
self.__holdHandler(float(relTime)/self.__activateDelay)
self.__holdHandler(float(relTime)/(self.__activateDelay-self.__holdDelay))
def __onFrame(self): relTime = g_Player.getFrameTime() - self.__startTime if self.__state == HoldProcessor.DOWN: if relTime > self.__holdDelay: self.__changeState(HoldProcessor.HOLDING) if self.__state == HoldProcessor.HOLDING: if relTime > self.__activateDelay: self.__changeState(HoldProcessor.ACTIVE) else: self.__holdHandler(float(relTime)/self.__activateDelay)
b969b635def3d57083c9940a64e56e65a7fad331 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7300/b969b635def3d57083c9940a64e56e65a7fad331/manipulation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 265, 3219, 12, 2890, 4672, 1279, 950, 273, 314, 67, 12148, 18, 588, 3219, 950, 1435, 300, 365, 16186, 1937, 950, 309, 365, 16186, 2019, 422, 670, 1673, 5164, 18, 12711, 30, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 265, 3219, 12, 2890, 4672, 1279, 950, 273, 314, 67, 12148, 18, 588, 3219, 950, 1435, 300, 365, 16186, 1937, 950, 309, 365, 16186, 2019, 422, 670, 1673, 5164, 18, 12711, 30, 309, ...
import md5, types, operator, os
import types, operator, os, md5
to handle this 'cleanly'. One way would be to define methods like: def callBack(self, (arg1, arg2, arg)): ... another
9b2b7163e441396d9e5e7f46775cd7809b4655be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b2b7163e441396d9e5e7f46775cd7809b4655be/msn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 358, 1640, 333, 296, 6200, 715, 10332, 6942, 4031, 4102, 506, 358, 4426, 2590, 3007, 30, 1652, 745, 2711, 12, 2890, 16, 261, 3175, 21, 16, 1501, 22, 16, 1501, 3719, 30, 1372, 4042, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 358, 1640, 333, 296, 6200, 715, 10332, 6942, 4031, 4102, 506, 358, 4426, 2590, 3007, 30, 1652, 745, 2711, 12, 2890, 16, 261, 3175, 21, 16, 1501, 22, 16, 1501, 3719, 30, 1372, 4042, 2, -100, ...
"""Perform error checking to make sure To and From have values"""
"""Perform error checking to make sure To, From, and retries have values"""
def __sendMail(self): """Sends a mail message via SMTP using the account and mailMessage passed to this classes __init__ method using the Twisted Asych Reactor"""
5a140966f5052a15b637c45c1e06a4784887f60c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5a140966f5052a15b637c45c1e06a4784887f60c/smtp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4661, 6759, 12, 2890, 4672, 3536, 10501, 279, 4791, 883, 3970, 18102, 1450, 326, 2236, 471, 4791, 1079, 2275, 358, 333, 3318, 1001, 2738, 972, 707, 1450, 326, 12694, 25444, 2970, 93,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4661, 6759, 12, 2890, 4672, 3536, 10501, 279, 4791, 883, 3970, 18102, 1450, 326, 2236, 471, 4791, 1079, 2275, 358, 333, 3318, 1001, 2738, 972, 707, 1450, 326, 12694, 25444, 2970, 93,...
if data and listform.is_valid() and columnformset.is_valid():
if data and listform.is_valid():
def new_edit_list(request, group, list=None, is_admin=False): """Create new or edit existing list""" if request.method == 'POST': data = request.POST else: data = None if not list: ColumnFormSet = inlineformset_factory(List, ListColumn, extra=10, form=ColumnForm) columnformset = ColumnFormSet(data) listform = ListForm(data=data, group=group) else: ColumnFormSet = inlineformset_factory(List, ListColumn, extra=3, form=ColumnForm) if list is None: raise Http404 listform = ListForm(data, instance=list, group=group) columnformset = ColumnFormSet(data, instance=list) if data and listform.is_valid() and columnformset.is_valid(): list = listform.save(group=group) columnformset.instance = list columns = columnformset.save(commit=False) for c in columns: if not c.name and not c.width: if c.id: c.delete() else: c.save() return HttpResponseRedirect(reverse('group-summary', kwargs={ 'group': group.slug, })) return render_to_response('reports/list_form.html', { 'is_admin': is_admin, 'group': group, 'list': list, 'listform': listform, 'columnformset': columnformset, }, context_instance=RequestContext(request))
4c0b0093f7a4767a435e9561e61d5b62ed7ae27b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12178/4c0b0093f7a4767a435e9561e61d5b62ed7ae27b/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 4619, 67, 1098, 12, 2293, 16, 1041, 16, 666, 33, 7036, 16, 353, 67, 3666, 33, 8381, 4672, 3536, 1684, 394, 578, 3874, 2062, 666, 8395, 225, 309, 590, 18, 2039, 422, 296, 379...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 4619, 67, 1098, 12, 2293, 16, 1041, 16, 666, 33, 7036, 16, 353, 67, 3666, 33, 8381, 4672, 3536, 1684, 394, 578, 3874, 2062, 666, 8395, 225, 309, 590, 18, 2039, 422, 296, 379...
if self.dont_send_messages: self._make_new_info(obj) return
def on_object_changed(self, obj, id): if self.dont_send_messages: # even though we're not sending messages, call _make_new_info() to # update _last_sent_info self._make_new_info(obj) return self.changed.add(obj) self.schedule_send_messages()
9216676ad17c84f401690d41b09a052496b5842b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/9216676ad17c84f401690d41b09a052496b5842b/messagehandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1612, 67, 6703, 12, 2890, 16, 1081, 16, 612, 4672, 309, 365, 18, 72, 1580, 67, 4661, 67, 6833, 30, 468, 5456, 11376, 732, 4565, 486, 5431, 2743, 16, 745, 389, 6540, 67, 2704...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1612, 67, 6703, 12, 2890, 16, 1081, 16, 612, 4672, 309, 365, 18, 72, 1580, 67, 4661, 67, 6833, 30, 468, 5456, 11376, 732, 4565, 486, 5431, 2743, 16, 745, 389, 6540, 67, 2704...
if str(key) == line[i]:
if line[i] in [str(key),str(val)]:
def process_liness(self, datas, prefix, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = '' data_id = False # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) field = fields[i] if field == ["id"]: data_id = line[i] continue if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':id'): res_id = False if line[i]: if fields_def[field[len(prefix)][:-3]]['type']=='many2many': res_id = [] for word in line[i].split(config.get('csv_internal_sep')): if '.' in word: module, xml_id = word.rsplit('.', 1) else: module, xml_id = current_module, word ir_model_data_obj = self.pool.get('ir.model.data') id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id2 = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] if res_id2: res_id.append(res_id2) if len(res_id): res_id = [(6, 0, res_id)] else: if '.' in line[i]: module, xml_id = line[i].rsplit('.', 1) else: module, xml_id = current_module, line[i] ir_model_data_obj = self.pool.get('ir.model.data') id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] row[field[0][:-3]] = res_id or False continue if (len(field) == len(prefix)+1) and \ len(field[len(prefix)].split(':lang=')) == 2: f, lang = field[len(prefix)].split(':lang=') translate.setdefault(lang, {})[f]=line[i] or False continue if (len(field) == len(prefix)+1) and \ (prefix == field[0:len(prefix)]): if fields_def[field[len(prefix)]]['type'] == 'integer': res = line[i] and int(line[i]) elif fields_def[field[len(prefix)]]['type'] == 'boolean': res = line[i] and eval(line[i]) elif fields_def[field[len(prefix)]]['type'] == 'float': res = line[i] and float(line[i]) elif fields_def[field[len(prefix)]]['type'] == 'selection': res = False if isinstance(fields_def[field[len(prefix)]]['selection'], (tuple, list)): sel = fields_def[field[len(prefix)]]['selection'] else: sel = fields_def[field[len(prefix)]]['selection'](self, cr, uid, context) for key, val in sel: if str(key) == line[i]: res = key if line[i] and not res: logger.notifyChannel("import", netsvc.LOG_WARNING, "key '%s' not found in selection field '%s'" % \ (line[i], field[len(prefix)])) elif fields_def[field[len(prefix)]]['type']=='many2one': res = False if line[i]: relation = fields_def[field[len(prefix)]]['relation'] res2 = self.pool.get(relation).name_search(cr, uid, line[i], [], operator='=') res = (res2 and res2[0][0]) or False if not res: warning += ('Relation not found: ' + line[i] + \ ' on ' + relation + ' !\n') logger.notifyChannel("import", netsvc.LOG_WARNING, 'Relation not found: ' + line[i] + \ ' on ' + relation + ' !\n') elif fields_def[field[len(prefix)]]['type']=='many2many': res = [] if line[i]: relation = fields_def[field[len(prefix)]]['relation'] for word in line[i].split(config.get('csv_internal_sep')): res2 = self.pool.get(relation).name_search(cr, uid, word, [], operator='=') res3 = (res2 and res2[0][0]) or False if not res3: warning += ('Relation not found: ' + \ line[i] + ' on '+relation + ' !\n') logger.notifyChannel("import", netsvc.LOG_WARNING, 'Relation not found: ' + line[i] + \ ' on '+relation + ' !\n') else: res.append(res3) if len(res): res = [(6, 0, res)] else: res = line[i] or False row[field[len(prefix)]] = res elif (prefix==field[0:len(prefix)]): if field[0] not in todo: todo.append(field[len(prefix)]) # # Import one2many fields # nbrmax = 1 for field in todo: newfd = self.pool.get(fields_def[field]['relation']).fields_get( cr, uid, context=context) res = process_liness(self, datas, prefix + [field], newfd, position) (newrow, max2, w2, translate2, data_id2) = res nbrmax = max(nbrmax, max2) warning = warning + w2 reduce(lambda x, y: x and y, newrow) row[field] = (reduce(lambda x, y: x or y, newrow.values()) and \ [(0, 0, newrow)]) or [] i = max2 while (position+i)<len(datas): ok = True for j in range(len(fields)): field2 = fields[j] if (len(field2) <= (len(prefix)+1)) and datas[position+i][j]: ok = False if not ok: break
adc4f059ec5a18fd24c9b935975c6013dc05fb4e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/adc4f059ec5a18fd24c9b935975c6013dc05fb4e/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 4204, 273, 2618, 10621, 273, 5378, 3436, 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, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 4204, 273, 2618, 10621, 273, 5378, 3436, 2...
self.bytebuffer = ""
self.buffer = ""
def reset(self): IncrementalDecoder.reset(self) self.bytebuffer = ""
330bc7f9e45d80478e57e6f8a66d7fc7962dfb10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/330bc7f9e45d80478e57e6f8a66d7fc7962dfb10/codecs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 17883, 287, 7975, 18, 6208, 12, 2890, 13, 365, 18, 7229, 4106, 273, 1408, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 17883, 287, 7975, 18, 6208, 12, 2890, 13, 365, 18, 7229, 4106, 273, 1408, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
for host in hosts:
for host in hosts.keys():
def status_cmp(a, b): bstat = build_status_vals(b) astat = build_status_vals(a)
2f96994b0560407d1d9a82cb63b4ca80644ab796 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/2f96994b0560407d1d9a82cb63b4ca80644ab796/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1267, 67, 9625, 12, 69, 16, 324, 4672, 324, 5642, 273, 1361, 67, 2327, 67, 4524, 12, 70, 13, 3364, 270, 273, 1361, 67, 2327, 67, 4524, 12, 69, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1267, 67, 9625, 12, 69, 16, 324, 4672, 324, 5642, 273, 1361, 67, 2327, 67, 4524, 12, 70, 13, 3364, 270, 273, 1361, 67, 2327, 67, 4524, 12, 69, 13, 2, -100, -100, -100, -100, -100, ...
if self.executables['archiver']:
if self.executables.get('archiver'):
def get_flags_ar(self): """ List of archiver flags. """ if self.executables['archiver']: return self.executables['archiver'][1:] return []
9ddd860b31ea1d4517eb3fff6ab4c280ebb14dec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/9ddd860b31ea1d4517eb3fff6ab4c280ebb14dec/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7133, 67, 297, 12, 2890, 4672, 3536, 987, 434, 6637, 1667, 2943, 18, 3536, 309, 365, 18, 4177, 322, 1538, 18, 588, 2668, 991, 1667, 11, 4672, 327, 365, 18, 4177, 322, 1538, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 7133, 67, 297, 12, 2890, 4672, 3536, 987, 434, 6637, 1667, 2943, 18, 3536, 309, 365, 18, 4177, 322, 1538, 18, 588, 2668, 991, 1667, 11, 4672, 327, 365, 18, 4177, 322, 1538, ...
num_idle += 1 if jf.steps: idle_since = datetime.strptime( jf.steps[-1].enddatetime, ISO8601) else: idle_since = datetime.strptime( jf.creationdatetime, ISO8601) idle_time = now - idle_since
idle_since = datetime.strptime( jf.creationdatetime, ISO8601) idle_time = now - idle_since
def main(): option_parser = make_option_parser() options, args = option_parser.parse_args() if args: option_parser.error('takes no arguments') # set up logging if not options.quiet: log_to_stream(name='mrjob', debug=options.verbose) emr_conn = EMRJobRunner(conf_path=options.conf_path).make_emr_conn() log.info( 'getting info about all job flows (this goes back about 2 weeks)') job_flows = emr_conn.describe_jobflows() now = datetime.utcnow() num_running = 0 num_idle = 0 num_done = 0 # a list of tuples of job flow id, name, idle time (as a timedelta) to_terminate = [] for jf in job_flows: # check if job flow is done if hasattr(jf, 'enddatetime'): num_done += 1 # check if job flow is currently running elif jf.steps and not hasattr(jf.steps[-1], 'enddatetime'): num_running += 1 # job flow is idle. how long? else: num_idle += 1 if jf.steps: idle_since = datetime.strptime( jf.steps[-1].enddatetime, ISO8601) else: idle_since = datetime.strptime( jf.creationdatetime, ISO8601) idle_time = now - idle_since # don't care about fractions of a second idle_time = timedelta(idle_time.days, idle_time.seconds) log.debug('Job flow %s (%s) idle for %s' % (jf.jobflowid, jf.name, idle_time)) if idle_time > timedelta(hours=options.max_hours_idle): to_terminate.append( (jf.jobflowid, jf.name, idle_time)) log.info('Job flow statuses: %d running, %d idle, %d done' % (num_running, num_idle, num_done)) terminate_and_notify(emr_conn, to_terminate, options)
9d65274350c3ca98dd2bba37139fa3578017faf5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14504/9d65274350c3ca98dd2bba37139fa3578017faf5/terminate_idle_job_flows.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1456, 67, 4288, 273, 1221, 67, 3482, 67, 4288, 1435, 702, 16, 833, 273, 1456, 67, 4288, 18, 2670, 67, 1968, 1435, 225, 309, 833, 30, 1456, 67, 4288, 18, 1636, 2668, 88, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1456, 67, 4288, 273, 1221, 67, 3482, 67, 4288, 1435, 702, 16, 833, 273, 1456, 67, 4288, 18, 2670, 67, 1968, 1435, 225, 309, 833, 30, 1456, 67, 4288, 18, 1636, 2668, 88, ...
(( 'x1', convert( x1)), ( 'y1', convert( y1)), ( 'x2', convert( x2)), ( 'y2', convert( y2)),
(( 'x1', self.convert( x1)), ( 'y1', self.convert( y1)), ( 'x2', self.convert( x2)), ( 'y2', self.convert( y2)),
def add_bond( self, b): """adds bond item to SVG document""" if not b.item: return line_width = (b.type == 'b') and b.wedge_width or b.type != 'w' and b.line_width or 1.0 l_group = dom_extensions.elementUnder( self.group, 'g', (('stroke-width', str( line_width)), ('stroke', self.cc( b.line_color)))) if sum( [int( a.show) for a in b.atoms]) == 2: # both atoms are visible, it does not look good with round caps l_group.setAttribute('stroke-linecap', 'butt')
0de1b9f03df78cd14242cbe5d17110a7b29ab7cc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4298/0de1b9f03df78cd14242cbe5d17110a7b29ab7cc/xml_writer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 26425, 12, 365, 16, 324, 4672, 3536, 25428, 8427, 761, 358, 11281, 1668, 8395, 309, 486, 324, 18, 1726, 30, 327, 980, 67, 2819, 273, 261, 70, 18, 723, 422, 296, 70, 6134, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 26425, 12, 365, 16, 324, 4672, 3536, 25428, 8427, 761, 358, 11281, 1668, 8395, 309, 486, 324, 18, 1726, 30, 327, 980, 67, 2819, 273, 261, 70, 18, 723, 422, 296, 70, 6134, 47...
library_dir = sysconfig.get_config_var('srcdir') cmd.library_dirs = [('.' if library_dir is None else library_dir)]
runshared = sysconfig.get_config_var('RUNSHARED') if runshared is None: cmd.library_dirs = ['.'] else: name, equals, value = runshared.partition('=') cmd.library_dirs = value.split(os.pathsep)
def _fixup_command(self, cmd): # When Python was build with --enable-shared, -L. is not good enough # to find the libpython<blah>.so. This is because regrtest runs it # under a tempdir, not in the top level where the .so lives. By the # time we've gotten here, Python's already been chdir'd to the # tempdir. # # To further add to the fun, we can't just add library_dirs to the # Extension() instance because that doesn't get plumbed through to the # final compiler command. if not sys.platform.startswith('win'): library_dir = sysconfig.get_config_var('srcdir') cmd.library_dirs = [('.' if library_dir is None else library_dir)]
7891bb288c7ac681d58325547df58eb4ee502957 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/7891bb288c7ac681d58325547df58eb4ee502957/test_build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 416, 67, 3076, 12, 2890, 16, 1797, 4672, 468, 5203, 6600, 1703, 1361, 598, 1493, 7589, 17, 11574, 16, 300, 48, 18, 353, 486, 7494, 7304, 468, 358, 1104, 326, 2561, 8103, 32, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 416, 67, 3076, 12, 2890, 16, 1797, 4672, 468, 5203, 6600, 1703, 1361, 598, 1493, 7589, 17, 11574, 16, 300, 48, 18, 353, 486, 7494, 7304, 468, 358, 1104, 326, 2561, 8103, 32, ...
SyntaxError: assignment to None (<doctest test.test_syntax[13]>, line 1)
SyntaxError: assignment to None (<doctest test.test_syntax[14]>, line 1)
>>> def f(None=1):
70e76ec773b0317f9a87ce674bacec91d8b5bdac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/70e76ec773b0317f9a87ce674bacec91d8b5bdac/test_syntax.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 7036, 33, 21, 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, ...
[ 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, 4080, 1652, 284, 12, 7036, 33, 21, 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, ...
return ''.join([self.parse(e) for e in element.children])
return ''.join([s for s in self.childParser(element) if s])
def unknownElement(self, element): return ''.join([self.parse(e) for e in element.children])
e3045fe6effca290e32fed86c046eb6adf241931 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/e3045fe6effca290e32fed86c046eb6adf241931/ColorText.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5917, 1046, 12, 2890, 16, 930, 4672, 327, 875, 18, 5701, 3816, 2890, 18, 2670, 12, 73, 13, 364, 425, 316, 930, 18, 5906, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5917, 1046, 12, 2890, 16, 930, 4672, 327, 875, 18, 5701, 3816, 2890, 18, 2670, 12, 73, 13, 364, 425, 316, 930, 18, 5906, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Metawidget.__init__(self, master, int, *args, **kwargs)
Metawidget.__init__(self, master, int)
def __init__(self, master=None, label="Number", min=1, max=10, style='spin', default=None, *args, **kwargs): """Create a number-setting widget. master: Tkinter widget that will contain this Number label: Text label describing the meaning of the number min, max: Range of allowable numbers (inclusive) style: 'spin' or 'scale' default: Default value, or None to use minimum """ # TODO: Multiple styles (entry, spinbox, scale) Metawidget.__init__(self, master, int, *args, **kwargs) log.debug("Creating Number(%s, %s, %s)" % (label, min, max)) self.style = style # Use min if default wasn't provided if default is None: default = min self.variable.set(default) # Create and pack widgets self.label = Label(self, name='label', text=label) self.label.pack(side=LEFT) if self.style == 'spin': self.number = Spinbox(self, from_=min, to=max, width=4, textvariable=self.variable) self.number.pack(side=LEFT) else: # 'scale' self.number = Scale(self, from_=min, to=max, tickinterval=max-min, variable=self.variable, orient=HORIZONTAL) self.number.pack(side=LEFT, fill=X, expand=YES)
f057996c3a6de2d5fabf3ad7997bbd1f796a9e23 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/f057996c3a6de2d5fabf3ad7997bbd1f796a9e23/meta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 1433, 1546, 1854, 3113, 1131, 33, 21, 16, 943, 33, 2163, 16, 2154, 2218, 22876, 2187, 805, 33, 7036, 16, 380, 1968, 16, 2826, 4333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 1433, 1546, 1854, 3113, 1131, 33, 21, 16, 943, 33, 2163, 16, 2154, 2218, 22876, 2187, 805, 33, 7036, 16, 380, 1968, 16, 2826, 4333, ...
sage: latex.pdflatex(False)
sage: latex.pdflatex(False) doctest:...: DeprecationWarning: Use engine("latex") instead.
def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None
cb479d7b1046f03bed1e0b94d39ef8da9d356f4e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/cb479d7b1046f03bed1e0b94d39ef8da9d356f4e/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8169, 26264, 12, 2890, 16, 268, 273, 599, 4672, 3536, 8888, 87, 2856, 348, 410, 4692, 12667, 30745, 21575, 60, 578, 21072, 21575, 60, 1347, 1953, 278, 1787, 598, 294, 644, 28288, 1945, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8169, 26264, 12, 2890, 16, 268, 273, 599, 4672, 3536, 8888, 87, 2856, 348, 410, 4692, 12667, 30745, 21575, 60, 578, 21072, 21575, 60, 1347, 1953, 278, 1787, 598, 294, 644, 28288, 1945, 9...
def get_filenames_in_revision(self, revision): local_datetime = self._revision_timestamp_to_local(revision) p = subprocess.Popen(['bzr', 'inventory', '-r', 'date:' + str(local_datetime), str(self.repository.path)], stderr=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True) contents = p.stdout.read() errmsg = p.stderr.read() failure = p.wait() if failure: raise SCMError(errmsg) return contents.strip().splitlines();
def get_filenames_in_revision(self, revision): local_datetime = self._revision_timestamp_to_local(revision)
5898bbad7e7e40dda938a4de324658edf8298453 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/5898bbad7e7e40dda938a4de324658edf8298453/bzr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 19875, 67, 267, 67, 13057, 12, 2890, 16, 6350, 4672, 1191, 67, 6585, 273, 365, 6315, 13057, 67, 5508, 67, 869, 67, 3729, 12, 13057, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 19875, 67, 267, 67, 13057, 12, 2890, 16, 6350, 4672, 1191, 67, 6585, 273, 365, 6315, 13057, 67, 5508, 67, 869, 67, 3729, 12, 13057, 13, 2, -100, -100, -100, -100, -100, -100, ...
raise TypeError('Can not append object type '+ str(type(opt))+' to the '+str(type(self))+'. Parameter type appendable only') def appendCopy(self, opt, prefix="", postfix=""): if isinstance(opt, ParameterCollection): for p in opt: self.appendOrOverwrite(Parameter(name=prefix+p.getName()+postfix, parameter=p)) elif isinstance(opt, Parameter): self.appendOrOverwrite(Parameter(name=prefix+opt.getName()+postfix, parameter=opt)) else: raise TypeError('Can not append object type '+ str(type(opt))+' to the '+str(type(self))+'. Parameter type appendable only') def appendCopyLinked(self, opt, prefix="", postfix=""): if isinstance(opt, ParameterCollection): for p in opt: if p.isLinked(): self.appendOrOverwrite(Parameter(name=prefix+p.getName()+postfix, parameter=p)) elif isinstance(opt, Parameter): if opt.isLinked(): self.appendOrOverwrite(Parameter(name=prefix+opt.getName()+postfix, parameter=opt)) else: raise TypeError('Can not append object type '+ str(type(opt))+' to the '+str(type(self))+'. Parameter type appendable only') def setValue(self, name, value, vtype=None): """ Method finds parameter with the name "name" and if exists its set value Returns True if sucsessfull """ par = self.find(name) if par == None: print "ERROR ParameterCollection.setValue() can not find parameter with the name=%s to set Value=%s"% (name, value) return False else: par.setValue(value, vtype) return True def getInput(self): """ Get input linked parameters """ return self.get(input=True) def getOutput(self): """ Get output linked parameters """ return self.get(output=True) def getLinked(self): """ Get linked parameters """ return self.get(input=True,output=True) def get(self,input=False,output=False): """ Get a copy of parameters. If input or output is True, get corresponding io type parameters only. Otherwise, get all the parameters """ all = not input and not output params = ParameterCollection() for p in self: OK = False if all: OK = True elif input and p.isInput(): OK = True elif output and p.isOutput(): OK = True if OK: params.append(Parameter(parameter=p)) return params def setLink(self, name, module_name, parameter_name): """ Method finds parameter with the name "name" and if exists its set value Returns True if sucsessfull """ par = self.find(name) if par == None: print "ERROR ParameterCollection.setLink() can not find parameter with the name=%s to link it with %s.%s"% (name, module_name, parameter_name) return False else: par.link(module_name, parameter_name) return True def linkUp(self, opt, prefix="", postfix="", objname="self"): """ This is a GROUP method operates on the 'obj' parameters using only parameters listed in 'opt' list Method will link self.parameters with the outer object (self) perameters using prefix and postfix for example if we want to link module instance with the step or step instance with the workflow opt - ParameterCollection or sigle Parameter (WARNING!! used as reference to get a names!!! opt is not changing!!!) opt ALSO can be a list of string with the names of parameters to link objname - name of the object to connect with, usually 'self' """ if isinstance(opt, ParameterCollection): for p in opt: par = self.find(p.getName()) if par == None: print "WARNING ParameterCollection.linkUp can not find parameter with the name=", p.getName(), " IGNORING" else: par.link(objname, prefix+p.getName()+postfix) elif isinstance(opt, Parameter): self.setLink(opt.getName(), objname, prefix+opt.getName()+postfix) elif isinstance(opt, list) and isinstance(opt[0], str): for s in opt: par = self.find(s) if par == None: print "ERROR ParameterCollection.linkUp() can not find parameter with the name=%s"% (s) else: par.link(objname, prefix+p.getName()+postfix) elif isinstance(opt, str): par = self.find(opt) if par == None: print "ERROR ParameterCollection.linkUp() can not find parameter with the name=%s"% (par) else: par.link(objname, prefix+par.getName()+postfix) else: raise TypeError('Can not link object type '+ str(type(opt))+' to the '+str(type(self))+'.') def unlink(self, opt): """ This is a GROUP method operates on the 'obj' parameters using only parameters listed in 'opt' list Method will unlink some self.parameters opt - ParameterCollection or sigle Parameter (WARNING!! used as reference to get a names!!! opt is not changing!!!) opt ALSO can be a list of string with the names of parameters to link objname - name of the object to connect with, usually 'self' """ if isinstance(opt, ParameterCollection): for p in opt: par = self.find(p.getName()) if par == None: print "WARNING ParameterCollection.linkUp can not find parameter with the name=", p.getName(), " IGNORING" else: par.unlink() elif isinstance(opt, Parameter): self.unlink() elif isinstance(opt, list) and isinstance(opt[0], str): for s in opt: par = self.find(s) if par == None: print "ERROR ParameterCollection.unlink() can not find parameter with the name=%s"% (s) else: par.unlink() elif isinstance(opt, str): par = self.find(opt) if par == None: print "ERROR ParameterCollection.unlink() can not find parameter with the name=%s"% (s) else: par.unlink() else: raise TypeError('Can not unlink object type '+ str(type(opt))+' to the '+str(type(self))+'.') def removeAllParameters(self): self[:]=[] def remove(self, name_or_ind): if isinstance(name_or_ind, list) and isinstance(name_or_ind[0], str): for s in name_or_ind: par = self.find(s) if par == None: print "ERROR ParameterCollection.remove() can not find parameter with the name=%s"% (s) else: del self[self.findIndex(s)] elif isinstance(name_or_ind, str): del self[self.findIndex(name_or_ind)] elif isinstance(name_or_ind, int) or isinstance(name_or_ind): del self[name_or_ind] def find(self, name_or_ind): """ Method to find Parameters Return: Parameter """ if isinstance(name_or_ind, str): for v in self: if v.getName() == name_or_ind: return v return None elif isinstance(name_or_ind, int) or isinstance(name_or_ind, long): return self[name_or_ind] return self[int(name_or_ind)] def findLinked(self, name_or_ind, linked_status=True): """ Method to find Parameters if linked_status is True it returns only linked Var from the list if linked_status is False it returns only NOTlinked Var from the list Return: Parameter """ v = self.find(name_or_ind) if (v!= None) and (v.isLinked() != linked_status): return None return v def findIndex(self, name): i=0 for v in self: if v.getName() == name: return i i=i+1 return -1 def getParametersNames(self): list=[] for v in self: list.append(v.getName()) return list def compare(self, s): if (not isinstance(s, ParameterCollection)) or (len(s) != len(self)): return False for v in self: for i in s: if v.getName() == i.getName(): if not v.compare(i): return False else: break else: return False return True def __str__(self): ret=str(type(self))+':\n' for v in self: ret=ret+ str(v)+'\n' return ret def toXML(self): ret="" for v in self: ret=ret+v.toXML() return ret def createParametersCode(self, indent=0, instance_name=None): str='' for v in self: if v.preExecute(): str=str+v.createParameterCode(indent, instance_name) return str def resolveGlobalVars(self, wf_parameters=None, step_parameters=None): """This function resolves global parameters of type @{value} within the ParameterCollection """ recurrency_max=12 for v in self: recurrency=0 skip_list = [] substitute_vars = getSubstitute(v.value) while True: for substitute_var in substitute_vars: v_other = self.find(substitute_var) if v_other == None and step_parameters != None : v_other = step_parameters.findLinked(substitute_var, False) if v_other == None and wf_parameters != None : v_other = wf_parameters.findLinked(substitute_var, False) if v_other != None and not v_other.isLinked(): v.value = substitute(v.value,substitute_var,v_other.value) elif v_other != None: print "Leaving %s variable for dynamic resolution" % substitute_var skip_list.append(substitute_var) else: print "Can not resolve ", substitute_var, str(v) recurrency += 1 if recurrency > recurrency_max: print "ERROR! reached maximum recurrency level", recurrency, "within the parameter ", str(v) if step_parameters == None: if wf_parameters == None: print "on the level of Workflow" else: print "on the level of Step" else: if wf_parameters != None: print "on the level of Module"
substitute_vars = getSubstitute(v.value,skip_list) if not substitute_vars:
def append(self, opt): if isinstance(opt, ParameterCollection): for p in opt: self.appendOrOverwrite(p) elif isinstance(opt, Parameter): self.appendOrOverwrite(opt) return opt else: raise TypeError('Can not append object type '+ str(type(opt))+' to the '+str(type(self))+'. Parameter type appendable only')
8613d68ff165b59e509d5eb04a831ffaf7fd692b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8613d68ff165b59e509d5eb04a831ffaf7fd692b/Parameter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 2153, 4672, 309, 1549, 12, 3838, 16, 5498, 2532, 4672, 364, 293, 316, 2153, 30, 365, 18, 6923, 1162, 20832, 12, 84, 13, 1327, 1549, 12, 3838, 16, 5498, 4672, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 2153, 4672, 309, 1549, 12, 3838, 16, 5498, 2532, 4672, 364, 293, 316, 2153, 30, 365, 18, 6923, 1162, 20832, 12, 84, 13, 1327, 1549, 12, 3838, 16, 5498, 4672, 365, ...
asyncore.loop(use_poll=self.usepoll)
asyncore.loop(use_poll=self.usepoll, count=300, timeout=.01)
def numeric_terminator_check(self, termlen): # Try reading a fixed number of bytes s = echo_server() s.start() time.sleep(0.5) # Give server time to initialize c = echo_client(termlen) data = "hello world, I'm not dead yet!\n" c.push(data) c.push(SERVER_QUIT) asyncore.loop(use_poll=self.usepoll)#, count=5, timeout=5) s.join()
f814dbca6d7536d00d38b8e96fec7730755c6536 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/f814dbca6d7536d00d38b8e96fec7730755c6536/test_asynchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6389, 67, 9505, 639, 67, 1893, 12, 2890, 16, 19272, 781, 275, 4672, 468, 6161, 6453, 279, 5499, 1300, 434, 1731, 272, 273, 3376, 67, 3567, 1435, 272, 18, 1937, 1435, 813, 18, 19607, 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, 6389, 67, 9505, 639, 67, 1893, 12, 2890, 16, 19272, 781, 275, 4672, 468, 6161, 6453, 279, 5499, 1300, 434, 1731, 272, 273, 3376, 67, 3567, 1435, 272, 18, 1937, 1435, 813, 18, 19607, 12...
sage: print t2
sage: t2
def tau2(T1, T2, cells_map): """ The definition of tau2 is: tau2 : T1 -> T1 tau2 = beta\^(-1)_3 beta_1 (composing left to right) where beta_i : T2 -> T1 changes just the i-th coordinate of a triple. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: T1 = back_circulant(5) sage: x = isotopism( (0,1,2,3,4) ) sage: y = isotopism(5) # identity sage: z = isotopism(5) # identity sage: T2 = T1.apply_isotopism(x, y, z) sage: print is_bitrade(T1, T2) True sage: (cells_map, t1, t2, t3) = tau123(T1, T2) sage: t2 = tau2(T1, T2, cells_map) sage: print t2 [21, 22, 23, 24, 25, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] sage: print t2.to_cycles() [(1, 21, 16, 11, 6), (2, 22, 17, 12, 7), (3, 23, 18, 13, 8), (4, 24, 19, 14, 9), (5, 25, 20, 15, 10)] """ # The cells_map has both directions, i.e. integer to # cell and cell to integer, so the size of T1 is # just half of len(cells_map). x = (int(len(cells_map)/2) + 1) * [-1] for r in range(T1.nrows()): for c in range(T1.ncols()): e = T1[r, c] if e < 0: continue (r2, c2, e2) = beta3( (r,c,e), T1, T2) (r3, c3, e3) = beta1( (r2,c2,e2), T2, T1) x[ cells_map[(r,c)] ] = cells_map[ (r3,c3) ] x.pop(0) # remove the head of the list since we # have permutations on 1..(something). return Permutation(x)
79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12284, 22, 12, 56, 21, 16, 399, 22, 16, 5983, 67, 1458, 4672, 3536, 1021, 2379, 434, 12284, 22, 353, 30, 225, 12284, 22, 294, 399, 21, 317, 399, 21, 12284, 22, 273, 6796, 64, 66, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12284, 22, 12, 56, 21, 16, 399, 22, 16, 5983, 67, 1458, 4672, 3536, 1021, 2379, 434, 12284, 22, 353, 30, 225, 12284, 22, 294, 399, 21, 317, 399, 21, 12284, 22, 273, 6796, 64, 66, 1...
at = i18n.translate(domain='plone', msgid='label_at', context=content_instance, default='at')
at = _(u'label_at', default=u'at')
def _Vocabulary(self, content_instance): pairs = [] pc = getToolByName(content_instance, 'portal_catalog') uc = getToolByName(content_instance, config.UID_CATALOG) purl = getToolByName(content_instance, 'portal_url')
6bf0b4d803f7a6c42f16af81053d806d99f67096 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12165/6bf0b4d803f7a6c42f16af81053d806d99f67096/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 30747, 12, 2890, 16, 913, 67, 1336, 4672, 5574, 273, 5378, 6125, 273, 336, 6364, 5911, 12, 1745, 67, 1336, 16, 296, 24386, 67, 7199, 6134, 6232, 273, 336, 6364, 5911, 12, 1745, 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, 389, 30747, 12, 2890, 16, 913, 67, 1336, 4672, 5574, 273, 5378, 6125, 273, 336, 6364, 5911, 12, 1745, 67, 1336, 16, 296, 24386, 67, 7199, 6134, 6232, 273, 336, 6364, 5911, 12, 1745, 67...
person_id = 1
person_id = 0
def wrapper(*args, **kwds):
0e07df3a63bf8da8364972f95b821e82bae84c55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/0e07df3a63bf8da8364972f95b821e82bae84c55/Method.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 30857, 1968, 16, 2826, 25577, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 30857, 1968, 16, 2826, 25577, 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, ...
key_bindings = {'default': 'C-NUMPAD_SUBTRACT',}
key_bindings = {'emacs': 'C-NUMPAD_SUBTRACT',}
def action(self, index=-1, multiplier=1): self.mode.locals.font_zoom += 1 self.mode.SetZoom(self.mode.locals.font_zoom)
8b410e6e6ae0aac72c77bd2eb59f31734db330c4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/8b410e6e6ae0aac72c77bd2eb59f31734db330c4/fundamental_menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 365, 18, 3188, 18, 17977, 18, 5776, 67, 14932, 1011, 404, 365, 18, 3188, 18, 694, 11497, 12, 2890, 18, 3188, 18, 17977, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 365, 18, 3188, 18, 17977, 18, 5776, 67, 14932, 1011, 404, 365, 18, 3188, 18, 694, 11497, 12, 2890, 18, 3188, 18, 17977, 1...
return False else: return True
raise FetchError("No checksum specified for %s." % u)
def verify_checksum(d, ud): """ verify the MD5 and SHA256 checksum for downloaded src return value: - True: checksum matched - False: checksum unmatched if checksum is missing in recipes file, "BB_STRICT_CHECKSUM" decide the return value. if BB_STRICT_CHECKSUM = "1" then return false as unmatched, otherwise return true as matched """ if not ud.type in ["http", "https", "ftp", "ftps"]: return True md5data = bb.utils.md5_file(ud.localpath) sha256data = bb.utils.sha256_file(ud.localpath) if (ud.md5_expected == None or ud.sha256_expected == None): bb.warn("Missing SRC_URI checksum for %s, consider to add\n" \ "SRC_URI[%s] = \"%s\"\nSRC_URI[%s] = \"%s\"" \ % (ud.localpath, ud.md5_name, md5data, ud.sha256_name, sha256data)) if bb.data.getVar("BB_STRICT_CHECKSUM", d, True) == "1": return False else: return True if (ud.md5_expected != md5data or ud.sha256_expected != sha256data): bb.error("The checksums for '%s' did not match." % ud.localpath) bb.error("Expected MD5: '%s' and Got: '%s'" % (ud.md5_expected, md5data)) bb.error("Expected SHA256: '%s' and Got: '%s'" % (ud.sha256_expected, sha256data)) return False return True
7abdf3e5c36197c5518edf53acb98611559dadec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/7abdf3e5c36197c5518edf53acb98611559dadec/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 15149, 12, 72, 16, 23969, 4672, 3536, 3929, 326, 10852, 25, 471, 9777, 5034, 6697, 364, 13549, 1705, 225, 327, 460, 30, 300, 1053, 30, 6697, 4847, 300, 1083, 30, 6697, 24863, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 15149, 12, 72, 16, 23969, 4672, 3536, 3929, 326, 10852, 25, 471, 9777, 5034, 6697, 364, 13549, 1705, 225, 327, 460, 30, 300, 1053, 30, 6697, 4847, 300, 1083, 30, 6697, 24863, ...
confautoprc = confautoprc.replace("aux-display pandadx9","") confautoprc = confautoprc.replace("aux-display pandadx8","")
configprc = configprc.replace("aux-display pandadx9","") configprc = configprc.replace("aux-display pandadx8","")
def CreatePandaVersionFiles(): # First, move any conflicting files out of the way. if os.path.isfile("dtool/src/dtoolutil/pandaVersion.h"): os.rename("dtool/src/dtoolutil/pandaVersion.h", "dtool/src/dtoolutil/pandaVersion.h.moved") if os.path.isfile("dtool/src/dtoolutil/checkPandaVersion.h"): os.rename("dtool/src/dtoolutil/checkPandaVersion.h", "dtool/src/dtoolutil/checkPandaVersion.h.moved") if os.path.isfile("dtool/src/dtoolutil/checkPandaVersion.cxx"): os.rename("dtool/src/dtoolutil/checkPandaVersion.cxx", "dtool/src/dtoolutil/checkPandaVersion.cxx.moved") version1=int(VERSION.split(".")[0]) version2=int(VERSION.split(".")[1]) version3=int(VERSION.split(".")[2]) nversion=version1*1000000+version2*1000+version3 pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1)) pandaversion_h = pandaversion_h.replace("VERSION2",str(version2)) pandaversion_h = pandaversion_h.replace("VERSION3",str(version3)) pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion)) checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3)) checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion)) checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1)) checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2)) checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3)) checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion)) ConditionalWriteFile(GetOutputDir()+'/include/pandaVersion.h', pandaversion_h) ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.cxx', checkpandaversion_cxx) ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.h', checkpandaversion_h) ConditionalWriteFile(GetOutputDir()+"/tmp/null.cxx","")
af84ed5a5fb926a2d1db12ab6fcf7060c746f56c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/af84ed5a5fb926a2d1db12ab6fcf7060c746f56c/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 468, 5783, 16, 3635, 1281, 21462, 1390, 596, 434, 326, 4031, 18, 309, 1140, 18, 803, 18, 291, 768, 2932, 72, 6738, 19, 4816, 19, 72, 6738, 1367, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 468, 5783, 16, 3635, 1281, 21462, 1390, 596, 434, 326, 4031, 18, 309, 1140, 18, 803, 18, 291, 768, 2932, 72, 6738, 19, 4816, 19, 72, 6738, 1367, ...
def clear(self, host, name, id = None): d = self.dir / host / name
def clear(self, host = None, name = None, sess = None):
def clear(self, host, name, id = None): d = self.dir / host / name removed = [] if d.exists(): if id is not None: f = d / id f.remove() removed.append(f) else: for f in self.non_dot(d): removed.append(f) f.remove() return removed
dedb174305b3d47f3e0e7f4ad5cfc7cbb8accb03 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/dedb174305b3d47f3e0e7f4ad5cfc7cbb8accb03/sessions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 12, 2890, 16, 1479, 273, 599, 16, 508, 273, 599, 16, 8451, 273, 599, 4672, 3723, 273, 5378, 309, 302, 18, 1808, 13332, 309, 612, 353, 486, 599, 30, 284, 273, 302, 342, 612, 284...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 12, 2890, 16, 1479, 273, 599, 16, 508, 273, 599, 16, 8451, 273, 599, 4672, 3723, 273, 5378, 309, 302, 18, 1808, 13332, 309, 612, 353, 486, 599, 30, 284, 273, 302, 342, 612, 284...
"CIF data table."
"""CIF data table. """
def get_save_frame(self, token, lexer, filename): raise CIFSyntaxError(token.line, "SaveFrame unimplemented")
b597f527f91018b92b8d24a86bc7d094e8af6f75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/b597f527f91018b92b8d24a86bc7d094e8af6f75/CIF.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5688, 67, 3789, 12, 2890, 16, 1147, 16, 8512, 16, 1544, 4672, 1002, 17166, 4931, 5392, 668, 12, 2316, 18, 1369, 16, 315, 4755, 3219, 640, 21099, 7923, 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, 336, 67, 5688, 67, 3789, 12, 2890, 16, 1147, 16, 8512, 16, 1544, 4672, 1002, 17166, 4931, 5392, 668, 12, 2316, 18, 1369, 16, 315, 4755, 3219, 640, 21099, 7923, 2, -100, -100, -100, -10...
self.progress(' Please wait getting manifest count (%s)' % (mcount))
self.progress('Please wait getting manifest count (%s)' % (mcount))
def manifest(self,path): from os.path import join, getsize cfiles = 0 if os.path.isdir(path): mname = '%s.manifest' % time.strftime('%d-%B-%Y',time.gmtime()) of = file(mname, 'w+') for root, dirs, files in os.walk(path): self.progress(' Please wait, getting initial file count (%s) ...' % (cfiles)) #get count first loop for fname in files: cfiles += 1 print q = 'There are currently %s files in %s, do you want to proceed with the manifest?:' % (cfiles,path) a = raw_input(q) while a not in ('y','n'): q = 'Invalid response (y/n):' a = raw_input(q) if a == 'n': sys.exit(0) else: print tfiles = cfiles cfiles = 0 ltime = 0 lfiles = 0 filessec = 0 for root, dirs, files in os.walk(path): for fname in files: ctime = time.time() if (ctime - ltime) >= 1: if ltime > 0: filessec = (cfiles - lfiles) / (ctime - ltime) ltime = ctime lfiles = cfiles fpath = join(root,fname) hash = self._checksum(fpath)['md5'] of.write("%s %s\n" % (hash, fpath)) cfiles += 1 fper = round(((1.00*cfiles)/(1.00*tfiles))*100.00,2) self.progress(' Added %s/%s Files to manifest (%s%%) (%s/s)' % (cfiles,tfiles,fper,filessec)) print elif os.path.isfile(path): mcount = 0 #get manifest linecount for line in open(path,'r'): mcount += 1 self.progress(' Please wait getting manifest count (%s)' % (mcount)) print print 'Manifest count complete' if mcount == 0: self.error('Counted 0 lines in manifest ... aborting') vcount = 0 #verify manifest for line in open(path,'r'): vcount += 1 vper = round(((1.00*vcount)/(1.00*mcount))*100.00,2) self.progress(' Please wait verifying manifest (%s%%)' % (vper)) dat = re.split(' ',line) dat[1] = dat[1].replace("\n",'') if len(dat[0]) != 32: self.error('Manifest Verification error line %s md5 is invalid' % vcount,False) elif not os.path.isfile(dat[1]): self.error('Manifest Verification error line %s path is invalid (file may be missing)' % vcount,False) print print 'Manifest verification complete' vcount = 0 fcount = 0 pcount = 0 failed = [] filessec = 0 lfiles = 0 ltime = 0 for line in open(path,'r'): ctime = time.time() if (ctime - ltime) >= 1: if ltime > 0: filessec = (vcount - lfiles) / (ctime - ltime) ltime = ctime lfiles = vcount dat = re.split(' ',line) dat[1] = dat[1].replace("\n",'') if self._checksum(dat[1])['md5'] == dat[0]: pcount += 1 else: fcount += 1 failed.append(dat[1]) vcount += 1 vper = round(((1.00*vcount)/(1.00*mcount))*100.00,2) fper = round(((1.00*fcount)/(1.00*mcount))*100.00,2) pper = round(((1.00*pcount)/(1.00*mcount))*100.00,2) bar = self.progressbar(vper, 50) #[==================================================] Pass (00%) Fail(00%) self.progress('Verification in progress: %s - %s%% Pass(%s%%) Fail(%s%%) %s/s' % (bar,vper,pper,fper,filessec)) print if fcount > 0: print '--- START FAILED LIST ---' for f in failed: print f print '--- END FAIL LIST ---'
a5680de1a5f6faad9bfe60d45120545421081bca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14038/a5680de1a5f6faad9bfe60d45120545421081bca/sysadmin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5643, 12, 2890, 16, 803, 4672, 628, 1140, 18, 803, 1930, 1233, 16, 30208, 276, 2354, 273, 374, 225, 309, 1140, 18, 803, 18, 291, 1214, 12, 803, 4672, 312, 529, 273, 1995, 87, 18, 143...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5643, 12, 2890, 16, 803, 4672, 628, 1140, 18, 803, 1930, 1233, 16, 30208, 276, 2354, 273, 374, 225, 309, 1140, 18, 803, 18, 291, 1214, 12, 803, 4672, 312, 529, 273, 1995, 87, 18, 143...
command = '%s -vo null -ao %s %s %s' % \
command = '%s -vo null -ao %s %s' % \
def play(self, item, player): """ Play a AudioItem with mplayer """ filename = item.filename
c5d851e5232f80a950b02a3d8f9e2910daa228d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/c5d851e5232f80a950b02a3d8f9e2910daa228d8/mplayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 12, 2890, 16, 761, 16, 7291, 4672, 3536, 19592, 279, 15045, 1180, 598, 312, 14872, 3536, 1544, 273, 761, 18, 3459, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 6599, 12, 2890, 16, 761, 16, 7291, 4672, 3536, 19592, 279, 15045, 1180, 598, 312, 14872, 3536, 1544, 273, 761, 18, 3459, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
""" process received messages to check for file invitations and typing notifications and other control type messages """
""" process received messages to check for file invitations and typing notifications and other control type messages """
def checkMessage(self, message): """ process received messages to check for file invitations and typing notifications and other control type messages """ raise NotImplementedError
9b2b7163e441396d9e5e7f46775cd7809b4655be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b2b7163e441396d9e5e7f46775cd7809b4655be/msn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26378, 12, 2890, 16, 883, 4672, 3536, 1207, 5079, 2743, 358, 866, 364, 585, 2198, 18282, 471, 13408, 9208, 471, 1308, 3325, 618, 2743, 3536, 1002, 11206, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26378, 12, 2890, 16, 883, 4672, 3536, 1207, 5079, 2743, 358, 866, 364, 585, 2198, 18282, 471, 13408, 9208, 471, 1308, 3325, 618, 2743, 3536, 1002, 11206, 2, -100, -100, -100, -100, -100, ...
def init(self, name = 'imaging', conffile = None): self.dbsection = "database" self.name = name if not conffile: self.conffile = mmctools.getConfigFile(name) else: self.conffile = conffile
def __init__(self, name = 'imaging', conffile = None): if not hasattr(self, 'initdone'): PluginConfig.__init__(self, name, conffile) ImagingDatabaseConfig.__init__(self) self.initdone = True
def init(self, name = 'imaging', conffile = None): self.dbsection = "database" self.name = name if not conffile: self.conffile = mmctools.getConfigFile(name) else: self.conffile = conffile
217660aff28e7375065959b8884b34c46c9445a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/217660aff28e7375065959b8884b34c46c9445a2/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 508, 273, 296, 381, 5755, 2187, 2195, 768, 273, 599, 4672, 365, 18, 1966, 3464, 273, 315, 6231, 6, 365, 18, 529, 273, 508, 309, 486, 2195, 768, 30, 365, 18, 3923,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 508, 273, 296, 381, 5755, 2187, 2195, 768, 273, 599, 4672, 365, 18, 1966, 3464, 273, 315, 6231, 6, 365, 18, 529, 273, 508, 309, 486, 2195, 768, 30, 365, 18, 3923,...
logging.debug("%s exists=%s"%(reportfilename,os.path.exists(reportfilename)))
logging.debug("%s exists=%s"%(self.reportfilename,os.path.exists(self.reportfilename)))
def checkJobs(self): """ _checkJobs_
71eac4586b54b72187621a1d3e62df95425a98ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/71eac4586b54b72187621a1d3e62df95425a98ef/TrackingComponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 7276, 12, 2890, 4672, 3536, 389, 1893, 7276, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 7276, 12, 2890, 4672, 3536, 389, 1893, 7276, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
script.append("JOB_SPEC_FILE=$PRODAGENT_JOB_INITIALDIR/%s\n" %
script.append("JOB_SPEC_FILE=$PRODAGENT_JOB_INITIALDIR/%s-JobSpec.xml\n" %
def makeWrapperScript(self, filename, jobName): """ _makeWrapperScript_
f4fbde0e919194b455b393e466621fcfc684e4b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/f4fbde0e919194b455b393e466621fcfc684e4b2/GLiteBulkSubmitter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 3611, 3651, 12, 2890, 16, 1544, 16, 17833, 4672, 3536, 389, 6540, 3611, 3651, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 3611, 3651, 12, 2890, 16, 1544, 16, 17833, 4672, 3536, 389, 6540, 3611, 3651, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
translation = gettext.translation("pyLoad", "locale", ["de"])
translation = gettext.translation("pyLoad", "locale", languages=[self.config['language']])
def __init__(self): self.config = {} self.config['plugin_folder'] = "Plugins" self.config['link_file'] = "links.txt" self.plugins_avaible = {} self.search_updates = False
8b1e215d8c26e02670fa809868120dcccb9db446 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/8b1e215d8c26e02670fa809868120dcccb9db446/Core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1425, 273, 2618, 365, 18, 1425, 3292, 4094, 67, 5609, 3546, 273, 315, 9461, 6, 365, 18, 1425, 3292, 1232, 67, 768, 3546, 273, 315, 7135, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1425, 273, 2618, 365, 18, 1425, 3292, 4094, 67, 5609, 3546, 273, 315, 9461, 6, 365, 18, 1425, 3292, 1232, 67, 768, 3546, 273, 315, 7135, 18, ...
[crystal for crystal in args]);
[crystalElement for crystalElement in args]);
def __call__(self, *args): return TensorProductOfCrystalsElement(self, [crystal for crystal in args]);
c6f595932725c6225dd7ef083830009d393045cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c6f595932725c6225dd7ef083830009d393045cf/tensor_product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 327, 13422, 4133, 951, 12893, 1094, 1031, 1046, 12, 2890, 16, 306, 3353, 31365, 364, 4422, 31365, 316, 833, 19226, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 327, 13422, 4133, 951, 12893, 1094, 1031, 1046, 12, 2890, 16, 306, 3353, 31365, 364, 4422, 31365, 316, 833, 19226, 2, -100, -100, -100, -1...
ExecuteImmediateCmd(cmd, sizeof(temp)));
ExecuteImmediateCmd(cmd, sizeof(temp)));%(gl_error_test)s
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
d2cf0a2d41861a2cb6d3d409d367e122596328a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/d2cf0a2d41861a2cb6d3d409d367e122596328a6/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 326, 1156, 2836, 1842, 364, 279, 1296, 12123, 923, 67, 3813, 273, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 2598, 22651, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 326, 1156, 2836, 1842, 364, 279, 1296, 12123, 923, 67, 3813, 273, 3536, 2, -100, -100, -100, -100, -100, -10...
msg, (filename, lineno, offset, badline) = value
msg, (filename, lineno, offset, badline) = value.args
def format_exception_only(etype, value): """Format the exception part of a traceback. The arguments are the exception type and value such as given by sys.last_type and sys.last_value. The return value is a list of strings, each ending in a newline. Normally, the list contains a single string; however, for SyntaxError exceptions, it contains several lines that (when printed) display detailed information about where the syntax error occurred. The message indicating which exception occurred is always the last string in the list. """ # An instance should not have a meaningful value parameter, but # sometimes does, particularly for string exceptions, such as # >>> raise string1, string2 # deprecated # # Clear these out first because issubtype(string1, SyntaxError) # would throw another exception and mask the original problem. if (isinstance(etype, BaseException) or isinstance(etype, types.InstanceType) or etype is None or type(etype) is str): return [_format_final_exc_line(etype, value)] stype = etype.__name__ if not issubclass(etype, SyntaxError): return [_format_final_exc_line(stype, value)] # It was a syntax error; show exactly where the problem was found. lines = [] try: msg, (filename, lineno, offset, badline) = value except Exception: pass else: filename = filename or "<string>" lines.append(' File "%s", line %d\n' % (filename, lineno)) if badline is not None: lines.append(' %s\n' % badline.strip()) if offset is not None: caretspace = badline[:offset].lstrip() # non-space whitespace (likes tabs) must be kept for alignment caretspace = ((c.isspace() and c or ' ') for c in caretspace) # only three spaces to account for offset1 == pos 0 lines.append(' %s^\n' % ''.join(caretspace)) value = msg lines.append(_format_final_exc_line(stype, value)) return lines
838e5ad5f68f7e40b903f6aac94e3aca5a4721d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/838e5ad5f68f7e40b903f6aac94e3aca5a4721d2/traceback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 4064, 67, 3700, 12, 5872, 16, 460, 4672, 3536, 1630, 326, 1520, 1087, 434, 279, 10820, 18, 225, 1021, 1775, 854, 326, 1520, 618, 471, 460, 4123, 487, 864, 635, 2589, 18, 2722,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 4064, 67, 3700, 12, 5872, 16, 460, 4672, 3536, 1630, 326, 1520, 1087, 434, 279, 10820, 18, 225, 1021, 1775, 854, 326, 1520, 618, 471, 460, 4123, 487, 864, 635, 2589, 18, 2722,...
osd.clearscreen(osd.COL_BLACK) if settings.background.image: apply(osd.drawbitmap, (settings.background.image, -1, -1)) if settings.background.mask: osd.drawbitmap(settings.background.mask,-1,-1) DrawLogo(settings.logo)
InitScreen(settings)
def DrawTVGuide_Clear(self, settings): osd.clearscreen(osd.COL_BLACK)
d31c11c3f9777168daab09b7a7cda5ce84134383 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/d31c11c3f9777168daab09b7a7cda5ce84134383/main1_tv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 15579, 17424, 67, 9094, 12, 2890, 16, 1947, 4672, 1140, 72, 18, 8507, 9252, 12, 538, 72, 18, 4935, 67, 14618, 3649, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 15579, 17424, 67, 9094, 12, 2890, 16, 1947, 4672, 1140, 72, 18, 8507, 9252, 12, 538, 72, 18, 4935, 67, 14618, 3649, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
v v v v v v v
def complex(a, b): c = zeros(a.shape, dtype=complex_)
59b4e95f7f51e2949dfc41d870520dd7f49c95eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/59b4e95f7f51e2949dfc41d870520dd7f49c95eb/test_numexpr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7233, 12, 69, 16, 324, 4672, 276, 273, 4922, 12, 69, 18, 4867, 16, 3182, 33, 14259, 67, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7233, 12, 69, 16, 324, 4672, 276, 273, 4922, 12, 69, 18, 4867, 16, 3182, 33, 14259, 67, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
'useRunPython': ('-j', '--runPython', 'b', False, 'Use RunPython instead of native launchers to run tests'),
'runLauncher': ('-l', '--runLauncher', 'b', False, 'Use Chandler launcher if possible instead of Python to run tests'),
def parseOptions(): """ parse options >>> options = parseOptions() >>> d = eval(str(options)) >>> keys = d.keys() >>> keys.sort() >>> for key in keys: ... print key, d[key], args [] dryrun False func False funcSuite False help False mode None noEnv False noStop False params None perf False profile False recorded False repeat 0 selftest True single tbox False testcase None unit False unitSuite False useRunPython False verbose False """ _configItems = { 'mode': ('-m', '--mode', 's', None, 'debug or release; by default attempts both'), 'noStop': ('-C', '--continue', 'b', False, 'Continue even after test failures'), 'unit': ('-u', '--unit', 'b', False, 'unit tests each in own process'), 'unitSuite': ('-U', '--unitSuite', 'b', False, 'all unit tests in single process'), 'verbose': ('-v', '--verbose', 'b', False, 'Verbose output'), 'funcSuite': ('-f', '--funcSuite', 'b', False, 'Functional test suite'), 'func': ('-F', '--func', 'b', False, 'Functional tests each in own process'), 'perf': ('-p', '--perf', 'b', False, 'Performance tests'), 'single': ('-t', '--test', 's', '', 'Run test(s) (comma separated list)'), 'noEnv': ('-i', '--ignoreEnv', 'b', False, 'Ignore environment variables'), 'help': ('-H', '', 'b', False, 'Extended help'), 'dryrun': ('-d', '--dryrun', 'b', False, 'Do all of the prep work but do not run any tests'), 'selftest': ('', '--selftest', 'b', False, 'Run self test'), 'profile': ('-P', '--profile', 'b', False, 'Profile performance tests with hotshot'), 'tbox': ('-T', '--tbox', 'b', False, 'Tinderbox mode'), 'recorded': ('-r', '--recordedScript', 'b', False, 'Run the Chandler recorded scripts'), 'repeat': ('', '--repeat', 'i', 0, 'Number of times to repeat performance test, 1 by default, 3 in Tinderbox mode'), 'params': ('', '--params', 's', None, 'Optional params that are to be passed straight to RunPython'), 'testcase': ('', '--testcase', 's', None, 'Run a single unit test or test case TestFilename[:testClass[.testCase]]'), 'useRunPython': ('-j', '--runPython', 'b', False, 'Use RunPython instead of native launchers to run tests'), #'restored': ('-R', '--restoredRepository', 'b', False, 'unit tests with restored repository instead of creating new for each test'), #'config': ('-L', '', 's', None, 'Custom Chandler logging configuration file'), } # %prog expands to os.path.basename(sys.argv[0]) usage = "usage: %prog [options]\n" parser = OptionParser(usage=usage, version="%prog") for key in _configItems: (shortCmd, longCmd, optionType, defaultValue, helpText) = _configItems[key] if optionType == 'b': parser.add_option(shortCmd, longCmd, dest=key, action='store_true', default=defaultValue, help=helpText) elif optionType == 'i': parser.add_option(shortCmd, longCmd, dest=key, type='int', default=defaultValue, help=helpText) else: parser.add_option(shortCmd, longCmd, dest=key, default=defaultValue, help=helpText) (options, args) = parser.parse_args() options.args = args if args: implicitSingle = False for key in _configItems.keys(): if getattr(options, key) != _configItems[key][3]: break implicitSingle = True if implicitSingle: options.single = ' '.join(args) options.args = '' return options
af34e6a7a2160f1862685baa804a3205994c1ff0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/af34e6a7a2160f1862685baa804a3205994c1ff0/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1320, 13332, 3536, 1109, 702, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 302, 273, 5302, 12, 701, 12, 2116, 3719, 4080, 1311, 273, 302, 18, 2452, 1435, 4080, 1311, 18, 3804, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1320, 13332, 3536, 1109, 702, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 302, 273, 5302, 12, 701, 12, 2116, 3719, 4080, 1311, 273, 302, 18, 2452, 1435, 4080, 1311, 18, 3804, 1435...
def setupJobWeb(self, name, tag_base):
def setupJobWeb(self, name, tag_base=None):
def setupJobWeb(self, name, tag_base): self.name = name try: os.mkdir(name) os.mkdir(name+'/logs') except: pass self.tag_base = tag_base self.add_condor_cmd('environment',"KMP_LIBRARY=serial;MKL_SERIAL=yes") self.set_sub_file(name+'.sub') self.outputPath = os.getcwd() + '/' + name + '/' self.set_stdout_file(self.outputPath+'/logs/'+name+'-$(macroid).out') self.set_stderr_file(self.outputPath+'/logs/'+name+'-$(macroid).err')
7284b34939e8ed924c566d12e2acd24b2050b2c4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/7284b34939e8ed924c566d12e2acd24b2050b2c4/fu_Condor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 2278, 4079, 12, 2890, 16, 508, 16, 1047, 67, 1969, 33, 7036, 4672, 365, 18, 529, 273, 508, 775, 30, 1140, 18, 26686, 12, 529, 13, 1140, 18, 26686, 12, 529, 6797, 19, 10011, 613...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 2278, 4079, 12, 2890, 16, 508, 16, 1047, 67, 1969, 33, 7036, 4672, 365, 18, 529, 273, 508, 775, 30, 1140, 18, 26686, 12, 529, 13, 1140, 18, 26686, 12, 529, 6797, 19, 10011, 613...
class PIE(ARC):
class _PIE(_ARC):
def __init__(self,left=0,top=0,right=0,bottom=0, xstart=0,ystart=0,xend=0,yend=0): EMR_UNKNOWN.__init__(self) self.rclBox_left=left self.rclBox_top=top self.rclBox_right=right self.rclBox_bottom=bottom self.ptlStart_x=xstart self.ptlStart_y=ystart self.ptlEnd_x=xend self.ptlEnd_y=yend
688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4482, 33, 20, 16, 3669, 33, 20, 16, 4083, 33, 20, 16, 9176, 33, 20, 16, 619, 1937, 33, 20, 16, 1094, 485, 33, 20, 16, 92, 409, 33, 20, 16, 93, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4482, 33, 20, 16, 3669, 33, 20, 16, 4083, 33, 20, 16, 9176, 33, 20, 16, 619, 1937, 33, 20, 16, 1094, 485, 33, 20, 16, 92, 409, 33, 20, 16, 93, 40...
@match(r'^http://www.textsfromlastnight.com/view/(\d+)$')
@match(r'^(?:http://)?(?:www\.)?textsfromlastnight\.com/view/(\d+)$')
def tfln(self, event, number=u'random', timeframe=None): if number.lower() in (u'worst', u'best'): number += u'-nights' if timeframe: if timeframe.lower().endswith(u'week'): number += u'/this-week' elif timeframe.lower().endswith(u'month'): number += u'/this-month' elif number.isdigit(): number = 'view/%s' % number
8f257757f4e8a450e95d055ecd06974205993d75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/8f257757f4e8a450e95d055ecd06974205993d75/lookup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2242, 82, 12, 2890, 16, 871, 16, 1300, 33, 89, 11, 9188, 2187, 813, 3789, 33, 7036, 4672, 309, 1300, 18, 8167, 1435, 316, 261, 89, 11, 91, 280, 334, 2187, 582, 11, 12729, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2242, 82, 12, 2890, 16, 871, 16, 1300, 33, 89, 11, 9188, 2187, 813, 3789, 33, 7036, 4672, 309, 1300, 18, 8167, 1435, 316, 261, 89, 11, 91, 280, 334, 2187, 582, 11, 12729, 11, ...
roottree=vartree(root) porttree=portagetree("/")
roottree=vartree(root,root_virts)
def ebuild_init(): "performs db/variable initialization for the ebuild system. Not required for other scripts." global roottree, localtree, porttree, ebuild_initialized, root localtree=vartree("/") if root=="/": #root is local, and build dep database is the runtime dep database roottree=localtree else: #root is non-local, initialize non-local database as roottree roottree=vartree(root) porttree=portagetree("/") ebuild_initialized=1
cebbf2be609c4e61d733f5eaa2b4e0f66a59625a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9957/cebbf2be609c4e61d733f5eaa2b4e0f66a59625a/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 3510, 67, 2738, 13332, 315, 457, 9741, 1319, 19, 6105, 10313, 364, 326, 425, 3510, 2619, 18, 225, 2288, 1931, 364, 1308, 8873, 1199, 2552, 1365, 3413, 16, 1191, 3413, 16, 1756, 3413...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 3510, 67, 2738, 13332, 315, 457, 9741, 1319, 19, 6105, 10313, 364, 326, 425, 3510, 2619, 18, 225, 2288, 1931, 364, 1308, 8873, 1199, 2552, 1365, 3413, 16, 1191, 3413, 16, 1756, 3413...
def set_info_mp3( self, file ):
def set_info_mp3(self, filename):
def set_info_mp3( self, file ): """ Sets the info variables with info from the mp3
6fba5aad6b92c03fe1863c663acf4898bd8a34a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/6fba5aad6b92c03fe1863c663acf4898bd8a34a7/audioinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1376, 67, 1291, 23, 12, 2890, 16, 1544, 4672, 3536, 11511, 326, 1123, 3152, 598, 1123, 628, 326, 6749, 23, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1376, 67, 1291, 23, 12, 2890, 16, 1544, 4672, 3536, 11511, 326, 1123, 3152, 598, 1123, 628, 326, 6749, 23, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for account_id, sum in cr.fetchall(): res[account_id][f] = sum
for account_id, lwd in cr.fetchall(): res[account_id][f] = lwd
def _analysis_all(self, cr, uid, ids, fields, arg, context=None): dp = 2 res = dict([(i, {}) for i in ids])
1a63e1c0446ff8a7681b88775ab2dc9fbd57a788 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8241/1a63e1c0446ff8a7681b88775ab2dc9fbd57a788/account_analytic_analysis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12746, 67, 454, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 16, 1501, 16, 819, 33, 7036, 4672, 9986, 273, 576, 400, 273, 2065, 3816, 12, 77, 16, 2618, 13, 364, 277, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 12746, 67, 454, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 16, 1501, 16, 819, 33, 7036, 4672, 9986, 273, 576, 400, 273, 2065, 3816, 12, 77, 16, 2618, 13, 364, 277, 316, ...
MAX_LOOKUP = 10 MAX_MX = 10 MAX_PTR = 10
MAX_LOOKUP = 10 MAX_MX = 10 MAX_PTR = 10
def bool(x): return not not x
357cd1b740e7a93a1ed954617028ed60ebab9137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/139/357cd1b740e7a93a1ed954617028ed60ebab9137/spf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1426, 12, 92, 4672, 327, 486, 486, 619, 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, 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, 1426, 12, 92, 4672, 327, 486, 486, 619, 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, ...
(nodes, new_index_1, new_index_2)=Birth(index_to_birth,time,nodes); in_1.update([new_index_1, new_index_2]); in_1_alive.update([new_index_1, new_index_2]); in_1_alive.remove(index_to_birth);
(nodes, new_index_1, new_index_2, in_0, in_1, in_0_alive, in_1_alive)=Birth(index_to_birth,time,nodes, in_0, in_1, in_0_alive, in_1_alive);
def CreatePopulation(birth_0, death_0, turnover, birth_1, death_1, migration_0, migration_1, initial_0, initial_1): """ Starting with initial_0 unconnected lineages in the boreal region, and initial_1 unconnected lineages in the tropical region, this function simulates the birth-death-migration process until all the lineages left are related to eachother Input Parameters ---------------- birth_0 the per lineage birth rate in state 0 death_0 the per lineage death rate in state 0 birth_1 the per lineage birth rate in state 1 death_1 the per lineage death rate in state 1 migration_1 the per lineage migration rate from 0 to 1 migration_0 the per lineage migration rate from 1 to 0 initial_0 the size of the initial population in state 0 initial_1 the size of the initial population in state 1 Return Values ------------- nodes the node map [Time of Birth (0), Parent node (1), region (2), migration_times (3), Time of Death (4), related_to (5)] of the final population final_0 the number of lineages in the boreal region at the tips of the tree (after all remaining lineages are related to eachother) final_1 the number of lineages in the tropical region at the tips of the tree (after all remaining are related to eachother) common_rel the common ancestors of the remaining lineages """ all_related=False; time=0; nodes={}; in_0=set(range(initial_0)); in_1=range(initial_1); for i in range(initial_1): in_1[i]=in_1[i]+initial_0; in_1=set(in_1); in_0_alive=in_0.copy(); in_1_alive=in_1.copy(); for i in range(initial_0): nodes.update({i : [0,-1,0,[],-1,set([i])]}); for i in range(initial_1) : nodes.update({i+initial_0 : [0,-1,1,[],-1,set([i+initial_0])]}); j=0; time=0; while(all_related==False): j=j+1; #print j; #print(nodes); total_0=len(in_0); total_1=len(in_1); total_events=birth_0*total_0+birth_1*total_1+death_0*total_0+death_1*total_1+turnover*total_0+migration_0*total_1+migration_1; time_till_event=random.gammavariate(1,total_events); time=time+time_till_event; #time=time+dt; #prob_X is at least one X event in the time dt (1-Poisson probability no events), where X is birth_0, death_0 #birth_1, death_1, migration_0 or migration_1. Therefore, dt needs to be small enough #such that the probability of two events is much smaller than the probability of one event in dt. #prob_birth_0=1-math.exp(-birth_0*total_0*dt); #prob_death_0=1-math.exp(-death_0*total_0*dt); #prob_birth_1=1-math.exp(-birth_1*total_1*dt); #prob_death_1=1-math.exp(-death_1*total_1*dt); #prob_migration_0=1-math.exp(-migration_0*total_0*dt); #prob_migration_1=1-math.exp(-migration_1*total_1*dt); #Poisson distribution, probability of no events in time dt #prob_of_no_event=math.exp((-birth_0*dt+-death_0*dt+-migration_0*dt)*total_0+(-birth_1*dt+-death_1*dt+-migration_1*dt)*total_1); in_0_alive_copy=in_0_alive.copy() in_1_alive_copy=in_1_alive.copy() all_lineages_alive=in_0_alive_copy.union(in_1_alive_copy); all_lineages_alive_copy=all_lineages_alive.copy(); if(len(all_lineages_alive)==0): print "all died" return -1; random_list=range(len(in_0_alive)); for i in range(len(in_0_alive)): random_list[i]=in_0_alive_copy.pop(); random.shuffle(random_list); if len(random_list)==0: random_index_0=-1; else: random_index_0=random_list[0]; random_list=range(len(in_1_alive)); for i in range(len(in_1_alive)): random_list[i]=in_1_alive_copy.pop(); random.shuffle(random_list); if len(random_list)==0: random_index_1=-1; else: random_index_1=random_list[0]; random_list=range(len(all_lineages_alive )) for i in range(len(all_lineages_alive)): random_list[i]=all_lineages_alive_copy.pop(); random.shuffle(random_list); random_index_all=random_list[0]; #row_for_choosing 0:birth_0, 1:death_0, 2:migration_0, 3:turnover, 4:birth_1, 5:death_1, 6:migration_1 row_for_choosing=range(7); #special case if(len(in_0)==0): row_for_choosing[0]=0; row_for_choosing[1]=0; row_for_choosing[2]=0; row_for_choosing[3]=0; #normal else: row_for_choosing[0]=birth_0*total_0; row_for_choosing[1]=row_for_choosing[0]+death_0*total_0; row_for_choosing[2]=row_for_choosing[1]+migration_0*total_1; row_for_choosing[3]=row_for_choosing[2]+turnover*total_0; #special case if(len(in_1)==0): row_for_choosing[4]=0+row_for_choosing[0]; row_for_choosing[5]=0+row_for_choosing[0]; row_for_choosing[6]=0+row_for_choosing[0]; #normal else: row_for_choosing[4]=row_for_choosing[3]+birth_1*total_1; row_for_choosing[5]=row_for_choosing[4]+death_1*total_1; row_for_choosing[6]=row_for_choosing[5]+migration_1*total_0; #normalize sum=0; for i in range(len(row_for_choosing)): sum=sum+row_for_choosing[i]; #print("not normalized "+str(row_for_choosing)); #print("normalizing constant "+str(row_for_choosing[len(row_for_choosing)-1])); for i in range(len(row_for_choosing)): row_for_choosing[i]=row_for_choosing[i]/row_for_choosing[len(row_for_choosing)-1]; #print(row_for_choosing[len(row_for_choosing)-1]); #print(row_for_choosing); event_number=GetEvent(row_for_choosing); #print "event number "+str(event_number);
c872827e6167f1bc33108444aa076f7378184a7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7945/c872827e6167f1bc33108444aa076f7378184a7e/bd_simple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 31821, 12, 22531, 67, 20, 16, 443, 421, 67, 20, 16, 7005, 1643, 16, 17057, 67, 21, 16, 443, 421, 67, 21, 16, 6333, 67, 20, 16, 6333, 67, 21, 16, 2172, 67, 20, 16, 2172, 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, 1788, 31821, 12, 22531, 67, 20, 16, 443, 421, 67, 20, 16, 7005, 1643, 16, 17057, 67, 21, 16, 443, 421, 67, 21, 16, 6333, 67, 20, 16, 6333, 67, 21, 16, 2172, 67, 20, 16, 2172, 67,...
delta_hour = now.replace(hour=(hour + 1), minute=0, second=0) - now wait_hour = delta_hour.seconds + randint(5, 300)
wait_hour = self._polling try: delta_hour = now.replace(hour=(hour + 1)%24, minute=0, second=0) - now if delta_hour.days < 0: logger.debug('Nuovo giorno: delta_hour %s' % delta_hour) wait_hour = delta_hour.seconds + randint(5, 300) except ValueError as e: logger.warning('Errore nella determinazione della prossima ora.')
def loop(self): # TODO Rivedere algoritmo di loop()
775a9a0cc9600540241a29d07c8336e20d4ed332 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4588/775a9a0cc9600540241a29d07c8336e20d4ed332/executer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 12, 2890, 4672, 468, 2660, 534, 2950, 822, 524, 3022, 305, 8683, 4314, 2798, 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...
[ 1, 1, 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, 2798, 12, 2890, 4672, 468, 2660, 534, 2950, 822, 524, 3022, 305, 8683, 4314, 2798, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
pipeline.CondorDAGJob.__init__(self,self.__universe,self.__executable) pipeline.AnalysisJob.__init__(self,cp,dax)
CondorDAGJob.__init__(self,self.__universe,self.__executable) AnalysisJob.__init__(self,cp,dax)
def __init__(self,log_dir,cp,dax=False): """ cp = ConfigParser object from which options are read. """ self.__executable = cp.get('condor','ligolw_add') self.__universe = 'vanilla' pipeline.CondorDAGJob.__init__(self,self.__universe,self.__executable) pipeline.AnalysisJob.__init__(self,cp,dax)
5ec3f36a3cd4b9a43c9a253d7a82c2544c95a0da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/5ec3f36a3cd4b9a43c9a253d7a82c2544c95a0da/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1330, 67, 1214, 16, 4057, 16, 72, 651, 33, 8381, 4672, 3536, 3283, 273, 25076, 733, 628, 1492, 702, 854, 855, 18, 3536, 365, 16186, 17751, 273, 3283, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1330, 67, 1214, 16, 4057, 16, 72, 651, 33, 8381, 4672, 3536, 3283, 273, 25076, 733, 628, 1492, 702, 854, 855, 18, 3536, 365, 16186, 17751, 273, 3283, 18,...
out_file.write(bytes(out_data[:filesize - out_file.tell()]))
out_file.write(self.fix_bytes(out_data[:filesize - out_file.tell()]))
def decrypt_file(self, in_file_path, out_file_path, password = None): with open(in_file_path, 'rb') as in_file: #If a password is provided, generate key and iv using salt from file. if password is not None: self._salt = in_file.read (32) self.create_key_from_password (password) #Key and iv have not been generated or provided, bail out if self._key is None or self._iv is None: return False #Initialize encryption using key and iv key_expander_256 = key_expander.KeyExpander(256) expanded_key = key_expander_256.expand(self._key) aes_cipher_256 = aes_cipher.AESCipher(expanded_key) aes_cbc_256 = cbc_mode.CBCMode(aes_cipher_256, 16) aes_cbc_256.set_iv(self._iv) #Read original file size filesize = struct.unpack('L',in_file.read(4))[0] #Decrypt to eof with open(out_file_path, 'wb') as out_file: eof = False while not eof: in_data = bytearray(in_file.read(16)) if (len(in_data) == 0): eof = True else: out_data = aes_cbc_256.decrypt_block(bytearray(in_data)) #At end of file, if end of original file is within < 16 bytes slice it out. if (filesize - out_file.tell() < 16): out_file.write(bytes(out_data[:filesize - out_file.tell()])) else: out_file.write(bytes(out_data)) self._salt = None return True
08024c3ed40cd8f2bf9e098292e3964a332846fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13669/08024c3ed40cd8f2bf9e098292e3964a332846fe/demo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8420, 67, 768, 12, 2890, 16, 316, 67, 768, 67, 803, 16, 596, 67, 768, 67, 803, 16, 2201, 273, 599, 4672, 598, 1696, 12, 267, 67, 768, 67, 803, 16, 296, 6731, 6134, 487, 316, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8420, 67, 768, 12, 2890, 16, 316, 67, 768, 67, 803, 16, 596, 67, 768, 67, 803, 16, 2201, 273, 599, 4672, 598, 1696, 12, 267, 67, 768, 67, 803, 16, 296, 6731, 6134, 487, 316, 67, ...
if oldrn != "" and not re.match("\?\?\?",oldrn):
if oldrn != "" and not re.search("\?\?\?",oldrn):
def Report_Number_Generation(parameters,curdir,form): global doctype,access,act,dir,rn # The program must automatically generate the report number # Generate Year if parameters['autorngen'] == "Y": if parameters['yeargen'] == "AUTO": # Current year is used yy = time.strftime("%Y") else : # If yeargen != auto then the contents of the file named 'yeargen' is used # Assumes file uses DD-MM-YYYY format fp = open("%s/%s" % (curdir,parameters['yeargen']),"r") mydate = fp.read() fp.close() yy = re.sub("^......","",mydate) # Evaluate category - Category is read from the file named 'rnin if os.path.exists("%s/%s" % (curdir,parameters['rnin'])): fp = open("%s/%s" % (curdir,parameters['rnin']),"r") category = fp.read() category = category.replace("\n","") else: category = "" # The counter and report number formats are evaluated. # All data is considered as a string literal except that enclosed # in the <PA></PA> brackets. The category replaces <PA>categ</PA> # and the 4 digits year replaces <PA>yy</PA> counter_path = parameters['counterpath'].replace("<PA>categ</PA>",category) counter_path = counter_path.replace ("<PA>yy</PA>",yy) counter_path = counter_path.replace(" ","") counter_path = counter_path.replace("\n","") rn_format = parameters['rnformat'].replace ("<PA>categ</PA>",category) rn_format = rn_format.replace ("<PA>yy</PA>",yy) # Check if the report number does not already exists if os.path.exists("%s/%s" % (curdir,parameters['edsrn'])): fp = open("%s/%s" % (curdir,parameters['edsrn']),"r") oldrn = fp.read() fp.close() if oldrn != "" and not re.match("\?\?\?",oldrn): rn = oldrn return "" # create it rn = Create_Reference(counter_path,rn_format) rn = rn.replace("\n","") rn = rn.replace("\r","") rn = rn.replace("\015","") rn = rn.replace("\013","") rn = rn.replace("\012","") # The file edsrn is created in the submission directory, and it stores the report number fp = open("%s/%s" % (curdir,parameters['edsrn']),"w+") fp.write(rn) fp.close() # The report number is just read from a specified file elif parameters['autorngen'] == "N": fp = open("%s/%s" % (curdir,parameters['edsrn']),"r") rn = fp.read() fp.close() # Some documents are really annoying and insist on a totally different way of doing things # This code is for documents which have the access number in the report # number (instead of using a counter) elif parameters['autorngen'] == "A": rn = parameters['rnformat'].replace ("<PA>access</PA>",access) # The file accessno/edsrn is created, and it stores the report number fp = open("%s/%s" % (curdir,parameters['edsrn']),"w+") fp.write(rn) fp.close() return ""
1a612c910495b2e3fe9e00a5bb0d3d9acae49d21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/1a612c910495b2e3fe9e00a5bb0d3d9acae49d21/Report_Number_Generation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8706, 67, 1854, 67, 13842, 12, 3977, 16, 1397, 1214, 16, 687, 4672, 2552, 24909, 16, 3860, 16, 621, 16, 1214, 16, 27639, 468, 1021, 5402, 1297, 6635, 2103, 326, 2605, 1300, 468, 6654, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8706, 67, 1854, 67, 13842, 12, 3977, 16, 1397, 1214, 16, 687, 4672, 2552, 24909, 16, 3860, 16, 621, 16, 1214, 16, 27639, 468, 1021, 5402, 1297, 6635, 2103, 326, 2605, 1300, 468, 6654, ...
patt = re.compile("^>*\s*Include [`'\"]*([A-Za-z/ ]*)['\"]* \\(*Table [A-Z0-9a-z-.]+\\)*.*$")
patt = re.compile("^>*\s*Include [`'\"]*([A-Za-z/ -]*)['\"]* \\(*Table [A-Z0-9a-z-.]+\\)*.*$")
def IsIncludeTable(self,s): # Need to support : "Include `Image Pixel Macro' Table C.7-11b" #assert self._Shift == 0 #print "Include:", s #patt = re.compile("^>*Include `(.*)' Table [A-Z0-9a-z-.]+$") #m = patt.match(s) #if m: # return True #patt = re.compile("^>*Include [`|'](.*)' Table [A-Z0-9a-z-.]+\s+Defined Context ID is.*$") #m = patt.match(s) #return m #print "FALLBACK" patt = re.compile("^>*\s*Include [`'\"]*([A-Za-z/ ]*)['\"]* \\(*Table [A-Z0-9a-z-.]+\\)*.*$") m = patt.match(s) #if not m: # print "FAIL", s return m
d0caad977d22d5987eef29934af564d699f103d3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13995/d0caad977d22d5987eef29934af564d699f103d3/ParseAttributes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 8752, 1388, 12, 2890, 16, 87, 4672, 468, 12324, 358, 2865, 294, 315, 8752, 1375, 2040, 26070, 31203, 11, 3555, 385, 18, 27, 17, 2499, 70, 6, 468, 11231, 365, 6315, 10544, 422, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 8752, 1388, 12, 2890, 16, 87, 4672, 468, 12324, 358, 2865, 294, 315, 8752, 1375, 2040, 26070, 31203, 11, 3555, 385, 18, 27, 17, 2499, 70, 6, 468, 11231, 365, 6315, 10544, 422, 37...
super(CatalogReport,self).__init__()
super(CatalogReport, self).__init__()
def __init__(self, catalog, request=None, threshold=0): super(CatalogReport,self).__init__() self.catalog = catalog self.request = request self.threshold = threshold ## TODO: how to get an unique id? getPhysicalPath = getattr(catalog.aq_parent,'getPhysicalPath',lambda: ['','DummyCatalog']) self.cid = tuple(getPhysicalPath())
78534fa5e44f63d640ff07c425ec3edd3bb48fe9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9658/78534fa5e44f63d640ff07c425ec3edd3bb48fe9/CatalogReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6222, 16, 590, 33, 7036, 16, 5573, 33, 20, 4672, 2240, 12, 9769, 4820, 16, 365, 2934, 972, 2738, 972, 1435, 225, 365, 18, 7199, 273, 6222, 365, 18, 229...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6222, 16, 590, 33, 7036, 16, 5573, 33, 20, 4672, 2240, 12, 9769, 4820, 16, 365, 2934, 972, 2738, 972, 1435, 225, 365, 18, 7199, 273, 6222, 365, 18, 229...
self._suspended.pop().send_exception(TaskletExit)
self._suspended.pop()[0].send_exception(TaskletExit)
def finalise(self): r'''Shut down all remaining, suspended tasklets. This should be done before calling sys.exit(), otherwise things could get ugly. ''' while self._suspended: self._suspended.pop().send_exception(TaskletExit)
9cbfe581718d0c6f7da76396dc9d54a675eb371d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10902/9cbfe581718d0c6f7da76396dc9d54a675eb371d/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 727, 784, 12, 2890, 4672, 436, 26418, 1555, 322, 2588, 777, 4463, 16, 21850, 1562, 17307, 18, 225, 1220, 1410, 506, 2731, 1865, 4440, 2589, 18, 8593, 9334, 3541, 9198, 3377, 336, 26920, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 727, 784, 12, 2890, 4672, 436, 26418, 1555, 322, 2588, 777, 4463, 16, 21850, 1562, 17307, 18, 225, 1220, 1410, 506, 2731, 1865, 4440, 2589, 18, 8593, 9334, 3541, 9198, 3377, 336, 26920, ...
return [ sum([self[j] for j in range(1,i+1)]) for i in range(1,self.n)]
return [ sum([self._term(j) for j in range(i+1)]) for i in range(self.n-1)]
def fundamental_weights(self): """ EXAMPLES: sage: e = CartanType(['A',3]).root_system().ambient_lattice() sage: e.fundamental_weights() [(1, 0, 0, 0), (1, 1, 0, 0), (1, 1, 1, 0)]
8d6d96a1c47938dcb8919cbf43ab1dab94c086b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8d6d96a1c47938dcb8919cbf43ab1dab94c086b5/root_system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 1074, 14773, 287, 67, 9727, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 425, 273, 17695, 304, 559, 12, 3292, 37, 2187, 23, 65, 2934, 3085, 67, 4299, 7675, 2536, 197...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 1074, 14773, 287, 67, 9727, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 425, 273, 17695, 304, 559, 12, 3292, 37, 2187, 23, 65, 2934, 3085, 67, 4299, 7675, 2536, 197...
% form_get(request, 'not_terms')),
% form_get(request, 'not_terms', escaped=True)),
def advanced_ui(macro): """ Returns the code for the advanced search user interface @param macro: current macro instance """ _ = macro._ f = macro.formatter request = macro.request disabledIfMoinSearch = not request.cfg.xapian_search and \ ' disabled="disabled"' or '' search_boxes = ''.join([ f.table_row(1), f.table_cell(1, attrs={'rowspan': '5', 'class': 'searchfor'}), f.text(_('Search for items')), f.table_cell(0), ''.join([''.join([ f.table_row(1), f.table_cell(1), f.text(txt), f.table_cell(0), f.table_cell(1), f.rawHTML(input_field), f.table_cell(0), f.table_row(0), ]) for txt, input_field in ( (_('containing all the following terms'), '<input type="text" name="and_terms" size="30" value="%s">' % (form_get(request, 'and_terms') or form_get(request, 'value'))), (_('containing one or more of the following terms'), '<input type="text" name="or_terms" size="30" value="%s">' % form_get(request, 'or_terms')), (_('not containing the following terms'), '<input type="text" name="not_terms" size="30" value="%s">' % form_get(request, 'not_terms')), #('containing only one of the following terms', # '<input type="text" name="xor_terms" size="30" value="%s">' # % form_get(request, 'xor_terms')), # TODO: dropdown-box? (_('last modified since (e.g. last 2 weeks)'), '<input type="text" name="mtime" size="30" value="%s">' % form_get(request, 'mtime')), )]) ]) # category selection categories = form_get(request, 'categories') c_select = makeSelection('categories', [('', _('any category'))] + [(cat, '%s' % cat) for cat in getCategories(request)], categories, 3, True) # language selection searchedlang = form_get(request, 'language') langs = dict([(lang, lmeta['x-language-in-english']) for lang, lmeta in languages.items()]) userlang = macro.request.lang lang_select = makeSelection('language', [('', _('any language')), (userlang, langs[userlang])] + sorted(langs.items(), key=lambda i: i[1]), searchedlang, 3, True) # mimetype selection mimetype = form_get(request, 'mimetype') mt_select = makeSelection('mimetype', [('', _('any mimetype'))] + [(type, 'all %s files' % type) for type in getMimetypes()] + [(m[1], '*%s - %s' % m) for m in sorted(mimetypes.types_map.items())], mimetype, 3, True) # misc search options (checkboxes) search_options = ''.join([ ''.join([ f.table_row(1), f.table_cell(1, attrs={'class': 'searchfor'}), txt[0], f.table_cell(0), f.table_cell(1, colspan=2), unicode(txt[1]), txt[2], f.table_cell(0), f.table_row(0), ]) for txt in ( (_('Categories'), unicode(c_select), ''), (_('Language'), unicode(lang_select), ''), (_('File Type'), unicode(mt_select), ''), ('', html.INPUT(type='checkbox', name='titlesearch', value='1', checked=form_get(request, 'titlesearch'), id='titlesearch'), '<label for="titlesearch">%s</label>' % _('Search only in titles')), ('', html.INPUT(type='checkbox', name='case', value='1', checked=form_get(request, 'case'), id='case'), '<label for="case">%s</label>' % _('Case-sensitive search')), ('', html.INPUT(type='checkbox', name='excludeunderlay', value='1', checked=form_get(request, 'excludeunderlay'), id='excludeunderlay'), '<label for="excludeunderlay">%s</label>' % _('Exclude underlay')), ('', html.INPUT(type='checkbox', name='nosystemitems', value='1', checked=form_get(request, 'nosystemitems'), id='nosystempages'), '<label for="nosystempages">%s</label>' % _('No system items')), ('', html.INPUT(type='checkbox', name='historysearch', value='1', checked=form_get(request, 'historysearch'), disabled=(not request.cfg.xapian_search or not request.cfg.xapian_index_history), id='historysearch'), '<label for="historysearch">%s</label>' % _('Search in all page revisions')) ) ]) # the dialogue return f.rawHTML('\n'.join([ u'<form method="get" action="%s/%s">' % (macro.request.getScriptname(), wikiutil.quoteWikinameURL(macro.request.formatter.page.page_name)), u'<div>', u'<input type="hidden" name="action" value="fullsearch">', u'<input type="hidden" name="advancedsearch" value="1">', f.table(1, attrs={'tableclass': 'advancedsearch'}), search_boxes, search_options, f.table_row(1), f.table_cell(1, attrs={'class': 'submit', 'colspan': '3'}), u'<input type="submit" value="%s">' % _('Go get it!'), f.table_cell(0), f.table_row(0), f.table(0), u'</div>', u'</form>', ]))
64bbbaa35e708345ab13c5f9e67c9054fad53cc7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/64bbbaa35e708345ab13c5f9e67c9054fad53cc7/AdvancedSearch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16111, 67, 4881, 12, 26448, 4672, 3536, 2860, 326, 981, 364, 326, 16111, 1623, 729, 1560, 225, 632, 891, 11522, 30, 783, 11522, 791, 3536, 389, 273, 11522, 6315, 284, 273, 11522, 18, 123...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16111, 67, 4881, 12, 26448, 4672, 3536, 2860, 326, 981, 364, 326, 16111, 1623, 729, 1560, 225, 632, 891, 11522, 30, 783, 11522, 791, 3536, 389, 273, 11522, 6315, 284, 273, 11522, 18, 123...
v = session.get(model.Person, vid) s = session.get(model.Submission, sid) st = session.get(model.SubmissionType, stid)
v = session.get(model.core.Person, vid) s = session.get(model.submission.Submission, sid) st = session.get(model.submission.SubmissionType, stid)
def test_create(self): """Test creation of a Submission object""" self.model = 'submission.Submission'
41d9ae5f909a58b749142d2b3ba3cfd27cb58570 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12856/41d9ae5f909a58b749142d2b3ba3cfd27cb58570/test_submission.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2640, 12, 2890, 4672, 3536, 4709, 6710, 434, 279, 2592, 3951, 733, 8395, 225, 365, 18, 2284, 273, 296, 12684, 18, 17865, 11, 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, 1842, 67, 2640, 12, 2890, 4672, 3536, 4709, 6710, 434, 279, 2592, 3951, 733, 8395, 225, 365, 18, 2284, 273, 296, 12684, 18, 17865, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
expect = "rename=_test2.txt_&"
expect = "rename=_test2.txt_"
def test_getAttachUrl(self): """ Tests if AttachFile.getAttachUrl taints a filename """ filename = "<test2.txt>" expect = "rename=_test2.txt_&" result = AttachFile.getAttachUrl(self.pagename, filename, self.request, upload=True)
7a99eb915980311f60239d90c4cd4bde3119c5d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/7a99eb915980311f60239d90c4cd4bde3119c5d3/test_attachfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 4761, 1489, 12, 2890, 4672, 3536, 7766, 87, 309, 8659, 812, 18, 588, 4761, 1489, 22664, 87, 279, 1544, 3536, 1544, 273, 3532, 3813, 22, 18, 5830, 2984, 4489, 273, 315, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 4761, 1489, 12, 2890, 4672, 3536, 7766, 87, 309, 8659, 812, 18, 588, 4761, 1489, 22664, 87, 279, 1544, 3536, 1544, 273, 3532, 3813, 22, 18, 5830, 2984, 4489, 273, 315, 1...
if s[end] == ' ':
if s[end] in string.whitespace:
def split_quoted (s): """Split a string up according to Unix shell-like rules for quotes and backslashes. In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character escape sequence, leaving only the escaped character. The quote characters are stripped from any quoted string. Returns a list of words. """ # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... s = string.strip(s) words = [] pos = 0 while s: m = _wordchars_re.match(s, pos) end = m.end() if end == len(s): words.append(s[:end]) break if s[end] == ' ': # unescaped, unquoted space: now words.append(s[:end]) # we definitely have a word delimiter s = string.lstrip(s[end:]) pos = 0 elif s[end] == '\\': # preserve whatever is being escaped; # will become part of the current word s = s[:end] + s[end+1:] pos = end+1 else: if s[end] == "'": # slurp singly-quoted string m = _squote_re.match(s, end) elif s[end] == '"': # slurp doubly-quoted string m = _dquote_re.match(s, end) else: raise RuntimeError, \ "this can't happen (bad char '%c')" % s[end] if m is None: raise ValueError, \ "bad string (mismatched %s quotes?)" % s[end] (beg, end) = m.span() s = s[:beg] + s[beg+1:end-1] + s[end:] pos = m.end() - 2 if pos >= len(s): words.append(s) break return words
2b042ded19bc7efa43551da297c29dc142b7d73c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2b042ded19bc7efa43551da297c29dc142b7d73c/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 15179, 261, 87, 4672, 3536, 5521, 279, 533, 731, 4888, 358, 9480, 5972, 17, 5625, 2931, 364, 10681, 471, 1473, 13675, 18, 225, 657, 3025, 30, 4511, 854, 18609, 635, 7292, 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, 1416, 67, 15179, 261, 87, 4672, 3536, 5521, 279, 533, 731, 4888, 358, 9480, 5972, 17, 5625, 2931, 364, 10681, 471, 1473, 13675, 18, 225, 657, 3025, 30, 4511, 854, 18609, 635, 7292, 16, ...
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'project_id':fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, states={'draft':[('readonly', False)]}), 'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft':[('readonly',False)]}),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'project_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, states={'draft': [('readonly', False)]}), 'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)]}),
def _get_order(self, cr, uid, ids, context={}): result = {} for line in self.pool.get('sale.order.line').browse(cr, uid, ids, context=context): result[line.order_id.id] = True return result.keys()
fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 563, 273, 2618, 364, 980, 316, 365, 18, 6011, 18, 588, 2668, 87, 5349, 18, 1019, 18, 1369, 16063, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 563, 273, 2618, 364, 980, 316, 365, 18, 6011, 18, 588, 2668, 87, 5349, 18, 1019, 18, 1369, 16063, 25...
self._ui.clear_image()
self._ui.clear_image(self._ui.default_width,self._ui.default_height)
def on_fileNewMenuItem_activate(self, *args): """Handler for File|New menu item""" if self._ui.save_changes(): self._ui.clear_image()
957e250090c79f4ca933e19b75d4fe9659153717 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1947/957e250090c79f4ca933e19b75d4fe9659153717/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 768, 1908, 12958, 67, 10014, 12, 2890, 16, 380, 1968, 4672, 3536, 1503, 364, 1387, 96, 1908, 3824, 761, 8395, 309, 365, 6315, 4881, 18, 5688, 67, 6329, 13332, 365, 6315, 4881, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 768, 1908, 12958, 67, 10014, 12, 2890, 16, 380, 1968, 4672, 3536, 1503, 364, 1387, 96, 1908, 3824, 761, 8395, 309, 365, 6315, 4881, 18, 5688, 67, 6329, 13332, 365, 6315, 4881, ...
"""Handle command-line options and trigger corresponding action. """
"Handle command-line options and trigger corresponding action."
def main(): """Handle command-line options and trigger corresponding action. """ opts, args = getopt.getopt(sys.argv[1:], 'hf:m:p:') # On -h print usage and exit immediately. for o, a in opts: if o == '-h': print printUsage.__doc__ #printUsage() sys.exit(0) # On -f set the DocBuilder to use or a default one. builder = DocBuilder0() for o, a in opts: if o == '-f': builder = eval("%sDocBuilder0()" % a) break # Now call the real documentation functions. for o, a in opts: if o == '-m': builder.begin() documentModule0(a, builder) builder.end() sys.exit(0) elif o == '-p': builder.begin() documentPackage0(a, builder) builder.end() sys.exit(0)
27641d6d7ca07abb463d93e34c541a906e62ba34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/27641d6d7ca07abb463d93e34c541a906e62ba34/graphicsdoc0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 315, 3259, 1296, 17, 1369, 702, 471, 3080, 4656, 1301, 1199, 225, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 76, 74, 30, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 315, 3259, 1296, 17, 1369, 702, 471, 3080, 4656, 1301, 1199, 225, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 76, 74, 30, 8...
f = _fileio._FileIO("/dev/tty", "a") self.assertEquals(f.readable(), False) self.assertEquals(f.writable(), True) self.assertEquals(f.isatty(), True) f.close()
if not sys.platform.startswith("win"): f = _fileio._FileIO("/dev/tty", "a") self.assertEquals(f.readable(), False) self.assertEquals(f.writable(), True) if sys.platform != "darwin": self.assertEquals(f.seekable(), False) self.assertEquals(f.isatty(), True) f.close()
def testAbles(self): try: f = _fileio._FileIO(TESTFN, "w") self.assertEquals(f.readable(), False) self.assertEquals(f.writable(), True) self.assertEquals(f.seekable(), True) f.close() f = _fileio._FileIO(TESTFN, "r") self.assertEquals(f.readable(), True) self.assertEquals(f.writable(), False) self.assertEquals(f.seekable(), True) f.close() f = _fileio._FileIO(TESTFN, "a+") self.assertEquals(f.readable(), True) self.assertEquals(f.writable(), True) self.assertEquals(f.seekable(), True) self.assertEquals(f.isatty(), False) f.close() f = _fileio._FileIO("/dev/tty", "a") # XXX, won't work on e.g., Windows self.assertEquals(f.readable(), False) self.assertEquals(f.writable(), True) ##self.assertEquals(f.seekable(), False) # XXX True on OSX!? self.assertEquals(f.isatty(), True) f.close() finally: os.unlink(TESTFN)
5f09a00bf3f4c3a5aff32b959fecc9ca3ada82e1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/5f09a00bf3f4c3a5aff32b959fecc9ca3ada82e1/test_fileio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5895, 1040, 12, 2890, 4672, 775, 30, 284, 273, 389, 768, 1594, 6315, 812, 4294, 12, 16961, 19793, 16, 315, 91, 7923, 365, 18, 11231, 8867, 12, 74, 18, 11018, 9334, 1083, 13, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5895, 1040, 12, 2890, 4672, 775, 30, 284, 273, 389, 768, 1594, 6315, 812, 4294, 12, 16961, 19793, 16, 315, 91, 7923, 365, 18, 11231, 8867, 12, 74, 18, 11018, 9334, 1083, 13, 365,...
self.log(3, "queries sent, awaiting reply")
self.log(3, "%s queries sent, awaiting reply" % numQueriesSent)
def sendSomeQueries(self, **kw): """ First step of findNode Select alpha nodes that we haven't yet queried, and send them queries """ # bail if too busy if self.numQueriesPending >= maxConcurrentQueries: return # shorthand localNode = self.localNode hashWanted = self.hashWanted # randomly choose some peers #somePeerRecs = self.peerTab.chooseN(numSearchPeers) somePeerRecs = self.peerTab.select('start') # start our ticker self.nextTickTime = time.time() + timeout['findNode'] # and send them findNode queries if len(somePeerRecs) > 0: for peerRec in somePeerRecs: self.log(3, "querying %s" % peerRec) if self.numQueriesPending < maxConcurrentQueries: self.sendOneQuery(peerRec) else: break self.log(3, "queries sent, awaiting reply") else: self.log(3, "no peer recs???") for peerRec in self.peerTab: self.log(4, "%s state=%s" % (peerRec, peerRec.state))
e60b30ed443abca39b1d5552a464df392e201c33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11109/e60b30ed443abca39b1d5552a464df392e201c33/stasher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 17358, 9592, 12, 2890, 16, 2826, 9987, 4672, 3536, 5783, 2235, 434, 1104, 907, 225, 6766, 4190, 2199, 716, 732, 15032, 1404, 4671, 23264, 16, 471, 1366, 2182, 6218, 3536, 468, 18422,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 17358, 9592, 12, 2890, 16, 2826, 9987, 4672, 3536, 5783, 2235, 434, 1104, 907, 225, 6766, 4190, 2199, 716, 732, 15032, 1404, 4671, 23264, 16, 471, 1366, 2182, 6218, 3536, 468, 18422,...
v[i] = v[0] v[0] = tmp_bit
v[0], v[i] = v[i], v[0]
def NKStarGraph(self,n,k): r''' Returns the (n,k)-star graph. The vertices of the (n,k)-star graph are the set of all arangements of n symbols into labels of length k. There are two adjacency rules for the (n,k)-star graph. Frist, two vertices are adjacent if one can be obtained from the other by swapping the first symbol with another symbol. Second, two vertices are adjacent if one can be obtained from the other by swapping the first symbol with an external symbol (a symbol not used in the original label). INPUT:: - ``n`` - ``k`` EXAMPLES:: sage: g = graphs.NKStarGraph(4,2) sage: g.plot() # long time REFERENCES: - Wei-Kuo, Chiang, and Chen Rong-Jaye. "The (n, k)-star graph: A generalized star graph." Information Processing Letters 56, no. 5 (December 8, 1995): 259-264. AUTHORS: - Michael Yurko (2009-09-01)
7519f34dad04abdea4d0e650013315e3a19aa9b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/7519f34dad04abdea4d0e650013315e3a19aa9b2/graph_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 423, 47, 18379, 4137, 12, 2890, 16, 82, 16, 79, 4672, 436, 26418, 2860, 326, 261, 82, 16, 79, 24950, 10983, 2667, 18, 225, 1021, 6928, 434, 326, 261, 82, 16, 79, 24950, 10983, 2667, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 423, 47, 18379, 4137, 12, 2890, 16, 82, 16, 79, 4672, 436, 26418, 2860, 326, 261, 82, 16, 79, 24950, 10983, 2667, 18, 225, 1021, 6928, 434, 326, 261, 82, 16, 79, 24950, 10983, 2667, ...
if not self.newwiki: subject = 'Re: %s' % subject
def notify(self, action, page, version=None, time=None, comment=None, author=None, ipnr=None): self.page = page self.change_author = author self.time = time
5ee5e47be0d2833751f7aec6f7fda29d45670aad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9414/5ee5e47be0d2833751f7aec6f7fda29d45670aad/notification.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 2890, 16, 1301, 16, 1363, 16, 1177, 33, 7036, 16, 813, 33, 7036, 16, 2879, 33, 7036, 16, 2869, 33, 7036, 16, 2359, 11611, 33, 7036, 4672, 365, 18, 2433, 273, 1363, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 2890, 16, 1301, 16, 1363, 16, 1177, 33, 7036, 16, 813, 33, 7036, 16, 2879, 33, 7036, 16, 2869, 33, 7036, 16, 2359, 11611, 33, 7036, 4672, 365, 18, 2433, 273, 1363, 365, 18,...
result = urllib2.urlopen(request)
result = self._openurl(request)
def exportConfig(self, configPassword): self._login() request = urllib2.Request(self.baseURL, urllib.urlencode({'actionType': 'importExport', 'export': ' Export Configuration ', 'password1': configPassword, 'password2': configPassword}))
8e16cfd107c373f30f9fc5b591ff15092d8f634e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6393/8e16cfd107c373f30f9fc5b591ff15092d8f634e/gsa_admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 809, 12, 2890, 16, 642, 3913, 4672, 365, 6315, 5819, 1435, 590, 273, 11527, 22, 18, 691, 12, 2890, 18, 1969, 1785, 16, 11527, 18, 718, 3015, 12590, 11, 1128, 559, 4278, 296, 5666...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 809, 12, 2890, 16, 642, 3913, 4672, 365, 6315, 5819, 1435, 590, 273, 11527, 22, 18, 691, 12, 2890, 18, 1969, 1785, 16, 11527, 18, 718, 3015, 12590, 11, 1128, 559, 4278, 296, 5666...
def runSource1(self): injectLoader(parts) parts, packages = self._partBuilder.getPackages(partIncludes, smartExclude, classList, collapseCfg, variants, sizeCfg) compiled = self._generateSourcePackageCode(part, packages) for part in parts: for pkg in part: compiled += self.compileClasses(pkgClasses, variants) break break writeFile(fileName, boot + compiled)
def runSource(self, parts, packages, boot, variants, classList, libs, classes): if not self._job.get("compile-source/file"): return
6c1607de6e1c540f791e595f73bd040a2fd94679 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/6c1607de6e1c540f791e595f73bd040a2fd94679/CodeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 1830, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 12935, 16, 16035, 16, 15042, 16, 3318, 4672, 309, 486, 365, 6315, 4688, 18, 588, 2932, 11100, 17, 3168, 19, 768, 6, 4672, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 1830, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 12935, 16, 16035, 16, 15042, 16, 3318, 4672, 309, 486, 365, 6315, 4688, 18, 588, 2932, 11100, 17, 3168, 19, 768, 6, 4672, 327, ...
_debug_('handling event %s' % str(event), 1)
_debug_('handling event %s' % str(event), 2)
def handle(self, event=None): """ event handling function """ # search for events in the queue if not event and not len(self.queue): return
3bdf30b8cf5813eb0665cd21ff929a8f6963cc50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/3bdf30b8cf5813eb0665cd21ff929a8f6963cc50/eventhandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 871, 33, 7036, 4672, 3536, 871, 5057, 445, 3536, 468, 1623, 364, 2641, 316, 326, 2389, 309, 486, 871, 471, 486, 562, 12, 2890, 18, 4000, 4672, 327, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 871, 33, 7036, 4672, 3536, 871, 5057, 445, 3536, 468, 1623, 364, 2641, 316, 326, 2389, 309, 486, 871, 471, 486, 562, 12, 2890, 18, 4000, 4672, 327, 2, -100, -100, ...
if pkg in sources[suite]: for p in sources[suite][pkg]['binaries']:
if pkg[0] != '-' and pkg_name in sources[suite]: for p in sources[suite][pkg_name]['binaries']:
def iter_packages(self, packages, selected, hint=False, nuninst=None): """Iter on the list of actions and apply them one-by-one
d5362ad8a66b3cf545afb782387a1c2c01d551e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/d5362ad8a66b3cf545afb782387a1c2c01d551e2/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 3170, 16, 7380, 33, 8381, 16, 290, 318, 8591, 33, 7036, 4672, 3536, 2360, 603, 326, 666, 434, 4209, 471, 2230, 2182, 1245, 17, 1637, 17, 476, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 3170, 16, 7380, 33, 8381, 16, 290, 318, 8591, 33, 7036, 4672, 3536, 2360, 603, 326, 666, 434, 4209, 471, 2230, 2182, 1245, 17, 1637, 17, 476, ...
return Hammie(storage.open_storage((filename, mode), useDB)
return Hammie(storage.open_storage((filename, mode), useDB))
def open(filename, useDB=True, mode='r'): """Open a file, returning a Hammie instance. If usedb is False, open as a pickle instead of a DBDict. mode is used as the flag to open DBDict objects. 'c' for read-write (create if needed), 'r' for read-only, 'w' for read-write. """ return Hammie(storage.open_storage((filename, mode), useDB)
5c4086a1a483368407a4f5ef5456dcbb7e4df3c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/5c4086a1a483368407a4f5ef5456dcbb7e4df3c8/hammie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 3459, 16, 999, 2290, 33, 5510, 16, 1965, 2218, 86, 11, 4672, 3536, 3678, 279, 585, 16, 5785, 279, 670, 301, 81, 1385, 791, 18, 225, 971, 1399, 70, 353, 1083, 16, 1696, 487,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 3459, 16, 999, 2290, 33, 5510, 16, 1965, 2218, 86, 11, 4672, 3536, 3678, 279, 585, 16, 5785, 279, 670, 301, 81, 1385, 791, 18, 225, 971, 1399, 70, 353, 1083, 16, 1696, 487,...
self.tree = gtk.glade.XML(find_path("arkadas.glade"))
self.tree = gtk.glade.XML(find_path("arkadas.glade"), "mainWindow", "arkadas")
def __init__(self): gtk.window_set_default_icon_name("address-book") self.tree = gtk.glade.XML(find_path("arkadas.glade"))
8f5feb6f8174a659e8fecf1d7553bab503240a3e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/8f5feb6f8174a659e8fecf1d7553bab503240a3e/arkadas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 22718, 18, 5668, 67, 542, 67, 1886, 67, 3950, 67, 529, 2932, 2867, 17, 3618, 7923, 365, 18, 3413, 273, 22718, 18, 7043, 2486, 18, 4201, 12, 4720, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 22718, 18, 5668, 67, 542, 67, 1886, 67, 3950, 67, 529, 2932, 2867, 17, 3618, 7923, 365, 18, 3413, 273, 22718, 18, 7043, 2486, 18, 4201, 12, 4720, 67, ...
def __init__(self): self.cfg = MinimalConfig()
def __init__(self, request): self.request = request
def __init__(self): self.cfg = MinimalConfig() self.clock = MoinMoin.request.Clock() self.content_lang = None self.current_lang = None self.form = {} self._page_headings = {} self.result = []
ba2b39fcd04c590a84d41429669714ca936397e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/ba2b39fcd04c590a84d41429669714ca936397e8/test_converter_text_html_text_x_moin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 4672, 365, 18, 2293, 273, 590, 365, 18, 18517, 273, 490, 885, 49, 885, 18, 2293, 18, 14027, 1435, 365, 18, 1745, 67, 4936, 273, 599, 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, 565, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 4672, 365, 18, 2293, 273, 590, 365, 18, 18517, 273, 490, 885, 49, 885, 18, 2293, 18, 14027, 1435, 365, 18, 1745, 67, 4936, 273, 599, 365, 18,...
self.unmount_device.emit()
self.umount_device.emit()
def eject_clicked(self, *args): self.unmount_device.emit()
452083dc346ab04f28076751141bfdd1af091fd8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/452083dc346ab04f28076751141bfdd1af091fd8/layout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 937, 67, 7475, 329, 12, 2890, 16, 380, 1968, 4672, 365, 18, 318, 4778, 67, 5964, 18, 18356, 1435, 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, 425, 937, 67, 7475, 329, 12, 2890, 16, 380, 1968, 4672, 365, 18, 318, 4778, 67, 5964, 18, 18356, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
console.stdoutln("calc_include_atom(%s): rejected non-mainchain atom" % (atm))
msg = "rejected non-mainchain atom" console.stdoutln("calc_include_atom(%s): %s" % (atm, msg))
def calc_include_atom(atm, reject_messages = False): """Filter out atoms from the model which will cause problems or can't contribute to the TLS analysis. """ if atm.position == None: return False if atm.occupancy < 0.1: if reject_messages == True: console.stdoutln("calc_include_atom(%s): rejected because of low occupancy" % (atm)) return False if atm.occupancy > 1.0: atm.occupancy = 1.0 console.stdoutln("calc_include_atom(%s): atom occupancy greator than 1.0; truncating" % (atm)) if numpy.trace(atm.get_U()) <= const.TSMALL: if reject_messages == True: console.stdoutln("calc_include_atom(%s): rejected because of small Uiso magnitude " % (atm)) return False elif conf.globalconf.include_atoms == "MAINCHAIN": if const.MAINCHAIN_ATOM_DICT.has_key(atm.name) is False: if reject_messages == True: console.stdoutln("calc_include_atom(%s): rejected non-mainchain atom" % (atm)) return False return True
708319f15d1a5ad5105fc702a58cafe3d3c2e66d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/708319f15d1a5ad5105fc702a58cafe3d3c2e66d/atom_selection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 6702, 67, 7466, 12, 270, 81, 16, 4925, 67, 6833, 273, 1083, 4672, 3536, 1586, 596, 9006, 628, 326, 938, 1492, 903, 4620, 9688, 578, 848, 1404, 356, 887, 358, 326, 8098, 6285,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 6702, 67, 7466, 12, 270, 81, 16, 4925, 67, 6833, 273, 1083, 4672, 3536, 1586, 596, 9006, 628, 326, 938, 1492, 903, 4620, 9688, 578, 848, 1404, 356, 887, 358, 326, 8098, 6285,...
print "abnormal attrtab",f print "abnormal lines:", lines
print "abnormal attrtab", f print "abnormal lines:" for t in lines: print `t` print 'abnormal line', `l` import traceback traceback.print_stack()
def line2def(self, lines): results = [] for l in lines: if not l: continue ####################### # ctags bug?! it seem that it could not handle two continous # doulbe quota charaecters ("")rightly in Exuberant Ctags 5.6, at least. # so here we resume "\xd3" to "", workaround :( ###### l = l.replace("\xd3", '""') fields = l.split("\t") filename = fields[1] caller = "" lineno = fields[2][:-2] # remove ';"' attrtab = {} for f in fields[3:]: try: k, v = f.split(":", 1) attrtab[k] = v except ValueError: print "abnormal attrtab",f print "abnormal lines:", lines continue attrtab["name"] = fields[0] try: results.append((filename, caller, int(lineno), attrtab)) except ValueError: print "bug here #1" print l return results
67aea3fe0826595731f719b7ff477fe8a231398f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5753/67aea3fe0826595731f719b7ff477fe8a231398f/indexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 22, 536, 12, 2890, 16, 2362, 4672, 1686, 273, 5378, 364, 328, 316, 2362, 30, 309, 486, 328, 30, 202, 17143, 29570, 1970, 1189, 468, 276, 4156, 7934, 35, 5, 518, 19264, 716, 518, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 22, 536, 12, 2890, 16, 2362, 4672, 1686, 273, 5378, 364, 328, 316, 2362, 30, 309, 486, 328, 30, 202, 17143, 29570, 1970, 1189, 468, 276, 4156, 7934, 35, 5, 518, 19264, 716, 518, ...
if height_limit >= 21.4:
if height_limit >= 21.4:
def search(self, height_limit=18, verbose=False): r""" Search for new points, and add them to this subgroup of the Mordell-Weil group.
c2ebf8bfa15bcdb4318f58bfcf2982e3a69cce87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/c2ebf8bfa15bcdb4318f58bfcf2982e3a69cce87/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 2072, 67, 3595, 33, 2643, 16, 3988, 33, 8381, 4672, 436, 8395, 5167, 364, 394, 3143, 16, 471, 527, 2182, 358, 333, 720, 1655, 434, 326, 490, 517, 1165, 17, 3218, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1623, 12, 2890, 16, 2072, 67, 3595, 33, 2643, 16, 3988, 33, 8381, 4672, 436, 8395, 5167, 364, 394, 3143, 16, 471, 527, 2182, 358, 333, 720, 1655, 434, 326, 490, 517, 1165, 17, 3218, ...
if __name__ == '__main__':
def main ():
def seed (base, layer, levels = (0, 5), bbox = None): from Layer import Tile params = { 'layers' : layer.name, 'srs' : layer.srs, 'width' : layer.size[0], 'height' : layer.size[1], 'format' : layer.format() } client = WMS(base, params) if not bbox: bbox = layer.bbox start = time.time() total = 0 for z in range(*levels): bottomleft = layer.getClosestCell(z, bbox[0:2]) topright = layer.getClosestCell(z, bbox[2:4]) print >>sys.stderr, "###### %s, %s" % (bottomleft, topright) zcount = 0 ztiles = (topright[1] - bottomleft[1] + 1) * (topright[0] - bottomleft[0] + 1) for y in range(bottomleft[1], topright[1] + 1): for x in range(bottomleft[0], topright[0] + 1): tileStart = time.time() tile = Tile(layer,x,y,z) bounds = tile.bounds() client.setBBox(bounds) client.fetch() total += 1 zcount += 1 box = "(%.4f %.4f %.4f %.4f)" % bounds print >>sys.stderr, "%02d (%06d, %06d) = %s [%.4fs : %.3f/s] %s/%s" \ % (z,x,y, box, time.time() - tileStart, total / (time.time() - start + .0001), zcount, ztiles)
20118aa0afbaf7af67184f6eecd3ff56d024c3dd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6188/20118aa0afbaf7af67184f6eecd3ff56d024c3dd/Client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5009, 261, 1969, 16, 3018, 16, 7575, 273, 261, 20, 16, 1381, 3631, 8472, 273, 599, 4672, 628, 12112, 1930, 13791, 859, 273, 288, 296, 10396, 11, 294, 3018, 18, 529, 16, 296, 87, 5453, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5009, 261, 1969, 16, 3018, 16, 7575, 273, 261, 20, 16, 1381, 3631, 8472, 273, 599, 4672, 628, 12112, 1930, 13791, 859, 273, 288, 296, 10396, 11, 294, 3018, 18, 529, 16, 296, 87, 5453, ...
_('<p>There currently are no publicly-advertised '), Link(mm_cfg.MAILMAN_URL, _('Mailman')), _(' mailing lists on %(hostname)s.'),
_('''<p>There currently are no publicly-advertised %(mailmanlink)s mailing lists on %(hostname)s.'''),
def admin_overview(msg=''): # Show the administrative overview page, with the list of all the lists on # this host. msg is an optional error message to display at the top of # the page. # # This page should be displayed in the server's default language, which # should have already been set. hostname = mm_cfg.DEFAULT_HOST_NAME legend = _('%(hostname)s mailing lists - Admin Links') # The html `document' doc = Document() doc.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE) doc.SetTitle(legend) # The table that will hold everything table = Table(border=0, width="100%") table.AddRow([Center(Header(2, legend))]) table.AddCellInfo(max(table.GetCurrentRowIndex(), 0), 0, colspan=2, bgcolor="#99ccff") # Skip any mailing list that isn't advertised. advertised = [] listnames = Utils.list_names() listnames.sort() for name in listnames: mlist = MailList.MailList(name, lock=0) if mlist.advertised: advertised.append(mlist) # Greeting depends on whether there was an error or not if msg: greeting = FontAttr(msg, color="ff5060", size="+1") else: greeting = _("Welcome!") welcome = [] if not advertised: welcome.extend([ greeting, _('<p>There currently are no publicly-advertised '), Link(mm_cfg.MAILMAN_URL, _('Mailman')), _(' mailing lists on %(hostname)s.'), ]) else: welcome.extend([ greeting, _('<p>Below is the collection of publicly-advertised '), Link(mm_cfg.MAILMAN_URL, _('Mailman')), _(' mailing lists on %(hostname)s.'), _(''' Click on a list name to visit the configuration pages for that list.'''), ]) creatorurl = Utils.ScriptURL('create') mailman_owner = mm_cfg.MAILMAN_OWNER extra = msg and _('right ') or '' welcome.extend([ _('''To visit the administrators configuration page for an unadvertised list, open a URL similar to this one, but with a '/' and the %(extra)slist name appended. If you have the proper authority, you can also <a href="%(creatorurl)s">create a new mailing list</a>. <p>General list information can be found at '''), Link(Utils.ScriptURL('listinfo'), _('the mailing list overview page')), '.', _('<p>(Send questions and comments to '), Link('mailto:%s' % mailman_owner, mailman_owner), '.)<p>', ]) table.AddRow([Container(*welcome)]) table.AddCellInfo(max(table.GetCurrentRowIndex(), 0), 0, colspan=2) if advertised: table.AddRow(['&nbsp;', '&nbsp;']) table.AddRow([Bold(_('List')), Bold(_('Description'))]) for mlist in advertised: table.AddRow( [Link(mlist.GetScriptURL('admin'), Bold(mlist.real_name)), mlist.description or Italic(_('[no description available]')), ]) doc.AddItem(table) doc.AddItem('<hr>') doc.AddItem(MailmanLogo()) print doc.Format(bgcolor="#ffffff")
3678cfa7fa6d263c8adc48317aa2af5324aa99d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/3678cfa7fa6d263c8adc48317aa2af5324aa99d3/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3981, 67, 26081, 12, 3576, 2218, 11, 4672, 468, 9674, 326, 30162, 1535, 18471, 1363, 16, 598, 326, 666, 434, 777, 326, 6035, 603, 468, 333, 1479, 18, 225, 1234, 353, 392, 3129, 555, 88...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3981, 67, 26081, 12, 3576, 2218, 11, 4672, 468, 9674, 326, 30162, 1535, 18471, 1363, 16, 598, 326, 666, 434, 777, 326, 6035, 603, 468, 333, 1479, 18, 225, 1234, 353, 392, 3129, 555, 88...
print "[%r, %r, 1, %r, %r, %r, %r, %r]," % (testStr, commentStr, itemList, deg, sec, neatStr, outDMSStr)
print "[%r, %r, True, %r, %r, %r, %r, %r]," % (testStr, commentStr, itemList, deg, sec, neatStr, outDMSStr)
def _printTest(dmsSet = None): """Prints the results of running each routine on a set of test data. Data format is a list of tuples, each containing three elements: dmsStr to test, a comment, and isOK (true if the dmsStr is valid, false if not) The output is in the format used by _assertTest, but please use this with great caution. You must examine the output very carefully to confirm it is correct before updating _assertTest! """ print "Exercising RO string utilities" if not dmsSet: dmsSet = ( ("::", ""), ("-::", ""), (" +1", ""), ("-2.999998639", ""), # 3:00:00 = 3:00:00.0 = 3:00:00.00 = 2:59:59.9951 ("-2.999998583", ""), # 3:00:00 = 3:00:00.0 = 2:59:59.99 = 2:59:59.9949 ("-2.999986139", ""), # 3:00:00 = 3:00:00.0 = 2:59:59.95 = 2:59:59.9501 ("-2.999986083", ""), # 3:00:00 = 2:59:59.9 = 2:59:59.95 = 2:59:59.9499 ("-2.999861139", ""), # 2:59:59 = 2:59:59.5 = 2:59:59.50 = 2:59:59.5001 ("-2.999861083", ""), # 2:59:59 = 2:59:59.5 = 2:59:59.50 = 2:59:59.4999 ("-123::", ""), ("-123:4", ""), ("-123:45", ""), ("-123:4.56789", ""), ("-123:45.6789", ""), ("1:2:", ""), ("1:2:3", ""), ("1:2:3.456789", ""), ("1:23:4", ""), ("1:23:45", ""), ("123:45:6.789", ""), ("123:45:56.789", ""), ("-0::12.34", "bug test; the sign must be retained"), ("-::12.34", "a weird gray area, but it works"), ("::12.34", ""), ("1:23.4567", ""), ("-1.234567", ""), ("-1:abadstr", "invalid characters"), ("-1:2343:24", "too many minutes digits"), ("1:-1:24", "minus sign in wrong place"), ) for testStr, commentStr in dmsSet: # note: if splitDMSStr succeeds, then the other calls all should succeed if checkDMSStr(testStr): try: itemList = splitDMSStr(testStr) deg = degFromDMSStr (testStr) sec = secFromDMSStr (testStr) neatStr = neatenDMSStr (testStr) outDMSStr = [] for prec in range(3): outDMSStr.append(dmsStrFromDeg(deg, precision=prec)) print "[%r, %r, 1, %r, %r, %r, %r, %r]," % (testStr, commentStr, itemList, deg, sec, neatStr, outDMSStr) except StandardError, e: print "unexpected failure on %r (%s); error = %s" % (testStr, commentStr, e) else: print "[%r, %r, 0, %r, %r, %r, %r, %r]," % tuple([testStr, commentStr] + [None]*5)
994804867e88210e2f2f130afe9f155048fe038b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/994804867e88210e2f2f130afe9f155048fe038b/StringUtil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1188, 4709, 12, 72, 959, 694, 273, 599, 4672, 3536, 15402, 326, 1686, 434, 3549, 1517, 12245, 603, 279, 444, 434, 1842, 501, 18, 1910, 740, 353, 279, 666, 434, 10384, 16, 1517, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1188, 4709, 12, 72, 959, 694, 273, 599, 4672, 3536, 15402, 326, 1686, 434, 3549, 1517, 12245, 603, 279, 444, 434, 1842, 501, 18, 1910, 740, 353, 279, 666, 434, 10384, 16, 1517, 41...
x = m[0][0]*vector[0] + m[0][1]*vector[1] + m[0][2]*vector[2] + m[0][3] y = m[1][0]*vector[0] + m[1][1]*vector[1] + m[1][2]*vector[2] + m[1][3] z = m[2][0]*vector[0] + m[2][1]*vector[1] + m[2][2]*vector[2] + m[2][3]
x = m[0][0]*vector[0] + m[1][0]*vector[1] + m[2][0]*vector[2] + m[3][0] y = m[0][1]*vector[0] + m[1][1]*vector[1] + m[2][1]*vector[2] + m[3][1] z = m[0][2]*vector[0] + m[1][2]*vector[1] + m[2][2]*vector[2] + m[3][2]
def transform_vector3_by_blmat(vector,m): x = m[0][0]*vector[0] + m[0][1]*vector[1] + m[0][2]*vector[2] + m[0][3] y = m[1][0]*vector[0] + m[1][1]*vector[1] + m[1][2]*vector[2] + m[1][3] z = m[2][0]*vector[0] + m[2][1]*vector[1] + m[2][2]*vector[2] + m[2][3] return [x,y,z]
84cc921174cdfdbab4a5bbe78f1df6c7393ba116 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12598/84cc921174cdfdbab4a5bbe78f1df6c7393ba116/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 67, 7737, 23, 67, 1637, 67, 3083, 7373, 12, 7737, 16, 81, 4672, 619, 273, 312, 63, 20, 6362, 20, 5772, 7737, 63, 20, 65, 397, 312, 63, 21, 6362, 20, 5772, 7737, 63, 21, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 67, 7737, 23, 67, 1637, 67, 3083, 7373, 12, 7737, 16, 81, 4672, 619, 273, 312, 63, 20, 6362, 20, 5772, 7737, 63, 20, 65, 397, 312, 63, 21, 6362, 20, 5772, 7737, 63, 21, 65, ...
self.socket.close()
self.server_close()
def process_request(self, request, client_address): """Fork a new subprocess to process the request.""" self.collect_children() pid = os.fork() if pid: # Parent process if self.active_children is None: self.active_children = [] self.active_children.append(pid) return else: # Child process. # This must never return, hence os._exit()! try: self.socket.close() self.finish_request(request, client_address) os._exit(0) except: try: self.handle_error(request, client_address) finally: os._exit(1)
90cb9067b82509ed4917084ffa85abc150509ff5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/90cb9067b82509ed4917084ffa85abc150509ff5/SocketServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 22662, 279, 394, 6652, 358, 1207, 326, 590, 12123, 365, 18, 14676, 67, 5906, 1435, 4231, 273, 1140, 18, 23335, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 22662, 279, 394, 6652, 358, 1207, 326, 590, 12123, 365, 18, 14676, 67, 5906, 1435, 4231, 273, 1140, 18, 23335, 1435, ...
for rec in self.read(cr, uid, ids, ['number_of_days_temp','date_from','date_to']):
for rec in self.read(cr, uid, ids, ['number_of_days_temp','date_from','date_to', 'type']):
def _check_date(self, cr, uid, ids): for rec in self.read(cr, uid, ids, ['number_of_days_temp','date_from','date_to']): if rec['number_of_days_temp'] < 0: return False date_from = time.strptime(rec['date_from'], '%Y-%m-%d %H:%M:%S') date_to = time.strptime(rec['date_to'], '%Y-%m-%d %H:%M:%S') if date_from > date_to: return False return True
174162b34489cb256d1564b615be6dd14c427d81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/174162b34489cb256d1564b615be6dd14c427d81/hr_holidays.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 712, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 364, 1950, 316, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 16, 10228, 2696, 67, 792, 67, 9810, 67, 5814, 17023, 712...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 712, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 364, 1950, 316, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 16, 10228, 2696, 67, 792, 67, 9810, 67, 5814, 17023, 712...
set python=%(bundle)s_build\python\python
cd %(bundle)s_build set python=python\python
def create_script(bundle, top_modules): py_major, py_minor = sys.version_info[:2] return r"""@echo off
c72bc0a5e3db312944a4a93d316f12ee0facf7c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/c72bc0a5e3db312944a4a93d316f12ee0facf7c0/install_bat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4263, 12, 9991, 16, 1760, 67, 6400, 4672, 2395, 67, 14019, 16, 2395, 67, 17364, 273, 2589, 18, 1589, 67, 1376, 10531, 22, 65, 327, 436, 8395, 36, 12946, 3397, 225, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4263, 12, 9991, 16, 1760, 67, 6400, 4672, 2395, 67, 14019, 16, 2395, 67, 17364, 273, 2589, 18, 1589, 67, 1376, 10531, 22, 65, 327, 436, 8395, 36, 12946, 3397, 225, 2, -100, ...
return open(filename, encoding="utf-8").read(), filename
return open(filename, encoding=encoding).read(), filename
def _load_testfile(filename, package, module_relative): if module_relative: package = _normalize_module(package, 3) filename = _module_relative_path(package, filename) if hasattr(package, '__loader__'): if hasattr(package.__loader__, 'get_data'): return package.__loader__.get_data(filename).decode('utf-8'), filename return open(filename, encoding="utf-8").read(), filename
1862736c3afcbb0446c06eff1ce76a43ca03ebb1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/1862736c3afcbb0446c06eff1ce76a43ca03ebb1/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 3813, 768, 12, 3459, 16, 2181, 16, 1605, 67, 11626, 4672, 309, 1605, 67, 11626, 30, 2181, 273, 389, 12237, 67, 2978, 12, 5610, 16, 890, 13, 1544, 273, 389, 2978, 67, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 3813, 768, 12, 3459, 16, 2181, 16, 1605, 67, 11626, 4672, 309, 1605, 67, 11626, 30, 2181, 273, 389, 12237, 67, 2978, 12, 5610, 16, 890, 13, 1544, 273, 389, 2978, 67, 11...
def _verify(name, expected): computed = eval(name)
def _verify(name, computed, expected):
def _verify(name, expected): computed = eval(name) if abs(computed - expected) > 1e-7: raise ValueError( "computed value for %s deviates too much " "(computed %g, expected %g)" % (name, computed, expected))
d6aac9e347f1c02a6991965619635ee60ddb6e1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d6aac9e347f1c02a6991965619635ee60ddb6e1f/random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8705, 12, 529, 16, 8470, 16, 2665, 4672, 309, 2417, 12, 20307, 300, 2665, 13, 405, 404, 73, 17, 27, 30, 1002, 2068, 12, 315, 20307, 460, 364, 738, 87, 27492, 815, 4885, 9816, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8705, 12, 529, 16, 8470, 16, 2665, 4672, 309, 2417, 12, 20307, 300, 2665, 13, 405, 404, 73, 17, 27, 30, 1002, 2068, 12, 315, 20307, 460, 364, 738, 87, 27492, 815, 4885, 9816, 31...
elif status.get('version_fail', False) == True:
elif status.get('version_fail', False) and self.doUpgrade:
def queuePkg(pkg, inst, queue): if pkg.get('name') == 'gpg-pubkey': gpg_keys.append(inst) else: queue.append(inst)
fa828a85c54e0e883cfac6ad19227776c95ecb68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/fa828a85c54e0e883cfac6ad19227776c95ecb68/YUMng.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2389, 11264, 12, 10657, 16, 1804, 16, 2389, 4672, 309, 3475, 18, 588, 2668, 529, 6134, 422, 296, 6403, 75, 17, 23428, 4278, 22544, 67, 2452, 18, 6923, 12, 8591, 13, 469, 30, 2389, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2389, 11264, 12, 10657, 16, 1804, 16, 2389, 4672, 309, 3475, 18, 588, 2668, 529, 6134, 422, 296, 6403, 75, 17, 23428, 4278, 22544, 67, 2452, 18, 6923, 12, 8591, 13, 469, 30, 2389, 18, ...
return new Node(t, SEMICOLON)
return Node(t, SEMICOLON)
def SEMICOLON__build(t): return new Node(t, SEMICOLON)
c7acf93c85d2480e1e64e292c2f42ae1721eefbe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/c7acf93c85d2480e1e64e292c2f42ae1721eefbe/Builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3174, 22972, 1741, 673, 972, 3510, 12, 88, 4672, 327, 394, 2029, 12, 88, 16, 3174, 22972, 1741, 673, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3174, 22972, 1741, 673, 972, 3510, 12, 88, 4672, 327, 394, 2029, 12, 88, 16, 3174, 22972, 1741, 673, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
font.setMinFilter(minFilter)
font.setMinfilter(minFilter)
def loadFont(self, modelPath, spaceAdvance = None, pointSize = None, pixelsPerUnit = None, scaleFactor = None, textureMargin = None, polyMargin = None, minFilter = None, magFilter = None, anisotropicDegree = None, lineHeight = None): """ modelPath is a string.
0bcf6e19e333d0eaa5f95cc4a55ebebdccd27289 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/0bcf6e19e333d0eaa5f95cc4a55ebebdccd27289/Loader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 5711, 12, 2890, 16, 938, 743, 16, 3476, 1871, 5882, 273, 599, 16, 1634, 1225, 273, 599, 16, 8948, 2173, 2802, 273, 599, 16, 3159, 6837, 273, 599, 16, 11428, 9524, 273, 599, 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, 1262, 5711, 12, 2890, 16, 938, 743, 16, 3476, 1871, 5882, 273, 599, 16, 1634, 1225, 273, 599, 16, 8948, 2173, 2802, 273, 599, 16, 3159, 6837, 273, 599, 16, 11428, 9524, 273, 599, 16, ...
vereq(hash(d), id(d))
orig_hash = hash(d)
def subclasspropagation(): if verbose: print "Testing propagation of slot functions to subclasses..." class A(object): pass class B(A): pass class C(A): pass class D(B, C): pass d = D() vereq(hash(d), id(d)) A.__hash__ = lambda self: 42 vereq(hash(d), 42) C.__hash__ = lambda self: 314 vereq(hash(d), 314) B.__hash__ = lambda self: 144 vereq(hash(d), 144) D.__hash__ = lambda self: 100 vereq(hash(d), 100) del D.__hash__ vereq(hash(d), 144) del B.__hash__ vereq(hash(d), 314) del C.__hash__ vereq(hash(d), 42) del A.__hash__ vereq(hash(d), id(d)) d.foo = 42 d.bar = 42 vereq(d.foo, 42) vereq(d.bar, 42) def __getattribute__(self, name): if name == "foo": return 24 return object.__getattribute__(self, name) A.__getattribute__ = __getattribute__ vereq(d.foo, 24) vereq(d.bar, 42) def __getattr__(self, name): if name in ("spam", "foo", "bar"): return "hello" raise AttributeError, name B.__getattr__ = __getattr__ vereq(d.spam, "hello") vereq(d.foo, 24) vereq(d.bar, 42) del A.__getattribute__ vereq(d.foo, 42) del d.foo vereq(d.foo, "hello") vereq(d.bar, 42) del B.__getattr__ try: d.foo except AttributeError: pass else: raise TestFailed, "d.foo should be undefined now" # Test a nasty bug in recurse_down_subclasses() import gc class A(object): pass class B(A): pass del B gc.collect() A.__setitem__ = lambda *a: None # crash
171b868195d6f4ffc08a94ff3cf02fde74f6e576 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/171b868195d6f4ffc08a94ff3cf02fde74f6e576/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10177, 5986, 346, 367, 13332, 309, 3988, 30, 1172, 315, 22218, 25686, 434, 4694, 4186, 358, 15320, 7070, 667, 432, 12, 1612, 4672, 1342, 667, 605, 12, 37, 4672, 1342, 667, 385, 12, 37, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10177, 5986, 346, 367, 13332, 309, 3988, 30, 1172, 315, 22218, 25686, 434, 4694, 4186, 358, 15320, 7070, 667, 432, 12, 1612, 4672, 1342, 667, 605, 12, 37, 4672, 1342, 667, 385, 12, 37, ...
exceptions, this sets `sender' to the string that the SMTP refused
exceptions, this sets `sender' to the string that the SMTP refused.
def __init__(self, code, msg): self.smtp_code = code self.smtp_error = msg self.args = (code, msg)
d25c1b73d2c8ab561476de849026aef7bd25808e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d25c1b73d2c8ab561476de849026aef7bd25808e/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 981, 16, 1234, 4672, 365, 18, 20278, 67, 710, 273, 981, 365, 18, 20278, 67, 1636, 273, 1234, 365, 18, 1968, 273, 261, 710, 16, 1234, 13, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 981, 16, 1234, 4672, 365, 18, 20278, 67, 710, 273, 981, 365, 18, 20278, 67, 1636, 273, 1234, 365, 18, 1968, 273, 261, 710, 16, 1234, 13, 2, -100, -100,...
"""Return a tar header block as a 512 byte string. """
"""Return a tar header as a string of 512 byte blocks. """ buf = "" type = self.type prefix = "" if self.name.endswith("/"): type = DIRTYPE name = normpath(self.name) if type == DIRTYPE: name += "/" linkname = self.linkname if linkname: linkname = normpath(linkname) if posix: if self.size > MAXSIZE_MEMBER: raise ValueError("file is too large (>= 8 GB)") if len(self.linkname) > LENGTH_LINK: raise ValueError("linkname is too long (>%d)" % (LENGTH_LINK)) if len(name) > LENGTH_NAME: prefix = name[:LENGTH_PREFIX + 1] while prefix and prefix[-1] != "/": prefix = prefix[:-1] name = name[len(prefix):] prefix = prefix[:-1] if not prefix or len(name) > LENGTH_NAME: raise ValueError("name is too long") else: if len(self.linkname) > LENGTH_LINK: buf += self._create_gnulong(self.linkname, GNUTYPE_LONGLINK) if len(name) > LENGTH_NAME: buf += self._create_gnulong(name, GNUTYPE_LONGNAME)
def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), stn(MAGIC, 6), stn(VERSION, 2), stn(self.uname, 32), stn(self.gname, 32), itn(self.devmajor, 8, posix), itn(self.devminor, 8, posix), stn(self.prefix, 155) ]
2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 4385, 12, 2890, 16, 16366, 33, 8381, 4672, 3536, 990, 279, 8232, 1446, 487, 279, 533, 434, 13908, 1160, 4398, 18, 3536, 1681, 273, 1408, 618, 273, 365, 18, 723, 1633, 273, 1408, 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, 358, 4385, 12, 2890, 16, 16366, 33, 8381, 4672, 3536, 990, 279, 8232, 1446, 487, 279, 533, 434, 13908, 1160, 4398, 18, 3536, 1681, 273, 1408, 618, 273, 365, 18, 723, 1633, 273, 1408, 2...
print "File:", data_file
print "File:", filename resource = open(filename, "r")
def run(config, tim): """ This method is where the data reduction process gets done. @param config: Object containing the data reduction configuration information. @type config: L{hlr_utils.Configure} @param tim: Object that will allow the method to perform timing evaluations. @type tim: C{sns_time.DiffTime} """ import sys import DST if tim is not None: tim.getTime(False) old_time = tim.getOldTime() if config.data is None: raise RuntimeError("Need to pass a data filename to the driver "\ +"script.") dst_type = hlr_utils.file_peeker(config.data[0]) if config.verbose: print "Initial file type:", config.dst_type d_som1 = None counter = 0 for data_file in config.data: if config.verbose: print "File:", data_file try: data_dst = DST.getInstance(dst_type, data_file) except SystemError: print "ERROR: Failed to data read file %s" % data_file sys.exit(-1) if verbose: print "Reading data file %d" % counter if counter == 0: d_som1 = data_dst.getSOM() if tim is not None: tim.getTime(msg="After reading data") else: d_som_t = data_dst.getSOM() if tim is not None: tim.getTime(msg="After reading data") d_som1 = common_lib.add_ncerr(d_som_t, d_som1) if tim is not None: tim.getTime(msg="After adding spectra") del d_som_t if tim is not None: tim.getTime(msg="After SOM deletion") data_dst.release_resource() del data_dst counter += 1 if tim is not None: tim.getTime(msg="After resource release and DST deletion") hlr_utils.write_file(config.output, dst_type, d_som1, verbose=config.verbose, message="combined file") if tim is not None: tim.setOldTime(old_time) tim.getTime(msg="Total Running Time")
00a2f2ab04a3d2c100930f95188f9e40495d16d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/763/00a2f2ab04a3d2c100930f95188f9e40495d16d3/agg_dr_files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 1425, 16, 1658, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 723, 642, 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, 1086, 12, 1425, 16, 1658, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 723, 642, 3...
current_group = allgroups.groups[ pathstat.st_gid ]['name']
current_group = allgroups[pathstat.st_gid]['name']
def check_posix_ugid_and_perms(onpath, uid = -1, gid = -1, perms = -1, batch = False, auto_answer = None, allgroups = None, allusers = None): """Check if some path has some desired perms, repair if told to do so.""" if onpath in ("", None): raise exceptions.BadArgumentError("The path you want to check perms on must not be empty !") if allgroups is None: from licorn.core import groups as allgroups if allusers is None: from licorn.core import users as allusers all_went_ok = True logging.progress("Checking posix uid/gid/perms of %s." % styles.stylize(styles.ST_PATH, onpath)) try: pathstat = os.lstat(onpath) except OSError, e: if e.errno == 2: # causes of this error: # - this is a race condition: the dir/file has been deleted between the minifind() # and the check_*() call. Don't blow out on this. # - when we explicitely want to check a path which does not exist because it has not # been created yet (eg: ~/.dmrc on a brand new user account). return True else: raise e # if one or both of the uid or gid are empty, don't check it, use the # current one present in the file meta-data. if uid == -1: uid = pathstat.st_uid try: desired_login = allusers.users[ uid ]['login'] except KeyError: desired_login = str(uid) else: desired_login = allusers.users[ uid ]['login'] if gid == -1: gid = pathstat.st_gid try: desired_group = allgroups.groups[ gid ]['name'] except KeyError: desired_group = str(gid) else: desired_group = allgroups.groups[ gid ]['name'] if pathstat.st_uid != uid or pathstat.st_gid != gid: try: current_login = allusers.users[ pathstat.st_uid ]['login'] except KeyError: current_login = str(pathstat.st_uid) try: current_group = allgroups.groups[ pathstat.st_gid ]['name'] except KeyError: current_group = str(pathstat.st_gid) warn_message = logging.SWKN_DIR_BAD_OWNERSHIP \ % ( styles.stylize(styles.ST_PATH, onpath), styles.stylize(styles.ST_BAD, current_login), styles.stylize(styles.ST_BAD, current_group), styles.stylize(styles.ST_UGID, desired_login), styles.stylize(styles.ST_UGID, desired_group), ) if batch or logging.ask_for_repair(warn_message, auto_answer): os.chown(onpath, uid, gid) logging.info("Changed owner of %s from %s:%s to %s:%s." % (styles.stylize(styles.ST_PATH, onpath), styles.stylize(styles.ST_UGID, current_login), styles.stylize(styles.ST_UGID, current_group), styles.stylize(styles.ST_UGID, desired_login), styles.stylize(styles.ST_UGID, desired_group))) else: all_went_ok = False if perms == -1: # stop here, we just wanted to check uid/gid return all_went_ok if has_extended_acl(onpath): # if an ACL is present, this could be what is borking the Unix mode. # an ACL is present if it has a mask, else it is just standard posix # perms expressed in the ACL grammar. No mask == Not an ACL. #logging.debug2("pathacl = %s, perms = %s (%s)." % (str(pathacl), perms2str(perms, acl_form = True), str(pathacl).find("mask::"))) warn_message = "An ACL is present on %s, but it should not." % styles.stylize(styles.ST_PATH, onpath) if batch or logging.ask_for_repair(warn_message, auto_answer): posix1e.ACL(text="").applyto(str(onpath)) if pathstat.st_mode & 0170000 == S_IFDIR: posix1e.ACL(text="").applyto(str(onpath), posix1e.ACL_TYPE_DEFAULT) logging.info("Deleted ACL from %s." % styles.stylize(styles.ST_PATH, onpath)) # redo the stat, to get the current posix mode. pathstat = os.lstat(onpath) # enter batch mode: if there was an ACL, the std posix perms will be false in 99% # of the cases, because the ACL has modified the group perms with the mask content. # Thus, don't bother the administrator with another question, just correct the posix perms. # # As perms check is the only thing left to do in this function after the present ACL check, # setting batch to True locally here won't accidentally batch other checks. batch = True else: all_went_ok = False # now that we are sure that there isn't any ACLs on the file/dir, continue checking. mode = pathstat.st_mode & 07777 #logging.debug2("Comparing desired %d and current %d on %s." % (perms, mode, onpath)) if perms != mode: mode_txt = perms2str(mode) perms_txt = perms2str(perms) warn_message = logging.SWKN_INVALID_MODE % (styles.stylize(styles.ST_PATH, onpath), styles.stylize(styles.ST_BAD, mode_txt), styles.stylize(styles.ST_ACL, perms_txt)) if batch or logging.ask_for_repair(warn_message, auto_answer): os.chmod(onpath, perms) logging.info("Applyed perms %s on %s." % (styles.stylize(styles.ST_ACL, perms_txt), styles.stylize(styles.ST_PATH, onpath))) else: all_went_ok = False return all_went_ok
09be11c609797e29cd65819ebd1b1b664074d86b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/09be11c609797e29cd65819ebd1b1b664074d86b/fsapi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 24463, 67, 637, 350, 67, 464, 67, 15969, 12, 265, 803, 16, 4555, 273, 300, 21, 16, 11399, 273, 300, 21, 16, 13793, 273, 300, 21, 16, 2581, 273, 1083, 16, 3656, 67, 13490, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24463, 67, 637, 350, 67, 464, 67, 15969, 12, 265, 803, 16, 4555, 273, 300, 21, 16, 11399, 273, 300, 21, 16, 13793, 273, 300, 21, 16, 2581, 273, 1083, 16, 3656, 67, 13490, ...