rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if autocreated in x.group('reason'): wikipedia.output(u'%s has been created automatically, skipping...') continue
def parselog(wsite, raw, talk, number): """ The function to load the users (only users who have a certain number of edits) """ #FIXME : Why is there a need for this 'done' list ? done = list() autocreated = wikipedia.mediawiki_message('newuserlog-autocreate-entry') # I search with a regex how many user have not the talk page # and i put them in a list (i find it more easy and secure). # XXX: That's the regex, if there are problems, take a look here. reg = u'\(<a href=\"' + re.escape(wsite.path()) + u'\?title=%s(?P<user>.*?)&(?:amp;|)action=(?:edit|editredlink|edit&amp;redlink=1)\"' % talk + u'.*?\) (?P<reason>.*?) </li>' p = re.compile(reg, re.UNICODE) for x in p.finditer(raw): #skip autocreated users (SUL) if autocreated in x.group('reason'): wikipedia.output(u'%s has been created automatically, skipping...') continue username = x.group('user') if username not in done: done.append(username) userpage = wikipedia.Page(wsite, username) # Defing the contrib's page of the user. pathWiki = wsite.family.nicepath(wsite.lang) con = '%sSpecial:Contributions/%s' % (pathWiki, userpage.urlname()) # Getting the contribs... contribs = wsite.getUrl(con) #FIXME: It counts the first 50 edits # if number > 50, it won't work contribnum = contribs.count('<li>') if contribnum >= number: wikipedia.output(u'%s has enough edits to be welcomed' % userpage.titleWithoutNamespace() ) # The user must be welcomed, return his data. yield ([username, contribnum]) elif contribnum < number: if contribnum == 0: wikipedia.output(u'%s has no contributions.' % userpage.titleWithoutNamespace() ) else: wikipedia.output(u'%s has only %s contributions.' % (userpage.titleWithoutNamespace(), str(contribnum)) ) # That user mustn't be welcomed. continue if len(done) == 0: wikipedia.output(u'There is nobody to be welcomed...') else: wikipedia.output(u'\nLoaded all users...')
cf92b211d431a9c229164ff37ed6a190b77894c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/cf92b211d431a9c229164ff37ed6a190b77894c8/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 779, 1786, 717, 12, 91, 4256, 16, 1831, 16, 26591, 16, 1300, 4672, 3536, 1021, 445, 358, 1262, 326, 3677, 261, 3700, 3677, 10354, 1240, 279, 8626, 1300, 434, 24450, 13, 3536, 468, 25810,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 779, 1786, 717, 12, 91, 4256, 16, 1831, 16, 26591, 16, 1300, 4672, 3536, 1021, 445, 358, 1262, 326, 3677, 261, 3700, 3677, 10354, 1240, 279, 8626, 1300, 434, 24450, 13, 3536, 468, 25810,...
if len(split) > 1 and split[-1] in self.targets_by_type:
if len(split) > 1 and split[-1] in self.scan_filetypes:
def get_targets(self): raw_urls = self.get_search_urls() new = {} for url in raw_urls: split = url.rsplit('.',1) # Try to get filetype if len(split) > 1 and split[-1] in self.targets_by_type: new.setdefault(split[-1],[]).append(url) for k,v in new.items(): self.targets_by_type[k].extend(v) return raw_urls
9c72e99da68fb53bdeb7a51cb5bc3eca13cc38ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3762/9c72e99da68fb53bdeb7a51cb5bc3eca13cc38ba/soat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11358, 12, 2890, 4672, 1831, 67, 10518, 273, 365, 18, 588, 67, 3072, 67, 10518, 1435, 394, 273, 2618, 364, 880, 316, 1831, 67, 10518, 30, 1416, 273, 880, 18, 86, 4939, 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, 336, 67, 11358, 12, 2890, 4672, 1831, 67, 10518, 273, 365, 18, 588, 67, 3072, 67, 10518, 1435, 394, 273, 2618, 364, 880, 316, 1831, 67, 10518, 30, 1416, 273, 880, 18, 86, 4939, 2668, ...
self.setFailedJob(job, 'Could not instantiate module: %s' %(self.voPlugin))
self.setFailedJob(job, 'Could not instantiate module: %s' %(self.voPlugin),classAdJob)
def checkJob( self, job, classAdJob ): """This method controls the checking of the job. """ jobDesc = JobDescription() result = jobDesc.loadDescription( classAdJob.asJDL() ) if not result[ 'OK' ]: self.setFailedJob(job, result['Message']) return result self.__syncJobDesc( job, jobDesc, classAdJob )
0223d31744ab672b3bc071ee8972711a16f92df5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/0223d31744ab672b3bc071ee8972711a16f92df5/JobPathAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 2278, 12, 365, 16, 1719, 16, 667, 1871, 2278, 262, 30, 3536, 2503, 707, 11022, 326, 6728, 434, 326, 1719, 18, 3536, 1719, 4217, 273, 3956, 3291, 1435, 563, 273, 1719, 4217, 18, 94...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 2278, 12, 365, 16, 1719, 16, 667, 1871, 2278, 262, 30, 3536, 2503, 707, 11022, 326, 6728, 434, 326, 1719, 18, 3536, 1719, 4217, 273, 3956, 3291, 1435, 563, 273, 1719, 4217, 18, 94...
killprocid = 'kill -9 '+procid stdin,stdout,stderr = sshclient.exec_command(killprocid) sshclient.close() print "Ended log4tailer, because colors are fun" sys.exit()
killprocid = 'kill -9 '+procid stdin,stdout,stderr = sshclient.exec_command(killprocid) sshclient.close() print "Ended log4tailer, because colors are fun" sys.exit()
def tailer(self): '''Stdout multicolor tailer''' message = Message(self.logcolors,self.target,self.properties) for hostname in self.hostnames.keys(): command = self.hostnames[hostname]['command'] self.logger.debug("command [%s] to be executed in host [%s]" % (command,hostname)) self.hostnameChannels[hostname]['channel'].exec_command(command) while True: for hostname in self.hostnames.keys(): sshChannel = self.hostnameChannels[hostname]['channel'] try: rr,wr,xr = select.select([sshChannel],[],[],0.0) if len(rr)>0: lines = sshChannel.recv(1024).split('\n') for line in lines: message.parse(line,(None,None,None)) self.actions.triggerAction(message,'sshLog') else: time.sleep(1)
4c7465550dd395326ce950dd243a5ccdbc863cb7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5602/4c7465550dd395326ce950dd243a5ccdbc863cb7/SSHLogTailer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5798, 264, 12, 2890, 4672, 9163, 27334, 1778, 12463, 280, 5798, 264, 26418, 883, 273, 2350, 12, 2890, 18, 1330, 9724, 16, 2890, 18, 3299, 16, 2890, 18, 4738, 13, 364, 5199, 316, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5798, 264, 12, 2890, 4672, 9163, 27334, 1778, 12463, 280, 5798, 264, 26418, 883, 273, 2350, 12, 2890, 18, 1330, 9724, 16, 2890, 18, 3299, 16, 2890, 18, 4738, 13, 364, 5199, 316, 365, 1...
ALGORITHM: Use Singular.
ALGORITHM: Use Singular or univariate factorization code.
def factor(self): r""" Compute the irreducible factorization of this polynomial.
9336fa26d8dd5021d98056108b28bc4c875657e6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/9336fa26d8dd5021d98056108b28bc4c875657e6/multi_polynomial_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5578, 12, 2890, 4672, 436, 8395, 8155, 326, 9482, 1118, 5286, 1523, 5578, 1588, 434, 333, 16991, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5578, 12, 2890, 4672, 436, 8395, 8155, 326, 9482, 1118, 5286, 1523, 5578, 1588, 434, 333, 16991, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
src = Tmp()
src = _Tmp()
def pipe_through_command(command, src, dst): PipeThroughCommand(command, src, dst).wait()
b218cd7f78db7dee5b1ca89ce667fb4a33a2c7ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4591/b218cd7f78db7dee5b1ca89ce667fb4a33a2c7ae/processes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6010, 67, 10064, 67, 3076, 12, 3076, 16, 1705, 16, 3046, 4672, 20024, 14287, 2189, 12, 3076, 16, 1705, 16, 3046, 2934, 7048, 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, 0, 0, 0, 0, 0, 0, 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, 6010, 67, 10064, 67, 3076, 12, 3076, 16, 1705, 16, 3046, 4672, 20024, 14287, 2189, 12, 3076, 16, 1705, 16, 3046, 2934, 7048, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
)
)
def fields(self): subscriberdata = schema.Bytes( __name__ = 'subscriberdata', title=_(u"Subscribers"), description=_(u"Upload a CSV file with a list of subscribers here. " u"Subscribers already present in the database will " u"be overwritten. Each line should contain: " u"${columns}.", mapping=dict(columns=';'.join(field.Fields( self.context.composer.schema).keys()))) ) remove = schema.Bool(__name__ = 'removenonexisting', title=_(u"Remove non-existing"), description=_(u"If selected and a subscriber exists in the " u"database, but is not part of the uploaded file, " u"the subscriber will be removed from the list."), default = False ) header_row_present = schema.Bool(__name__ = 'header_row_present', title=_(u"CSV contains a header row"), description=_(u"Select this if you want to use the csv " u"header row to designate document variables." u"The header row must contain one 'email' field."), default = False ) csv_delimiter = schema.TextLine(__name__ = 'csv_delimiter', title=_(u"CSV delimiter"), description=_(u"The delimiter in your CSV file. " u"(Usually ',' or ';', but no quotes are necessary.)"), default = u',' )
6a225131d5814f4fcaf8f720f43c7e7816ee8a6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9843/6a225131d5814f4fcaf8f720f43c7e7816ee8a6b/channel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 12, 2890, 4672, 9467, 892, 273, 1963, 18, 2160, 12, 1001, 529, 972, 273, 296, 26410, 892, 2187, 2077, 33, 67, 12, 89, 6, 26141, 6, 3631, 2477, 33, 67, 12, 89, 6, 4777, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 12, 2890, 4672, 9467, 892, 273, 1963, 18, 2160, 12, 1001, 529, 972, 273, 296, 26410, 892, 2187, 2077, 33, 67, 12, 89, 6, 26141, 6, 3631, 2477, 33, 67, 12, 89, 6, 4777, 279, 1...
conn = httplib.HTTPConnection(host) headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}
def submit_song_helper(self, old = False): if self.already_submitted == True or self.broken == True: return
5b94557f563f23e69b10109f319e52ad38bc4aa0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/5b94557f563f23e69b10109f319e52ad38bc4aa0/qlscrobbler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 67, 816, 75, 67, 4759, 12, 2890, 16, 1592, 273, 1083, 4672, 309, 365, 18, 17583, 67, 31575, 422, 1053, 578, 365, 18, 70, 19906, 422, 1053, 30, 327, 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, 4879, 67, 816, 75, 67, 4759, 12, 2890, 16, 1592, 273, 1083, 4672, 309, 365, 18, 17583, 67, 31575, 422, 1053, 578, 365, 18, 70, 19906, 422, 1053, 30, 327, 2, -100, -100, -100, -100, -...
<form name="step2_form" action="%s/admin2/bibcirculation/place_new_loan_step3" method="get" >
<form name="step2_form" action="%s/admin2/bibcirculation/place_new_loan_step3" method="post" >
def tmpl_place_new_loan_step2(self, barcode, recid, user_info, ln=CFG_SITE_LANG): """ @param barcode: identify the item. Primary key of crcITEM. @type barcode: string
648f0875a183c65548d6b2535cea8cf25a2a9827 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/648f0875a183c65548d6b2535cea8cf25a2a9827/bibcirculation_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 964, 67, 2704, 67, 383, 304, 67, 4119, 22, 12, 2890, 16, 21231, 16, 1950, 350, 16, 729, 67, 1376, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 3536, 632, 891, 21231, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 964, 67, 2704, 67, 383, 304, 67, 4119, 22, 12, 2890, 16, 21231, 16, 1950, 350, 16, 729, 67, 1376, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 3536, 632, 891, 21231, 3...
return
def Update(self): """ Updates the contents TimeLineBar, updating the values in the beats per minute box and time signature box, as well as updating the click button sensitivity and instrument header width. """ if not self.Updating: instrumentviews=[] if self.mainview.recording: instrumentviews+=self.mainview.recording.views if self.mainview.compactmix: instrumentviews+=self.mainview.compactmix.projectview.views
647c80d879efcdc6e9b0fa5fe5aa2ebfe31a3865 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10033/647c80d879efcdc6e9b0fa5fe5aa2ebfe31a3865/TimeLineBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 12, 2890, 4672, 3536, 15419, 326, 2939, 2647, 1670, 5190, 16, 9702, 326, 924, 316, 326, 506, 2323, 1534, 8044, 3919, 471, 813, 3372, 3919, 16, 487, 5492, 487, 9702, 326, 4682, 3568...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 12, 2890, 4672, 3536, 15419, 326, 2939, 2647, 1670, 5190, 16, 9702, 326, 924, 316, 326, 506, 2323, 1534, 8044, 3919, 471, 813, 3372, 3919, 16, 487, 5492, 487, 9702, 326, 4682, 3568...
'Pi'
'Pi',
def _sys_init_(self, system): return self._name
4461fcc61cd0658ea798d459aeca66ac29505a8d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/4461fcc61cd0658ea798d459aeca66ac29505a8d/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
marshal.dump(results.counts, open(os.path.join(dirname, "counts"), "w")) marshal.dump(results.modules, open(os.path.join(dirname, "modules"), "w")) except IOError, err: sys.stderr.write("cannot save counts/modules " \ "files because %s" % err) if summary and sums: mods = sums.keys() mods.sort() print "lines cov% module (path)" for m in mods: n_lines, percent, modulename, filename = sums[m] print "%5d %3d%% %s (%s)" % sums[m] class Coverage: def __init__(self, ignore = Ignore()): self.ignore = ignore self.ignore_names = ignore._ignore self.counts = {} self.modules = {} def trace(self, frame, why, arg):
print "%s(%d): %s" % (bname, lineno, context[lineindex],), except IndexError: pass return self.localtrace def localtrace_trace(self, frame, why, arg):
def create_results_log(results, dirname = ".", show_missing = 1, save_counts = 0, summary = 0, coverdir = None): import re # turn the counts data ("(filename, lineno) = count") into something # accessible on a per-file basis per_file = {} for filename, lineno in results.counts.keys(): lines_hit = per_file[filename] = per_file.get(filename, {}) lines_hit[lineno] = results.counts[(filename, lineno)] # try and merge existing counts and modules file from dirname try: counts = marshal.load(open(os.path.join(dirname, "counts"))) modules = marshal.load(open(os.path.join(dirname, "modules"))) results.update(results.__class__(counts, modules)) except IOError: pass # there are many places where this is insufficient, like a blank # line embedded in a multiline string. blank = re.compile(r'^\s*(#.*)?$') # accumulate summary info, if needed sums = {} # generate file paths for the coverage files we are going to write... fnlist = [] tfdir = tempfile.gettempdir() for key in per_file.keys(): filename = key # skip some "files" we don't care about... if filename == "<string>": continue # are these caused by code compiled using exec or something? if filename.startswith(tfdir): continue modulename = os.path.split(results.modules[key])[1] if filename.endswith(".pyc") or filename.endswith(".pyo"): filename = filename[:-1] if coverdir: listfilename = os.path.join(coverdir, modulename + ".cover") else: # XXX this is almost certainly not portable!!! fndir = os.path.dirname(filename) if os.path.isabs(filename): coverpath = fndir else: coverpath = os.path.join(dirname, fndir) # build list file name by appending a ".cover" to the module name # and sticking it into the specified directory if "." in modulename: # A module in a package finalname = modulename.split(".")[-1] listfilename = os.path.join(coverpath, finalname + ".cover") else: listfilename = os.path.join(coverpath, modulename + ".cover") # Get the original lines from the .py file try: lines = open(filename, 'r').readlines() except IOError, err: print >> sys.stderr, "trace: Could not open %s for reading " \ "because: %s - skipping" % (`filename`, err) continue try: outfile = open(listfilename, 'w') except IOError, err: sys.stderr.write( '%s: Could not open %s for writing because: %s" \ "- skipping\n' % ("trace", `listfilename`, err)) continue # If desired, get a list of the line numbers which represent # executable content (returned as a dict for better lookup speed) if show_missing: executable_linenos = find_executable_linenos(filename) else: executable_linenos = {} n_lines = 0 n_hits = 0 lines_hit = per_file[key] for i in range(len(lines)): line = lines[i] # do the blank/comment match to try to mark more lines # (help the reader find stuff that hasn't been covered) if lines_hit.has_key(i+1): # count precedes the lines that we captured outfile.write('%5d: ' % lines_hit[i+1]) n_hits = n_hits + 1 n_lines = n_lines + 1 elif blank.match(line): # blank lines and comments are preceded by dots outfile.write(' . ') else: # lines preceded by no marks weren't hit # Highlight them if so indicated, unless the line contains # '#pragma: NO COVER' (it is possible to embed this into # the text as a non-comment; no easy fix) if executable_linenos.has_key(i+1) and \ string.find(lines[i], string.join(['#pragma', 'NO COVER'])) == -1: outfile.write('>>>>>> ') else: outfile.write(' '*7) n_lines = n_lines + 1 outfile.write(string.expandtabs(lines[i], 8)) outfile.close() if summary and n_lines: percent = int(100 * n_hits / n_lines) sums[modulename] = n_lines, percent, modulename, filename if save_counts: # try and store counts and module info into dirname try: marshal.dump(results.counts, open(os.path.join(dirname, "counts"), "w")) marshal.dump(results.modules, open(os.path.join(dirname, "modules"), "w")) except IOError, err: sys.stderr.write("cannot save counts/modules " \ "files because %s" % err) if summary and sums: mods = sums.keys() mods.sort() print "lines cov% module (path)" for m in mods: n_lines, percent, modulename, filename = sums[m] print "%5d %3d%% %s (%s)" % sums[m]
dc6ad8d207ed136b6b1c7c8a4e6aa0c126e7bc61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dc6ad8d207ed136b6b1c7c8a4e6aa0c126e7bc61/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4717, 67, 1330, 12, 4717, 16, 4283, 273, 4585, 16, 2405, 67, 7337, 273, 404, 16, 1923, 67, 8008, 273, 374, 16, 4916, 273, 374, 16, 5590, 1214, 273, 599, 4672, 1930, 283, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4717, 67, 1330, 12, 4717, 16, 4283, 273, 4585, 16, 2405, 67, 7337, 273, 404, 16, 1923, 67, 8008, 273, 374, 16, 4916, 273, 374, 16, 5590, 1214, 273, 599, 4672, 1930, 283, 468...
index += 1
def make_defines(file, section, blocks, index): """Defined constants.""" block = blocks[index] index += 1 item_count = 0 while index < len(blocks): block = blocks[index] if block.type == 'define': if item_count == 0: file.write('\\begin{itemize}\n') file.write('\\item[]\n') file.write('\\begin{minipage}[t]{0.80\\columnwidth}\n') line_count = 0 for line in block.code: line = string.replace(line, '_', '\\_') line = string.replace(line, '#', '\#') line = string.strip(line) if len(line) == 0: continue if line_count > 0: file.write('\\\\\n') file.write('{\\bf %s}\n' % line) line_count += 1 file.write('\\end{minipage}\n') file.write('\\begin{quote}\n') file.write('%s\n' % block.desc) file.write('\\end{quote}\n') item_count += 1 index += 1 else: break if item_count > 0: file.write('\\end{itemize}\n\n'); return index
916ead5e96700c25fc8dd1c0b926232f3f00d775 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3566/916ead5e96700c25fc8dd1c0b926232f3f00d775/makedoc2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 536, 1465, 12, 768, 16, 2442, 16, 4398, 16, 770, 4672, 3536, 8116, 6810, 12123, 225, 1203, 273, 4398, 63, 1615, 65, 282, 761, 67, 1883, 273, 374, 1323, 770, 411, 562, 12, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 536, 1465, 12, 768, 16, 2442, 16, 4398, 16, 770, 4672, 3536, 8116, 6810, 12123, 225, 1203, 273, 4398, 63, 1615, 65, 282, 761, 67, 1883, 273, 374, 1323, 770, 411, 562, 12, 7...
for nr, filter in enumerate(filters[:4]): if len(lines) > nr: lines[nr][2:3] = [_("Filter:"), filter.name] else: lines.append(["", "", _("Filter:"), filter.name])
if filters: for nr, filter in enumerate(filters[:4]): if len(lines) > nr: lines[nr][2:3] = [_("Filter:"), filter.name] else: lines.append(["", "", _("Filter:"), filter.name])
def _mergefilters(lines, filters): for nr, filter in enumerate(filters[:4]): if len(lines) > nr: lines[nr][2:3] = [_("Filter:"), filter.name] else: lines.append(["", "", _("Filter:"), filter.name]) return lines
1019492ccb7dac292528eb15535d8ca13a21a3cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/348/1019492ccb7dac292528eb15535d8ca13a21a3cb/item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2702, 6348, 12, 3548, 16, 3415, 4672, 309, 3415, 30, 364, 9884, 16, 1034, 316, 4241, 12, 6348, 10531, 24, 65, 4672, 309, 562, 12, 3548, 13, 405, 9884, 30, 2362, 63, 11611, 6362, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2702, 6348, 12, 3548, 16, 3415, 4672, 309, 3415, 30, 364, 9884, 16, 1034, 316, 4241, 12, 6348, 10531, 24, 65, 4672, 309, 562, 12, 3548, 13, 405, 9884, 30, 2362, 63, 11611, 6362, ...
"Are you sure you want to quit without saving?", self._frame):
"Are you sure you want to quit without saving?"):
def _OnCloseWindow(self, event): if self.is_dirty: if not gui_util.are_you_sure_dialog( "Are you sure you want to quit without saving?", self._frame): event.Veto() return self._classifier.set_display(None) self.multi_iw.Destroy() self.single_iw.Destroy() self.splitterhr1.Destroy() self.splitterhr0.Destroy() self.splitterhl.Destroy() self.splitterv.Destroy() self._frame.Destroy() del self._frame
2bfa6072e0eee6ee9776fba1bb552eff467b0ecb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2bfa6072e0eee6ee9776fba1bb552eff467b0ecb/classifier_display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1398, 4605, 3829, 12, 2890, 16, 871, 4672, 309, 365, 18, 291, 67, 18013, 30, 309, 486, 13238, 67, 1367, 18, 834, 67, 19940, 67, 2055, 67, 12730, 12, 315, 4704, 1846, 3071, 1846, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1398, 4605, 3829, 12, 2890, 16, 871, 4672, 309, 365, 18, 291, 67, 18013, 30, 309, 486, 13238, 67, 1367, 18, 834, 67, 19940, 67, 2055, 67, 12730, 12, 315, 4704, 1846, 3071, 1846, ...
EXAMPLES:
EXAMPLES::
def bezier3d(path, **options): """ Draws a 3-dimensional bezier path. Input is similar to bezier_path, but each point in the path and each control point is required to have 3 coordinates. INPUT: - ``path`` - a list of curves, which each is a list of points. See further detail below. - ``thickness`` - (default: 2) - ``color`` - a word that describes a color - ``opacity`` - (default: 1) if less than 1 then is transparent - ``aspect_ratio`` - (default:[1,1,1]) The path is a list of curves, and each curve is a list of points. Each point is a tuple (x,y,z). The first curve contains the endpoints as the first and last point in the list. All other curves assume a starting point given by the last entry in the preceding list, and take the last point in the list as their opposite endpoint. A curve can have 0, 1 or 2 control points listed between the endpoints. In the input example for path below, the first and second curves have 2 control points, the third has one, and the fourth has no control points: path = [[p1, c1, c2, p2], [c3, c4, p3], [c5, p4], [p5], ...] In the case of no control points, a straight line will be drawn between the two endpoints. If one control point is supplied, then the curve at each of the endpoints will be tangent to the line from that endpoint to the control point. Similarly, in the case of two control points, at each endpoint the curve will be tangent to the line connecting that endpoint with the control point immediately after or immediately preceding it in the list. So in our example above, the curve between p1 and p2 is tangent to the line through p1 and c1 at p1, and tangent to the line through p2 and c2 at p2. Similarly, the curve between p2 and p3 is tangent to line(p2,c3) at p2 and tangent to line(p3,c4) at p3. Curve(p3,p4) is tangent to line(p3,c5) at p3 and tangent to line(p4,c5) at p4. Curve(p4,p5) is a straight line. EXAMPLES: sage: path = [[(0,0,0),(.5,.1,.2),(.75,3,-1),(1,1,0)],[(.5,1,.2),(1,.5,0)],[(.7,.2,.5)]] sage: b = bezier3d(path, color='green') sage: b To construct a simple curve, create a list containing a single list: sage: path = [[(0,0,0),(1,0,0),(0,1,0),(0,1,1)]] sage: curve = bezier3d(path, thickness=5, color='blue') sage: curve """ import parametric_plot3d as P3D from sage.modules.free_module_element import vector from sage.calculus.calculus import var p0 = vector(path[0][-1]) t = var('t') if len(path[0]) > 2: B = (1-t)**3*vector(path[0][0])+3*t*(1-t)**2*vector(path[0][1])+3*t**2*(1-t)*vector(path[0][-2])+t**3*p0 G = P3D.parametric_plot3d(list(B), (0, 1), color=options['color'], aspect_ratio=options['aspect_ratio'], thickness=options['thickness'], opacity=options['opacity']) else: G = line3d([path[0][0], p0], color=options['color'], thickness=options['thickness'], opacity=options['opacity']) for curve in path[1:]: if len(curve) > 1: p1 = vector(curve[0]) p2 = vector(curve[-2]) p3 = vector(curve[-1]) B = (1-t)**3*p0+3*t*(1-t)**2*p1+3*t**2*(1-t)*p2+t**3*p3 G += P3D.parametric_plot3d(list(B), (0, 1), color=options['color'], aspect_ratio=options['aspect_ratio'], thickness=options['thickness'], opacity=options['opacity']) else: G += line3d([p0,curve[0]], color=options['color'], thickness=options['thickness'], opacity=options['opacity']) p0 = curve[-1] return G
25144c93b092a09ccf947d595af3b9e9d463ccf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/25144c93b092a09ccf947d595af3b9e9d463ccf2/shapes2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29368, 23, 72, 12, 803, 16, 2826, 2116, 4672, 3536, 10184, 87, 279, 890, 17, 31236, 29368, 589, 18, 225, 2741, 353, 7281, 358, 29368, 67, 803, 16, 1496, 1517, 1634, 316, 326, 589, 471,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29368, 23, 72, 12, 803, 16, 2826, 2116, 4672, 3536, 10184, 87, 279, 890, 17, 31236, 29368, 589, 18, 225, 2741, 353, 7281, 358, 29368, 67, 803, 16, 1496, 1517, 1634, 316, 326, 589, 471,...
res = add_col_fld(colID, fldID, fmeth, fldvID) if res:
if ares:
def perform_addexistingfield(colID, ln=cdslang, fldID=-1, fldvID=-1, fmeth='', callback='yes', confirm=-1): """form to add an existing field to a collection. colID - the collection to add the field to fldID - the field to add score - the importance of the field. position - the position of the field on the page sel_ln - the language of the field""" subtitle = """<a name="6.2"></a><a name="7.2"></a><a name="8.2"></a>Add existing field to collection""" output = "" colID = int(colID) lang = dict(get_languages()) res = get_current_name('', ln, get_fld_nametypes()[0][0], "field") col_dict = dict(get_current_name('', ln, get_col_nametypes()[0][0], "collection")) fld_dict = dict(res) col_fld = dict(map(lambda x: (x[0], x[1]), get_col_fld(colID, fmeth))) fld_value = get_fld_value() fldv_dict = dict(map(lambda x: (x[0], x[1]), fld_value)) if fldvID: fldvID = int(fldvID) text = """ <span class="adminlabel">Field</span> <select name="fldID" class="admin_w200"> <option value="-1">- Select field -</option> """ for (id, var) in res: if fmeth == 'seo' or (fmeth != 'seo' and not col_fld.has_key(id)): text += """<option value="%s" %s>%s</option> """ % (id, id == int(fldID) and 'selected="selected"' or '', fld_dict[id]) text += """</select><br>""" if fmeth == 'seo': text += """ <span class="adminlabel">Fieldvalue</span> <select name="fldvID" class="admin_w200"> <option value="-1">- Select fieldvalue -</option> """ res = run_sql("SELECT id,name,value FROM fieldvalue ORDER BY name") for (id, name, value) in res: text += """<option value="%s" %s>%s</option> """ % (id, id == int(fldvID) and 'selected="selected"' or '', name) text += """</select><br>""" output += createhiddenform(action="addexistingfield#6.2", text=text, button="Add", colID=colID, fmeth=fmeth, ln=ln, confirm=0) if fldID not in [-1, "-1"]: fldID = int(fldID) if confirm in [0, "0"]: text = """<b>Do you want to add the field '%s' %s to the collection '%s'.</b> """ % (fld_dict[fldID], (fldvID !="" and "with fieldvalue '%s'" % fldv_dict[fldvID] or ''), col_dict[colID]) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/addexistingfield#6.2" % weburl, text=text, button="Confirm", colID=colID, fldID=fldID, fldvID=fldvID, fmeth=fmeth, ln=ln, confirm=1) elif confirm in [1, "1"]: res = add_col_fld(colID, fldID, fmeth, fldvID) if res: output += """<b><span class="info">Added the field '%s' %s to the collection '%s'.</span></b> """ % (fld_dict[fldID], (fldvID !="" and "with fieldvalue '%s'" % fldv_dict[fldvID] or ''), col_dict[colID]) else: output += """<b><span class="info">Cannot add the field '%s' %s to the collection '%s'.</span></b> """ % (fld_dict[fldID], (fldvID !="" and "with fieldvalue '%s'" % fldv_dict[fldvID] or ''), col_dict[colID]) elif fldID in [-1, "-1"] and confirm in [0, "0"]: output += """<b><span class="info">Select a field.</span></b> """ try: body = [output, extra] except NameError: body = [output] output = "<br>" + addadminbox(subtitle, body) if fmeth == "soo": return perform_showsortoptions(colID, ln, content=output) elif fmeth == "sew": return perform_showsearchfields(colID, ln, content=output) elif fmeth == "seo": return perform_showsearchoptions(colID, ln, content=output)
beda71fdc80661821084d0fd30dadb0e7e956b74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/beda71fdc80661821084d0fd30dadb0e7e956b74/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 361, 561, 376, 310, 1518, 12, 1293, 734, 16, 7211, 33, 4315, 2069, 539, 16, 9880, 734, 29711, 21, 16, 9880, 90, 734, 29711, 21, 16, 10940, 546, 2218, 2187, 1348, 2218, 9707, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 361, 561, 376, 310, 1518, 12, 1293, 734, 16, 7211, 33, 4315, 2069, 539, 16, 9880, 734, 29711, 21, 16, 9880, 90, 734, 29711, 21, 16, 10940, 546, 2218, 2187, 1348, 2218, 9707, ...
now = datetime.datetime.now()
now = datetime.datetime.utcnow()
def CheckSqlTimestamp(self): # The date functions are only available in SQLite version 3.1 or later if sqlite.sqlite_version_info < (3, 1): return
78ac15a00985421234ffa42fe2e7d2da0832776e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/78ac15a00985421234ffa42fe2e7d2da0832776e/types.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 5101, 4921, 12, 2890, 4672, 468, 1021, 1509, 4186, 854, 1338, 2319, 316, 16192, 1177, 890, 18, 21, 578, 5137, 309, 16184, 18, 19460, 67, 1589, 67, 1376, 411, 261, 23, 16, 404, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2073, 5101, 4921, 12, 2890, 4672, 468, 1021, 1509, 4186, 854, 1338, 2319, 316, 16192, 1177, 890, 18, 21, 578, 5137, 309, 16184, 18, 19460, 67, 1589, 67, 1376, 411, 261, 23, 16, 404, 46...
Initializes base class Arc.
Initializes base class ``Arc``.
def __init__(self, x, y, r1, r2, angle, s1, s2, options): """ Initializes base class Arc.
7644ef2f3a036f34c4729b1b94ea5317c23e6ab4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7644ef2f3a036f34c4729b1b94ea5317c23e6ab4/arc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 16, 677, 16, 436, 21, 16, 436, 22, 16, 5291, 16, 272, 21, 16, 272, 22, 16, 702, 4672, 3536, 10188, 3128, 1026, 667, 24881, 18, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 16, 677, 16, 436, 21, 16, 436, 22, 16, 5291, 16, 272, 21, 16, 272, 22, 16, 702, 4672, 3536, 10188, 3128, 1026, 667, 24881, 18, 2, -100, -100, -1...
def test_nested_threads(self): """check that a wait nested in a tree of threads works correctly """ def sleep(X): wait(X) return X def call_sleep(X): return uthread(sleep, X) X = newvar() v = uthread(call_sleep, X) bind(X, 42) assert X == v == 42 def notest_wait_two(self): """this seems to trigger an infinite loop in the greenlet machinery """
def test_wait_two(self):
def test_nested_threads(self): """check that a wait nested in a tree of threads works correctly """ def sleep(X): wait(X) return X
05f11305d78f7fe77dab250883e2a089d10e6b08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/05f11305d78f7fe77dab250883e2a089d10e6b08/test_logicobjspace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12985, 67, 12495, 12, 2890, 4672, 3536, 1893, 716, 279, 2529, 4764, 316, 279, 2151, 434, 7403, 6330, 8783, 3536, 1652, 5329, 12, 60, 4672, 2529, 12, 60, 13, 327, 1139, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12985, 67, 12495, 12, 2890, 4672, 3536, 1893, 716, 279, 2529, 4764, 316, 279, 2151, 434, 7403, 6330, 8783, 3536, 1652, 5329, 12, 60, 4672, 2529, 12, 60, 13, 327, 1139, 2, -10...
def setBorderFaction(self, value):
def setBorderFraction(self, value):
def setBorderFaction(self, value): print 'Changing border fraction from %g to %g' % (self.planner.getBorderFraction(), value) self.planner.setBorderFaction(value)
f3654d03763d54c7e29ddfd1aac9048beb23627d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7331/f3654d03763d54c7e29ddfd1aac9048beb23627d/ompl_app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25715, 13724, 12, 2890, 16, 460, 4672, 1172, 296, 782, 18183, 5795, 8330, 628, 738, 75, 358, 738, 75, 11, 738, 225, 261, 2890, 18, 412, 3818, 18, 588, 8107, 13724, 9334, 460, 13, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25715, 13724, 12, 2890, 16, 460, 4672, 1172, 296, 782, 18183, 5795, 8330, 628, 738, 75, 358, 738, 75, 11, 738, 225, 261, 2890, 18, 412, 3818, 18, 588, 8107, 13724, 9334, 460, 13, 365, ...
self.tpducodes = [ 'T_DATA_XXX_REQ', 'T_DATA_CONNECTED_REQ', 'T_DISCONNECT_REQ', 'T_ACK' ]
self.tpducodes = { 0:'T_DATA_XXX_REQ', 16:'T_DATA_CONNECTED_REQ', 2:'T_DISCONNECT_REQ', 3:'T_ACK' }
def __init__(self, WireGateInstance): self.WG = WireGateInstance self.nicehex=lambda x: " ".join(map(lambda y:"%.2x" % y,x)) self.tobinstr=lambda n,b=8: "".join([str((n >> y) & 1) for y in range(b-1, -1, -1)]) self.dpt = DPT_Types.dpt_type()
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, 1001, 2738, 972, 12, 2890, 16, 15454, 13215, 1442, 4672, 365, 18, 59, 43, 273, 15454, 13215, 1442, 365, 18, 82, 1812, 7118, 33, 14661, 619, 30, 315, 3552, 5701, 12, 1458, 12, 14661, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 15454, 13215, 1442, 4672, 365, 18, 59, 43, 273, 15454, 13215, 1442, 365, 18, 82, 1812, 7118, 33, 14661, 619, 30, 315, 3552, 5701, 12, 1458, 12, 14661, 67...
usage()
sys.exit(0)
def grab_xmltv(): if not config.XMLTV_GRABBER: print 'No program found to grab the listings. Please set XMLTV_GRABBER' print 'in local.conf.py to the grabber you need' print usage() print 'Grabbing listings using XMLTV.' xmltvtmp = '/tmp/TV.xml.tmp' os.system('%s --output %s --days %s' % ( config.XMLTV_GRABBER, xmltvtmp, config.XMLTV_DAYS )) if os.path.exists(xmltvtmp): if os.path.isfile(config.XMLTV_SORT): print 'Sorting listings.' os.system('%s --output %s %s' % ( config.XMLTV_SORT, xmltvtmp+'.1', xmltvtmp )) shutil.move(xmltvtmp+'.1', xmltvtmp) else: print 'Not configured to use tv_sort, skipping.' print 'Loading data into epgdb, this may take a while' shutil.move(xmltvtmp, config.XMLTV_FILE) pyepg.update('xmltv', config.XMLTV_FILE)
e91826cf29db8456ea608e85dda4fc64c8e7e3ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e91826cf29db8456ea608e85dda4fc64c8e7e3ad/tv_grab.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11086, 67, 2902, 24161, 13332, 225, 309, 486, 642, 18, 4201, 15579, 67, 6997, 2090, 6271, 30, 1172, 296, 2279, 5402, 1392, 358, 11086, 326, 666, 899, 18, 7801, 444, 3167, 15579, 67, 6997...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11086, 67, 2902, 24161, 13332, 225, 309, 486, 642, 18, 4201, 15579, 67, 6997, 2090, 6271, 30, 1172, 296, 2279, 5402, 1392, 358, 11086, 326, 666, 899, 18, 7801, 444, 3167, 15579, 67, 6997...
for i in range(65536):
for i in xrange(65536):
def _optimize_unicode(charset, fixup): try: import array except ImportError: return charset charmap = [False]*65536 negate = 0 try: for op, av in charset: if op is NEGATE: negate = 1 elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: # XXX: could expand category return charset # cannot compress except IndexError: # non-BMP characters return charset if negate: if sys.maxunicode != 65535: # XXX: negation does not work with big charsets return charset for i in range(65536): charmap[i] = not charmap[i] comps = {} mapping = [0]*256 block = 0 data = [] for i in range(256): chunk = tuple(charmap[i*256:(i+1)*256]) new = comps.setdefault(chunk, block) mapping[i] = new if new == block: block = block + 1 data = data + _mk_bitmap(chunk) header = [block] if MAXCODE == 65535: code = 'H' else: code = 'L' # Convert block indices to byte array of 256 bytes mapping = array.array('b', mapping).tostring() # Convert byte array to word array header = header + array.array(code, mapping).tolist() data[0:0] = header return [(BIGCHARSET, data)]
3f8fdffe72485d69e9e31bdeb4796c1cca750eba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3f8fdffe72485d69e9e31bdeb4796c1cca750eba/sre_compile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29155, 67, 9124, 12, 9999, 16, 2917, 416, 4672, 775, 30, 1930, 526, 1335, 11308, 30, 327, 4856, 1149, 1458, 273, 306, 8381, 5772, 26, 2539, 5718, 15626, 273, 374, 775, 30, 364, 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, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29155, 67, 9124, 12, 9999, 16, 2917, 416, 4672, 775, 30, 1930, 526, 1335, 11308, 30, 327, 4856, 1149, 1458, 273, 306, 8381, 5772, 26, 2539, 5718, 15626, 273, 374, 775, 30, 364, 10...
from os.path import join
def _applyChangeset(self, changeset): """ Do the actual work of applying the changeset to the working copy. """
4cc1ce644c797cccfeed495b76cd6b665a037989 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/4cc1ce644c797cccfeed495b76cd6b665a037989/darcs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 29743, 12, 2890, 16, 22463, 4672, 3536, 2256, 326, 3214, 1440, 434, 13650, 326, 22463, 358, 326, 5960, 1610, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 29743, 12, 2890, 16, 22463, 4672, 3536, 2256, 326, 3214, 1440, 434, 13650, 326, 22463, 358, 326, 5960, 1610, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def GetNumInvalidValues(self):
def GetNumInvalidValues(self, func):
def GetNumInvalidValues(self): """overridden from Argument.""" return 1
8e2a5abe106158df74caad4c6fbd988d8d900b7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/8e2a5abe106158df74caad4c6fbd988d8d900b7c/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2578, 1941, 1972, 12, 2890, 16, 1326, 4672, 3536, 83, 1107, 2794, 628, 5067, 12123, 327, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2578, 1941, 1972, 12, 2890, 16, 1326, 4672, 3536, 83, 1107, 2794, 628, 5067, 12123, 327, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif var.has_value(): str += '\\raggedright ' str += self._pprint_var_value(var)
def _var_list(self, variables, heading='Variables', seclevel=1): variables = self._filtersort_vars(variables) if len(variables) == 0: return '' str = self._start_of(heading) str += ' '+self._section(heading, seclevel)
718e913e37bd564ee3425ab6734ad7a7748f8a8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/718e913e37bd564ee3425ab6734ad7a7748f8a8a/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1401, 67, 1098, 12, 2890, 16, 3152, 16, 11053, 2218, 6158, 2187, 1428, 2815, 33, 21, 4672, 3152, 273, 365, 6315, 2188, 3804, 67, 4699, 12, 7528, 13, 309, 562, 12, 7528, 13, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1401, 67, 1098, 12, 2890, 16, 3152, 16, 11053, 2218, 6158, 2187, 1428, 2815, 33, 21, 4672, 3152, 273, 365, 6315, 2188, 3804, 67, 4699, 12, 7528, 13, 309, 562, 12, 7528, 13, 422, ...
self.onRemoveEventUpdateUI(event)
def onDeleteEventUpdateUI(self, event): self.onRemoveEventUpdateUI(event) event.arguments['Text'] = _('Delete Collection') """ this is enabled if any user item is selected in the sidebar """ if (self.selectedItemToView and getattr(self.selectedItemToView, 'renameable', True)): event.arguments['Enable'] = True else: event.arguments['Enable'] = False
677374027faea2a8c2c028ed1ca3e432132e880e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/677374027faea2a8c2c028ed1ca3e432132e880e/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20468, 1133, 1891, 5370, 12, 2890, 16, 871, 4672, 871, 18, 7099, 3292, 1528, 3546, 273, 389, 2668, 2613, 2200, 6134, 3536, 333, 353, 3696, 309, 1281, 729, 761, 353, 3170, 316, 326, 23364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20468, 1133, 1891, 5370, 12, 2890, 16, 871, 4672, 871, 18, 7099, 3292, 1528, 3546, 273, 389, 2668, 2613, 2200, 6134, 3536, 333, 353, 3696, 309, 1281, 729, 761, 353, 3170, 316, 326, 23364...
if tx is StringType or tx is InstanceType:
if tx in (StringType, UnicodeType, InstanceType):
def compileProgram(self, parsedText, program=None): style = self.style1 # standard parameters #program = self.program if program is None: program = [] a = program.append fn = style.fontName # add style information if there was no initial state a( ("face", fn ) ) from reportlab.lib.fonts import ps2tt (self.face, self.bold, self.italic) = ps2tt(fn) a( ("size", style.fontSize ) ) self.size = style.fontSize a( ("align", style.alignment ) ) a( ("indent", style.leftIndent ) ) if style.firstLineIndent: a( ("indent", style.firstLineIndent ) ) # must be undone later a( ("rightIndent", style.rightIndent ) ) a( ("leading", style.leading) ) if style.textColor: a( ("color", style.textColor) ) #a( ("nextLine", 0) ) # clear for next line if self.bulletText: self.do_bullet(self.bulletText, program) self.compileComponent(parsedText, program) # now look for a place where to insert the unindent after the first line if style.firstLineIndent: count = 0 from types import StringType, InstanceType for x in program: count = count+1 tx = type(x) if tx is StringType or tx is InstanceType: break program.insert( count, ("indent", -style.firstLineIndent ) ) # defaults to end if no visibles #print "="*8, id(self), "program is" #for x in program: # print x
041e2d265f4d145658b08edc02ff501d425029d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/041e2d265f4d145658b08edc02ff501d425029d6/para.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 9459, 12, 2890, 16, 2707, 1528, 16, 5402, 33, 7036, 4672, 2154, 273, 365, 18, 4060, 21, 468, 4529, 1472, 468, 12890, 273, 365, 18, 12890, 309, 5402, 353, 599, 30, 5402, 273, 5378...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 9459, 12, 2890, 16, 2707, 1528, 16, 5402, 33, 7036, 4672, 2154, 273, 365, 18, 4060, 21, 468, 4529, 1472, 468, 12890, 273, 365, 18, 12890, 309, 5402, 353, 599, 30, 5402, 273, 5378...
_add_preloader(src, "script/")
_add_preloader(dst, "script/")
def main(argv=sys.argv): """ Entry point when the script is called from the command line, not used as a module. """ import optparse usage = """%prog [options] source destination
0af9048ade8028dd54ed60db9a281d14f18ad117 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10922/0af9048ade8028dd54ed60db9a281d14f18ad117/dfbuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 9499, 18, 19485, 4672, 3536, 3841, 1634, 1347, 326, 2728, 353, 2566, 628, 326, 1296, 980, 16, 486, 1399, 487, 279, 1605, 18, 3536, 1930, 2153, 2670, 4084, 273, 3536,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2774, 12, 19485, 33, 9499, 18, 19485, 4672, 3536, 3841, 1634, 1347, 326, 2728, 353, 2566, 628, 326, 1296, 980, 16, 486, 1399, 487, 279, 1605, 18, 3536, 1930, 2153, 2670, 4084, 273, 3536,...
expr = cur.expr = cur.expr.withmemory(substs) refs = expr.references()
pass
def optimize_propagate(self, node): if not isinstance(node, ComplexNode): return node
b03aadd5b3cad0ef70b4d2812c22eb9f2db4fcec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/b03aadd5b3cad0ef70b4d2812c22eb9f2db4fcec/esotope-bfc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 5986, 346, 340, 12, 2890, 16, 756, 4672, 309, 486, 1549, 12, 2159, 16, 16060, 907, 4672, 327, 756, 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, 10979, 67, 5986, 346, 340, 12, 2890, 16, 756, 4672, 309, 486, 1549, 12, 2159, 16, 16060, 907, 4672, 327, 756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.body.append('<img src="%s" alt="%s" />\n</div>' %
self.body.append('<img src="%s" alt="%s" /></p>\n</div>' %
def html_visit_displaymath(self, node): if node['nowrap']: latex = node['latex'] else: latex = wrap_displaymath(node['latex'], None) try: fname, depth = render_math(self, latex) except MathExtError, exc: sm = nodes.system_message(str(exc), type='WARNING', level=2, backrefs=[], source=node['latex']) sm.walkabout(self) self.builder.warn('inline latex %r: ' % node['latex'] + str(exc)) raise nodes.SkipNode self.body.append(self.starttag(node, 'div', CLASS='math')) self.body.append('<p>') if node['number']: self.body.append('<span class="eqno">(%s)</span>' % node['number']) if fname is None: # something failed -- use text-only as a bad substitute self.body.append('<span class="math">%s</span>' % self.encode(node['latex']).strip()) else: self.body.append('<img src="%s" alt="%s" />\n</div>' % (fname, self.encode(node['latex']).strip())) self.body.append('</p>') raise nodes.SkipNode
5569f89de24e86b37a050065a61f27217861b5f4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5532/5569f89de24e86b37a050065a61f27217861b5f4/pngmath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 11658, 67, 5417, 15949, 12, 2890, 16, 756, 4672, 309, 756, 3292, 3338, 1266, 3546, 30, 25079, 273, 756, 3292, 26264, 3546, 469, 30, 25079, 273, 2193, 67, 5417, 15949, 12, 2159,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 11658, 67, 5417, 15949, 12, 2890, 16, 756, 4672, 309, 756, 3292, 3338, 1266, 3546, 30, 25079, 273, 756, 3292, 26264, 3546, 469, 30, 25079, 273, 2193, 67, 5417, 15949, 12, 2159,...
if name in ('os2', ):
if name in ('os2', 'nt', 'dos'):
def _execvpe(file, args, env = None): if env: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ global _notfound head, tail = path.split(file) if head: apply(func, (file,) + argrest) return if env.has_key('PATH'): envpath = env['PATH'] else: envpath = defpath import string PATH = string.splitfields(envpath, pathsep) if not _notfound: import tempfile # Exec a file that is guaranteed not to exist try: execv(tempfile.mktemp(), ()) except error, _notfound: pass exc, arg = error, _notfound for dir in PATH: fullname = path.join(dir, file) try: apply(func, (fullname,) + argrest) except error, (errno, msg): if errno != arg[0]: exc, arg = error, (errno, msg) raise exc, arg
f4e72db40428bd47f54ddfb3fd610276a11c72f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f4e72db40428bd47f54ddfb3fd610276a11c72f5/os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 273, 599, 4672, 309, 1550, 30, 1326, 273, 1196, 537, 1501, 8792, 273, 261, 1968, 16, 1550, 13, 469, 30, 1326, 273, 1196, 90, 1501, 879...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 273, 599, 4672, 309, 1550, 30, 1326, 273, 1196, 537, 1501, 8792, 273, 261, 1968, 16, 1550, 13, 469, 30, 1326, 273, 1196, 90, 1501, 879...
def valuation(m, p): """ The exact power of p that divides m. m should be an integer or rational (but maybe other types work too.) This actually just calls the m.valuation() method. If m is 0, this function returns rings.infinity.
def valuation(m,*args1, **args2): """ This actually just calls the m.valuation() method. See the documentation of m.valuation() for a more precise description. Use of this function by developers is discouraged. Use m.valuation() instead. .. NOTE:: This is not always a valuation in the mathematical sense. For more information see: sage.rings.finite_rings.integer_mod.IntegerMod_int.valuation
def valuation(m, p): """ The exact power of p that divides m. m should be an integer or rational (but maybe other types work too.) This actually just calls the m.valuation() method. If m is 0, this function returns rings.infinity. EXAMPLES:: sage: valuation(512,2) 9 sage: valuation(1,2) 0 sage: valuation(5/9, 3) -2 Valuation of 0 is defined, but valuation with respect to 0 is not:: sage: valuation(0,7) +Infinity sage: valuation(3,0) Traceback (most recent call last): ... ValueError: You can only compute the valuation with respect to a integer larger than 1. Here are some other examples:: sage: valuation(100,10) 2 sage: valuation(200,10) 2 sage: valuation(243,3) 5 sage: valuation(243*10007,3) 5 sage: valuation(243*10007,10007) 1 """ if hasattr(m, 'valuation'): return m.valuation(p) if m == 0: import sage.rings.all return sage.rings.all.infinity if is_FractionFieldElement(m): return valuation(m.numerator()) - valuation(m.denominator()) r = 0 power = p while not (m % power): # m % power == 0 r += 1 power *= p return r
bf4b0be2334cd3177893122118b7a0592cb12f35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/bf4b0be2334cd3177893122118b7a0592cb12f35/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21748, 367, 12, 81, 16, 14, 1968, 21, 16, 2826, 1968, 22, 4672, 3536, 1220, 6013, 2537, 4097, 326, 312, 18, 4531, 367, 1435, 707, 18, 2164, 326, 7323, 434, 312, 18, 4531, 367, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21748, 367, 12, 81, 16, 14, 1968, 21, 16, 2826, 1968, 22, 4672, 3536, 1220, 6013, 2537, 4097, 326, 312, 18, 4531, 367, 1435, 707, 18, 2164, 326, 7323, 434, 312, 18, 4531, 367, 1435, ...
available_metadata[key] = meta_dict[key]
available_metadata[key] = meta_dict[key]
def combineMetaData(self, available_metadata, meta_dict, vid_type=False): ''' Combine the current data with new meta data from primary or secondary sources return combinted meta data dictionary ''' # Combine meta data for key in meta_dict.keys(): try: dummy = self.config['metadata_exclude_as_update_trigger'].index(key) continue except: if key == 'inetref' and available_metadata[key] != meta_dict[key]: available_metadata[key] = meta_dict[key] continue if key == 'userrating' and available_metadata[key] == 0.0: available_metadata[key] = meta_dict[key] continue if key == 'length' and available_metadata[key] == 0: available_metadata[key] = meta_dict[key] continue if key == 'rating' and (available_metadata[key] == 'NR' or available_metadata[key] == 'Unknown'): available_metadata[key] = meta_dict[key] continue if key == 'year' and available_metadata[key] == 1895: available_metadata[key] = meta_dict[key] continue if key == 'category' and available_metadata[key] == 0: available_metadata[key] = meta_dict[key] continue if key == 'inetref' and available_metadata[key] == '00000000': available_metadata[key] = meta_dict[key] continue if vid_type and key == 'subtitle': # There are no subtitles in movies continue if key == 'plot': # Remove any line-feeds from the plot. Mythvideo does not expect them. meta_dict[key] = meta_dict[key].replace('\n', ' ') if (vid_type and key == 'plot') and (meta_dict[key].find('@') != -1 or len(meta_dict[key].split(' ')) < 10): continue if vid_type and key == 'plot': if available_metadata[key] != None: if len(available_metadata[key].split(' ')) < 10 and len(meta_dict[key].split(' ')) > 10: available_metadata[key] = meta_dict[key] continue if not available_metadata.has_key(key): # Mainly for Genre and Cast available_metadata[key] = meta_dict[key] continue if available_metadata[key] == None or available_metadata[key] == '' or available_metadata[key] == 'None' or available_metadata[key] == 'Unknown': available_metadata[key] = meta_dict[key] continue return available_metadata
6089d4d60f2dab84c6af9981c242684b162de38e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/6089d4d60f2dab84c6af9981c242684b162de38e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8661, 6998, 12, 2890, 16, 2319, 67, 4165, 16, 2191, 67, 1576, 16, 18339, 67, 723, 33, 8381, 4672, 9163, 23949, 326, 783, 501, 598, 394, 2191, 501, 628, 3354, 578, 9946, 5550, 327, 3894...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8661, 6998, 12, 2890, 16, 2319, 67, 4165, 16, 2191, 67, 1576, 16, 18339, 67, 723, 33, 8381, 4672, 9163, 23949, 326, 783, 501, 598, 394, 2191, 501, 628, 3354, 578, 9946, 5550, 327, 3894...
result = ll_math_frexp(10.1)
result = Implementation.ll_math_frexp(10.1)
def test_ll_frexp(): result = ll_math_frexp(10.1) assert result.item0 == math.frexp(10.1)[0] assert result.item1 == math.frexp(10.1)[1]
dead949a8590d718166a0efd74e0cb7a9160bcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/dead949a8590d718166a0efd74e0cb7a9160bcc3/test_ll_math.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2906, 67, 74, 266, 23829, 13332, 563, 273, 25379, 18, 2906, 67, 15949, 67, 74, 266, 23829, 12, 2163, 18, 21, 13, 1815, 563, 18, 1726, 20, 422, 4233, 18, 74, 266, 23829, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2906, 67, 74, 266, 23829, 13332, 563, 273, 25379, 18, 2906, 67, 15949, 67, 74, 266, 23829, 12, 2163, 18, 21, 13, 1815, 563, 18, 1726, 20, 422, 4233, 18, 74, 266, 23829, 12,...
print "Profiling complete. Total time to enter Build Atoms = ", (tm1-tm0)
print "Profiling complete. Total time to enter %s = %s"%(commandName, (tm1-tm0))
def _debug_command_entered_profiling(self): """ Debug option for profiling code to enter BuildAtoms command. """ #Note: To profile other commands, simply repalce call to #'toolsBuildAtoms' with the appropriate method. Other option is #to just do "win.commandSequencer.userEnterCommand('COMMAND_NAME')" # -- Ninad 2008-10-03 print "Profiling command enter for BuildAtoms command" win = self._debug_win doProfile(True) tm0 = clock() profile(self.win.toolsBuildAtoms) tm1 = clock() print "Profiling complete. Total time to enter Build Atoms = ", (tm1-tm0) doProfile(False)
7dd5cfcef3fd3e312d1a1fdac9f8d25eca91a99f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/7dd5cfcef3fd3e312d1a1fdac9f8d25eca91a99f/DebugMenuMixin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4148, 67, 3076, 67, 2328, 329, 67, 16121, 4973, 12, 2890, 4672, 3536, 4015, 1456, 364, 25658, 981, 358, 6103, 3998, 14280, 1296, 18, 3536, 468, 8067, 30, 2974, 3042, 1308, 4364, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4148, 67, 3076, 67, 2328, 329, 67, 16121, 4973, 12, 2890, 4672, 3536, 4015, 1456, 364, 25658, 981, 358, 6103, 3998, 14280, 1296, 18, 3536, 468, 8067, 30, 2974, 3042, 1308, 4364, 16,...
@needs_radix_and_thousands
def test_lc_numeric_nl_langinfo(self): # Test nl_langinfo against known values for loc in candidate_locales: try: setlocale(LC_NUMERIC, loc) setlocale(LC_CTYPE, loc) except Error: continue for li, lc in ((_locale.RADIXCHAR, "decimal_point"), (_locale.THOUSEP, "thousands_sep")): self.numeric_tester('nl_langinfo', nl_langinfo(li), lc, loc)
b7eda7843a6d3592faf54a2de77e75d4cfec5e87 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/b7eda7843a6d3592faf54a2de77e75d4cfec5e87/test__locale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17704, 67, 5246, 67, 14039, 67, 4936, 1376, 12, 2890, 4672, 468, 7766, 7741, 67, 4936, 1376, 5314, 4846, 924, 364, 1515, 316, 5500, 67, 22638, 30, 775, 30, 444, 6339, 12, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17704, 67, 5246, 67, 14039, 67, 4936, 1376, 12, 2890, 4672, 468, 7766, 7741, 67, 4936, 1376, 5314, 4846, 924, 364, 1515, 316, 5500, 67, 22638, 30, 775, 30, 444, 6339, 12, 133...
r""" Lucas numbers (beginning at 2): $L(n) = L(n-1) + L(n-2)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000032; a Lucas numbers (beginning at 2): L(n) = L(n-1) + L(n-2). sage: a(0) 2 sage: a(1) 1 sage: a(8) 47 sage: a(200) 627376215338105766356982006981782561278127 sage: a(-4) Traceback (most recent call last): ... ValueError: input n (=-4) must be an integer >= 0 sage: a.list(12) [2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199] AUTHOR: -- Jaap Spies (2007-01-18) """ def __init__(self):
def __init__(self): r""" Lucas numbers (beginning at 2): $L(n) = L(n-1) + L(n-2)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000032; a Lucas numbers (beginning at 2): L(n) = L(n-1) + L(n-2). sage: a(0) 2 sage: a(1) 1 sage: a(8) 47 sage: a(200) 627376215338105766356982006981782561278127 sage: a(-4) Traceback (most recent call last): ... ValueError: input n (=-4) must be an integer >= 0 sage: a.list(12) [2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199] AUTHOR: -- Jaap Spies (2007-01-18) """
def _eval(self, n): if n == 0: return 1 return sum( (i%2)*arith.euler_phi(i)*2**(Integer(n/i))/(2*n) for i in arith.divisors(n) )
7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 309, 290, 422, 374, 30, 327, 404, 327, 2142, 12, 261, 77, 9, 22, 17653, 297, 483, 18, 73, 17040, 67, 9973, 12, 77, 17653, 22, 636, 12, 4522, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 309, 290, 422, 374, 30, 327, 404, 327, 2142, 12, 261, 77, 9, 22, 17653, 297, 483, 18, 73, 17040, 67, 9973, 12, 77, 17653, 22, 636, 12, 4522, 12,...
startTime + ' contained undefined initiator field' );
startTime + ' contained undefined initiator field' )
def _convertBillingInfoToGratiaUsageRecord(self, row): """ Take a record returned from the database and convert it to a Gratia UsageRecord
cc7c424a77795f0ad8171974d0a60972386a3de0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/637/cc7c424a77795f0ad8171974d0a60972386a3de0/DCacheAggregator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6283, 13105, 966, 774, 43, 17048, 1155, 5357, 2115, 12, 2890, 16, 1027, 4672, 3536, 17129, 279, 1409, 2106, 628, 326, 2063, 471, 1765, 518, 358, 279, 611, 17048, 1155, 10858, 2115, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6283, 13105, 966, 774, 43, 17048, 1155, 5357, 2115, 12, 2890, 16, 1027, 4672, 3536, 17129, 279, 1409, 2106, 628, 326, 2063, 471, 1765, 518, 358, 279, 611, 17048, 1155, 10858, 2115, ...
self.live_installer.window.set_cursor(self.watch)
def mountpoints_to_progress(self): """Processing mountpoints to progress step tasks."""
9bfd21fbc5963e59248fe62b6d1feadd6c0494e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2662/9bfd21fbc5963e59248fe62b6d1feadd6c0494e2/gtkui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5344, 4139, 67, 869, 67, 8298, 12, 2890, 4672, 3536, 7798, 5344, 4139, 358, 4007, 2235, 4592, 12123, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5344, 4139, 67, 869, 67, 8298, 12, 2890, 4672, 3536, 7798, 5344, 4139, 358, 4007, 2235, 4592, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
config.text(' The configureable message is available in' + '"gg_stats_logging.txt".')
config.text(' The configureable message is available in ' + '"gg_welcome_msg.txt".')
def load(): generate_header(config) # gg_welcome_msg config.text('') config.text('='*76) config.text('>> GUNGAME WELCOME MESSAGE') config.text('='*76) config.text('Description:') config.text(' A menu displayed to newly connected players displaying ' + 'server and addon') config.text('information.') config.text(' Players can type !welcome to bring this menu back up.') config.text('Note:') config.text(' The configureable message is available in' + '"gg_stats_logging.txt".') config.text('Options:') config.text(' 0 = (Disabled)') config.text(' 1 = (Enabled)') config.text('Default Value: 0') config.cvar('gg_welcome_msg', 0, 'Enables/Disables ' + 'gg_welcome_msg.').addFlag('notify') config.text('') # gg_welcome_msg_timeout config.text('') config.text('='*76) config.text('>> GUNGAME WELCOME MESSAGE TIMEOUT') config.text('='*76) config.text('Description:') config.text(' The number (in seconds) it takes for the welcome message' + ' to dissappear.') config.text('Options:') config.text(' (#) = (#) seconds') config.text(' 10 = 10 seconds') config.text('Default Value: 10') config.cvar('gg_welcome_msg_timeout', 10, 'Sets the number of seconds ' + 'for gg_welcome_msg_timeout.') config.text('') config.write() es.dbgmsg(0, '\tgg_welcome_msg.cfg')
002d20cdbe480348c9a24aa4e352baf75d427833 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4555/002d20cdbe480348c9a24aa4e352baf75d427833/gg_welcome_msg_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 13332, 2103, 67, 3374, 12, 1425, 13, 225, 468, 29758, 67, 91, 16312, 67, 3576, 642, 18, 955, 2668, 6134, 642, 18, 955, 2668, 2218, 14, 6669, 13, 642, 18, 955, 2668, 9778, 611, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 13332, 2103, 67, 3374, 12, 1425, 13, 225, 468, 29758, 67, 91, 16312, 67, 3576, 642, 18, 955, 2668, 6134, 642, 18, 955, 2668, 2218, 14, 6669, 13, 642, 18, 955, 2668, 9778, 611, ...
"WHERE partner_id IN (" + self.partner_ids + ") " \ "AND account_id IN (" + self.account_ids + ") " \
"WHERE " "account_id IN (" + self.account_ids + ") " \ "AND partner_id is not null " \
def lines(self): if not self.partner_ids: return [] account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') line_query = account_move_line_obj._query_get(self.cr, self.uid, obj='l', context={'fiscalyear': self.datas['form']['fiscalyear']}) self.cr.execute( "SELECT p.ref, p.name, sum(debit) as debit, sum(credit) as credit, " \ "CASE WHEN sum(debit) > sum(credit) " \ "THEN sum(debit) - sum(credit) " \ "ELSE 0 " \ "END AS sdebit, " \ "CASE WHEN sum(debit) < sum(credit) " \ "THEN sum(credit) - sum(debit) " \ "ELSE 0 " \ "END AS scredit, " \ "(SELECT sum(debit-credit) " \ "FROM account_move_line l " \ "WHERE partner_id = p.id " \ "AND date >= %s " \ "AND date <= %s " \ "AND blocked = TRUE " \ "AND " + line_query + " " \ ") AS enlitige " \ "FROM account_move_line l LEFT JOIN res_partner p ON (l.partner_id=p.id) " \ "WHERE partner_id IN (" + self.partner_ids + ") " \ "AND account_id IN (" + self.account_ids + ") " \ "AND l.date >= %s " \ "AND l.date <= %s " \ "AND " + line_query + " " \ "GROUP BY p.id, p.ref, p.name " \ "ORDER BY p.ref, p.name ", (self.datas['form']['date1'], self.datas['form']['date2'], self.datas['form']['date1'], self.datas['form']['date2'])) res = self.cr.dictfetchall() return res
3037c6957360ef3618c6e04e4548ebf132e4ab75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/3037c6957360ef3618c6e04e4548ebf132e4ab75/partner_balance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2362, 12, 2890, 4672, 309, 486, 365, 18, 31993, 67, 2232, 30, 327, 5378, 2236, 67, 8501, 67, 1369, 67, 2603, 273, 2845, 264, 18, 588, 67, 6011, 12, 2890, 18, 3353, 18, 20979, 2934, 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, 2362, 12, 2890, 4672, 309, 486, 365, 18, 31993, 67, 2232, 30, 327, 5378, 2236, 67, 8501, 67, 1369, 67, 2603, 273, 2845, 264, 18, 588, 67, 6011, 12, 2890, 18, 3353, 18, 20979, 2934, 5...
if version > 7.0: self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot")
try: if version > 7.0: self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") except KeyError, exc: raise DistutilsPlatformError, \ ("The .NET Framework SDK needs to be installed before " "building extensions for Python.")
def load_macros(self, version): vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir") self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") net = r"Software\Microsoft\.NETFramework" self.set_macro("FrameworkDir", net, "installroot") if version > 7.0: self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot")
cb328f393e9ca0278491a97fad48c225ad9c5484 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cb328f393e9ca0278491a97fad48c225ad9c5484/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 5821, 6973, 12, 2890, 16, 1177, 4672, 6195, 1969, 273, 436, 6, 21742, 64, 22350, 64, 25780, 510, 4484, 64, 9, 20, 18, 21, 74, 6, 738, 1177, 365, 18, 542, 67, 26448, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 5821, 6973, 12, 2890, 16, 1177, 4672, 6195, 1969, 273, 436, 6, 21742, 64, 22350, 64, 25780, 510, 4484, 64, 9, 20, 18, 21, 74, 6, 738, 1177, 365, 18, 542, 67, 26448, 2932, ...
for name, streamClass in self.streamList:
for streamClass, name in self.streamDict.itervalues():
def copy(self):
a67de324b6550ed8a3b892f25e8458e04b9f4282 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a67de324b6550ed8a3b892f25e8458e04b9f4282/files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 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, 0, 0,...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 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, -100, -...
return ['<super><font size="10">[%s]</font></super> ' % len(self.references)]
return ['<super><font size="10">[%s]</font></super> ' % ref_num]
def writeReference(self, n, isLink=False): i = parser.Item() i.children = [c for c in n.children] self.references.append(i) if isLink: return ['[%s]' % len(self.references)] else: return ['<super><font size="10">[%s]</font></super> ' % len(self.references)]
f27ddd48ae2a464022edbb2106b169ec09428da5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12390/f27ddd48ae2a464022edbb2106b169ec09428da5/rlwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 2404, 12, 2890, 16, 290, 16, 353, 2098, 33, 8381, 4672, 277, 273, 2082, 18, 1180, 1435, 277, 18, 5906, 273, 306, 71, 364, 276, 316, 290, 18, 5906, 65, 365, 18, 14353, 18, 6923,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2404, 12, 2890, 16, 290, 16, 353, 2098, 33, 8381, 4672, 277, 273, 2082, 18, 1180, 1435, 277, 18, 5906, 273, 306, 71, 364, 276, 316, 290, 18, 5906, 65, 365, 18, 14353, 18, 6923,...
fvec = atleast_1d(fcn(x)) if 1 not in fvec.shape: raise ValueError, "Function does not return a 1-D array."
fvec = atleast_1d(fcn(x,*args))
def check_gradient(fcn,Dfcn,x0,col_deriv=0): """Perform a simple check on the gradient for correctness. """ x = atleast_1d(x0) n = len(x) x.shape = (n,) fvec = atleast_1d(fcn(x)) if 1 not in fvec.shape: raise ValueError, "Function does not return a 1-D array." m = len(fvec) fvec.shape = (m,) ldfjac = m fjac = atleast_1d(Dfcn(x)) fjac.shape = (m,n) if col_deriv == 0: fjac = transpose(fjac) xp = zeros((n,),Float64) err = zeros((m,),Float64) fvecp = None _minpack._chkder(m,n,x,fvec,fjac,ldfjac,xp,fvecp,1,err) fvecp = atleast_1d(fcn(xp)) fvecp.shape = (m,) _minpack._chkder(m,n,x,fvec,fjac,ldfjac,xp,fvecp,2,err) good = (product(greater(err,0.5))) return (good,err)
e8035e8d7cfa2696816dcfe7607a81878f53a57b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e8035e8d7cfa2696816dcfe7607a81878f53a57b/minpack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 20219, 12, 7142, 82, 16, 40, 7142, 82, 16, 92, 20, 16, 1293, 67, 20615, 33, 20, 4672, 3536, 4990, 279, 4143, 866, 603, 326, 10292, 364, 3434, 4496, 18, 3536, 225, 619, 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, 866, 67, 20219, 12, 7142, 82, 16, 40, 7142, 82, 16, 92, 20, 16, 1293, 67, 20615, 33, 20, 4672, 3536, 4990, 279, 4143, 866, 603, 326, 10292, 364, 3434, 4496, 18, 3536, 225, 619, 273, ...
'RELEASE_PENDING', 'POST'] }
'RELEASE_PENDING', 'POST') }
def default(self, package_name, *args, **kwargs): '''Display a list of Fedora bugs against a given package.''' # Nasty, nasty hack. The packagedb, via bugz.fp.o is getting sent # requests to download files. These refused to go away even when # we fixed up the apache redirects. Send them to download.fp.o # manually. if args or kwargs: if args: url = 'http://download.fedoraproject.org/' \ + quote(package_name) \ + '/' + '/'.join([quote(a) for a in args]) elif kwargs: url = 'http://mirrors.fedoraproject.org/' \ + quote(package_name) \ + '?' + '&'.join([quote(q) + '=' + quote(v) for (q, v) in kwargs.items()]) LOG.warning(_('Invalid URL: redirecting: %(url)s') % {'url':url}) raise redirect(url)
1f3cd8b6132d353e0009d264558c959304989c75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9953/1f3cd8b6132d353e0009d264558c959304989c75/bugs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 12, 2890, 16, 2181, 67, 529, 16, 380, 1968, 16, 2826, 4333, 4672, 9163, 4236, 279, 666, 434, 27278, 22398, 5314, 279, 864, 2181, 1093, 6309, 468, 423, 689, 93, 16, 290, 689, 93, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 12, 2890, 16, 2181, 67, 529, 16, 380, 1968, 16, 2826, 4333, 4672, 9163, 4236, 279, 666, 434, 27278, 22398, 5314, 279, 864, 2181, 1093, 6309, 468, 423, 689, 93, 16, 290, 689, 93, ...
"AND deleted='infinity' "
"AND p.deleted='infinity' AND v.deleted='infinity' "
def data_vlans(self, ctx, data): return self.dbpool.runQueryInPast(ctx, "SELECT v.vid, v.name, p.name " "FROM vlan v, port p " "WHERE v.equipment=%(ip)s AND v.type='local' " "AND v.port = p.index " "AND p.equipment = v.equipment " "AND deleted='infinity' " "ORDER BY v.vid, p.index", {'ip': str(self.ip)})
2eaa9b7c36c025898acca55845c29cccf38e13c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13050/2eaa9b7c36c025898acca55845c29cccf38e13c7/equipment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 10872, 634, 12, 2890, 16, 1103, 16, 501, 4672, 327, 365, 18, 1966, 6011, 18, 2681, 1138, 382, 52, 689, 12, 5900, 16, 315, 4803, 331, 18, 1246, 16, 331, 18, 529, 16, 293, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 10872, 634, 12, 2890, 16, 1103, 16, 501, 4672, 327, 365, 18, 1966, 6011, 18, 2681, 1138, 382, 52, 689, 12, 5900, 16, 315, 4803, 331, 18, 1246, 16, 331, 18, 529, 16, 293, 1...
for child in children: if child.nodeType == xml.dom.core.ELEMENT: if child.tagName in FIXUP_PARA_ELEMENTS: fixup_paras_helper(doc, child) break elif child.tagName in SKIP_ELEMENTS: if not start_fixed: start = i + 1 elif not start_fixed: start_fixed = 1 i = i + 1 else: if child.nodeType == xml.dom.core.TEXT \ and string.strip(child.data) and not start_fixed: start_fixed = 1 i = i + 1
def fixup_paras_helper(doc, container): # document is already normalized children = container.childNodes start = 0 start_fixed = 0 i = 0 SKIP_ELEMENTS = PARA_LEVEL_ELEMENTS + PARA_LEVEL_PRECEEDERS for child in children: if child.nodeType == xml.dom.core.ELEMENT: if child.tagName in FIXUP_PARA_ELEMENTS: fixup_paras_helper(doc, child) break elif child.tagName in SKIP_ELEMENTS: if not start_fixed: start = i + 1 elif not start_fixed: start_fixed = 1 i = i + 1 else: if child.nodeType == xml.dom.core.TEXT \ and string.strip(child.data) and not start_fixed: start_fixed = 1 i = i + 1 if DEBUG_PARA_FIXER: sys.stderr.write("fixup_paras_helper() called on <%s>; %d, %d\n" % (container.tagName, start, i)) if i > start: # the first [start:i] children shoudl be rewritten as <para> elements # start by breaking text nodes that contain \n\n+ into multiple nodes nstart, i = skip_leading_nodes(container.childNodes, start, i) if i > nstart: build_para(doc, container, nstart, i) fixup_paras_helper(doc, container)
4259f0db04f4c85f91637eb276330ad6b1e25d54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4259f0db04f4c85f91637eb276330ad6b1e25d54/docfixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 1065, 345, 67, 4759, 12, 2434, 16, 1478, 4672, 468, 1668, 353, 1818, 5640, 2325, 273, 1478, 18, 3624, 3205, 787, 273, 374, 787, 67, 12429, 273, 374, 277, 273, 374, 18420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 1065, 345, 67, 4759, 12, 2434, 16, 1478, 4672, 468, 1668, 353, 1818, 5640, 2325, 273, 1478, 18, 3624, 3205, 787, 273, 374, 787, 67, 12429, 273, 374, 277, 273, 374, 18420...
t = 1.0
from pyre.units.time import second t = 1.0*second
def test_setField(self): """ Test setField().
14d82510ca720f8573a7cf6bbeba1ac424aec6e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8645/14d82510ca720f8573a7cf6bbeba1ac424aec6e5/TestDirichlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 974, 12, 2890, 4672, 3536, 7766, 16331, 7675, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 974, 12, 2890, 4672, 3536, 7766, 16331, 7675, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
clazz.size = entry["size"] clazz.package = entry["package"]
clazz.size = entry["size"] clazz.package = entry["package"]
def mostRecentlyChangedIn(lib): # this should go into another class youngFiles = {} # for each interesting library part for category in ["class", "translation", "resource"]: catPath = os.path.normpath(os.path.join(lib["path"], lib[category])) # find youngest file file, mtime = filetool.findYoungest(catPath) youngFiles[mtime] = file # also check the Manifest file file, mtime = filetool.findYoungest(lib["manifest"]) youngFiles[mtime] = file # and return the maximum of those ytime = sorted(youngFiles.keys())[-1] return (youngFiles[ytime], ytime)
ad258893d515973ae390022bf9baf4e4d175dfdd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/ad258893d515973ae390022bf9baf4e4d175dfdd/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4486, 17076, 715, 5033, 382, 12, 2941, 4672, 225, 468, 333, 1410, 1960, 1368, 4042, 667, 677, 465, 75, 2697, 273, 2618, 468, 364, 1517, 26122, 5313, 1087, 364, 3150, 316, 8247, 1106, 311...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4486, 17076, 715, 5033, 382, 12, 2941, 4672, 225, 468, 333, 1410, 1960, 1368, 4042, 667, 677, 465, 75, 2697, 273, 2618, 468, 364, 1517, 26122, 5313, 1087, 364, 3150, 316, 8247, 1106, 311...
rotVal = (self.rotVal + self.offset) * self.direction desiredRotVal = (self.desiredRotVal + self.offset) * self.direction
def draw(self,gc): # Apply direction and offset rotVal = (self.rotVal + self.offset) * self.direction desiredRotVal = (self.desiredRotVal + self.offset) * self.direction # TODO: change pen color to correspond to degrees rotated? # TODO: clean up the code! width,height = self.GetSize() gc.SetPen(wx.Pen("black", 3)) gc.SetBrush(wx.Brush(wx.Colour(0, 0, 0, 98))) # Keep track of window width/height for centering originalWidth, originalHeight = None, None # Ensure shapes are drawn appropriately: # If we find the width/height or height/width ratio is skewed, # make the algorithm believe that we are dealing with smaller # constraints so the shapes are not cut off if (height/float(width) < .58): originalWidth = width width = height + float(height * .58) if (width/float(height) < .58): originalHeight = height height = width + float(width * .58) xCenter = width / 4 yCenter = height / 4 # Use the distance formula to get the length of the sides a = sqrt( (-xCenter-xCenter)**2 + (-yCenter-yCenter)**2 ) b = sqrt( (xCenter-0)**2 + (-yCenter-yCenter)**2 ) # Radius Calculation: # Calculate the radius for an Isoceles Triangle: ((a^2)*b)/4*K # where a and b are two sides and K is the area radius = (a**2 *b) / (4 * (.5 * a * b)) #Note that for simplicity this triangle has its origin at 0,0 #Rounding xCenter = int(xCenter+.5) yCenter = int(yCenter+.5) radius = int(radius+.5) trianglePath = gc.CreatePath() trianglePath.MoveToPoint(-xCenter, -yCenter) trianglePath.AddLineToPoint(xCenter, -yCenter) #trianglePath.MoveToPoint(xCenter,-yCenter) trianglePath.AddLineToPoint(0, radius) #trianglePath.MoveToPoint(0, radius) trianglePath.AddLineToPoint(-xCenter, -yCenter) trianglePath.CloseSubpath() directionCircle = gc.CreatePath() directionCircle.AddCircle(0,radius,3) directionCircle.CloseSubpath()
ec2945f74c14ce51db78a77bd9c92bb3ad6d9d89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10608/ec2945f74c14ce51db78a77bd9c92bb3ad6d9d89/controls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 16, 13241, 4672, 468, 5534, 4068, 471, 1384, 4168, 3053, 273, 261, 2890, 18, 8342, 3053, 397, 365, 18, 3348, 13, 380, 365, 18, 9855, 6049, 8570, 3053, 273, 261, 2890, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 16, 13241, 4672, 468, 5534, 4068, 471, 1384, 4168, 3053, 273, 261, 2890, 18, 8342, 3053, 397, 365, 18, 3348, 13, 380, 365, 18, 9855, 6049, 8570, 3053, 273, 261, 2890, 1...
path = repo.getPackage(pkg)
path = repo.getPackage(po)
def downloadPackages(self): """Cycle through the list of package objects and download them from their respective repos."""
5af01719d36778fba2380cafc820d66aedd832ca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8489/5af01719d36778fba2380cafc820d66aedd832ca/gather.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 11425, 12, 2890, 4672, 3536, 13279, 3059, 326, 666, 434, 2181, 2184, 471, 4224, 2182, 628, 3675, 17613, 13686, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4224, 11425, 12, 2890, 4672, 3536, 13279, 3059, 326, 666, 434, 2181, 2184, 471, 4224, 2182, 628, 3675, 17613, 13686, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
try: body = [output, extra] except NameError: body = [output]
body = [output]
def perform_deleteaccount(req, userID, callback='yes', confirm=0): """delete account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="5"></a>5. Delete account.&nbsp&nbsp&nbsp<small>[<a title="See guide" href="%s/admin/webaccess/guide.html#4">?</a>]</small>""" % weburl res = run_sql("SELECT id, email, password FROM user WHERE id=%s" % userID) output = "" if res: if confirm in [0, "0"]: text = '<b><span class="important">Are you sure you want to delete the account with email: "%s"?</span></b>' % res[0][1] output += createhiddenform(action="deleteaccount", text=text, userID=userID, confirm=1, button="Delete") elif confirm in [1, "1"]: res2 = run_sql("DELETE FROM user WHERE id=%s" % userID) output += '<b><span class="info">Account deleted.</span></b>' if CFG_ACCESS_CONTROL_NOTIFY_USER_ABOUT_DELETION == 1: emailsent = sendAccountDeletedMessage(res[0][1], res[0][1]) else: output += '<b><span class="info">The account id given does not exist.</span></b>' try: body = [output, extra] except NameError: body = [output] if callback: return perform_editaccount(req, userID, mtype='perform_deleteaccount', content=addadminbox(subtitle, body), callback='yes') else: return addadminbox(subtitle, body)
8e6aa1042563d2e1f44b1ffbe6e50d6cd67dbacc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1931/8e6aa1042563d2e1f44b1ffbe6e50d6cd67dbacc/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3733, 4631, 12, 3658, 16, 16299, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 3733, 2236, 8395, 225, 261, 1944, 67, 710, 16, 1357, 67, 2150, 13, 273, 353, 67, 3666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3733, 4631, 12, 3658, 16, 16299, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 3733, 2236, 8395, 225, 261, 1944, 67, 710, 16, 1357, 67, 2150, 13, 273, 353, 67, 3666, ...
security.declareProtected(permissions.View, 'copy')
security.declareProtected(CMFCorePermissions.View, 'copy')
def __add__(self, other): c = BasicSchema() # We can't use update and keep the order so we do it manually for field in self.fields(): c.addField(field) for field in other.fields(): c.addField(field) # Need to be smarter when joining layers # and internal props c._props.update(self._props) return c
b9a35d44b511b5a532334179a24412a4695367d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/b9a35d44b511b5a532334179a24412a4695367d1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 972, 12, 2890, 16, 1308, 4672, 276, 273, 7651, 3078, 1435, 468, 1660, 848, 1404, 999, 1089, 471, 3455, 326, 1353, 1427, 732, 741, 518, 10036, 364, 652, 316, 365, 18, 2821, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 972, 12, 2890, 16, 1308, 4672, 276, 273, 7651, 3078, 1435, 468, 1660, 848, 1404, 999, 1089, 471, 3455, 326, 1353, 1427, 732, 741, 518, 10036, 364, 652, 316, 365, 18, 2821, ...
not mime_type.startswith('text/plain'):
mime_type and not mime_type.startswith('text/plain'):
def _render_view(self, req, attachment): perm_map = {'ticket': 'TICKET_VIEW', 'wiki': 'WIKI_VIEW'} req.perm.assert_permission(perm_map[attachment.parent_type])
d297e4a1c8285594996719f1e8a2bceb6c9b705e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/d297e4a1c8285594996719f1e8a2bceb6c9b705e/attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 1945, 12, 2890, 16, 1111, 16, 6042, 4672, 4641, 67, 1458, 273, 13666, 16282, 4278, 296, 56, 16656, 1584, 67, 12145, 2187, 296, 13044, 4278, 296, 23109, 47, 45, 67, 12145, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5902, 67, 1945, 12, 2890, 16, 1111, 16, 6042, 4672, 4641, 67, 1458, 273, 13666, 16282, 4278, 296, 56, 16656, 1584, 67, 12145, 2187, 296, 13044, 4278, 296, 23109, 47, 45, 67, 12145, ...
print 'Cover Art' in data
def _load(self, filename): self.log.debug("Loading file %r", filename) file = self._File(encode_filename(filename)) metadata = Metadata() if file.tags: for origname, values in file.tags.items(): if origname.lower().startswith("cover art") and values.kind == mutagen.apev2.BINARY: if '\0' in values.value: descr, data = values.value.split('\0', 1) print 'Cover Art' in data if data.startswith('\xff\xd8\xff\xe0'): mime = 'image/jpeg' else: mime = 'image/png' metadata.add_image(mime, data) # skip EXTERNAL and BINARY values if values.kind != mutagen.apev2.TEXT: continue for value in values: name = origname if name == "Year": name = "date" value = sanitize_date(value) elif name == "Track": name = "tracknumber" track = value.split("/") if len(track) > 1: metadata["totaltracks"] = track[1] value = track[0] elif name == 'Performer' and value.endswith(')'): name = name.lower() start = value.rfind(' (') if start > 0: name += ':' + value[start + 2:-1] value = value[:start] elif name in self.__translate: name = self.__translate[name] else: name = name.lower() metadata.add(name, value) self._info(metadata, file) return metadata
02a9d12284cc4c8f2c47229cbb930fdba6f0dae8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12415/02a9d12284cc4c8f2c47229cbb930fdba6f0dae8/apev2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 12, 2890, 16, 1544, 4672, 365, 18, 1330, 18, 4148, 2932, 10515, 585, 738, 86, 3113, 1544, 13, 585, 273, 365, 6315, 812, 12, 3015, 67, 3459, 12, 3459, 3719, 1982, 273, 6912, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 12, 2890, 16, 1544, 4672, 365, 18, 1330, 18, 4148, 2932, 10515, 585, 738, 86, 3113, 1544, 13, 585, 273, 365, 6315, 812, 12, 3015, 67, 3459, 12, 3459, 3719, 1982, 273, 6912, ...
self.max_task_size = 1 self.task_count = 0
def done(self): self.progress_dialog.hide() self.model.clear() self.iconview.set_sensitive(True) # TODO: enable upload menu item self.get_quota() self.max_task_size = 1 self.task_count = 0
ae707731ea27e583eef75e3f658dc191f133b44f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11023/ae707731ea27e583eef75e3f658dc191f133b44f/postr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2731, 12, 2890, 4672, 365, 18, 8298, 67, 12730, 18, 11248, 1435, 365, 18, 2284, 18, 8507, 1435, 365, 18, 3950, 1945, 18, 542, 67, 23481, 12, 5510, 13, 468, 2660, 30, 4237, 3617, 3824, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2731, 12, 2890, 4672, 365, 18, 8298, 67, 12730, 18, 11248, 1435, 365, 18, 2284, 18, 8507, 1435, 365, 18, 3950, 1945, 18, 542, 67, 23481, 12, 5510, 13, 468, 2660, 30, 4237, 3617, 3824, ...
print 'Disconnected'
if options.spy: sys.stdout.write('\n') sys.stderr.write('Disconnected\n')
def stop(self): """Stop copying""" if self.alive: self.alive = False self.thread_read.join()
8c80bbcfa2dee7de96e5435fdcc0741993aac1ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/8c80bbcfa2dee7de96e5435fdcc0741993aac1ac/tcp_serial_redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 3536, 4947, 8933, 8395, 309, 365, 18, 11462, 30, 365, 18, 11462, 273, 1083, 365, 18, 5930, 67, 896, 18, 5701, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 3536, 4947, 8933, 8395, 309, 365, 18, 11462, 30, 365, 18, 11462, 273, 1083, 365, 18, 5930, 67, 896, 18, 5701, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -...
return nt.void.__setattr__(self,attr,val)
else: raise AttributeError, "'record' object has no "\ "attribute '%s'" % attr
def __setattr__(self, attr, val): if attr in ['setfield', 'getfield', 'dtype']: raise AttributeError, "Cannot set '%s' attribute" % attr; fielddict = nt.void.__getattribute__(self,'dtype').fields res = fielddict.get(attr,None) if res: return self.setfield(val,*res[:2])
da78766309515905b4016ac494dac384fe80a5fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/da78766309515905b4016ac494dac384fe80a5fd/records.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 1604, 16, 1244, 4672, 309, 1604, 316, 10228, 542, 1518, 2187, 296, 588, 1518, 2187, 296, 8972, 3546, 30, 1002, 6394, 16, 315, 4515, 444, 1995, 87, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 1604, 16, 1244, 4672, 309, 1604, 316, 10228, 542, 1518, 2187, 296, 588, 1518, 2187, 296, 8972, 3546, 30, 1002, 6394, 16, 315, 4515, 444, 1995, 87, 1...
result = res_partner_address.read(self.cr, self.uid, [adr_id])
result = res_partner_address.read(self.cr, self.uid, [adr_id],context=self.context.copy())
def _adr_get(self, partner, type): res = [] res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address') addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type]) adr_id = addresses and addresses[type] or False result = { 'name': False, 'street': False, 'city' : False, 'zip' : False, 'country_id' : False, } if adr_id: result = res_partner_address.read(self.cr, self.uid, [adr_id]) result[0]['country_id'] = result[0]['country_id'] and result[0]['country_id'][1] or False return result res.append(result) return res
1d420cae792728d6f0ce74bfe4c7ee76cfb4f587 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/1d420cae792728d6f0ce74bfe4c7ee76cfb4f587/overdue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 361, 86, 67, 588, 12, 2890, 16, 19170, 16, 618, 4672, 400, 273, 5378, 400, 67, 31993, 273, 2845, 264, 18, 588, 67, 6011, 12, 2890, 18, 3353, 18, 20979, 2934, 588, 2668, 455, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 361, 86, 67, 588, 12, 2890, 16, 19170, 16, 618, 4672, 400, 273, 5378, 400, 67, 31993, 273, 2845, 264, 18, 588, 67, 6011, 12, 2890, 18, 3353, 18, 20979, 2934, 588, 2668, 455, 18,...
self.bitmap_1 = wx.StaticBitmap(self.advanced, -1, wx.Bitmap("/home/andyh/projects/external/shtoom/shtoom/ui/gnomeui/shtoom.gif", wx.BITMAP_TYPE_ANY))
self.bitmap_1 = wx.StaticBitmap(self.advanced, -1, wx.Bitmap("shtoom\ui\gnomeui\shtoom.gif", wx.BITMAP_TYPE_ANY))
def __init__(self, *args, **kwds): # begin wxGlade: ShtoomMainFrame.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.advanced = wx.Panel(self, -1) self.panel_3 = wx.Panel(self.advanced, -1, style=wx.SUNKEN_BORDER|wx.TAB_TRAVERSAL) self.panel_1 = wx.Panel(self, -1) self.panel_2 = wx.Panel(self, -1) # Menu Bar self.shtoom_frame_menubar = wx.MenuBar() self.SetMenuBar(self.shtoom_frame_menubar) wxglade_tmp_menu = wx.Menu() wxglade_tmp_menu.Append(self.MENU_REGISTER, "Register", "Register as a new user with a SIP server", wx.ITEM_NORMAL) wxglade_tmp_menu.Append(self.MENU_PREFS, "Preferences", "Edit Shtoom preferences", wx.ITEM_NORMAL) wxglade_tmp_menu.Append(self.MENU_EXIT, "Exit", "Exit Shtoom", wx.ITEM_NORMAL) self.shtoom_frame_menubar.Append(wxglade_tmp_menu, "File") wxglade_tmp_menu = wx.Menu() wxglade_tmp_menu.Append(self.MENU_ERRORLOG, "Error Log", "View any error or debug messages", wx.ITEM_NORMAL) self.shtoom_frame_menubar.Append(wxglade_tmp_menu, "View") wxglade_tmp_menu = wx.Menu() wxglade_tmp_menu.Append(self.MENU_HELP_CONTENTS, "Contents", "Give me some help", wx.ITEM_NORMAL) self.shtoom_frame_menubar.Append(wxglade_tmp_menu, "Help") # Menu Bar end self.shtoom_frame_statusbar = self.CreateStatusBar(1, 0) self.label_1 = wx.StaticText(self.panel_2, -1, "Address:", style=wx.ALIGN_CENTRE) self.combo_address = wx.ComboBox(self.panel_2, self.COMBO_ADDRESS, choices=[], style=wx.CB_DROPDOWN) self.button_call = wx.Button(self.panel_1, self.BUTT_CALL, "Call") self.button_lookup = wx.Button(self.panel_1, self.BUTT_LOOKUP, "Lookup Address") self.button_advanced = wx.Button(self.panel_1, self.BUTT_ADVANCED, "-") self.button_1 = wx.Button(self.panel_3, self.BUTT_1, "1", style=wx.BU_EXACTFIT) self.button_2 = wx.Button(self.panel_3, self.BUTT_2, "2", style=wx.BU_EXACTFIT) self.button_3 = wx.Button(self.panel_3, self.BUTT_3, "3", style=wx.BU_EXACTFIT) self.button_4 = wx.Button(self.panel_3, self.BUTT_4, "4", style=wx.BU_EXACTFIT) self.button_5 = wx.Button(self.panel_3, self.BUTT_5, "5", style=wx.BU_EXACTFIT) self.button_6 = wx.Button(self.panel_3, self.BUTT_6, "6", style=wx.BU_EXACTFIT) self.button_7 = wx.Button(self.panel_3, self.BUTT_7, "7", style=wx.BU_EXACTFIT) self.button_8 = wx.Button(self.panel_3, self.BUTT_8, "8", style=wx.BU_EXACTFIT) self.button_9 = wx.Button(self.panel_3, self.BUTT_9, "9", style=wx.BU_EXACTFIT) self.button_star = wx.Button(self.panel_3, self.BUTT_STAR, "*", style=wx.BU_EXACTFIT) self.button_0 = wx.Button(self.panel_3, self.BUTT_0, "0", style=wx.BU_EXACTFIT) self.button_hash = wx.Button(self.panel_3, self.BUTT_HASH, "#", style=wx.BU_EXACTFIT) self.bitmap_1 = wx.StaticBitmap(self.advanced, -1, wx.Bitmap("/home/andyh/projects/external/shtoom/shtoom/ui/gnomeui/shtoom.gif", wx.BITMAP_TYPE_ANY))
7dd1cbb81d22f1de4ad1f713ca25b883597409d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/7dd1cbb81d22f1de4ad1f713ca25b883597409d3/wxshtoomframe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 468, 2376, 7075, 21308, 2486, 30, 348, 647, 4252, 6376, 3219, 16186, 2738, 972, 17149, 9614, 4060, 11929, 273, 7075, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 468, 2376, 7075, 21308, 2486, 30, 348, 647, 4252, 6376, 3219, 16186, 2738, 972, 17149, 9614, 4060, 11929, 273, 7075, 18, ...
raise WalkerEror
raise WalkerError
def sliceop(self, nodelist): raise WalkerEror
0e83a60ba67d19dd3d8904cf68e390b90621614b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0e83a60ba67d19dd3d8904cf68e390b90621614b/transformer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2788, 556, 12, 2890, 16, 30068, 4672, 1002, 7564, 264, 29228, 280, 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, 2788, 556, 12, 2890, 16, 30068, 4672, 1002, 7564, 264, 29228, 280, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
"""Tix maintains a list of directory under which which
"""Tix maintains a list of directories under which
def tix_addbitmapdir(self, directory): """Tix maintains a list of directory under which which the tix_getimage and tix_getbitmap commands will search for image files. The standard bitmap direc tory is $TIX_LIBRARY/bitmaps. The addbitmapdir com mand adds directory into this list. By using this command, the image files of an applications can also be located using the tix_getimage or tix_getbitmap command. """ return self.tk.call('tix', 'addbitmapdir', directory)
2c55b08db886232a6fd7f100f955f541567ab82d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2c55b08db886232a6fd7f100f955f541567ab82d/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 697, 67, 1289, 3682, 1458, 1214, 12, 2890, 16, 1867, 4672, 3536, 56, 697, 11566, 4167, 279, 666, 434, 6402, 3613, 1492, 326, 225, 268, 697, 67, 588, 2730, 225, 471, 268, 697, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 697, 67, 1289, 3682, 1458, 1214, 12, 2890, 16, 1867, 4672, 3536, 56, 697, 11566, 4167, 279, 666, 434, 6402, 3613, 1492, 326, 225, 268, 697, 67, 588, 2730, 225, 471, 268, 697, 67, ...
import IRC return IRC.format(CommitFormatter.format_branch(self, branch), 'orange')
from IRC.Formatting import format return format(CommitFormatter.format_branch(self, branch), 'orange')
def format_branch(self, branch): import IRC return IRC.format(CommitFormatter.format_branch(self, branch), 'orange')
36bde6f1876b868f6f35d0419ceedf79bc1add09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/36bde6f1876b868f6f35d0419ceedf79bc1add09/Formatters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 7500, 12, 2890, 16, 3803, 4672, 1930, 467, 11529, 327, 467, 11529, 18, 2139, 12, 5580, 5074, 18, 2139, 67, 7500, 12, 2890, 16, 3803, 3631, 296, 280, 726, 6134, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 7500, 12, 2890, 16, 3803, 4672, 1930, 467, 11529, 327, 467, 11529, 18, 2139, 12, 5580, 5074, 18, 2139, 67, 7500, 12, 2890, 16, 3803, 3631, 296, 280, 726, 6134, 2, -100, -100, ...
cr.execute('update project_task set remaining_hours=remaining_hours+%.2f+(%.2f) where id=%s', (-vals.get('hours',0.0), work.hours, work.task_id.id))
cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (vals.get('hours',0.0), work.hours, work.task_id.id))
def write(self, cr, uid, ids,vals,context={}): for work in self.browse(cr, uid, ids, context): cr.execute('update project_task set remaining_hours=remaining_hours+%.2f+(%.2f) where id=%s', (-vals.get('hours',0.0), work.hours, work.task_id.id)) return super(project_work,self).write(cr, uid, ids, vals, context)
4f6843602a7852da55ccc40520fcc9fc8e923c58 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/4f6843602a7852da55ccc40520fcc9fc8e923c58/project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 4524, 16, 2472, 12938, 4672, 364, 1440, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 4672, 4422, 18, 8837, 2668, 2725, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 4524, 16, 2472, 12938, 4672, 364, 1440, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 4672, 4422, 18, 8837, 2668, 2725, ...
return loads(strval), val
return loads(strval.encode('latin-1')), val
def value_decode(self, val): strval = _unquote(val) try: return loads(strval), val except: return strval, val
26547c170d08aef825a140b86868c82fbab44447 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/26547c170d08aef825a140b86868c82fbab44447/Cookie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 460, 67, 3922, 12, 2890, 16, 1244, 4672, 18143, 273, 389, 318, 6889, 12, 1125, 13, 775, 30, 327, 6277, 12, 701, 1125, 18, 3015, 2668, 26578, 17, 21, 6134, 3631, 1244, 1335, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 460, 67, 3922, 12, 2890, 16, 1244, 4672, 18143, 273, 389, 318, 6889, 12, 1125, 13, 775, 30, 327, 6277, 12, 701, 1125, 18, 3015, 2668, 26578, 17, 21, 6134, 3631, 1244, 1335, 30, 327, ...
if hasattr (UserCollection(item), 'color'): del UserCollection(item).color UserCollection(item).ensureColor()
uc = UserCollection(item) if hasattr(uc, 'color'): del uc.color uc.ensureColor()
def onDuplicateEvent(self, event): mine = schema.ns('osaf.pim', self.itsView).mine
503a06c290398b314753dc231a3106a419e97106 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/503a06c290398b314753dc231a3106a419e97106/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 11826, 1133, 12, 2890, 16, 871, 4672, 312, 558, 273, 1963, 18, 2387, 2668, 538, 1727, 18, 84, 381, 2187, 365, 18, 1282, 1767, 2934, 3081, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 603, 11826, 1133, 12, 2890, 16, 871, 4672, 312, 558, 273, 1963, 18, 2387, 2668, 538, 1727, 18, 84, 381, 2187, 365, 18, 1282, 1767, 2934, 3081, 2, -100, -100, -100, -100, -100, -100, -1...
sage: print L.__hash__()
sage: L.__hash__()
def __hash__(self): """ The hash of a latin square is precisely the hash of the underlying matrix.
79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 4672, 3536, 1021, 1651, 434, 279, 30486, 8576, 353, 13382, 291, 2357, 326, 1651, 434, 326, 6808, 3148, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 4672, 3536, 1021, 1651, 434, 279, 30486, 8576, 353, 13382, 291, 2357, 326, 1651, 434, 326, 6808, 3148, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
EdkLogger.quiet("ERROR: Please specify a ARCH, and try again.")
EdkLogger.quiet("ERROR: Please specify an ARCH, then try again.")
def Process(self, ModuleFile, PlatformFile, ewb): # # Merge Arch # self.Opt.TARGET_ARCH = list(set(self.Opt.TARGET_ARCH) & set(ewb.SupArchList)) if len(self.Opt.TARGET_ARCH) == 0: EdkLogger.quiet("ERROR: Please specify a ARCH, and try again.") self.isexit(1)
c0c22cc283a500036bc0474c42e3b19d821583e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/c0c22cc283a500036bc0474c42e3b19d821583e6/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 12, 2890, 16, 5924, 812, 16, 11810, 812, 16, 22722, 70, 4672, 468, 468, 8964, 16959, 468, 365, 18, 6179, 18, 16374, 67, 10586, 273, 666, 12, 542, 12, 2890, 18, 6179, 18, 16374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 12, 2890, 16, 5924, 812, 16, 11810, 812, 16, 22722, 70, 4672, 468, 468, 8964, 16959, 468, 365, 18, 6179, 18, 16374, 67, 10586, 273, 666, 12, 542, 12, 2890, 18, 6179, 18, 16374, ...
pass
setCommandOrder=True if setCommandOrder: sec.setCommandOrder(currCO)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = config.Nims[slotid].advanced.lnb[x] sec.addLNB() sec.setLNBTunerMask(1 << slotid) if currentConfigSelectionElement(currLnb.lof) == "universal_lnb": sec.setLNBLOFL(9750000) sec.setLNBLOFH(10600000) sec.setLNBThreshold(11750000) elif currentConfigSelectionElement(currLnb.lof) == "c_band": sec.setLNBLOFL(5150000) sec.setLNBLOFH(5150000) sec.setLNBThreshold(5150000) elif currentConfigSelectionElement(currLnb.lof) == "user_defined": sec.setLNBLOFL(currLnb.lofl.value * 1000) sec.setLNBLOFH(currLnb.lofh.value * 1000) sec.setLNBThreshold(currLnb.threshold.value * 1000) if currentConfigSelectionElement(currLnb.output_12v) == "0V": pass elif currentConfigSelectionElement(currLnb.output_12v) == "12V": pass if currentConfigSelectionElement(currLnb.increased_voltage) == "yes": pass else: pass if currentConfigSelectionElement(currLnb.diseqcMode) == "none": pass elif currentConfigSelectionElement(currLnb.diseqcMode) == "1_0": pass elif currentConfigSelectionElement(currLnb.diseqcMode) == "1_1": pass elif currentConfigSelectionElement(currLnb.diseqcMode) == "1_2": pass
45b15800295dbe7e8aa64c7c97e62ed7a9f0a137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/45b15800295dbe7e8aa64c7c97e62ed7a9f0a137/NimManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 23618, 12, 2890, 16, 4694, 350, 4672, 1428, 273, 425, 30199, 12692, 270, 19345, 13142, 11568, 3367, 18, 588, 1442, 1435, 328, 6423, 15163, 273, 2618, 364, 619, 316, 1048, 12, 21, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23618, 12, 2890, 16, 4694, 350, 4672, 1428, 273, 425, 30199, 12692, 270, 19345, 13142, 11568, 3367, 18, 588, 1442, 1435, 328, 6423, 15163, 273, 2618, 364, 619, 316, 1048, 12, 21, 1...
elif os.path.isfile(os.path.join(options['location'], 'lib/python/Zope2') + '/version.txt'): version_file = os.path.join(options['location'], 'lib/python/Zope2') + '/version.txt'
elif os.path.isfile(os.path.join(options['zope2-location'], 'lib/python/Zope2') + '/version.txt'): version_file = os.path.join(options['zope2-location'], 'lib/python/Zope2') + '/version.txt'
def __init__(self, buildout, name, options): self.egg = zc.recipe.egg.Egg(buildout, options['recipe'], options) self.buildout, self.options, self.name = buildout, options, name
d359d08c86a724a873ef081e7ff34fc836532c6b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12227/d359d08c86a724a873ef081e7ff34fc836532c6b/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1361, 659, 16, 508, 16, 702, 4672, 365, 18, 23171, 273, 998, 71, 18, 3927, 3151, 18, 23171, 18, 41, 14253, 12, 3510, 659, 16, 702, 3292, 3927, 3151, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1361, 659, 16, 508, 16, 702, 4672, 365, 18, 23171, 273, 998, 71, 18, 3927, 3151, 18, 23171, 18, 41, 14253, 12, 3510, 659, 16, 702, 3292, 3927, 3151, 17...
ret_val = os.popen(self.config['lock_command']).readlines()
if (self.timeGone==0): self.timeGone = time.time() ret_val = os.popen(self.config['lock_command']).readlines() self.timeGone = 0 else: self.logger.log_line(_('A command for %s has been skipped because the former command did not finish yet.') % _('locking')) self.ErrorMsg = _('A command for %s has been skipped because the former command did not finish yet.') % _('locking') def go_proximity(self): if (self.timeProx==0): self.timeProx = time.time() ret_val = os.popen(self.config['proximity_command']).readlines() self.timeProx = 0 else: self.logger.log_line(_('A command for %s has been skipped because the former command did not finish yet.') % _('proximity')) self.ErrorMsg = _('A command for %s has been skipped because the former command did not finish yet.') % _('proximity')
def go_gone(self): #The Doctor is out if self.ignoreFirstTransition: self.ignoreFirstTransition = False else: self.logger.log_line(_('screen is locked')) ret_val = os.popen(self.config['lock_command']).readlines()
8aae9f10adc270617c9265375716f9c0ef1eb095 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/61/8aae9f10adc270617c9265375716f9c0ef1eb095/proximity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 67, 75, 476, 12, 2890, 4672, 468, 1986, 2256, 30206, 353, 596, 309, 365, 18, 6185, 3759, 8850, 30, 365, 18, 6185, 3759, 8850, 273, 1083, 469, 30, 365, 18, 4901, 18, 1330, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 67, 75, 476, 12, 2890, 4672, 468, 1986, 2256, 30206, 353, 596, 309, 365, 18, 6185, 3759, 8850, 30, 365, 18, 6185, 3759, 8850, 273, 1083, 469, 30, 365, 18, 4901, 18, 1330, 67, 1...
if t[-1] == ']' : c += indent + ' %s %s;\n' % ( t[:t.find('[')], a['name']+t[t.find('['):] )
if t[-1] == ']' : c += indent + ' %s %s;\n' % ( t[:t.find('[')], a['name'] + arraytype )
def genClassShadow(self, attrs, inner = 0 ) : inner_shadows = {} bases = self.getBases( attrs['id'] ) cls = self.genTypeName(attrs['id'],const=True,colon=True) clt = string.translate(str(cls), self.transtable) if self.isUnnamedType(cls) and inner : clt = '' xtyp = self.xref[attrs['id']] typ = xtyp['elem'].lower() indent = inner * 2 * ' ' if typ == 'enumeration' : c = indent + 'enum %s {};\n' % clt else: if not bases : c = indent + '%s %s {\n%s public:\n' % (typ, clt, indent) else : c = indent + '%s %s : ' % (typ, clt) for b in bases : if b.get('virtual','') == '1' : acc = 'virtual ' + b['access'] else : acc = b['access'] bname = self.genTypeName(b['type'],colon=True) if self.xref[b['type']]['attrs'].get('access') in ('private','protected'): bname = string.translate(str(bname),self.transtable) c += indent + '%s %s' % ( acc , bname ) if b is not bases[-1] : c += ', ' c += indent + ' {\n' + indent +' public:\n' if clt: # and not self.checkAccessibleType(xtyp): c += indent + ' %s();\n' % (clt) if self.isClassVirtual( attrs ) : c += indent + ' virtual ~%s() throw();\n' % ( clt ) members = attrs.get('members','') memList = members.split() for m in memList : member = self.xref[m] if member['elem'] in ('Class','Struct','Union','Enumeration') \ and member['attrs'].get('access') in ('private','protected') \ and not self.isUnnamedType(member['attrs'].get('name')): cmem = self.genTypeName(member['attrs']['id'],const=True,colon=True) if cmem != cls and cmem not in inner_shadows : inner_shadows[cmem] = string.translate(str(cmem), self.transtable) c += self.genClassShadow(member['attrs'], inner + 1) for m in memList : member = self.xref[m] if member['elem'] in ('Field',) : a = member['attrs'] t = self.genTypeName(a['type'],colon=True,const=True) #---- Check if a type and a member with the same name exist in the same scope mTypeElem = self.xref[a['type']]['elem'] if mTypeElem in ('Class','Struct'): mTypeName = self.xref[a['type']]['attrs']['name'] mTypeId = a['type'] for el in self.xref[self.xref[a['type']]['attrs']['context']]['attrs'].get('members').split(): if self.xref[el]['attrs'].get('name') == mTypeName and mTypeId != el : t = mTypeElem.lower() + ' ' + t[2:] break #---- Check for non public types------------------------ noPublicType = self.checkAccessibleType(self.xref[a['type']]) if ( noPublicType and not self.isUnnamedType(self.xref[a['type']]['attrs'].get('name'))): noPubTypeAttrs = self.xref[noPublicType]['attrs'] cmem = self.genTypeName(noPubTypeAttrs['id'],const=True,colon=True) if cmem != cls and cmem not in inner_shadows : inner_shadows[cmem] = string.translate(str(cmem), self.transtable) c += self.genClassShadow(noPubTypeAttrs, inner + 1) #---- translate the type with the inner shadow type----- ikeys = inner_shadows.keys() ikeys.sort(lambda x,y : len(y) - len(x)) for ikey in ikeys : if t.find(ikey) == 0 : t = t.replace(ikey, inner_shadows[ikey]) # change current class by shadow name elif t.find(ikey[2:]) != -1 : t = t.replace(ikey[2:], inner_shadows[ikey]) # idem without leading :: mType = self.xref[a.get('type')] if mType and self.isUnnamedType(mType['attrs'].get('name')) : t = self.genClassShadow(mType['attrs'], inner+1)[:-2] fPPos = self.funPtrPos(t) if t[-1] == ']' : c += indent + ' %s %s;\n' % ( t[:t.find('[')], a['name']+t[t.find('['):] ) elif fPPos : c += indent + ' %s;\n' % ( t[:fPPos] + a['name'] + t[fPPos:] ) else : c += indent + ' %s %s;\n' % ( t, a['name'] ) c += indent + '};\n' return c
e9f2138d0dfcad0aa6103b47aa0ec573611db048 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4350/e9f2138d0dfcad0aa6103b47aa0ec573611db048/gendict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 797, 12957, 12, 2890, 16, 3422, 16, 3443, 273, 374, 262, 294, 3443, 67, 19119, 87, 273, 2618, 8337, 273, 365, 18, 588, 38, 3304, 12, 3422, 3292, 350, 3546, 262, 2028, 273, 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, 3157, 797, 12957, 12, 2890, 16, 3422, 16, 3443, 273, 374, 262, 294, 3443, 67, 19119, 87, 273, 2618, 8337, 273, 365, 18, 588, 38, 3304, 12, 3422, 3292, 350, 3546, 262, 2028, 273, 365, ...
for site, data in nex.data.characters.items(): charpos += site
for site_idx, site in enumerate(sorted(nex.data.characters), 0): data = nex.data.characters.get(site) charpos += 1 charlabel = nex.data.charlabels.get(site_idx, site_idx + 1) if nex.filename == '<String>': label = '%s.%s' % (str(nex_id), charlabel) else: label = '%s.%s' % (nex.filename, charlabel)
def combine_nexuses(nexuslist): """ Combines a list of NexusReader instances into a single nexus :param nexuslist: A list of NexusReader instances :type nexuslist: List :return: A NexusWriter instance :raises TypeError: if nexuslist is not a list of NexusReader instances :raises IOError: if unable to read an file in nexuslist :raises NexusFormatException: if a nexus file does not have a `data` block """ if isinstance(nexuslist, list) == False: raise TypeError("nexuslist is not a list") out = NexusWriter() charpos = 1 for nex in nexuslist: if isinstance(nex, NexusReader) == False: raise TypeError("%s is not a NexusReader instance" % nex) if 'data' not in nex.blocks: raise NexusFormatException("Warning: %s has no data block" % nex.filename) out.add_comment("%d - %d: %s" % (charpos, charpos + nex.data.nchar -1, nex.filename)) for site, data in nex.data.characters.items(): charpos += site for taxon, value in data.items(): out.add(taxon, charpos, value) charpos += 1 return out
18fc638cdd6ba04872e0db3f83585fd63fcd5646 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1398/18fc638cdd6ba04872e0db3f83585fd63fcd5646/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8661, 67, 82, 338, 6117, 12, 82, 21029, 1098, 4672, 3536, 15645, 1465, 279, 666, 434, 423, 21029, 2514, 3884, 1368, 279, 2202, 290, 21029, 225, 294, 891, 290, 21029, 1098, 30, 432, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8661, 67, 82, 338, 6117, 12, 82, 21029, 1098, 4672, 3536, 15645, 1465, 279, 666, 434, 423, 21029, 2514, 3884, 1368, 279, 2202, 290, 21029, 225, 294, 891, 290, 21029, 1098, 30, 432, 666, ...
"STATUS_REQUEST"])
"STATUS_REQUEST")
def enum(*sequential, **named): """Python sucks for not having an enum""" enums = dict(zip(sequential, sequential), **named) return type('Enum', (), enums)
a967407633bc3bf01470b8d09a5315735d74017f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4681/a967407633bc3bf01470b8d09a5315735d74017f/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2792, 30857, 307, 13628, 16, 2826, 13188, 4672, 3536, 15774, 1597, 363, 87, 364, 486, 7999, 392, 2792, 8395, 17922, 273, 2065, 12, 4450, 12, 307, 13628, 16, 21210, 3631, 2826, 13188, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2792, 30857, 307, 13628, 16, 2826, 13188, 4672, 3536, 15774, 1597, 363, 87, 364, 486, 7999, 392, 2792, 8395, 17922, 273, 2065, 12, 4450, 12, 307, 13628, 16, 21210, 3631, 2826, 13188, 13, ...
reactor.callFromThread(self.response.stream.write, output)
reactor.callFromThread(self.stream.write, output)
def _start(): # Called in IO thread self.response.stream.registerProducer(self, True) self.__callback() # Notify application thread to start writing self.unpaused.set()
bec576033f37cd6a573b842521b9686c9194d679 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bec576033f37cd6a573b842521b9686c9194d679/wsgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 13332, 468, 11782, 316, 1665, 2650, 365, 18, 2740, 18, 3256, 18, 4861, 12140, 12, 2890, 16, 1053, 13, 365, 16186, 3394, 1435, 468, 10918, 2521, 2650, 358, 787, 7410, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 13332, 468, 11782, 316, 1665, 2650, 365, 18, 2740, 18, 3256, 18, 4861, 12140, 12, 2890, 16, 1053, 13, 365, 16186, 3394, 1435, 468, 10918, 2521, 2650, 358, 787, 7410, 365, 18, ...
if op.opname in ('coalloc', 'coalloc_varsize'): return True
else: return (op.opname in LL_OPERATIONS and LL_OPERATIONS[op.opname].canunwindgc)
def operation_is_true(self, op): if op.opname == 'gc__collect': return True if op.opname in ('malloc', 'malloc_varsize'): flags = op.args[1].value return flags['flavor'] == 'gc' and not flags.get('nocollect', False) if op.opname in ('coalloc', 'coalloc_varsize'): return True
8d55f1d9f0ee6e2edbe978c9386c4eeab998dfce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/8d55f1d9f0ee6e2edbe978c9386c4eeab998dfce/framework.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1674, 67, 291, 67, 3767, 12, 2890, 16, 1061, 4672, 309, 1061, 18, 556, 529, 422, 296, 13241, 972, 14676, 4278, 327, 1053, 309, 1061, 18, 556, 529, 316, 7707, 81, 9853, 2187, 296, 81, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1674, 67, 291, 67, 3767, 12, 2890, 16, 1061, 4672, 309, 1061, 18, 556, 529, 422, 296, 13241, 972, 14676, 4278, 327, 1053, 309, 1061, 18, 556, 529, 316, 7707, 81, 9853, 2187, 296, 81, ...
<th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
<th>&nbsp;&nbsp;&nbsp;<a
def callgraph_link(self, callgraph): if callgraph is None: return '' return ('<br /><span class="codelink"><a href="javascript: void(0);" ' 'onclick="toggleCallGraph(\'%s-div\');return false;">' 'call&nbsp;graph</a></span>&nbsp;' % callgraph.uid)
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, 745, 4660, 67, 1232, 12, 2890, 16, 745, 4660, 4672, 309, 745, 4660, 353, 599, 30, 327, 875, 327, 7707, 32, 2848, 342, 4438, 3969, 667, 1546, 71, 1009, 754, 14050, 69, 3897, 1546, 11242...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 4660, 67, 1232, 12, 2890, 16, 745, 4660, 4672, 309, 745, 4660, 353, 599, 30, 327, 875, 327, 7707, 32, 2848, 342, 4438, 3969, 667, 1546, 71, 1009, 754, 14050, 69, 3897, 1546, 11242...
class QuoteID(quickfix.StringField): def __init__(self, data = None): if data == None: quickfix.StringField.__init__(self, 117) else: quickfix.StringField.__init__(self, 117, data) class NetMoney(quickfix.DoubleField): def __init__(self, data = None): if data == None: quickfix.DoubleField.__init__(self, 118) else: quickfix.DoubleField.__init__(self, 118, data) class SettlCurrAmt(quickfix.DoubleField): def __init__(self, data = None): if data == None: quickfix.DoubleField.__init__(self, 119) else: quickfix.DoubleField.__init__(self, 119, data) class SettlCurrency(quickfix.StringField): def __init__(self, data = None): if data == None: quickfix.StringField.__init__(self, 120) else: quickfix.StringField.__init__(self, 120, data) class ForexReq(quickfix.BoolField): def __init__(self, data = None): if data == None: quickfix.BoolField.__init__(self, 121) else: quickfix.BoolField.__init__(self, 121, data)
def __init__(self, data = None): if data == None: quickfix.StringField.__init__(self, 116) else: quickfix.StringField.__init__(self, 116, data)
b195a30ce1679e0269bc776f2f6e3591488def1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/b195a30ce1679e0269bc776f2f6e3591488def1f/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 18973, 13, 469, 30, 9549, 904, 18, 780, 974, 1618...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 18973, 13, 469, 30, 9549, 904, 18, 780, 974, 1618...
fd = '='.join([str(dpart) for dpart in d])
fd = '='.join([str(dpart).replace('"', '\\"') for dpart in d])
def _GenerateProject(vcproj_filename, build_file, spec): """Generates a vcproj file. Arguments: vcproj_filename: Filename of the vcproj file to generate. build_file: Filename of the .gyp file that the vcproj file comes from. spec: The target dictionary containing the properties of the target. """ print 'Generating %s' % vcproj_filename p = MSVSProject.Writer(vcproj_filename) p.Create(spec['target_name']) # Get directory project file is in. gyp_dir = os.path.split(vcproj_filename)[0] # Pick target configuration type. config_type = { 'executable': '1', 'shared_library': '2', 'static_library': '4', 'none': '10', }[spec['type']] for config_name, c in spec['configurations'].iteritems(): # Process each configuration. vsprops_dirs = c.get('msvs_props', []) vsprops_dirs = [_FixPath(i) for i in vsprops_dirs] # Prepare the list of tools as a dictionary. tools = dict() # Add in msvs_settings. for tool in c.get('msvs_settings', {}): options = c['msvs_settings'][tool] for option in options: _ToolAppend(tools, tool, option, options[option]) # Add in includes. include_dirs = c.get('include_dirs', []) include_dirs = [_FixPath(i) for i in include_dirs] _ToolAppend(tools, 'VCCLCompilerTool', 'AdditionalIncludeDirectories', include_dirs) # Add in libraries (really system libraries at this point). libraries = spec.get('libraries', []) _ToolAppend(tools, 'VCLibrarianTool', 'AdditionalDependencies', libraries) # Add defines. defines = [] for d in c.get('defines', []): if type(d)==list: fd = '='.join([str(dpart) for dpart in d]) else: fd = str(d) defines.append(fd) _ToolAppend(tools, 'VCCLCompilerTool', 'PreprocessorDefinitions', defines) _ToolAppend(tools, 'VCResourceCompilerTool', 'PreprocessorDefinitions', defines) # Add disabled warnings. disabled_warnings = [str(i) for i in c.get('msvs_disabled_warnings', [])] _ToolAppend(tools, 'VCCLCompilerTool', 'DisableSpecificWarnings', disabled_warnings) # Add Pre-build. prebuild = c.get('msvs_prebuild') _ToolAppend(tools, 'VCPreBuildEventTool', 'CommandLine', prebuild) # Add Post-build. postbuild = c.get('msvs_postbuild') _ToolAppend(tools, 'VCPostBuildEventTool', 'CommandLine', postbuild) # Turn on precompiled headers if appropriate. header = c.get('msvs_precompiled_header') if header: header = os.path.split(header)[1] _ToolAppend(tools, 'VCCLCompilerTool', 'UsePrecompiledHeader', '2') _ToolAppend(tools, 'VCCLCompilerTool', 'PrecompiledHeaderThrough', header) _ToolAppend(tools, 'VCCLCompilerTool', 'ForcedIncludeFiles', header) # Convert tools to expected form. tool_list = [] for tool, options in tools.iteritems(): # Collapse options with lists. options_fixed = {} for option, value in options.iteritems(): if type(value) == list: options_fixed[option] = ';'.join(value) else: options_fixed[option] = value # Add in this tool. tool_list.append(MSVSProject.Tool(tool, options_fixed)) # Prepare configuration attributes. prepared_attrs = {} source_attrs = c.get('msvs_configuration_attributes', {}) for a in source_attrs: prepared_attrs[a] = source_attrs[a] # Add props files. prepared_attrs['InheritedPropertySheets'] = ';'.join(vsprops_dirs) # Set configuration type. prepared_attrs['ConfigurationType'] = config_type # Set intermediate directory. gyp_name = os.path.split(build_file)[1][:-4] prepared_attrs['IntermediateDirectory'] = ( '$(OutDir)\\obj\\%s\\intermediate' % gyp_name) # Add in this configuration. p.AddConfig('|'.join([config_name, c.get('configuration_platform', 'Win32')]), attrs=prepared_attrs, tools=tool_list) # Prepare list of sources. sources = spec.get('sources', []) # Add in the gyp file. sources.append(os.path.split(build_file)[1]) # Add in 'action' inputs. actions = spec.get('actions', []) for a in actions: for i in a.get('inputs', []): if i not in sources: sources.append(i) # Convert to proper windows form. sources = [_FixPath(i) for i in sources] # Exclude excluded ones. excluded_sources = spec.get('sources_excluded', []) # Convert to proper windows form. excluded_sources = [_FixPath(i) for i in excluded_sources] # Add excluded into sources sources += excluded_sources # List of precompiled header related keys. precomp_keys = [ 'msvs_precompiled_header', 'msvs_precompiled_source', ] # Gather a list of precompiled header related sources. precompiled_related = [] for config_name, c in spec['configurations'].iteritems(): for k in precomp_keys: f = c.get(k) if f: precompiled_related.append(_FixPath(f)) # Find the excluded ones, minus the precompiled header related ones. fully_excluded = [i for i in excluded_sources if i not in precompiled_related] # Convert to folders and the right slashes. sources = [i.split('\\') for i in sources] sources = _SourceInFolders(sources, excluded=fully_excluded) # Add in files. p.AddFiles(sources) # Exclude excluded sources from being built. for f in excluded_sources: for config_name, c in spec['configurations'].iteritems(): precomped = [_FixPath(c.get(i, '')) for i in precomp_keys] # Don't do this for ones that are precompiled header related. if f not in precomped: p.AddFileConfig(f, config_name, {'ExcludedFromBuild': 'true'}) # Add in tool files (rules). tool_files = set() for config_name, c in spec['configurations'].iteritems(): for f in c.get('msvs_tool_files', []): tool_files.add(f) for f in tool_files: p.AddToolFile(f) # Handle pre-compiled headers source stubs specially. for config_name, c in spec['configurations'].iteritems(): source = c.get('msvs_precompiled_source') if source: source = _FixPath(source) # UsePrecompiledHeader=1 for if using precompiled headers. tool = MSVSProject.Tool('VCCLCompilerTool', {'UsePrecompiledHeader': '1'}) p.AddFileConfig(source, config_name, {}, tools=[tool]) # Add actions. actions = spec.get('actions', []) for a in actions: for config_name, c in spec['configurations'].iteritems(): inputs = [_FixPath(i) for i in a.get('inputs', [])] outputs = [_FixPath(i) for i in a.get('outputs', [])] cygwin_dir = _FixPath(c.get('msvs_cygwin_dirs', ['.'])[0]) direct_cmd = a['action'] direct_cmd = direct_cmd.replace('$(IntDir)', '`cygpath -m "${INTDIR}"`') direct_cmd = direct_cmd.replace('"', '\\"') cmd = (
045c156aeb4f69e5d2b63efef816c3b3aa0f3e82 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/045c156aeb4f69e5d2b63efef816c3b3aa0f3e82/msvs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4625, 4109, 12, 4227, 17995, 67, 3459, 16, 1361, 67, 768, 16, 857, 4672, 3536, 6653, 279, 12802, 17995, 585, 18, 225, 13599, 30, 12802, 17995, 67, 3459, 30, 16671, 434, 326, 12802, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4625, 4109, 12, 4227, 17995, 67, 3459, 16, 1361, 67, 768, 16, 857, 4672, 3536, 6653, 279, 12802, 17995, 585, 18, 225, 13599, 30, 12802, 17995, 67, 3459, 30, 16671, 434, 326, 12802, ...
self['filterlist'] = [[], [], [], [], [], [], [], [], [], []]
self['filterlist'] = {}
def reset (self): """Reset to default values""" # The bind address specifies on which address the socket should # listen. # The default empty string represents INADDR_ANY which means to # accept incoming connections from all hosts. self['bindaddress'] = '' self['port'] = 8080 self['sslport'] = 8443 self['sslgateway'] = 0 self['adminuser'] = "" self['adminpass'] = "" self['proxyuser'] = "" self['proxypass'] = "" self['parentproxy'] = "" self['parentproxyport'] = 3128 self['parentproxyuser'] = "" self['parentproxypass'] = "" # dynamically stored parent proxy authorization credentials self['parentproxycreds'] = None self['folderrules'] = [] self['filters'] = [] self['filterlist'] = [[], [], [], [], [], [], [], [], [], []] self['colorize'] = 0 # DNS resolved nofilterhosts self['nofilterhosts'] = None self['allowedhosts'] = None self['starttime'] = time.time() self['mime_content_rewriting'] = sets.Set() self['gui_theme'] = "classic" self['timeout'] = 10 self['auth_ntlm'] = 0 if os.name == 'posix': self['clamavconf'] = "/etc/clamav/clamav.conf" elif os.name == 'nt': self['clamavconf'] = r"c:\clamav-devel\etc\clamav.conf" else: self['clamavconf'] = os.path.join(os.getcwd(), "clamav.conf") # in development mode some values have different defaults self['development'] = os.environ.get("WC_DEVELOPMENT", 0) self['baseurl'] = wc.Url self['try_google'] = 0 # delete all registered sids from wc.filter.rules import delete_registered_sids delete_registered_sids()
9deb1488ee90f19b15df5c82eef5f7a3e538f5f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/9deb1488ee90f19b15df5c82eef5f7a3e538f5f3/configuration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 261, 2890, 4672, 3536, 7013, 358, 805, 924, 8395, 468, 1021, 1993, 1758, 11470, 603, 1492, 1758, 326, 2987, 1410, 468, 6514, 18, 468, 1021, 805, 1008, 533, 8686, 2120, 14142, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 261, 2890, 4672, 3536, 7013, 358, 805, 924, 8395, 468, 1021, 1993, 1758, 11470, 603, 1492, 1758, 326, 2987, 1410, 468, 6514, 18, 468, 1021, 805, 1008, 533, 8686, 2120, 14142, 67, 1...
print 'loading %s' % module_name
def find_class(module, class_name): modules = module.split('.') path = None for module_name in modules: print 'loading %s' % module_name fp, pathname, description = imp.find_module(module_name, path) module = imp.load_module(module_name, fp, pathname, description) if hasattr(module, '__path__'): path = module.__path__ return getattr(module, class_name)
dbd75ed69a403fda0ee09db565a1e1b5a1caa785 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1098/dbd75ed69a403fda0ee09db565a1e1b5a1caa785/start_service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1106, 12, 2978, 16, 667, 67, 529, 4672, 4381, 273, 1605, 18, 4939, 2668, 1093, 13, 589, 273, 599, 364, 1605, 67, 529, 316, 4381, 30, 4253, 16, 9806, 16, 2477, 273, 1646, 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, 1104, 67, 1106, 12, 2978, 16, 667, 67, 529, 4672, 4381, 273, 1605, 18, 4939, 2668, 1093, 13, 589, 273, 599, 364, 1605, 67, 529, 316, 4381, 30, 4253, 16, 9806, 16, 2477, 273, 1646, 18...
errno.ECONNABORTED, errno.EPIPE):
errno.ECONNABORTED, errno.EPIPE, errno.EBADF):
def handle_error(self): try: raise except (KeyboardInterrupt, SystemExit, asyncore.ExitNow): raise except socket.error, err: # fix around asyncore bug (http://bugs.python.org/issue1736101) if err[0] in (errno.ECONNRESET, errno.ENOTCONN, errno.ESHUTDOWN, \ errno.ECONNABORTED, errno.EPIPE): self.handle_close() return else: logerror(traceback.format_exc()) except: logerror(traceback.format_exc()) self.close()
49509d2b691fc8623dee698cdc7f9b4e1a130746 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7236/49509d2b691fc8623dee698cdc7f9b4e1a130746/ftpserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 775, 30, 1002, 1335, 261, 17872, 14126, 16, 25454, 16, 4326, 479, 18, 6767, 8674, 4672, 1002, 1335, 2987, 18, 1636, 16, 393, 30, 468, 2917, 6740, 4326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 775, 30, 1002, 1335, 261, 17872, 14126, 16, 25454, 16, 4326, 479, 18, 6767, 8674, 4672, 1002, 1335, 2987, 18, 1636, 16, 393, 30, 468, 2917, 6740, 4326, ...
+ plugins_files('paroli-services', 'paroli/services') \ + plugins_files('paroli-applications', 'paroli/applications') \
+ plugins_files('paroli-services', 'share/paroli/services') \ + plugins_files('paroli-applications', 'share/paroli/applications') \
def plugins_files(source, dest): """generate the plugins data files list It works by adding all the files ending with a set of specified extension to the data. So we have to be careful when adding files with new extension we have to add it here as well. """ ret = [] for root, dirs, files in os.walk(source): # XXX: Where is the best place to put the plugins files ??? # XXX: this [len(source)+1:] is messy, # clean that. f_dest = os.path.join(dest, root[len(source)+1:]) src = [] for file in files: if file.endswith((".py", ".ttf", ".png", ".dic", ".txt", ".edj", ".edc")): path = '%s/%s' % (root, file) src.append(path) ret.append((f_dest, src)) return ret
087d6190ee732f2cab136f379672afbbfbaaf9b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/087d6190ee732f2cab136f379672afbbfbaaf9b2/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4799, 67, 2354, 12, 3168, 16, 1570, 4672, 3536, 7163, 326, 4799, 501, 1390, 666, 225, 2597, 6330, 635, 6534, 777, 326, 1390, 11463, 598, 279, 444, 434, 1269, 2710, 358, 326, 501, 18, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4799, 67, 2354, 12, 3168, 16, 1570, 4672, 3536, 7163, 326, 4799, 501, 1390, 666, 225, 2597, 6330, 635, 6534, 777, 326, 1390, 11463, 598, 279, 444, 434, 1269, 2710, 358, 326, 501, 18, 6...
self.buffer.write( c )
if ord( c ) != 0x0D: self.buffer.write( c )
def run( self ): global terminate
812a5578bd28dabfa24167cfa10c3509f66a2380 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10890/812a5578bd28dabfa24167cfa10c3509f66a2380/slimv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 365, 262, 30, 2552, 10850, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 365, 262, 30, 2552, 10850, 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...
'mk_%s' % res.geo_type))
'mk_%s' % self.utToUtf8(res.geo_type)))
def xrjs_feed(self, key, show, query, path, REQUEST): """ """ r, i = [], '' t = [] ra = r.append #if key == self.getSession(MSP_SESSION_KEY, None): portal_ob = self.getSite() if show: show = eval(show) results = portal_ob.getCatalogedObjectsCheckView(meta_type='Naaya GeoPoint', geo_type=show, path=path) for res in results: if res.latitude != 0.0 and res.longitude != 0.0: ra('%s|%s|mk_%s|%s|%s' % (res.latitude, res.longitude, res.id, self.utToUtf8(res.title_or_id()), 'mk_%s' % res.geo_type)) t.append(res.marker_html()) i = ''.join(t) #self.delSession(MSP_SESSION_KEY) REQUEST.RESPONSE.setHeader('Content-type', 'text/html;charset=utf-8') print r return '%s\n\n%s' % ('\n'.join(r), i)
5f70c2f1a54656709c6a004af293ac3893b8bc33 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/5f70c2f1a54656709c6a004af293ac3893b8bc33/GeoMapTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20912, 2924, 67, 7848, 12, 2890, 16, 498, 16, 2405, 16, 843, 16, 589, 16, 12492, 4672, 3536, 3536, 436, 16, 277, 273, 5378, 16, 875, 268, 273, 5378, 767, 273, 436, 18, 6923, 468, 430...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20912, 2924, 67, 7848, 12, 2890, 16, 498, 16, 2405, 16, 843, 16, 589, 16, 12492, 4672, 3536, 3536, 436, 16, 277, 273, 5378, 16, 875, 268, 273, 5378, 767, 273, 436, 18, 6923, 468, 430...
if (target != "batbuild" and target != "buildErrorLog"):
if (target != "batbuild" and not('Log' in target)):
def buildAll(self, buildConf): buildLogFile = open(buildConf['buildErrorLog'], 'w') buildLogFile.write('') buildLogFile.close() buildLogFile = open(buildConf['buildErrorLog'], 'a') for target in buildConf: cmd = self.testConf['qxPathAbs'] + buildConf['batbuild'] cmd += " -w " + self.testConf['qxPathAbs'] if (target != "batbuild" and target != "buildErrorLog"): self.log("Building " + target) cmd += " " + buildConf[target]
9c458ec8307d6f497f1ed381dfe6fee33d1fd7d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/9c458ec8307d6f497f1ed381dfe6fee33d1fd7d2/qxtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 12, 2890, 16, 1361, 3976, 4672, 1361, 19103, 273, 1696, 12, 3510, 3976, 3292, 3510, 668, 1343, 17337, 296, 91, 6134, 1361, 19103, 18, 2626, 2668, 6134, 1361, 19103, 18, 4412, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 12, 2890, 16, 1361, 3976, 4672, 1361, 19103, 273, 1696, 12, 3510, 3976, 3292, 3510, 668, 1343, 17337, 296, 91, 6134, 1361, 19103, 18, 2626, 2668, 6134, 1361, 19103, 18, 4412, ...
(a, b, c) = ht.divide_tags_into_subsets(1)
(a, b, _, _, c) = ht.divide_tags_into_subsets(1)
def test_3_merge_023(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa')
2c4f9e27acd168e5f22d83058231ab8e29888cdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/2c4f9e27acd168e5f22d83058231ab8e29888cdc/test_subset_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 23, 67, 2702, 67, 3103, 23, 12, 2890, 4672, 14049, 273, 417, 76, 6592, 18, 2704, 67, 2816, 6789, 12, 3462, 16, 1059, 636, 3461, 15, 21, 13, 1544, 273, 1140, 18, 803, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 23, 67, 2702, 67, 3103, 23, 12, 2890, 4672, 14049, 273, 417, 76, 6592, 18, 2704, 67, 2816, 6789, 12, 3462, 16, 1059, 636, 3461, 15, 21, 13, 1544, 273, 1140, 18, 803, 18, ...
def read(filename, index=-1):
def read(filename, index=-1, format=None): """Read Atoms object(s) from file. Parameters ========== filename: str Name of the file to read from. index: int or slice If the file contains several configurations, the last configuration will be returned by default. Use index=n to get configuration number n (counting from zero). format: str Used to specify the file-format. If not given, the file-format will be guessed by the `filetype` function. """
def read(filename, index=-1): p = filename.rfind('@') if p != -1: try: index = string2index(filename[p + 1:]) except ValueError: pass else: filename = filename[:p] type = filetype(filename) if type.startswith('gpw'): from gpaw import Calculator atoms = Calculator(filename, txt=None).get_atoms() atoms.set_calculator(None) return atoms if type == 'xyz': from ase.io.xyz import read_xyz return read_xyz(filename, index) if type == 'traj': from ase.io.trajectory import read_trajectory return read_trajectory(filename, index) if type == 'cube': from ase.io.cube import read_cube return read_cube(filename, index) if type == 'nc': from ase.io.netcdf import read_netcdf return read_netcdf(filename, index) if type == 'gpaw-text': from ase.io.gpawtext import read_gpaw_text return read_gpaw_text(filename, index) if type == 'dacapo-text': from ase.io.dacapo import read_dacapo_text return read_dacapo_text(filename) if type == 'dacapo': from ase.io.dacapo import read_dacapo return read_dacapo(filename) raise RuntimeError('That can *not* happen!')
4812740e71165fed2e5653702a0bff58f855d15c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/4812740e71165fed2e5653702a0bff58f855d15c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 3459, 16, 770, 29711, 21, 16, 740, 33, 7036, 4672, 3536, 1994, 7149, 87, 733, 12, 87, 13, 628, 585, 18, 225, 7012, 422, 1432, 1544, 30, 609, 1770, 434, 326, 585, 358, 855, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 3459, 16, 770, 29711, 21, 16, 740, 33, 7036, 4672, 3536, 1994, 7149, 87, 733, 12, 87, 13, 628, 585, 18, 225, 7012, 422, 1432, 1544, 30, 609, 1770, 434, 326, 585, 358, 855, ...
self.Lock() self.InitVars(name, admin, crypted_password) self._ready = 1 self.InitTemplates() self.Save() self.CreateFiles() def CreateFiles(self):
self.__lock.lock() self.InitVars(name, admin, crypted_password) self._ready = 1 self.InitTemplates() self.Save()
def Create(self, name, admin, crypted_password):
b1b4e2e7fde9a83f0a41264155526bcf08bad4a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/b1b4e2e7fde9a83f0a41264155526bcf08bad4a2/MailList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 12, 2890, 16, 508, 16, 3981, 16, 276, 4567, 67, 3664, 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, ...
[ 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, 1788, 12, 2890, 16, 508, 16, 3981, 16, 276, 4567, 67, 3664, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
print "( X Rods: 4 * %6.2fmm)" % (x) print "( Y Rods: 4 * %6.2fmm)" % (y) print "( Z Rods: 4 * %6.2fmm)" % (z) print "(XZ Rods: 4 * %6.2fmm)" % (bot.getXZ()) print "(YZ Rods: 4 * %6.2fmm)" % (bot.getYZ()) print "(XY Rods: 2 * %6.2fmm)" % (bot.getXY()) print "(Total Volume: %6.2fm^3)" % (bot.getVolume())
print "( X Rods: 4 * %06.2fmm)" % (x) print "( Y Rods: 4 * %06.2fmm)" % (y) print "( Z Rods: 4 * %06.2fmm)" % (z) print "(XZ Rods: 4 * %06.2fmm)" % (bot.getXZ()) print "(YZ Rods: 4 * %06.2fmm)" % (bot.getYZ()) print "(XY Rods: 2 * %06.2fmm)" % (bot.getXY()) print "(Total Volume: %06.2fm^3)" % (bot.getVolume())
def main(argv): global x, y, z, feedrate, nutHeight, washerHeight, rodSize, blockSize, useThreadLocker, useNutStarter, useWashers try: opts, args = getopt.getopt(argv, "h", ["help", "x=", "y=", "z=", "feedrate=", "nut-height=", "washer-height=", "rod-size=", "block-size=", "use-thread-locker", "use-nut-starter", "no-washers"]) except getopt.GetoptError: usage() sys.exit(2) for opt, arg in opts: if opt in ("-h", "--help"): usage() sys.exit() elif opt == "--x": x = float(arg) elif opt == "--y": y = float(arg) elif opt == "--z": z = float(arg) elif opt == "--feedrate": feedrate = float(arg) elif opt == "--nut-height": nutHeight = float(arg) elif opt == "--washer-height": washerHeight = float(arg) elif opt == "--block-size": blockSize = float(arg) elif opt == "--rod-size": rodSize = float(arg) elif opt == "--use-thread-locker": useThreadLocker = True elif opt == "--use-nut-starter": useNutStarter = True elif opt == "--no-washers": useWashers = False else: print "(Huh? %s:%s)" % (opt,arg) bot = CartesianFrame(x, y, z) xRods = 4 yRods = 4 zRods = 4 xyRods = 2 xzRods = 4 yzRods = 4 totalRods = xRods + yRods + zRods + xyRods + xzRods + yzRods nutsPerKebab = 4 totalNuts = totalRods * nutsPerKebab if useWashers: washersPerKebab = 4 totalWashers = totalRods * washersPerKebab else: washersPerKebab = 0 totalWashers = 0 print "(Generated by make_bot.py)" print "(Required Rod Lengths:)" print "( X Rods: 4 * %6.2fmm)" % (x) print "( Y Rods: 4 * %6.2fmm)" % (y) print "( Z Rods: 4 * %6.2fmm)" % (z) print "(XZ Rods: 4 * %6.2fmm)" % (bot.getXZ()) print "(YZ Rods: 4 * %6.2fmm)" % (bot.getYZ()) print "(XY Rods: 2 * %6.2fmm)" % (bot.getXY()) print "(Total Volume: %6.2fm^3)" % (bot.getVolume()) print "(Total kebabs: %d)" % (totalRods) print "(Total nuts required: %d)" % (totalNuts) print "(Total washers required: %d)" % (totalWashers) #TODO: print the total number of whole rods required. print "(GCODE STARTS BELOW)" print "G90 (Absolute Mode)" print "G21 (Metric Units)" print "M00 (Starting X kebabs)" for i in range(0, xRods): build_frame_kebab(x) print "M00 (Starting Y kebabs)" for i in range(0, yRods): build_frame_kebab(y) print "M00 (Starting Z kebabs)" for i in range(0, zRods): build_frame_kebab(z) print "M00 (Starting XY kebabs)" for i in range(0, xyRods): build_diagonal_kebab(bot.getXY()) print "M00 (Starting XZ kebabs)" for i in range(0, xzRods): build_diagonal_kebab(bot.getXZ()) print "M00 (Starting YZ kebabs)" for i in range(0, yzRods): build_diagonal_kebab(bot.getYZ())
74fb04ff2e7d3c298179074e45420a96021f9c99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/479/74fb04ff2e7d3c298179074e45420a96021f9c99/make_bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 225, 2552, 619, 16, 677, 16, 998, 16, 4746, 5141, 16, 290, 322, 2686, 16, 341, 961, 264, 2686, 16, 721, 72, 1225, 16, 13766, 16, 999, 3830, 2531, 264, 16, 999,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 225, 2552, 619, 16, 677, 16, 998, 16, 4746, 5141, 16, 290, 322, 2686, 16, 341, 961, 264, 2686, 16, 721, 72, 1225, 16, 13766, 16, 999, 3830, 2531, 264, 16, 999,...
help='The journal whre the netries will be done.')
help='The journal whre the entries will be done.')
def close(self, cursor, user, ids, context=None): period_obj = self.pool.get('account.period') #First close the fiscalyear to be sure #it will not have new period created between. self.write(cursor, user, ids, { 'state': 'close', }, context=context) period_ids = period_obj.search(cursor, user, [ ('fiscalyear', 'in', ids), ], context=context) period_obj.close(cursor, user, period_ids, context=context)
dcc4b4629243febdb6f304caaac275175eeb21e7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/dcc4b4629243febdb6f304caaac275175eeb21e7/fiscalyear.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 3879, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 6908, 6134, 468, 3759, 1746, 326, 15324, 771, 6874, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 3879, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 6908, 6134, 468, 3759, 1746, 326, 15324, 771, 6874, ...
display_value -- boolean, whether to display the current value to the right of the slider EXAMPLES: We specify both vmin and vmax. We make the default 3, but since 3 isn't one of 3/17-th spaced values between 2 and 5, 52/17 is instead chosen as the default (it is closest). sage: slider(2, 5, 3/17, 3, 'alpha') Slider: alpha [2--|52/17|---5]
display_value -- boolean, whether to display the current value below the slider EXAMPLES: We specify both vmin and vmax. We make the default (3,4) but since neither is one of 3/17-th spaced values between 2 and 5, the closest values: 52/17 and 67/17, are instead chosen as the default. sage: range_slider(2, 5, 3/17, (3,4), 'alpha') Range Slider: alpha [2--|52/17==67/17|---5]
def __init__(self, vmin, vmax=None, step_size=1, default=None, label=None, display_value=True): r""" An interactive slider control, which can be used in conjunction with the interact command.
84810e20828637dc0c5b540b9d08853b9f0c31da /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/84810e20828637dc0c5b540b9d08853b9f0c31da/interact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 17501, 16, 17831, 33, 7036, 16, 2235, 67, 1467, 33, 21, 16, 805, 33, 7036, 16, 1433, 33, 7036, 16, 2562, 67, 1132, 33, 5510, 4672, 436, 8395, 1922, 126...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 17501, 16, 17831, 33, 7036, 16, 2235, 67, 1467, 33, 21, 16, 805, 33, 7036, 16, 1433, 33, 7036, 16, 2562, 67, 1132, 33, 5510, 4672, 436, 8395, 1922, 126...
print 'HTTP server started on port %d...' % port
print 'HTTP server started on port %d...' % server.server_port
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): print 'specified server cert file not found: ' + options.cert + \ ' exiting...' return for ca_cert in options.ssl_client_ca: if not os.path.isfile(ca_cert): print 'specified trusted client CA file not found: ' + ca_cert + \ ' exiting...' return server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth, options.ssl_client_ca) print 'HTTPS server started on port %d...' % port else: server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler) print 'HTTP server started on port %d...' % port server.data_dir = MakeDataDir() server.file_root_url = options.file_root_url server._sync_handler = None # means FTP Server else: my_data_dir = MakeDataDir() # Instantiate a dummy authorizer for managing 'virtual' users authorizer = pyftpdlib.ftpserver.DummyAuthorizer() # Define a new user having full r/w permissions and a read-only # anonymous user authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw') authorizer.add_anonymous(my_data_dir) # Instantiate FTP handler class ftp_handler = pyftpdlib.ftpserver.FTPHandler ftp_handler.authorizer = authorizer # Define a customized banner (string returned when client connects) ftp_handler.banner = ("pyftpdlib %s based ftpd ready." % pyftpdlib.ftpserver.__ver__) # Instantiate FTP server class and listen to 127.0.0.1:port address = ('127.0.0.1', port) server = pyftpdlib.ftpserver.FTPServer(address, ftp_handler) print 'FTP server started on port %d...' % port # Notify the parent that we've started. (BaseServer subclasses # bind their sockets on construction.) if options.startup_pipe is not None: if sys.platform == 'win32': fd = msvcrt.open_osfhandle(options.startup_pipe, 0) else: fd = options.startup_pipe startup_pipe = os.fdopen(fd, "w") startup_pipe.write("READY") startup_pipe.close() try: server.serve_forever() except KeyboardInterrupt: print 'shutting down server' server.stop = True
b1364e081e9a5c511778fec70e77a599995bfb01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1364e081e9a5c511778fec70e77a599995bfb01/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
self.env["SCCOMFLAGS"] += ['-I%s' % path]
self.env["_SCCOMFLAGS"] += ['-I%s' % path]
def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work', 'work'] self.env["VLOGFLAGS"] += ['-work', 'work'] self.env["SCCOMFLAGS"] += ['-work', 'work'] self.env["SCGENMODFLAGS"] += ['-lib', 'work'] self.env["VSIMFLAGS"] += ['-c', '-lib', 'work'] self.env["SCLINKFLAGS"] += ['-work', 'work'] # Collect sccom flags from defines includes and uselib if hasattr(self, "defines"): for define in Utils.to_list(self.defines): self.env["SCCOMFLAGS"] += ['-D%s' % define] self.env["VLINKFLAGS"] += ['-D%s' % define] if hasattr(self, "includes"): for inc in Utils.to_list(self.includes): i = self.path.find_dir(inc) if i: self.env["SCCOMFLAGS"] += ['-I%s' % i.abspath()] if hasattr(self, "uselib"): for lib in Utils.to_list(self.uselib): for path in self.env["INCLUDES_%s" % lib]: self.env["SCCOMFLAGS"] += ['-I%s' % path] for path in self.env["LIBPATH_%s" % lib]: self.env["VLINKFLAGS"] += ['-L%s' % path] for lib in self.env["LIB_%s" % lib]: self.env["VLINKFLAGS"] += ['-l%s' % lib] #if hasattr(self, "use"): # for lib in Utils.to_list(self.use): # print lib # print dir(self.bld) #for path in self.env["INCLUDES_%s" % lib]: # self.env["SCCOMFLAGS"] += ['-I%s' % path] #for path in self.env["LIBPATH_%s" % lib]: # self.env["VLINKFLAGS"] += ['-L%s' % path] #for lib in self.env["LIB_%s" % lib]: # self.env["VLINKFLAGS"] += ['-l%s' % lib] # Create vlib task on target workdir = self.path.find_or_declare(self.target) vlib = self.create_task('vlib', tgt=[workdir]) vlib.target = self.target self.mdeps = [] if hasattr(self, "after"): lst = [n for n in self.bld.all_task_gen if "modelsim" in n.features and n.target == self.after] for l in lst: for t in l.tasks: if len(t.outputs) > 0: self.mdeps += t.outputs # If given generate scgenmod tasks to get systemc header if hasattr(self, "generate"): for p in Utils.to_list(self.generate): ls = p.split(':') if len(ls)!=2: print "a generator pair has to be like '<object>:<header.h>'" import sys sys.exit(1) tgt = self.path.find_or_declare(ls[1]) env = self.env.derive() env.append_value("src", ls[0]) mod = self.create_task('scgenmod', tgt=tgt) mod.env = env self.env["SCCOMFLAGS"] += ['-I%s' % tgt.parent.bldpath()] mod.dep_nodes += self.mdeps # Create modelsim ini task if needed tgt = None if hasattr(self, "config"): tgt = self.path.find_or_declare("modelsim_%s.ini" % self.target) tsk = self.create_task('vini', tgt=tgt) tsk.root = self.bld.out_dir tsk.path = self.path.get_bld().abspath() tsk.target = self.target tsk.config = self.path.find_resource(self.config) or self.config tsk.set_run_after(vlib) ini = tgt.get_bld().abspath() self.env["VSIMFLAGS"] += ['-modelsimini', ini] self.env["VCOMFLAGS"] += ['-modelsimini', ini] self.env["VLOGFLAGS"] += ['-modelsimini', ini] self.env["SCCOMFLAGS"] += ['-modelsimini', ini] self.env["SCGENMODFLAGS"] += ['-modelsimini', ini] self.env["SCLINKFLAGS"] += ['-modelsimini', ini] # Create dobefore task if needed if hasattr(self, "dobefore"): do = self.path.find_resource(self.dobefore) if do: do = do.abspath() else: do = self.dobefore self.env["VSIMBEFORE"] += ['-do', do] before = self.create_task('vsim_before') before.dep_nodes += self.mdeps if tgt: before.dep_nodes += [tgt] before.dotask = self.dobefore before.target = self.target # Create doafter task if needed if hasattr(self, "doafter"): do = self.path.find_resource(self.doafter) if do: do = do.abspath() else: do = self.doafter self.env["VSIMAFTER"] += ['-do', do] after = self.create_task('vsim_after') after.dep_nodes += self.mdeps if tgt: after.dep_nodes += [tgt] after.dotask = self.doafter after.target = self.target
7c31064d730fec5e3b83aa4842fea01bd5df60db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/209/7c31064d730fec5e3b83aa4842fea01bd5df60db/modelsim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3679, 381, 12, 2890, 4672, 3536, 7001, 23536, 364, 326, 5916, 752, 331, 2941, 1562, 471, 331, 8767, 1562, 487, 5492, 487, 741, 5771, 471, 741, 5205, 4592, 309, 3577, 3536, 1550, 273, 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, 3679, 381, 12, 2890, 4672, 3536, 7001, 23536, 364, 326, 5916, 752, 331, 2941, 1562, 471, 331, 8767, 1562, 487, 5492, 487, 741, 5771, 471, 741, 5205, 4592, 309, 3577, 3536, 1550, 273, 365...
pass
context = self._getContext() context['textinput']['link'] = value
def _end_url(self): value = self.pop('url') if self.inauthor: self._save_author('url', value) elif self.incontributor: self._save_contributor('url', value) elif self.inimage: # TODO pass elif self.intextinput: # TODO (map to link) pass
972cadc09ab0b2fdf411f1a0962eada0cba30b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/972cadc09ab0b2fdf411f1a0962eada0cba30b10/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 409, 67, 718, 12, 2890, 4672, 460, 273, 365, 18, 5120, 2668, 718, 6134, 309, 365, 18, 267, 4161, 30, 365, 6315, 5688, 67, 4161, 2668, 718, 2187, 460, 13, 1327, 365, 18, 267, 591...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 409, 67, 718, 12, 2890, 4672, 460, 273, 365, 18, 5120, 2668, 718, 6134, 309, 365, 18, 267, 4161, 30, 365, 6315, 5688, 67, 4161, 2668, 718, 2187, 460, 13, 1327, 365, 18, 267, 591...
return self.__getitem__(key, default)
try: v = self.__getitem__(key) except KeyError, ke: return default return v
def get(self, key, default=None): """ This turns around and calls __getitem__(key, default).
0a9c43a9f1cd83052a21299d004e9103f1d25faf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11836/0a9c43a9f1cd83052a21299d004e9103f1d25faf/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 498, 16, 805, 33, 7036, 4672, 3536, 1220, 20748, 6740, 471, 4097, 1001, 31571, 972, 12, 856, 16, 805, 2934, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 498, 16, 805, 33, 7036, 4672, 3536, 1220, 20748, 6740, 471, 4097, 1001, 31571, 972, 12, 856, 16, 805, 2934, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
from zope.schema.interfaces import IPassword, ITextLine, IText, IBytes, IBool, ISet from zope.schema.interfaces import IDate, IInt, IChoice, IIterableVocabulary
from zope.schema.interfaces import \ IPassword, ITextLine, IText, IBytes, IBool, ISet, IList, IDate, \ IInt, IChoice, IIterableVocabulary, IVocabularyTokenized, \ ICollection from zope.app.form.browser import \ PasswordWidget, TextWidget, BytesWidget, CheckBoxWidget, \ DateWidget, IntWidget, ChoiceInputWidget, DropdownWidget, \ TextAreaWidget, ChoiceCollectionInputWidget, \ CollectionInputWidget, MultiSelectWidget, OrderedMultiSelectWidget
def setUp(test): """Set up the test fixture for doctests in this module. Performs what is called a "placeless setup" in the Zope 3 world, then sets up annotations, relationships, and registers widgets as views for some schema fields. """ from zope.app.form.browser import PasswordWidget, TextWidget, BytesWidget from zope.app.form.browser import CheckBoxWidget, DateWidget, IntWidget from zope.app.form.browser import ChoiceInputWidget, DropdownWidget, TextAreaWidget from zope.app.form.browser import ChoiceCollectionInputWidget, CollectionInputWidget from zope.app.form.browser import MultiSelectWidget from zope.app.form.interfaces import IInputWidget from zope.publisher.interfaces.browser import IBrowserRequest from zope.schema.interfaces import IPassword, ITextLine, IText, IBytes, IBool, ISet from zope.schema.interfaces import IDate, IInt, IChoice, IIterableVocabulary setup.placefulSetUp() setup.setUpAnnotations() setup.setUpTraversal() # relationships from schoolbell.relationship.tests import setUpRelationships setUpRelationships() # widgets ztapi.browserViewProviding(IPassword, PasswordWidget, IInputWidget) ztapi.browserViewProviding(ITextLine, TextWidget, IInputWidget) ztapi.browserViewProviding(IText, TextAreaWidget, IInputWidget) ztapi.browserViewProviding(IBytes, BytesWidget, IInputWidget) ztapi.browserViewProviding(IBool, CheckBoxWidget, IInputWidget) ztapi.browserViewProviding(IDate, DateWidget, IInputWidget) ztapi.browserViewProviding(IInt, IntWidget, IInputWidget) ztapi.browserViewProviding(IChoice, ChoiceInputWidget, IInputWidget) ztapi.browserViewProviding(ISet, CollectionInputWidget, IInputWidget) ztapi.provideMultiView((IChoice, IIterableVocabulary), IBrowserRequest, IInputWidget, '', DropdownWidget) ztapi.provideMultiView((ISet, IChoice), IBrowserRequest, IInputWidget, '', ChoiceCollectionInputWidget) ztapi.provideMultiView((ISet, IIterableVocabulary), IBrowserRequest, IInputWidget, '', MultiSelectWidget) # errors in forms from zope.app.form.interfaces import IWidgetInputError from zope.app.form.browser.interfaces import IWidgetInputErrorView from zope.app.form.browser.exception import WidgetInputErrorView ztapi.browserViewProviding(IWidgetInputError, WidgetInputErrorView, IWidgetInputErrorView) # Now, the question is: does the speed of the tests run with the # setup below justify this complex setup that duplicates the ZCML? # For now, I say yes. # ++view++ from zope.app.traversing.interfaces import ITraversable from zope.app.traversing.namespace import view, resource ztapi.provideView(None, None, ITraversable, 'view', view) ztapi.provideView(None, None, ITraversable, 'resource', resource) # schoolbell: namespace in tal from zope.app.traversing.interfaces import IPathAdapter from schoolbell.app.browser import SchoolBellAPI ztapi.provideAdapter(None, IPathAdapter, SchoolBellAPI, 'schoolbell') # standard_macros and schoolbell_navigation from zope.app.pagetemplate.simpleviewclass import SimpleViewClass from schoolbell.app.browser import NavigationView from zope.app.basicskin.standardmacros import StandardMacros ztapi.browserView(None, 'standard_macros', StandardMacros) ztapi.browserView(None, 'view_macros', SimpleViewClass("../templates/view_macros.pt")) ztapi.browserView(None, 'schoolbell_navigation', SimpleViewClass("../templates/navigation.pt", bases=(NavigationView,))) class ResourceStub: def __init__(self, request): pass def __call__(self): return "a resource" ztapi.browserResource('layout.css', ResourceStub) ztapi.browserResource('style.css', ResourceStub) ztapi.browserResource('schoolbell.js', ResourceStub) ztapi.browserResource('logo.png', ResourceStub) from zope.app.publisher.browser.menu import MenuAccessView ztapi.browserView(None, 'view_get_menu', MenuAccessView) from zope.app.publisher.interfaces.browser import IMenuItemType class ZMIMenu(IMenuItemType): pass directlyProvides(ZMIMenu, IMenuItemType) ztapi.provideUtility(IMenuItemType, ZMIMenu, 'zmi_views') ztapi.provideUtility(IMenuItemType, ZMIMenu, 'schoolbell_actions')
a914e41fe2b77f21dc7f07bea543a934060d0ff1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/a914e41fe2b77f21dc7f07bea543a934060d0ff1/test_app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 3813, 4672, 3536, 694, 731, 326, 1842, 16678, 364, 31263, 25563, 316, 333, 1605, 18, 225, 27391, 4121, 353, 2566, 279, 315, 30538, 12617, 3875, 6, 316, 326, 2285, 1306, 890, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 3813, 4672, 3536, 694, 731, 326, 1842, 16678, 364, 31263, 25563, 316, 333, 1605, 18, 225, 27391, 4121, 353, 2566, 279, 315, 30538, 12617, 3875, 6, 316, 326, 2285, 1306, 890, 9...