rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
self._code.append('[%s %s] 0 d' % (array, phase)) | self._code.append('[%s] %s d' % (array, phase)) | def setDash(self, array=[], phase=0): """Two notations. pass two numbers, or an array and phase""" if type(array) == IntType or type(array) == FloatType: self._code.append('[%s %s] 0 d' % (array, phase)) elif type(array) == ListType or type(array) == TupleType: assert phase >= 0, "phase is a length in user space" textarray = join(map(str, array)) self._code.append('[%s] %s d' % (textarray, phase)) | c3f6a12387884414935a7418e79b30d0010e5e2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/c3f6a12387884414935a7418e79b30d0010e5e2b/canvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
21893,
12,
2890,
16,
526,
22850,
6487,
6855,
33,
20,
4672,
3536,
11710,
486,
1012,
18,
225,
1342,
2795,
5600,
16,
578,
392,
526,
471,
6855,
8395,
309,
618,
12,
1126,
13,
422,
3094... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
21893,
12,
2890,
16,
526,
22850,
6487,
6855,
33,
20,
4672,
3536,
11710,
486,
1012,
18,
225,
1342,
2795,
5600,
16,
578,
392,
526,
471,
6855,
8395,
309,
618,
12,
1126,
13,
422,
3094... |
self.input_codec) | self.output_charset) | def __init__(self, input_charset=DEFAULT_CHARSET): # RFC 2046, $4.1.2 says charsets are not case sensitive input_charset = input_charset.lower() # Set the input charset after filtering through the aliases self.input_charset = ALIASES.get(input_charset, input_charset) # We can try to guess which encoding and conversion to use by the # charset_map dictionary. Try that first, but let the user override # it. henc, benc, conv = CHARSETS.get(self.input_charset, (SHORTEST, BASE64, None)) # Set the attributes, allowing the arguments to override the default. self.header_encoding = henc self.body_encoding = benc self.output_charset = ALIASES.get(conv, conv) # Now set the codecs. If one isn't defined for input_charset, # guess and try a Unicode codec with the same name as input_codec. self.input_codec = CODEC_MAP.get(self.input_charset, self.input_charset) self.output_codec = CODEC_MAP.get(self.output_charset, self.input_codec) | 5be2313c682ad37629b32edc2563c76d7023bdce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5be2313c682ad37629b32edc2563c76d7023bdce/Charset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
810,
67,
9999,
33,
5280,
67,
26977,
4672,
468,
8372,
11492,
26,
16,
271,
24,
18,
21,
18,
22,
20185,
1149,
4424,
854,
486,
648,
16692,
810,
67,
9999,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
810,
67,
9999,
33,
5280,
67,
26977,
4672,
468,
8372,
11492,
26,
16,
271,
24,
18,
21,
18,
22,
20185,
1149,
4424,
854,
486,
648,
16692,
810,
67,
9999,
27... |
selected='unselected', | selected='selected', | def pkg_recipes(): result = [ dict( name="PythonFramework", long_name="Python Framework", source="/Library/Frameworks/Python.framework", readme="""\ This package installs Python.framework, that is the python interpreter and the standard library. This also includes Python wrappers for lots of Mac OS X API's. """, postflight="scripts/postflight.framework", selected='selected', ), dict( name="PythonApplications", long_name="GUI Applications", source="/Applications/Python %(VER)s", readme="""\ This package installs IDLE (an interactive Python IDE), Python Launcher and Build Applet (create application bundles from python scripts). It also installs a number of examples and demos. """, required=False, selected='selected', ), dict( name="PythonUnixTools", long_name="UNIX command-line tools", source="/usr/local/bin", readme="""\ This package installs the unix tools in /usr/local/bin for compatibility with older releases of Python. This package is not necessary to use Python. """, required=False, selected='unselected', ), dict( name="PythonDocumentation", long_name="Python Documentation", topdir="/Library/Frameworks/Python.framework/Versions/%(VER)s/Resources/English.lproj/Documentation", source="/pydocs", readme="""\ This package installs the python documentation at a location that is useable for pydoc and IDLE. If you have installed Xcode it will also install a link to the documentation in /Developer/Documentation/Python """, postflight="scripts/postflight.documentation", required=False, selected='selected', ), dict( name="PythonProfileChanges", long_name="Shell profile updater", readme="""\ This packages updates your shell profile to make sure that the Python tools are found by your shell in preference of the system provided Python tools. If you don't install this package you'll have to add "/Library/Frameworks/Python.framework/Versions/%(VER)s/bin" to your PATH by hand. """, postflight="scripts/postflight.patch-profile", topdir="/Library/Frameworks/Python.framework", source="/empty-dir", required=False, selected='selected', ), ] if DEPTARGET < '10.4': result.append( dict( name="PythonSystemFixes", long_name="Fix system Python", readme="""\ This package updates the system python installation on Mac OS X 10.3 to ensure that you can build new python extensions using that copy of python after installing this version. """, postflight="../Tools/fixapplepython23.py", topdir="/Library/Frameworks/Python.framework", source="/empty-dir", required=False, selected='selected', ) ) return result | 2f4f63a4532fc00861d5a78ff996f40953fc78da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/2f4f63a4532fc00861d5a78ff996f40953fc78da/build-installer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3475,
67,
266,
3449,
281,
13332,
563,
273,
306,
2065,
12,
508,
1546,
15774,
13701,
3113,
1525,
67,
529,
1546,
15774,
13472,
3113,
1084,
1546,
19,
9313,
19,
13701,
87,
19,
15774,
18,
1230... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3475,
67,
266,
3449,
281,
13332,
563,
273,
306,
2065,
12,
508,
1546,
15774,
13701,
3113,
1525,
67,
529,
1546,
15774,
13472,
3113,
1084,
1546,
19,
9313,
19,
13701,
87,
19,
15774,
18,
1230... |
self.toolsSimulatorAction.setIconSet(QIconSet(self.image76)) | self.toolsSimulatorAction.setIconSet(QIconSet(self.image74)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | e48e859515237593d94b403a9c0a7295e08c31f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/e48e859515237593d94b403a9c0a7295e08c31f2/MainWindowUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
2242,
273,
374,
4672,
2238,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
2242,
13,
365,
18,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
2242,
273,
374,
4672,
2238,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
2242,
13,
365,
18,
23... |
If neither ``P`` nor ``K`` are provided a random pair will be | If neither ``P`` nor ``K`` are provided, a random pair will be | def polynomial_system(self, P=None, K=None): """ Return a polynomial system for this small scale AES variant for a given plaintext-key pair. If neither ``P`` nor ``K`` are provided a random pair will be generated. INPUT: - ``P`` - vector, list, or tuple (default: ``None``) - ``K`` - vector, list, or tuple (default: ``None``) EXAMPLE:: sage: sr = mq.SR(1, 1, 1, 4, gf2=True, polybori=True) sage: P = sr.vector([0, 0, 1, 0]) sage: K = sr.vector([1, 0, 0, 1]) sage: F, s = sr.polynomial_system(P, K) This returns a polynomial system :: sage: F Polynomial System with 36 Polynomials in 20 Variables and a solution:: sage: s # random -- maybe we need a better doctest here? {k000: 1, k001: 0, k003: 1, k002: 0} This solution is not the only solution what we can learn from the Groebner basis of the system. :: sage: F.groebner_basis()[:4] [k003 + 1, k001, k000 + 1, s003 + k002] In particular we have two solutions :: sage: len(F.ideal().variety()) 2 """ plaintext = P key = K system = [] n = self._n | 019849b2438f7aac031134d883a8d8c124e94dfe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/019849b2438f7aac031134d883a8d8c124e94dfe/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16991,
67,
4299,
12,
2890,
16,
453,
33,
7036,
16,
1475,
33,
7036,
4672,
3536,
2000,
279,
16991,
2619,
364,
333,
5264,
3159,
15986,
5437,
364,
279,
864,
11917,
17,
856,
3082,
18,
225,
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,
16991,
67,
4299,
12,
2890,
16,
453,
33,
7036,
16,
1475,
33,
7036,
4672,
3536,
2000,
279,
16991,
2619,
364,
333,
5264,
3159,
15986,
5437,
364,
279,
864,
11917,
17,
856,
3082,
18,
225,
9... |
if self.download.mime_type: template = 'downloads/detail_%s.html' % self.download.mime_type.replace('/', '_') | if dl.mime_type: template = 'downloads/detail_%s.html' % dl.mime_type.replace('/', '_') | def render_GET(self, request): manager = self.get_manager(request) store = request.application.get_store() user = self.get_user(request) libs = store.find(models.Library, models.Library.user_id == user.id) if self.download.mime_type: template = 'downloads/detail_%s.html' % self.download.mime_type.replace('/', '_') else: template = 'downloads/detail.html' downloadClient = manager.get_download_client(self.download.id, True) context = {'title': self.download.description, 'download': self.download, 'libraries': organizer.get_media_libraries(libs), 'mediatypes': organizer.get_media_types(), 'client': downloadClient, 'statuscode': download.Status, 'statusdesc': download.Status.descriptions } try: request.templateFactory.get_template(template) return self.render_template(template, request, context) except Exception: return self.render_template('downloads/detail.html', request, context) | 1f17196414ff3410e30d56d2ddc830fd681d8901 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12636/1f17196414ff3410e30d56d2ddc830fd681d8901/downloads.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
3264,
12,
2890,
16,
590,
4672,
3301,
273,
365,
18,
588,
67,
4181,
12,
2293,
13,
1707,
273,
590,
18,
3685,
18,
588,
67,
2233,
1435,
729,
273,
365,
18,
588,
67,
1355,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
3264,
12,
2890,
16,
590,
4672,
3301,
273,
365,
18,
588,
67,
4181,
12,
2293,
13,
1707,
273,
590,
18,
3685,
18,
588,
67,
2233,
1435,
729,
273,
365,
18,
588,
67,
1355,
12,
2... |
query= 'update content set ReadStatus=0, FirstTimeReading = \'true\' where BookID is Null and ContentID not like \'file:///mnt/sd/%\'' | query= 'update content set ReadStatus=0, FirstTimeReading = \'true\' where BookID is Null and ReadStatus = 1 and ContentID not like \'file:///mnt/sd/%\'' | def update_device_database_collections(self, booklists, collections_attributes, oncard): | f4b885568343944d66950935df887f276eaa3b4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/f4b885568343944d66950935df887f276eaa3b4f/driver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
5964,
67,
6231,
67,
19246,
12,
2890,
16,
6978,
9772,
16,
6980,
67,
4350,
16,
603,
3327,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
5964,
67,
6231,
67,
19246,
12,
2890,
16,
6978,
9772,
16,
6980,
67,
4350,
16,
603,
3327,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.drawroundbox(tx0 + r.x, ty0 + r.y, r.width, r.height, r) | self.drawroundbox(tx0 + r.x, ty0 + r.y, r.width+1, r.height, r) | def update_content(self): """ update the listing area """ | 09462f12dbf62cecd63f833e18480c3c3c88d60e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/09462f12dbf62cecd63f833e18480c3c3c88d60e/tvlisting_area.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1745,
12,
2890,
4672,
3536,
1089,
326,
11591,
5091,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1089,
67,
1745,
12,
2890,
4672,
3536,
1089,
326,
11591,
5091,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if taxlabels_present and not self._check_taxlabels(id): raise NexusError,'Taxon '+id+' not found in taxlabels.' | def _matrix(self,options): if not self.ntax or not self.nchar: raise NexusError,'Dimensions must be specified before matrix!' taxlabels_present=(self.taxlabels!=[]) self.matrix={} taxcount=0 block_interleave=0 #eliminate empty lines and leading/trailing whitespace lines=[l.strip() for l in options.split('\n') if l.strip()<>''] lineiter=iter(lines) while 1: try: l=lineiter.next() except StopIteration: if taxcount<self.ntax: raise NexusError, 'Not enough taxa in matrix.' elif taxcount>self.ntax: raise NexusError, 'Too many taxa in matrix.' else: break # count the taxa and check for interleaved matrix taxcount+=1 ##print taxcount if taxcount>self.ntax: if not self.interleave: raise NexusError, 'Too many taxa in matrix - should matrix be interleaved?' else: taxcount=1 block_interleave=1 #get taxon name and sequence linechars=CharBuffer(l) id=quotestrip(linechars.next_word()) l=linechars.rest().strip() if taxlabels_present and not self._check_taxlabels(id): raise NexusError,'Taxon '+id+' not found in taxlabels.' chars='' if self.interleave: #interleaved matrix #print 'In interleave' if l: chars=''.join(l.split()) else: chars=''.join(lineiter.next().split()) else: #non-interleaved matrix chars=''.join(l.split()) while len(chars)<self.nchar: l=lineiter.next() chars+=''.join(l.split()) iupac_seq=Seq(_replace_parenthesized_ambigs(chars,self.rev_ambiguous_values),self.alphabet) #first taxon has the reference sequence if matchhar is used if taxcount==1: refseq=iupac_seq else: if self.matchchar: while 1: p=iupac_seq.tostring().find(self.matchchar) if p==-1: break iupac_seq=Seq(iupac_seq.tostring()[:p]+refseq[p]+iupac_seq.tostring()[p+1:],self.alphabet) #check for invalid characters for i,c in enumerate(iupac_seq.tostring()): if c not in self.valid_characters and c!=self.gap and c!=self.missing: raise NexusError, 'Taxon %s: Illegal character %s in line: %s (check dimensions / interleaving)'\ % (id,c,l[i-10:i+10]) #add sequence to matrix if block_interleave==0: while self.matrix.has_key(id): if id.split('.')[-1].startswith('copy'): id='.'.join(id.split('.')[:-1])+'.copy'+str(eval('0'+id.split('.')[-1][4:])+1) else: id+='.copy' #raise NexusError, id+' already in matrix!\nError in: '+l self.matrix[id]=iupac_seq # add taxon name only if taxlabels is not alredy present if not taxlabels_present: self.taxlabels.append(id) else: taxon_present=self._check_taxlabels(id) if taxon_present: self.matrix[taxon_present]+=iupac_seq else: raise NexusError, 'Taxon %s not in first block of interleaved matrix.' % id #check all sequences for length according to nchar for taxon in self.matrix: if len(self.matrix[taxon])!=self.nchar: raise NexusError,'Matrx Nchar %d does not match data length (%d) for taxon %s' % (self.nchar, len(self.matrix[taxon]),taxon) | 09503d19fb7097018edce666588847fe56dc3231 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/09503d19fb7097018edce666588847fe56dc3231/Nexus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5667,
12,
2890,
16,
2116,
4672,
309,
486,
365,
18,
3791,
578,
486,
365,
18,
82,
3001,
30,
1002,
423,
21029,
668,
11189,
10796,
1297,
506,
1269,
1865,
3148,
5124,
5320,
5336,
67,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5667,
12,
2890,
16,
2116,
4672,
309,
486,
365,
18,
3791,
578,
486,
365,
18,
82,
3001,
30,
1002,
423,
21029,
668,
11189,
10796,
1297,
506,
1269,
1865,
3148,
5124,
5320,
5336,
67,
6... | |
def __init__(self): ValgrindTool.__init__(self) ThreadSanitizerBase.__init__(self) | def __init__(self): ValgrindTool.__init__(self) ThreadSanitizerBase.__init__(self) | 4b973d7a16cfee0fc0485f43b4ca68f3d76bacca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/4b973d7a16cfee0fc0485f43b4ca68f3d76bacca/valgrind_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
12747,
3197,
728,
6364,
16186,
2738,
972,
12,
2890,
13,
4884,
26131,
1824,
2171,
16186,
2738,
972,
12,
2890,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
12747,
3197,
728,
6364,
16186,
2738,
972,
12,
2890,
13,
4884,
26131,
1824,
2171,
16186,
2738,
972,
12,
2890,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
if self.line_block_level <= 1: el1 = SubElement(self.current_element, 'text:p', attrib={ 'text:style-name': self.rststyle('lineblock1'), }) | def depart_line_block(self, node): if self.line_block_level <= 1: el1 = SubElement(self.current_element, 'text:p', attrib={ 'text:style-name': self.rststyle('lineblock1'), }) self.line_indent_level -= 1 self.line_block_level -= 1 | 320b99018745533c92a47221c5e858c3bff9f8ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1532/320b99018745533c92a47221c5e858c3bff9f8ce/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26000,
67,
1369,
67,
2629,
12,
2890,
16,
756,
4672,
365,
18,
1369,
67,
9355,
67,
2815,
3947,
404,
365,
18,
1369,
67,
2629,
67,
2815,
3947,
404,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26000,
67,
1369,
67,
2629,
12,
2890,
16,
756,
4672,
365,
18,
1369,
67,
9355,
67,
2815,
3947,
404,
365,
18,
1369,
67,
2629,
67,
2815,
3947,
404,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if _is_derived_type(v, whatTC) and v.typecode is not what: what = _get_what(v) if isinstance(what, ElementDeclaration): raise TypeError('At %s: failed to serialize (%s, %s) substitute type is a GED (%s,%s)' % (sw.Backtrace(elt), whatTC.nspname, whatTC.pname, what.nspname, what.pname,)) if debug: self.logger.debug('use derived(%s) from %s' % (what.__class__, whatTC.__class__)) what.nspname = whatTC.nspname what.pname = whatTC.pname what.aname = whatTC.aname what.minOccurs = whatTC.minOccurs what.maxOccurs = whatTC.maxOccurs | def cb(self, elt, sw, pyobj, name=None, **kw): debug = self.logger.debugOn() if debug: self.logger.debug("cb: %s" %str(self.ofwhat)) if pyobj is None: if self.nillable is True: elem = elt.createAppendElement(self.nspname, self.pname) self.serialize_as_nil(elem) return raise EvaluateException, 'element(%s,%s) is not nillable(%s)' %( self.nspname,self.pname,self.nillable) | 39bf0a192f73c51fdb88cfed8d16277e03d3debf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/39bf0a192f73c51fdb88cfed8d16277e03d3debf/TCcompound.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2875,
12,
2890,
16,
11572,
16,
1352,
16,
2395,
2603,
16,
508,
33,
7036,
16,
2826,
9987,
4672,
1198,
273,
365,
18,
4901,
18,
4148,
1398,
1435,
309,
1198,
30,
365,
18,
4901,
18,
4148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2875,
12,
2890,
16,
11572,
16,
1352,
16,
2395,
2603,
16,
508,
33,
7036,
16,
2826,
9987,
4672,
1198,
273,
365,
18,
4901,
18,
4148,
1398,
1435,
309,
1198,
30,
365,
18,
4901,
18,
4148,
... | |
for ts,tests in suitesAndTests: print ' %s - %d tests' %(ts.name, len(tests)) | for ts,ts_tests in suitesAndTests: print ' %s - %d tests' %(ts.name, len(ts_tests)) | def main(): global options from optparse import OptionParser, OptionGroup parser = OptionParser("usage: %prog [options] {file-or-path}") parser.add_option("-j", "--threads", dest="numThreads", metavar="N", help="Number of testing threads", type=int, action="store", default=None) parser.add_option("", "--config-prefix", dest="configPrefix", metavar="NAME", help="Prefix for 'lit' config files", action="store", default=None) parser.add_option("", "--param", dest="userParameters", metavar="NAME=VAL", help="Add 'NAME' = 'VAL' to the user defined parameters", type=str, action="append", default=[]) group = OptionGroup(parser, "Output Format") # FIXME: I find these names very confusing, although I like the # functionality. group.add_option("-q", "--quiet", dest="quiet", help="Suppress no error output", action="store_true", default=False) group.add_option("-s", "--succinct", dest="succinct", help="Reduce amount of output", action="store_true", default=False) group.add_option("-v", "--verbose", dest="showOutput", help="Show all test output", action="store_true", default=False) group.add_option("", "--no-progress-bar", dest="useProgressBar", help="Do not use curses based progress bar", action="store_false", default=True) parser.add_option_group(group) group = OptionGroup(parser, "Test Execution") group.add_option("", "--path", dest="path", help="Additional paths to add to testing environment", action="append", type=str, default=[]) group.add_option("", "--vg", dest="useValgrind", help="Run tests under valgrind", action="store_true", default=False) group.add_option("", "--vg-arg", dest="valgrindArgs", metavar="ARG", help="Specify an extra argument for valgrind", type=str, action="append", default=[]) group.add_option("", "--time-tests", dest="timeTests", help="Track elapsed wall time for each test", action="store_true", default=False) group.add_option("", "--no-execute", dest="noExecute", help="Don't execute any tests (assume PASS)", action="store_true", default=False) parser.add_option_group(group) group = OptionGroup(parser, "Test Selection") group.add_option("", "--max-tests", dest="maxTests", metavar="N", help="Maximum number of tests to run", action="store", type=int, default=None) group.add_option("", "--max-time", dest="maxTime", metavar="N", help="Maximum time to spend testing (in seconds)", action="store", type=float, default=None) group.add_option("", "--shuffle", dest="shuffle", help="Run tests in random order", action="store_true", default=False) parser.add_option_group(group) group = OptionGroup(parser, "Debug and Experimental Options") group.add_option("", "--debug", dest="debug", help="Enable debugging (for 'lit' development)", action="store_true", default=False) group.add_option("", "--show-suites", dest="showSuites", help="Show discovered test suites", action="store_true", default=False) group.add_option("", "--no-tcl-as-sh", dest="useTclAsSh", help="Don't run Tcl scripts using 'sh'", action="store_false", default=True) parser.add_option_group(group) (opts, args) = parser.parse_args() if not args: parser.error('No inputs specified') if opts.configPrefix is not None: global gConfigName, gSiteConfigName gConfigName = '%s.cfg' % opts.configPrefix gSiteConfigName = '%s.site.cfg' % opts.configPrefix if opts.numThreads is None: opts.numThreads = Util.detectCPUs() inputs = args # Create the user defined parameters. userParams = {} for entry in opts.userParameters: if '=' not in entry: name,val = entry,'' else: name,val = entry.split('=', 1) userParams[name] = val # Create the global config object. litConfig = LitConfig.LitConfig(progname = os.path.basename(sys.argv[0]), path = opts.path, quiet = opts.quiet, useValgrind = opts.useValgrind, valgrindArgs = opts.valgrindArgs, useTclAsSh = opts.useTclAsSh, noExecute = opts.noExecute, debug = opts.debug, isWindows = (platform.system()=='Windows'), params = userParams) # Load the tests from the inputs. tests = [] testSuiteCache = {} localConfigCache = {} for input in inputs: prev = len(tests) tests.extend(getTests(input, litConfig, testSuiteCache, localConfigCache)[1]) if prev == len(tests): litConfig.warning('input %r contained no tests' % input) # If there were any errors during test discovery, exit now. if litConfig.numErrors: print >>sys.stderr, '%d errors, exiting.' % litConfig.numErrors sys.exit(2) if opts.showSuites: suitesAndTests = dict([(ts,[]) for ts,_ in testSuiteCache.values() if ts]) for t in tests: suitesAndTests[t.suite].append(t) print '-- Test Suites --' suitesAndTests = suitesAndTests.items() suitesAndTests.sort(key = lambda (ts,_): ts.name) for ts,tests in suitesAndTests: print ' %s - %d tests' %(ts.name, len(tests)) print ' Source Root: %s' % ts.source_root print ' Exec Root : %s' % ts.exec_root # Select and order the tests. numTotalTests = len(tests) if opts.shuffle: random.shuffle(tests) else: tests.sort(key = lambda t: t.getFullName()) if opts.maxTests is not None: tests = tests[:opts.maxTests] extra = '' if len(tests) != numTotalTests: extra = ' of %d' % numTotalTests header = '-- Testing: %d%s tests, %d threads --'%(len(tests),extra, opts.numThreads) progressBar = None if not opts.quiet: if opts.succinct and opts.useProgressBar: try: tc = ProgressBar.TerminalController() progressBar = ProgressBar.ProgressBar(tc, header) except ValueError: print header progressBar = ProgressBar.SimpleProgressBar('Testing: ') else: print header # Don't create more threads than tests. opts.numThreads = min(len(tests), opts.numThreads) startTime = time.time() display = TestingProgressDisplay(opts, len(tests), progressBar) provider = TestProvider(tests, opts.maxTime) runTests(opts.numThreads, litConfig, provider, display) display.finish() if not opts.quiet: print 'Testing Time: %.2fs'%(time.time() - startTime) # Update results for any tests which weren't run. for t in tests: if t.result is None: t.setResult(Test.UNRESOLVED, '', 0.0) # List test results organized by kind. hasFailures = False byCode = {} for t in tests: if t.result not in byCode: byCode[t.result] = [] byCode[t.result].append(t) if t.result.isFailure: hasFailures = True # FIXME: Show unresolved and (optionally) unsupported tests. for title,code in (('Unexpected Passing Tests', Test.XPASS), ('Failing Tests', Test.FAIL)): elts = byCode.get(code) if not elts: continue print '*'*20 print '%s (%d):' % (title, len(elts)) for t in elts: print ' %s' % t.getFullName() print if opts.timeTests: byTime = list(tests) byTime.sort(key = lambda t: t.elapsed) if byTime: Util.printHistogram([(t.getFullName(), t.elapsed) for t in byTime], title='Tests') for name,code in (('Expected Passes ', Test.PASS), ('Expected Failures ', Test.XFAIL), ('Unsupported Tests ', Test.UNSUPPORTED), ('Unresolved Tests ', Test.UNRESOLVED), ('Unexpected Passes ', Test.XPASS), ('Unexpected Failures', Test.FAIL),): if opts.quiet and not code.isFailure: continue N = len(byCode.get(code,[])) if N: print ' %s: %d' % (name,N) # If we encountered any additional errors, exit abnormally. if litConfig.numErrors: print >>sys.stderr, '\n%d error(s), exiting.' % litConfig.numErrors sys.exit(2) # Warn about warnings. if litConfig.numWarnings: print >>sys.stderr, '\n%d warning(s) in tests.' % litConfig.numWarnings if hasFailures: sys.exit(1) sys.exit(0) | c39e427a61d58f4de9743765cbb5e0b6bf89b7ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11986/c39e427a61d58f4de9743765cbb5e0b6bf89b7ba/lit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
702,
628,
2153,
2670,
1930,
18862,
16,
2698,
1114,
2082,
273,
18862,
2932,
9167,
30,
738,
14654,
306,
2116,
65,
288,
768,
17,
280,
17,
803,
1532,
13,
225,
2082,
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,
2774,
13332,
2552,
702,
628,
2153,
2670,
1930,
18862,
16,
2698,
1114,
2082,
273,
18862,
2932,
9167,
30,
738,
14654,
306,
2116,
65,
288,
768,
17,
280,
17,
803,
1532,
13,
225,
2082,
18,
... |
return a.size - b.size | return apo.size - bpo.size | def mediasort(a, b): # FIXME: we should probably also use the mediaid; else we # could conceivably ping-pong between different disc1's a = a.getDiscNum() b = b.getDiscNum() if a is None and b is None: # Download smallest pkgs first return a.size - b.size if a is None: return -1 if b is None: return 1 if a < b: return -1 elif a > b: return 1 return 0 | 09f05e2a6b8c752b110e54fb8f505658bbea71f1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/09f05e2a6b8c752b110e54fb8f505658bbea71f1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6735,
1795,
499,
12,
69,
16,
324,
4672,
468,
9852,
30,
732,
1410,
8656,
2546,
999,
326,
3539,
350,
31,
469,
732,
468,
3377,
356,
311,
427,
6906,
10087,
17,
500,
75,
3086,
3775,
19169,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6735,
1795,
499,
12,
69,
16,
324,
4672,
468,
9852,
30,
732,
1410,
8656,
2546,
999,
326,
3539,
350,
31,
469,
732,
468,
3377,
356,
311,
427,
6906,
10087,
17,
500,
75,
3086,
3775,
19169,
... |
vertices. | vertices. Deleting a non-existant vertex will raise an exception. | def delete_vertices(self, vertices): """ Remove vertices from the (di)graph taken from an iterable container of vertices. | 191e77a0bf2525c8c088fd2c0fb6301984c87062 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/191e77a0bf2525c8c088fd2c0fb6301984c87062/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
17476,
12,
2890,
16,
6928,
4672,
3536,
3581,
6928,
628,
326,
261,
3211,
13,
4660,
9830,
628,
392,
6087,
1478,
434,
6928,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
17476,
12,
2890,
16,
6928,
4672,
3536,
3581,
6928,
628,
326,
261,
3211,
13,
4660,
9830,
628,
392,
6087,
1478,
434,
6928,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
@staticmethod | from_consumer_and_token = staticmethod(from_consumer_and_token) | def from_consumer_and_token(oauth_consumer, token=None, http_method=HTTP_METHOD, http_url=None, parameters=None): if not parameters: parameters = {} | 6693d442ced806c6c8cda35b96d4347a543dcae0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1598/6693d442ced806c6c8cda35b96d4347a543dcae0/oauth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
13230,
67,
464,
67,
2316,
12,
7280,
67,
13230,
16,
1147,
33,
7036,
16,
1062,
67,
2039,
33,
3693,
67,
5327,
16,
1062,
67,
718,
33,
7036,
16,
1472,
33,
7036,
4672,
309,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
13230,
67,
464,
67,
2316,
12,
7280,
67,
13230,
16,
1147,
33,
7036,
16,
1062,
67,
2039,
33,
3693,
67,
5327,
16,
1062,
67,
718,
33,
7036,
16,
1472,
33,
7036,
4672,
309,
486,
... |
input = text_file.TextFile('Modules/Setup', join_lines=1) | def build_extensions(self): | 291bbd79dd5053db1f332d0b9baf03f1360dba05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/291bbd79dd5053db1f332d0b9baf03f1360dba05/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
9489,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
9489,
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,
-10... | |
if self.__maxheaderlen == 0: | if self._maxheaderlen == 0: | def _write_headers(self, msg): for h, v in msg.items(): print >> self._fp, '%s:' % h, if self.__maxheaderlen == 0: # Explicit no-wrapping print >> self._fp, v elif isinstance(v, Header): # Header instances know what to do print >> self._fp, v.encode() elif _is8bitstring(v): # If we have raw 8bit data in a byte string, we have no idea # what the encoding is. There is no safe way to split this # string. If it's ascii-subset, then we could do a normal # ascii split, but if it's multibyte then we could break the # string. There's no way to know so the least harm seems to # be to not split the string and risk it being too long. print >> self._fp, v else: # Header's got lots of smarts, so use it. print >> self._fp, Header( v, maxlinelen=self.__maxheaderlen, header_name=h, continuation_ws='\t').encode() # A blank line always separates headers from body print >> self._fp | bebf357b442a43365c8883f99b9f699444d75bc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bebf357b442a43365c8883f99b9f699444d75bc7/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
2485,
12,
2890,
16,
1234,
4672,
364,
366,
16,
331,
316,
1234,
18,
3319,
13332,
1172,
1671,
365,
6315,
7944,
16,
1995,
87,
2497,
738,
366,
16,
309,
365,
6315,
1896,
3374,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2626,
67,
2485,
12,
2890,
16,
1234,
4672,
364,
366,
16,
331,
316,
1234,
18,
3319,
13332,
1172,
1671,
365,
6315,
7944,
16,
1995,
87,
2497,
738,
366,
16,
309,
365,
6315,
1896,
3374,... |
weights = numpy.asarray(weights, dtype = numpy.float64) | weights = numpy.asarray(weights, dtype=numpy.float64) | def correlate1d(input, weights, axis = -1, output = None, mode = "reflect", cval = 0.0, origin = 0): """Calculate a one-dimensional correlation along the given axis. The lines of the array along the given axis are correlated with the given weights. The weights parameter must be a one-dimensional sequence of numbers. """ input = numpy.asarray(input) if numpy.iscomplexobj(input): raise TypeError, 'Complex type not supported' output, return_value = _ni_support._get_output(output, input) weights = numpy.asarray(weights, dtype = numpy.float64) if weights.ndim != 1 or weights.shape[0] < 1: raise RuntimeError, 'no filter weights given' if not weights.flags.contiguous: weights = weights.copy() axis = _ni_support._check_axis(axis, input.ndim) if ((len(weights) // 2 + origin < 0) or (len(weights) // 2 + origin > len(weights))): raise ValueError, 'invalid origin' mode = _ni_support._extend_mode_to_code(mode) _nd_image.correlate1d(input, weights, axis, output, mode, cval, origin) return return_value | cbe05e7deabee2267114372be689803de7da3645 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/cbe05e7deabee2267114372be689803de7da3645/filters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1858,
2878,
340,
21,
72,
12,
2630,
16,
5376,
16,
2654,
273,
300,
21,
16,
876,
273,
599,
16,
1965,
273,
315,
1734,
1582,
3113,
276,
1125,
273,
374,
18,
20,
16,
4026,
273,
374,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1858,
2878,
340,
21,
72,
12,
2630,
16,
5376,
16,
2654,
273,
300,
21,
16,
876,
273,
599,
16,
1965,
273,
315,
1734,
1582,
3113,
276,
1125,
273,
374,
18,
20,
16,
4026,
273,
374,
4672,
... |
else: raise ValueError, 'expected 3-tuple for urange and vrange' | sage: def _(which_plot=[F, G, H, I, J]): | 6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87/plot3d.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
272,
410,
30,
1652,
389,
12,
12784,
67,
4032,
22850,
42,
16,
611,
16,
670,
16,
467,
16,
804,
65,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
272,
410,
30,
1652,
389,
12,
12784,
67,
4032,
22850,
42,
16,
611,
16,
670,
16,
467,
16,
804,
65,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
xml_data = unpack( get_calias_data() ) | xml_data = self.unpack( get_calias_data( param) ) | def analyze(self, text, content_type="text/txt"): """ Submits 'text' to OpenCalais for analysis and memorizes the extracted metadata. Set the content-type to 'text/html' if you are submitting HTML data. """ externalID = Calais.content_id(text) paramsXML = PARAMS_XML % (content_type, self.allow_distro, self.allow_search, externalID, self.submitter) param = urllib.urlencode({'licenseID':self.api_key, 'content':text, 'paramsXML':paramsXML}) # do not fetch the data again, if a file exists in the cache get_calias_data = urllib.urlopen(OPENCALAIS_URL, param).read if self.cache is None: xml_data = unpack( get_calias_data() ) else: xml_data = unpack( self.cache.fetch( externalID, get_calias_data ) ) | 81e94b045477ce84d5691e72cef69f651c8d471e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6604/81e94b045477ce84d5691e72cef69f651c8d471e/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
12,
2890,
16,
977,
16,
913,
67,
723,
1546,
955,
19,
5830,
6,
4672,
3536,
2592,
22679,
296,
955,
11,
358,
3502,
3005,
69,
291,
364,
6285,
471,
1663,
280,
3128,
326,
9438,
1982,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
12,
2890,
16,
977,
16,
913,
67,
723,
1546,
955,
19,
5830,
6,
4672,
3536,
2592,
22679,
296,
955,
11,
358,
3502,
3005,
69,
291,
364,
6285,
471,
1663,
280,
3128,
326,
9438,
1982,
... |
if msg[:3] != '500': raise error_perm, msg | if msg.args[0][:3] != '500': raise | def cwd(self, dirname): '''Change to a directory.''' if dirname == '..': try: return self.voidcmd('CDUP') except error_perm, msg: if msg[:3] != '500': raise error_perm, msg elif dirname == '': dirname = '.' # does nothing, but could return error cmd = 'CWD ' + dirname return self.voidcmd(cmd) | b5255114d1221f3fec027005a16dc61812eacf4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b5255114d1221f3fec027005a16dc61812eacf4b/ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7239,
12,
2890,
16,
4283,
4672,
9163,
3043,
358,
279,
1867,
1093,
6309,
309,
4283,
422,
11597,
4278,
775,
30,
327,
365,
18,
6459,
4172,
2668,
10160,
3079,
6134,
1335,
555,
67,
12160,
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,
7239,
12,
2890,
16,
4283,
4672,
9163,
3043,
358,
279,
1867,
1093,
6309,
309,
4283,
422,
11597,
4278,
775,
30,
327,
365,
18,
6459,
4172,
2668,
10160,
3079,
6134,
1335,
555,
67,
12160,
16,... |
im,pim,cmap0,isync,isync441,isync6m,isync65,isync_save,idsec, \ first,itol,txsnrdb,tx6alt | im,pim,cmap0,isync,isync441,isync6m,isync_iscat,isync65, \ isync_save,idsec,first,itol,txsnrdb,tx6alt | def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync441,isync6m,isync65,isync_save,idsec, \ first,itol,txsnrdb,tx6alt utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime('%Y %b %d\n%H:%M:%S',utc) Audio.gcom2.utcdate=t[:12] Audio.gcom2.iyr=utc[0] Audio.gcom2.imo=utc[1] Audio.gcom2.ida=utc[2] Audio.gcom2.ihr=utc[3] Audio.gcom2.imi=utc[4] Audio.gcom2.isc=utc[5] ldate.configure(text=t) root_geom=root.geometry() utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0 naz,nel,ndmiles,ndkm,nhotaz,nhotabetter=Audio.azdist0( \ options.MyGrid.get().upper(),HisGrid.get().upper(),utchours) azdist() g.nfreq=nfreq.get() if Audio.gcom2.ndecoding==0: g.AzSun,g.ElSun,g.AzMoon,g.ElMoon,g.AzMoonB,g.ElMoonB,g.ntsky, \ g.ndop,g.ndop00,g.dbMoon,g.RAMoon,g.DecMoon,g.HA8,g.Dgrd, \ g.sd,g.poloffset,g.MaxNR,g.dfdt,g.dfdt0,g.RaAux,g.DecAux, \ g.AzAux,g.ElAux = Audio.astro0(utc[0],utc[1],utc[2], \ utchours,nfreq.get(),options.MyGrid.get().upper(), \ options.auxra.get()+(' '*9)[:9], \ options.auxdec.get()+(' '*9)[:9]) if len(HisGrid.get().strip())<4: g.ndop=g.ndop00 g.dfdt=g.dfdt0 if (ntx.get()==1 and noshjt65.get()) or noshjt65all.get(): Audio.gcom2.ntx2=1 else: Audio.gcom2.ntx2=0 if mode.get()[:4]=='JT65' or mode.get()[:3]=='JT4' \ or mode.get()[:2]=='CW': graph2.delete(ALL) graph2.create_text(80,13,anchor=CENTER,text="Moon",font=g2font) graph2.create_text(13,37,anchor=W, text="Az: %6.2f" % g.AzMoon,font=g2font) graph2.create_text(13,61,anchor=W, text="El: %6.2f" % g.ElMoon,font=g2font) graph2.create_text(13,85,anchor=W, text="Dop:%6d" % g.ndop,font=g2font) graph2.create_text(13,109,anchor=W,text="Dgrd:%5.1f" % g.Dgrd,font=g2font) if (mode.get()[:4]=='JT65' or mode.get()[:3]=='JT4') and g.freeze_decode: itol=2 ltol.configure(text='Tol '+str(50)) Audio.gcom2.dftolerance=50 nfreeze.set(1) Audio.gcom2.nfreeze=1 if Audio.gcom2.monitoring: Audio.gcom2.ndecoding=1 Audio.gcom2.nagain=0 else: Audio.gcom2.ndecoding=4 Audio.gcom2.nagain=1 g.freeze_decode=0 n=-99 g.rms=g.rms+0.001 if g.rms > 0: n=int(20.0*log10(g.rms/770.0+0.01)) else: print "RMS noise:", g.rms, " out of range." t="Rx noise:%3d dB" % (n,) if n>=-10 and n<=10: msg4.configure(text=t,bg='gray85') else: msg4.configure(text=t,bg='red') t=g.ftnstr(Audio.gcom2.decodedfile) | 6ca49ec90be5fe2fb7f7f92dfcc9376c8203defe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2394/6ca49ec90be5fe2fb7f7f92dfcc9376c8203defe/wsjt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
13332,
2552,
1365,
67,
10049,
16,
291,
557,
20,
16,
82,
1561,
16,
3084,
16,
4880,
81,
1449,
16,
82,
2883,
81,
16,
82,
15224,
1561,
16,
82,
15224,
378,
11214,
16,
82,
3190,
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,
1089,
13332,
2552,
1365,
67,
10049,
16,
291,
557,
20,
16,
82,
1561,
16,
3084,
16,
4880,
81,
1449,
16,
82,
2883,
81,
16,
82,
15224,
1561,
16,
82,
15224,
378,
11214,
16,
82,
3190,
16,
... |
elif hasattr(other, "timetuple"): | elif hasattr(other, "timetuple") and not isinstance(other, date): | def __gt__(self, other): if isinstance(other, datetime): return self.__cmp(other) > 0 elif hasattr(other, "timetuple"): return NotImplemented else: _cmperror(self, other) | ceeb318540b62b368d28aedf1baef856c96583c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ceeb318540b62b368d28aedf1baef856c96583c9/datetime.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4521,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
3314,
4672,
327,
365,
16186,
9625,
12,
3011,
13,
405,
374,
1327,
3859,
12,
3011,
16,
315,
8584,
278,
2268,
7923,
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,
1001,
4521,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
3314,
4672,
327,
365,
16186,
9625,
12,
3011,
13,
405,
374,
1327,
3859,
12,
3011,
16,
315,
8584,
278,
2268,
7923,
471... |
log("Working directory has modifications, pass --force-clean or --no-clean to continue.") os.system(self.status_command()) exit(1) | print self.run_command(self.status_command()) error("Working directory has modifications, pass --force-clean or --no-clean to continue.") | def ensure_clean_working_directory(self, force): if not force and not self.working_directory_is_clean(): log("Working directory has modifications, pass --force-clean or --no-clean to continue.") os.system(self.status_command()) exit(1) log("Cleaning the working directory") self.clean_working_directory() | af2b7abe7b671258d75e9993fabd9c3c795e2021 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/af2b7abe7b671258d75e9993fabd9c3c795e2021/scm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3387,
67,
6200,
67,
20478,
67,
5149,
12,
2890,
16,
2944,
4672,
309,
486,
2944,
471,
486,
365,
18,
20478,
67,
5149,
67,
291,
67,
6200,
13332,
1172,
365,
18,
2681,
67,
3076,
12,
2890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3387,
67,
6200,
67,
20478,
67,
5149,
12,
2890,
16,
2944,
4672,
309,
486,
2944,
471,
486,
365,
18,
20478,
67,
5149,
67,
291,
67,
6200,
13332,
1172,
365,
18,
2681,
67,
3076,
12,
2890,
... |
def get_task(self, task_id): """Get task meta for task by ``task_id``.""" task, created = self.get_or_create(task_id=task_id) | def get_task(self, task_id, exception_retry_count=1): """Get task meta for task by ``task_id``. :keyword exception_retry_count: How many times to retry with transaction rollback on exception. 1 by default: we assume the pessimistic case when we get race condition in which task is created by other process during get_or_create """ try: task, created = self.get_or_create(task_id=task_id) except Exception, exc: if exception_retry_count > 0: transaction.rollback_unless_managed() return self.get_task(task_id, exception_retry_count-1) else: raise | def get_task(self, task_id): """Get task meta for task by ``task_id``.""" task, created = self.get_or_create(task_id=task_id) return task | 0e4e001dd5cca3d4404f01b2114b2900c6377586 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2024/0e4e001dd5cca3d4404f01b2114b2900c6377586/managers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4146,
12,
2890,
16,
1562,
67,
350,
16,
1520,
67,
9620,
67,
1883,
33,
21,
4672,
3536,
967,
1562,
2191,
364,
1562,
635,
12176,
4146,
67,
350,
68,
8338,
225,
294,
11041,
1520,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4146,
12,
2890,
16,
1562,
67,
350,
16,
1520,
67,
9620,
67,
1883,
33,
21,
4672,
3536,
967,
1562,
2191,
364,
1562,
635,
12176,
4146,
67,
350,
68,
8338,
225,
294,
11041,
1520,
... |
action=gtk.FILE_CHOOSER_ACTION_OPEN, | action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, | def start(args, options, config): if not args: if HILDON: dummy_ui = gtk.Window() dlg = hildon.FileChooserDialog(dummy_ui, action=gtk.FILE_CHOOSER_ACTION_OPEN) else: dlg = gtk.FileChooserDialog( title="Open", action=gtk.FILE_CHOOSER_ACTION_OPEN, buttons=(gtk.STOCK_OPEN, gtk.RESPONSE_OK, gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) ) dlg.set_local_only(True) result = dlg.run() if result != gtk.RESPONSE_OK: gtk.main_quit() sys.exit(0) args = dlg.get_filenames() dlg.destroy() sources = [os.path.realpath(p) for p in args if os.path.exists(p)] progress = ProgressDialog("Starting PAI...") def _load(): filelist = FileList(sources, IMAGE_EXTENSIONS, progress.queue) run_in_gui_thread(_finished, filelist) @assert_gui_thread def _finished(filelist): progress.close() ui = PaiUI(sources, filelist, config, ncolumns=options.ncolumns, rtl=options.rtl) ui.show() threading.Thread(target=_load).start() | 5862783d63e6ac0c0f5200bb7dd0dc18195db037 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6493/5862783d63e6ac0c0f5200bb7dd0dc18195db037/pai.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
1968,
16,
702,
16,
642,
4672,
309,
486,
833,
30,
309,
670,
11382,
673,
30,
9609,
67,
4881,
273,
22718,
18,
3829,
1435,
25840,
273,
366,
545,
265,
18,
812,
17324,
6353,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
1968,
16,
702,
16,
642,
4672,
309,
486,
833,
30,
309,
670,
11382,
673,
30,
9609,
67,
4881,
273,
22718,
18,
3829,
1435,
25840,
273,
366,
545,
265,
18,
812,
17324,
6353,
12,
2... |
jobAttrNames.append('ApplicationCounter') | jobAttrNames.append('ApplicationNumStatus') | def rescheduleJob (self, jobID): """ Reschedule the given job to run again from scratch. Retain the already defined parameters in the parameter Attic """ # Check Verified Flag result = self.getJobAttributes( jobID, ['Status','MinorStatus','VerifiedFlag','RescheduleCounter', 'Owner','OwnerDN','OwnerGroup','DIRACSetup'] ) if result['OK']: resultDict = result['value'] else: return S_ERROR('JobDB.getJobAttributes: can not retrieve job attributes') | 217021ab63329dc922bb37e596caca5cf0d30ec7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/217021ab63329dc922bb37e596caca5cf0d30ec7/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
400,
2847,
2278,
261,
2890,
16,
28913,
4672,
3536,
1124,
2847,
326,
864,
1719,
358,
1086,
3382,
628,
15289,
18,
17100,
530,
326,
1818,
2553,
1472,
316,
326,
1569,
6020,
335,
3536,
468,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
400,
2847,
2278,
261,
2890,
16,
28913,
4672,
3536,
1124,
2847,
326,
864,
1719,
358,
1086,
3382,
628,
15289,
18,
17100,
530,
326,
1818,
2553,
1472,
316,
326,
1569,
6020,
335,
3536,
468,
2... |
gens = [ "()" ] | k = max(self.entries()) gens = [range(1,k+1)] | def row_stabilizer(self): """ Return the PermutationGroup corresponding to the row stabilizer of self. | 607f3bf91afb925b159d15574764be8ff24b5e0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/607f3bf91afb925b159d15574764be8ff24b5e0a/tableau.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1027,
67,
334,
22681,
1824,
12,
2890,
4672,
3536,
2000,
326,
13813,
9245,
1114,
4656,
358,
326,
1027,
384,
22681,
1824,
434,
365,
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,
1027,
67,
334,
22681,
1824,
12,
2890,
4672,
3536,
2000,
326,
13813,
9245,
1114,
4656,
358,
326,
1027,
384,
22681,
1824,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
try: entry = lal.CacheEntry(ifo+" "+self.options.science_run+" " \ | scirun = string.strip(cp.get('hipe-cache','science-run')) entry = lal.CacheEntry(ifo+" " + scirun + " " \ | def getCacheType(self, type, cp=None): self[type] = [] p = re.compile(type) f = re.compile("FOLLOWUP") m = re.compile("-") x = re.compile(".xml") try: dir = os.listdir(string.strip(cp.get('hipe-cache',type))) cache_path = os.path.abspath(string.strip(cp.get('hipe-cache',type))) except: dir = self.dir cache_path = os.path.abspath(self.options.cache_path) for fname in dir: if f.search(fname): continue if p.search(fname): ifo = m.split(fname)[0] start = m.split(fname)[-2] dur = x.split(m.split(fname)[-1]) try: entry = lal.CacheEntry(ifo+" "+self.options.science_run+" " \ +start+" "+dur[0]+" "+"file://localhost" +cache_path+"/"+fname) self[type].append(entry) except: pass | 4bc7969b5ca6222658e322a13faf9e80fae849fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/4bc7969b5ca6222658e322a13faf9e80fae849fd/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8577,
559,
12,
2890,
16,
618,
16,
3283,
33,
7036,
4672,
365,
63,
723,
65,
273,
5378,
293,
273,
283,
18,
11100,
12,
723,
13,
284,
273,
283,
18,
11100,
2932,
29890,
3079,
7923,
312,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8577,
559,
12,
2890,
16,
618,
16,
3283,
33,
7036,
4672,
365,
63,
723,
65,
273,
5378,
293,
273,
283,
18,
11100,
12,
723,
13,
284,
273,
283,
18,
11100,
2932,
29890,
3079,
7923,
312,
27... |
phiarray[i] = bandpasslist.phi | phiarray[i] = bp.phi | def setupPhiArray(self, bandpasslist): """Sets up a 2-d numpy phi array from bandpasslist suitable for input to manyMagCalc. | 22dca2d9462c04f9f1a9e0b3d61e9fc69670aef4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/91/22dca2d9462c04f9f1a9e0b3d61e9fc69670aef4/Sed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
31905,
1076,
12,
2890,
16,
8937,
5466,
1098,
4672,
3536,
2785,
731,
279,
576,
17,
72,
3972,
7706,
526,
628,
8937,
5466,
1098,
10631,
364,
810,
358,
4906,
11372,
25779,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
31905,
1076,
12,
2890,
16,
8937,
5466,
1098,
4672,
3536,
2785,
731,
279,
576,
17,
72,
3972,
7706,
526,
628,
8937,
5466,
1098,
10631,
364,
810,
358,
4906,
11372,
25779,
18,
2,
-100,... |
if hasattr('message', info): | if hasattr(info, 'message'): | def verify(self): """Handle incoming redirect from OpenID Provider""" log_debug = self.log_debug if log_debug: log.debug('Handling processing of response from server') openid_session = session['openid_session'] if not openid_session: raise AccessException("openid session missing") # Setup the consumer and parse the information coming back oidconsumer = consumer.Consumer(openid_session, self.openid_store) return_to = url(controller='account', action="verify", qualified=True) info = oidconsumer.complete(request.params, return_to) if info.status == consumer.FAILURE: msg = "OpenID authentication/authorization failure" if hasattr('message', info): msg = "%s: %s" % (msg, info.message) log.info("%s: %s", self.provider, msg) raise AccessException(msg) elif info.status == consumer.CANCEL: msg = "User denied application access to their account" log.info("%s: %s", self.provider, msg) raise AccessException(msg) elif info.status == consumer.SUCCESS: openid_identity = info.identity_url if info.endpoint.canonicalID: # If it's an i-name, use the canonicalID as its secure even if # the old one is compromised openid_identity = info.endpoint.canonicalID user_data = extract_openid_data(identifier=openid_identity, sreg_resp=sreg.SRegResponse.fromSuccessResponse(info), ax_resp=ax.FetchResponse.fromSuccessResponse(info)) result_data = {'profile': user_data} # Did we get any OAuth info? access_token = None oauth = info.extensionResponse('http://specs.openid.net/extensions/oauth/1.0', False) if oauth and 'request_token' in oauth: access_token = self._get_access_token(oauth['request_token']) if access_token: result_data.update(access_token) return self._get_credentials(result_data) else: raise Exception("Unknown OpenID Failure") | bb4d18361d672825f441b7164afa4a68d222e805 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12761/bb4d18361d672825f441b7164afa4a68d222e805/openidconsumer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
12,
2890,
4672,
3536,
3259,
6935,
3136,
628,
25781,
7561,
8395,
613,
67,
4148,
273,
365,
18,
1330,
67,
4148,
309,
613,
67,
4148,
30,
613,
18,
4148,
2668,
14701,
4929,
434,
766,
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,
3929,
12,
2890,
4672,
3536,
3259,
6935,
3136,
628,
25781,
7561,
8395,
613,
67,
4148,
273,
365,
18,
1330,
67,
4148,
309,
613,
67,
4148,
30,
613,
18,
4148,
2668,
14701,
4929,
434,
766,
6... |
self.simpleElement("real", str(value)) | self.simpleElement("real", repr(value)) | def writeValue(self, value): if isinstance(value, (str, unicode)): self.simpleElement("string", value) elif isinstance(value, bool): # must switch for bool before int, as bool is a # subclass of int... if value: self.simpleElement("true") else: self.simpleElement("false") elif isinstance(value, int): self.simpleElement("integer", str(value)) elif isinstance(value, float): # should perhaps use repr() for better precision? self.simpleElement("real", str(value)) elif isinstance(value, dict): self.writeDict(value) elif isinstance(value, Data): self.writeData(value) elif isinstance(value, Date): self.simpleElement("date", value.toString()) elif isinstance(value, (tuple, list)): self.writeArray(value) else: raise TypeError("unsuported type: %s" % type(value)) | 95387a18956b2ab60709a79aaa93cfddec8978d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/95387a18956b2ab60709a79aaa93cfddec8978d9/plistlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26727,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
261,
701,
16,
5252,
3719,
30,
365,
18,
9647,
1046,
2932,
1080,
3113,
460,
13,
1327,
1549,
12,
1132,
16,
1426,
4672,
468,
1297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26727,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
261,
701,
16,
5252,
3719,
30,
365,
18,
9647,
1046,
2932,
1080,
3113,
460,
13,
1327,
1549,
12,
1132,
16,
1426,
4672,
468,
1297,
... |
print "Fetching url", url | def fetch_url(inner, url, filename_rex): print "Fetching url", url opened = urllib2.urlopen(url) try: info = str(opened.info()) header = email.parser.Parser().parsestr(info, headersonly=True) filename = header.get_filename(None) groupdict = dict() if filename is not None: match = filename_rex.match(filename) if match is not None: groupdict = match.groupdict() reader = csv.DictReader(opened) for row in reader: event = events.Event() for key, value in groupdict.items(): if None in (key, value): continue event.add(key, value) for key, value in row.items(): if None in (key, value): continue key = util.guess_encoding(key).lower().strip() value = util.guess_encoding(value).strip() if not value or value == "-": continue event.add(key, value) yield inner.send(event) finally: yield opened.close() | d907d3c3d2f44594d48195e34d156c40d98316ef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14361/d907d3c3d2f44594d48195e34d156c40d98316ef/imapbot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
718,
12,
7872,
16,
880,
16,
1544,
67,
266,
92,
4672,
10191,
273,
11527,
22,
18,
295,
18589,
12,
718,
13,
225,
775,
30,
1123,
273,
609,
12,
25304,
18,
1376,
10756,
1446,
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,
2158,
67,
718,
12,
7872,
16,
880,
16,
1544,
67,
266,
92,
4672,
10191,
273,
11527,
22,
18,
295,
18589,
12,
718,
13,
225,
775,
30,
1123,
273,
609,
12,
25304,
18,
1376,
10756,
1446,
273... | |
print 'Scaled recombination at %.3f cM/Mb over %.2f Morgan genetic (%.2f Mb physical) distance (first chromosome)' % \ | print 'Scaled recombination at %.3f cM/Mb over %.2f centiMorgan genetic (%.2f Mb physical) distance (first chromosome)' % \ | def getOperators(pop, par, progress=False, vsp=False, visualization=False, mutation=False, migration=False, recombination=False, selection=False): '''Return mutation and recombination operators''' ops = [] if progress: # statistics calculation and display exp = ['gen %3d', 'size=%s'] preGen = 'gen*scale' postGen = '(gen+1)*scale-1' var = ['%s', 'subPopSize'] if len(par.ctrlLoci) > 0: exp.append('alleleFreq=%s') var.append('", ".join(["%%.3f" % alleleFreq[x][1] for x in ctrlLoci])') if len(par.pops) > 1: exp.append('Fst=%.3f') var.append('AvgFst') if vsp: exp.append('VSP=%s') var.append('virtualPopSize') if pop.dvars().stage == 'expand': keyGens = [par.initGen - 1, -1] elif pop.dvars().stage == 'mix': keyGens = [par.migrGen - 1, -1] ops.extend([ stat(popSize = True, alleleFreq = par.ctrlLociIdx, Fst = range(pop.totNumLoci()), step = par.step, stage=PreMating), pyEval(r'"At the beginning of %s\n" %% (%s)' % (', '.join(exp), ', '.join(var) % preGen), step=par.step, stage=PreMating), stat(popSize = True, alleleFreq = par.ctrlLociIdx, Fst = range(pop.totNumLoci()), at = keyGens), pyEval(r'"At the end of %s\n" %% (%s)' % (', '.join(exp), ', '.join(var) % postGen), at = keyGens) ]) if visualization and par.drawLDPlot and par.figureStep > 0 \ and len(par.ldRegions) > 0: ops.extend([ pyOperator(func=preDrawLDPlot, param = par, step=par.figureStep, stage=PreMating), pyOperator(func=postDrawLDPlot, param = par, at=[par.initGen - 1, -1]) ]) if mutation: ops.append(kamMutator(rate=par.mutaRate, loci=range(pop.totNumLoci()))) if migration and len(par.pops) > 1: ops.append(migrator(MigrIslandRates(par.backMigrRate, len(par.pops)))) if recombination: if par.recMap == 'physical': ops.append(recombinator(intensity=par.recIntensity, convProb=par.convProb, convMode=par.convMode, convParam=par.convParam)) print 'Scaled recombination at %.3f cM/Mb over %.2f Mb physical distance (first chromosome)' % \ (par.recIntensity * 100, pop.lociDist(0, pop.numLoci(0)-1)) else: # use map distance try: pos = [pop.dvars().genDist[pop.locusName(x)] for x in range(pop.totNumLoci())] except Exception,e: print e print 'Invalid or incomplete population variable genDist' print 'Please run loadHapMap again to set up genetic distance' loc = [] rate = [] for ch in range(pop.numChrom()): beg = pop.chromBegin(ch) end = pop.chromEnd(ch) loc.extend(range(beg, end - 1)) rate.extend([(pos[x+1] - pos[x])*par.recIntensity for x in range(beg, end - 1)]) print 'Scaled recombination at %.3f cM/Mb over %.2f Morgan genetic (%.2f Mb physical) distance (first chromosome)' % \ (par.recIntensity*100, (pop.dvars().genDist[pop.locusName(pop.numLoci(0)-1)] - \ pop.dvars().genDist[pop.locusName(0)]), pop.lociDist(0, pop.numLoci(0)-1)) # recombination rate at the end of each chromosome will be invalid # but this does not matter ops.append(recombinator(rate=rate, loci = loc, convProb=par.convProb, convMode=par.convMode, convParam=par.convParam)) if selection: if par.mlSelModel in [SEL_Additive, SEL_Multiplicative]: ops.append(mlSelector( # with five multiple-allele selector as parameter [ maSelector(locus=loci[x], wildtype=[0], fitness=[par.fitness[3*x], par.fitness[3*x+1], par.fitness[3*x+2]]) \ for x in range(len(par.ctrlLociIdx)) ], mode=par.mlSelModel)) elif par.mlSelModel == 'interaction': # multi-allele selector can handle multiple DSL case ops.append(maSelector(loci=par.ctrlLociIdx, fitness=par.fitness, wildtype=[0])) return ops | 68638d8d4dacd4181e5ecce7b041aaca167040dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/401/68638d8d4dacd4181e5ecce7b041aaca167040dd/simuAdmixture.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
24473,
12,
5120,
16,
779,
16,
4007,
33,
8381,
16,
331,
1752,
33,
8381,
16,
30056,
33,
8381,
16,
11934,
33,
8381,
16,
6333,
33,
8381,
16,
283,
9301,
1735,
33,
8381,
16,
4421,
33,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
24473,
12,
5120,
16,
779,
16,
4007,
33,
8381,
16,
331,
1752,
33,
8381,
16,
30056,
33,
8381,
16,
11934,
33,
8381,
16,
6333,
33,
8381,
16,
283,
9301,
1735,
33,
8381,
16,
4421,
33,... |
unit = u"m/s" | unit = u"MB/s" | def downloadRate(self): rate = 0 unit = u"k/s" if self.downloader is not None: rate = self.downloader.getRate() else: rate = 0 rate /= 1024 if rate > 1024: rate /= 1024 unit = u"m/s" if rate > 1024: rate /= 1024 unit = u"g/s" return u"%d%s" % (rate, unit) | b73ac8d7f80b534329ee28d651fa3e21d8948085 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/b73ac8d7f80b534329ee28d651fa3e21d8948085/item.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4224,
4727,
12,
2890,
4672,
4993,
273,
374,
2836,
273,
582,
6,
79,
19,
87,
6,
309,
365,
18,
2378,
6714,
353,
486,
599,
30,
4993,
273,
365,
18,
2378,
6714,
18,
588,
4727,
1435,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4224,
4727,
12,
2890,
4672,
4993,
273,
374,
2836,
273,
582,
6,
79,
19,
87,
6,
309,
365,
18,
2378,
6714,
353,
486,
599,
30,
4993,
273,
365,
18,
2378,
6714,
18,
588,
4727,
1435,
469,
... |
message = wx.MessageDialog(self, e.args[0], "Error", wx.OK|wx.ICON_ERROR) | message = wx.MessageDialog(self, result, "Error", wx.OK|wx.ICON_ERROR) | def OnOpenMenu(self, event): filepath = self.Manager.GetCurrentFilePath() if filepath != "": directory = os.path.dirname(filepath) else: directory = os.getcwd() dialog = wx.FileDialog(self, "Choose a file", directory, "", "OD files (*.od)|*.od|All files|*.*", wx.OPEN|wx.CHANGE_DIR) if dialog.ShowModal() == wx.ID_OK: filepath = dialog.GetPath() if os.path.isfile(filepath): result = self.Manager.OpenFileInCurrent(filepath) if type(result) == IntType: new_editingpanel = EditingPanel(self, self.Manager) new_editingpanel.SetIndex(result) self.FileOpened.AddPage(new_editingpanel, "") self.FileOpened.SetSelection(self.FileOpened.GetPageCount() - 1) if self.Manager.CurrentDS302Defined(): self.EditMenu.Enable(ID_OBJDICTEDITEDITMENUITEMS8, True) else: self.EditMenu.Enable(ID_OBJDICTEDITEDITMENUITEMS8, False) self.RefreshEditMenu() self.RefreshBufferState() self.RefreshProfileMenu() self.RefreshMainMenu() else: message = wx.MessageDialog(self, e.args[0], "Error", wx.OK|wx.ICON_ERROR) message.ShowModal() message.Destroy() dialog.Destroy() event.Skip() | 87f398ce19bd2f865180ec3f820f7a059bcd7678 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/116/87f398ce19bd2f865180ec3f820f7a059bcd7678/objdictedit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
3678,
4599,
12,
2890,
16,
871,
4672,
3608,
273,
365,
18,
1318,
18,
967,
3935,
5598,
1435,
309,
3608,
480,
1408,
30,
1867,
273,
1140,
18,
803,
18,
12287,
12,
10561,
13,
469,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
3678,
4599,
12,
2890,
16,
871,
4672,
3608,
273,
365,
18,
1318,
18,
967,
3935,
5598,
1435,
309,
3608,
480,
1408,
30,
1867,
273,
1140,
18,
803,
18,
12287,
12,
10561,
13,
469,
30,
... |
if not 'command' in kwargs: kwargs['command'] = ["python", "PerfConfigurator.py", "-v", "-e", self.exePath, "-c", self.configPath, "-t", self.title, "-b", self.branch, "-i", self.buildid] ShellCommand.__init__(self, **kwargs) | if 'addOptions' in kwargs: self.addOptions = kwargs['addOptions'] if not 'command' in kwargs: kwargs['command'] = ["python", "PerfConfigurator.py", "-v", "-e", self.exePath, "-t", self.title, "-b", self.branch, "-d", self.buildid, "-i", self.buildid] + self.addOptions ShellCommand.__init__(self, **kwargs) | def __init__(self, **kwargs): self.title = "default" self.branch = "" self.currentDate = "" if 'build' in kwargs: self.title = kwargs['build'].slavename self.changes = kwargs['build'].source.changes self.buildid = strftime("%Y%m%d%H%M", localtime(self.changes[0].when)) if 'branch' in kwargs: self.branch = kwargs['branch'] assert 'configPath' in kwargs assert 'executablePath' in kwargs self.configPath = kwargs['configPath'] self.exePath = kwargs['executablePath'] if not 'command' in kwargs: kwargs['command'] = ["python", "PerfConfigurator.py", "-v", "-e", self.exePath, "-c", self.configPath, "-t", self.title, "-b", self.branch, "-i", self.buildid] ShellCommand.__init__(self, **kwargs) | 8b5105b8fc52a98f78d160ee3e3efd78e8ede51a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/8b5105b8fc52a98f78d160ee3e3efd78e8ede51a/perfrunner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
4333,
4672,
365,
18,
2649,
273,
315,
1886,
6,
365,
18,
7500,
273,
1408,
365,
18,
2972,
1626,
273,
1408,
309,
296,
3510,
11,
316,
1205,
30,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
4333,
4672,
365,
18,
2649,
273,
315,
1886,
6,
365,
18,
7500,
273,
1408,
365,
18,
2972,
1626,
273,
1408,
309,
296,
3510,
11,
316,
1205,
30,
365,
1... |
warnings.warnpy3k("urllib.urlopen() has been removed in Python 3.0 in " "favor of urllib2.urlopen()", stacklevel=2) | warnpy3k("urllib.urlopen() has been removed in Python 3.0 in " "favor of urllib2.urlopen()", stacklevel=2) | def urlopen(url, data=None, proxies=None): """Create a file-like object for the specified URL to read from.""" from warnings import warnpy3k warnings.warnpy3k("urllib.urlopen() has been removed in Python 3.0 in " "favor of urllib2.urlopen()", stacklevel=2) global _urlopener if proxies is not None: opener = FancyURLopener(proxies=proxies) elif not _urlopener: opener = FancyURLopener() _urlopener = opener else: opener = _urlopener if data is None: return opener.open(url) else: return opener.open(url, data) | 28d9a2e48039995d4a1816edb6fca2542cead626 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/28d9a2e48039995d4a1816edb6fca2542cead626/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19613,
12,
718,
16,
501,
33,
7036,
16,
13263,
33,
7036,
4672,
3536,
1684,
279,
585,
17,
5625,
733,
364,
326,
1269,
1976,
358,
855,
628,
12123,
628,
5599,
1930,
1894,
2074,
23,
79,
1894... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19613,
12,
718,
16,
501,
33,
7036,
16,
13263,
33,
7036,
4672,
3536,
1684,
279,
585,
17,
5625,
733,
364,
326,
1269,
1976,
358,
855,
628,
12123,
628,
5599,
1930,
1894,
2074,
23,
79,
1894... |
print 'My status',self.status,status | def force_status(self,status,force=False): ''' Force job to enter the "failed" or "completed" state. This may be used for marking jobs "bad" jobs or jobs which are stuck in one of the internal ganga states (e.g. completing). | 084109779c044bb28a982fc46c73f2a830a8380c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/084109779c044bb28a982fc46c73f2a830a8380c/Job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2944,
67,
2327,
12,
2890,
16,
2327,
16,
5734,
33,
8381,
4672,
9163,
11889,
1719,
358,
6103,
326,
315,
7307,
6,
578,
315,
13615,
6,
919,
18,
1220,
2026,
506,
1399,
364,
24073,
6550,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2944,
67,
2327,
12,
2890,
16,
2327,
16,
5734,
33,
8381,
4672,
9163,
11889,
1719,
358,
6103,
326,
315,
7307,
6,
578,
315,
13615,
6,
919,
18,
1220,
2026,
506,
1399,
364,
24073,
6550,
315... | |
if skel is None and os.path.isdir(UsersController.groups.groups[pg_gid]['skel']): | if skel is None and \ os.path.isdir(UsersController.groups.groups[pg_gid]['skel']): | def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass).""" | 2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
1299,
12,
2890,
16,
1142,
529,
273,
599,
16,
1122,
529,
273,
599,
16,
2201,
273,
599,
16,
3354,
67,
1655,
33,
7036,
16,
3042,
33,
7036,
16,
4343,
292,
33,
7036,
16,
3925,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
1299,
12,
2890,
16,
1142,
529,
273,
599,
16,
1122,
529,
273,
599,
16,
2201,
273,
599,
16,
3354,
67,
1655,
33,
7036,
16,
3042,
33,
7036,
16,
4343,
292,
33,
7036,
16,
3925,
33,
... |
if self.key=='setuptools': | if self.key=='distribute': | def check_version_conflict(self): if self.key=='setuptools': return # ignore the inevitable setuptools self-conflicts :( | b2723a86bbbf1ab74f49c2849111464f50b8ce4a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/495/b2723a86bbbf1ab74f49c2849111464f50b8ce4a/pkg_resources.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1589,
67,
20340,
12,
2890,
4672,
309,
365,
18,
856,
18920,
2251,
887,
4278,
327,
1377,
468,
2305,
326,
316,
14965,
9085,
444,
30693,
365,
17,
20340,
87,
225,
294,
12,
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,
866,
67,
1589,
67,
20340,
12,
2890,
4672,
309,
365,
18,
856,
18920,
2251,
887,
4278,
327,
1377,
468,
2305,
326,
316,
14965,
9085,
444,
30693,
365,
17,
20340,
87,
225,
294,
12,
2,
-100,... |
self.flyoutToolbar.CompareProteinsAction.setChecked(False) | self.flyoutToolbar.compareProteinsAction.setChecked(False) | def restore_gui(self): """ Restore the GUI """ EditCommand.restore_gui(self) if self.flyoutToolbar: self.flyoutToolbar.CompareProteinsAction.setChecked(False) | 91480d2ff1b90718c8e377fb9a0a42543f11976d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/91480d2ff1b90718c8e377fb9a0a42543f11976d/CompareProteins_Command.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
67,
20292,
12,
2890,
4672,
3536,
11197,
326,
10978,
3536,
15328,
2189,
18,
13991,
67,
20292,
12,
2890,
13,
309,
365,
18,
29670,
659,
17907,
30,
365,
18,
29670,
659,
17907,
18,
9877... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
67,
20292,
12,
2890,
4672,
3536,
11197,
326,
10978,
3536,
15328,
2189,
18,
13991,
67,
20292,
12,
2890,
13,
309,
365,
18,
29670,
659,
17907,
30,
365,
18,
29670,
659,
17907,
18,
9877... |
for iface in for_: if iface is not None: _context.action( discriminator = None, callable = provideInterface, args = ('', iface) ) | _context.action( discriminator = None, callable = provideInterface, args = ('', for_) ) | def defaultView(_context, type, name, for_): _context.action( discriminator = ('defaultViewName', for_, type, name), callable = handler, args = (zapi.servicenames.Adapters, 'register', (for_, type), IDefaultViewName, '', name, _context.info) ) _context.action( discriminator = None, callable = provideInterface, args = ('', type) ) for iface in for_: if iface is not None: _context.action( discriminator = None, callable = provideInterface, args = ('', iface) ) | ddf557d81439cbd594f1e94302f57bb52f2a1741 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9537/ddf557d81439cbd594f1e94302f57bb52f2a1741/metaconfigure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
1767,
24899,
2472,
16,
618,
16,
508,
16,
364,
67,
4672,
225,
389,
2472,
18,
1128,
12,
15819,
273,
7707,
1886,
27146,
2187,
364,
67,
16,
618,
16,
508,
3631,
4140,
273,
1838,
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,
805,
1767,
24899,
2472,
16,
618,
16,
508,
16,
364,
67,
4672,
225,
389,
2472,
18,
1128,
12,
15819,
273,
7707,
1886,
27146,
2187,
364,
67,
16,
618,
16,
508,
3631,
4140,
273,
1838,
16,
... |
except IndexError: | except IndexError, ValueError: | def drop(self): """Remove me from the list of running bots processes.""" self.checktime = 0 processes = {} try: f = open(self.logfn(), 'r') except IOError: return else: now = time.time() for line in f.readlines(): try: line = line.split(' ') pid = int(line[0]) ptime = int(line[1].split('.')[0]) except IndexError: # I go a lot of crontab errors because line is not a number. # Better to prevent that. If you find out the error, feel free # to fix it better. pid = 1 ptime = time.time() if now - ptime <= self.releasepid and pid != self.pid: processes[pid] = ptime f = open(self.logfn(), 'w') for p in processes.keys(): f.write(str(p)+' '+str(processes[p])+'\n') f.close() | 1d8a172f1878ff4e99c52b719c322b445d546547 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/1d8a172f1878ff4e99c52b719c322b445d546547/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3640,
12,
2890,
4672,
3536,
3288,
1791,
628,
326,
666,
434,
3549,
2512,
87,
8488,
12123,
365,
18,
1893,
957,
273,
374,
8488,
273,
2618,
775,
30,
284,
273,
1696,
12,
2890,
18,
1330,
429... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3640,
12,
2890,
4672,
3536,
3288,
1791,
628,
326,
666,
434,
3549,
2512,
87,
8488,
12123,
365,
18,
1893,
957,
273,
374,
8488,
273,
2618,
775,
30,
284,
273,
1696,
12,
2890,
18,
1330,
429... |
self.InsertStringItem(i, "") | self.InsertStringItem(i, "") | def setAverageIntensities(self, avgIntList): self.avgIntList = avgIntList for i, avgint in enumerate(avgIntList): if self.GetItemCount() < i: self.InsertStringItem(i, "") self.SetStringItem(i, 4, "%.3f" % (avgint)) self.Refresh() | 6d7b572696d4ecdce2049b45a6e109836f3272c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/6d7b572696d4ecdce2049b45a6e109836f3272c9/SegmentationFilters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
17115,
1702,
21970,
12,
2890,
16,
11152,
1702,
682,
4672,
365,
18,
14141,
1702,
682,
273,
11152,
1702,
682,
364,
277,
16,
11152,
474,
316,
4241,
12,
14141,
1702,
682,
4672,
309,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
17115,
1702,
21970,
12,
2890,
16,
11152,
1702,
682,
4672,
365,
18,
14141,
1702,
682,
273,
11152,
1702,
682,
364,
277,
16,
11152,
474,
316,
4241,
12,
14141,
1702,
682,
4672,
309,
365... |
print >> sys.stderr, self.table['process'] | def set_dn(self,dn): """ Use the domain column in the process table to store the DN | 86bdb81cea8cdc15d13d0b7a6ab3f6139ce67d84 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/86bdb81cea8cdc15d13d0b7a6ab3f6139ce67d84/ldbd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
5176,
12,
2890,
16,
5176,
4672,
3536,
2672,
326,
2461,
1057,
316,
326,
1207,
1014,
358,
1707,
326,
18001,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
5176,
12,
2890,
16,
5176,
4672,
3536,
2672,
326,
2461,
1057,
316,
326,
1207,
1014,
358,
1707,
326,
18001,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
else: | return if mapped[1] != uri: | def addprefix(self, prefix, uri): """ Add I{static} mapping of an XML namespace prefix to a namespace. This is useful for cases when a wsdl and referenced schemas make heavy use of namespaces and those namespaces are subject to changed. @param prefix: An XML namespace prefix. @type prefix: str @param uri: An XML namespace URI. @type prefix: str @raise Exception: when prefix is already mapped. """ root = self.wsdl.root mapped = root.resolvePrefix(prefix, None) if mapped is None: root.addPrefix(prefix, uri) else: raise Exception('"%s" already mapped as "%s"' % (prefix, mapped)) | 2061000a93b0140d903f07c79a789421a6741d50 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5930/2061000a93b0140d903f07c79a789421a6741d50/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
3239,
12,
2890,
16,
1633,
16,
2003,
4672,
3536,
1436,
467,
95,
3845,
97,
2874,
434,
392,
3167,
1981,
1633,
358,
279,
1981,
18,
1220,
353,
5301,
364,
6088,
1347,
279,
17642,
471,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
3239,
12,
2890,
16,
1633,
16,
2003,
4672,
3536,
1436,
467,
95,
3845,
97,
2874,
434,
392,
3167,
1981,
1633,
358,
279,
1981,
18,
1220,
353,
5301,
364,
6088,
1347,
279,
17642,
471,
8... |
except: return 0 | except IOError: return 0 except ValueError: return 1 | def inUse(device): l = LOOP(device) try: l._getInfo() except: return 0 return 1 | fd1625ecdd17ced116fb7fe0737e3ed4ba9353a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/fd1625ecdd17ced116fb7fe0737e3ed4ba9353a4/loop.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
3727,
12,
5964,
4672,
328,
273,
1806,
3665,
12,
5964,
13,
775,
30,
328,
6315,
588,
966,
1435,
1335,
8340,
30,
327,
374,
1335,
2068,
30,
225,
327,
404,
327,
404,
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,
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,
316,
3727,
12,
5964,
4672,
328,
273,
1806,
3665,
12,
5964,
13,
775,
30,
328,
6315,
588,
966,
1435,
1335,
8340,
30,
327,
374,
1335,
2068,
30,
225,
327,
404,
327,
404,
2,
-100,
-100,
-... |
static files. Since the leading dot may be inconvenient for Windows users, you can enter another prefix (such as "_") to replace the dot.''' do_prompt(d, 'dot', 'Name prefix for templates and static dir', '.', ok) | static files. You can enter another prefix (such as "_") to replace the dot.''' do_prompt(d, 'dot', 'Name prefix for templates and static dir', '.', ok) | def inner_main(args): d = {} if not sys.stdout.isatty() or not color_terminal(): nocolor() print bold('Welcome to the Sphinx quickstart utility.') print ''' | 244c83a339d587af68eb945426a2e843a0adb289 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/244c83a339d587af68eb945426a2e843a0adb289/quickstart.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3443,
67,
5254,
12,
1968,
4672,
302,
273,
2618,
225,
309,
486,
2589,
18,
10283,
18,
291,
270,
4098,
1435,
578,
486,
2036,
67,
15979,
13332,
30601,
355,
280,
1435,
225,
1172,
13068,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3443,
67,
5254,
12,
1968,
4672,
302,
273,
2618,
225,
309,
486,
2589,
18,
10283,
18,
291,
270,
4098,
1435,
578,
486,
2036,
67,
15979,
13332,
30601,
355,
280,
1435,
225,
1172,
13068,
2668,... |
Package.statuscodeid!= \ | Package.statuscode!= \ | def package(self, searchon='both', release=0, operator='AND', searchwords=''): '''Searches for packages | 56962ff36e697d7dd834bc1f6d4460cc377d307f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9953/56962ff36e697d7dd834bc1f6d4460cc377d307f/search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2181,
12,
2890,
16,
1623,
265,
2218,
18237,
2187,
3992,
33,
20,
16,
3726,
2218,
4307,
2187,
1623,
3753,
2218,
11,
4672,
9163,
16294,
364,
5907,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
2181,
12,
2890,
16,
1623,
265,
2218,
18237,
2187,
3992,
33,
20,
16,
3726,
2218,
4307,
2187,
1623,
3753,
2218,
11,
4672,
9163,
16294,
364,
5907,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.glade = gtk.glade.XML("jhbuild.glade") | glade_filename = get_glade_filename() self.glade = gtk.glade.XML(glade_filename) | def _createWindow(self): self.glade = gtk.glade.XML("jhbuild.glade") self.window = self.glade.get_widget("BuildWindow") self.build_progress = self.glade.get_widget("BuildProgressBar") self.build_text_view = self.glade.get_widget("BuildText") self.current_status_label = self.glade.get_widget("CurrentStatusLabel") self.pause_button = self.glade.get_widget("BuildPauseButton") self.cancel_button = self.glade.get_widget("BuildCancelButton") #self.expander_button = self.glade.get_widget("ExpanderButton") #self.expander_arrow = self.glade.get_widget("ExpanderArrow") | 9eddf9ae1dc2d293eea332229628cafe32867433 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/9eddf9ae1dc2d293eea332229628cafe32867433/gtk_buildscript.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
3829,
12,
2890,
4672,
5118,
2486,
67,
3459,
273,
336,
67,
7043,
2486,
67,
3459,
1435,
365,
18,
7043,
2486,
273,
22718,
18,
7043,
2486,
18,
4201,
12,
7043,
2486,
67,
3459,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
3829,
12,
2890,
4672,
5118,
2486,
67,
3459,
273,
336,
67,
7043,
2486,
67,
3459,
1435,
365,
18,
7043,
2486,
273,
22718,
18,
7043,
2486,
18,
4201,
12,
7043,
2486,
67,
3459,
13... |
sage: p.coeffs() | sage: p.coefficients() | def coeffs(self, x=None): r""" Coefficients of \code{self} as a polynomial in x. | 88ff2d07f85457f450fa2570c5fb9a41657d2974 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/88ff2d07f85457f450fa2570c5fb9a41657d2974/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16530,
12,
2890,
16,
619,
33,
7036,
4672,
436,
8395,
7695,
73,
12344,
434,
521,
710,
95,
2890,
97,
487,
279,
16991,
316,
619,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16530,
12,
2890,
16,
619,
33,
7036,
4672,
436,
8395,
7695,
73,
12344,
434,
521,
710,
95,
2890,
97,
487,
279,
16991,
316,
619,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.GetAttributeValue(item, attributeName)) | pim.shortDateFormat.format(value)) def changeRecurrenceEnd(self, item, newEndValue): item.untilIsDate = True item.until = value self.AttributeChanged() wx.CallAfter(changeRecurrenceEnd, self, item, value) | def SetAttributeValue(self, item, attributeName, valueString): eventTZ = item.startTime.tzinfo if attributeName != 'until': attributeName = 'until' try: item = item.rruleset.rrules.first() except AttributeError: assert False, "Hey - Setting 'ends' on an event without a recurrence rule?" # If the user removed the string, remove the attribute. newValueString = valueString.replace('?','').strip() if len(newValueString) == 0 and hasattr(item, 'until'): del item.until else: try: oldValue = getattr(item, attributeName, None) dateValue = pim.shortDateFormat.parse(newValueString, referenceDate=oldValue) except (ICUError, ValueError): self._changeTextQuietly(self.control, "%s ?" % newValueString) return | 426840e720b17c6caa7271e065b5969f943021db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/426840e720b17c6caa7271e065b5969f943021db/Detail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
14942,
12,
2890,
16,
761,
16,
9734,
16,
24998,
4672,
871,
21647,
273,
761,
18,
1937,
950,
18,
12994,
1376,
225,
309,
9734,
480,
296,
12198,
4278,
9734,
273,
296,
12198,
11,
775,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
14942,
12,
2890,
16,
761,
16,
9734,
16,
24998,
4672,
871,
21647,
273,
761,
18,
1937,
950,
18,
12994,
1376,
225,
309,
9734,
480,
296,
12198,
4278,
9734,
273,
296,
12198,
11,
775,
... |
def tally(*args): return _micropolisengine.Micropolis_tally(*args) def checkSize(*args): return _micropolisengine.Micropolis_checkSize(*args) | def tally(*args): return _micropolisengine.Micropolis_tally(*args) | 51c1a80956cfc78db6493cfdc0fad27b39c4280a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12485/51c1a80956cfc78db6493cfdc0fad27b39c4280a/micropolisengine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
1230,
30857,
1968,
4672,
327,
389,
27593,
1764,
355,
291,
8944,
18,
49,
335,
1764,
355,
291,
67,
88,
1230,
30857,
1968,
13,
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,
268,
1230,
30857,
1968,
4672,
327,
389,
27593,
1764,
355,
291,
8944,
18,
49,
335,
1764,
355,
291,
67,
88,
1230,
30857,
1968,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
2) 'group" or P2IT.PROFILE (2) for a profile | 2) 'group' or P2IT.PROFILE (2) for a profile | def getMyMenuTarget(self, uuid, target_type): """ get a target's boot menu and configuration it can come from the target itself, or from it's profile if it's a computer, or from it's entity whatever it is. | f92ceeba4937d7650685e4df7ba272f835343770 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/f92ceeba4937d7650685e4df7ba272f835343770/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
93,
4599,
2326,
12,
2890,
16,
3822,
16,
1018,
67,
723,
4672,
3536,
336,
279,
1018,
1807,
4835,
3824,
471,
1664,
518,
848,
12404,
628,
326,
1018,
6174,
16,
578,
628,
518,
1807,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
93,
4599,
2326,
12,
2890,
16,
3822,
16,
1018,
67,
723,
4672,
3536,
336,
279,
1018,
1807,
4835,
3824,
471,
1664,
518,
848,
12404,
628,
326,
1018,
6174,
16,
578,
628,
518,
1807,
30... |
cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else crontab -l | ' \ + 'sed \'/start_seattle.sh/d\' > /tmp/seattle_crontab_removal && ' \ + 'crontab /tmp/seattle_crontab_removal && ' \ + 'rm /tmp/seattle_crontab_removal; fi' + os.linesep | if platform.system() == "FreeBSD": cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else ' \ + 'tempconrtab=`mktemp -t tempcrontab` && crontab -l | sed ' \ + '\'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep else: cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else tempconrtab=`mktemp` && ' \ + 'crontab -l | sed \'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep | def add_seattle_to_crontab(): """ <Purpose> Adds an entry to the crontab to run seattle automatically at boot. <Arguments> None. <Exceptions> OSError if cron is not installed on this system. <Side Effects> Adds an entry to the crontab. <Returns> True if an entry for seattle was successfully added to the crontab, False otherwise. """ # Check to see if the crontab has already been modified to run seattle. crontab_contents_stdout,crontab_contents_stderr = \ subprocess.Popen(["crontab", "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() if get_starter_file_name() in crontab_contents_stdout: raise AlreadyInstalledError("An entry for seattle was already detected " \ + "in the crontab.") # Since seattle is not already installed, modify crontab to run seattle at # boot. # Get the service vessel where standard error produced from cron will be # written. service_vessel = servicelogger.get_servicevessel() cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else crontab -l | ' \ + 'sed \'/start_seattle.sh/d\' > /tmp/seattle_crontab_removal && ' \ + 'crontab /tmp/seattle_crontab_removal && ' \ + 'rm /tmp/seattle_crontab_removal; fi' + os.linesep # Generate a temp file with the user's crontab plus our task. temp_crontab_file = tempfile.NamedTemporaryFile() temp_crontab_file.write(crontab_contents_stdout) temp_crontab_file.write(cron_line_entry) temp_crontab_file.flush() # Now, replace the crontab with that temp file and remove(close) the # tempfile. replace_crontab = subprocess.Popen(["crontab",temp_crontab_file.name], stdout=subprocess.PIPE, stderr=subprocess.PIPE) replace_crontab.wait() temp_crontab_file.close() # Finally, confirm that seattle was successfully added to the crontab and note # the result in the configuration file ('nodeman.cfg'). config = persist.restore_object('nodeman.cfg') crontab_contents_stdout,crontab_contents_stderr = \ subprocess.Popen(["crontab", "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() if get_starter_file_name() in crontab_contents_stdout: config['crontab_updated_for_2009_installer'] = True persist.commit_object(config,'nodeman.cfg') return True else: # Although the default setting for # config['crontab_updated_for_2009_installer'] = False, it should still be # set in the event that there was a previous installer which set this value # to True, but now for whatever reason, installation in the crontab failed. config['crontab_updated_for_2009_installer'] = False persist.commit_object(config,'nodeman.cfg') return False | 77e602aea360b67ee347bb157c15b2538cd3e0d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/77e602aea360b67ee347bb157c15b2538cd3e0d1/seattleinstaller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
307,
4558,
298,
67,
869,
67,
3353,
30335,
13332,
3536,
411,
10262,
4150,
34,
15605,
392,
1241,
358,
326,
4422,
30335,
358,
1086,
695,
4558,
298,
6635,
622,
4835,
18,
225,
411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
307,
4558,
298,
67,
869,
67,
3353,
30335,
13332,
3536,
411,
10262,
4150,
34,
15605,
392,
1241,
358,
326,
4422,
30335,
358,
1086,
695,
4558,
298,
6635,
622,
4835,
18,
225,
411,
... |
self.content = u'' | self.content = content | def __init__(self, thread_id, id, title, sender, date=None, reply_id=''): self.thread_id = unicode(thread_id) self.id = unicode(id) self.reply_id = unicode(reply_id) self.title = unicode(title) self.sender = unicode(sender) | 7cdf5060ae7313179156f2332dbc72bd421b612e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/7cdf5060ae7313179156f2332dbc72bd421b612e/messages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2650,
67,
350,
16,
612,
16,
2077,
16,
5793,
16,
1509,
33,
7036,
16,
4332,
67,
350,
2218,
11,
4672,
365,
18,
5930,
67,
350,
273,
5252,
12,
5930,
67,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2650,
67,
350,
16,
612,
16,
2077,
16,
5793,
16,
1509,
33,
7036,
16,
4332,
67,
350,
2218,
11,
4672,
365,
18,
5930,
67,
350,
273,
5252,
12,
5930,
67,
3... |
if p.is_earlybird(registration.last_modification_timestamp): | if p.is_earlybird(registration.creation_timestamp): | def pay(self, id): registration = self.obj if registration.person.invoices: if registration.person.invoices[0].good_payments or registration.person.invoices[0].bad_payments: redirect_to("/Errors/InvoiceAlreadyPaid") invoice = registration.person.invoices[0] for ii in invoice.items: self.dbsession.delete(ii) else: invoice = model.Invoice() invoice.person = registration.person | bc7091026e3bc4f0a6f0c48228e7bcacf991f906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12856/bc7091026e3bc4f0a6f0c48228e7bcacf991f906/registration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8843,
12,
2890,
16,
612,
4672,
7914,
273,
365,
18,
2603,
309,
7914,
18,
12479,
18,
5768,
17725,
30,
309,
7914,
18,
12479,
18,
5768,
17725,
63,
20,
8009,
19747,
67,
10239,
1346,
578,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8843,
12,
2890,
16,
612,
4672,
7914,
273,
365,
18,
2603,
309,
7914,
18,
12479,
18,
5768,
17725,
30,
309,
7914,
18,
12479,
18,
5768,
17725,
63,
20,
8009,
19747,
67,
10239,
1346,
578,
79... |
mode = self._do_get_mode(query=False) if mode not in self._modes: logging.warning(__name__ + ' : Invalid mode %s, assuming current' % mode) mode = self._do_get_mode(query=False) | mode = self.get_mode(query=False) if mode not in self._modes: logging.warning(__name__ + ' : Invalid mode %s, assuming current' % mode) mode = self.get_mode(query=False) | def _do_set_digits(self, val, mode=None): ''' Set digits to the specified value ?? Which values are alowed? If mode=None the current mode is assumed | e225b63fff98abc004b966fd48b18f5af744fb7d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6471/e225b63fff98abc004b966fd48b18f5af744fb7d/Keithley_2700.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
542,
67,
16649,
12,
2890,
16,
1244,
16,
1965,
33,
7036,
4672,
9163,
1000,
6815,
358,
326,
1269,
460,
5317,
21918,
924,
854,
279,
3788,
35,
971,
1965,
33,
7036,
326,
783,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
542,
67,
16649,
12,
2890,
16,
1244,
16,
1965,
33,
7036,
4672,
9163,
1000,
6815,
358,
326,
1269,
460,
5317,
21918,
924,
854,
279,
3788,
35,
971,
1965,
33,
7036,
326,
783,... |
kernelpkgs = ["kernel", "kernel-smp", "kernel-bigmem", "kernel-enterprise", "kernel-xen0", "kernel-xenU", "kernel-xen", "kernel-PAE", "kernel-kdump", "kernel-BOOT", "kernel-hugemem", "kernel-largesmp", "kernel-summit"] | kernelpkgs = ["kernel", "kernel-PAE", "kernel-bigmem", "kernel-enterprise", "kernel-hugemem", "kernel-summit", "kernel-smp", "kernel-largesmp", "kernel-xen", "kernel-xen0", "kernel-xenU", "kernel-kdump", "kernel-BOOT"] | def isErasePreReq(x): return (x & _ERASE_ONLY_MASK) != 0 | b0b2fa3d91c7325bf8426a8f3d905c859fbb35d9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/b0b2fa3d91c7325bf8426a8f3d905c859fbb35d9/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
41,
5648,
1386,
6113,
12,
92,
4672,
327,
261,
92,
473,
389,
654,
4429,
67,
10857,
67,
11704,
13,
480,
374,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
353,
41,
5648,
1386,
6113,
12,
92,
4672,
327,
261,
92,
473,
389,
654,
4429,
67,
10857,
67,
11704,
13,
480,
374,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
global TEST_WORK_FILENAME | assert 'test' in weblib_path | def setUp(self): global TEST_WORK_FILENAME ## todo: move to some util? from minds.weblib import store # rewire store to use the working copy of test weblib.dat TEST_PATHNAME = testpath/'test_weblib/weblib.dat' # TODO: now that we have testdata directory, don't need to call it weblib.work.dat anymore. # TODO: clean up TEST_WORK_FILENAME = 'weblib.work.dat' weblib_path = testcfg.getpath('weblib') TEST_PATHNAME.copy(weblib_path/TEST_WORK_FILENAME) print >>sys.stderr, TEST_PATHNAME, weblib_path/TEST_WORK_FILENAME, '##',testcfg.getpath('weblib') store.useMainBm(TEST_WORK_FILENAME) | 5324257d785e199da4d560a64b880119d3dfb5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2355/5324257d785e199da4d560a64b880119d3dfb5a6/test_weblib_cgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
2552,
22130,
67,
10566,
67,
16080,
7541,
10621,
30,
3635,
358,
2690,
1709,
35,
628,
312,
15882,
18,
4875,
2941,
1930,
1707,
468,
283,
14538,
1707,
358,
999,
326,
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,
24292,
12,
2890,
4672,
2552,
22130,
67,
10566,
67,
16080,
7541,
10621,
30,
3635,
358,
2690,
1709,
35,
628,
312,
15882,
18,
4875,
2941,
1930,
1707,
468,
283,
14538,
1707,
358,
999,
326,
5... |
pass | pass | def DefaultHandlerExpand(self, userData): pass | 0f71000645566dbe734440e44a39b9a57c6972bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/0f71000645566dbe734440e44a39b9a57c6972bd/anim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2989,
1503,
12271,
12,
2890,
16,
13530,
4672,
1342,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2989,
1503,
12271,
12,
2890,
16,
13530,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
run_command(['git', 'commit', '--all', '-F', '-'], input=message) | self.run(['git', 'commit', '--all', '-F', '-'], input=message) | def commit_locally_with_message(self, message): run_command(['git', 'commit', '--all', '-F', '-'], input=message) | 85996a2e77defe11a90714e19a7eb1523a0e8092 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/85996a2e77defe11a90714e19a7eb1523a0e8092/scm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
67,
1829,
1230,
67,
1918,
67,
2150,
12,
2890,
16,
883,
4672,
1086,
67,
3076,
12,
3292,
6845,
2187,
296,
7371,
2187,
3534,
454,
2187,
2400,
42,
2187,
2400,
17337,
810,
33,
2150,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
67,
1829,
1230,
67,
1918,
67,
2150,
12,
2890,
16,
883,
4672,
1086,
67,
3076,
12,
3292,
6845,
2187,
296,
7371,
2187,
3534,
454,
2187,
2400,
42,
2187,
2400,
17337,
810,
33,
2150,
1... |
self._window.Bind(wx.EVT_CHECKBOX, self.onSetPositionIsFixed) | self._window.Bind(wx.EVT_CHECKBOX, self.onSetPositionIsFixed, self.fixedPositionCheckBox) | def window(self, parentWindow=None): if not hasattr(self, '_window'): self._window = wx.Window(parentWindow, wx.ID_ANY) gridSizer = wx.FlexGridSizer(3, 2, 8, 8) # Add a color picker for our fill color. self._colorPicker = wx.lib.colourselect.ColourSelect(self._window, wx.ID_ANY) self._window.Bind(wx.lib.colourselect.EVT_COLOURSELECT, self.onSetColor, self._colorPicker) gridSizer.Add(wx.StaticText(self._window, wx.ID_ANY, gettext('Color:')), 0) gridSizer.Add(self._colorPicker, 1) # Add a slider for setting the opacity. self._opacitySlider = wx.Slider(self._window, wx.ID_ANY, 100, 0, 100) self._opacitySlider.Bind(wx.EVT_SCROLL, self.onSetOpacity, self._opacitySlider) gridSizer.Add(wx.StaticText(self._window, wx.ID_ANY, gettext('Opacity:')), 0) gridSizer.Add(self._opacitySlider, 1) # Add a check box for fixing the position. self.fixedPositionCheckBox = wx.CheckBox(self._window, wx.ID_ANY, gettext('Fixed'), style=wx.CHK_3STATE) self._window.Bind(wx.EVT_CHECKBOX, self.onSetPositionIsFixed) gridSizer.Add(wx.StaticText(self._window, wx.ID_ANY, gettext('Position:')), 0) gridSizer.Add(self.fixedPositionCheckBox, 1) # Add a check box for fixing the size. self.fixedSizeCheckBox = wx.CheckBox(self._window, wx.ID_ANY, gettext('Fixed'), style=wx.CHK_3STATE) self._window.Bind(wx.EVT_CHECKBOX, self.onSetSizeIsFixed) gridSizer.Add(wx.StaticText(self._window, wx.ID_ANY, gettext('Size:')), 0) gridSizer.Add(self.fixedSizeCheckBox, 1) # Add a slider for setting the arrangement weight within our parent. self._arrangedWeightSlider = wx.Slider(self._window, wx.ID_ANY, 50, 1, 100) self._arrangedWeightSlider.Bind(wx.EVT_SCROLL, self.onSetArrangedWeight) gridSizer.Add(wx.StaticText(self._window, wx.ID_ANY, gettext('Arranged weight:')), 0) gridSizer.Add(self._arrangedWeightSlider, 1) # Add a pop-up for choosing the child arrangement. self._arrangedAxisChoice = wx.Choice(self._window, wx.ID_ANY) self._arrangedAxisChoice.Append(gettext('None'), None) self._arrangedAxisChoice.Append(gettext('Largest'), 'largest') self._arrangedAxisChoice.Append(gettext('X'), 'X') self._arrangedAxisChoice.Append(gettext('Y'), 'Y') self._arrangedAxisChoice.Append(gettext('Z'), 'Z') self._multipleArrangedAxesId = wx.NOT_FOUND gridSizer.Add(wx.StaticText(self._window, wx.ID_ANY, gettext('Arrange children along axis:')), 0) gridSizer.Add(self._arrangedAxisChoice, 0) parentWindow.Bind(wx.EVT_CHOICE, self.onSetArrangedAxis, self._arrangedAxisChoice) # Add a slider for setting the arrangement spacing. self._arrangedSpacingSlider = wx.Slider(self._window, wx.ID_ANY, 20, 0, 249, style=wx.SL_HORIZONTAL) self._arrangedSpacingSlider.Bind(wx.EVT_SCROLL, self.onSetArrangedSpacing, self._arrangedSpacingSlider) gridSizer.Add(wx.StaticText(self._window, wx.ID_ANY, gettext('Arranged spacing:')), 0) gridSizer.Add(self._arrangedSpacingSlider, 1) # Add a pop-up for choosing the shape. self._shapeChoice = wx.Choice(self._window, wx.ID_ANY) for geometryName in sorted(Visible.geometries.keys()): self._shapeChoice.Append(gettext(geometryName), geometryName) self._shapeChoice.Append(gettext('none'), None) self._multipleShapesId = wx.NOT_FOUND gridSizer.Add(wx.StaticText(self._window, wx.ID_ANY, gettext('Shape:')), 0) gridSizer.Add(self._shapeChoice, 0) parentWindow.Bind(wx.EVT_CHOICE, self.onSetShape, self._shapeChoice) # TODO: label, opacity, ??? mainSizer = wx.BoxSizer(wx.VERTICAL) mainSizer.Add(gridSizer, 1, wx.ALL, 5) self._window.SetSizer(mainSizer) return self._window | f69914898c9043d937a13e7a85ee40eba21d12c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6368/f69914898c9043d937a13e7a85ee40eba21d12c3/VisibleInspector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2742,
12,
2890,
16,
982,
3829,
33,
7036,
4672,
309,
486,
3859,
12,
2890,
16,
2070,
5668,
11,
4672,
365,
6315,
5668,
273,
7075,
18,
3829,
12,
2938,
3829,
16,
7075,
18,
734,
67,
15409,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2742,
12,
2890,
16,
982,
3829,
33,
7036,
4672,
309,
486,
3859,
12,
2890,
16,
2070,
5668,
11,
4672,
365,
6315,
5668,
273,
7075,
18,
3829,
12,
2938,
3829,
16,
7075,
18,
734,
67,
15409,
... |
<tr><td class='banner'> Spambayes Proxy, %s. | <tr><td class='banner'> <a href='/'>Spambayes Proxy</a>, %s. | def __init__(self, uiPort, bayes): uiArgs = (bayes,) Listener.__init__(self, uiPort, UserInterface, uiArgs) | 687201dd0422d531b52815cedabcca48f312f1ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/687201dd0422d531b52815cedabcca48f312f1ba/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5915,
2617,
16,
324,
528,
281,
4672,
5915,
2615,
273,
261,
70,
528,
281,
16,
13,
10652,
16186,
2738,
972,
12,
2890,
16,
5915,
2617,
16,
21369,
16,
5915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5915,
2617,
16,
324,
528,
281,
4672,
5915,
2615,
273,
261,
70,
528,
281,
16,
13,
10652,
16186,
2738,
972,
12,
2890,
16,
5915,
2617,
16,
21369,
16,
5915,
... |
info['url'] = self.action and self.action( ec ) or '' | action_obj = self._getActionObject() info['url'] = action_obj and action_obj( ec ) or '' | def getAction( self, ec ): | 9c813e7bf58deb2e2aa054630ab8f2455a9d9592 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/9c813e7bf58deb2e2aa054630ab8f2455a9d9592/ActionInformation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12473,
12,
365,
16,
6557,
262,
30,
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,
12473,
12,
365,
16,
6557,
262,
30,
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,
... |
This creates a working copy of the dictionary and of the | This creates a copy of the dictionary and of the | def copy(self): """ Return a copy of the segmentlistdict object. The return value is a new object with a new offsets attribute, with references to the original keys, and shallow copies of the segment lists. Modifications made to the offset dictionary or segmentlists in the object returned by this method will not affect the original, but without using much memory until such modifications are made. | 94ebfecbf6806091cec669a5713bf3bd0e6acd69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3589/94ebfecbf6806091cec669a5713bf3bd0e6acd69/segments.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
4672,
3536,
2000,
279,
1610,
434,
326,
3267,
1098,
1576,
733,
18,
225,
1021,
327,
460,
353,
279,
394,
733,
598,
279,
394,
8738,
1566,
16,
598,
5351,
358,
326,
2282,
131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
4672,
3536,
2000,
279,
1610,
434,
326,
3267,
1098,
1576,
733,
18,
225,
1021,
327,
460,
353,
279,
394,
733,
598,
279,
394,
8738,
1566,
16,
598,
5351,
358,
326,
2282,
131... |
import _winreg from _winreg import HKEY_LOCAL_MACHINE try: pathname = _winreg.QueryValueEx(HKEY_LOCAL_MACHINE, \ "Software\\Python\\PythonCore\\%s\\Modules\\%s" % (sys.winver, name)) fp = open(pathname, "rb") stuff = "", "rb", imp.C_EXTENSION return fp, pathname, stuff except _winreg.error: pass | result = _try_registry(name) if result: return result | def find_module(self, name, path): if name in self.excludes: self.msgout(3, "find_module -> Excluded") raise ImportError, name | f76d2492b70d1f6611db7cb5cfdcbd539957f4e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f76d2492b70d1f6611db7cb5cfdcbd539957f4e9/modulefinder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
2978,
12,
2890,
16,
508,
16,
589,
4672,
309,
508,
316,
365,
18,
338,
8993,
30,
365,
18,
3576,
659,
12,
23,
16,
315,
4720,
67,
2978,
317,
1312,
7908,
7923,
1002,
11308,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
2978,
12,
2890,
16,
508,
16,
589,
4672,
309,
508,
316,
365,
18,
338,
8993,
30,
365,
18,
3576,
659,
12,
23,
16,
315,
4720,
67,
2978,
317,
1312,
7908,
7923,
1002,
11308,
16,
... |
u, h = line.strip().split(':') | line = line.strip() if not line: continue try: u, h = line.split(':') except ValueError: print >>sys.stderr, 'Warning: invalid password line in %s: %s' \ % (filename, line) continue | def load(self, filename): fd = open(filename, 'r') for line in fd: u, h = line.strip().split(':') if '$' in h or self.crypt: self.hash[u] = h else: print >>sys.stderr, 'Warning: cannot parse password for ' \ 'user "%s" without the "crypt" module' % u | 7a76b9cd0b737c6c9d2e02588973aca865c44162 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/7a76b9cd0b737c6c9d2e02588973aca865c44162/auth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
16,
1544,
4672,
5194,
273,
1696,
12,
3459,
16,
296,
86,
6134,
364,
980,
316,
5194,
30,
980,
273,
980,
18,
6406,
1435,
309,
486,
980,
30,
1324,
775,
30,
582,
16,
366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
1544,
4672,
5194,
273,
1696,
12,
3459,
16,
296,
86,
6134,
364,
980,
316,
5194,
30,
980,
273,
980,
18,
6406,
1435,
309,
486,
980,
30,
1324,
775,
30,
582,
16,
366,
... |
def MenuInfo(self): "Get info" menu = self.MenuHandle() info = win32structures.MENUINFO() info.cbSize = ctypes.sizeof(info) info.fMask = win32defines.MIM_STYLE print "sdfdsf", win32functions.GetMenuInfo(menu, ctypes.byref(info)) print self.Parent() print self.Owner() print info print info.dwStyle & win32defines.MNS_NOTIFYBYPOS item_rect = win32structures.RECT() for i in range(0, 10): win32functions.GetMenuItemRect( self, menu, i, ctypes.byref(item_rect)) print i, item_rect def MenuHandle(self): "Get the popup menu handle" | def _menu_handle(self): | def MenuInfo(self): "Get info" menu = self.MenuHandle() | 33cf95af22c07aec781a659cd6eba70abe212c1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/33cf95af22c07aec781a659cd6eba70abe212c1c/win32_controls.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9809,
966,
12,
2890,
4672,
315,
967,
1123,
6,
3824,
273,
365,
18,
4599,
3259,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9809,
966,
12,
2890,
4672,
315,
967,
1123,
6,
3824,
273,
365,
18,
4599,
3259,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
" scripts.Long('longParam', True, description='theDesc', min='1', max='10', values=[rlong(5)]) )", | " scripts.Long('longParam', True, description='theDesc', min=rlong(1), max=rlong(10), values=[rlong(5)]) )", | def testUploadOfficialScript(self): scriptService = self.root.sf.getScriptService() scriptLines = [ "import omero", "from omero.rtypes import rstring, rlong", "import omero.scripts as scripts", "if __name__ == '__main__':", " client = scripts.client('HelloWorld.py', 'Hello World example script',", " scripts.Long('longParam', True, description='theDesc', min='1', max='10', values=[rlong(5)]) )", " client.setOutput('returnMessage', rstring('Script ran OK!'))"] script = "\n".join(scriptLines) id = scriptService.uploadOfficialScript(thumbnailFigurePath, script) # force the server to parse the file enough to get params (checks syntax etc) params = scriptService.getParams(id) for key, param in params.inputs.items(): self.assertEquals("longParam", key) self.assertEquals(1, param.min.getValue(), "Min value not correct") self.assertEquals(10, param.max.getValue(), "Max value not correct") self.assertEquals(5, param.values.getValue()[0].getValue(), "First option value not correct") | 85ecfb5760796f3b75a694aea1daa1c55f37f692 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/85ecfb5760796f3b75a694aea1daa1c55f37f692/scripts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
4777,
7210,
22354,
3651,
12,
2890,
4672,
2728,
1179,
273,
365,
18,
3085,
18,
21668,
18,
588,
3651,
1179,
1435,
225,
2728,
5763,
273,
306,
315,
5666,
8068,
2439,
3113,
315,
2080,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4777,
7210,
22354,
3651,
12,
2890,
4672,
2728,
1179,
273,
365,
18,
3085,
18,
21668,
18,
588,
3651,
1179,
1435,
225,
2728,
5763,
273,
306,
315,
5666,
8068,
2439,
3113,
315,
2080,
80... |
if not subitem in result and not subitem in excludeWithDeps and not subitem in deps["warn"]: | if not subitem in result and not subitem in excludeWithDeps and not subitem in skipList: | def classlistFromClassRecursive(item, excludeWithDeps, variants, result): # support blocking if item in excludeWithDeps: return | 779574821bd05657d9aed278a2d44657763d63b8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/779574821bd05657d9aed278a2d44657763d63b8/DependencyLoader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
667,
1098,
1265,
797,
10483,
12,
1726,
16,
4433,
1190,
14430,
16,
12935,
16,
563,
4672,
468,
2865,
9445,
309,
761,
316,
4433,
1190,
14430,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
667,
1098,
1265,
797,
10483,
12,
1726,
16,
4433,
1190,
14430,
16,
12935,
16,
563,
4672,
468,
2865,
9445,
309,
761,
316,
4433,
1190,
14430,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.body += tw.classdef self.body += tw.initdef | self.extractCode(tw) def extractCode(self, tw): self.body += tw.prepend.getvalue() self.body += tw.classdef.getvalue() self.body += tw.classvar.getvalue() self.body += tw.initdef.getvalue() self.body += tw.initcode.getvalue() self.body += tw.basector.getvalue() self.body += tw.postpend.getvalue() | def getClassDefs(self, class_list, class_dict): check_list = [] for indx in range(len(class_list)): if class_dict.has_key(class_list[indx]): for tw in class_dict[class_list[indx]]: self.body += tw.classdef self.body += tw.initdef check_list.append(tw.name) else: del class_dict[class_list[indx]] if check_list: self.getClassDefs(check_list, class_dict) else: for l in class_dict.values(): for tw in l: self.body += tw.classdef self.body += tw.initdef | e2d87b566667969a1290b56d51a1ba4563446870 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e2d87b566667969a1290b56d51a1ba4563446870/wsdl2python.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2900,
14554,
12,
2890,
16,
667,
67,
1098,
16,
667,
67,
1576,
4672,
866,
67,
1098,
273,
5378,
364,
24732,
316,
1048,
12,
1897,
12,
1106,
67,
1098,
3719,
30,
309,
667,
67,
1576,
18,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2900,
14554,
12,
2890,
16,
667,
67,
1098,
16,
667,
67,
1576,
4672,
866,
67,
1098,
273,
5378,
364,
24732,
316,
1048,
12,
1897,
12,
1106,
67,
1098,
3719,
30,
309,
667,
67,
1576,
18,
53... |
if ui.config('inotify', 'debug'): | if result and ui.config('inotify', 'debug'): | def status(self, match, ignored, clean, unknown=True): files = match.files() if '.' in files: files = [] try: if not ignored and not self.inotifyserver: result = client.query(ui, repo, files, match, False, clean, unknown) if ui.config('inotify', 'debug'): r2 = super(inotifydirstate, self).status( match, False, clean, unknown) for c,a,b in zip('LMARDUIC', result, r2): for f in a: if f not in b: ui.warn('*** inotify: %s +%s\n' % (c, f)) for f in b: if f not in a: ui.warn('*** inotify: %s -%s\n' % (c, f)) result = r2 | 5ce45869d038c6260b6e63509a7deb0c24ee4990 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/5ce45869d038c6260b6e63509a7deb0c24ee4990/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1267,
12,
2890,
16,
845,
16,
5455,
16,
2721,
16,
5917,
33,
5510,
4672,
1390,
273,
845,
18,
2354,
1435,
309,
2611,
316,
1390,
30,
1390,
273,
5378,
775,
30,
309,
486,
5455,
471,
486,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1267,
12,
2890,
16,
845,
16,
5455,
16,
2721,
16,
5917,
33,
5510,
4672,
1390,
273,
845,
18,
2354,
1435,
309,
2611,
316,
1390,
30,
1390,
273,
5378,
775,
30,
309,
486,
5455,
471,
486,
3... |
return SendMsg(%s, flags, (long)&ft);''', | return SendMsg(%s, flags, (sptr_t)&ft);''', | '#ifdef SWIG\n wxString %s(int* OUTPUT);\n#else\n wxString GetCurLine(int* linePos=NULL);\n#endif', | b796ba39311830b11e375de10ca2378f501c5b8c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12725/b796ba39311830b11e375de10ca2378f501c5b8c/gen_iface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2946,
430,
536,
16392,
3047,
64,
82,
565,
7075,
780,
738,
87,
12,
474,
14,
11550,
20472,
82,
7,
12107,
64,
82,
565,
7075,
780,
968,
2408,
1670,
12,
474,
14,
980,
1616,
33,
8560,
20472,
82,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2946,
430,
536,
16392,
3047,
64,
82,
565,
7075,
780,
738,
87,
12,
474,
14,
11550,
20472,
82,
7,
12107,
64,
82,
565,
7075,
780,
968,
2408,
1670,
12,
474,
14,
980,
1616,
33,
8560,
20472,
82,... |
resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) def removeFile(self, lfn): | resDict = {'Failed':failed, 'Successful':successful} return S_OK( resDict ) def removeFile( self, lfn ): | def addReplica(self, lfn): """ This adds a replica to the catalogue. """ res = self.__checkArgumentFormat(lfn) if not res['OK']: return res lfns = res['Value'] created = self.__openSession() failed = {} successful = {} for lfn,info in lfns.items(): pfn = info['PFN'] se = info['SE'] if not info.has_key('Master'): master = False else: master = info['Master'] res = self.__getLFNGuid(lfn) if not res['OK']: failed[lfn] = res['Message'] else: guid = res['Value'] res = self.__addReplica(guid,pfn,se,master) if res['OK']: successful[lfn] = True else: failed[lfn] = res['Message'] if created: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
14222,
12,
2890,
16,
328,
4293,
4672,
3536,
1220,
4831,
279,
12335,
358,
326,
20833,
18,
3536,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
80,
4293,
13,
309,
486,
400,
3292,
3141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
14222,
12,
2890,
16,
328,
4293,
4672,
3536,
1220,
4831,
279,
12335,
358,
326,
20833,
18,
3536,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
80,
4293,
13,
309,
486,
400,
3292,
3141,
... |
mimetype = self.guessMimetypeOfText() | if hasattr(self, '_v_renamed'): mimetype = field.getContentType(self) del self._v_renamed else: mimetype = self.guessMimetypeOfText() | def manage_afterAdd(self, item, container): """ Fix text when created througt webdav Guess the right mimetype from the id/data """ ATCTContent.manage_afterAdd(self, item, container) | 822cd2b915d871948110f50fb90e1f220f8a2d4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/822cd2b915d871948110f50fb90e1f220f8a2d4f/ATDocument.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
5205,
986,
12,
2890,
16,
761,
16,
1478,
4672,
3536,
12139,
977,
1347,
2522,
286,
303,
637,
88,
3311,
20752,
30282,
326,
2145,
12595,
628,
326,
612,
19,
892,
3536,
14464,
1268,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
5205,
986,
12,
2890,
16,
761,
16,
1478,
4672,
3536,
12139,
977,
1347,
2522,
286,
303,
637,
88,
3311,
20752,
30282,
326,
2145,
12595,
628,
326,
612,
19,
892,
3536,
14464,
1268,... |
raise BadZipZile("zipfiles that span multiple disks are not supported") | raise BadZipFile("zipfiles that span multiple disks are not supported") | def _EndRecData64(fpin, offset, endrec): """ Read the ZIP64 end-of-archive records and use that to update endrec """ try: fpin.seek(offset - sizeEndCentDir64Locator, 2) except IOError: # If the seek fails, the file is not large enough to contain a ZIP64 # end-of-archive record, so just return the end record we were given. return endrec data = fpin.read(sizeEndCentDir64Locator) sig, diskno, reloff, disks = struct.unpack(structEndArchive64Locator, data) if sig != stringEndArchive64Locator: return endrec if diskno != 0 or disks != 1: raise BadZipZile("zipfiles that span multiple disks are not supported") # Assume no 'zip64 extensible data' fpin.seek(offset - sizeEndCentDir64Locator - sizeEndCentDir64, 2) data = fpin.read(sizeEndCentDir64) sig, sz, create_version, read_version, disk_num, disk_dir, \ dircount, dircount2, dirsize, diroffset = \ struct.unpack(structEndArchive64, data) if sig != stringEndArchive64: return endrec # Update the original endrec using data from the ZIP64 record endrec[_ECD_SIGNATURE] = sig endrec[_ECD_DISK_NUMBER] = disk_num endrec[_ECD_DISK_START] = disk_dir endrec[_ECD_ENTRIES_THIS_DISK] = dircount endrec[_ECD_ENTRIES_TOTAL] = dircount2 endrec[_ECD_SIZE] = dirsize endrec[_ECD_OFFSET] = diroffset return endrec | 8430108042eef7b5cbc0c17f975ac8cef786c7e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/8430108042eef7b5cbc0c17f975ac8cef786c7e1/zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1638,
5650,
751,
1105,
12,
7944,
267,
16,
1384,
16,
679,
3927,
4672,
3536,
2720,
326,
18277,
1105,
679,
17,
792,
17,
10686,
3853,
471,
999,
716,
358,
1089,
679,
3927,
3536,
775,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1638,
5650,
751,
1105,
12,
7944,
267,
16,
1384,
16,
679,
3927,
4672,
3536,
2720,
326,
18277,
1105,
679,
17,
792,
17,
10686,
3853,
471,
999,
716,
358,
1089,
679,
3927,
3536,
775,
3... |
dat = self._get_line()[:-2] | dat = self._get_line() | def _get_response(self): | 46698bd1f4f6c68089d09c6be3b8ee342ba00bb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/46698bd1f4f6c68089d09c6be3b8ee342ba00bb9/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2740,
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,... | [
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,
389,
588,
67,
2740,
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,... |
xml = '<?xml version="1.0" encoding="UTF-8"?>\n<SwatchBook version="0.7"\n xmlns:dc="http://purl.org/dc/elements/1.1/"\n xmlns:cc="http://creativecommons.org/ns | xml = '<?xml version="1.0" encoding="UTF-8"?>\n<SwatchBook version="0.7"\n xmlns:dc="'+dc+'"\n xmlns:cc="'+cc+'"\n xmlns:rdf="'+rdf+'">\n' | def write(swatchbook): xml = '<?xml version="1.0" encoding="UTF-8"?>\n<SwatchBook version="0.7"\n xmlns:dc="http://purl.org/dc/elements/1.1/"\n xmlns:cc="http://creativecommons.org/ns#"\n xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n' xml += sbz.writemeta(swatchbook.info) xml += ' <swatches>\n' for id in swatchbook.swatches: if isinstance(swatchbook.swatches[id], Color): swatch = swatchbook.swatches[id] xml += ' <color' if 'spot' in swatch.usage: xml += ' spot="1"' xml += '>\n' xml += sbz.writemeta(swatch.info,2) for value in swatch.values: xml += ' <values model="'+value[0]+'"' if value[1]: xml += ' space="'+value[1]+'"' xml += '>'+' '.join(str(round(x,16)) for x in swatch.values[value])+'</values>\n' for extra in swatch.extra: xml += ' <extra type="'+xmlescape(extra)+'">' if swatch.extra[extra]: xml += xmlescape(unicode(swatch.extra[extra])) xml += '</extra>\n' xml += ' </color>\n' xml += ' </swatches>\n' if len(swatchbook.book.items) > 0: xml += ' <book' for display in swatchbook.book.display: if swatchbook.book.display[display]: xml += ' '+display+'="'+str(swatchbook.book.display[display])+'"' xml += '>\n' xml += unicode(sbz.writem(swatchbook.book.items),'utf-8') xml += ' </book>\n' xml += '</SwatchBook>\n' tf = open(tempfile.mkstemp()[1],"w+b") zip = ZipFile(tf,'w',ZIP_DEFLATED) zip.writestr('swatchbook.xml',xml.encode('utf-8')) for profile in swatchbook.profiles: zip.write(swatchbook.profiles[profile].uri,'profiles/'+profile) zip.close() tf.seek(0) return tf.read() | 7b5f67bf5b56e854dad1732e375162afa036a6be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9936/7b5f67bf5b56e854dad1732e375162afa036a6be/sbz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
5328,
505,
3618,
4672,
2025,
273,
16617,
2902,
1177,
1546,
21,
18,
20,
6,
2688,
1546,
5159,
17,
28,
6,
35,
5333,
82,
32,
6050,
505,
9084,
1177,
1546,
20,
18,
27,
12691,
82,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5328,
505,
3618,
4672,
2025,
273,
16617,
2902,
1177,
1546,
21,
18,
20,
6,
2688,
1546,
5159,
17,
28,
6,
35,
5333,
82,
32,
6050,
505,
9084,
1177,
1546,
20,
18,
27,
12691,
82,... |
system.append( self.round_polynomials(i,plaintext, ciphertext) ) | system.append( self.round_polynomials(i, plaintext, ciphertext) ) | def polynomial_system(self, P=None, K=None): """ Return a MPolynomialSystem for self for a given plaintext-key pair. | 26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16991,
67,
4299,
12,
2890,
16,
453,
33,
7036,
16,
1475,
33,
7036,
4672,
3536,
2000,
279,
490,
5850,
13602,
3163,
364,
365,
364,
279,
864,
11917,
17,
856,
3082,
18,
2,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16991,
67,
4299,
12,
2890,
16,
453,
33,
7036,
16,
1475,
33,
7036,
4672,
3536,
2000,
279,
490,
5850,
13602,
3163,
364,
365,
364,
279,
864,
11917,
17,
856,
3082,
18,
2,
-100,
-100,
-100,... |
load_components(self) | plugins_dir = self.config.get('inherit', 'plugins_dir') load_components(self, plugins_dir and (plugins_dir,)) | def __init__(self, path, create=False, options=[]): """Initialize the Trac environment. @param path: the absolute path to the Trac environment @param create: if `True`, the environment is created and populated with default data; otherwise, the environment is expected to already exist. @param options: A list of `(section, name, value)` tuples that define configuration options """ ComponentManager.__init__(self) | 40e37f74c4ba5e7a6f4a4ba07dc0f611c14b063a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/40e37f74c4ba5e7a6f4a4ba07dc0f611c14b063a/env.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
16,
752,
33,
8381,
16,
702,
33,
8526,
4672,
3536,
7520,
326,
2197,
71,
3330,
18,
225,
632,
891,
589,
30,
282,
326,
4967,
589,
358,
326,
2197,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
589,
16,
752,
33,
8381,
16,
702,
33,
8526,
4672,
3536,
7520,
326,
2197,
71,
3330,
18,
225,
632,
891,
589,
30,
282,
326,
4967,
589,
358,
326,
2197,
71,
... |
self._debug('Put connection to %r in pool', cnx.dsn) else: self._debug('Forgot connection to %r', cnx.dsn) | def give_back(self, connection, keep_in_pool=True): self._debug('Give back connection to %r', connection.dsn) for i, (cnx, used) in enumerate(self._connections): if cnx is connection: self._connections.pop(i) if keep_in_pool: self._connections.append((cnx, False)) self._debug('Put connection to %r in pool', cnx.dsn) else: self._debug('Forgot connection to %r', cnx.dsn) break else: raise PoolError('This connection does not below to the pool') | 59895822466e8427faea27b40725d120b2a17283 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/59895822466e8427faea27b40725d120b2a17283/sql_db.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8492,
67,
823,
12,
2890,
16,
1459,
16,
3455,
67,
267,
67,
6011,
33,
5510,
4672,
365,
6315,
4148,
2668,
43,
688,
1473,
1459,
358,
738,
86,
2187,
1459,
18,
26055,
13,
364,
277,
16,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8492,
67,
823,
12,
2890,
16,
1459,
16,
3455,
67,
267,
67,
6011,
33,
5510,
4672,
365,
6315,
4148,
2668,
43,
688,
1473,
1459,
358,
738,
86,
2187,
1459,
18,
26055,
13,
364,
277,
16,
261... | |
if 0 and platform.atom_debug: print "atom_debug: update_valence starting to updating it for",self | if _debug: print "atom_debug: update_valence starting to updating it for", self | def update_valence(self): #bruce 050728 revised this and also disabled the debug prints # repositions/alters existing singlets, updates bonding pattern, valence errors, etc; # might reorder bonds, kill singlets; but doesn't move the atom and doesn't alter # existing real bonds or other atoms; it might let atom record how it wants to move, # when it has a chance and wants to clean up structure, if this can ever be ambiguous # later, when the current state (including positions of old singlets) is gone. from bond_constants import V_ZERO_VALENCE, BOND_VALENCES if self._modified_valence: self._modified_valence = False # do this first, so exceptions in the following only happen once if 0 and platform.atom_debug: print "atom_debug: update_valence starting to updating it for",self ## assert 0, "nim"###@@@ # the only easy part is to kill singlets with illegal valences, and warn if those were not 0. zerokilled = badkilled = 0 for sing in self.singNeighbors(): ###@@@ check out the other calls of this for code that might help us here... sv = sing.singlet_valence() if sv == V_ZERO_VALENCE: sing.kill() zerokilled += 1 elif sv not in BOND_VALENCES: # hmm... best to kill it and start over, I think, at least for now sing.kill() badkilled += 1 if 0 and platform.atom_debug: print "atom_debug: update_valence %r killed %d zero-valence and %d bad-valence singlets" % \ (self, zerokilled, badkilled) ###e now fix things up... not sure exactly under what conds, or using what code (but see existing code mentioned above) #bruce 050702 working on bug 121, here is a guess: change atomtype to best match new total number of bonds # (which we might have changed by killing some singlets). But only do this if we did actually kill singlets. if zerokilled or badkilled: self.adjust_atomtype_to_numbonds() #bruce 050728 temporary fix for bug 823 (in which C(sp2) is left with 2 order1 singlets that should be one singlet); # but in the long run we need a more principled way to decide whether to remake singlets or change atomtype # when they don't agree: if len(self.bonds) != self.atomtype.numbonds: self.remake_bondpoints() elif 0 and platform.atom_debug: print "atom_debug: update_valence thinks it doesn't need to update it for", self return | 86dc2825e6e2d0eaf9a077c277f0dd52a872d099 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/86dc2825e6e2d0eaf9a077c277f0dd52a872d099/chem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1125,
802,
12,
2890,
4672,
468,
2848,
3965,
374,
3361,
27,
6030,
283,
26779,
333,
471,
2546,
5673,
326,
1198,
14971,
468,
283,
12388,
19,
287,
5432,
2062,
4864,
17307,
16,
4533... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1125,
802,
12,
2890,
4672,
468,
2848,
3965,
374,
3361,
27,
6030,
283,
26779,
333,
471,
2546,
5673,
326,
1198,
14971,
468,
283,
12388,
19,
287,
5432,
2062,
4864,
17307,
16,
4533... |
for attr in ('filename', 'pieces', 'piecelength', 'piecetype', 'language', 'os', 'size'): | for attr in ('filename', 'pieces', 'piecelength', 'language', 'os', 'size'): | def convert_4to3(metalinkobj4): metalinkobj3 = Metalink() for attr in ('generator', 'origin'): setattr(metalinkobj3, attr, getattr(metalinkobj4, attr)) if getattr(metalinkobj4, 'dynamic').lower() == "true": setattr(metalinkobj3, 'type', 'dynamic') if metalinkobj4.published != "": metalinkobj3.pubdate = time.strftime(RFC822, rfc3339_parsedate(metalinkobj4.published)) if metalinkobj4.updated != "": metalinkobj3.refreshdate = time.strftime(RFC822, rfc3339_parsedate(metalinkobj4.updated)) for fileobj4 in metalinkobj4.files: fileobj3 = MetalinkFile(fileobj4.filename) # copy common attributes for attr in ('filename', 'pieces', 'piecelength', 'piecetype', 'language', 'os', 'size'): setattr(fileobj3, attr, getattr(fileobj4, attr)) for attr in ('description', 'version', 'identity', 'license_url', 'license_name', 'publisher_url', 'publisher_name'): setattr(metalinkobj3, attr, getattr(fileobj4, attr)) # copy hashlist, change key names for key in fileobj4.hashlist.keys(): fileobj3.hashlist[key.replace("-", "")] = fileobj4.hashlist[key] for res4 in fileobj4.resources: if res4.priority != "": fileobj3.add_url(res4.url, "", res4.location, str(101-int(res4.priority))) else: fileobj3.add_url(res4.url, "", res4.location) metalinkobj3.files.append(fileobj3) return metalinkobj3 | d1d53e2b0f6813cefefc948988e032d65455ae34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6425/d1d53e2b0f6813cefefc948988e032d65455ae34/metalink.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
24,
869,
23,
12,
10578,
16194,
2603,
24,
4672,
5100,
16194,
2603,
23,
273,
21604,
16194,
1435,
225,
364,
1604,
316,
7707,
8812,
2187,
296,
10012,
11,
4672,
9241,
12,
10578,
161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
24,
869,
23,
12,
10578,
16194,
2603,
24,
4672,
5100,
16194,
2603,
23,
273,
21604,
16194,
1435,
225,
364,
1604,
316,
7707,
8812,
2187,
296,
10012,
11,
4672,
9241,
12,
10578,
161... |
return self.artcmd('HEAD ' + id) | return self.artcmd('HEAD {0}'.format(id)) | def head(self, id): """Process a HEAD command. Argument: - id: article number or message id Returns: - resp: server response if successful - nr: article number - id: message id - list: the lines of the article's header""" | 17de0ac39e028b8777529030dfc984cdf592a543 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/17de0ac39e028b8777529030dfc984cdf592a543/nntplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
910,
12,
2890,
16,
612,
4672,
3536,
2227,
279,
14792,
1296,
18,
225,
5067,
30,
300,
612,
30,
7559,
1300,
578,
883,
612,
2860,
30,
300,
1718,
30,
1438,
766,
309,
6873,
300,
9884,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
910,
12,
2890,
16,
612,
4672,
3536,
2227,
279,
14792,
1296,
18,
225,
5067,
30,
300,
612,
30,
7559,
1300,
578,
883,
612,
2860,
30,
300,
1718,
30,
1438,
766,
309,
6873,
300,
9884,
30,
... |
elif ext in common_types: return common_types[ext], encoding elif ext.lower() in common_types: return common_types[ext.lower()], encoding | types_map = self.types_map[False] if ext in types_map: return types_map[ext], encoding elif ext.lower() in types_map: return types_map[ext.lower()], encoding | def guess_type(self, url, strict=1): """Guess the type of a file based on its URL. | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7274,
67,
723,
12,
2890,
16,
880,
16,
5490,
33,
21,
4672,
3536,
15977,
326,
618,
434,
279,
585,
2511,
603,
2097,
1976,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7274,
67,
723,
12,
2890,
16,
880,
16,
5490,
33,
21,
4672,
3536,
15977,
326,
618,
434,
279,
585,
2511,
603,
2097,
1976,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
content = content.read(mimeview.get_max_preview_size()) | content = content.read(self.get_max_preview_size()) | def render(self, req, mimetype, content, filename=None, url=None, annotations=None): """Render an XHTML preview of the given `content`. | f7fc1c6cf76645b926c067c0733e85bf202f61bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f7fc1c6cf76645b926c067c0733e85bf202f61bb/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1111,
16,
12595,
16,
913,
16,
1544,
33,
7036,
16,
880,
33,
7036,
16,
5617,
33,
7036,
4672,
3536,
3420,
392,
30551,
10143,
434,
326,
864,
1375,
1745,
8338,
2,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1111,
16,
12595,
16,
913,
16,
1544,
33,
7036,
16,
880,
33,
7036,
16,
5617,
33,
7036,
4672,
3536,
3420,
392,
30551,
10143,
434,
326,
864,
1375,
1745,
8338,
2,
-100,
... |
sig = '&'.join((sig, escape(token.secret))) | sig = sig + escape(token.secret) | def build_signature_base_string(self, oauth_request, consumer, token): # concatenate the consumer key and secret sig = escape(consumer.secret) if token: sig = '&'.join((sig, escape(token.secret))) return sig | e16515ca5e409379cf1e9e23e1a4502e55596733 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1598/e16515ca5e409379cf1e9e23e1a4502e55596733/oauth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
8195,
67,
1969,
67,
1080,
12,
2890,
16,
6924,
67,
2293,
16,
4765,
16,
1147,
4672,
468,
11361,
326,
4765,
498,
471,
4001,
3553,
273,
4114,
12,
13230,
18,
5875,
13,
309,
1147,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
8195,
67,
1969,
67,
1080,
12,
2890,
16,
6924,
67,
2293,
16,
4765,
16,
1147,
4672,
468,
11361,
326,
4765,
498,
471,
4001,
3553,
273,
4114,
12,
13230,
18,
5875,
13,
309,
1147,
... |
print('nxt msg') | def sendNextMessage(self): """ This method goes in order sending messages to the server: OPTIONS, DESCRIBE, SETUP, SET_PARAMETER, SET_PARAMETER, PLAY Returns True if it sent a packet, False if it didn't """ print('nxt msg') if not self.sent_options: self.sent_options = True self._sendOptions() return True if not self.sent_describe: self.sent_describe = True self._sendDescribe() return True if not self.sent_setup: self.sent_setup = True print('setup') challenge_tuple = RealChallenge.compute(self.realchallenge1) headers = {'RealChallenge2': '%s, sd=%s' % challenge_tuple} self._sendSetup(headers) return True if self.streamids: print('setup') self._sendSetup(streamid=self.streamids.pop(0)) return True if not self.sent_parameter: self.sent_parameter = True self._sendSetParameter('Subscribe', self.subscribe) return True if not self.sent_bandwidth: self.sent_bandwidth = True self._sendSetParameter('SetDeliveryBandwidth', 'Bandwidth=99999999999;BackOff=0') return True if not self.sent_play: self.sent_play = True self._sendPlay() return True return False | 382ee43230b4edd23aa42a717e9fc5a3d328e8bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7045/382ee43230b4edd23aa42a717e9fc5a3d328e8bc/rtsp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
2134,
1079,
12,
2890,
4672,
3536,
1220,
707,
13998,
316,
1353,
5431,
2743,
358,
326,
1438,
30,
16726,
16,
2030,
26469,
16,
7855,
3079,
16,
7855,
67,
9819,
16,
7855,
67,
9819,
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,
1366,
2134,
1079,
12,
2890,
4672,
3536,
1220,
707,
13998,
316,
1353,
5431,
2743,
358,
326,
1438,
30,
16726,
16,
2030,
26469,
16,
7855,
3079,
16,
7855,
67,
9819,
16,
7855,
67,
9819,
16,
... | |
self._update_status("Unabled to successfully build and test", None) | self._update_status("Unable to successfully build and test", None) | def _can_build_and_test(self): try: self.run_webkit_patch(["build-and-test", "--force-clean", "--non-interactive", "--build-style=both", "--quiet"]) except ScriptError, e: self._update_status("Unabled to successfully build and test", None) return False return True | 2d860027ab7a96690c3691ad600adb926032e12d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/2d860027ab7a96690c3691ad600adb926032e12d/queues.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4169,
67,
3510,
67,
464,
67,
3813,
12,
2890,
4672,
775,
30,
365,
18,
2681,
67,
29319,
67,
2272,
3816,
6,
3510,
17,
464,
17,
3813,
3113,
5238,
5734,
17,
6200,
3113,
5238,
5836,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4169,
67,
3510,
67,
464,
67,
3813,
12,
2890,
4672,
775,
30,
365,
18,
2681,
67,
29319,
67,
2272,
3816,
6,
3510,
17,
464,
17,
3813,
3113,
5238,
5734,
17,
6200,
3113,
5238,
5836,
1... |
res.append('<span class="datefilteroper" id="operator%d">%s</span><input class="vDateField" id="filter%d" type="text" size="%d" value="%s" name="%s__%s" tabindex="%d"/>' \ | res.append('<span class="datefilteroper" id="operator%d">%s</span><input class="vDateField filter" id="filter%d" type="text" size="%d" value="%s" name="%s__%s" tabindex="%d"/>' \ | def output(self, row, number, args): global IntegerOperator res = [] rowfield = self.field or row[0] counter = number*10 for i in args: try: # Skip empty filters if args.get(i) == '': continue # Determine field and operator field, sep, operator = i.rpartition('__') if field == '': field = operator operator = 'exact' if field == rowfield: for value in args.getlist(i): res.append('<span class="datefilteroper" id="operator%d">%s</span><input class="vDateField" id="filter%d" type="text" size="%d" value="%s" name="%s__%s" tabindex="%d"/>' \ % (counter, IntegerOperator[operator], counter, self.size, escape(value), rowfield, operator, number+1000, )) except: # Silently ignore invalid filters pass counter = counter + 1 if len(res) > 0: return '<br/>'.join(res) else: return '<span class="datefilteroper" id="operator%d">%s</span><input class="vDateField" id="filter%d" type="text" size="%d" value="%s" name="%s__%s" tabindex="%d"/>' \ % (number*10, IntegerOperator[self.operator], number*10, self.size, escape(args.get("%s__%s" % (rowfield,self.operator),'')), rowfield, self.operator, number+1000, ) | a5f6e2d25582a1a04f480d493c50a2ece97b6dae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8604/a5f6e2d25582a1a04f480d493c50a2ece97b6dae/report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
12,
2890,
16,
1027,
16,
1300,
16,
833,
4672,
2552,
2144,
5592,
400,
273,
5378,
1027,
1518,
273,
365,
18,
1518,
578,
1027,
63,
20,
65,
3895,
273,
1300,
14,
2163,
364,
277,
316,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
12,
2890,
16,
1027,
16,
1300,
16,
833,
4672,
2552,
2144,
5592,
400,
273,
5378,
1027,
1518,
273,
365,
18,
1518,
578,
1027,
63,
20,
65,
3895,
273,
1300,
14,
2163,
364,
277,
316,
8... |
self._GenerateExpecationsAndPrintOutput() | self._PrepareListsAndPrintOutput() | def __init__(self, options, paths): """Collect a list of files to test. | be1ebe6f583ad04e309ad1a1f351a66edc3625d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/be1ebe6f583ad04e309ad1a1f351a66edc3625d1/run_webkit_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
702,
16,
2953,
4672,
3536,
10808,
279,
666,
434,
1390,
358,
1842,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
702,
16,
2953,
4672,
3536,
10808,
279,
666,
434,
1390,
358,
1842,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
la, lb = len(atags), len(btags) if la < lb: atags = atags + ' ' * (lb - la) elif lb < la: btags = btags + ' ' * (la - lb) combined = map(lambda x,y: _combine[x+y], atags, btags) printq(aelt, belt, string.rstrip(string.join(combined, ''))) | printq(aelt, belt, atags, btags) | def fancy_replace(a, alo, ahi, b, blo, bhi): if TRACE: print '*** fancy_replace', alo, ahi, blo, bhi dump('>', a, alo, ahi) dump('<', b, blo, bhi) # don't synch up unless the lines have a similarity score of at # least cutoff; best_ratio tracks the best score seen so far best_ratio, cutoff = 0.74, 0.75 cruncher = SequenceMatcher(IS_CHARACTER_JUNK) eqi, eqj = None, None # 1st indices of equal lines (if any) # search for the pair that matches best without being identical # (identical lines must be junk lines, & we don't want to synch up # on junk -- unless we have to) for j in xrange(blo, bhi): bj = b[j] cruncher.set_seq2(bj) for i in xrange(alo, ahi): ai = a[i] if ai == bj: if eqi is None: eqi, eqj = i, j continue cruncher.set_seq1(ai) # computing similarity is expensive, so use the quick # upper bounds first -- have seen this speed up messy # compares by a factor of 3. # note that ratio() is only expensive to compute the first # time it's called on a sequence pair; the expensive part # of the computation is cached by cruncher if cruncher.real_quick_ratio() > best_ratio and \ cruncher.quick_ratio() > best_ratio and \ cruncher.ratio() > best_ratio: best_ratio, best_i, best_j = cruncher.ratio(), i, j if best_ratio < cutoff: # no non-identical "pretty close" pair if eqi is None: # no identical pair either -- treat it as a straight replace plain_replace(a, alo, ahi, b, blo, bhi) return # no close pair, but an identical pair -- synch up on that best_i, best_j, best_ratio = eqi, eqj, 1.0 else: # there's a close pair, so forget the identical pair (if any) eqi = None # a[best_i] very similar to b[best_j]; eqi is None iff they're not # identical if TRACE: print '*** best_ratio', best_ratio, best_i, best_j dump('>', a, best_i, best_i+1) dump('<', b, best_j, best_j+1) # pump out diffs from before the synch point fancy_helper(a, alo, best_i, b, blo, best_j) # do intraline marking on the synch pair aelt, belt = a[best_i], b[best_j] if eqi is None: # pump out a '-', '+', '?' triple for the synched lines; atags = btags = "" cruncher.set_seqs(aelt, belt) for tag, ai1, ai2, bj1, bj2 in cruncher.get_opcodes(): la, lb = ai2 - ai1, bj2 - bj1 if tag == 'replace': atags = atags + '.' * la btags = btags + '.' * lb elif tag == 'delete': atags = atags + '.' * la elif tag == 'insert': btags = btags + '.' * lb elif tag == 'equal': atags = atags + ' ' * la btags = btags + ' ' * lb else: raise ValueError, 'unknown tag ' + `tag` la, lb = len(atags), len(btags) if la < lb: atags = atags + ' ' * (lb - la) elif lb < la: btags = btags + ' ' * (la - lb) combined = map(lambda x,y: _combine[x+y], atags, btags) printq(aelt, belt, string.rstrip(string.join(combined, ''))) else: # the synch pair is identical print ' ', aelt, # pump out diffs from after the synch point fancy_helper(a, best_i+1, ahi, b, best_j+1, bhi) | e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31701,
67,
2079,
12,
69,
16,
279,
383,
16,
279,
12266,
16,
324,
16,
324,
383,
16,
324,
12266,
4672,
309,
12734,
30,
1172,
296,
14465,
31701,
67,
2079,
2187,
279,
383,
16,
279,
12266,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31701,
67,
2079,
12,
69,
16,
279,
383,
16,
279,
12266,
16,
324,
16,
324,
383,
16,
324,
12266,
4672,
309,
12734,
30,
1172,
296,
14465,
31701,
67,
2079,
2187,
279,
383,
16,
279,
12266,
... |
def pt_html(context=5): | def pt_html(context=5, i18n=None): _ = get_translator(i18n) | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for frame, file, lnum, func, lines, index in t: args, varargs, varkw, locals = inspect.getargvalues(frame) if locals.has_key('__traceback_info__'): ti = locals['__traceback_info__'] if isinstance(ti, TraversalError): s = [] for name, info in ti.path: s.append('<li>"%s" (%s)</li>'%(name, esc(repr(info)))) s = '\n'.join(s) l.append('<li>Looking for "%s", current path:<ol>%s</ol></li>'%( ti.name, s)) else: l.append('<li>In %s</li>'%esc(str(ti))) if locals.has_key('__traceback_supplement__'): ts = locals['__traceback_supplement__'] if len(ts) == 2: supp, context = ts s = 'A problem occurred in your template "%s".'%str(context.id) if context._v_errors: s = s + '<br>' + '<br>'.join( [esc(x) for x in context._v_errors]) l.append('<li>%s</li>'%s) elif len(ts) == 3: supp, context, info = ts l.append(''' | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5818,
67,
2620,
12,
2472,
33,
25,
16,
277,
2643,
82,
33,
7036,
4672,
389,
273,
336,
67,
17879,
12,
77,
2643,
82,
13,
2904,
273,
276,
10052,
18,
6939,
328,
273,
10228,
32,
76,
21,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5818,
67,
2620,
12,
2472,
33,
25,
16,
277,
2643,
82,
33,
7036,
4672,
389,
273,
336,
67,
17879,
12,
77,
2643,
82,
13,
2904,
273,
276,
10052,
18,
6939,
328,
273,
10228,
32,
76,
21,
3... |
if p_indices is not None: assert len(p_indices) == len(base_shape) else: p_indices = range(first_idx, first_idx+len(base_shape)) points.extend([(x*r, y*r, z) for (x,y) in base_shape]) | p_indices = tuple(xrange(first_idx, first_idx+len(base_shape))) points.extend([(x*r, y*r, z) for (x,y) in base_shape]) rings[ring_idx] = p_indices | def gen_ring(ring_idx, r, z): p_indices = None if ring_point_indices is not None: p_indices = ring_point_indices[ring_idx] | 3ced297c55913885e4b6094b0c0e25c20e66ad10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11985/3ced297c55913885e4b6094b0c0e25c20e66ad10/tet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
8022,
12,
8022,
67,
3465,
16,
436,
16,
998,
4672,
293,
67,
6836,
273,
599,
309,
9221,
67,
1153,
67,
6836,
353,
486,
599,
30,
293,
67,
6836,
273,
9221,
67,
1153,
67,
6836,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
8022,
12,
8022,
67,
3465,
16,
436,
16,
998,
4672,
293,
67,
6836,
273,
599,
309,
9221,
67,
1153,
67,
6836,
353,
486,
599,
30,
293,
67,
6836,
273,
9221,
67,
1153,
67,
6836,
... |
self.cRayNodePath = shadowNodePath.attachNewNode(self.cRayNode) | self.cRayNodePath = shadowNodePath.getParent().attachNewNode(self.cRayNode) | def setup(self, cTrav, shadowNodePath, wallCollideMask, floorCollideMask): """ Set up the collisions """ assert self.debugPrint("setup()") assert not shadowNodePath.isEmpty() | 87f4583fe55742a284671b7d2b89201104323986 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/87f4583fe55742a284671b7d2b89201104323986/ShadowPlacer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
16,
276,
1609,
90,
16,
10510,
907,
743,
16,
17662,
914,
8130,
5796,
16,
6346,
914,
8130,
5796,
4672,
3536,
1000,
731,
326,
27953,
3536,
1815,
365,
18,
4148,
5108,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
16,
276,
1609,
90,
16,
10510,
907,
743,
16,
17662,
914,
8130,
5796,
16,
6346,
914,
8130,
5796,
4672,
3536,
1000,
731,
326,
27953,
3536,
1815,
365,
18,
4148,
5108,
2932,
... |
'http://getbanshee.org/~abock/%{name}-%{version}.tar.bz2' | 'http://download.banshee-project.org/banshee/stable/%{version}/%{name}-%{version}.tar.bz2' | def __init__ (self): Package.__init__ (self, 'banshee-1', '1.5.3') | 9a64322a098bd5949ae2d1d825a86cf3bab71ca9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14879/9a64322a098bd5949ae2d1d825a86cf3bab71ca9/banshee.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
4672,
7508,
16186,
2738,
972,
261,
2890,
16,
296,
70,
634,
580,
73,
17,
21,
2187,
296,
21,
18,
25,
18,
23,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
4672,
7508,
16186,
2738,
972,
261,
2890,
16,
296,
70,
634,
580,
73,
17,
21,
2187,
296,
21,
18,
25,
18,
23,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if any(map(lambda instrument: "," in instrument or "+" in instrument, instruments)): | if any(map(lambda instrument: u"," in instrument or u"+" in instrument, instruments)): | def ifos_from_instrument_set(instruments): """ Convenience function to convert an iterable of instrument names into a value suitable for storage in the "ifos" column found in many tables. This function is mostly for internal use by the .set_ifos() methods of the corresponding row classes. The input can be None or an interable of zero or more instrument names, none of which may contain "," or "+" characters. The output is a single string containing the instrument names concatenated using "," as a delimiter. Whitespace is allowed in instrument names but may not be preserved. """ if instruments is None: return None instruments = sorted(instrument.strip() for instrument in instruments) if any(map(lambda instrument: "," in instrument or "+" in instrument, instruments)): raise ValueError, instruments return ",".join(instruments) | 7cee96556225e1af22068e93f346ebe4c554a653 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/7cee96556225e1af22068e93f346ebe4c554a653/lsctables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
309,
538,
67,
2080,
67,
22818,
67,
542,
12,
22818,
87,
4672,
3536,
735,
9080,
445,
358,
1765,
392,
6087,
434,
10353,
1257,
1368,
279,
460,
10631,
364,
2502,
316,
326,
315,
430,
538,
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,
309,
538,
67,
2080,
67,
22818,
67,
542,
12,
22818,
87,
4672,
3536,
735,
9080,
445,
358,
1765,
392,
6087,
434,
10353,
1257,
1368,
279,
460,
10631,
364,
2502,
316,
326,
315,
430,
538,
6,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.