rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
opt['label'] = a.pop('configname')
opt['label'] = opt('configName')
def getParam(options=[], doc='', details='', noDialog=False, checkUnprocessedArgs=True, verbose=False, nCol=1): """ get parameter from either - useTk ... - command line argument - configuration file specified by -f file, or - prompt for user input parameter: verbose: whether or not print detailed info checkUnprocessedArgs: check args, avoid misspelling of arg name options: a list of dictionaries with key arg: command line argument, conformable to that of python getopt module. For example, "d:" means -d name longarg: command line argument, --arg. For exmaple "mu=". c.f. getopt. label: config name in a config file default: default value if user hit enter for prompt. Default value can not be none allowedTypes: an array of allowed types. Default to string. if type is not string, input will be evaluated and resulting type will be checked. jump: go to option 'jump' if current option is True. This is useful for -h (goto -1 (end)) or conditional options where you need only part of the options. goto can not go backwards. jumpIfFalse: go to option 'jumpIfFalse' if current option is False. This function will first check command line argument. If the argument is available, use its value. Otherwise check if a config file is specified. If so, get the value from the config file. If both failed, prompt user to input a value. All input will be checked against types, if exists, an array of allowed types. """ # check if --noDialog, -h is present # or there is no 'label' in the options structure # for backward compatibility, change 'configName' to 'label' for opt in options: if opt.has_key('configName'): print 'Warning: configName is obsolete, please use "label" instead' opt['label'] = a.pop('configname') useDefault = '--useDefault' in sys.argv[1:] if noDialog or '--noDialog' in sys.argv[1:] or '-h' in sys.argv[1:] or '--help' in sys.argv[1:] \ or True not in map(lambda x:x.has_key('label'), options): return termGetParam(options, doc, verbose, useDefault) else: if useTkinter: return tkGetParam(options, sys.argv[0], doc, details, checkUnprocessedArgs, nCol) elif useWxPython: return wxGetParam(options, sys.argv[0], doc, details, checkUnprocessedArgs, nCol) else: return termGetParam(options, doc, verbose, useDefault)
b327a73ed75b2161d70629da4d5dfc95b2292e7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/b327a73ed75b2161d70629da4d5dfc95b2292e7f/simuOpt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9027, 12, 2116, 22850, 6487, 997, 2218, 2187, 3189, 2218, 2187, 1158, 6353, 33, 8381, 16, 866, 984, 11005, 2615, 33, 5510, 16, 3988, 33, 8381, 16, 290, 914, 33, 21, 4672, 3536, 336, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9027, 12, 2116, 22850, 6487, 997, 2218, 2187, 3189, 2218, 2187, 1158, 6353, 33, 8381, 16, 866, 984, 11005, 2615, 33, 5510, 16, 3988, 33, 8381, 16, 290, 914, 33, 21, 4672, 3536, 336, 15...
os.rename(i,'modules/'+i)"""
os.rename(i,'modules/'+i)
def DamnLoadConfig(forcemodules=False): Damnlog('Loading config.') DV.preferences=None try: execfile(DV.curdir+'conf'+os.sep+'preferences.damnvid') # Load preferences except: pass # Someone's been messing around with the conf.py file? DV.path_prefs=[] DV.defaultprefs={ } for i in DV.preferences.iterkeys(): if DV.preferences[i].has_key('default'): DV.defaultprefs[i]=DV.preferences[i]['default'] else: DV.defaultprefs[i]=None if DV.preferences[i]['kind']=='dir': DV.path_prefs.append(i) DV.prefs=None # Will be loaded later # Load modules Damnlog('Loading modules.') DV.modules_path=DV.conf_file_directory+'modules'+os.sep if not os.path.lexists(DV.modules_path): os.makedirs(DV.modules_path) DV.modules={} DV.modulesstorage={} DV.generic_title_extract=re.compile('<title>\s*([^<>]+?)\s*</title>',re.IGNORECASE) DV.listicons.resetList({ 'damnvid':DV.images_path+'video.png', 'generic':DV.images_path+'online.png' }) if forcemodules:# or True: # Fixme: DEBUG ONLY Damnlog('forcemodules is on; resetting modules.') shutil.rmtree(DV.modules_path) os.makedirs(DV.modules_path) """if True: # Fixme: DEBUG ONLY; rebuilds all modules for i in os.listdir('./'): if i[-15:]=='.module.damnvid': os.remove(i) for i in os.listdir('./modules/'): if i[-15:]=='.module.damnvid': os.remove('modules/'+i) for i in os.listdir('modules'): if os.path.isdir('modules/'+i) and i.find('svn')==-1: print 'Building module '+i p=os.popen('python build-any/module-package.py modules/'+i) try: p.close() except: pass for i in os.listdir('./'): if i[-15:]=='.module.damnvid': os.rename(i,'modules/'+i)""" for i in os.listdir(DV.curdir+'modules'): if i[-15:]=='.module.damnvid': print 'Installing',i print DamnInstallModule(DV.curdir+'modules'+os.sep+i) for i in os.listdir(DV.modules_path): if os.path.isdir(DV.modules_path+i): DamnLoadModule(DV.modules_path+i) # End load modules
0668135c8e3ea715c0f1b0930afe6c69ea6d8fd4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/0668135c8e3ea715c0f1b0930afe6c69ea6d8fd4/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 301, 82, 2563, 809, 12, 5734, 6400, 33, 8381, 4672, 463, 301, 82, 1330, 2668, 10515, 642, 1093, 13, 463, 58, 18, 23219, 33, 7036, 775, 30, 1196, 768, 12, 30199, 18, 1397, 1214, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 301, 82, 2563, 809, 12, 5734, 6400, 33, 8381, 4672, 463, 301, 82, 1330, 2668, 10515, 642, 1093, 13, 463, 58, 18, 23219, 33, 7036, 775, 30, 1196, 768, 12, 30199, 18, 1397, 1214, ...
return networkx.cliques.cliques_containing_node(self._nxg, nodes, cliques, with_labels)
return networkx.cliques.cliques_containing_node(self._nxg, vertices, cliques, with_labels)
def cliques_containing_node(self, nodes=None, cliques=None, with_labels=False): """ Returns the cliques containing each node, represented as a list of lists. (Returns a single list if only one input node).
139028392b54ae237314b7536b21897e9b1d7ed3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/139028392b54ae237314b7536b21897e9b1d7ed3/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 1213, 3280, 67, 2159, 12, 2890, 16, 2199, 33, 7036, 16, 4942, 29896, 33, 7036, 16, 598, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 4942, 29896, 4191, 1517, 756, 16, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 1213, 3280, 67, 2159, 12, 2890, 16, 2199, 33, 7036, 16, 4942, 29896, 33, 7036, 16, 598, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 4942, 29896, 4191, 1517, 756, 16, 10...
assert len(diter) == 2
raises(TypeError, len, diter)
def test_pickle_dictiter(self): import pickle tdict = {'2':2, '3':3, '5':5} diter = iter(tdict) diter.next() pckl = pickle.dumps(diter) result = pickle.loads(pckl) assert len(diter) == 2 assert list(diter) == list(result)
e734c217e2ba6ef6c7148635e20b55d537bb729a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/e734c217e2ba6ef6c7148635e20b55d537bb729a/test_pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 20847, 67, 1576, 2165, 12, 2890, 4672, 1930, 13379, 268, 1576, 273, 13666, 22, 4278, 22, 16, 296, 23, 4278, 23, 16, 296, 25, 4278, 25, 97, 302, 2165, 225, 273, 1400, 12, 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, 1842, 67, 20847, 67, 1576, 2165, 12, 2890, 4672, 1930, 13379, 268, 1576, 273, 13666, 22, 4278, 22, 16, 296, 23, 4278, 23, 16, 296, 25, 4278, 25, 97, 302, 2165, 225, 273, 1400, 12, 88...
(10,'Late ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('date_deadline','<=',time.strftime('%Y-%m-%d')), ('state','<>','cancel'), ('state','<>','close')]", 8),
(10,'Late ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('date_deadline','<=',time.strftime('%Y-%m-%d')), ('state','<>','cancel'), ('state','<>','done')]", 8),
def menu_create(self, cr, uid, ids, name, menu_parent_id=False, context={}): menus = {} menus[-1] = menu_parent_id for section in self.browse(cr, uid, ids, context): for (index, mname, mdomain, latest) in [ (0,'',"[('section_id','=',"+str(section.id)+")]", -1), (1,'My ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid)]", 0), (2,'My Unclosed ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('state','<>','cancel'), ('state','<>','close')]", 1), (5,'My Open ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('state','=','open')]", 2), (6,'My Pending ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('state','=','pending')]", 2), (7,'My Draft ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('state','=','draft')]", 2),
b5602d7223bf3569d6a97d61570919ee3a0ea59b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/b5602d7223bf3569d6a97d61570919ee3a0ea59b/crm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 3824, 67, 2938, 67, 350, 33, 8381, 16, 819, 12938, 4672, 21374, 273, 2618, 21374, 18919, 21, 65, 273, 3824, 67, 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, 3824, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 3824, 67, 2938, 67, 350, 33, 8381, 16, 819, 12938, 4672, 21374, 273, 2618, 21374, 18919, 21, 65, 273, 3824, 67, 2...
out('<table width="100%" class="details" ' 'bgcolor="
out('<table width="100%" class="metadata-index" ' 'bgcolor="
def write_metadata_index(self, out, indices, field, title): """ Write an HTML page containing a metadata index. """ # Header material. self.write_header(out, title) self.write_navbar(out, 'indices') self.write_breadcrumbs(out, 'indices', '%s-index.html' % field) self.write_index_pointers(out, indices) index = indices[field]
ead96d86090e18fdeec64a06319b925d20efd2b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ead96d86090e18fdeec64a06319b925d20efd2b2/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4165, 67, 1615, 12, 2890, 16, 596, 16, 4295, 16, 652, 16, 2077, 4672, 3536, 2598, 392, 3982, 1363, 4191, 279, 1982, 770, 18, 3536, 468, 4304, 9390, 18, 365, 18, 2626, 67, 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, 1045, 67, 4165, 67, 1615, 12, 2890, 16, 596, 16, 4295, 16, 652, 16, 2077, 4672, 3536, 2598, 392, 3982, 1363, 4191, 279, 1982, 770, 18, 3536, 468, 4304, 9390, 18, 365, 18, 2626, 67, 3...
self.body.append('\n.RS %d' % self._list_char[-2].get_width())
self.indent(self._list_char[-2].get_width()) else: self.indent(self._list_char[-1].get_width())
def get_width(self): return self._style[0]
2e86202953f5508878f482543956d988e25d6f8f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1278/2e86202953f5508878f482543956d988e25d6f8f/manpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2819, 12, 2890, 4672, 327, 365, 6315, 4060, 63, 20, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2819, 12, 2890, 4672, 327, 365, 6315, 4060, 63, 20, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self._invitation.send_response(488, extra_headers=[WarningHeader(399, engine.user_agent, 'Failed to update media stream index %d' % stream.index)]) self.state = 'connected'
self._invitation.send_response(488, extra_headers=[WarningHeader(399, engine.user_agent, 'Both removing AND adding a media stream is currently not supported')])
def _NH_SIPInvitationChangedState(self, notification): notification_center = NotificationCenter() if self.greenlet is not None and self.greenlet is not api.getcurrent(): if notification.data.state == 'disconnected' and notification.data.prev_state != 'disconnecting': self._channel.send_exception(InvitationDidFailError(notification.sender, notification.data)) else: self._channel.send(notification) else: if notification.data.state == 'connected' and notification.data.sub_state == 'received_proposal': self.state = 'received_proposal' try: proposed_remote_sdp = self._invitation.sdp.proposed_remote active_remote_sdp = self._invitation.sdp.active_remote for stream in self.streams: if not stream.validate_update(proposed_remote_sdp, stream.index): engine = Engine() self._invitation.send_response(488, extra_headers=[WarningHeader(399, engine.user_agent, 'Failed to update media stream index %d' % stream.index)]) self.state = 'connected' notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=488, reason=sip_status_messages[488], ack_received='unknown')) return # These tests are here because some ALGs mess up the SDP and the behaviour # of pjsip in these situations is unexpected (eg. loss of audio). -Luci for attr in ('user', 'net_type', 'address_type', 'address'): if getattr(proposed_remote_sdp, attr) != getattr(active_remote_sdp, attr): engine = Engine() self._invitation.send_response(488, extra_headers=[WarningHeader(399, engine.user_agent, 'Difference in contents of o= line')]) self.state = 'connected' notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=488, reason=sip_status_messages[488], ack_received='unknown')) return added_media_indexes = set() removed_media_indexes = set() for index, media_stream in enumerate(proposed_remote_sdp.media): if index >= len(active_remote_sdp.media): added_media_indexes.add(index) elif media_stream.media != active_remote_sdp.media[index].media: added_media_indexes.add(index) removed_media_indexes.add(index) elif not media_stream.port and active_remote_sdp.media[index].port: removed_media_indexes.add(index) removed_media_indexes.update(xrange(len(proposed_remote_sdp.media), len(active_remote_sdp.media))) if added_media_indexes and removed_media_indexes: engine = Engine() self._invitation.send_response(488, extra_headers=[WarningHeader(399, engine.user_agent, 'Both removing AND adding a media stream is currently not supported')]) notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=488, reason=sip_status_messages[488], ack_received='unknown')) elif added_media_indexes: self.proposed_streams = [] for index in added_media_indexes: media_stream = proposed_remote_sdp.media[index] if media_stream.port != 0: for stream_type in MediaStreamRegistry(): try: stream = stream_type.new_from_sdp(self.account, proposed_remote_sdp, index) except InvalidStreamError: break except UnknownStreamError: continue else: stream.index = index self.proposed_streams.append(stream) break if self.proposed_streams: self._invitation.send_response(100) notification_center.post_notification('SIPSessionGotProposal', sender=self, data=TimestampedNotificationData(originator='remote', streams=self.proposed_streams)) return else: self._invitation.send_response(488) notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=488, reason=sip_status_messages[488], ack_received='unknown')) else: local_sdp = SDPSession.new(self._invitation.sdp.active_local) local_sdp.version += 1 removed_streams = [stream for stream in self.streams if stream.index in removed_media_indexes] prev_on_hold_streams = set(stream for stream in self.streams if stream.hold_supported and stream.on_hold_by_remote) for stream in removed_streams: notification_center.remove_observer(self, sender=stream) stream.deactivate() self.streams.remove(stream) local_sdp.media[stream.index].port = 0 for stream in self.streams: local_sdp.media[stream.index] = stream.get_local_media(for_offer=False) self._invitation.send_response(200, sdp=local_sdp) for stream in removed_streams: stream.end() notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=200, reason=sip_status_messages[200], ack_received='unknown'))
849b83b8269b2356a6cabd3ba71c0c5cacb998d3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/849b83b8269b2356a6cabd3ba71c0c5cacb998d3/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 50, 44, 67, 17739, 19896, 5033, 1119, 12, 2890, 16, 3851, 4672, 3851, 67, 5693, 273, 8050, 8449, 1435, 309, 365, 18, 11571, 1810, 353, 486, 599, 471, 365, 18, 11571, 1810, 353, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 50, 44, 67, 17739, 19896, 5033, 1119, 12, 2890, 16, 3851, 4672, 3851, 67, 5693, 273, 8050, 8449, 1435, 309, 365, 18, 11571, 1810, 353, 486, 599, 471, 365, 18, 11571, 1810, 353, 48...
return "Torsion quotient of %s by %s" % (self.V(), self.W())
return "Quotient with torsion of %s by %s" % (self.V(), self.W())
def _repr_(self): r""" Return a string representation of ``self``.
4fdaf981b4663ca977be3beaca7fd701133d42d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4fdaf981b4663ca977be3beaca7fd701133d42d6/toric_lattice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 436, 8395, 2000, 279, 533, 4335, 434, 12176, 2890, 68, 8338, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 436, 8395, 2000, 279, 533, 4335, 434, 12176, 2890, 68, 8338, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
levels.add("%d,%d,%d" % (d.enqi("leveltype"), d.enqi("l1"), d.enqi("l2")))
levels.add("%d,%d,%d,%d" % (d.enqi("leveltype1"), d.enqi("l1"), d.enqi("leveltype2"), d.enqi("l2")))
def computeColumns(self, filter): title = "" cols = []
b132c61e355822782a43d99328e4ec88a6e94d70 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2863/b132c61e355822782a43d99328e4ec88a6e94d70/dbacsv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 3380, 12, 2890, 16, 1034, 4672, 2077, 273, 1408, 5347, 273, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 3380, 12, 2890, 16, 1034, 4672, 2077, 273, 1408, 5347, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 79) else quickfix.StringField.__init__(self, 79, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 26517, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 972, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 26517, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 972, ...
'name': 'Run ' + target_name, 'productName': xcode_target.GetProperty('productName'),
'name': 'Run ' + target_name, 'productName': xcode_target.GetProperty('productName'), 'buildConfigurationList': xccl,
def Finalize1(self, xcode_targets, serialize_all_tests): # Collect a list of all of the build configuration names used by the # various targets in the file. It is very heavily advised to keep each # target in an entire project (even across multiple project files) using # the same set of configuration names. configurations = [] for xct in self.project.GetProperty('targets'): xccl = xct.GetProperty('buildConfigurationList') xcbcs = xccl.GetProperty('buildConfigurations') for xcbc in xcbcs: name = xcbc.GetProperty('name') if name not in configurations: configurations.append(name)
9b6358ccfb062c60eee046cd65f1d7fbd396ffcc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/9b6358ccfb062c60eee046cd65f1d7fbd396ffcc/xcode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30740, 21, 12, 2890, 16, 619, 710, 67, 11358, 16, 4472, 67, 454, 67, 16341, 4672, 468, 9302, 279, 666, 434, 777, 434, 326, 1361, 1664, 1257, 1399, 635, 326, 468, 11191, 5774, 316, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30740, 21, 12, 2890, 16, 619, 710, 67, 11358, 16, 4472, 67, 454, 67, 16341, 4672, 468, 9302, 279, 666, 434, 777, 434, 326, 1361, 1664, 1257, 1399, 635, 326, 468, 11191, 5774, 316, 326,...
graph_setup = "from graph.base import Graph; g = Graph(('name',), ('name',)); n = g.add_node(name='');"
graph_setup = "from graph.base import Graph; g = Graph(('name',), ('name',)); n = g.add_node(name='');"
def testBreadthFirstTraversal(self): # setup g = graph.Graph(("name"), tuple()) nodes = {} edges = [] nodes["A"] = g.add_node(name="A") nodes["B"] = g.add_node(name="B") nodes["C"] = g.add_node(name="C") nodes["D"] = g.add_node(name="D") nodes["E"] = g.add_node(name="E") nodes["F"] = g.add_node(name="F") nodes["G"] = g.add_node(name="G") edges += [g.add_edge(nodes["A"], nodes["B"])] edges += [g.add_edge(nodes["B"], nodes["D"])] edges += [g.add_edge(nodes["B"], nodes["F"])] edges += [g.add_edge(nodes["F"], nodes["E"])] edges += [g.add_edge(nodes["A"], nodes["C"])] edges += [g.add_edge(nodes["C"], nodes["G"])] edges += [g.add_edge(nodes["A"], nodes["E"])]
260d326aa7d55c3d410409ae502195ee983c4a21 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3401/260d326aa7d55c3d410409ae502195ee983c4a21/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 38, 25254, 3759, 25087, 12, 2890, 4672, 468, 3875, 314, 273, 2667, 18, 4137, 12, 2932, 529, 6, 3631, 3193, 10756, 2199, 273, 2618, 5231, 273, 5378, 2199, 9614, 37, 11929, 273, 314,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 38, 25254, 3759, 25087, 12, 2890, 4672, 468, 3875, 314, 273, 2667, 18, 4137, 12, 2932, 529, 6, 3631, 3193, 10756, 2199, 273, 2618, 5231, 273, 5378, 2199, 9614, 37, 11929, 273, 314,...
self.assertTrue(isinstance(x, int) or isinstance(x, long))
self.assertTrue(isinstance(x, int) or isinstance(x, int))
def test_cached_mem(self): x = psutil.cached_mem() self.assertTrue(isinstance(x, int) or isinstance(x, long)) self.assertTrue(x >= 0)
7c397a9e03927d8b5085e42fb287dbdde6e056f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7296/7c397a9e03927d8b5085e42fb287dbdde6e056f2/test_psutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7097, 67, 3917, 12, 2890, 4672, 619, 273, 27024, 18, 7097, 67, 3917, 1435, 365, 18, 11231, 5510, 12, 291, 1336, 12, 92, 16, 509, 13, 578, 1549, 12, 92, 16, 509, 3719, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7097, 67, 3917, 12, 2890, 4672, 619, 273, 27024, 18, 7097, 67, 3917, 1435, 365, 18, 11231, 5510, 12, 291, 1336, 12, 92, 16, 509, 13, 578, 1549, 12, 92, 16, 509, 3719, 365, ...
- ``s`` (vertex) -- forces the source of the path. Set to ``None`` by default. - ``t`` (vertex) -- forces the destination of the path. Set to ``None`` by default. - ``weighted`` (boolean) -- whether the labels on the edges are to be considered as weights (a label set to ``None`` or ``{}`` being considered as a weight of `1`). Set to ``False`` by default. - ``algorithm`` -- one of ``"MILP"`` (default) or ``"backtrack"``. Two remarks on this respect: * While the MILP formulation returns an exact answer, the backtrack algorithm is a randomized heuristic. * As the backtrack algorithm does not support edge weighting, setting ``weighted=True`` will force the use of the MILP algorithm.
- ``s`` (vertex) -- forces the source of the path (the method then returns the longest path starting at ``s``). The argument is set to ``None`` by default, which means that no constraint is set upon the first vertex in the path. - ``t`` (vertex) -- forces the destination of the path (the method then returns the longest path ending at ``t``). The argument is set to ``None`` by default, which means that no constraint is set upon the last vertex in the path. - ``weighted`` (boolean) -- whether the labels on the edges are to be considered as weights (a label set to ``None`` or ``{}`` being considered as a weight of `1`). Set to ``False`` by default. - ``algorithm`` -- one of ``"MILP"`` (default) or ``"backtrack"``. Two remarks on this respect: * While the MILP formulation returns an exact answer, the backtrack algorithm is a randomized heuristic. * As the backtrack algorithm does not support edge weighting, setting ``weighted=True`` will force the use of the MILP algorithm.
def longest_path(self, s=None, t=None, weighted=False, algorithm="MILP", solver=None, verbose=0): r""" Returns a longest path of ``self``.
34c1e50f6f1e024964d30bd503da4e0a040658da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/34c1e50f6f1e024964d30bd503da4e0a040658da/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 33, 7036, 16, 268, 33, 7036, 16, 13747, 33, 8381, 16, 4886, 1546, 49, 2627, 52, 3113, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 33, 7036, 16, 268, 33, 7036, 16, 13747, 33, 8381, 16, 4886, 1546, 49, 2627, 52, 3113, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 279...
This example involves a `p`-adic number. ::
This example involves a `p`-adic number::
def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `degree`. You can specify the number of known bits or digits with ``known_bits=k`` or ``known_digits=k``; Pari is then told to compute the result using `0.8k` of these bits/digits. (The Pari documentation recommends using a factor between .6 and .9, but internally defaults to .8.) Or, you can specify the precision to use directly with ``use_bits=k`` or ``use_digits=k``. If none of these are specified, then the precision is taken from the input value. A height bound may specified to indicate the maximum coefficient size of the returned polynomial; if a sufficiently small polyomial is not found then ``None`` wil be returned. If ``proof=True`` then the result is returned only if it can be proved correct (i.e. the only possible minimal polynomial satisfying the height bound, or no such polynomial exists). Otherwise a ``ValueError`` is raised indicating that higher precision is required. ALGORITHM: Uses LLL for real/complex inputs, PARI C-library algdep command otherwise. Note that ``algebraic_dependency`` is a synonym for ``algdep``. INPUT: - ``z`` - real, complex, or `p`-adic number - ``degree`` - an integer - ``height_bound`` - an integer (default ``None``) specifying the maximum coefficient size for the returned polynomial - ``proof`` - a boolean (default ``False``), requres height_bound to be set EXAMPLES:: sage: algdep(1.888888888888888, 1) 9*x - 17 sage: algdep(0.12121212121212,1) 33*x - 4 sage: algdep(sqrt(2),2) x^2 - 2 This example involves a complex number. :: sage: z = (1/2)*(1 + RDF(sqrt(3)) *CC.0); z 0.500000000000000 + 0.866025403784439*I sage: p = algdep(z, 6); p x^3 + 1 sage: p.factor() (x + 1) * (x^2 - x + 1) sage: z^2 - z + 1 0 This example involves a `p`-adic number. :: sage: K = Qp(3, print_mode = 'series') sage: a = K(7/19); a 1 + 2*3 + 3^2 + 3^3 + 2*3^4 + 2*3^5 + 3^8 + 2*3^9 + 3^11 + 3^12 + 2*3^15 + 2*3^16 + 3^17 + 2*3^19 + O(3^20) sage: algdep(a, 1) 19*x - 7 These examples show the importance of proper precision control. We compute a 200-bit approximation to sqrt(2) which is wrong in the 33'rd bit. :: sage: z = sqrt(RealField(200)(2)) + (1/2)^33 sage: p = algdep(z, 4); p 227004321085*x^4 - 216947902586*x^3 - 99411220986*x^2 + 82234881648*x - 211871195088 sage: factor(p) 227004321085*x^4 - 216947902586*x^3 - 99411220986*x^2 + 82234881648*x - 211871195088 sage: algdep(z, 4, known_bits=32) x^2 - 2 sage: algdep(z, 4, known_digits=10) x^2 - 2 sage: algdep(z, 4, use_bits=25) x^2 - 2 sage: algdep(z, 4, use_digits=8) x^2 - 2 Using the ``height_bound`` and ``proof`` parameters, we can see that `pi` is not the root of an integer polynomial of degree at most 5 and coefficients bounded above by 10. :: sage: algdep(pi.n(), 5, height_bound=10, proof=True) is None True For stronger results, we need more precicion. :: sage: algdep(pi.n(), 5, height_bound=100, proof=True) is None Traceback (most recent call last): ... ValueError: insufficient precision for non-existence proof sage: algdep(pi.n(200), 5, height_bound=100, proof=True) is None True sage: algdep(pi.n(), 10, height_bound=10, proof=True) is None Traceback (most recent call last): ... ValueError: insufficient precision for non-existence proof sage: algdep(pi.n(200), 10, height_bound=10, proof=True) is None True We can also use ``proof=True`` to get positive results. :: sage: a = sqrt(2) + sqrt(3) + sqrt(5) sage: algdep(a.n(), 8, height_bound=1000, proof=True) Traceback (most recent call last): ... ValueError: insufficient precision for uniqueness proof sage: f = algdep(a.n(1000), 8, height_bound=1000, proof=True); f x^8 - 40*x^6 + 352*x^4 - 960*x^2 + 576 sage: f(a).expand() 0 """ if proof and not height_bound: raise ValueError, "height_bound must be given for proof=True" x = ZZ['x'].gen() if isinstance(z, (int, long, integer.Integer)): if height_bound and abs(z) >= height_bound: return None return x - ZZ(z) degree = ZZ(degree) if isinstance(z, (sage.rings.rational.Rational)): if height_bound and max(abs(z.denominator()), abs(z.numerator())) >= height_bound: return None return z.denominator()*x - z.numerator() if isinstance(z, float): z = sage.rings.real_mpfr.RR(z) elif isinstance(z, complex): z = sage.rings.complex_field.CC(z) if isinstance(z, (sage.rings.real_mpfr.RealNumber, sage.rings.complex_number.ComplexNumber)): log2_10 = 3.32192809488736 prec = z.prec() - 6 if known_digits is not None: known_bits = known_digits * log2_10 if known_bits is not None: use_bits = known_bits * 0.8 if use_digits is not None: use_bits = use_digits * log2_10 if use_bits is not None: prec = int(use_bits) is_complex = isinstance(z, sage.rings.complex_number.ComplexNumber) n = degree+1 from sage.matrix.all import matrix M = matrix(ZZ, n, n+1+int(is_complex)) r = ZZ(1) << prec M[0, 0] = 1 M[0,-1] = r for k in range(1, degree+1): M[k,k] = 1 r *= z if is_complex: M[k, -1] = r.real().round() M[k, -2] = r.imag().round() else: M[k, -1] = r.round() LLL = M.LLL(delta=.75) coeffs = LLL[0][:n] if height_bound: def norm(v): # norm on an integer vector invokes Integer.sqrt() which tries to factor... from sage.rings.real_mpfi import RIF return v.change_ring(RIF).norm() if max(abs(a) for a in coeffs) > height_bound: if proof: # Given an LLL reduced basis $b_1, ..., b_n$, we only # know that $|b_1| <= 2^((n-1)/2) |x|$ for non-zero $x \in L$. if norm(LLL[0]) <= 2**((n-1)/2) * n.sqrt() * height_bound: raise ValueError, "insufficient precision for non-existence proof" return None elif proof and norm(LLL[1]) < 2**((n-1)/2) * max(norm(LLL[0]), n.sqrt()*height_bound): raise ValueError, "insufficient precision for uniqueness proof" if coeffs[degree] < 0: coeffs = -coeffs f = list(coeffs) elif proof or height_bound: raise NotImplementedError, "proof and height bound only implemented for real and complex numbers" else: y = pari(z) f = y.algdep(degree) return x.parent()(f)
1781c06057bdd8d7b3629113a96c3ff5c8d544d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1781c06057bdd8d7b3629113a96c3ff5c8d544d0/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11989, 15037, 12, 94, 16, 10782, 16, 4846, 67, 6789, 33, 7036, 16, 999, 67, 6789, 33, 7036, 16, 4846, 67, 16649, 33, 7036, 16, 999, 67, 16649, 33, 7036, 16, 2072, 67, 3653, 33, 7036,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11989, 15037, 12, 94, 16, 10782, 16, 4846, 67, 6789, 33, 7036, 16, 999, 67, 6789, 33, 7036, 16, 4846, 67, 16649, 33, 7036, 16, 999, 67, 16649, 33, 7036, 16, 2072, 67, 3653, 33, 7036,...
return False
return False
def getAutoPublish( self ): value = self.extractOptionFromCFG( "%s/AutoPublish" % self.configurationPath, self.localCFG ) if value and value.lower() in ( "no", "false", "n" ): return False else: return True
34431f3ac0c002e7480152ebbb9d137bf628389d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/34431f3ac0c002e7480152ebbb9d137bf628389d/ConfigurationData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26707, 6024, 12, 365, 262, 30, 460, 273, 365, 18, 8004, 1895, 1265, 19727, 12, 2213, 87, 19, 4965, 6024, 6, 738, 365, 18, 7025, 743, 16, 365, 18, 3729, 19727, 262, 309, 460, 471, 460...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26707, 6024, 12, 365, 262, 30, 460, 273, 365, 18, 8004, 1895, 1265, 19727, 12, 2213, 87, 19, 4965, 6024, 6, 738, 365, 18, 7025, 743, 16, 365, 18, 3729, 19727, 262, 309, 460, 471, 460...
control.SetValue(text)
control.SetValue(u'%s %s' % (addrString, indicatorString))
def SetStaticControl(self, control, text): # update the static text control with a representation of 'text' control.SetValue(text)
f3d20a7fee11911c22e533f8d71feebe9a12e2c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/f3d20a7fee11911c22e533f8d71feebe9a12e2c0/AttributeEditors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 5788, 3367, 12, 2890, 16, 3325, 16, 977, 4672, 468, 1089, 326, 760, 977, 3325, 598, 279, 4335, 434, 296, 955, 11, 3325, 18, 694, 620, 12, 955, 13, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1000, 5788, 3367, 12, 2890, 16, 3325, 16, 977, 4672, 468, 1089, 326, 760, 977, 3325, 598, 279, 4335, 434, 296, 955, 11, 3325, 18, 694, 620, 12, 955, 13, 2, -100, -100, -100, -100, -1...
(old_line_number, new_line_number, line_string) If old_line_number is zero, it means this line is newly added.
(deleted_line_number, new_line_number, line_string) If deleted_line_number is zero, it means this line is newly added.
def get_diff_converter(first_diff_line): """Gets a converter function of diff lines. Args: first_diff_line: The first filename line of a diff file. If this line is git formatted, we'll return a converter from git to SVN. """ if match(r"^diff --git a/", first_diff_line): return git_diff_to_svn_diff return lambda input: input
e10deb8df23c63f7dd672443f35b7af118445344 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/e10deb8df23c63f7dd672443f35b7af118445344/diff_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5413, 67, 15747, 12, 3645, 67, 5413, 67, 1369, 4672, 3536, 3002, 279, 6027, 445, 434, 3122, 2362, 18, 225, 6634, 30, 1122, 67, 5413, 67, 1369, 30, 1021, 1122, 1544, 980, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5413, 67, 15747, 12, 3645, 67, 5413, 67, 1369, 4672, 3536, 3002, 279, 6027, 445, 434, 3122, 2362, 18, 225, 6634, 30, 1122, 67, 5413, 67, 1369, 30, 1021, 1122, 1544, 980, 434, ...
progress.setFull(len(self.srcFiles))
progress.setFull(1+len(self.srcFiles))
def initData(self,progress): """Get names from source files.""" if not self.isActive: return fullNames = FullNames(aliases=self.patchFile.aliases) progress.setFull(len(self.srcFiles)) for srcFile in self.srcFiles: srcPath = GPath(srcFile) patchesDir = dirs['patches'].list() if reModExt.search(srcFile.s): if srcPath not in modInfos: continue srcInfo = modInfos[GPath(srcFile)] fullNames.readFromMod(srcInfo) else: if srcPath not in patchesDir: continue fullNames.readFromText(dirs['patches'].join(srcFile)) progress.plus() #--Finish id_full = self.id_full knownTypes = set(MreRecord.type_class.keys()) for type,id_name in fullNames.type_id_name.iteritems(): if type not in knownTypes: self.skipTypes.append(type) continue self.activeTypes.append(type) for longid,(eid,name) in id_name.iteritems(): if name != 'NO NAME': id_full[longid] = name self.isActive = bool(self.activeTypes)
1ff0958e86fd2e39ae9dca6669fae76aa5f3ddab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/1ff0958e86fd2e39ae9dca6669fae76aa5f3ddab/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 751, 12, 2890, 16, 8298, 4672, 3536, 967, 1257, 628, 1084, 1390, 12123, 309, 486, 365, 18, 291, 3896, 30, 327, 1983, 1557, 273, 11692, 1557, 12, 13831, 33, 2890, 18, 2272, 812, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 751, 12, 2890, 16, 8298, 4672, 3536, 967, 1257, 628, 1084, 1390, 12123, 309, 486, 365, 18, 291, 3896, 30, 327, 1983, 1557, 273, 11692, 1557, 12, 13831, 33, 2890, 18, 2272, 812, 1...
and (self.LAST_TRANSCODING == self.TRANSCODING)):
and (self.LAST_TRANSCODING == self.TRANSCODING) and (self.LAST_COUNTINGDOWN == self.COUNTINGDOWN)):
def updateVideoComponents( self ): if ( (self.LAST_MODE == self.ca.m.MODE) and (self.LAST_FULLSCREEN == self.FULLSCREEN) and (self.LAST_LIVE == self.LIVEMODE) and (self.LAST_RECD_INFO == self.RECD_INFO_ON) and (self.LAST_TRANSCODING == self.TRANSCODING)): return
a2ca8daca04eab073f1d77b9c429e2a44ce76e17 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6451/a2ca8daca04eab073f1d77b9c429e2a44ce76e17/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 10083, 7171, 12, 365, 262, 30, 309, 261, 202, 12, 2890, 18, 14378, 67, 7038, 422, 365, 18, 5353, 18, 81, 18, 7038, 13, 471, 261, 2890, 18, 14378, 67, 18111, 27908, 422, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 10083, 7171, 12, 365, 262, 30, 309, 261, 202, 12, 2890, 18, 14378, 67, 7038, 422, 365, 18, 5353, 18, 81, 18, 7038, 13, 471, 261, 2890, 18, 14378, 67, 18111, 27908, 422, 365, 18...
self.do_update_drop_point_highlighting_in_next_viewportPaintEvent = True
self.last_dragMove_ok = False self.last_dragMove_cpos = None self.drop_disabled_because = "drop disabled by autoscroll, until mouse moves" self.update_drop_point_highlighting()
def slot_contentsMoving(self, x, y): """[Called by the Qt signal whose doc says: "This signal is emitted just before the contents are moved to position (x, y)." But this wording is misleading -- it's actually the position of the topleft visible part of the contents (in contents coords), as determined by the scrollbars. """
8e76c375339a6ae063e685fcb0b4bee3c03d78cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/8e76c375339a6ae063e685fcb0b4bee3c03d78cd/TreeWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4694, 67, 3980, 49, 13767, 12, 2890, 16, 619, 16, 677, 4672, 3536, 63, 8185, 635, 326, 7354, 4277, 8272, 997, 20185, 30, 315, 2503, 4277, 353, 17826, 2537, 1865, 326, 2939, 854, 10456, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4694, 67, 3980, 49, 13767, 12, 2890, 16, 619, 16, 677, 4672, 3536, 63, 8185, 635, 326, 7354, 4277, 8272, 997, 20185, 30, 315, 2503, 4277, 353, 17826, 2537, 1865, 326, 2939, 854, 10456, ...
"""creates a dtp listening on self.dtpFactory.dtpPort for connections""" if self.debug: log.msg('_createPassiveDTP')
"""sets up a DTPFactory listening on an ephemeral port port is stored in self.dtpPort @returns a deferred that will be fired when a connection is made """ log.debug('_createPassiveDTP')
def _createPassiveDTP(self): """creates a dtp listening on self.dtpFactory.dtpPort for connections""" if self.debug: log.msg('_createPassiveDTP') # TODO: figure out what happens if there's an existing ACTV # DTP connection and the client calls PASV self.dtpTxfrMode = PASV # ensure state is correct if not self.dtpFactory: self.dtpFactory = PasvDTPFactory() self.dtpFactory.pi = self self.dtpFactory.peerHost = self.transport.getPeer()[1] if not self.HUMAN_READABLE_PASV_PORT: port = 0 else: port = 2122 self.dtpFactory.dtpPort = reactor.listenTCP(port, self.dtpFactory)
cdcaf038ab7a8d9d6eba20fa49c93c98c9d905a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/cdcaf038ab7a8d9d6eba20fa49c93c98c9d905a0/jdftp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 6433, 688, 9081, 52, 12, 2890, 4672, 3536, 4424, 731, 279, 10696, 52, 1733, 13895, 603, 392, 23468, 1756, 1756, 353, 4041, 316, 365, 18, 72, 6834, 2617, 632, 6154, 279, 7045, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 6433, 688, 9081, 52, 12, 2890, 4672, 3536, 4424, 731, 279, 10696, 52, 1733, 13895, 603, 392, 23468, 1756, 1756, 353, 4041, 316, 365, 18, 72, 6834, 2617, 632, 6154, 279, 7045, ...
def command(text=root, eventname=eventname): text.event_generate(eventname) menu.add_command(label=label, underline=underline,
def command(text=root, eventname=eventname): text.event_generate(eventname) menu.add_command(label=label, underline=underline,
def command(text=root, eventname=eventname): text.event_generate(eventname)
47f29a67e5e909f38db69f598b8dd345ad56934e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/47f29a67e5e909f38db69f598b8dd345ad56934e/macosxSupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 12, 955, 33, 3085, 16, 871, 529, 33, 2575, 529, 4672, 977, 18, 2575, 67, 7163, 12, 2575, 529, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 12, 955, 33, 3085, 16, 871, 529, 33, 2575, 529, 4672, 977, 18, 2575, 67, 7163, 12, 2575, 529, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
yumconf[repo] = { } yumconf[repo]["baseurl"] = [ self.url ]
self.yumconf[repo] = { } self.yumconf[repo]["baseurl"] = [ self.url ]
def load(self, ks, dir, beta_key_verify=False): self.dir = dir self.exclude = None
c232d221a79504a21976cd8b4b3de89be76368aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/c232d221a79504a21976cd8b4b3de89be76368aa/installer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 11654, 16, 1577, 16, 6796, 67, 856, 67, 8705, 33, 8381, 4672, 365, 18, 1214, 273, 1577, 365, 18, 10157, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 11654, 16, 1577, 16, 6796, 67, 856, 67, 8705, 33, 8381, 4672, 365, 18, 1214, 273, 1577, 365, 18, 10157, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
something like in Biopython). Otherwise something like this
something alike in Biopython). Otherwise something like this
def remoteBlast( self, seqFile, db, method, e=0.01, **kw ): """ Perform a remote BLAST search using the QBLAST server at NCBI. Uses Bio.Blast.NCBIWWW.qblast (Biopython) for the search
ab08153b9fd29a1fc64bf13de89c4b1c50385cfd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/482/ab08153b9fd29a1fc64bf13de89c4b1c50385cfd/SequenceSearcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2632, 38, 2722, 12, 365, 16, 3833, 812, 16, 1319, 16, 707, 16, 425, 33, 20, 18, 1611, 16, 2826, 9987, 262, 30, 3536, 11217, 279, 2632, 605, 14378, 1623, 1450, 326, 2238, 38, 14378, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2632, 38, 2722, 12, 365, 16, 3833, 812, 16, 1319, 16, 707, 16, 425, 33, 20, 18, 1611, 16, 2826, 9987, 262, 30, 3536, 11217, 279, 2632, 605, 14378, 1623, 1450, 326, 2238, 38, 14378, 1...
import threading
import pywin.mfc.thread
def SaveModified(self): # Called as the document is closed. If we are about # to prompt for a save, bring the document to the foreground. if self.IsModified(): frame = self.GetFirstView().GetParentFrame() try: frame.MDIActivate() frame.AutoRestore() except: print "Could not bring document to foreground" return self._obj_.SaveModified()
fa6cea9953bd692f4d83b7fb00bab8aabdb503fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/fa6cea9953bd692f4d83b7fb00bab8aabdb503fa/document.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7074, 4575, 12, 2890, 4672, 468, 11782, 487, 326, 1668, 353, 4375, 18, 225, 971, 732, 854, 2973, 468, 358, 6866, 364, 279, 1923, 16, 5186, 310, 326, 1668, 358, 326, 16231, 18, 309, 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, 7074, 4575, 12, 2890, 4672, 468, 11782, 487, 326, 1668, 353, 4375, 18, 225, 971, 732, 854, 2973, 468, 358, 6866, 364, 279, 1923, 16, 5186, 310, 326, 1668, 358, 326, 16231, 18, 309, 365...
path_vec = ['command_spec', 'config_data', 'config_spec']
path_vec = ['config_data', 'module_spec']
def test_do_GET_3(self): self.handler.headers['cookie'] = 12346 self.handler.server.user_sessions[12346] = time.time() + 1000000 path_vec = ['command_spec', 'config_data', 'config_spec'] for path in path_vec: self.handler.path = '/' + path self.handler.do_GET() self.assertEqual(self.handler.rcode, http.client.OK)
c150ac07d5e296001b156fc4ef2abca5541615b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6792/c150ac07d5e296001b156fc4ef2abca5541615b5/cmdctl_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2896, 67, 3264, 67, 23, 12, 2890, 4672, 365, 18, 4176, 18, 2485, 3292, 8417, 3546, 273, 30011, 26, 365, 18, 4176, 18, 3567, 18, 1355, 67, 16794, 63, 28462, 26, 65, 273, 813...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 67, 3264, 67, 23, 12, 2890, 4672, 365, 18, 4176, 18, 2485, 3292, 8417, 3546, 273, 30011, 26, 365, 18, 4176, 18, 3567, 18, 1355, 67, 16794, 63, 28462, 26, 65, 273, 813...
if s.__fileSystem.checked: s._checked = True
if self.__fileSystem.checked: self._checked = True
def __init__(self, type=None, geometry=None, checked=False, PedFileSystem=None): if checked: c = 1 else: c = 0
c9dad9756d600de8d9c8e744af7e8484bcb46853 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5978/c9dad9756d600de8d9c8e744af7e8484bcb46853/filesystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 33, 7036, 16, 5316, 33, 7036, 16, 5950, 33, 8381, 16, 453, 329, 11785, 33, 7036, 4672, 309, 5950, 30, 276, 273, 404, 469, 30, 276, 273, 374, 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, 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, 618, 33, 7036, 16, 5316, 33, 7036, 16, 5950, 33, 8381, 16, 453, 329, 11785, 33, 7036, 4672, 309, 5950, 30, 276, 273, 404, 469, 30, 276, 273, 374, 2, ...
field = self.getField('text') if hasattr(self, '_v_renamed'): mimetype = field.getContentType(self) del self._v_renamed else: mimetype = self.guessMimetypeOfText()
def manage_afterAdd(self, item, container): """ Fix text when created througt webdav Guess the right mimetype from the id/data """ ATCTContent.manage_afterAdd(self, item, container)
14f469fbedfb1182a69995215b4418bcefc2bfa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/14f469fbedfb1182a69995215b4418bcefc2bfa6/ATDocument.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 5205, 986, 12, 2890, 16, 761, 16, 1478, 4672, 3536, 12139, 977, 1347, 2522, 286, 303, 637, 88, 3311, 20752, 30282, 326, 2145, 12595, 628, 326, 612, 19, 892, 3536, 14464, 1268,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 5205, 986, 12, 2890, 16, 761, 16, 1478, 4672, 3536, 12139, 977, 1347, 2522, 286, 303, 637, 88, 3311, 20752, 30282, 326, 2145, 12595, 628, 326, 612, 19, 892, 3536, 14464, 1268,...
version = '0.2'
version = '0.3'
def _editcomponent(self,data): edit_required_fields = ('initialowner','product','component') for field in edit_required_fields: if field not in data or not data[field]: raise TypeError, "mandatory field missing: %s" % field if type(data['product']) == int: data['product'] = self._product_id_to_name(data['product']) r = self._proxy.bugzilla.editComponent(data,self.user,self.password) return r
1cda6711629eae527d2888f92bbe65c6d6a80fe9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5050/1cda6711629eae527d2888f92bbe65c6d6a80fe9/rhbugzilla.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4619, 4652, 12, 2890, 16, 892, 4672, 3874, 67, 4718, 67, 2821, 273, 7707, 6769, 8443, 17023, 5896, 17023, 4652, 6134, 364, 652, 316, 3874, 67, 4718, 67, 2821, 30, 309, 652, 486, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4619, 4652, 12, 2890, 16, 892, 4672, 3874, 67, 4718, 67, 2821, 273, 7707, 6769, 8443, 17023, 5896, 17023, 4652, 6134, 364, 652, 316, 3874, 67, 4718, 67, 2821, 30, 309, 652, 486, 3...
self.saved = results
self.__create_run_id() try: with self.db: self.db.execute("INSERT INTO tinu_summary (run_id, passed, failed, segfault) VALUES (?, ?, ?, ?)", (self.run_id, results.summary.passed, results.summary.failed, results.summary.segfault)) self.db.execute("INSERT INTO tinu_messages (critical, error, warning, notice, info, debug) VALUES (?, ?, ?, ?, ?, ?)", (results.messages['critical'], results.messages['error'], results.messages['warning'], results.messages['notice'], results.messages['info'], results.messages['debug']))
def save_results(self, results): self.saved = results
f809f388ba16b0d594155c0b3703be8316710995 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13126/f809f388ba16b0d594155c0b3703be8316710995/sqlite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 4717, 12, 2890, 16, 1686, 4672, 365, 18, 14077, 273, 1686, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 4717, 12, 2890, 16, 1686, 4672, 365, 18, 14077, 273, 1686, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
raise NotImplementedError
def __init__(self): raise NotImplementedError self.values = {'mean': {'mu': None, 'sd': None, 't': None, 'resid': None, 'df_resid': None, 'scale': None}, 'varatio': {'varatio': None, 'varfix': None}}
7426ed47a9f1d401431adbc1095abe1f2a74a31e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12658/7426ed47a9f1d401431adbc1095abe1f2a74a31e/onesample.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 2372, 273, 13666, 7079, 4278, 13666, 13297, 4278, 599, 16, 296, 6427, 4278, 599, 16, 296, 88, 4278, 599, 16, 296, 15567, 4278, 599, 16, 296, 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, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 2372, 273, 13666, 7079, 4278, 13666, 13297, 4278, 599, 16, 296, 6427, 4278, 599, 16, 296, 88, 4278, 599, 16, 296, 15567, 4278, 599, 16, 296, 2...
busmon.decode([176, 17, 4, 17, 110, 80, 128, 245])
print busmon.decode([176,176, 17, 4, 17, 110, 80, 128, 245])
def debug(self,msg): #print "DEBUG: BUSMON: "+ repr(msg) pass
b68e603b76ba1fee7f7bdf353b33b31e00f42eb0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5166/b68e603b76ba1fee7f7bdf353b33b31e00f42eb0/BusMonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 2890, 16, 3576, 4672, 468, 1188, 315, 9394, 30, 605, 3378, 17667, 30, 13773, 8480, 12, 3576, 13, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 2890, 16, 3576, 4672, 468, 1188, 315, 9394, 30, 605, 3378, 17667, 30, 13773, 8480, 12, 3576, 13, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
print self.iters, best.pbestval, best.pid
print self.iters, best.pbestval, best.pid, '\tStagnant particles:',\ numstagnant, '\tStagnant for more than 30 iterations:',\ really_stagnant
def __call__(self, **kwds): best = kwds['best'] self.iters = kwds['iteration'] particles = kwds['particles'] if self.iters == 1: for particle in particles: self.prevpbest[particle.pid] = 0 stagnant = True for particle in particles: if particle.pbestval != self.prevpbest[particle.pid]: self.num_pbest_updates += 1 self.prevpbest[particle.pid] = particle.pbestval stagnant = False self.num_pbest_possible_updates += 1 if best.pbestval == self.last_val: self.not_updated += 1 if stagnant: self.stagnant_iters += 1 print self.iters, best.pbestval, 'Stagnant!' print self.iters, best.pbestval else: self.last_val = best.pbestval if best.pid in self.recentlyseen: self.recently_seen_changes += 1 if best.pid == self.bestpid: self.consistent_changes += 1 else: self.recentlyseen.append(best.pid) self.recentlyseen = self.recentlyseen[-self.num_recent:] self.bestpid = best.pid if best.pid not in self.counter: self.counter[best.pid] = 0 self.counter[best.pid] += 1 self.changes += 1 print self.iters, best.pbestval, best.pid
c073122bd7062775f03509342c521cb736323525 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/966/c073122bd7062775f03509342c521cb736323525/output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2826, 25577, 4672, 3796, 273, 17149, 3292, 12729, 3546, 365, 18, 27270, 273, 17149, 3292, 16108, 3546, 28312, 273, 17149, 3292, 2680, 8383, 3546, 309, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2826, 25577, 4672, 3796, 273, 17149, 3292, 12729, 3546, 365, 18, 27270, 273, 17149, 3292, 16108, 3546, 28312, 273, 17149, 3292, 2680, 8383, 3546, 309, 365, 1...
return ret
if ret: return -88 return 0
def TestLayout(self, run_all=False): # A "chunk file" is maintained in the local directory so that each test # runs a slice of the layout tests of size chunk_size that increments with # each run. Since tests can be added and removed from the layout tests at # any time, this is not going to give exact coverage, but it will allow us # to continuously run small slices of the layout tests under purify rather # than having to run all of them in one shot. chunk_num = 0 # Tests currently seem to take about 20-30s each. chunk_size = 120 # so about 40-60 minutes per run chunk_file = os.path.join(os.environ["TEMP"], "purify_layout_chunk.txt") if not run_all: try: f = open(chunk_file) if f: str = f.read() if len(str): chunk_num = int(str) # This should be enough so that we have a couple of complete runs # of test data stored in the archive (although note that when we loop # that we almost guaranteed won't be at the end of the test list) if chunk_num > 10000: chunk_num = 0 f.close() except IOError, (errno, strerror): logging.error("error reading from file %s (%d, %s)" % (chunk_file, errno, strerror))
80ed27631dfc12248faa97fe3e11cdf477a2ea19 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/80ed27631dfc12248faa97fe3e11cdf477a2ea19/chrome_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7766, 3744, 12, 2890, 16, 1086, 67, 454, 33, 8381, 4672, 468, 432, 315, 6551, 585, 6, 353, 11566, 8707, 316, 326, 1191, 1867, 1427, 716, 1517, 1842, 468, 7597, 279, 2788, 434, 326, 351...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7766, 3744, 12, 2890, 16, 1086, 67, 454, 33, 8381, 4672, 468, 432, 315, 6551, 585, 6, 353, 11566, 8707, 316, 326, 1191, 1867, 1427, 716, 1517, 1842, 468, 7597, 279, 2788, 434, 326, 351...
if not uthread2:
if uthread2:
def execstring(pytext, globals, locals, filename="<string>", debugging=0, modname="__main__", profiling=0): if debugging: import PyDebugger, bdb BdbQuit = bdb.BdbQuit else: BdbQuit = 'BdbQuitDummyException' pytext = string.split(pytext, '\r') pytext = string.join(pytext, '\n') + '\n' W.SetCursor("watch") globals['__name__'] = modname globals['__file__'] = filename sys.argv = [filename] try: code = compile(pytext, filename, "exec") except: # XXXX BAAAADDD.... We let tracebackwindow decide to treat SyntaxError # special. That's wrong because THIS case is special (could be literal # overflow!) and SyntaxError could mean we need a traceback (syntax error # in imported module!!! tracebackwindow.traceback(1, filename) return try: if debugging: if uthread2: uthread2.globalLock() PyDebugger.startfromhere() uthread2.globalUnlock() else: PyDebugger.startfromhere() elif not uthread2: MacOS.EnableAppswitch(0) try: if profiling: import profile, ProfileBrowser p = profile.Profile() p.set_cmd(filename) try: p.runctx(code, globals, locals) finally: import pstats stats = pstats.Stats(p) ProfileBrowser.ProfileBrowser(stats) else: exec code in globals, locals finally: if not uthread2: MacOS.EnableAppswitch(-1) except W.AlertError, detail: raise W.AlertError, detail except (KeyboardInterrupt, BdbQuit): pass except: if uthread2: uthread2.globalLock() if debugging: sys.settrace(None) PyDebugger.postmortem(sys.exc_type, sys.exc_value, sys.exc_traceback) return else: tracebackwindow.traceback(1, filename) if not uthread2: uthread2.globalUnlock() if debugging: sys.settrace(None) PyDebugger.stop()
d28bc8147268da292288167fa87070f22b7272e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d28bc8147268da292288167fa87070f22b7272e4/PyEdit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 1080, 12, 2074, 955, 16, 10941, 16, 8985, 16, 1544, 1546, 32, 1080, 2984, 16, 10450, 33, 20, 16, 16037, 1546, 972, 5254, 972, 3113, 25658, 33, 20, 4672, 309, 10450, 30, 1930, 470...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 1080, 12, 2074, 955, 16, 10941, 16, 8985, 16, 1544, 1546, 32, 1080, 2984, 16, 10450, 33, 20, 16, 16037, 1546, 972, 5254, 972, 3113, 25658, 33, 20, 4672, 309, 10450, 30, 1930, 470...
and not hasattr(self.module_cache, 'oa_invalidate' )):
and not hasattr(self.module_cache, 'oa_invalidate')):
def get_node_module(self): """ Return the python module object (if available) Raise an Import Error if no module is associated """
0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66/node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2159, 67, 2978, 12, 2890, 4672, 3536, 2000, 326, 5790, 1605, 733, 261, 430, 2319, 13, 20539, 392, 6164, 1068, 309, 1158, 1605, 353, 3627, 3536, 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, 0, 0, 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, 2159, 67, 2978, 12, 2890, 4672, 3536, 2000, 326, 5790, 1605, 733, 261, 430, 2319, 13, 20539, 392, 6164, 1068, 309, 1158, 1605, 353, 3627, 3536, 2, -100, -100, -100, -100, -100, ...
print "checkmagic", self.crypted
def checkmagic(self): Archive.checkmagic(self) self.LEVEL, self.crypted = struct.unpack('!iB', self.lib.read(5)) print "checkmagic", self.crypted
e1bc0211ae3bf3138d73ba31c41b5a6ab5b8f5e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11925/e1bc0211ae3bf3138d73ba31c41b5a6ab5b8f5e7/archive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 11179, 12, 2890, 4672, 13124, 18, 1893, 11179, 12, 2890, 13, 365, 18, 10398, 16, 365, 18, 71, 4567, 273, 1958, 18, 17309, 2668, 5, 17632, 2187, 365, 18, 2941, 18, 896, 12, 25, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 11179, 12, 2890, 4672, 13124, 18, 1893, 11179, 12, 2890, 13, 365, 18, 10398, 16, 365, 18, 71, 4567, 273, 1958, 18, 17309, 2668, 5, 17632, 2187, 365, 18, 2941, 18, 896, 12, 25, 3...
lastword = chr(b1+1)
lastword = chr(b1)
def _AsciiBase85Decode(input): """This is not used - Acrobat Reader decodes for you - but a round trip is essential for testing.""" outstream = cStringIO.StringIO() #strip all whitespace stripped = string.join(string.split(input),'') #check end assert stripped[-2:] == '~>', 'Invalid terminator for Ascii Base 85 Stream' stripped = stripped[:-2] #chop off terminator #may have 'z' in it which complicates matters - expand them stripped = string.replace(stripped,'z','!!!!!') # special rules apply if not a multiple of five bytes. whole_word_count, remainder_size = divmod(len(stripped), 5) #print '%d words, %d leftover' % (whole_word_count, remainder_size) assert remainder_size <> 1, 'invalid Ascii 85 stream!' cut = 5 * whole_word_count body, lastbit = stripped[0:cut], stripped[cut:] for i in range(whole_word_count): offset = i*5 c1 = ord(body[offset]) - 33 c2 = ord(body[offset+1]) - 33 c3 = ord(body[offset+2]) - 33 c4 = ord(body[offset+3]) - 33 c5 = ord(body[offset+4]) - 33 num = ((85L**4) * c1) + ((85**3) * c2) + ((85**2) * c3) + (85*c4) + c5 temp, b4 = divmod(num,256) temp, b3 = divmod(temp,256) b1, b2 = divmod(temp, 256) assert num == 16777216 * b1 + 65536 * b2 + 256 * b3 + b4, 'dodgy code!' outstream.write(chr(b1)) outstream.write(chr(b2)) outstream.write(chr(b3)) outstream.write(chr(b4)) #decode however many bytes we have as usual if remainder_size > 0: while len(lastbit) < 5: lastbit = lastbit + '!' c1 = ord(lastbit[0]) - 33 c2 = ord(lastbit[1]) - 33 c3 = ord(lastbit[2]) - 33 c4 = ord(lastbit[3]) - 33 c5 = ord(lastbit[4]) - 33 num = ((85L**4) * c1) + ((85**3) * c2) + ((85**2) * c3) + (85*c4) + c5 temp, b4 = divmod(num,256) temp, b3 = divmod(temp,256) b1, b2 = divmod(temp, 256) assert num == 16777216 * b1 + 65536 * b2 + 256 * b3 + b4, 'dodgy code!' #print 'decoding: %d %d %d %d %d -> %d -> %d %d %d %d' % ( # c1,c2,c3,c4,c5,num,b1,b2,b3,b4) #the last character needs 1 adding; the encoding loses #data by rounding the number to x bytes, and when #divided repeatedly we get one less if remainder_size == 2: lastword = chr(b1+1) elif remainder_size == 3: lastword = chr(b1) + chr(b2+1) elif remainder_size == 4: lastword = chr(b1) + chr(b2) + chr(b3+1) outstream.write(lastword) #terminator code for ascii 85 outstream.reset() return outstream.read()
6748d1bacd48f8a3352b590669847ada45ea1e8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/6748d1bacd48f8a3352b590669847ada45ea1e8d/pdfutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 21363, 2171, 7140, 6615, 12, 2630, 4672, 3536, 2503, 353, 486, 1399, 300, 12848, 303, 28260, 5393, 16889, 364, 1846, 300, 1496, 279, 3643, 20654, 353, 18518, 2001, 364, 7769, 12123, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 21363, 2171, 7140, 6615, 12, 2630, 4672, 3536, 2503, 353, 486, 1399, 300, 12848, 303, 28260, 5393, 16889, 364, 1846, 300, 1496, 279, 3643, 20654, 353, 18518, 2001, 364, 7769, 12123, 5...
self.generateNCXByTitle("Titles", single_article_per_section=False)
self.generateNCXByTitle("Titles")
def buildSources(self): if getattr(self.reporter, 'cancel_requested', False): return 1 if not self.booksByTitle: self.fetchBooksByTitle()
073710f405f291eedc7992694a78db2be7983d10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/073710f405f291eedc7992694a78db2be7983d10/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 8628, 12, 2890, 4672, 309, 3869, 12, 2890, 18, 266, 7988, 16, 296, 10996, 67, 19065, 2187, 1083, 4672, 327, 404, 309, 486, 365, 18, 12567, 858, 4247, 30, 365, 18, 5754, 9084, 87,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 8628, 12, 2890, 4672, 309, 3869, 12, 2890, 18, 266, 7988, 16, 296, 10996, 67, 19065, 2187, 1083, 4672, 327, 404, 309, 486, 365, 18, 12567, 858, 4247, 30, 365, 18, 5754, 9084, 87,...
try: loader.Load() self.fail('InvalidValue exception expected') except transitfeed.InvalidValue, e: self.assertEqual(column_name, e.column_name)
loader.Load() def ExpectInvalidValue(self, feed_name, column_name): self.Load(feed_name) self.problems.PopInvalidValue(column_name) self.problems.AssertNoMoreExceptions()
def ExpectInvalidValue(self, feed_name, column_name): loader = transitfeed.Loader( DataPath(feed_name), problems=self.problems, extra_validation=True) try: loader.Load() self.fail('InvalidValue exception expected') except transitfeed.InvalidValue, e: self.assertEqual(column_name, e.column_name)
d76f5eae67ea18518c865c76c0316b6967ae537f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6829/d76f5eae67ea18518c865c76c0316b6967ae537f/testtransitfeed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15510, 1941, 620, 12, 2890, 16, 4746, 67, 529, 16, 1057, 67, 529, 4672, 4088, 273, 22755, 7848, 18, 2886, 12, 1910, 743, 12, 7848, 67, 529, 3631, 9688, 33, 2890, 18, 29812, 16, 2870, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15510, 1941, 620, 12, 2890, 16, 4746, 67, 529, 16, 1057, 67, 529, 4672, 4088, 273, 22755, 7848, 18, 2886, 12, 1910, 743, 12, 7848, 67, 529, 3631, 9688, 33, 2890, 18, 29812, 16, 2870, ...
self.imap_server.print_log() raise BadIMAPResponseError("recent", "Cannot find saved message")
if options["globals", "verbose"]: print "[imapfilter] can't find saved message after 100 iterations:", self.uid
def Save(self): """Save message to IMAP server.
706ff615bb6d13331fedc0849e94d029ad4e9af5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6126/706ff615bb6d13331fedc0849e94d029ad4e9af5/sb_imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7074, 12, 2890, 4672, 3536, 4755, 883, 358, 6246, 2203, 1438, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7074, 12, 2890, 4672, 3536, 4755, 883, 358, 6246, 2203, 1438, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
outer_row['stddev_%s' % field] = None
row['stddev_%s' % field] = None
def _execute(self): """ Private method for executing query, always runs query and then updates cache """ annotations = {} aa_rows = {} # main aggregate functions for field in self.angles: annotations['min_%s' % field] = Min(field) annotations['max_%s' % field] = Max(field) annotations['avg_%s' % field] = DirectionalAvg(field) for field in self.fields: annotations['min_%s' % field] = Min(field) annotations['max_%s' % field] = Max(field) annotations['avg_%s' % field] = Avg(field) annotations['stddev_%s' % field] = StdDev(field) # query with all aggregate values that can be calculated in a standard # query. save query in a list so that its members can be modified query = self.queryset query = query.values('aa') query = query.annotate(**annotations) results = list(query) # construction 2nd query for DirectionStdDev calculations for each # dihedral angle. only needed if there is at least one dihedral angle if self.angles: annotations = {} for row in results: aa_rows[row['aa']] = row for field in self.angles: avg=row['avg_%s' % field] if avg: annotations['stddev_%s' % field] = DirectionalStdDev(field, avg=avg) else: outer_row['stddev_%s' % field] = None if annotations: query = self.queryset query = query.values('aa') query = query.annotate(**annotations) # update the original results with the results of the 2nd query for row in query: outer_row = aa_rows[row['aa']] for field in self.angles: outer_row.update(row) self.results = results return results
74f9b2a1bd92e5595f4550b8f493b12de94b2b27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6163/74f9b2a1bd92e5595f4550b8f493b12de94b2b27/directional_stddev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 2890, 4672, 3536, 8726, 707, 364, 11274, 843, 16, 3712, 7597, 843, 471, 1508, 4533, 1247, 3536, 5617, 273, 2618, 12391, 67, 3870, 273, 2618, 225, 468, 2774, 7047, 4186, 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, 389, 8837, 12, 2890, 4672, 3536, 8726, 707, 364, 11274, 843, 16, 3712, 7597, 843, 471, 1508, 4533, 1247, 3536, 5617, 273, 2618, 12391, 67, 3870, 273, 2618, 225, 468, 2774, 7047, 4186, 36...
if type(to_addrs) == types.StringType:
if isinstance(to_addrs, types.StringTypes):
def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """This command performs an entire mail transaction.
5084c2a114a47fa2fd3249fd81826a1f415067b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5084c2a114a47fa2fd3249fd81826a1f415067b0/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 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, 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, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 2...
main()
main()
def main(): home = config.get_home() default_cache = os.path.join(home,"var","cache") default_cache = os.getenv("MULE_CACHE", default_cache) parser = OptionParser() parser.add_option("-f", "--foreground", action="store_true", dest="foreground", default=False, help="Do not fork [default: fork]") parser.add_option("-r", "--rls", action="store", dest="rls", default=DEFAULT_RLS, metavar="HOST", help="RLS host [def: %default]") parser.add_option("-c", "--cache", action="store", dest="cache", default=DEFAULT_CACHE, metavar="DIR", help="Cache directory [def: %default]") (options, args) = parser.parse_args() if len(args) > 0: parser.error("Invalid argument") if not options.rls: parser.error("Specify --rls or MULE_RLS environment") if os.path.isfile(options.cache): parser.error("--cache argument is file") if not os.path.isdir(options.cache): os.makedirs(options.cache) # Fork if not options.foreground: util.daemonize() os.chdir(config.get_home()) # Configure logging (after the fork) log.configure() l = log.get_log("agent") try: a = Agent(options.rls, options.cache) a.run() except Exception, e: l.exception(e) sys.exit(1)
86603d2facf8767a09b622a032e173fe518ddb13 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11095/86603d2facf8767a09b622a032e173fe518ddb13/agent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 6382, 273, 642, 18, 588, 67, 8712, 1435, 805, 67, 2493, 273, 1140, 18, 803, 18, 5701, 12, 8712, 10837, 1401, 15937, 2493, 7923, 805, 67, 2493, 273, 1140, 18, 588, 3074, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 6382, 273, 642, 18, 588, 67, 8712, 1435, 805, 67, 2493, 273, 1140, 18, 803, 18, 5701, 12, 8712, 10837, 1401, 15937, 2493, 7923, 805, 67, 2493, 273, 1140, 18, 588, 3074, 29...
}
})
def add_row(self, directory): theme_path = os.path.join(defs.HOME_THEME_DIR, directory, self.AWN_CONFIG) thumb_path = os.path.join(defs.HOME_THEME_DIR, directory, self.AWN_THUMB)
b4dd944b18fb6b6a53784d3074b6fb1e58257d0a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8416/b4dd944b18fb6b6a53784d3074b6fb1e58257d0a/awnTheme.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 492, 12, 2890, 16, 1867, 4672, 5006, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 12537, 18, 14209, 67, 24644, 958, 67, 4537, 16, 1867, 16, 365, 18, 37, 5665, 67, 7203, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 492, 12, 2890, 16, 1867, 4672, 5006, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 12537, 18, 14209, 67, 24644, 958, 67, 4537, 16, 1867, 16, 365, 18, 37, 5665, 67, 7203, 13, ...
tb = None try: o = curses.wrapper( main ) except: tb = traceback.format_exc() if stdscr is not None: stdscr.keypad(0) curses.echo() curses.nocbreak() curses.endwin() sys.stdout = sys.__stdout__ if tb: print tb sys.exit(1) sys.stdout.write( o ) sys.stdout.flush()
if __name__ == '__main__': tb = None try: o = curses.wrapper( main ) except: tb = traceback.format_exc() if stdscr is not None: stdscr.keypad(0) curses.echo() curses.nocbreak() curses.endwin() sys.stdout = sys.__stdout__ if tb: print tb sys.exit(1) sys.stdout.write( o ) sys.stdout.flush()
def main( scr ): """main function for the curses convenience wrapper Initialise the two main objects: the interpreter and the repl. The repl does what a repl does and lots of other cool stuff like syntax highlighting and stuff. I've tried to keep it well factored but it needs some tidying up, especially in separating the curses stuff from the rest of the repl. """ global stdscr global DO_RESIZE DO_RESIZE = False signal.signal( signal.SIGWINCH, lambda x,y: sigwinch(scr) ) loadrc() stdscr = scr curses.start_color() curses.use_default_colors() cols = make_colours() scr.timeout( 300 ) main_win, statusbar = init_wins( scr, cols ) interpreter = Interpreter() repl = Repl( main_win, interpreter, statusbar, idle ) repl._C = cols sys.stdout = repl sys.stderr = repl repl.repl() return repl.getstdout()
601d44e7d71afad745e1b65ecc6903fd22cfc95b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6932/601d44e7d71afad745e1b65ecc6903fd22cfc95b/bpython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 11991, 262, 30, 3536, 5254, 445, 364, 326, 30436, 13553, 4053, 225, 31739, 326, 2795, 2774, 2184, 30, 326, 16048, 471, 326, 6831, 18, 1021, 6831, 1552, 4121, 279, 6831, 1552, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 11991, 262, 30, 3536, 5254, 445, 364, 326, 30436, 13553, 4053, 225, 31739, 326, 2795, 2774, 2184, 30, 326, 16048, 471, 326, 6831, 18, 1021, 6831, 1552, 4121, 279, 6831, 1552, 4...
self.eventprocessor.logMessage(_("Couldn't move '%(tempfile)s' to '%(file)s'") % {'tempfile':self.decode(msg.file.name), 'file':self.decode(newname)})
try: f1 = open(msg.file.name, "rb") d = f1.read() if win32: f1 = open(u"%s" % newname, "wb") else: f1 = open(newname, "wb") f1.write(d) f1.close() os.remove(msg.file.name) except OSError: self.eventprocessor.logMessage(_("Couldn't move '%(tempfile)s' to '%(file)s'") % {'tempfile':self.decode(msg.file.name), 'file':self.decode(newname)})
def FileDownload(self, msg): """ A file download is in progress""" needupdate = 1 config = self.eventprocessor.config.sections for i in self.downloads: if i.conn != msg.conn: continue try: if i.transfertimer is not None: i.transfertimer.cancel() curtime = time.time() i.currentbytes = msg.file.tell() if i.lastbytes is None: i.lastbytes = i.currentbytes if i.starttime is None: i.starttime = curtime if i.lasttime is None: i.lasttime = curtime - 1 #i.status = "%s" %(str(i.currentbytes)) i.status = "Transferring" oldelapsed = i.timeelapsed i.timeelapsed = curtime - i.starttime if curtime > i.starttime and i.currentbytes > i.offset: i.speed = (i.currentbytes - i.lastbytes)/(curtime - i.lasttime)/1024 if i.speed <= 0.0: i.timeleft = "∞" else: i.timeleft = self.getTime((i.size - i.currentbytes)/i.speed/1024) i.lastbytes = i.currentbytes i.lasttime = curtime if i.size > i.currentbytes: if oldelapsed == i.timeelapsed: needupdate = 0 #i.status = str(i.currentbytes) i.status = "Transferring" else: msg.file.close() basename = self.CleanPath(self.encode(string.split(i.filename,'\\')[-1], i.user)) downloaddir = config["transfers"]["downloaddir"] if i.path and i.path[0] == '/': folder = self.CleanPath(i.path) else: folder = os.path.join(downloaddir, self.encode(i.path)) if not os.access(folder, os.F_OK): os.makedirs(folder) newname = self.getRenamed(os.path.join(folder, basename)) try: if win32: os.rename(msg.file.name, u"%s" % newname) else: os.rename(msg.file.name, newname) except OSError: try: f1 = open(msg.file.name, "rb") d = f1.read() if win32: f1 = open(u"%s" % newname, "wb") else: f1 = open(newname, "wb") f1.write(d) f1.close() os.remove(msg.file.name) except OSError: self.eventprocessor.logMessage(_("Couldn't move '%(tempfile)s' to '%(file)s'") % {'tempfile':self.decode(msg.file.name), 'file':self.decode(newname)}) i.status = "Finished" self.eventprocessor.logMessage(_("Download finished: %(file)s") % {'file':self.decode(newname)}) self.eventprocessor.logTransfer(_("Download finished: user %(user)s, file %(file)s") % {'user':i.user, 'file':self.decode(i.filename)}) self.queue.put(slskmessages.ConnClose(msg.conn)) #if i.speed is not None: #self.queue.put(slskmessages.SendSpeed(i.user, int(i.speed*1024))) #Removed due to misuse. Replaced by SendUploadSpeed i.conn = None if win32: self.addToShared(u"%s" % newname) else: self.addToShared(newname) self.eventprocessor.sendNumSharedFoldersFiles() self.SaveDownloads() self.downloadspanel.update(i) if config["transfers"]["shownotification"]: self.eventprocessor.frame.NewNotification(_("%(file)s downloaded from %(user)s") % {'user':i.user, "file":newname.rsplit(os.sep, 1)[1]}, title=_("Nicotine+ :: file downloaded"))
e04db3135ed71a7bde2b1cf11e3c1ce16abc9eb8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/e04db3135ed71a7bde2b1cf11e3c1ce16abc9eb8/transfers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1387, 7109, 12, 2890, 16, 1234, 4672, 3536, 432, 585, 4224, 353, 316, 4007, 8395, 1608, 2725, 273, 404, 642, 273, 365, 18, 2575, 8700, 18, 1425, 18, 11657, 364, 277, 316, 365, 18, 7813...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1387, 7109, 12, 2890, 16, 1234, 4672, 3536, 432, 585, 4224, 353, 316, 4007, 8395, 1608, 2725, 273, 404, 642, 273, 365, 18, 2575, 8700, 18, 1425, 18, 11657, 364, 277, 316, 365, 18, 7813...
If $m$ is the input length of this S-box then the extension field is of degree $m$.
If ``m`` is the input length of this S-box then the extension field is of degree ``m``.
def interpolation_polynomial(self, k=None): r""" Return a univariate polynomial over an extension field representing this S-box.
dd81b4a97db8b232434d8623d237dba45e418834 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/dd81b4a97db8b232434d8623d237dba45e418834/sbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12851, 67, 3915, 13602, 12, 2890, 16, 417, 33, 7036, 4672, 436, 8395, 2000, 279, 640, 27693, 16991, 1879, 392, 2710, 652, 5123, 333, 348, 17, 2147, 18, 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, 0, 0, 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, 12851, 67, 3915, 13602, 12, 2890, 16, 417, 33, 7036, 4672, 436, 8395, 2000, 279, 640, 27693, 16991, 1879, 392, 2710, 652, 5123, 333, 348, 17, 2147, 18, 2, -100, -100, -100, -100, -100, ...
def setSelectionOnCurrItem (self): if not self.isItemFullyInView (self.selectedItem): self.moveItemIntoView (self.selectedItem) selectionStart = self.getItemStartChar (self.selectedItem) self.SetCurrentPos (selectionStart) self.EnsureCaretVisible () self.SetSelection (selectionStart , selectionStart + self.charsPerCol)
def setSelectionOnCurrItem (self): if not self.isItemFullyInView (self.selectedItem): self.moveItemIntoView (self.selectedItem)
f9cf4a0bdc0646abe0df73970e25fb5379475633 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9028/f9cf4a0bdc0646abe0df73970e25fb5379475633/candy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 6233, 1398, 20143, 1180, 261, 2890, 4672, 309, 486, 365, 18, 291, 1180, 16999, 382, 1767, 261, 2890, 18, 8109, 1180, 4672, 365, 18, 8501, 1180, 5952, 1767, 261, 2890, 18, 8109, 1180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6233, 1398, 20143, 1180, 261, 2890, 4672, 309, 486, 365, 18, 291, 1180, 16999, 382, 1767, 261, 2890, 18, 8109, 1180, 4672, 365, 18, 8501, 1180, 5952, 1767, 261, 2890, 18, 8109, 1180...
model, iter = self.tree.get_selection().get_selected() if iter: intf = self.intf_combo.get_interface() ip, mac = model.get_value(iter, 0), model.get_value(iter, 1) info_cb = ServiceBus().get_function('pm.hostlist', 'info') if callable(info_cb): ret = info_cb(intf, ip, mac) else: return import umit.pm.gui.core.app
import umit.pm.gui.core.app ips = [] intf = self.intf_combo.get_interface() info_cb = ServiceBus().get_function('pm.hostlist', 'info') def add_to_string(model, path, iter, selected): ips.append((model.get_value(iter, 0), model.get_value(iter, 1))) self.tree.get_selection().selected_foreach(add_to_string, ips) for ip, mac in ips: ret = info_cb(intf, ip, mac)
def __on_info(self, button): model, iter = self.tree.get_selection().get_selected()
212fa67373255719badfb1cf43bed625e214cebd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11468/212fa67373255719badfb1cf43bed625e214cebd/hostlisttab.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 265, 67, 1376, 12, 2890, 16, 3568, 4672, 938, 16, 1400, 273, 365, 18, 3413, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435, 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, 1001, 265, 67, 1376, 12, 2890, 16, 3568, 4672, 938, 16, 1400, 273, 365, 18, 3413, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
document.body[i] = document.body[i][:j-2]
document.body[i] = document.body[i][:j-1]
def revert_accent(document): inverse_accent_map = {} for k in accent_map: inverse_accent_map[accent_map[k]] = k inverse_special_accent_map = {} for k in special_accent_map: inverse_special_accent_map[special_accent_map[k]] = k inverse_accented_map = {} for k in accented_map: inverse_accented_map[accented_map[k]] = k # Since LyX may insert a line break within a word we must combine all # words before unicode normalization. # We do this only if the next line starts with an accent, otherwise we # would create things like '\begin_inset ERTstatus'. for i in range(len(document.body) - 1): if document.body[i] == '' or document.body[i+1] == '' or document.body[i][-1] == ' ': continue if (document.body[i+1][0] in inverse_accent_map and document.body[i][:1] != '\\'): # the last character of this line and the first of the next line # form probably a surrogate pair, inline insets are excluded (second part of the test) while (len(document.body[i+1]) > 0 and document.body[i+1][0] != ' '): document.body[i] += document.body[i+1][0] document.body[i+1] = document.body[i+1][1:] # Normalize to "Normal form D" (NFD, also known as canonical decomposition). # This is needed to catch all accented characters. for i in range(len(document.body)): # Unfortunately we have a mixture of unicode strings and plain strings, # because we never use u'xxx' for string literals, but 'xxx'. # Therefore we may have to try two times to normalize the data. try: document.body[i] = unicodedata.normalize("NFD", document.body[i]) except TypeError: document.body[i] = unicodedata.normalize("NFD", unicode(document.body[i], 'utf-8')) # Replace accented characters with InsetLaTeXAccent # Do not convert characters that can be represented in the chosen # encoding. encoding_stack = [get_encoding(document.language, document.inputencoding, 248, document.cjk_encoding)] lang_re = re.compile(r"^\\lang\s(\S+)") i = 0 while i < len(document.body): if (document.inputencoding == "auto" or document.inputencoding == "default") and document.cjk_encoding != '': # Track the encoding of the current line result = lang_re.match(document.body[i]) if result: language = result.group(1) if language == "default": encoding_stack[-1] = document.encoding else: from lyx2lyx_lang import lang encoding_stack[-1] = lang[language][3] continue elif find_token(document.body, "\\begin_layout", i, i + 1) == i: encoding_stack.append(encoding_stack[-1]) continue elif find_token(document.body, "\\end_layout", i, i + 1) == i: del encoding_stack[-1] continue for j in range(len(document.body[i])): # dotless i and dotless j are both in special_accent_map and can # occur as an accented character, so we need to test that the # following character is no accent if (document.body[i][j] in inverse_special_accent_map and (j == len(document.body[i]) - 1 or document.body[i][j+1] not in inverse_accent_map)): accent = document.body[i][j] try: dummy = accent.encode(encoding_stack[-1]) except UnicodeEncodeError: # Insert the rest of the line as new line if j < len(document.body[i]) - 1: document.body.insert(i+1, document.body[i][j+1:]) # Delete the accented character if j > 0: document.body[i] = document.body[i][:j-1] else: document.body[i] = u'' # Finally add the InsetLaTeXAccent document.body[i] += "\\i \\%s{}" % inverse_special_accent_map[accent] break elif j > 0 and document.body[i][j] in inverse_accent_map: accented_char = document.body[i][j-1] if accented_char == ' ': # Conform to LyX output accented_char = '' elif accented_char in inverse_accented_map: accented_char = inverse_accented_map[accented_char] accent = document.body[i][j] try: dummy = unicodedata.normalize("NFC", accented_char + accent).encode(encoding_stack[-1]) except UnicodeEncodeError: # Insert the rest of the line as new line if j < len(document.body[i]) - 1: document.body.insert(i+1, document.body[i][j+1:]) # Delete the accented characters if j > 1: document.body[i] = document.body[i][:j-2] else: document.body[i] = u'' # Finally add the InsetLaTeXAccent document.body[i] += "\\i \\%s{%s}" % (inverse_accent_map[accent], accented_char) break i = i + 1 # Normalize to "Normal form C" (NFC, pre-composed characters) again for i in range(len(document.body)): document.body[i] = unicodedata.normalize("NFC", document.body[i])
972ec40b73d09f41690715108105ea6d212ec9f4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7514/972ec40b73d09f41690715108105ea6d212ec9f4/lyx_1_5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 8981, 319, 12, 5457, 4672, 8322, 67, 8981, 319, 67, 1458, 273, 2618, 364, 417, 316, 30122, 67, 1458, 30, 8322, 67, 8981, 319, 67, 1458, 63, 8981, 319, 67, 1458, 63, 79, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 8981, 319, 12, 5457, 4672, 8322, 67, 8981, 319, 67, 1458, 273, 2618, 364, 417, 316, 30122, 67, 1458, 30, 8322, 67, 8981, 319, 67, 1458, 63, 8981, 319, 67, 1458, 63, 79, 13...
pass
import time time.sleep(.0001)
def testFakeSrcProbeMany(self): self.fakesrc.set_property('num-buffers', 1000)
ca1cb51d1abd8d3e44b0947fb497ec96d2d54736 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1020/ca1cb51d1abd8d3e44b0947fb497ec96d2d54736/test_pad.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 25462, 7740, 21042, 5594, 12, 2890, 4672, 365, 18, 507, 79, 281, 1310, 18, 542, 67, 4468, 2668, 2107, 17, 28101, 2187, 4336, 13, 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, 25462, 7740, 21042, 5594, 12, 2890, 4672, 365, 18, 507, 79, 281, 1310, 18, 542, 67, 4468, 2668, 2107, 17, 28101, 2187, 4336, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.extractMeshes(node)
self.extractMeshes(node, ())
def __init__(self, name): self.encoding = 'utf8' self.meshes = {}
d8decad1db4ed38e72a93334af23c8319a9bee76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/d8decad1db4ed38e72a93334af23c8319a9bee76/Parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 5999, 273, 296, 3158, 28, 11, 365, 18, 15557, 281, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 5999, 273, 296, 3158, 28, 11, 365, 18, 15557, 281, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
f = os.path.join(os.path.dirname(__file__), 'jamendo.glade') self.glade = gtk.glade.XML(f) self.config_dialog = self.glade.get_widget('config_dialog') self.popup = self.glade.get_widget('popup_menu') self.window = self.glade.get_widget('mainwindow') self.container = self.glade.get_widget('mainwindow_container') self.notebook = self.glade.get_widget('notebook') self.search_entry = self.glade.get_widget('search_entry') self.search_combo = self.glade.get_widget('search_combo')
def activate(self, totem_object): """ Plugin activation. """ self.builder = self.load_interface("jamendo.ui", True, totem_object.get_main_window(), self) self.config_dialog = self.builder.get_object('config_dialog') self.popup = self.builder.get_object('popup_menu') container = self.builder.get_object('container') self.notebook = self.builder.get_object('notebook') self.search_entry = self.builder.get_object('search_entry') self.search_combo = self.builder.get_object('search_combo')
def __init__(self): totem.Plugin.__init__(self) self.debug = True self.gstreamer_plugins_present = True self.totem = None self.gconf = gconf.client_get_default() self.init_settings()
204fc110d39767d8f9d5956b72f45fef1e692e10 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11070/204fc110d39767d8f9d5956b72f45fef1e692e10/jamendo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 9997, 351, 18, 3773, 16186, 2738, 972, 12, 2890, 13, 365, 18, 4148, 273, 1053, 365, 18, 75, 3256, 264, 67, 8057, 67, 6706, 273, 1053, 365, 18, 3307, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 9997, 351, 18, 3773, 16186, 2738, 972, 12, 2890, 13, 365, 18, 4148, 273, 1053, 365, 18, 75, 3256, 264, 67, 8057, 67, 6706, 273, 1053, 365, 18, 3307, ...
break
if pagename_tpl: break
def get_pagename_content(request, msg): """ Generates pagename and content according to the specification that can be found on MoinMoin:FeatureRequests/WikiEmailintegration """ generate_summary = False choose_html = True cfg = request.cfg email_subpage_template = cfg.mail_import_subpage_template email_pagename_envelope = cfg.mail_import_pagename_envelope wiki_addrs = cfg.mail_import_wiki_addrs search_list = cfg.mail_import_pagename_search re_subject = re.compile(cfg.mail_import_pagename_regex) subj = msg['subject'].strip() pagename_tpl = "" for method in search_list: if method == 'to': for addr in msg['target_addrs']: if addr[1].strip().lower() in wiki_addrs: pagename_tpl = addr[0] # special fix for outlook users :-) if pagename_tpl[-1] == pagename_tpl[0] == "'": pagename_tpl = pagename_tpl[1:-1] break elif method == 'subj': m = re_subject.search(subj) if m: pagename_tpl = m.group(1) # remove the pagename template from the subject: subj = re_subject.sub('', subj, 1).strip() if pagename_tpl: break pagename_tpl = pagename_tpl.strip() # last resort if not pagename_tpl: pagename_tpl = email_subpage_template if not subj: subj = '(...)' # we need non-empty subject msg['subject'] = subj # for normal use, email_pagename_envelope is just u"%s" - so nothing changes. # for special use, you can use u"+ %s/" - so you don't need to enter "+" # and "/" in every email, but you get the result as if you did. pagename_tpl = email_pagename_envelope % pagename_tpl if pagename_tpl.endswith("/"): pagename_tpl += email_subpage_template subject = msg['subject'].replace('/', '\\') # we can't use / in pagenames # rewrite using string.formatter when python 2.4 is mandatory pagename = (pagename_tpl.replace("$from", msg['from_addr'][0]). replace("$date", msg['date']). replace("$subject", subject)) if pagename.startswith("+ ") and "/" in pagename: generate_summary = True pagename = pagename[1:].lstrip() pagename = request.normalizePagename(pagename) if choose_html and msg['html']: content = "{{{#!html\n%s\n}}}" % msg['html'].replace("}}}", "} } }") else: # strip signatures ... content = re_sigstrip.sub("", msg['text']) return {'pagename': pagename, 'content': content, 'generate_summary': generate_summary}
e562a416d3750012f4e0b6fdb2d1199fd74cce87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/e562a416d3750012f4e0b6fdb2d1199fd74cce87/mailimport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9095, 1069, 67, 1745, 12, 2293, 16, 1234, 4672, 3536, 31902, 4262, 1069, 471, 913, 4888, 358, 326, 7490, 716, 848, 506, 1392, 603, 490, 885, 49, 885, 30, 4595, 6421, 19, 25438...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9095, 1069, 67, 1745, 12, 2293, 16, 1234, 4672, 3536, 31902, 4262, 1069, 471, 913, 4888, 358, 326, 7490, 716, 848, 506, 1392, 603, 490, 885, 49, 885, 30, 4595, 6421, 19, 25438...
TixWidget.__init__(self, master, 'tixBalloon', ['options'], cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label', destroy_physically=0) self.subwidget_list['message'] = _dummyLabel(self, 'message', destroy_physically=0)
TixWidget.__init__(self, master, 'tixBalloon', ['options'], cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label', destroy_physically=0) self.subwidget_list['message'] = _dummyLabel(self, 'message', destroy_physically=0)
def __init__(self, master=None, cnf={}, **kw):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 23118, 28793, 2826, 9987, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 23118, 28793, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
test_recurseImport.todo = "probable regression -- jml"
def test_recurseImport(self): d = self.runTrial('package') d.addCallback(self.failUnlessIn, 'IMPORT ERROR') d.addCallback(self.failUnlessIn, 'package.test_bad_module') d.addCallback(self.failUnlessIn, 'package.test_import_module') d.addCallback(self.failIfIn, '<module') d.addCallback(self.failIfIn, 'IOError') return d
8d3afb54082089d8abed228dd67aa8c655edc43e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8d3afb54082089d8abed228dd67aa8c655edc43e/test_output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 29362, 5010, 12, 2890, 4672, 302, 273, 365, 18, 2681, 6251, 287, 2668, 5610, 6134, 302, 18, 1289, 2428, 12, 2890, 18, 6870, 984, 2656, 382, 16, 296, 20445, 5475, 6134, 302, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29362, 5010, 12, 2890, 4672, 302, 273, 365, 18, 2681, 6251, 287, 2668, 5610, 6134, 302, 18, 1289, 2428, 12, 2890, 18, 6870, 984, 2656, 382, 16, 296, 20445, 5475, 6134, 302, 1...
@note: IDA will not check the specified instruction, it will simply
@note: IDA will not check the specified instruction, it will simply
def SetManualInsn(ea, insn): """ Specify instruction represenation manually. @param ea: linear address @param insn: a string represenation of the operand @note: IDA will not check the specified instruction, it will simply display it instead of the orginal representation. """ return idaapi.set_manual_insn(ea, insn)
507ea15b7a89e88e413b47a9fe03b571d956c14a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4773/507ea15b7a89e88e413b47a9fe03b571d956c14a/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 25139, 11796, 12, 24852, 16, 29821, 4672, 3536, 21664, 7592, 2071, 455, 275, 367, 10036, 18, 225, 632, 891, 24164, 30, 9103, 1758, 632, 891, 29821, 30, 279, 533, 2071, 455, 275, 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, 1000, 25139, 11796, 12, 24852, 16, 29821, 4672, 3536, 21664, 7592, 2071, 455, 275, 367, 10036, 18, 225, 632, 891, 24164, 30, 9103, 1758, 632, 891, 29821, 30, 279, 533, 2071, 455, 275, 36...
self.compiler_cxx = 'g++'
self.compiler_cxx = ['g++']
def __init__ (self, verbose=0, dry_run=0, force=0):
f5b889b010ef1c5c5b3f3ab44068219c24cde8f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/f5b889b010ef1c5c5b3f3ab44068219c24cde8f7/mingw32_support.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 16, 2944, 33, 20, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 16, 2944, 33, 20, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if replace:
if replace_deployment_dir:
def main(): if not len(sys.argv) == 3: exit_with_message(2, "Usage: python deploy_seattlegeni.py <path/to/svn/trunk> <dir/to/deploy/to>") trunkdir = sys.argv[1] deployroot = sys.argv[2] if not os.path.isdir(trunkdir): exit_with_message(1, "ERROR: the provided path to the svn trunk does not exist.") if not os.path.exists(os.path.join(trunkdir, "seattlegeni")): exit_with_message(1, "ERROR: the given svn trunk directory doesn't contains a seattlegeni directory.") # Warn the user if the provided deploy directory exists and if it should be replaced. # We actually rename rather than remove the old one, just to be paranoid. if os.path.isdir(deployroot): print "WARNING: existing directory found at directory to deploy: " + deployroot ans = raw_input("Backup and replace this directory (copying config files to the new deployment)? [y/n]") replace = str.lower(ans) == 'y' if not replace: exit_with_message(2, "You chose not to replace the directory.") else: print renameddir = deployroot.rstrip('/').rstrip('\\') + '.' + str(time.time()) print "Renaming existing directory " + deployroot + " to " + renameddir shutil.move(deployroot, renameddir) # Create the directory we will deploy to. print "Creating directory " + deployroot os.mkdir(deployroot) # Copy over the seattlegeni files from svn to the deploy directory. #seattlegeni_svn = os.path.join(trunkdir, "seattlegeni", "website") seattlegeni_svn_dir = os.path.join(trunkdir, "seattlegeni") seattlegeni_deploy_dir = os.path.join(deployroot, "seattlegeni") print "Copying " + seattlegeni_svn_dir + " to " + seattlegeni_deploy_dir shutil.copytree(seattlegeni_svn_dir, seattlegeni_deploy_dir, symlinks=True) # Deploy the seattle/repy library files in a directory called "seattle". This # will serve. This will be the sole location of repy files in seattlegeni and # will also serve as a python package called "seattle" for use within # seattlegeni code. seattle_package_dir = os.path.join(deployroot, "seattle") os.mkdir(seattle_package_dir) # Open/close file to emulate a "touch __init__.py" open(os.path.join(seattle_package_dir, "__init__.py"), "a").close() _deploy_seattle_files_to_directory(trunkdir, seattle_package_dir) # If we replaced an existing directory, then copy the config files from the # old deployment to the new one. if replace: # The website settings files. old_settings_path = os.path.join(renameddir, "seattlegeni", "website", "settings.py") new_settings_path = os.path.join(seattlegeni_deploy_dir, "website", "settings.py") print "Copying " + old_settings_path + " to " + new_settings_path # Use copy2 to preserve permissions, e.g. in case these weren't world-readable. shutil.copy2(old_settings_path, new_settings_path) # The keydb config file. old_keydb_config_path = os.path.join(renameddir, "seattlegeni", "keydb", "config.py") new_keydb_config_path = os.path.join(seattlegeni_deploy_dir, "keydb", "config.py") print "Copying " + old_keydb_config_path + " to " + new_keydb_config_path # Use copy2 to preserve permissions, e.g. in case these weren't world-readable. shutil.copy2(old_keydb_config_path, new_keydb_config_path) _print_post_deploy_instructions()
1a77564b7c4af69ed400a0dc3bbdfb02dda8dc28 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/1a77564b7c4af69ed400a0dc3bbdfb02dda8dc28/deploy_seattlegeni.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 309, 486, 562, 12, 9499, 18, 19485, 13, 422, 890, 30, 2427, 67, 1918, 67, 2150, 12, 22, 16, 315, 5357, 30, 5790, 7286, 67, 307, 4558, 1935, 275, 77, 18, 2074, 411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 225, 309, 486, 562, 12, 9499, 18, 19485, 13, 422, 890, 30, 2427, 67, 1918, 67, 2150, 12, 22, 16, 315, 5357, 30, 5790, 7286, 67, 307, 4558, 1935, 275, 77, 18, 2074, 411, ...
self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
self.hitPtScale.assign(self.objectHandles.getAxisIntersectPt(self.constraint[:1])) self.hitPtScale = self.objectHandles.getMat().xformVec(self.hitPtScale)
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
e6d5ec494707be9dddb9b6144cebc352a9bae73c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/e6d5ec494707be9dddb9b6144cebc352a9bae73c/DirectManipulation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3159, 21, 40, 12, 2890, 16, 919, 4672, 1172, 365, 18, 13364, 309, 3859, 12, 1969, 18, 7205, 16, 315, 4728, 625, 6234, 3367, 7923, 471, 1026, 18, 7205, 18, 4728, 625, 6234, 3367, 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, 3159, 21, 40, 12, 2890, 16, 919, 4672, 1172, 365, 18, 13364, 309, 3859, 12, 1969, 18, 7205, 16, 315, 4728, 625, 6234, 3367, 7923, 471, 1026, 18, 7205, 18, 4728, 625, 6234, 3367, 18, ...
imaging = None
def packageDetectSmartMethod(self): return ', '.join(map(lambda x:self.detectSmartMethod[x], self.package_detect_smart_method))
42a20ac44155d48cc0756fa4c3b8fac77225c19b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/42a20ac44155d48cc0756fa4c3b8fac77225c19b/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2181, 12081, 23824, 1305, 12, 2890, 4672, 327, 2265, 2418, 5701, 12, 1458, 12, 14661, 619, 30, 2890, 18, 16518, 23824, 1305, 63, 92, 6487, 365, 18, 5610, 67, 16518, 67, 26416, 67, 2039, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2181, 12081, 23824, 1305, 12, 2890, 4672, 327, 2265, 2418, 5701, 12, 1458, 12, 14661, 619, 30, 2890, 18, 16518, 23824, 1305, 63, 92, 6487, 365, 18, 5610, 67, 16518, 67, 26416, 67, 2039, ...
There are no rational points with x-cordinate 3.
There are no rational points with x-coordinate 3.
def lift_x(self, x, all=False): """ Given the x-coordinate of a point on the curve, use the defining polynomial to find all affine points on this curve with the given x-coordinate. EXAMPLES: sage: E = EllipticCurve('37a'); E Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field sage: E.lift_x(1) (1 : 0 : 1) sage: E.lift_x(2) (2 : 2 : 1) sage: E.lift_x(1/4, all=True) [(1/4 : -3/8 : 1), (1/4 : -5/8 : 1)] There are no rational points with x-cordinate 3. sage: E.lift_x(3) Traceback (most recent call last): ... ValueError: No point with x-coordinate 3 on Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field However, there are two such points in $E(\R)$: sage: E.change_ring(RR).lift_x(3, all=True) [(3.00000000000000 : 4.42442890089805 : 1.00000000000000), (3.00000000000000 : -5.42442890089805 : 1.00000000000000)] And of course it always works in $E(\C)$: sage: E.change_ring(RR).lift_x(.5, all=True) [] sage: E.change_ring(CC).lift_x(.5) (0.500000000000000 : -0.500000000000000 + 0.353553390593274*I : 1.00000000000000) We can perform these operations over finite fields too: sage: E = E.change_ring(GF(17)); E Elliptic Curve defined by y^2 + y = x^3 + 16*x over Finite Field of size 17 sage: E.lift_x(7) (7 : 11 : 1) sage: E.lift_x(3) Traceback (most recent call last): ... ValueError: No point with x-coordinate 3 on Elliptic Curve defined by y^2 + y = x^3 + 16*x over Finite Field of size 17 Note that there is only one lift with x-coordinate 10 in $E(\F_{17})$. sage: E.lift_x(10, all=True) [(10 : 8 : 1)] We can lift over more exotic rings too. sage: E = EllipticCurve('37a'); sage: E.lift_x(pAdicField(17, 5)(6)) (6 + O(17^5) : 2 + 16*17 + 16*17^2 + 16*17^3 + 16*17^4 + O(17^5) : 1 + O(17^5)) sage: K.<t> = PowerSeriesRing(QQ, 't', 5) sage: E.lift_x(1+t) (1 + t : 2*t - t^2 + 5*t^3 - 21*t^4 + O(t^5) : 1) sage: K.<a> = GF(16) sage: E = E.change_ring(K) sage: E.lift_x(a^3) (a^3 : a^3 + a : 1) AUTHOR: Robert Bradshaw, 2007-04-24 TEST: sage: E = EllipticCurve('37a').short_weierstrass_model().change_ring(GF(17)) sage: E.lift_x(3, all=True) [] sage: E.lift_x(7, all=True) [(7 : 3 : 1), (7 : 14 : 1)] """ a1, a2, a3, a4, a6 = self.ainvs() f = ((x + a2) * x + a4) * x + a6 K = self.base_ring() x += K(0) one = x.parent()(1) if a1.is_zero() and a3.is_zero(): if f.is_square(): if all: ys = f.sqrt(all=True) return [self.point([x, y, one], check=False) for y in ys] else: return self.point([x, f.sqrt(), one], check=False) else: b = (a1*x + a3) D = b*b + 4*f if K.characteristic() == 2: R = PolynomialRing(K, 'y') F = R([-f,b,1]) ys = F.roots(multiplicities=False) if all: return [self.point([x, y, one], check=False) for y in ys] elif len(ys) > 0: return self.point([x, ys[0], one], check=False) elif D.is_square(): if all: return [self.point([x, (-b+d)/2, one], check=False) for d in D.sqrt(all=True)] else: return self.point([x, (-b+D.sqrt())/2, one], check=False) if all: return [] else: raise ValueError, "No point with x-coordinate %s on %s"%(x, self)
b731b462902660c0112a8494ebc6f58ef36102b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b731b462902660c0112a8494ebc6f58ef36102b5/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28080, 67, 92, 12, 2890, 16, 619, 16, 777, 33, 8381, 4672, 3536, 16803, 326, 619, 17, 29191, 434, 279, 1634, 603, 326, 8882, 16, 999, 326, 9364, 16991, 358, 1104, 777, 28381, 3143, 603...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28080, 67, 92, 12, 2890, 16, 619, 16, 777, 33, 8381, 4672, 3536, 16803, 326, 619, 17, 29191, 434, 279, 1634, 603, 326, 8882, 16, 999, 326, 9364, 16991, 358, 1104, 777, 28381, 3143, 603...
self.__FSMList = None
self.__FSMList = []
def __init__(self, name, enterFunc=None, exitFunc=None, transitions=[], inspectorPos = []): """__init__(self, string, func, func, string[], inspectorPos = []) State constructor: takes name, enter func, exit func, and a list of states it can transition to.""" self.__enterFunc = None self.__exitFunc = None self.setName(name) self.setEnterFunc(enterFunc) self.setExitFunc(exitFunc) self.setTransitions(transitions) self.setInspectorPos(inspectorPos) self.__FSMList = None
ae1febeb5c821df1e582bd546df2303795b301cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/ae1febeb5c821df1e582bd546df2303795b301cf/State.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 6103, 2622, 33, 7036, 16, 2427, 2622, 33, 7036, 16, 13136, 22850, 6487, 22700, 1616, 273, 5378, 4672, 3536, 972, 2738, 972, 12, 2890, 16, 533, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 508, 16, 6103, 2622, 33, 7036, 16, 2427, 2622, 33, 7036, 16, 13136, 22850, 6487, 22700, 1616, 273, 5378, 4672, 3536, 972, 2738, 972, 12, 2890, 16, 533, 1...
print "</DIV>"
print "</div>"
def printFooter(): global slides print "</DIV>" if (slides == 0): print "<hr><font size=1>" print copyright print "</font><br>" print inputfile + "&nbsp&nbsp " + strftime("%Y/%m/%d %H:%M",localtime(time())) print "</BODY></HTML>"
7af5c2bb8f0372438a2b397a27fa3bf97585fc33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6154/7af5c2bb8f0372438a2b397a27fa3bf97585fc33/otl2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 13787, 13332, 2552, 30119, 1172, 6823, 2892, 2984, 309, 261, 2069, 4369, 422, 374, 4672, 1172, 3532, 7256, 4438, 5776, 963, 33, 21, 2984, 1172, 22245, 1172, 6823, 5776, 4438, 2848, 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, 1172, 13787, 13332, 2552, 30119, 1172, 6823, 2892, 2984, 309, 261, 2069, 4369, 422, 374, 4672, 1172, 3532, 7256, 4438, 5776, 963, 33, 21, 2984, 1172, 22245, 1172, 6823, 5776, 4438, 2848, 2...
linecache.checkcache('dummy')
linecache.checkcache('dummy')
def test_checkcache(self): getline = linecache.getline try: # Create a source file and cache its contents source_name = support.TESTFN + '.py' with open(source_name, 'w') as source: source.write(SOURCE_1) source.close() getline(source_name, 1)
044e4c9c6da3b4e39f47e76304c6d9c5e30271e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/044e4c9c6da3b4e39f47e76304c6d9c5e30271e1/test_linecache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1893, 2493, 12, 2890, 4672, 336, 1369, 273, 4739, 557, 807, 18, 588, 1369, 775, 30, 468, 1788, 279, 1084, 585, 471, 1247, 2097, 2939, 1084, 67, 529, 273, 2865, 18, 16961, 197...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1893, 2493, 12, 2890, 4672, 336, 1369, 273, 4739, 557, 807, 18, 588, 1369, 775, 30, 468, 1788, 279, 1084, 585, 471, 1247, 2097, 2939, 1084, 67, 529, 273, 2865, 18, 16961, 197...
outputFileName = '%s.lfns' % baseDir.replace('/lhcb','lhcb').replace('/','-')
outputFileName = '%s.lfns' % baseDir.replace( '/%s' % vo, '%s' % vo ).replace('/','-')
def isOlderThan(stringTime,days): timeDelta = timedelta(days=days) st = time.strptime(stringTime, "%a %b %d %H:%M:%S %Y") cTimeStruct = datetime(st[0],st[1],st[2],st[3],st[4],st[5],st[6],None) maxCTime = datetime.utcnow() - timeDelta if cTimeStruct < maxCTime: return True return False
1b6910692eb844db7ecf95ccef59c163c8c682c1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/1b6910692eb844db7ecf95ccef59c163c8c682c1/dirac-dms-user-lfns.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 51, 80, 765, 9516, 12, 1080, 950, 16, 9810, 4672, 813, 9242, 273, 10661, 12, 9810, 33, 9810, 13, 384, 273, 813, 18, 701, 10650, 12, 1080, 950, 16, 2213, 69, 738, 70, 738, 72, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 51, 80, 765, 9516, 12, 1080, 950, 16, 9810, 4672, 813, 9242, 273, 10661, 12, 9810, 33, 9810, 13, 384, 273, 813, 18, 701, 10650, 12, 1080, 950, 16, 2213, 69, 738, 70, 738, 72, ...
timeout_stop, 63100) b3.rendevous_servers(masterid)
timeout_stop, port=63100) b3.rendevous_servers(masterid, hostid)
def execute(self, timeout_sync, timeout_start, timeout_stop, hostid, masterid, all_ids): profilers = self.job.profilers
bfe244cad3cba5aa1084798635875025002e3538 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10349/bfe244cad3cba5aa1084798635875025002e3538/barriertest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 2021, 67, 8389, 16, 2021, 67, 1937, 16, 2021, 67, 5681, 16, 1479, 350, 16, 4171, 350, 16, 777, 67, 2232, 4672, 450, 7540, 414, 273, 365, 18, 4688, 18, 685, 7540, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1836, 12, 2890, 16, 2021, 67, 8389, 16, 2021, 67, 1937, 16, 2021, 67, 5681, 16, 1479, 350, 16, 4171, 350, 16, 777, 67, 2232, 4672, 450, 7540, 414, 273, 365, 18, 4688, 18, 685, 7540, ...
global prop_id prop_id = prop_id + 1 print ",("+`prop_id`+","+`channel`+",'"+name+"','"+owner+"','"+value+"')",
global next_prop, prop_id, props if (not name in props): next_prop = next_prop + 1 props[name] = next_prop prop_id = next_prop print "INSERT INTO property (id,name,owner,is_tag) VALUE ("+`prop_id`+",'"+name+"','"+owner+"',FALSE);" else: prop_id = props[name] print "INSERT INTO value (channel_id,property_id,value) VALUE ("+`channel`+","+`prop_id`+",'"+value+"');"
def insert_property(channel, name, owner, value): global prop_id prop_id = prop_id + 1 print ",("+`prop_id`+","+`channel`+",'"+name+"','"+owner+"','"+value+"')",
85d9a21e95668ee2b6ca8df4c7adbd3d6fa3eac5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6226/85d9a21e95668ee2b6ca8df4c7adbd3d6fa3eac5/create_bench_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 4468, 12, 4327, 16, 508, 16, 3410, 16, 460, 4672, 2552, 1024, 67, 5986, 16, 2270, 67, 350, 16, 3458, 309, 261, 902, 508, 316, 3458, 4672, 1024, 67, 5986, 273, 1024, 67, 598...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 4468, 12, 4327, 16, 508, 16, 3410, 16, 460, 4672, 2552, 1024, 67, 5986, 16, 2270, 67, 350, 16, 3458, 309, 261, 902, 508, 316, 3458, 4672, 1024, 67, 5986, 273, 1024, 67, 598...
"Sets the state of a SAX2 feature." raise SAXNotRecognizedException("Feature '%s' not recognized" % name)
if self._parsing: raise SAXNotSupportedException("Cannot set features while parsing") if name == feature_namespaces: self._namespaces = state else: raise SAXNotRecognizedException("Feature '%s' not recognized" % name)
def setFeature(self, name, state): "Sets the state of a SAX2 feature." raise SAXNotRecognizedException("Feature '%s' not recognized" % name)
0a3b4342d197874aa0d7e20bc27c568b6acaf892 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0a3b4342d197874aa0d7e20bc27c568b6acaf892/expatreader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28669, 12, 2890, 16, 508, 16, 919, 4672, 315, 2785, 326, 919, 434, 279, 10168, 22, 2572, 1199, 1002, 10168, 1248, 5650, 9367, 503, 2932, 4595, 1995, 87, 11, 486, 16332, 6, 738, 508, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 28669, 12, 2890, 16, 508, 16, 919, 4672, 315, 2785, 326, 919, 434, 279, 10168, 22, 2572, 1199, 1002, 10168, 1248, 5650, 9367, 503, 2932, 4595, 1995, 87, 11, 486, 16332, 6, 738, 508, 13...
print "
print "
def processStreamRegisterData(data): streamid, name, type, status = struct.unpack('i128sii', data) print "# Stream registration: " print "# * ID: %d" % int(streamid) print "# * name: '%s'" % name.strip() print "# * type: %d" % int(type) print "# * status: %d" % int(status)
c5c08ff7c0a005ebd1337e7a475bbd448d0fd528 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5557/c5c08ff7c0a005ebd1337e7a475bbd448d0fd528/rornet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1228, 3996, 751, 12, 892, 4672, 1407, 350, 16, 508, 16, 618, 16, 1267, 273, 1958, 18, 17309, 2668, 77, 10392, 87, 2835, 2187, 501, 13, 1172, 6619, 3961, 7914, 30, 315, 1172, 6619...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1228, 3996, 751, 12, 892, 4672, 1407, 350, 16, 508, 16, 618, 16, 1267, 273, 1958, 18, 17309, 2668, 77, 10392, 87, 2835, 2187, 501, 13, 1172, 6619, 3961, 7914, 30, 315, 1172, 6619...
req.args.get('force_passwd_change', false))
req.args.get('force_passwd_change', False))
def _do_config(self, req): stores = StoreOrder(stores=self.account_manager.stores, list=self.account_manager.password_store) if req.method == 'POST': _setorder(req, stores) self.config.set('account-manager', 'password_store', ','.join(stores.get_enabled_store_names())) for store in stores.get_all_stores(): for attr, option in _getoptions(store): newvalue = req.args.get('%s.%s' % (store.__class__.__name__, attr)) self.log.debug("%s.%s: %s" % (store.__class__.__name__, attr, newvalue)) if newvalue is not None: self.config.set(option.section, option.name, newvalue) self.config.save() self.config.set('account-manager', 'force_passwd_change', req.args.get('force_passwd_change', false)) self.config.set('account-manager', 'persistent_sessions', req.args.get('persistent_sessions', false)) self.config.set('account-manager', 'verify_email', req.args.get('verify_email', false)) self.config.save() sections = [] for store in self.account_manager.stores: options = [] for attr, option in _getoptions(store): opt_val = option.__get__(store, store) opt_val = isinstance(opt_val, Component) and \ opt_val.__class__.__name__ or opt_val options.append( {'label': attr, 'name': '%s.%s' % (store.__class__.__name__, attr), 'value': opt_val, }) continue sections.append( {'name': store.__class__.__name__, 'classname': store.__class__.__name__, 'order': stores[store], 'options' : options, }) continue sections = sorted(sections, key=lambda i: i['name']) numstores = range(0, stores.numstores() + 1) data = { 'sections': sections, 'numstores': numstores, 'force_passwd_change': self.account_manager.force_passwd_change, 'persistent_sessions': self.account_manager.persistent_sessions, 'verify_email': self.account_manager.verify_email, } return 'admin_accountsconfig.html', data
0fd27d7e3436bc82731f114de6a7a45eb807f03f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6208/0fd27d7e3436bc82731f114de6a7a45eb807f03f/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 1425, 12, 2890, 16, 1111, 4672, 9064, 273, 4994, 2448, 12, 19632, 33, 2890, 18, 4631, 67, 4181, 18, 19632, 16, 666, 33, 2890, 18, 4631, 67, 4181, 18, 3664, 67, 2233, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 67, 1425, 12, 2890, 16, 1111, 4672, 9064, 273, 4994, 2448, 12, 19632, 33, 2890, 18, 4631, 67, 4181, 18, 19632, 16, 666, 33, 2890, 18, 4631, 67, 4181, 18, 3664, 67, 2233, 1...
pstatus, pout = self.cmd.run('/sbin/service %s status' % \ entry.get('name')) if pstatus: self.cmd.run('/sbin/service %s start' % (entry.get('name'))) pstatus, pout = self.cmd.run('/sbin/service %s status' % \ entry.get('name'))
pstatus = self.cmd.run('/sbin/service %s status' % \ entry.get('name'))[0] needs_modification = ((command == 'start' and pstatus) or \ (command == 'stop' and not pstatus)) if not(self.setup.get('dryrun')) and needs_modification: self.cmd.run('/sbin/service %s %s' % (entry.get('name'), command)) pstatus = self.cmd.run('/sbin/service %s status' % \ entry.get('name'))[0]
def VerifyService(self, entry, _): '''Verify Service status for entry''' try: cmd = "/sbin/chkconfig --list %s " % (entry.get('name')) raw = self.cmd.run(cmd)[1] patterns = ["error reading information", "unknown service"] srvdata = [line.split() for line in raw for pattern in patterns \ if pattern not in line][0] except IndexError: # Ocurrs when no lines are returned (service not installed) entry.set('current_status', 'off') return False if len(srvdata) == 2: # This is an xinetd service if entry.get('status') == srvdata[1]: return True else: entry.set('current_status', srvdata[1]) return False
80c61484c8b2c3529ba85ac5cf77974f49b90baa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/80c61484c8b2c3529ba85ac5cf77974f49b90baa/Chkconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 1179, 12, 2890, 16, 1241, 16, 389, 4672, 9163, 8097, 1956, 1267, 364, 1241, 26418, 775, 30, 1797, 273, 2206, 87, 4757, 19, 27038, 1425, 1493, 1098, 738, 87, 315, 738, 261, 4099, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 1179, 12, 2890, 16, 1241, 16, 389, 4672, 9163, 8097, 1956, 1267, 364, 1241, 26418, 775, 30, 1797, 273, 2206, 87, 4757, 19, 27038, 1425, 1493, 1098, 738, 87, 315, 738, 261, 4099, ...
update=lambda ui, font: None):
update_func=lambda ui, font: None):
def setup_font_toggle(self, uimanager, path, stock=False, update=lambda ui, font: None):
eece067447253f895211dc99ada3433754a3d719 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4738/eece067447253f895211dc99ada3433754a3d719/editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 5776, 67, 14401, 12, 2890, 16, 582, 381, 1063, 16, 589, 16, 12480, 33, 8381, 16, 1089, 33, 14661, 5915, 16, 3512, 30, 599, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 5776, 67, 14401, 12, 2890, 16, 582, 381, 1063, 16, 589, 16, 12480, 33, 8381, 16, 1089, 33, 14661, 5915, 16, 3512, 30, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, ...
ctx = SSL.Context() s = SSL.Connection(ctx) s.connect(self.srv_addr) data = self.http_get(s) s.close() self.stop_server(pid)
try: ctx = SSL.Context() s = SSL.Connection(ctx) s.connect(self.srv_addr) data = self.http_get(s) s.close() finally: self.stop_server(pid)
def test_server_simple(self): pid = self.start_server(self.args) ctx = SSL.Context() s = SSL.Connection(ctx) s.connect(self.srv_addr) data = self.http_get(s) s.close() self.stop_server(pid) self.failIf(string.find(data, 's_server -quiet -www') == -1)
787f56abaf95d4b31f93406cbd1f766e498b370b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/787f56abaf95d4b31f93406cbd1f766e498b370b/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3567, 67, 9647, 12, 2890, 4672, 4231, 273, 365, 18, 1937, 67, 3567, 12, 2890, 18, 1968, 13, 775, 30, 1103, 273, 7419, 18, 1042, 1435, 272, 273, 7419, 18, 1952, 12, 5900, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3567, 67, 9647, 12, 2890, 4672, 4231, 273, 365, 18, 1937, 67, 3567, 12, 2890, 18, 1968, 13, 775, 30, 1103, 273, 7419, 18, 1042, 1435, 272, 273, 7419, 18, 1952, 12, 5900, 13...
html_filename = prefix + opts.suffix +".html"
html_filename = prefix + opts.suffix +".html"
def write_html_output(opts, args, fnameList, tagLists, \ doThumb=True, mapList = [],\ comment=None, CoincSummTable=None,\ html_tag = '', add_box_flag=False): """ @param opts: The options from the calling code @param args: The args from the calling code @param fnameList: A list of the filenames @param tagLists: A list for the tags, getting added to the links @param doThumb: Uses the _thumb file as the sourcs for the images @param mapList: A list of dictionaries to create the image maps @html_tag: tag to add to html filename @add_box_flag: Adds _OPEN_BOX to the html file name if any of the files in filelist have "_OPEN_BOX" in their name. Otherwise, will add "_CLOSED_BOX" to the file name. These flags go between opts.prefix and opts.suffix """ prefix = opts.prefix # add the html_tag if desired if html_tag != '': prefix += '_' + html_tag # add the box-flag to the prefix if desired if add_box_flag: box_flag = '' if any(fname for fname in fnameList if 'OPEN_BOX' in fname): box_flag ='_OPEN_BOX' else: box_flag = '_CLOSED_BOX' # add the box flag to the prefix prefix += box_flag # -- the HTML document and output cache file # -- initialise the web page calling init_page page, extra = init_markup_page(opts) page.h1(opts.name + " results") page.p(prefix + opts.suffix) page.hr() # -- filename html_filename = prefix + opts.suffix +".html" if opts.output_path: html_filename = opts.output_path + html_filename html_file = file(html_filename, "w") # loop over the contents for tag,filename in zip(tagLists,fnameList): # set the correct name for linking (two '//' does not bother) fname = "Images/" + os.path.basename(filename) # set the thumbnail pictures if required if doThumb: fname_thumb = fname[:-4] + "_thumb.png" else: fname_thumb =fname # add the image to tge page page.a(extra.img(src=[fname_thumb], width=400, \ alt=tag, border="2"), title=tag, href=[ fname]) page.add("<hr/>") # add maps to this page if len(mapList)>0: m=0 for mapDict in mapList: m+=1 page.add( mapDict['text']+'<br>' ) page.add( '<IMG src="%s" width=800px '\ 'usemap="#map%d">' % ( mapDict['object'], m) ) page.add( '<MAP name="map%d"> <P>' % m ) n=0 for px, py, link in zip( mapDict['xCoords'], \ mapDict['yCoords'], \ mapDict['links']): n+=1 page.add( '<area href="%s" shape="circle" '\ 'coords="%d, %d, 5"> Point%d</a>' %\ ( link, px, py, n) ) page.add('</P></MAP></OBJECT><br>') page.add("<hr/>") if opts.enable_output: if comment is not None: page.add("<div> "+comment+"</div>") page.hr() if CoincSummTable is not None: page.add(CoincSummTable) page.hr() text = writeProcessParams( opts.name, opts.version, args) page.add(text) html_file.write(page(False)) html_file.close() return html_filename
08b9a01049dc1b59f27566bdf04494b45b5e456a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/08b9a01049dc1b59f27566bdf04494b45b5e456a/InspiralUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2620, 67, 2844, 12, 4952, 16, 833, 16, 5299, 682, 16, 1047, 7432, 16, 521, 741, 18922, 33, 5510, 16, 852, 682, 273, 5378, 17211, 2879, 33, 7036, 16, 28932, 71, 3495, 81, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2620, 67, 2844, 12, 4952, 16, 833, 16, 5299, 682, 16, 1047, 7432, 16, 521, 741, 18922, 33, 5510, 16, 852, 682, 273, 5378, 17211, 2879, 33, 7036, 16, 28932, 71, 3495, 81, 13...
tgargs = string.split(tgargs, '\\000')
if string.find(tgargs, '\000') != -1: tgargs = string.split(tgargs, '\000') else: tgargs = string.split(tgargs, '\\000') if len(tgargs) != 7: raise RuntimeError, "error parsing trigger args for foreign key: %s" \ % repr(tgargs)
def _get_foreign_keys(conn): """Find foreign keys by looking at triggers. (Query adapted from query posted to pgsql-general by Michael Fork according to http://www.geocrawler.com/mail/msg.php3?msg_id=4895586&list=12) """ fkeys = {} for (tgargs,) in _query(conn, ''' SELECT pt.tgargs FROM pg_class pc, pg_proc pg_proc, pg_proc pg_proc_1, pg_trigger pg_trigger, pg_trigger pg_trigger_1, pg_proc pp, pg_trigger pt WHERE pt.tgrelid = pc.oid AND pp.oid = pt.tgfoid AND pg_trigger.tgconstrrelid = pc.oid AND pg_proc.oid = pg_trigger.tgfoid AND pg_trigger_1.tgfoid = pg_proc_1.oid AND pg_trigger_1.tgconstrrelid = pc.oid AND ((pp.proname LIKE '%ins') AND (pg_proc.proname LIKE '%upd') AND (pg_proc_1.proname LIKE '%del') AND (pg_trigger.tgrelid=pt.tgconstrrelid) AND (pg_trigger_1.tgrelid = pt.tgconstrrelid))'''): tgargs = string.split(tgargs, '\\000') (name, owner_table, referenced_table, unknown, column, referenced_table_pkey, blank) = tgargs t = fkeys.get(owner_table, None) if not t: t = {} fkeys[owner_table] = t t[column] = (referenced_table, referenced_table_pkey) return fkeys
0509e814fcecf4c755d5c98cbee943439ce01c0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4243/0509e814fcecf4c755d5c98cbee943439ce01c0c/pgschema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 12774, 67, 2452, 12, 4646, 4672, 3536, 3125, 5523, 1311, 635, 7849, 622, 11752, 18, 261, 1138, 28345, 628, 843, 23082, 358, 293, 30175, 17, 12259, 635, 490, 1354, 69, 292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12774, 67, 2452, 12, 4646, 4672, 3536, 3125, 5523, 1311, 635, 7849, 622, 11752, 18, 261, 1138, 28345, 628, 843, 23082, 358, 293, 30175, 17, 12259, 635, 490, 1354, 69, 292, ...
stylesheet = self.get_stylesheet_reference(os.getcwd())
stylesheet = self.get_stylesheet_reference( os.path.join(os.getcwd(), 'dummy'))
def __init__(self, document): nodes.NodeVisitor.__init__(self, document) self.settings = settings = document.settings lcode = settings.language_code self.language = languages.get_language(lcode) self.head_prefix = [ self.doctype, self.html_head % (lcode, lcode), self.content_type % settings.output_encoding, self.generator % docutils.__version__] if settings.xml_declaration: self.head_prefix.insert(0, self.xml_declaration % settings.output_encoding) self.head = [] if settings.embed_stylesheet: stylesheet = self.get_stylesheet_reference(os.getcwd()) stylesheet_text = open(stylesheet).read() self.stylesheet = [self.embedded_stylesheet % stylesheet_text] else: stylesheet = self.get_stylesheet_reference() if stylesheet: self.stylesheet = [self.stylesheet_link % stylesheet] else: self.stylesheet = [] self.body_prefix = ['</head>\n<body>\n'] self.body_pre_docinfo = [] self.docinfo = [] self.body = [] self.body_suffix = ['</body>\n</html>\n'] self.section_level = 0 self.context = [] self.topic_class = '' self.colspecs = [] self.compact_p = 1 self.compact_simple = None self.in_docinfo = None self.in_sidebar = None
1eff2b1ee4fcadcc31a24d5733a134c8b5940abf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/1eff2b1ee4fcadcc31a24d5733a134c8b5940abf/html4css1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1668, 4672, 2199, 18, 907, 7413, 16186, 2738, 972, 12, 2890, 16, 1668, 13, 365, 18, 4272, 273, 1947, 273, 1668, 18, 4272, 328, 710, 273, 1947, 18, 4923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1668, 4672, 2199, 18, 907, 7413, 16186, 2738, 972, 12, 2890, 16, 1668, 13, 365, 18, 4272, 273, 1947, 273, 1668, 18, 4272, 328, 710, 273, 1947, 18, 4923, ...
def initialise(xc, dbname):
def initialise(xc):
def initialise(xc, dbname): global xappy_client xappy_client = xc fields = [] for model in models.get_models(): if not hasattr(model, 'Searchable'): continue fields = fields + get_configuration(model) if len(fields)==0: return xappy_client.newdb(fields, dbname) post_save.connect(index_hook) pre_delete.connect(delete_hook)
15af30161f90063db6a4f3fa42269f0aae39bb9a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9909/15af30161f90063db6a4f3fa42269f0aae39bb9a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21301, 12, 6511, 4672, 2552, 619, 438, 2074, 67, 2625, 619, 438, 2074, 67, 2625, 273, 15192, 1466, 273, 5378, 364, 938, 316, 3679, 18, 588, 67, 7665, 13332, 309, 486, 3859, 12, 2284, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21301, 12, 6511, 4672, 2552, 619, 438, 2074, 67, 2625, 619, 438, 2074, 67, 2625, 273, 15192, 1466, 273, 5378, 364, 938, 316, 3679, 18, 588, 67, 7665, 13332, 309, 486, 3859, 12, 2284, 1...
bdate = tuple([int(x) for x in anketa['Birthday'].split('-')]+[1 for i in range(9)])[:9] vcard.setTagData('BDAY', time.strftime('%d %B %Y', bdate)+' г.')
vcard.setTagData('BDAY',anketa['Birthday'])
def anketa2vcard(self, anketa, avatara, ava_typ, album): attributes = { 'xmlns':"vcard-temp", #'prodid':"-//HandGen//NONSGML vGen v1.0//EN", #'version':"2.0" } e_mail = xmpp.Node('EMAIL') tel = xmpp.Node('TEL') adr = xmpp.Node('ADR') N = xmpp.Node('N') vcard = xmpp.Node('vCard', attrs=attributes) vcard.setTagData('FN', anketa['FirstName'] + ' ' + anketa['LastName']) N.setTagData('FAMILY', anketa['LastName']) N.setTagData('GIVEN', anketa['FirstName']) vcard.addChild(node=N) if anketa['Nickname'].strip(): vcard.setTagData('NICKNAME', anketa['Nickname']) else: vcard.setTagData('NICKNAME', anketa['Username']) try: bdate = tuple([int(x) for x in anketa['Birthday'].split('-')]+[1 for i in range(9)])[:9] vcard.setTagData('BDAY', time.strftime('%d %B %Y', bdate)+' г.') except: pass #traceback.print_exc() e_mail.setTagData('INTERNET', '') e_mail.setTagData('USERID', anketa['Username']+'@'+anketa['Domain']) tel.setTagData('HOME', '') tel.setTagData('VOICE', '') tel.setTagData('NUMBER', anketa['Phone']) vcard.setPayload([tel,e_mail],add=1) desc = '' if anketa['Sex'] == '1': desc = 'Пол: Мужской\n' elif anketa['Sex'] == '2': desc = 'Пол: Женский\n' if ZODIAC.has_key(anketa['Zodiac']): desc += 'Знак зодиака: %s\n' % ZODIAC[anketa['Zodiac']] location = anketa['Location'] if location: coords = location.strip().split(',') if len(coords) == 1: country = coords[0].strip() adr.setTagData('CTRY', country) elif len(coords) == 2: country = coords[0].strip() city = coords[1].strip() adr.setTagData('CTRY', country) adr.setTagData('LOCALITY', city) elif len(coords) > 2: country = coords[0].strip() region = ','.join(coords[1:-1]).strip() city = coords[-1].strip() adr.setTagData('CTRY', country) adr.setTagData('REGION', region) adr.setTagData('LOCALITY', city) vcard.setPayload([adr],add=1) if avatara and (ava_typ in ['image/gif','image/jpeg','image/png']): photo = xmpp.Node('PHOTO') avahex = base64.encodestring(avatara) photo.setTagData('TYPE', ava_typ) photo.setTagData('BINVAL', '\n'+avahex) vcard.setPayload([photo],add=1) desc += 'Фотоальбом: %s\n' % album.__str__() vcard.setTagData('DESC', desc) return vcard
0d8e67c5a3af3419a7d7a7ea0ed074f7342e61f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12148/0d8e67c5a3af3419a7d7a7ea0ed074f7342e61f2/glue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 392, 79, 1066, 22, 90, 3327, 12, 2890, 16, 392, 79, 1066, 16, 16910, 69, 16, 1712, 69, 67, 12846, 16, 14844, 4672, 1677, 273, 288, 296, 16741, 11, 2773, 90, 3327, 17, 5814, 3113, 257...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 392, 79, 1066, 22, 90, 3327, 12, 2890, 16, 392, 79, 1066, 16, 16910, 69, 16, 1712, 69, 67, 12846, 16, 14844, 4672, 1677, 273, 288, 296, 16741, 11, 2773, 90, 3327, 17, 5814, 3113, 257...
return SymbolicConstant( operator.mul(self._obj, right._obj) )
constants = isinstance(self._obj, sage.functions.constants.Constant) or isinstance(right._obj, sage.functions.constants.Constant) if not constants: return SymbolicConstant( operator.mul(self._obj, right._obj) )
def _mul_(self, right): """ EXAMPLES: sage: SR = SymbolicExpressionRing() sage: a = SR(2) sage: b = a*2; b 4 sage: type(b) <class 'sage.calculus.calculus.SymbolicConstant'> sage: prod([a for i in range(1000)]) 10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376 sage: type(_) <class 'sage.calculus.calculus.SymbolicConstant'> """ if isinstance(right, SymbolicConstant): try: self_parent = self._obj.parent() right_parent = right._obj.parent() if self_parent != SR and right_parent != SR and ( self_parent.has_coerce_map_from(right_parent) or right_parent.has_coerce_map_from(self_parent) ): return SymbolicConstant( operator.mul(self._obj, right._obj) )
993e75de689452f353237b0d35977690e5757ce1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/993e75de689452f353237b0d35977690e5757ce1/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16411, 67, 12, 2890, 16, 2145, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 19145, 273, 16455, 12164, 2300, 10369, 1435, 272, 410, 30, 279, 273, 19145, 12, 22, 13, 272, 410, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16411, 67, 12, 2890, 16, 2145, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 19145, 273, 16455, 12164, 2300, 10369, 1435, 272, 410, 30, 279, 273, 19145, 12, 22, 13, 272, 410, 3...
def fl_set_form_title(form, name): """ fl_set_form_title(form, name) """ _fl_set_form_title(form, name)
def fl_set_form_title(pForm, name): """ fl_set_form_title(pForm, name) """ _fl_set_form_title(pForm, name)
def fl_set_form_title(form, name): """ fl_set_form_title(form, name) """ _fl_set_form_title(form, name)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 687, 67, 2649, 12, 84, 1204, 16, 508, 4672, 3536, 1183, 67, 542, 67, 687, 67, 2649, 12, 84, 1204, 16, 508, 13, 3536, 225, 389, 2242, 67, 542, 67, 687, 67, 2649, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 67, 542, 67, 687, 67, 2649, 12, 84, 1204, 16, 508, 4672, 3536, 1183, 67, 542, 67, 687, 67, 2649, 12, 84, 1204, 16, 508, 13, 3536, 225, 389, 2242, 67, 542, 67, 687, 67, 2649, ...
def test_rel_trough_to_value_list(self):
def test_rel_through_to_value_list(self):
def test_rel_trough_to_value_list(self): class User(Entity): has_field('name', String(64)) has_and_belongs_to_many('kw', of_kind='Keyword') has_many('keywords', through='kw', via='keyword')
d07310fec74c3754b0c0dca30b6c145e72d2de3e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11921/d07310fec74c3754b0c0dca30b6c145e72d2de3e/test_through.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2878, 67, 10064, 67, 869, 67, 1132, 67, 1098, 12, 2890, 4672, 667, 2177, 12, 1943, 4672, 711, 67, 1518, 2668, 529, 2187, 514, 12, 1105, 3719, 711, 67, 464, 67, 13285, 7260, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2878, 67, 10064, 67, 869, 67, 1132, 67, 1098, 12, 2890, 4672, 667, 2177, 12, 1943, 4672, 711, 67, 1518, 2668, 529, 2187, 514, 12, 1105, 3719, 711, 67, 464, 67, 13285, 7260, ...
len('\n ') + 1024 + len('...(truncated)'))
1024 + len('...(truncated)'))
def test_truncation(self): 'Verify that very long output is truncated' gdb_repr, gdb_output = self.get_gdb_repr('print range(1000)') self.assertEquals(gdb_repr, "\n [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, " "14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, " "27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, " "40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, " "53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, " "66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, " "79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, " "92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, " "104, 105, 106, 107, 108, 109, 110, 111, 112, 113, " "114, 115, 116, 117, 118, 119, 120, 121, 122, 123, " "124, 125, 126, 127, 128, 129, 130, 131, 132, 133, " "134, 135, 136, 137, 138, 139, 140, 141, 142, 143, " "144, 145, 146, 147, 148, 149, 150, 151, 152, 153, " "154, 155, 156, 157, 158, 159, 160, 161, 162, 163, " "164, 165, 166, 167, 168, 169, 170, 171, 172, 173, " "174, 175, 176, 177, 178, 179, 180, 181, 182, 183, " "184, 185, 186, 187, 188, 189, 190, 191, 192, 193, " "194, 195, 196, 197, 198, 199, 200, 201, 202, 203, " "204, 205, 206, 207, 208, 209, 210, 211, 212, 213, " "214, 215, 216, 217, 218, 219, 220, 221, 222, 223, " "224, 225, 226...(truncated)") self.assertEquals(len(gdb_repr), len('\n ') + 1024 + len('...(truncated)'))
abb1b1260395c6035f4ff47a82529a3c4d3d369c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/abb1b1260395c6035f4ff47a82529a3c4d3d369c/test_gdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 23558, 367, 12, 2890, 4672, 296, 8097, 716, 8572, 1525, 876, 353, 15282, 11, 314, 1966, 67, 12715, 16, 314, 1966, 67, 2844, 273, 365, 18, 588, 67, 75, 1966, 67, 12715, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23558, 367, 12, 2890, 4672, 296, 8097, 716, 8572, 1525, 876, 353, 15282, 11, 314, 1966, 67, 12715, 16, 314, 1966, 67, 2844, 273, 365, 18, 588, 67, 75, 1966, 67, 12715, 2668, ...
gridWindow = self.buttonOwner.widget.GetGridWindow() if self.buttonState['overButton']: if UserCollection(item).checked: text = _(u"Remove overlay")
if self.allowOverlay (item): gridWindow = self.buttonOwner.widget.GetGridWindow() if self.buttonState['overButton']: if UserCollection(item).checked: text = _(u"Remove overlay") else: text = _(u"Overlay collection") gridWindow.SetToolTipString (text) gridWindow.GetToolTip().Enable (True)
def onOverButton (self, item): gridWindow = self.buttonOwner.widget.GetGridWindow() if self.buttonState['overButton']: if UserCollection(item).checked: text = _(u"Remove overlay") else: text = _(u"Overlay collection") gridWindow.SetToolTipString (text) gridWindow.GetToolTip().Enable (True) else: toolTip = gridWindow.GetToolTip() if toolTip: gridWindow.GetToolTip().Enable (False) gridWindow.SetToolTip (None)
eeb8f8642f8e940a272c27dd17b6f63c70c0e085 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/eeb8f8642f8e940a272c27dd17b6f63c70c0e085/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 4851, 3616, 261, 2890, 16, 761, 4672, 309, 365, 18, 5965, 11627, 261, 1726, 4672, 3068, 3829, 273, 365, 18, 5391, 5541, 18, 6587, 18, 967, 6313, 3829, 1435, 309, 365, 18, 5391, 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, 603, 4851, 3616, 261, 2890, 16, 761, 4672, 309, 365, 18, 5965, 11627, 261, 1726, 4672, 3068, 3829, 273, 365, 18, 5391, 5541, 18, 6587, 18, 967, 6313, 3829, 1435, 309, 365, 18, 5391, 11...
cCSP.csplog().setTimeLogging(1)
def setLogPriority(): cCSP.csplog().setTimeLogging(1) if log_priority is None: return cCSP.csplog().setLogPriority(log_priority) SimData.log().setLogPriority(log_priority)
3c6140f19b6bc70aeaf66bb7568cd2139834f97a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14747/3c6140f19b6bc70aeaf66bb7568cd2139834f97a/CSPSim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 1343, 8183, 13332, 309, 613, 67, 8457, 353, 599, 30, 327, 276, 28594, 18, 28229, 1330, 7675, 542, 1343, 8183, 12, 1330, 67, 8457, 13, 9587, 751, 18, 1330, 7675, 542, 1343, 8183, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 1343, 8183, 13332, 309, 613, 67, 8457, 353, 599, 30, 327, 276, 28594, 18, 28229, 1330, 7675, 542, 1343, 8183, 12, 1330, 67, 8457, 13, 9587, 751, 18, 1330, 7675, 542, 1343, 8183, 1...
conf_file_ids = set()
def call(self, auth, node_id_or_hostname_list = None): timestamp = int(time.time())
3876b7ec1bb7969648393315537474e9063276a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/3876b7ec1bb7969648393315537474e9063276a2/GetSlivers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 1357, 16, 756, 67, 350, 67, 280, 67, 10358, 67, 1098, 273, 599, 4672, 2858, 273, 509, 12, 957, 18, 957, 10756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 1357, 16, 756, 67, 350, 67, 280, 67, 10358, 67, 1098, 273, 599, 4672, 2858, 273, 509, 12, 957, 18, 957, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
smallest field containing a and b with generators i, j, k with i^2=a, j^2=b and i*j=-j*i.::
`smallest` field containing the nonzero elements a and b with generators i, j, k with i^2=a, j^2=b and j*i=-i*j.::
def QuaternionAlgebra(arg0, arg1=None, arg2=None, names='i,j,k'): """ There are three input formats:: - QuaternionAlgebra(a, b): quaternion algebra with i^2 = a, j^2 = b, i*j=k - QuaternionAlgebra(K, a, b): same as above but over a field K - QuaternionAlgebra(D): a rational quaternion algebra with discriminant D EXAMPLES:: QuaternionAlgebra(a, b) - return quaternion algebra over the smallest field containing a and b with generators i, j, k with i^2=a, j^2=b and i*j=-j*i.:: sage: QuaternionAlgebra(-2,-3) Quaternion Algebra (-2, -3) with base ring Rational Field sage: QuaternionAlgebra(GF(5)(2), GF(5)(3)) Quaternion Algebra (2, 3) with base ring Finite Field of size 5 sage: QuaternionAlgebra(QQ[sqrt(2)](-1), -5) Quaternion Algebra (-1, -5) with base ring Number Field in sqrt2 with defining polynomial x^2 - 2 sage: QuaternionAlgebra(sqrt(-1), sqrt(-3)) Quaternion Algebra (I, sqrt(3)*I) with base ring Symbolic Ring QuaternionAlgebra(K, a, b) - return quaternion algebra over the field K with generators i, j, k with i^2=a, j^2=b and i*j=-j*i.:: sage: QuaternionAlgebra(QQ, -7, -21) Quaternion Algebra (-7, -21) with base ring Rational Field sage: QuaternionAlgebra(QQ[sqrt(2)], -2,-3) Quaternion Algebra (-2, -3) with base ring Number Field in sqrt2 with defining polynomial x^2 - 2 QuaternionAlgebra(D) - D a squarefree integer; returns a rational quaternion algebra of discriminant D.:: sage: QuaternionAlgebra(1) Quaternion Algebra (-1, 1) with base ring Rational Field sage: QuaternionAlgebra(2) Quaternion Algebra (-1, -1) with base ring Rational Field sage: QuaternionAlgebra(7) Quaternion Algebra (-1, -7) with base ring Rational Field sage: QuaternionAlgebra(2*3*5*7) Quaternion Algebra (-22, 210) with base ring Rational Field If the coefficients `a` and `b` in the definition of the quaternion algebra are not integral, then a slower generic type is used for arithmetic:: sage: type(QuaternionAlgebra(-1,-3).0) <type 'sage.algebras.quaternion_algebra_element.QuaternionAlgebraElement_rational_field'> sage: type(QuaternionAlgebra(-1,-3/2).0) <type 'sage.algebras.quaternion_algebra_element.QuaternionAlgebraElement_generic'> Make sure caching is sane: sage: A = QuaternionAlgebra(2,3); A Quaternion Algebra (2, 3) with base ring Rational Field sage: B = QuaternionAlgebra(GF(5)(2),GF(5)(3)); B Quaternion Algebra (2, 3) with base ring Finite Field of size 5 sage: A is QuaternionAlgebra(2,3) True sage: B is QuaternionAlgebra(GF(5)(2),GF(5)(3)) True sage: Q = QuaternionAlgebra(2); Q Quaternion Algebra (-1, -1) with base ring Rational Field sage: Q is QuaternionAlgebra(QQ,-1,-1) True sage: Q is QuaternionAlgebra(-1,-1) True sage: Q.<ii,jj,kk> = QuaternionAlgebra(15); Q.variable_names() ('ii', 'jj', 'kk') sage: QuaternionAlgebra(15).variable_names() ('i', 'j', 'k') """ # QuaternionAlgebra(D) if arg1 is None and arg2 is None: K = QQ D = Integer(arg0) a, b = hilbert_conductor_inverse(D) a = Rational(a); b = Rational(b) elif arg2 is None: if is_Element(arg0): # QuaternionAlgebra(a, b) v = Sequence([arg0, arg1]) K = v.universe().fraction_field() a = v[0] b = v[1] else: raise ValueError, "unknown input" # QuaternionAlgebra(K, a, b) else: K = arg0 if not is_Field(K): raise TypeError, "base ring of quaternion algebra must be a field" a = K(arg1) b = K(arg2) global _cache names = normalize_names(3, names) key = (K, a, b, names) if _cache.has_key(key): return _cache[key] A = QuaternionAlgebra_ab(K, a, b, names=names) A._key = key _cache[key] = A return A
d3c151fbb82f00af772a908259fff7e9b7e9c52f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d3c151fbb82f00af772a908259fff7e9b7e9c52f/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4783, 17848, 1067, 29087, 12, 3175, 20, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 16, 1257, 2218, 77, 16, 78, 16, 79, 11, 4672, 3536, 6149, 854, 8925, 810, 6449, 2866, 225, 300...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4783, 17848, 1067, 29087, 12, 3175, 20, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 16, 1257, 2218, 77, 16, 78, 16, 79, 11, 4672, 3536, 6149, 854, 8925, 810, 6449, 2866, 225, 300...
for node in graph.vertices(): part.append(graph.neighbors(node))
for vertex in graph.vertices(): part.append(graph.neighbors(vertex))
def genus(self): """ Returns the minimal genus of the graph. The genus of a compact surface is the number of handles it has. The genus of a graph is the minimal genus of the surface it can be embedded into. Note -- This function uses Euler's formula and thus it is necessary to consider only connected graphs. EXAMPLES: sage: (graphs.PetersenGraph()).genus() 1 sage: (graphs.CubeGraph(3)).genus() 0 sage: K23 = graphs.CompleteBipartiteGraph(2,3) sage: K23.genus() 0 sage: K33 = graphs.CompleteBipartiteGraph(3,3) sage: K33.genus() 1 """ if not self.is_connected(): raise TypeError("Graph must be connected to use Euler's Formula to compute minimal genus.") from sage.rings.infinity import Infinity from sage.combinat.all import CyclicPermutationsOfPartition from sage.graphs.graph_genus1 import trace_faces, nice_copy
e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 407, 12, 2890, 4672, 3536, 2860, 326, 16745, 3157, 407, 434, 326, 2667, 18, 225, 1021, 3157, 407, 434, 279, 6739, 9034, 353, 326, 1300, 434, 7372, 518, 711, 18, 225, 1021, 3157, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 407, 12, 2890, 4672, 3536, 2860, 326, 16745, 3157, 407, 434, 326, 2667, 18, 225, 1021, 3157, 407, 434, 279, 6739, 9034, 353, 326, 1300, 434, 7372, 518, 711, 18, 225, 1021, 3157, ...
rv = 0
rv = 0
def _quit(self):
f776dee6dd3d11f084071f52200838aeed0f4613 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f776dee6dd3d11f084071f52200838aeed0f4613/PackageManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 27176, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 27176, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
ntag.set_parent(otag.get_parent())
if otag.has_parent(): opar = otag.get_parent() ntag.reparent(opar)
def rename_tag(self, oldname, newname): if len(newname) > 0 and \ oldname not in ['gtg-tags-none','gtg-tags-all']: if newname[0] != "@": newname = "@" + newname if newname != oldname and newname != None \ and not self.tree.has_node(newname): ntag = self.new_tag(newname) otag = self.tree.get_node(oldname) #copy attributes for att in otag.get_all_attributes(butname=True): ntag.set_attribute(att,otag.get_attribute(att)) #restore position in tree ntag.set_parent(otag.get_parent()) for ch in otag.get_children(): tagchild = self.get_tag(ch) tagchild.reparent(ntag) #copy tasks for tid in otag.get_tasks(): tas = self.req.get_task(tid) tas.rename_tag(oldname,newname) #remove the old one self.tree.remove_node(oldname,otag)
fc1bc36e2e7aba88e0b23a9da333c5327c5277c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/fc1bc36e2e7aba88e0b23a9da333c5327c5277c8/tagstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6472, 67, 2692, 12, 2890, 16, 1592, 529, 16, 26722, 4672, 309, 562, 12, 2704, 529, 13, 405, 374, 471, 521, 1592, 529, 486, 316, 10228, 4521, 75, 17, 4156, 17, 6102, 17023, 4521, 75, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6472, 67, 2692, 12, 2890, 16, 1592, 529, 16, 26722, 4672, 309, 562, 12, 2704, 529, 13, 405, 374, 471, 521, 1592, 529, 486, 316, 10228, 4521, 75, 17, 4156, 17, 6102, 17023, 4521, 75, ...
gcceso_dict[tempdir+"/sage/libs/mwrank/mwrank.o"].generate_action(env).dep_register(mwrankcc.generate_action(env))
try: gcceso_dict[tempdir+"/sage/libs/mwrank/mwrank.o"].generate_action(env).dep_register(mwrankcc.generate_action(env)) except KeyError: pass
def buildsage(env, gccc): TM = taskmanager.TM efw = extfilewalker() efw.addcallback('.pyx',lambda x: True) pyx_list = efw.walk('devel/sage/sage') develdir = os.path.realpath(env.options['SAGE_ROOT'] + '/devel/sage/') if verbose>100: print 'Devel Dir: ' + develdir cyc = Cython_compiler() cyc.set_option_val('-I'+'.',None) pyx_pextn_dict = cyc.get_build_extensions(env, pyx_list, cwd = develdir) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/flint/fmpz_poly.pyx"),include_dirs = [abs_sage_local(env, 'include/FLINT/')], libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],prop_options={ str(GCC_extension_object): {'-std':'c99' } } ) ntllibs = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"] config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_ZZ.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_ZZX.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_ZZ_pContext.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_ZZ_p.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_ZZ_pX.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_ZZ_pEContext.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_ZZ_pE.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_ZZ_pEX.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_lzz_pContext.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_lzz_p.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_lzz_pX.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_GF2.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_GF2X.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_GF2EContext.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_GF2E.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_GF2EX.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_mat_ZZ.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_mat_GF2E.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/ntl/ntl_GF2EContext.pyx"),language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/mwrank/mwrank.pyx"),define_macros=[("NTL_ALL",None)], libraries=["curvesntl", "g0nntl", "jcntl", "rankntl", "ntl", "gmp", "gmpxx", "stdc++", "m", "pari"] ) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/pari/gen.pyx"),libraries=['pari', 'gmp']) cremonalibs = ['g0nntl', 'jcntl', 'gmpxx', 'ntl', 'gmp', 'm', 'stdc++', 'pari', 'curvesntl'] config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/cremona/mat.pyx"),language="C++", define_macros=[("NTL_ALL",None)], libraries=cremonalibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/libs/cremona/homspace.pyx"),language="C++", define_macros=[("NTL_ALL",None)], libraries=cremonalibs) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/rings/finite_field_givaro.pyx"),language="C++", libraries=['givaro', 'gmpxx', 'gmp', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/finite_field_ntl_gf2e.pyx'),language="C++", libraries=['ntl', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,"sage/rings/real_rqdf.pyx"),language="C++", libraries=['qd', 'm', 'stdc++','gmp','mpfr','qd', 'csage' ]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/misc.pyx'),libraries=['mpfr','gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_integer_2x2.pyx'),libraries=['gmp']) BLAS = env.options['BLAS'] BLAS2 = env.options['BLAS2'] config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/libs/linbox/linbox.pyx'),language="C++", libraries=['linboxwrap', 'ntl', 'linbox', 'gmp', 'gmpxx', 'stdc++', 'givaro', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/libs/singular/singular.pyx'),language='C++', include_dirs=[abs_sage_local(env,'include/singular')], libraries=['m', 'readline', 'singular', 'singfac', 'singcf', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/libs/fplll/fplll.pyx'),language='C++', include_dirs = [abs_sage_local(env, 'include/fplll')], libraries=['gmp', 'mpfr', 'stdc++', 'fplll']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_modn_dense.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_mod2_dense.pyx'),libraries = ['gmp','m4ri']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_rational_dense.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_integer_sparse.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_rational_sparse.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_integer_dense.pyx'),libraries = ['iml', 'gmp', 'm', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_real_double_dense.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], include_dirs = [abs_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries=[BLAS, BLAS2, 'gsl']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/change_ring.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=[BLAS, BLAS2, 'gsl', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_complex_double_dense.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], include_dirs=[abs_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/solve.pyx'),define_macros = [('GSL_DISABLE_DEPRECATED','1')], libraries = ['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/matrix/matrix_mpolynomial_dense.pyx'),language="C++", include_dirs = [abs_sage_local(env,'include/singular')], libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/complex_number.pyx'),libraries = ['mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/gsl/probability_distribution.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/gsl/integration.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/gsl/ode.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/gsl/fft.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/gsl/interpolation.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/gsl/callback.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/real_double.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', 'gmp', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/complex_double.pyx'),libraries = ['gsl', BLAS, BLAS2, 'pari', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/modules/real_double_vector.pyx'),define_macros = [('GSL_DISABLE_DEPRECAED','1')], include_dirs=[abs_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries = ['gsl', BLAS, BLAS2, 'pari','gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/modules/complex_double_vector.pyx'),define_macros = [('GSL_DISABLE_DEPRECAED','1')], include_dirs=[abs_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries = ['gsl', BLAS, BLAS2, 'pari','gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/modules/vector_integer_dense.pyx'),libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/modules/vector_rational_dense.pyx'),libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/gsl/gsl_array.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/gsl/ode.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl',BLAS]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/gsl/dwt.pyx'),define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl',BLAS]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/libs/symmetrica/symmetrica.pyx'),libraries=['symmetrica']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/ext/arith_gmp.pyx'),libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/ext/multi_modular.pyx'),libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/polynomial/multi_polynomial_libsingular.pyx'),language='C++', include_dirs = [abs_sage_local(env,'include/singular')], libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx'),language='C++', include_dirs = [abs_sage_local(env,'include/singular')], libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/structure/sage_object.pyx'),libraries=['ntl']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/real_mpfr.pyx'),libraries = ['mpfi', 'mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/real_mpfi.pyx'),libraries = ['mpfi', 'mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/complex_interval.pyx'),libraries = ['mpfi', 'mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/integer.pyx'),libraries = ['ntl', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/integer_ring.pyx'),libraries = ['ntl', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/interfaces/libecm.pyx'),libraries = ['ecm', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/pow_computer.pyx'),language='C++', libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/pow_computer_ext.pyx'),language='C++', libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"]) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/padic_fixed_mod_element.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/padic_capped_absolute_element.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/padic_capped_relative_element.pyx'),libraries = ['gmp', 'csage']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/padic_ext_element.pyx'),language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/padic_ZZ_pX_element.pyx'),language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/padic_ZZ_pX_FM_element.pyx'),language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/padic_ZZ_pX_CR_element.pyx'),language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/padic_ZZ_pX_CA_element.pyx'),language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/padics/padic_printing.pyx'),language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/memory.pyx'),libraries = ['gmp','stdc++']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/bernoulli_mod_p.pyx'),language = 'C++', include_dirs = [abs_sage_path(env,'sage/libs/ntl/')], libraries=['ntl','stdc++']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/schemes/hyperelliptic_curves/hypellfrob.pyx'),language = 'C++', include_dirs = [abs_sage_path(env,'sage/libs/ntl/'), abs_sage_path(env, 'sage/schemes/hyperelliptic_curves/hypellfrob/')], libraries = ['ntl','stdc++', 'gmp', 'zn_poly']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/polynomial/polynomial_integer_dense_ntl.pyx'),language = 'C++', include_dirs = [abs_sage_path(env,'sage/libs/ntl/')], libraries = ['ntl','stdc++', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/polynomial/polynomial_modn_dense_ntl.pyx'),language = 'C++', include_dirs = [abs_sage_path(env,'sage/libs/ntl/')], libraries = ['ntl','stdc++', 'gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/rational.pyx'),libraries = ['ntl','gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/sparse_poly.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/polynomial/real_roots.pyx'),libraries = ['mpfr', 'qd']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/number_field/number_field_element.pyx'),language = 'C++', libraries=['ntl','gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/number_field/number_field_element_quadratic.pyx'),language = 'C++', libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/number_field/totallyreal_data.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/modular/modsym/heilbronn.pyx'),libraries = ['gmp','m']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/modular/modsym/p1list.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/integer_mod.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/combinat/expnums.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/combinat/partitions.pyx'),language='C++', libraries = ['qd', 'gmp', 'mpfr']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/graphs/graph_fast.pyx'),libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict, abs_sage_path(env,'sage/rings/polynomial/pbori.pyx'),language='C++', include_dirs = [abs_sage_local(env,'include/cudd'),abs_sage_local(env,'include/polybori'), abs_sage_local(env,'include/polybori/groebner')], libraries=['polybori','pboriCudd','groebner'])
f31e735d8e54368b01edf43244ff3ca84d9600d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/f31e735d8e54368b01edf43244ff3ca84d9600d3/sagebuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10736, 410, 12, 3074, 16, 314, 952, 71, 4672, 27435, 273, 1562, 4181, 18, 22903, 425, 11966, 273, 1110, 768, 11348, 264, 1435, 425, 11966, 18, 1289, 3394, 2668, 18, 2074, 92, 2187, 14661...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10736, 410, 12, 3074, 16, 314, 952, 71, 4672, 27435, 273, 1562, 4181, 18, 22903, 425, 11966, 273, 1110, 768, 11348, 264, 1435, 425, 11966, 18, 1289, 3394, 2668, 18, 2074, 92, 2187, 14661...
recipients=[],
recipients=None,
def __init__(self, subject, recipients=[], body=None, html=None, sender=None): if sender is None: sender = current_app.config.get("DEFAULT_MAIL_SENDER")
518e2feb8821f9155aa37a320d175c436e1b32d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11489/518e2feb8821f9155aa37a320d175c436e1b32d4/mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3221, 16, 12045, 33, 7036, 16, 1417, 33, 7036, 16, 1729, 33, 7036, 16, 5793, 33, 7036, 4672, 225, 309, 5793, 353, 599, 30, 5793, 273, 783, 67, 2910, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3221, 16, 12045, 33, 7036, 16, 1417, 33, 7036, 16, 1729, 33, 7036, 16, 5793, 33, 7036, 4672, 225, 309, 5793, 353, 599, 30, 5793, 273, 783, 67, 2910, 18...
msgid = getattr(self, name+'_msgid', None) or value
def _translate_attribute(self, instance, name): value = getattr(self, name) if not value: return '' domain = (getattr(self, 'i18n_domain', None) or getattr(instance, 'i18n_domain', None)) if domain is None: return value msgid = getattr(self, name+'_msgid', None) or value return i18n.translate(domain, msgid, mapping=instance.REQUEST, context=instance, default=value)
ffe181f401f4932ba7eea3598ab4f6be0de93b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/ffe181f401f4932ba7eea3598ab4f6be0de93b52/widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13929, 67, 4589, 12, 2890, 16, 791, 16, 508, 4672, 460, 273, 3869, 12, 2890, 16, 508, 13, 309, 486, 460, 30, 327, 875, 2461, 273, 261, 588, 1747, 12, 2890, 16, 296, 77, 2643, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13929, 67, 4589, 12, 2890, 16, 791, 16, 508, 4672, 460, 273, 3869, 12, 2890, 16, 508, 13, 309, 486, 460, 30, 327, 875, 2461, 273, 261, 588, 1747, 12, 2890, 16, 296, 77, 2643, ...
socket.sysmessage("Please select the object you want to remove the script '%s' from." % script) socket.attachtarget('commands.events.removescript_response', [script])
socket.sysmessage( "Please select the object you want to remove the script '%s' from." % script) socket.attachtarget( 'commands.events.removescript_response', [ script ] ) return True
def commandRemovescript(socket, command, arguments): if len(arguments) == 0: socket.sysmessage('Usage: removescript <identifier>') return script = arguments.strip() try: wolfpack.hasscript(script, EVENT_USE) except: socket.sysmessage('No such script: %s.' % script) return socket.sysmessage("Please select the object you want to remove the script '%s' from." % script) socket.attachtarget('commands.events.removescript_response', [script])
1e482ba08fcf3a2f21ec137c5d9c90b1a9fc6a14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1e482ba08fcf3a2f21ec137c5d9c90b1a9fc6a14/events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 4579, 2086, 12, 7814, 16, 1296, 16, 1775, 4672, 309, 562, 12, 7099, 13, 422, 374, 30, 2987, 18, 9499, 2150, 2668, 5357, 30, 2797, 2086, 411, 5644, 1870, 13, 327, 225, 2728, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 4579, 2086, 12, 7814, 16, 1296, 16, 1775, 4672, 309, 562, 12, 7099, 13, 422, 374, 30, 2987, 18, 9499, 2150, 2668, 5357, 30, 2797, 2086, 411, 5644, 1870, 13, 327, 225, 2728, 273, ...
self.taskqueueDB.insertJob(job,jobReqDict, 1,priority)
self.taskQueueDB.insertJob(job,jobReqDict, 1,priority)
def insertJobInQueue(self,job): """ Check individual job and add to the Task Queue eventually. """ retVal = self.jobDB.getJobParameters(job,['Priority']) if retVal['OK']: if retVal['Value']: priority = retVal['Value']['Priority'] else: self.log.warn('No priority specified for job %d' % int(job)) priority = 0 else: priority=0
3f2374138cf9ac87f0040e3e86290d84df4256e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/3f2374138cf9ac87f0040e3e86290d84df4256e1/TaskQueueAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 2278, 382, 3183, 12, 2890, 16, 4688, 4672, 3536, 2073, 7327, 1719, 471, 527, 358, 326, 3837, 7530, 18011, 18, 3536, 12197, 273, 365, 18, 4688, 2290, 18, 588, 2278, 2402, 12, 4688, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 2278, 382, 3183, 12, 2890, 16, 4688, 4672, 3536, 2073, 7327, 1719, 471, 527, 358, 326, 3837, 7530, 18011, 18, 3536, 12197, 273, 365, 18, 4688, 2290, 18, 588, 2278, 2402, 12, 4688, ...
return reverse('news:item_detail', args=[self.feed.slug, self.id])
return reverse('news:item-detail', args=[self.feed.slug, self.id])
def get_absolute_url(self): if self.ptype == 'n': return reverse('news:item_detail', args=[self.feed.slug, self.id]) else: return reverse('events:item_detail', args=[self.feed.slug, self.id])
7c1e427c0459ab6196e819cb1874ec9cfd28b030 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/7c1e427c0459ab6196e819cb1874ec9cfd28b030/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12547, 67, 718, 12, 2890, 4672, 309, 365, 18, 27672, 422, 296, 82, 4278, 327, 4219, 2668, 18443, 30, 1726, 17, 8992, 2187, 833, 22850, 2890, 18, 7848, 18, 6436, 16, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12547, 67, 718, 12, 2890, 4672, 309, 365, 18, 27672, 422, 296, 82, 4278, 327, 4219, 2668, 18443, 30, 1726, 17, 8992, 2187, 833, 22850, 2890, 18, 7848, 18, 6436, 16, 365, 18, ...
data = win32.ReadProcessMemory(self.get_handle(),
for mbi in self.get_memory_map(lpBaseAddress, lpBaseAddress + nSize): if not mbi.is_readable(): nSize = mbi.BaseAddress - lpBaseAddress break if nSize > 0: data = win32.ReadProcessMemory(self.get_handle(),
def peek(self, lpBaseAddress, nSize): """ Reads the memory of the process.
ee5919afa3904c4acb0d24d69b988ca3ad234eb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7261/ee5919afa3904c4acb0d24d69b988ca3ad234eb6/system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8032, 12, 2890, 16, 12423, 2171, 1887, 16, 290, 1225, 4672, 3536, 29185, 326, 3778, 434, 326, 1207, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8032, 12, 2890, 16, 12423, 2171, 1887, 16, 290, 1225, 4672, 3536, 29185, 326, 3778, 434, 326, 1207, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...