rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
return super(StringIO, self).tell()//2 | return super(StringIO, self).tell()//self.charsize | def tell(self): return super(StringIO, self).tell()//2 | b62e97d0b89449ad4ecd36089dab996e3e8939a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/b62e97d0b89449ad4ecd36089dab996e3e8939a8/io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9276,
12,
2890,
4672,
327,
2240,
12,
780,
4294,
16,
365,
2934,
88,
1165,
1435,
759,
22,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9276,
12,
2890,
4672,
327,
2240,
12,
780,
4294,
16,
365,
2934,
88,
1165,
1435,
759,
22,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if self.namespaces is not None: | if len(self.namespaces) > 0: | def get_redirects_from_dump(self, alsoGetPageTitles = False): ''' Loads a local XML dump file, looks at all pages which have the redirect flag set, and finds out where they're pointing at. Returns a dictionary where the redirect names are the keys and the redirect targets are the values. ''' xmlFilename = self.xmlFilename dict = {} # open xml dump and read page titles out of it dump = xmlreader.XmlDump(xmlFilename) site = wikipedia.getSite() redirR = site.redirectRegex() readPagesCount = 0 if alsoGetPageTitles: pageTitles = set() for entry in dump.parse(): readPagesCount += 1 # always print status message after 10000 pages if readPagesCount % 10000 == 0: wikipedia.output(u'%i pages read...' % readPagesCount) if self.namespaces is not None: if wikipedia.Page(site, entry.title).namespace() not in self.namespaces: continue if alsoGetPageTitles: pageTitles.add(entry.title.replace(' ', '_')) | 9ac045123db1b4413b166bf16d70d17ce9f4845a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/9ac045123db1b4413b166bf16d70d17ce9f4845a/redirect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
22715,
67,
2080,
67,
8481,
12,
2890,
16,
2546,
967,
1964,
25088,
273,
1083,
4672,
9163,
4444,
87,
279,
1191,
3167,
4657,
585,
16,
10192,
622,
777,
4689,
1492,
1240,
326,
3136,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22715,
67,
2080,
67,
8481,
12,
2890,
16,
2546,
967,
1964,
25088,
273,
1083,
4672,
9163,
4444,
87,
279,
1191,
3167,
4657,
585,
16,
10192,
622,
777,
4689,
1492,
1240,
326,
3136,
... |
binding_key="console.obj.%s.%s" % (pname, cname)) | binding_key="console.obj.%s.%s. | def bindClass(self, classKey): """ """ if not self.userBindings or not self.rcvObjects: raise Exception("userBindings option not set for Session") pname, cname, hash = classKey for broker in self.brokers: broker.amqpSession.exchange_bind(exchange="qpid.management", queue=broker.topicName, binding_key="console.obj.%s.%s" % (pname, cname)) | bf691187e1cd8e0e27f21da42a280442195476b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/bf691187e1cd8e0e27f21da42a280442195476b0/qmfconsole.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1993,
797,
12,
2890,
16,
667,
653,
4672,
3536,
3536,
309,
486,
365,
18,
1355,
10497,
578,
486,
365,
18,
1310,
90,
4710,
30,
1002,
1185,
2932,
1355,
10497,
1456,
486,
444,
364,
3877,
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,
1993,
797,
12,
2890,
16,
667,
653,
4672,
3536,
3536,
309,
486,
365,
18,
1355,
10497,
578,
486,
365,
18,
1310,
90,
4710,
30,
1002,
1185,
2932,
1355,
10497,
1456,
486,
444,
364,
3877,
79... |
print "Database %s from %s installed successfully" % ( database, extension ) | print "Database %s from %s/%s installed successfully" % ( database, extension, system ) | def do_install( self, args ): """ Install various DIRAC components usage: install mysql install db <database> install service <system> <service> install agent <system> <agent> """ argss = args.split() if not argss: print self.do_install.__doc__ return | d67e8dcd7f707829638e626fff635223bff1bf45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d67e8dcd7f707829638e626fff635223bff1bf45/SystemAdministratorClientCLI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5425,
12,
365,
16,
833,
262,
30,
3536,
10284,
11191,
18544,
2226,
4085,
225,
4084,
30,
225,
3799,
7219,
3799,
1319,
411,
6231,
34,
3799,
1156,
411,
4299,
34,
411,
3278,
34,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5425,
12,
365,
16,
833,
262,
30,
3536,
10284,
11191,
18544,
2226,
4085,
225,
4084,
30,
225,
3799,
7219,
3799,
1319,
411,
6231,
34,
3799,
1156,
411,
4299,
34,
411,
3278,
34,
37... |
('dont_respond_to_post_requests', mm_cfg.Radio, (_('Yes'), _('No')), 0, | ('dont_respond_to_post_requests', mm_cfg.Radio, (_('Yes'), _('No')), 0, | def GetConfigInfo(self): | 573bc3f5543df89d6c925b452984ab250387f81e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/573bc3f5543df89d6c925b452984ab250387f81e/MailList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26666,
966,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26666,
966,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
for member in groups.groups[g]['members']: if member == entry[0]: | for member in groups.groups[g]['memberUid']: if member == temp_user_dict['login']: | def account_lock(value, tmp_entry=temp_user_dict): try: # get around an error where password is not base64 encoded. password = decodestring(value.split('}',1)[1]) except Exception: password = value | 7a870bda1ec1fa555d3a08eb79997dba442878dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/7a870bda1ec1fa555d3a08eb79997dba442878dd/ldap_backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2236,
67,
739,
12,
1132,
16,
1853,
67,
4099,
33,
5814,
67,
1355,
67,
1576,
4672,
775,
30,
468,
336,
6740,
392,
555,
1625,
2201,
353,
486,
1026,
1105,
3749,
18,
2201,
273,
16889,
371,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2236,
67,
739,
12,
1132,
16,
1853,
67,
4099,
33,
5814,
67,
1355,
67,
1576,
4672,
775,
30,
468,
336,
6740,
392,
555,
1625,
2201,
353,
486,
1026,
1105,
3749,
18,
2201,
273,
16889,
371,
... |
if _ClosedDict is None: | try: self.dict = _ClosedDict() except (NameError, TypeError): | def close(self): self.sync() try: self.dict.close() except AttributeError: pass # _ClosedDict can be None when close is called from __del__ during shutdown if _ClosedDict is None: self.dict = None else: self.dict = _ClosedDict() | 031ae6e9049dc7db2208ed5a368d123c05975a8d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/031ae6e9049dc7db2208ed5a368d123c05975a8d/shelve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
18,
8389,
1435,
775,
30,
365,
18,
1576,
18,
4412,
1435,
1335,
6394,
30,
1342,
468,
389,
7395,
5014,
848,
506,
599,
1347,
1746,
353,
2566,
628,
1001,
3771,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
18,
8389,
1435,
775,
30,
365,
18,
1576,
18,
4412,
1435,
1335,
6394,
30,
1342,
468,
389,
7395,
5014,
848,
506,
599,
1347,
1746,
353,
2566,
628,
1001,
3771,
97... |
def uheader(mlist, s, header_name=None): | def uheader(mlist, s, header_name=None, continuation_ws='\t'): | def uheader(mlist, s, header_name=None): # Get the charset to encode the string in. If this is us-ascii, we'll use # iso-8859-1 instead, just to get a little extra coverage, and because the # Header class tries us-ascii first anyway. charset = Utils.GetCharSet(mlist.preferred_language) if charset == 'us-ascii': charset = 'iso-8859-1' charset = Charset(charset) # Convert the string to unicode so Header will do the 3-charset encoding. # If s is a byte string and there are funky characters in it that don't # match the charset, we might as well replace them now. if not _isunicode(s): codec = charset.input_codec or 'ascii' s = unicode(s, codec, 'replace') # We purposefully leave no space b/w prefix and subject! return Header(s, charset, header_name=header_name) | 516bc8f473a0c70c14d21ba67fc6df6c00ff533e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/516bc8f473a0c70c14d21ba67fc6df6c00ff533e/CookHeaders.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
582,
3374,
12,
781,
376,
16,
272,
16,
1446,
67,
529,
33,
7036,
16,
17378,
67,
4749,
2218,
64,
88,
11,
4672,
468,
968,
326,
4856,
358,
2017,
326,
533,
316,
18,
225,
971,
333,
353,
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,
582,
3374,
12,
781,
376,
16,
272,
16,
1446,
67,
529,
33,
7036,
16,
17378,
67,
4749,
2218,
64,
88,
11,
4672,
468,
968,
326,
4856,
358,
2017,
326,
533,
316,
18,
225,
971,
333,
353,
5... |
if self.o.modkeys == 'Control': self.o.assy.unselectConnected( [ self.obj_doubleclicked.atom1 ] ) elif self.o.modkeys == 'Shift+Control': self.o.assy.deleteConnected( [ self.obj_doubleclicked.atom1, self.obj_doubleclicked.atom2 ] ) else: self.o.assy.selectConnected( [ self.obj_doubleclicked.atom1 ] ) | self.bondLeftDouble() if isinstance(self.obj_doubleclicked, Jig): self.jigLeftDouble() | def leftDouble(self, event): # mark 060126. '''Double click event handler for the left mouse button. ''' self.ignore_next_leftUp_event = True if isinstance(self.obj_doubleclicked, Atom): if self.obj_doubleclicked.is_singlet(): # Double-clicking on a singlet should do nothing. return else: # real atom if self.o.modkeys == 'Control': self.o.assy.unselectConnected( [ self.obj_doubleclicked ] ) elif self.o.modkeys == 'Shift+Control': self.o.assy.deleteConnected( self.neighbors_of_last_deleted_atom ) else: self.o.assy.selectConnected( [ self.obj_doubleclicked ] ) if isinstance(self.obj_doubleclicked, Bond): if self.o.modkeys == 'Control': self.o.assy.unselectConnected( [ self.obj_doubleclicked.atom1 ] ) elif self.o.modkeys == 'Shift+Control': self.o.assy.deleteConnected( [ self.obj_doubleclicked.atom1, self.obj_doubleclicked.atom2 ] ) else: self.o.assy.selectConnected( [ self.obj_doubleclicked.atom1 ] ) | e4a846430da32f8219706ecaa3f18f53cca635c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/e4a846430da32f8219706ecaa3f18f53cca635c5/selectMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2002,
5265,
12,
2890,
16,
871,
4672,
468,
2267,
13026,
1611,
5558,
18,
9163,
5265,
4682,
871,
1838,
364,
326,
2002,
7644,
3568,
18,
9163,
225,
365,
18,
6185,
67,
4285,
67,
4482,
1211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2002,
5265,
12,
2890,
16,
871,
4672,
468,
2267,
13026,
1611,
5558,
18,
9163,
5265,
4682,
871,
1838,
364,
326,
2002,
7644,
3568,
18,
9163,
225,
365,
18,
6185,
67,
4285,
67,
4482,
1211,
... |
logger = netsvc.Logger() logger.notifyChannel('orm', netsvc.LOG_ERROR, "Programming error: field '%s' does not exist in object '%s' !" % (name, self._table._name)) return None | self.logger.notifyChannel("browse_record", netsvc.LOG_WARNING, "Field '%s' does not exist in object '%s': \n%s" % ( name, self, ''.join(traceback.format_trace()))) raise KeyError("Field '%s' does not exist in object '%s'" % ( name, self)) | def __getitem__(self, name): if name == 'id': return self._id if name not in self._data[self._id]: # build the list of fields we will fetch | 36aaeaeb46a2ba6aa24d8919592fa7983d89081e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/36aaeaeb46a2ba6aa24d8919592fa7983d89081e/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
508,
4672,
309,
508,
422,
296,
350,
4278,
327,
365,
6315,
350,
309,
508,
486,
316,
365,
6315,
892,
63,
2890,
6315,
350,
14542,
468,
1361,
326,
666,
434,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31571,
972,
12,
2890,
16,
508,
4672,
309,
508,
422,
296,
350,
4278,
327,
365,
6315,
350,
309,
508,
486,
316,
365,
6315,
892,
63,
2890,
6315,
350,
14542,
468,
1361,
326,
666,
434,... |
sum += array2[i] | sum += array2[i] | def testArray(self): with JSContext() as ctxt: array = ctxt.eval(""" var array = new Array(); for (i=0; i<10; i++) { array[i] = 10-i; } array; """) self.assert_(isinstance(array, _PyV8.JSArray)) self.assertEqual(10, len(array)) self.assert_(5 in array) self.assertFalse(15 in array) l = list(array) self.assertEqual(10, len(l)) for i in xrange(10): self.assertEqual(10-i, array[i]) self.assertEqual(10-i, l[i]) array[5] = 0 self.assertEqual(0, array[5]) del array[5] self.assertRaises(IndexError, lambda: array[5]) ctxt.locals.array1 = JSArray(5) ctxt.locals.array2 = JSArray([1, 2, 3, 4, 5]) for i in xrange(len(ctxt.locals.array2)): ctxt.locals.array1[i] = ctxt.locals.array2[i] * 10 ctxt.eval(""" var sum = 0; for (i=0; i<array1.length; i++) sum += array1[i] for (i=0; i<array2.length; i++) sum += array2[i] """) self.assertEqual(165, ctxt.locals.sum) ctxt.locals.array3 = [1, 2, 3, 4, 5] self.assert_(ctxt.eval('array3[1] === 2')) self.assert_(ctxt.eval('array3[9] === undefined')) | 39238494c6380764c75b46d3d726c011640ecf54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5828/39238494c6380764c75b46d3d726c011640ecf54/PyV8.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1076,
12,
2890,
4672,
598,
6756,
1042,
1435,
487,
14286,
30,
526,
273,
14286,
18,
8622,
2932,
3660,
569,
526,
273,
394,
1510,
5621,
225,
364,
261,
77,
33,
20,
31,
277,
32,
2163,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1076,
12,
2890,
4672,
598,
6756,
1042,
1435,
487,
14286,
30,
526,
273,
14286,
18,
8622,
2932,
3660,
569,
526,
273,
394,
1510,
5621,
225,
364,
261,
77,
33,
20,
31,
277,
32,
2163,
... |
self.project.description = self.text.strip() | self.project.title = self.text.strip() | def endElement(self, name): '''Once the element is fully populated, call back the simplified interface on the handler.''' if name == self.tagDb: self.handler.endParse() elif name == self.tagAlternate: depFirst = self.locIndices.pop() tagFirst = self.tagIndices.pop() alternateSet = self.locals[depFirst:] alternates = self.locals[depFirst - 1] if len(self.tags[tagFirst:]) == 0: alternates.byTags['any'] = alternateSet for tag in self.tags[tagFirst:]: alternates.byTags[tag] = alternateSet self.tags = self.tags[:tagFirst] self.locals = self.locals[:depFirst] elif name == self.tagAlternates: depFirst = self.locIndices.pop() tagFirst = self.tagIndices.pop() self.tags = self.tags[:tagFirst] elif name == self.tagBase: if isinstance(self.var,Pathname): self.var.base = self.context.environ[self.text.strip()] elif name == self.tagConstrain: if not self.choice[0] in self.var.constrains: self.var.constrains[self.choice[0]] = {} self.var.constrains[self.choice[0]][self.constrain] \ = self.constrainValues self.constrain = None elif name == self.tagDefault: if isinstance(self.var,Pathname): self.var.default = self.text.strip() elif name == self.tagTag: self.tags += [ self.text ] elif name == self.tagPackage: package = Package(self.fetches,self.locals,self.vars) if len(self.tags) == 0: self.tags += [ 'any' ] for tag in self.tags: self.project.packages[tag] = package elif name == self.tagPatch: if not self.sync: self.sync = self.project.name + '.git' self.project.patch = Patch(self.sync, self.fetches,self.locals,self.vars) elif name == self.tagRepository: if not self.sync: self.sync = self.project.name + '.git' self.project.repository = Repository(self.sync, self.fetches,self.locals, self.vars) elif name == self.tagDepend: self.locals += [ Dependency(self.depName,self.deps,self.excludes) ] elif name == self.tagDescription: if self.choice: self.choice += [ self.text.strip() ] elif self.var: self.var.descr = self.text.strip() else: self.project.description = self.text.strip() elif name == self.tagProject: self.handler.project(self.project) elif name == self.tagHash: self.fetches[ self.filename ] = self.text.strip() elif name in [ self.tagMultiple, self.tagPathname, self.tagSingle ]: self.vars += [ self.var ] self.var = None elif name == self.tagFetch: self.filename = None elif name == self.tagSync: self.sync = self.text elif name == self.tagValue: if self.constrain: self.constrainValues += [ self.text.strip() ] else: self.var.choices += [ self.choice ] self.choice = None elif name in [ 'bin', 'include', 'lib', 'etc', 'share' ]: if not name in self.deps: self.deps[name] = [] self.deps[name] += [ (self.text,None) ] | 4a9bbf3c5ea7429f402e63ad28ed48a40972ea00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/4a9bbf3c5ea7429f402e63ad28ed48a40972ea00/dws.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
12,
2890,
16,
508,
4672,
9163,
12212,
326,
930,
353,
7418,
6737,
16,
745,
1473,
326,
20482,
1560,
603,
326,
1838,
1093,
6309,
309,
508,
422,
365,
18,
2692,
4331,
30,
365,
18,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
12,
2890,
16,
508,
4672,
9163,
12212,
326,
930,
353,
7418,
6737,
16,
745,
1473,
326,
20482,
1560,
603,
326,
1838,
1093,
6309,
309,
508,
422,
365,
18,
2692,
4331,
30,
365,
18,
41... |
self.args.rule = "linecount > 0" | self.args.rule = "matchedcount > 0" | def tokenparser(self, toklist, toktypes, indent): | f2890a955747c53aaaeb3925f11ca406e6ae58ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/f2890a955747c53aaaeb3925f11ca406e6ae58ea/logscanning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1147,
4288,
12,
2890,
16,
946,
1098,
16,
946,
2352,
16,
3504,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1147,
4288,
12,
2890,
16,
946,
1098,
16,
946,
2352,
16,
3504,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
""" Represents the wiki system. """ | """Represents the wiki system.""" | def get_link_resolvers(): """ Return an iterable over (namespace, formatter) tuples. """ | 20038e9ad23fd6bf15d7cff6c788c825d8278ea5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/20038e9ad23fd6bf15d7cff6c788c825d8278ea5/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1232,
67,
7818,
2496,
13332,
3536,
2000,
392,
6087,
1879,
261,
4937,
16,
4453,
13,
10384,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1232,
67,
7818,
2496,
13332,
3536,
2000,
392,
6087,
1879,
261,
4937,
16,
4453,
13,
10384,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
formatter = MoinMoin.formatter.text_gedit.Formatter(request) | formatter = Formatter(request) | def do(self, text, output): text = text.lstrip('\n') output = output.strip('\n') output = "<p>%s </p>" % output request = MinimalRequest(self.request) page = MinimalPage() formatter = MoinMoin.formatter.text_gedit.Formatter(request) formatter.setPage(page) MoinMoin.parser.wiki.Parser(text, request).format(formatter) repeat = ''.join(request.result).strip('\n') self.failUnlessEqual(repeat, output) out = self.do_convert_real([request, page.page_name, repeat]) out = out.rstrip('\n') self.failUnlessEqual(text, out) | cc6682173fe9ad9fe0984672b87aebff827b2350 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/cc6682173fe9ad9fe0984672b87aebff827b2350/test_converter_text_html_text_x_moin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
12,
2890,
16,
977,
16,
876,
4672,
977,
273,
977,
18,
80,
6406,
2668,
64,
82,
6134,
876,
273,
876,
18,
6406,
2668,
64,
82,
6134,
876,
273,
3532,
84,
9822,
87,
7765,
84,
2984,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
12,
2890,
16,
977,
16,
876,
4672,
977,
273,
977,
18,
80,
6406,
2668,
64,
82,
6134,
876,
273,
876,
18,
6406,
2668,
64,
82,
6134,
876,
273,
3532,
84,
9822,
87,
7765,
84,
2984,
7... |
ipad = "\x36" * blocksize opad = "\x5C" * blocksize | def __init__(self, key, msg = None, digestmod = None): """Create a new HMAC object. | c5845f0759a0e0f5943368b0a5188135434b920d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c5845f0759a0e0f5943368b0a5188135434b920d/hmac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
498,
16,
1234,
273,
599,
16,
5403,
1711,
273,
599,
4672,
3536,
1684,
279,
394,
20792,
733,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
498,
16,
1234,
273,
599,
16,
5403,
1711,
273,
599,
4672,
3536,
1684,
279,
394,
20792,
733,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
if hasattr(PGTop, 'setStartSort'): self.aspect2dp.node().setStartSort(16384) | self.aspect2dp.node().setStartSort(16384) | def setupRender2dp(self): """ Creates a render2d scene graph, the secondary scene graph for 2-d objects and gui elements that are superimposed over the 2-d and 3-d geometry in the window. """ self.render2dp = NodePath('render2dp') | 372dc514088cc23d9a3ce88cac0c0fcc65c6d5ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/372dc514088cc23d9a3ce88cac0c0fcc65c6d5ef/ShowBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
3420,
22,
9295,
12,
2890,
4672,
3536,
10210,
279,
1743,
22,
72,
9065,
2667,
16,
326,
9946,
9065,
2667,
364,
576,
17,
72,
2184,
471,
13238,
2186,
716,
854,
2240,
381,
7423,
1879,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
3420,
22,
9295,
12,
2890,
4672,
3536,
10210,
279,
1743,
22,
72,
9065,
2667,
16,
326,
9946,
9065,
2667,
364,
576,
17,
72,
2184,
471,
13238,
2186,
716,
854,
2240,
381,
7423,
1879,
... |
keydefs = idleConf.GetExtensionBindings(extensionName) if keydefs: self.apply_bindings(keydefs) | xkeydefs = idleConf.GetExtensionBindings(extensionName) if xkeydefs: self.apply_bindings(xkeydefs) | def ApplyKeybindings(self): "Update the keybindings after they are changed" # Called from configDialog.py self.Bindings.default_keydefs=idleConf.GetCurrentKeySet() self.apply_bindings() for extensionName in self.get_standard_extension_names(): keydefs = idleConf.GetExtensionBindings(extensionName) if keydefs: self.apply_bindings(keydefs) #update menu accelerators menuEventDict={} for menu in self.Bindings.menudefs: menuEventDict[menu[0]]={} for item in menu[1]: if item: menuEventDict[menu[0]][prepstr(item[0])[1]]=item[1] for menubarItem in self.menudict.keys(): menu=self.menudict[menubarItem] end=menu.index(END)+1 for index in range(0,end): if menu.type(index)=='command': accel=menu.entrycget(index,'accelerator') if accel: itemName=menu.entrycget(index,'label') event='' if menuEventDict.has_key(menubarItem): if menuEventDict[menubarItem].has_key(itemName): event=menuEventDict[menubarItem][itemName] if event: accel=get_accelerator(keydefs, event) menu.entryconfig(index,accelerator=accel) | a945eef857307bb62f421da83331c51112ecdc94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a945eef857307bb62f421da83331c51112ecdc94/EditorWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5534,
653,
15863,
12,
2890,
4672,
315,
1891,
326,
498,
15863,
1839,
2898,
854,
3550,
6,
468,
11782,
628,
642,
6353,
18,
2074,
365,
18,
10497,
18,
1886,
67,
856,
12537,
33,
20390,
3976,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5534,
653,
15863,
12,
2890,
4672,
315,
1891,
326,
498,
15863,
1839,
2898,
854,
3550,
6,
468,
11782,
628,
642,
6353,
18,
2074,
365,
18,
10497,
18,
1886,
67,
856,
12537,
33,
20390,
3976,
... |
print "updateModel (point)", self.data_ | def updateModel(self): if not self._delayedDirty(): self.data_['x'] = self.scenePos().x() self.data_['y'] = self.scenePos().y() print "updateModel (point)", self.data_ self.index().model().setData(self.index(), QVariant(self.data_), DataRole) | 3aa920cf0f46c558617dc95d264f22b8d33e3a44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/3aa920cf0f46c558617dc95d264f22b8d33e3a44/annotationitem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
1488,
12,
2890,
4672,
309,
486,
365,
6315,
10790,
329,
10785,
13332,
365,
18,
892,
67,
3292,
92,
3546,
273,
365,
18,
23694,
1616,
7675,
92,
1435,
365,
18,
892,
67,
3292,
93,
3546... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1488,
12,
2890,
4672,
309,
486,
365,
6315,
10790,
329,
10785,
13332,
365,
18,
892,
67,
3292,
92,
3546,
273,
365,
18,
23694,
1616,
7675,
92,
1435,
365,
18,
892,
67,
3292,
93,
3546... | |
examples = [] | setup_examples = [] | def test_group(self, group, filename): ns = {} examples = [] for setup in group.setup: examples.append(doctest.Example(setup.code, '', lineno=setup.lineno)) if examples: # simulate a doctest with the setup code setup_doctest = doctest.DocTest(examples, {}, '%s (setup code)' % group.name, filename, 0, None) setup_doctest.globs = ns old_f = self.setup_runner.failures self.type = 'exec' # the snippet may contain multiple statements self.setup_runner.run(setup_doctest, out=self._warn_out, clear_globs=False) if self.setup_runner.failures > old_f: # don't run the group return for code in group.tests: if len(code) == 1: test = parser.get_doctest(code[0].code, {}, group.name, filename, code[0].lineno) if not test.examples: continue for example in test.examples: # apply directive's comparison options new_opt = code[0].options.copy() new_opt.update(example.options) example.options = new_opt self.type = 'single' # ordinary doctests else: output = code[1] and code[1].code or '' options = code[1] and code[1].options or {} # disable <BLANKLINE> processing as it is not needed options[doctest.DONT_ACCEPT_BLANKLINE] = True example = doctest.Example(code[0].code, output, lineno=code[0].lineno, options=options) test = doctest.DocTest([example], {}, group.name, filename, code[0].lineno, None) self.type = 'exec' # multiple statements again # DocTest.__init__ copies the globs namespace, which we don't want test.globs = ns # also don't clear the globs namespace after running the doctest self.test_runner.run(test, out=self._warn_out, clear_globs=False) | 06ef375ccb39961624a54f2b4618a8ab2eb03291 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5532/06ef375ccb39961624a54f2b4618a8ab2eb03291/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1655,
12,
2890,
16,
1041,
16,
1544,
4672,
3153,
273,
2618,
3875,
67,
16858,
273,
5378,
364,
3875,
316,
1041,
18,
8401,
30,
10991,
18,
6923,
12,
2896,
299,
395,
18,
10908,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1655,
12,
2890,
16,
1041,
16,
1544,
4672,
3153,
273,
2618,
3875,
67,
16858,
273,
5378,
364,
3875,
316,
1041,
18,
8401,
30,
10991,
18,
6923,
12,
2896,
299,
395,
18,
10908,
12,... |
continue | break | def loadModules(self, *modNames): # Build a list of available modules if not modNames: modNames = {} for mibSource in self.__mibSources: for modName in mibSource.listdir(): modNames[modName] = None modNames = modNames.keys() if not modNames: raise error.SmiError( 'No MIB module to load at %s' % (self,) ) for modName in modNames: for mibSource in self.__mibSources: debug.logger & debug.flagBld and debug.logger('loadModules: trying %s at %s' % (modName, mibSource)) try: modData, sfx = mibSource.read(modName) except IOError, why: debug.logger & debug.flagBld and debug.logger('loadModules: read %s from %s failed: %s' % (modName, mibSource, why)) continue | 1e7ec9b5ddef5c2b44b509a04bde0a750c7d0b1d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/587/1e7ec9b5ddef5c2b44b509a04bde0a750c7d0b1d/builder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
7782,
12,
2890,
16,
380,
1711,
1557,
4672,
468,
3998,
279,
666,
434,
2319,
4381,
309,
486,
681,
1557,
30,
681,
1557,
273,
2618,
364,
312,
495,
1830,
316,
365,
16186,
81,
495,
862... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7782,
12,
2890,
16,
380,
1711,
1557,
4672,
468,
3998,
279,
666,
434,
2319,
4381,
309,
486,
681,
1557,
30,
681,
1557,
273,
2618,
364,
312,
495,
1830,
316,
365,
16186,
81,
495,
862... |
prefix.append(av) | prefixappend(av) | def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = [] # not used if not (flags & SRE_FLAG_IGNORECASE): # look for literal prefix for op, av in pattern.data: if op is LITERAL: if len(prefix) == prefix_skip: prefix_skip = prefix_skip + 1 prefix.append(av) elif op is SUBPATTERN and len(av[1]) == 1: op, av = av[1][0] if op is LITERAL: prefix.append(av) else: break else: break # if no prefix, look for charset prefix if not prefix and pattern.data: op, av = pattern.data[0] if op is SUBPATTERN and av[1]: op, av = av[1][0] if op is LITERAL: charset.append((op, av)) elif op is BRANCH: c = [] for p in av[1]: if not p: break op, av = p[0] if op is LITERAL: c.append((op, av)) else: break else: charset = c elif op is BRANCH: c = [] for p in av[1]: if not p: break op, av = p[0] if op is LITERAL: c.append((op, av)) else: break else: charset = c elif op is IN: charset = av | 01c9f8c35f583338e3638906ceeef9d2f29a0254 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/01c9f8c35f583338e3638906ceeef9d2f29a0254/sre_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11100,
67,
1376,
12,
710,
16,
1936,
16,
2943,
4672,
468,
2713,
30,
4074,
392,
1123,
1203,
18,
225,
316,
326,
783,
1177,
16,
468,
333,
1914,
1131,
19,
1896,
1936,
1835,
16,
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,
389,
11100,
67,
1376,
12,
710,
16,
1936,
16,
2943,
4672,
468,
2713,
30,
4074,
392,
1123,
1203,
18,
225,
316,
326,
783,
1177,
16,
468,
333,
1914,
1131,
19,
1896,
1936,
1835,
16,
471,
... |
print "[NodeManager] Node Manager memory usage is unussually high." | print "[NodeManager] Node Manager memory usage is unusually high." | def nmclient_rawsay(nmip, nmport, *args): fullresponse = nmclient_rawcommunicate(nmip, nmport, *args) try: (response, status) = fullresponse.rsplit('\n',1) except KeyError: raise NMClientException, "Communication error '"+fullresponse+"'" if status == 'Success': return response elif status == 'Error': raise NMClientException, "Node Manager error '"+response+"'" elif status == 'Warning': raise NMClientException, "Node Manager warning '"+response+"'" else: raise NMClientException, "Unknown status '"+fullresponse+"'" | 575ba8ec5ea5c5c357035abee00c944e7edf2048 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/575ba8ec5ea5c5c357035abee00c944e7edf2048/testprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8442,
2625,
67,
1899,
87,
528,
12,
15094,
625,
16,
8442,
655,
16,
380,
1968,
4672,
1983,
2740,
273,
8442,
2625,
67,
1899,
5702,
318,
2659,
12,
15094,
625,
16,
8442,
655,
16,
380,
1968,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8442,
2625,
67,
1899,
87,
528,
12,
15094,
625,
16,
8442,
655,
16,
380,
1968,
4672,
1983,
2740,
273,
8442,
2625,
67,
1899,
5702,
318,
2659,
12,
15094,
625,
16,
8442,
655,
16,
380,
1968,... |
apply_rule(*rule_obj.domain_get(cr, uid, inherited_model, mode, context=context), parent_model=inherited_model, child_object=self) | kwargs = dict(parent_model=inherited_model, child_object=self) apply_rule(*rule_obj.domain_get(cr, uid, inherited_model, mode, context=context), **kwargs) | def apply_rule(added_clause, added_params, added_tables, parent_model=None, child_object=None): if added_clause: if parent_model and child_object: # as inherited rules are being applied, we need to add the missing JOIN # to reach the parent table (if it was not JOINed yet in the query) child_object._inherits_join_add(parent_model, query) query.where_clause += added_clause query.where_clause_params += added_params for table in added_tables: if table not in query.tables: query.tables.append(table) return True return False | 2375031b615d2027ef77fa8fdd353f8e336dd39a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/2375031b615d2027ef77fa8fdd353f8e336dd39a/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
5345,
12,
9665,
67,
18128,
16,
3096,
67,
2010,
16,
3096,
67,
9373,
16,
982,
67,
2284,
33,
7036,
16,
1151,
67,
1612,
33,
7036,
4672,
309,
3096,
67,
18128,
30,
309,
982,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
5345,
12,
9665,
67,
18128,
16,
3096,
67,
2010,
16,
3096,
67,
9373,
16,
982,
67,
2284,
33,
7036,
16,
1151,
67,
1612,
33,
7036,
4672,
309,
3096,
67,
18128,
30,
309,
982,
67,
... |
map(operator.sub, pos, iorigin), ispacing)) val = inputData.GetScalarComponentAsFloat(x,y,z, 0) | map(operator.sub, xyz, iorigin), ispacing)) val = inputData.GetScalarComponentAsFloat(discrete[0],discrete[1], discrete[2], 0) | def _storeSurfacePoint(self, pointId, actor): polyData = actor.GetMapper().GetInput() if polyData: xyz = polyData.GetPoint(pointId) else: # something really weird went wrong return | 84c1eb2dd880117cbde103e9d144e516ad511eb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/84c1eb2dd880117cbde103e9d144e516ad511eb7/slice3d_vwr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2233,
11508,
2148,
12,
2890,
16,
1634,
548,
16,
8327,
4672,
7573,
751,
273,
8327,
18,
967,
4597,
7675,
967,
1210,
1435,
309,
7573,
751,
30,
14779,
273,
7573,
751,
18,
967,
2148,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2233,
11508,
2148,
12,
2890,
16,
1634,
548,
16,
8327,
4672,
7573,
751,
273,
8327,
18,
967,
4597,
7675,
967,
1210,
1435,
309,
7573,
751,
30,
14779,
273,
7573,
751,
18,
967,
2148,
1... |
Returns 0 if the two ranged don't overlap, 1 if the given | Returns 0 if the two ranges don't overlap, 1 if the given | def overlaps(self, item): """Check if two IP address ranges overlap. | beeb5ca0480c8d1ae505244beb56772f807ba70e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14367/beeb5ca0480c8d1ae505244beb56772f807ba70e/IPy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19582,
12,
2890,
16,
761,
4672,
3536,
1564,
309,
2795,
2971,
1758,
7322,
7227,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19582,
12,
2890,
16,
761,
4672,
3536,
1564,
309,
2795,
2971,
1758,
7322,
7227,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if docid: | if docname: ret = intbitset() for recid in recid_set: bibrec = BibRecDocs(recid, deleted_too=show_deleted) for bibdoc in bibrec.list_bibdocs(): if fnmatch.fnmatch(bibdoc.get_docname(), docname): ret.add(bibdoc.get_id()) return ret elif docid: | def get_docids_from_query(recid_set, docid, docid2, show_deleted=False): """Given a set of recid and an optional range of docids return a corresponding docids set. The range of docids takes precedence over the recid_set.""" if docid: ret = intbitset() if not docid2: docid2 = docid for adocid in xrange(docid, docid2 + 1): try: bibdoc = BibDoc(adocid) if bibdoc: ret.add(adocid) except (InvenioWebSubmitFileError, TypeError): pass return ret else: ret = intbitset() for recid in recid_set: bibrec = BibRecDocs(recid, deleted_too=show_deleted) for bibdoc in bibrec.list_bibdocs(): ret.add(bibdoc.get_id()) icon = bibdoc.get_icon() if icon: ret.add(icon.get_id()) return ret | ccc0ff19181f56da96bb4dfd7216fe5bbda91724 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/ccc0ff19181f56da96bb4dfd7216fe5bbda91724/bibdocfilecli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2434,
2232,
67,
2080,
67,
2271,
12,
3927,
350,
67,
542,
16,
997,
350,
16,
997,
350,
22,
16,
2405,
67,
8600,
33,
8381,
4672,
3536,
6083,
279,
444,
434,
1950,
350,
471,
392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2434,
2232,
67,
2080,
67,
2271,
12,
3927,
350,
67,
542,
16,
997,
350,
16,
997,
350,
22,
16,
2405,
67,
8600,
33,
8381,
4672,
3536,
6083,
279,
444,
434,
1950,
350,
471,
392,
... |
init = ('stream', 'onreturn', 'around', 'replace') | init = ('streamin', 'stream', 'onreturn', 'around', 'replace') | def _init_connections(self, connections): #{{{ super(Signal, self)._init_connections(connections) init = ('stream', 'onreturn', 'around', 'replace') connections.update((n, (connect_func, disconnect_func)) for n in init) init = ('choose', 'choosereturn') connections.update((n, (connect_choosefunc, disconnect_choosefunc)) for n in init) | d95404d160c95eb9afc39b2f1a358aae0162d9c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2635/d95404d160c95eb9afc39b2f1a358aae0162d9c7/signal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
13313,
12,
2890,
16,
5921,
4672,
3735,
12187,
2240,
12,
11208,
16,
365,
2934,
67,
2738,
67,
13313,
12,
13313,
13,
1208,
273,
7707,
3256,
267,
2187,
296,
3256,
2187,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
13313,
12,
2890,
16,
5921,
4672,
3735,
12187,
2240,
12,
11208,
16,
365,
2934,
67,
2738,
67,
13313,
12,
13313,
13,
1208,
273,
7707,
3256,
267,
2187,
296,
3256,
2187,
296,
... |
url = baseurl+filename+".gz" | url = baseurl+filename | def update_filter (wconfig, dryrun=False, log=None): """Update the given configuration object with .zap files found at baseurl. If dryrun is True, only print out the changes but do nothing throws IOError on error """ chg = False baseurl = wconfig['baseurl']+"filter/" url = baseurl+"filter-md5sums.txt" try: page = open_url(url) except IOError, msg: print >>log, "error fetching %s:"%url, msg return chg # remember all local config files filemap = {} for filename in wc.filterconf_files(): filemap[os.path.basename(filename)] = filename # read md5sums for line in page.read().splitlines(): if "<" in line: print >>log, "error fetching", url return chg if not line: continue md5sum, filename = line.split() assert filename.endswith('.zap') fullname = os.path.join(wc.ConfigDir, filename) # compare checksums if filemap.has_key(filename): f = file(fullname) data = f.read() digest = list(md5.new(data).digest()) f.close() digest = "".join([ "%0.2x"%ord(c) for c in digest ]) if digest==md5sum: print >>log, i18n._("filter %s not changed, ignoring")%filename continue print >>log, i18n._("updating filter %s")%filename else: print >>log, i18n._("adding new filter %s"), filename # parse new filter url = baseurl+filename+".gz" page = open_url(url) p = wc.ZapperParser(fullname, wconfig, compile_data=False) p.parse(fp=page) page.close() chg = wconfig.merge_folder(p.folder, dryrun=dryrun, log=log) or chg url = baseurl+"extern-md5sums.txt" try: page = open_url(url) except IOError, msg: print >>log, i18n._("error fetching %s:")%url, msg return chg lines = page.read().splitlines() page.close() for line in lines: if "<" in line: print >>log, i18n._("error fetching %s:")%url, i18n._("invalid content") return chg if not line: continue md5sum, filename = line.split() # XXX UNIX-generated md5sum filenames with subdirs are not portable fullname = os.path.join(wc.ConfigDir, filename) # compare checksums if os.path.exists(fullname): f = file(fullname) data = f.read() digest = list(md5.new(data).digest()) f.close() digest = "".join([ "%0.2x"%ord(c) for c in digest ]) if digest==md5sum: print >>log, i18n._("extern filter %s not changed, ignoring")%filename continue print >>log, i18n._("updating extern filter %s")%filename else: print >>log, i18n._("adding new extern filter %s")%filename chg = True if not dryrun: url = baseurl+filename try: page = open_url(url) except IOError, msg: print >>log, i18n._("error fetching %s:")%url, msg continue data = page.read() if not data: print >>log, i18n._("error fetching %s:")%url, i18n._("got no data") continue f = file(fullname, 'wb') f.write(data) f.close() return chg | c11acc76c9ac079636774d74a38c7a44f6e1ecbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/c11acc76c9ac079636774d74a38c7a44f6e1ecbc/update.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2188,
261,
91,
1425,
16,
10299,
2681,
33,
8381,
16,
613,
33,
7036,
4672,
3536,
1891,
326,
864,
1664,
733,
598,
263,
94,
438,
1390,
1392,
622,
25427,
18,
971,
10299,
2681,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2188,
261,
91,
1425,
16,
10299,
2681,
33,
8381,
16,
613,
33,
7036,
4672,
3536,
1891,
326,
864,
1664,
733,
598,
263,
94,
438,
1390,
1392,
622,
25427,
18,
971,
10299,
2681,
353... |
return True | return False | def __call__(self, nextURL=u''): request = self.request response = request.response | 14020d0df3bde448ad9926ffbd7e5a2a5a37cdee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12537/14020d0df3bde448ad9926ffbd7e5a2a5a37cdee/defaultlogin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1024,
1785,
33,
89,
6309,
4672,
590,
273,
365,
18,
2293,
766,
273,
590,
18,
2740,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1024,
1785,
33,
89,
6309,
4672,
590,
273,
365,
18,
2293,
766,
273,
590,
18,
2740,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
dist = self.fetch_dist(requirement,tmpdir,force_scan,source) | dist = self.fetch_distribution(requirement,tmpdir,force_scan,source) | def fetch(self, requirement, tmpdir, force_scan=False, source=False): """Obtain a file suitable for fulfilling `requirement` | 7f1e94b81c942538f8622ef431254fef90888526 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/7f1e94b81c942538f8622ef431254fef90888526/package_index.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
12,
2890,
16,
12405,
16,
20213,
16,
2944,
67,
9871,
33,
8381,
16,
1084,
33,
8381,
4672,
3536,
20019,
279,
585,
10631,
364,
16136,
74,
5789,
1375,
30848,
68,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
12,
2890,
16,
12405,
16,
20213,
16,
2944,
67,
9871,
33,
8381,
16,
1084,
33,
8381,
4672,
3536,
20019,
279,
585,
10631,
364,
16136,
74,
5789,
1375,
30848,
68,
2,
-100,
-100,
-100,
... |
self.parentWidget.removeGraphProperties() for i in range(len(self.allResults)): | if snapshots: self.parentWidget.setMinimalGraphProperties() for index in range(len(self.allResults)): | def findArguments(self): self.cancelArgumentation = 0 self.arguments = [[] for i in range(self.classValueList.count())] if self.subsetdata == None: QMessageBox.information( None, "Argumentation", 'To find arguments you first have to provide a new example that you wish to classify. \nYou can do this by sending the example to the visualization widget through the "Example Subset" signal.', QMessageBox.Ok + QMessageBox.Default) return if len(self.shownResults) == 0: QMessageBox.information( None, "Argumentation", 'To find arguments you first have to find clusters in some projections by clicking "Find arguments" in the Main tab.', QMessageBox.Ok + QMessageBox.Default) return | 509fd7bce11b383105f28fc76c9cd97530e78262 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/509fd7bce11b383105f28fc76c9cd97530e78262/OWClusterOptimization.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
4628,
12,
2890,
4672,
365,
18,
10996,
1379,
367,
273,
374,
365,
18,
7099,
273,
306,
8526,
364,
277,
316,
1048,
12,
2890,
18,
1106,
24999,
18,
1883,
10756,
65,
225,
309,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
4628,
12,
2890,
4672,
365,
18,
10996,
1379,
367,
273,
374,
365,
18,
7099,
273,
306,
8526,
364,
277,
316,
1048,
12,
2890,
18,
1106,
24999,
18,
1883,
10756,
65,
225,
309,
365,
18,
... |
self.key = 'default' | self.key = 'English' | def __init__(self, master=None): """ Setup the dialog """ # refernce to the localization dictionary self.key = 'default' Frame.__init__(self, master) self.grid() self.master.resizable(0, 0) self.master.title('Scribus Calendar Wizard') #define widgets self.statusVar = StringVar() self.statusLabel = Label(self, textvariable=self.statusVar) self.statusVar.set('Select Options and Values') # langs self.langLabel = Label(self, text='Select language:') self.langListbox = Listbox(self, selectmode=SINGLE, height=10) for i in localization.keys(): self.langListbox.insert(END, i) self.langButton = Button(self, text='Change language', command=self.languageChange) # calendar type self.typeLabel = Label(self, text='Calendar type') self.typeVar = IntVar() self.typeClRadio = Radiobutton(self, text='Classic', variable=self.typeVar, value=0) self.typeEvRadio = Radiobutton(self, text='Event', variable=self.typeVar, value=1) # start of week self.weekStartsLabel = Label(self, text='Week begins with:') self.weekVar = IntVar() self.weekMondayRadio = Radiobutton(self, text='Mon', variable=self.weekVar, value=calendar.MONDAY) self.weekSundayRadio = Radiobutton(self, text='Sun', variable=self.weekVar, value=calendar.SUNDAY) # year self.yearLabel = Label(self, text='Year:') self.yearVar = StringVar() self.yearEntry = Entry(self, textvariable=self.yearVar, width=4) self.wholeYearLabel = Label(self, text='Whole year:') self.wholeYear = IntVar() self.wholeYearCheck = Checkbutton(self, command=self.setWholeYear, variable=self.wholeYear) # months self.monthLabel = Label(self, text='Months:') self.monthListbox = Listbox(self, selectmode=MULTIPLE, height=12) # layout stuff self.imageLabel = Label(self, text='Draw Image Frame:') self.imageVar = IntVar() self.imageCheck = Checkbutton(self, variable=self.imageVar) # closing/running self.okButton = Button(self, text="OK", width=6, command=self.okButonn_pressed) self.cancelButton = Button(self, text="Cancel", command=self.quit) # setup values self.weekMondayRadio.select() self.typeClRadio.select() self.yearVar.set(str(datetime.date(1, 1, 1).today().year)) self.imageCheck.select() # make layout self.columnconfigure(0, pad=6) currRow = 0 self.statusLabel.grid(column=0, row=currRow, columnspan=4) currRow += 1 self.langLabel.grid(column=0, row=currRow, sticky=W) self.monthLabel.grid(column=3, row=currRow, sticky=W) currRow += 1 self.langListbox.grid(column=0, row=currRow, rowspan=6, sticky=N) self.typeLabel.grid(column=1, row=currRow, sticky=E) self.typeClRadio.grid(column=2, row=currRow, sticky=W) self.monthListbox.grid(column=3, row=currRow, rowspan=8) currRow += 1 self.typeEvRadio.grid(column=2, row=currRow, sticky=W) currRow += 1 self.weekStartsLabel.grid(column=1, row=currRow, sticky=N+E) self.weekMondayRadio.grid(column=2, row=currRow, sticky=N+W) currRow += 1 self.weekSundayRadio.grid(column=2, row=currRow, sticky=N+W) currRow += 1 self.yearLabel.grid(column=1, row=currRow, sticky=N+E) self.yearEntry.grid(column=2, row=currRow, sticky=N+W) currRow += 1 self.wholeYearLabel.grid(column=1, row=currRow, sticky=N+E) self.wholeYearCheck.grid(column=2, row=currRow, sticky=N+W) currRow += 1 self.imageLabel.grid(column=1, row=currRow, sticky=N+E) self.imageCheck.grid(column=2, row=currRow, sticky=N+W) self.langButton.grid(column=0, row=currRow) currRow += 3 self.rowconfigure(currRow, pad=6) self.okButton.grid(column=1, row=currRow, sticky=E) self.cancelButton.grid(column=2, row=currRow, sticky=W) # fill the values self.realLangChange() | 70bb2ebe53dcb8ce678ca777ef1b619a724b0a3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3910/70bb2ebe53dcb8ce678ca777ef1b619a724b0a3e/CalendarWizard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
33,
7036,
4672,
3536,
10939,
326,
6176,
3536,
468,
8884,
82,
311,
358,
326,
17981,
3880,
365,
18,
856,
273,
296,
664,
13740,
11,
8058,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
33,
7036,
4672,
3536,
10939,
326,
6176,
3536,
468,
8884,
82,
311,
358,
326,
17981,
3880,
365,
18,
856,
273,
296,
664,
13740,
11,
8058,
16186,
2738,
... |
return cmd.deferred | cmd.deferred.addErrback(lambda e,p=protocol: p.deferred.errback(e) or e) d = DeferredList([cmd.deferred, protocol.deferred]) | abcdef = re.sub('[^0-9, ]', '', line[4:]) | eec1f05e7fafe3c6336e41928ea4025e1fbb9005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eec1f05e7fafe3c6336e41928ea4025e1fbb9005/ftp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
20011,
536,
273,
283,
18,
1717,
2668,
5969,
20,
17,
29,
16,
308,
2187,
10226,
980,
63,
24,
30,
5717,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20011,
536,
273,
283,
18,
1717,
2668,
5969,
20,
17,
29,
16,
308,
2187,
10226,
980,
63,
24,
30,
5717,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
'padding': 3 | 'padding': 3, 'company_id': company_id.id | def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_acc_tax_template = self.pool.get('account.tax.code.template') obj_fiscal_position_template = self.pool.get('account.fiscal.position.template') obj_fiscal_position = self.pool.get('account.fiscal.position') analytic_journal_obj = self.pool.get('account.analytic.journal') obj_acc_chart_template = self.pool.get('account.chart.template') obj_acc_journal_view = self.pool.get('account.journal.view') mod_obj = self.pool.get('ir.model.data') obj_sequence = self.pool.get('ir.sequence') property_obj = self.pool.get('ir.property') fields_obj = self.pool.get('ir.model.fields') obj_tax_fp = self.pool.get('account.fiscal.position.tax') obj_ac_fp = self.pool.get('account.fiscal.position.account') | f943acfa3702f01fdf9706c676422fee6dbe481d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f943acfa3702f01fdf9706c676422fee6dbe481d/installer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
1425,
7463,
67,
11563,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
1081,
67,
8981,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
4631,
6134,
1081,
67,
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,
2103,
67,
1425,
7463,
67,
11563,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
1081,
67,
8981,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
4631,
6134,
1081,
67,
8... |
code = [ 'int %s(struct %s *, %s *, uint32_t *);' % ( | code = [ 'int %s(struct %s *, %s *, ev_uint32_t *);' % ( | def GetDeclaration(self, funcname): code = [ 'int %s(struct %s *, %s *, uint32_t *);' % ( funcname, self._struct.Name(), self._ctype ) ] return code | 78d4429cef4baac9bcdfc2396ce157016621c416 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/78d4429cef4baac9bcdfc2396ce157016621c416/event_rpcgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
6094,
12,
2890,
16,
1326,
529,
4672,
981,
273,
306,
296,
474,
738,
87,
12,
1697,
738,
87,
380,
16,
738,
87,
380,
16,
2113,
67,
11890,
1578,
67,
88,
380,
13869,
738,
261,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
6094,
12,
2890,
16,
1326,
529,
4672,
981,
273,
306,
296,
474,
738,
87,
12,
1697,
738,
87,
380,
16,
738,
87,
380,
16,
2113,
67,
11890,
1578,
67,
88,
380,
13869,
738,
261,
1326,
... |
start += stop | start += step | def frange(start, stop, step): while start <= stop: yield start start += stop | 966b5f9ddfcd47bed8aa5c3ff435684a927b9481 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/966b5f9ddfcd47bed8aa5c3ff435684a927b9481/test_colorsys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
3676,
12,
1937,
16,
2132,
16,
2235,
4672,
1323,
787,
1648,
2132,
30,
2824,
787,
787,
1011,
2235,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
284,
3676,
12,
1937,
16,
2132,
16,
2235,
4672,
1323,
787,
1648,
2132,
30,
2824,
787,
787,
1011,
2235,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
gc.collect() | test_support.gc_collect() | def __getattr__(self, name): if name in ("spam", "foo", "bar"): return "hello" raise AttributeError, name | 36f4733acef5aa12ca3417779ae3f11e59199f70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/36f4733acef5aa12ca3417779ae3f11e59199f70/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
309,
508,
316,
7566,
1752,
301,
3113,
315,
11351,
3113,
315,
3215,
6,
4672,
327,
315,
23711,
6,
1002,
6394,
16,
508,
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,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
309,
508,
316,
7566,
1752,
301,
3113,
315,
11351,
3113,
315,
3215,
6,
4672,
327,
315,
23711,
6,
1002,
6394,
16,
508,
2,
-100,
-100,
-100,... |
self.setMemberOption(addr, mm_cfg.DisableDelivery, 1) | self.setDeliveryStatus(addr, MemberAdaptor.BYBOUNCE) | def DisableBouncingAddress(self, addr): """Disable delivery for bouncing user address. | 03261e91d9d5f4e0cba27c7cc87a05df09b4b9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/03261e91d9d5f4e0cba27c7cc87a05df09b4b9fe/Bouncer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10639,
38,
465,
2822,
1887,
12,
2890,
16,
3091,
4672,
3536,
11879,
7912,
364,
324,
465,
2822,
729,
1758,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
10639,
38,
465,
2822,
1887,
12,
2890,
16,
3091,
4672,
3536,
11879,
7912,
364,
324,
465,
2822,
729,
1758,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
retval = _fl_stuff_clipboard(ob, type, data, size, c_lose_callback) return retval _fl_request_clipboard = cfuncproto(so_libforms, "fl_request_clipboard", cty.c_int, [cty.POINTER(FL_OBJECT), cty.c_long, FL_SELECTION_CB], | retval = _fl_stuff_clipboard(pObject, clipb_type, data, size, c_lose_callback) return retval _fl_request_clipboard = cfuncproto(so_libforms, "fl_request_clipboard", cty.c_int, [cty.POINTER(FL_OBJECT), cty.c_long, FL_SELECTION_CB], | def fl_stuff_clipboard(ob, type, data, size, py_lose_callback): """ fl_stuff_clipboard(ob, type, data, size, py_lose_callback) -> num. """ c_lose_callback = FL_LOSE_SELECTION_CB(py_lose_callback) _cfunc_refs[get_rand_dictkey()] = c_lose_callback retval = _fl_stuff_clipboard(ob, type, data, size, c_lose_callback) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
334,
3809,
67,
14161,
3752,
12,
947,
16,
618,
16,
501,
16,
963,
16,
2395,
67,
2061,
67,
3394,
4672,
3536,
1183,
67,
334,
3809,
67,
14161,
3752,
12,
947,
16,
618,
16,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
334,
3809,
67,
14161,
3752,
12,
947,
16,
618,
16,
501,
16,
963,
16,
2395,
67,
2061,
67,
3394,
4672,
3536,
1183,
67,
334,
3809,
67,
14161,
3752,
12,
947,
16,
618,
16,
501,
... |
column.pack_start (renderPixbuf, expand=FALSE) | column.pack_start (renderPixbuf, expand=False) | def __init__ (self, configList): self.model = ConfigTreeModel (configList) gtk.TreeView.__init__ (self, self.model) self.model.renderIcons (self) self.connect ("style-set", lambda widget, prevStyle: self.model.renderIcons (widget)) self.set_size_request (200, -1) self.set_headers_visible (FALSE) self.expand_all() self.get_selection().set_mode (gtk.SELECTION_BROWSE) self.get_selection().connect ("changed", self.selectionChangedSignal) column = gtk.TreeViewColumn() column.set_spacing (2) renderPixbuf = gtk.CellRendererPixbuf() column.pack_start (renderPixbuf, expand=FALSE) column.add_attribute (renderPixbuf, "pixbuf", 0) renderText = gtk.CellRendererText() column.pack_start (renderText, expand=TRUE) column.add_attribute (renderText, "markup", 1) self.append_column (column) | ab8126074d7036807d1d842171687cc01617a181 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ab8126074d7036807d1d842171687cc01617a181/driconf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
642,
682,
4672,
365,
18,
2284,
273,
1903,
2471,
1488,
261,
1425,
682,
13,
22718,
18,
2471,
1767,
16186,
2738,
972,
261,
2890,
16,
365,
18,
2284,
13,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
642,
682,
4672,
365,
18,
2284,
273,
1903,
2471,
1488,
261,
1425,
682,
13,
22718,
18,
2471,
1767,
16186,
2738,
972,
261,
2890,
16,
365,
18,
2284,
13,
365... |
"""Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. | """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. | def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
19233,
3163,
3621,
12,
2890,
16,
1041,
16,
16745,
33,
5510,
16,
2581,
33,
8381,
16,
3656,
67,
13490,
33,
7036,
16,
2944,
33,
8381,
4672,
3536,
1564,
326,
2619,
3252,
716,
279,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
19233,
3163,
3621,
12,
2890,
16,
1041,
16,
16745,
33,
5510,
16,
2581,
33,
8381,
16,
3656,
67,
13490,
33,
7036,
16,
2944,
33,
8381,
4672,
3536,
1564,
326,
2619,
3252,
716,
279,
45... |
pass | c.privmsg(nm_to_n(e.source()), self.format["help"]) | def on_privmsg(self, c, e): pass | 733c447041daea590404c94df8d5b074aedd2dc3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2050/733c447041daea590404c94df8d5b074aedd2dc3/logbot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
11365,
3576,
12,
2890,
16,
276,
16,
425,
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... | [
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,
603,
67,
11365,
3576,
12,
2890,
16,
276,
16,
425,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
try: self.disabled = self.getboolean("main", "disable") except NoSectionError, NoOptionError: pass self.userDefault = {} | try: self.disabled = self.getboolean("main", "disable") except (NoSectionError, NoOptionError): pass | def readConf(self): """Read the configuration file""" try: self.disabled = self.getboolean("main", "disable") except NoSectionError, NoOptionError: pass self.userDefault = {} if self.has_section(self.USERDEFAULT): for option in self.options(self.USERDEFAULT): self.userDefault[option] = self.get(self.USERDEFAULT, option) self.hooks = {} if self.has_section(self.HOOKS): for option in self.options(self.HOOKS): self.hooks[self.name + "." + option] = self.get(self.HOOKS, option) | 8779706f0e7e80e866a145bc274cd32f93397afd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/8779706f0e7e80e866a145bc274cd32f93397afd/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
3976,
12,
2890,
4672,
3536,
1994,
326,
1664,
585,
8395,
775,
30,
365,
18,
9278,
273,
365,
18,
588,
6494,
2932,
5254,
3113,
315,
8394,
7923,
1335,
261,
2279,
5285,
668,
16,
2631,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
3976,
12,
2890,
4672,
3536,
1994,
326,
1664,
585,
8395,
775,
30,
365,
18,
9278,
273,
365,
18,
588,
6494,
2932,
5254,
3113,
315,
8394,
7923,
1335,
261,
2279,
5285,
668,
16,
2631,
1... |
value = hasattr(self, attr) and getattr(self, attr) or None | value = getattr(self, attr, None) | def to_element(self, parent=None, nsmap=None): if parent is None: element = etree.Element(self.qname, nsmap=nsmap) else: element = etree.SubElement(parent, self.qname, nsmap=nsmap) for attr, definition in self._xml_attrs.items(): value = hasattr(self, attr) and getattr(self, attr) or None if value is not None: element.set(definition.get('xml_attribute', attr), definition.get('build', lambda x: x)(value)) self._build_element(element, nsmap) return element | 5a6aa48ec38cd1b5313842f7a65c88d6f1fa7619 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/5a6aa48ec38cd1b5313842f7a65c88d6f1fa7619/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
2956,
12,
2890,
16,
982,
33,
7036,
16,
3153,
1458,
33,
7036,
4672,
309,
982,
353,
599,
30,
930,
273,
12031,
18,
1046,
12,
2890,
18,
85,
529,
16,
3153,
1458,
33,
2387,
1458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
2956,
12,
2890,
16,
982,
33,
7036,
16,
3153,
1458,
33,
7036,
4672,
309,
982,
353,
599,
30,
930,
273,
12031,
18,
1046,
12,
2890,
18,
85,
529,
16,
3153,
1458,
33,
2387,
1458,
... |
for ob in cur.fetchall(): if self._excluded(rep, ob['pkgId']): continue real = False for filename in decodefilenamelist(ob['filenames']): if (ob['dirname']+'/'+filename).find(name) != -1: real = True if (not real): continue pkg = self.getPackageDetails(ob['pkgId']) result.append((self.pc(rep,pkg))) | for ob in cur.fetchall(): if self._excluded(rep, ob['pkgId']): continue real = False for filename in decodefilenamelist(ob['filenames']): if (ob['dirname']+'/'+filename).find(name) != -1: real = True if (not real): continue pkg = self.getPackageDetails(ob['pkgId']) result.append((self.pc(rep,pkg))) | def searchAll(self,name, query_type='like'): # This should never be called with a name containing a % assert(name.find('%') == -1) result = [] for (rep,cache) in self.primarydb.items(): cur = cache.cursor() executeSQL(cur, "select DISTINCT packages.pkgId as pkgId from provides,packages where provides.name LIKE ? AND provides.pkgKey = packages.pkgKey", (name,)) for ob in cur.fetchall(): if self._excluded(rep, ob['pkgId']): continue pkg = self.getPackageDetails(ob['pkgId']) result.append((self.pc(rep,pkg))) | c274ce2dc6860154785978b2cab9eabcbc5a9902 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5445/c274ce2dc6860154785978b2cab9eabcbc5a9902/sqlitesack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
1595,
12,
2890,
16,
529,
16,
843,
67,
723,
2218,
5625,
11,
4672,
225,
468,
1220,
1410,
5903,
506,
2566,
598,
279,
508,
4191,
279,
738,
1815,
12,
529,
18,
4720,
29909,
6134,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
1595,
12,
2890,
16,
529,
16,
843,
67,
723,
2218,
5625,
11,
4672,
225,
468,
1220,
1410,
5903,
506,
2566,
598,
279,
508,
4191,
279,
738,
1815,
12,
529,
18,
4720,
29909,
6134,
422,
... |
elif platform in ('freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'): | elif platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'): | def gen_db_minor_ver_nums(major): if major == 4: for x in range(max_db_ver[1]+1): if allow_db_ver((4, x)): yield x elif major == 3: for x in (3,): if allow_db_ver((3, x)): yield x else: raise ValueError("unknown major BerkeleyDB version", major) | 6e2b6bc3525b2033395f14b57665b888368e66d7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/6e2b6bc3525b2033395f14b57665b888368e66d7/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
1966,
67,
17364,
67,
502,
67,
21180,
12,
14019,
4672,
309,
7888,
422,
1059,
30,
364,
619,
316,
1048,
12,
1896,
67,
1966,
67,
502,
63,
21,
3737,
21,
4672,
309,
1699,
67,
196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
1966,
67,
17364,
67,
502,
67,
21180,
12,
14019,
4672,
309,
7888,
422,
1059,
30,
364,
619,
316,
1048,
12,
1896,
67,
1966,
67,
502,
63,
21,
3737,
21,
4672,
309,
1699,
67,
196... |
def remove(self, atom, quantize=self._quantize, buckets=self._buckets): key = quantize(atom.posn()) buckets[key].remove(atom) | def remove(self, atom): key = self._quantize(atom.posn()) self._buckets[key].remove(atom) | def remove(self, atom, quantize=self._quantize, buckets=self._buckets): key = quantize(atom.posn()) buckets[key].remove(atom) | ed7ccd8d8886639d580a0f43d589fd7e457cd995 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/ed7ccd8d8886639d580a0f43d589fd7e457cd995/bonds.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
12,
2890,
16,
3179,
16,
10251,
554,
33,
2890,
6315,
17753,
554,
16,
9169,
33,
2890,
6315,
20700,
4672,
498,
273,
10251,
554,
12,
7466,
18,
917,
82,
10756,
9169,
63,
856,
8009,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
12,
2890,
16,
3179,
16,
10251,
554,
33,
2890,
6315,
17753,
554,
16,
9169,
33,
2890,
6315,
20700,
4672,
498,
273,
10251,
554,
12,
7466,
18,
917,
82,
10756,
9169,
63,
856,
8009,
44... |
parser.add_option( "", "--version", dest="version", help="release version" ) | parser.add_option( "-v", "--release-version", dest="release_version", metavar="release-version", help="release version (e.g. 1.32.0)") | def accept_args( args ): #( release_version, cvs_tag, sf_user, temp_dir, start_step ) = accept_args( sys.argv[ 1: ] ) parser = optparse.OptionParser() parser.add_option( "", "--version", dest="version", help="release version" ) parser.add_option( "", "--tag", dest="tag", help="CVS tag" ) parser.add_option( "", "--user", dest="user", help="SourceForge user name" ) parser.add_option( "", "--toolset", dest="toolset", help="toolset to use to build needed tools" ) parser.usage = "make_tarballs [options] temp_dir [start_step]\n\n" + \ "Requirements:\n" + \ "\tcvs - to export sources with windows newlines \n" + \ "\tbash cvs - (cygwin) to export sources with posix newlines\n" + \ "\tbjam - to build BoostBook\n" + \ "\t7z - to create zipball\n" + \ "\tuser-config.jam in user directory ($HOME/%HOME%) - to build BoostBook\n" + \ "\tmv - posix move" ( options, args ) = parser.parse_args( args ) temp_dir = None start_step = None if ( len( args ) > 0 ): temp_dir = args[0] if ( len( args ) > 1 ): start_step = args[1] if ( start_step is None ): start_step = "" ( version, tag, user, toolset ) = ( options.version , options.tag , options.user , options.toolset ) if ( version is None or tag is None or user is None or temp_dir is None or toolset is None ): parser.print_help() sys.exit( 1 ) return ( version, tag, user, toolset, temp_dir, start_step ) | aed988a5e1a863624694559f7ea11b246f37978e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7960/aed988a5e1a863624694559f7ea11b246f37978e/make_tarballs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2791,
67,
1968,
12,
833,
262,
30,
468,
12,
3992,
67,
1589,
16,
276,
6904,
67,
2692,
16,
9033,
67,
1355,
16,
1906,
67,
1214,
16,
787,
67,
4119,
262,
273,
2791,
67,
1968,
12,
2589,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2791,
67,
1968,
12,
833,
262,
30,
468,
12,
3992,
67,
1589,
16,
276,
6904,
67,
2692,
16,
9033,
67,
1355,
16,
1906,
67,
1214,
16,
787,
67,
4119,
262,
273,
2791,
67,
1968,
12,
2589,
1... |
if urlRes.scheme == "https": | if urlRes[0] == "https": | def __getDevCmdBase( self, path ): devRoot = self.getDevPath( path ) isHTTPS = False urlRes = urlparse.urlparse( devRoot ) args = [] if urlRes.scheme == "https": isHTTPS = True | df118ae2e7d9d1070c259cf9647b97d738f5f26a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/df118ae2e7d9d1070c259cf9647b97d738f5f26a/Distribution.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
8870,
5931,
2171,
12,
365,
16,
589,
262,
30,
4461,
2375,
273,
365,
18,
588,
8870,
743,
12,
589,
262,
353,
18657,
273,
1083,
880,
607,
273,
15185,
18,
718,
2670,
12,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
588,
8870,
5931,
2171,
12,
365,
16,
589,
262,
30,
4461,
2375,
273,
365,
18,
588,
8870,
743,
12,
589,
262,
353,
18657,
273,
1083,
880,
607,
273,
15185,
18,
718,
2670,
12,
4461,
... |
foo.i386 will be compared""" | foo.i386 will be compared. Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them. """ | def returnNewestByNameArch(self, naTup=None, patterns=None, ignore_case=False): """return list of newest packages based on name, arch matching this means(in name.arch form): foo.i386 and foo.noarch are not compared to each other for highest version only foo.i386 and foo.i386 will be compared""" calr = self._computeAggregateListResult pkgs = calr("returnNewestByNameArch", naTup, patterns, ignore_case) pkgs = packagesNewestByNameArch(pkgs) if not pkgs and (naTup or patterns): ui_pats = ", ".join(patterns or []) raise PackageSackError, 'No Package Matching %s' % ui_pats return pkgs | 0ac90c93ee164ea24951926e8b26ae897ec270af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0ac90c93ee164ea24951926e8b26ae897ec270af/packageSack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
327,
1908,
395,
5911,
12269,
12,
2890,
16,
9583,
56,
416,
33,
7036,
16,
6884,
33,
7036,
16,
2305,
67,
3593,
33,
8381,
4672,
3536,
2463,
666,
434,
19824,
5907,
2511,
603,
508,
16,
6637,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
327,
1908,
395,
5911,
12269,
12,
2890,
16,
9583,
56,
416,
33,
7036,
16,
6884,
33,
7036,
16,
2305,
67,
3593,
33,
8381,
4672,
3536,
2463,
666,
434,
19824,
5907,
2511,
603,
508,
16,
6637,... |
self.word_completion.get_model().clear() self.update_completion(self.word_input.child.get_text()) self.update_completion(self.word_input.child.get_text()) | self.update_completion_and_select(self.word_input.child.get_text(), word, lang) | def remove_dict(self, dict): key = dict.key() title, version, file_name = key if self.recent_menu_items.has_key(key): old_mi = self.recent_menu_items[key] self.mn_remove.remove(old_mi) del self.recent_menu_items[key] self.dictionaries.remove(dict) tab = self.get_tab_for_dict(key) if tab: self.tabs.remove_page(tab) del self.dict_key_to_tab[dict_key] dict.close() self.word_completion.get_model().clear() self.update_completion(self.word_input.child.get_text()) self.update_completion(self.word_input.child.get_text()) self.update_title() | 959531726c990fd64610de9a89159e12eb94a90b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14305/959531726c990fd64610de9a89159e12eb94a90b/pysdic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
1576,
12,
2890,
16,
2065,
4672,
498,
273,
2065,
18,
856,
1435,
2077,
16,
1177,
16,
585,
67,
529,
273,
498,
309,
365,
18,
20872,
67,
5414,
67,
3319,
18,
5332,
67,
856,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
1576,
12,
2890,
16,
2065,
4672,
498,
273,
2065,
18,
856,
1435,
2077,
16,
1177,
16,
585,
67,
529,
273,
498,
309,
365,
18,
20872,
67,
5414,
67,
3319,
18,
5332,
67,
856,
12,
... |
ddfs=self.pop('ddfs', None))] | ddfs=ddfs)] | def __init__(self, *args, **kwargs): super(JobDict, self).__init__(*args, **kwargs) | 570480d0793b5a824518eeb52e5830ceacf240bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/570480d0793b5a824518eeb52e5830ceacf240bc/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
2240,
12,
2278,
5014,
16,
365,
2934,
972,
2738,
972,
30857,
1968,
16,
2826,
4333,
13,
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,
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,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
2240,
12,
2278,
5014,
16,
365,
2934,
972,
2738,
972,
30857,
1968,
16,
2826,
4333,
13,
2,
-100,
-100,
-100,
-100,
-100,
-... |
from ctypes import c_wchar, c_wchar_p | from ctypes import c_wchar_p | def test_cw_strings(self): from ctypes import byref, sizeof try: from ctypes import c_wchar, c_wchar_p except ImportError: | 84a4f00bb19995d00fd74600efdb21f2ba82ed99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/84a4f00bb19995d00fd74600efdb21f2ba82ed99/test_parameters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
71,
91,
67,
10219,
12,
2890,
4672,
628,
6983,
1930,
12725,
16,
13726,
775,
30,
628,
6983,
1930,
276,
67,
91,
3001,
67,
84,
1335,
11308,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
71,
91,
67,
10219,
12,
2890,
4672,
628,
6983,
1930,
12725,
16,
13726,
775,
30,
628,
6983,
1930,
276,
67,
91,
3001,
67,
84,
1335,
11308,
30,
2,
-100,
-100,
-100,
-100,
-100,
... |
if not wc.url.is_safe_url(url): raise ValueError("Invalid rating url %r." % url) | if wc.url.is_safe_url(url): return url return make_safe_url(url) | def check_url (self, url): """If url is not safe raise a ValueError.""" if not wc.url.is_safe_url(url): raise ValueError("Invalid rating url %r." % url) | 749786eada2a86317dd7f3d8900d5b69a36810e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/749786eada2a86317dd7f3d8900d5b69a36810e3/ratingstorage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
718,
261,
2890,
16,
880,
4672,
3536,
2047,
880,
353,
486,
4183,
1002,
279,
2068,
12123,
309,
486,
14310,
18,
718,
18,
291,
67,
4626,
67,
718,
12,
718,
4672,
1002,
2068,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
718,
261,
2890,
16,
880,
4672,
3536,
2047,
880,
353,
486,
4183,
1002,
279,
2068,
12123,
309,
486,
14310,
18,
718,
18,
291,
67,
4626,
67,
718,
12,
718,
4672,
1002,
2068,
2932,
... |
if self.debugging: print '*cmd*', `line` | if self.debugging: print '*cmd*', self.sanitize(line) | def putcmd(self, line): if self.debugging: print '*cmd*', `line` self.putline(line) | 63e263f517f8518a2f3e9fcad5d9a81461259949 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/63e263f517f8518a2f3e9fcad5d9a81461259949/ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
4172,
12,
2890,
16,
980,
4672,
309,
365,
18,
4148,
1998,
30,
1172,
14609,
4172,
14,
2187,
365,
18,
20266,
12,
1369,
13,
365,
18,
458,
1369,
12,
1369,
13,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
4172,
12,
2890,
16,
980,
4672,
309,
365,
18,
4148,
1998,
30,
1172,
14609,
4172,
14,
2187,
365,
18,
20266,
12,
1369,
13,
365,
18,
458,
1369,
12,
1369,
13,
2,
-100,
-100,
-100,
-... |
error("package version must have numeric part before the '_'") | bb.error("package version must have numeric part before the '_'") | def ververify(myorigval,silent=1): """Returns 1 if given a valid version string, els 0. Valid versions are in the format <v1>.<v2>...<vx>[a-z,_{_package_weights_}[vy]] >>> ververify('2.4.20') 1 >>> ververify('2.4..20') # two dots 0 >>> ververify('2.x.20') # 'x' is not numeric 0 >>> ververify('2.4.20a') 1 >>> ververify('2.4.20cvs') # only one trailing letter 0 >>> ververify('1a') 1 >>> ververify('test_a') # no version at all 0 >>> ververify('2.4.20_beta1') 1 >>> ververify('2.4.20_beta') 1 >>> ververify('2.4.20_wrongext') # _wrongext is no valid trailer 0 """ # Lookup the cache first try: return __ververify_cache__[myorigval] except KeyError: pass if len(myorigval) == 0: if not silent: error("package version is empty") __ververify_cache__[myorigval] = 0 return 0 myval = myorigval.split('.') if len(myval)==0: if not silent: error("package name has empty version string") __ververify_cache__[myorigval] = 0 return 0 # all but the last version must be a numeric for x in myval[:-1]: if not len(x): if not silent: error("package version has two points in a row") __ververify_cache__[myorigval] = 0 return 0 try: foo = int(x) except: if not silent: error("package version contains non-numeric '"+x+"'") __ververify_cache__[myorigval] = 0 return 0 if not len(myval[-1]): if not silent: error("package version has trailing dot") __ververify_cache__[myorigval] = 0 return 0 try: foo = int(myval[-1]) __ververify_cache__[myorigval] = 1 return 1 except: pass # ok, our last component is not a plain number or blank, let's continue if myval[-1][-1] in lowercase: try: foo = int(myval[-1][:-1]) return 1 __ververify_cache__[myorigval] = 1 # 1a, 2.0b, etc. except: pass # ok, maybe we have a 1_alpha or 1_beta2; let's see ep=string.split(myval[-1],"_") if len(ep)!= 2: if not silent: error("package version has more than one letter at then end") __ververify_cache__[myorigval] = 0 return 0 try: foo = string.atoi(ep[0]) except: # this needs to be numeric, i.e. the "1" in "1_alpha" if not silent: error("package version must have numeric part before the '_'") __ververify_cache__[myorigval] = 0 return 0 for mye in _package_ends_: if ep[1][0:len(mye)] == mye: if len(mye) == len(ep[1]): # no trailing numeric is ok __ververify_cache__[myorigval] = 1 return 1 else: try: foo = string.atoi(ep[1][len(mye):]) __ververify_cache__[myorigval] = 1 return 1 except: # if no _package_weights_ work, *then* we return 0 pass if not silent: error("package version extension after '_' is invalid") __ververify_cache__[myorigval] = 0 return 0 | 8f83be3338d7aef4b6fcef5ea89dc69fa587c1f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/8f83be3338d7aef4b6fcef5ea89dc69fa587c1f6/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1924,
8705,
12,
4811,
4949,
1125,
16,
21862,
33,
21,
4672,
3536,
1356,
404,
309,
864,
279,
923,
1177,
533,
16,
7842,
374,
18,
2364,
5244,
854,
316,
326,
740,
225,
411,
90,
21,
18652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1924,
8705,
12,
4811,
4949,
1125,
16,
21862,
33,
21,
4672,
3536,
1356,
404,
309,
864,
279,
923,
1177,
533,
16,
7842,
374,
18,
2364,
5244,
854,
316,
326,
740,
225,
411,
90,
21,
18652,
... |
tlo = down_vector[k - 1] thi = down_vector[k + 1] | tlo = down_vector[self.downoff + k - 1] thi = down_vector[self.downoff + k + 1] | def _findSMS(self, a_lower, a_upper, b_lower, b_upper, find_minimal): """ Finds the Shortest Middle Snake. """ down_vector = self.fdiag # The vector for the (0, 0) to (x, y) search up_vector = self.bdiag # The vector for the (u, v) to (N, M) search | 97543e17e72ffa73040dbf9d8592f08aa6cf12c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/97543e17e72ffa73040dbf9d8592f08aa6cf12c3/myersdiff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
29533,
12,
2890,
16,
279,
67,
8167,
16,
279,
67,
5797,
16,
324,
67,
8167,
16,
324,
67,
5797,
16,
1104,
67,
1154,
2840,
4672,
3536,
4163,
87,
326,
7925,
395,
490,
3132,
189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4720,
29533,
12,
2890,
16,
279,
67,
8167,
16,
279,
67,
5797,
16,
324,
67,
8167,
16,
324,
67,
5797,
16,
1104,
67,
1154,
2840,
4672,
3536,
4163,
87,
326,
7925,
395,
490,
3132,
189... |
if filterspec: | if self.classname and filterspec: | def indexargs_form(self, columns=1, sort=1, group=1, filter=1, filterspec=1): ''' return the current index args as form elements ''' l = [] sc = self.special_char s = self.input(type="hidden",name="%s",value="%s") if columns and self.columns: l.append(s%(sc+'columns', ','.join(self.columns))) if sort and self.sort[1] is not None: if self.sort[0] == '-': val = '-'+self.sort[1] else: val = self.sort[1] l.append(s%(sc+'sort', val)) if group and self.group[1] is not None: if self.group[0] == '-': val = '-'+self.group[1] else: val = self.group[1] l.append(s%(sc+'group', val)) if filter and self.filter: l.append(s%(sc+'filter', ','.join(self.filter))) if filterspec: props = self.client.db.getclass(self.classname).getprops() for k,v in self.filterspec.items(): if type(v) == type([]): if isinstance(props[k], hyperdb.String): l.append(s%(k, ' '.join(v))) else: l.append(s%(k, ','.join(v))) else: l.append(s%(k, v)) if self.search_text: l.append(s%(sc+'search_text', self.search_text)) l.append(s%(sc+'pagesize', self.pagesize)) l.append(s%(sc+'startwith', self.startwith)) return '\n'.join(l) | 1fcedf669200e41300c9ba959649dd2ea52c4770 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1fcedf669200e41300c9ba959649dd2ea52c4770/templating.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
1968,
67,
687,
12,
2890,
16,
2168,
33,
21,
16,
1524,
33,
21,
16,
1041,
33,
21,
16,
1034,
33,
21,
16,
1034,
2793,
33,
21,
4672,
9163,
327,
326,
783,
770,
833,
487,
646,
2186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
1968,
67,
687,
12,
2890,
16,
2168,
33,
21,
16,
1524,
33,
21,
16,
1041,
33,
21,
16,
1034,
33,
21,
16,
1034,
2793,
33,
21,
4672,
9163,
327,
326,
783,
770,
833,
487,
646,
2186,
... |
opts, args = getopt.getopt(sys.argv[1:], 'i:') | opts, args = getopt.getopt(sys.argv[1:], 'i:p') | def main(): global new_interpreter usage = ('usage: %s -i /interpreter file-or-directory ...\n' % sys.argv[0]) try: opts, args = getopt.getopt(sys.argv[1:], 'i:') except getopt.error as msg: err(msg + '\n') err(usage) sys.exit(2) for o, a in opts: if o == '-i': new_interpreter = a.encode() if not new_interpreter or not new_interpreter.startswith(b'/') or \ not args: err('-i option or file-or-directory missing\n') err(usage) sys.exit(2) bad = 0 for arg in args: if os.path.isdir(arg): if recursedown(arg): bad = 1 elif os.path.islink(arg): err(arg + ': will not process symbolic links\n') bad = 1 else: if fix(arg): bad = 1 sys.exit(bad) | 2ca8adf996fd34ee812a4f5c0163d1db87d014ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/2ca8adf996fd34ee812a4f5c0163d1db87d014ab/pathfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
394,
67,
2761,
11599,
4084,
273,
7707,
9167,
30,
738,
87,
300,
77,
342,
2761,
11599,
585,
17,
280,
17,
5149,
1372,
64,
82,
11,
738,
2589,
18,
19485,
63,
20,
5717,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
394,
67,
2761,
11599,
4084,
273,
7707,
9167,
30,
738,
87,
300,
77,
342,
2761,
11599,
585,
17,
280,
17,
5149,
1372,
64,
82,
11,
738,
2589,
18,
19485,
63,
20,
5717,
... |
return st[stat.ST_MTIME] | return st[stat.ST_ATIME] | def getatime(filename): """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) return st[stat.ST_MTIME] | 5a3d2b8bab038301f414d510c1a8aacf56670603 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5a3d2b8bab038301f414d510c1a8aacf56670603/posixpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
270,
494,
12,
3459,
4672,
3536,
990,
326,
1142,
2006,
813,
434,
279,
585,
16,
14010,
635,
1140,
18,
5642,
1435,
12123,
384,
273,
1140,
18,
5642,
12,
3459,
13,
327,
384,
63,
5642,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
270,
494,
12,
3459,
4672,
3536,
990,
326,
1142,
2006,
813,
434,
279,
585,
16,
14010,
635,
1140,
18,
5642,
1435,
12123,
384,
273,
1140,
18,
5642,
12,
3459,
13,
327,
384,
63,
5642,
... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 306) else quickfix.StringField.__init__(self, 306, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
5196,
26,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
5196,
26,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
97... |
other. See 'check-sync-dirs.py' for more details.''' % (copy, original)) | other. See 'check-sync-dirs.py' for more details.''' \ % (copy, original) | def report(copy, original, differing): global differences_found if not differences_found: print >> sys.stderr, "TEST-UNEXPECTED-FAIL | build file copies are not in sync" print >> sys.stderr, "file(s) found in: %s" % (copy) print >> sys.stderr, ("differ from their originals in: %s" % (original)) print >> sys.stderr, "file differs: %s" % (differing) differences_found = True | 872682b57d2a71e4ae8e60165d0c874a4b2089f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/872682b57d2a71e4ae8e60165d0c874a4b2089f3/check-sync-dirs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
12,
3530,
16,
2282,
16,
15221,
310,
4672,
2552,
16440,
67,
7015,
309,
486,
16440,
67,
7015,
30,
1172,
1671,
2589,
18,
11241,
16,
315,
16961,
17,
2124,
27409,
17,
12319,
571,
1361,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
12,
3530,
16,
2282,
16,
15221,
310,
4672,
2552,
16440,
67,
7015,
309,
486,
16440,
67,
7015,
30,
1172,
1671,
2589,
18,
11241,
16,
315,
16961,
17,
2124,
27409,
17,
12319,
571,
1361,
... |
updates.extend(_setmovepointer(child.postupdates(), offsets)) return set(updates) | updates |= child.postupdates().movepointer(offsets) return updates | def bodypostupdates(self): offsets = 0 updates = [] for child in self[::-1]: ioffsets = child.offsets() if ioffsets is None: updates.append(None) break offsets -= ioffsets updates.extend(_setmovepointer(child.postupdates(), offsets)) return set(updates) | 71e0598bb7dc6d9b90f66161eeb283e8ddccc073 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/71e0598bb7dc6d9b90f66161eeb283e8ddccc073/esotope-bfc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
369,
879,
669,
14703,
12,
2890,
4672,
8738,
273,
374,
4533,
273,
5378,
364,
1151,
316,
365,
63,
2866,
17,
21,
14542,
277,
16542,
273,
1151,
18,
16542,
1435,
309,
277,
16542,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
369,
879,
669,
14703,
12,
2890,
4672,
8738,
273,
374,
4533,
273,
5378,
364,
1151,
316,
365,
63,
2866,
17,
21,
14542,
277,
16542,
273,
1151,
18,
16542,
1435,
309,
277,
16542,
353,
... |
'\\\xd0\x9f' | b'\\\xd0\x9f' | def test_pep263(self): self.assertEqual( "".encode("utf-8"), '\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd' ) self.assertEqual( "\".encode("utf-8"), '\\\xd0\x9f' ) | 26ec0477da4d3e26dad4171439b183558e725f73 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/26ec0477da4d3e26dad4171439b183558e725f73/test_pep263.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
29363,
22,
4449,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
1408,
18,
3015,
2932,
3158,
17,
28,
6,
3631,
2337,
7669,
20,
64,
92,
29,
74,
64,
7669,
20,
64,
6114,
28,
64,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
29363,
22,
4449,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
1408,
18,
3015,
2932,
3158,
17,
28,
6,
3631,
2337,
7669,
20,
64,
92,
29,
74,
64,
7669,
20,
64,
6114,
28,
64,
76... |
request, src_addr = dlg.wait_msg_from(10) | request, src_addr = dlg.wait_msg_from(30) | def test_func(test): pjsua = test.process[0] dlg = sip.Dialog("127.0.0.1", pjsua.inst_param.sip_port, local_port=srv_port, tcp=cfg_file.recvfrom_cfg.tcp) last_cseq = 0 last_method = "" for t in cfg_file.recvfrom_cfg.transaction: # Print transaction title if t.title != "": dlg.trace(t.title) # Run command and expect patterns for c in t.cmds: if c[0] and c[0] != "": pjsua.send(c[0]) if len(c)>1 and c[1] and c[1] != "": pjsua.expect(c[1]) # Wait for request if t.check_cseq: # Absorbs retransmissions cseq = 0 method = last_method while cseq <= last_cseq and method == last_method: request, src_addr = dlg.wait_msg_from(10) if request==None or request=="": raise TestError("Timeout waiting for request") method = request.split(" ", 1)[0] cseq_hval = sip.get_header(request, "CSeq") cseq_hval = cseq_hval.split(" ")[0] cseq = int(cseq_hval) last_cseq = cseq last_method = method else: request, src_addr = dlg.wait_msg_from(10) if request==None or request=="": raise TestError("Timeout waiting for request") # Check for include patterns for pat in t.include: if re.search(pat, request, re.M | re.I)==None: if t.title: tname = " in " + t.title + " transaction" else: tname = "" raise TestError("Pattern " + pat + " not found" + tname) # Check for exclude patterns for pat in t.exclude: if re.search(pat, request, re.M | re.I)!=None: if t.title: tname = " in " + t.title + " transaction" else: tname = "" raise TestError("Excluded pattern " + pat + " found" + tname) # Create response if t.resp_code!=0: response = dlg.create_response(request, t.resp_code, "Status reason") # Add headers to response for h in t.resp_hdr: response = response + h + "\r\n" # Add message body if required if t.body: response = response + t.body # Send response dlg.send_msg(response, src_addr) # Expect something to happen in pjsua if t.expect != "": pjsua.expect(t.expect) # Sync pjsua.sync_stdout() | 100a380d2ad937011127ff124c3d220ce81e19b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8531/100a380d2ad937011127ff124c3d220ce81e19b5/mod_recvfrom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
644,
12,
3813,
4672,
293,
2924,
11886,
273,
1842,
18,
2567,
63,
20,
65,
25840,
273,
10341,
18,
6353,
2932,
14260,
18,
20,
18,
20,
18,
21,
3113,
293,
2924,
11886,
18,
8591,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
644,
12,
3813,
4672,
293,
2924,
11886,
273,
1842,
18,
2567,
63,
20,
65,
25840,
273,
10341,
18,
6353,
2932,
14260,
18,
20,
18,
20,
18,
21,
3113,
293,
2924,
11886,
18,
8591,
... |
return launch_win_installer_build(platform) | return launch_win_installer_build(installdir) | def main(): #IGNORE:R0911 """ Creates installers for selected platforms. """ parser = OptionParser("%prog <platform> <installation directory>") parser.add_option("-v", "--verbose", action="store_true", default=False, help="Show verbose output", dest="VERBOSE") options, args = parser.parse_args() if len(args) != 2: parser.error("Incorrect number of arguments") return 1 platform, installdir = args global VERBOSE #IGNORE:W0603 VERBOSE = options.VERBOSE if VERBOSE: print "Platform:", platform print "Installation directory:", installdir if platform == "Win32": return launch_win_installer_build(installdir) if platform == "Win64": return launch_win_installer_build(platform) if platform == "Linux32": return launch_rpm_build(installdir) if platform == "Linux64": return launch_rpm_build(installdir) if platform == "FreeBSD32": return do_nothing(platform) if platform == "PowerMAC": return mac_post_build(installdir) if platform == "SunOSSparc": return do_nothing(platform) if platform == "SunOSx86": return do_nothing(platform) print >> sys.stderr, "Unknown OS identifier: " + platform print >> sys.stderr, "Exiting post build script." return 2 | 348acfc07009790305e1525652e4acda136437ac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/310/348acfc07009790305e1525652e4acda136437ac/make_installers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
20118,
30,
54,
5908,
2499,
3536,
10210,
3799,
414,
364,
3170,
17422,
18,
3536,
2082,
273,
18862,
27188,
14654,
411,
9898,
34,
411,
5425,
367,
1867,
2984,
13,
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,
468,
20118,
30,
54,
5908,
2499,
3536,
10210,
3799,
414,
364,
3170,
17422,
18,
3536,
2082,
273,
18862,
27188,
14654,
411,
9898,
34,
411,
5425,
367,
1867,
2984,
13,
2082,
18,
... |
filename = QFileDialog.getOpenFileName('./reports', "Reports (*.xml *.rpt)") | filename = QFileDialog.getOpenFileName(self, './reports', "Reports (*.xml *.rpt)") | def chooseReportFile(self): | 91c8df1f41cfc1add7f8ea2e9f243a03f2ec33fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/91c8df1f41cfc1add7f8ea2e9f243a03f2ec33fd/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
4820,
812,
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,
9876,
4820,
812,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
local_ip = host.outgoing_ip_for(self._invitation.sdp.proposed_remote.connection.address) | sdp_connection = self._invitation.sdp.proposed_remote.connection or (media.connection for media in self._invitation.sdp.proposed_remote.media if media.connection is not None).next() local_ip = host.outgoing_ip_for(sdp_connection.address) | def accept(self, streams): self.greenlet = api.getcurrent() notification_center = NotificationCenter() settings = SIPSimpleSettings() | 17c8ef1eb5bdc4633108349b16115feb114cb65a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5703/17c8ef1eb5bdc4633108349b16115feb114cb65a/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2791,
12,
2890,
16,
8205,
4672,
365,
18,
11571,
1810,
273,
1536,
18,
588,
2972,
1435,
3851,
67,
5693,
273,
8050,
8449,
1435,
1947,
273,
348,
2579,
5784,
2628,
1435,
2,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2791,
12,
2890,
16,
8205,
4672,
365,
18,
11571,
1810,
273,
1536,
18,
588,
2972,
1435,
3851,
67,
5693,
273,
8050,
8449,
1435,
1947,
273,
348,
2579,
5784,
2628,
1435,
2,
-100,
-100,
-100,
... |
% (redir.title(), error)) | % (redir.title(), error)) | def fix_1_double_redirect(self, redir_name): redir = wikipedia.Page(self.site, redir_name) # Show the title of the page we're working on. # Highlight the title in purple. wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % redir.title()) newRedir = redir redirList = [] # bookkeeping to detect loops while True: redirList.append(u'%s:%s' % (newRedir.site().lang, newRedir.sectionFreeTitle())) try: targetPage = newRedir.getRedirectTarget() except wikipedia.IsNotRedirectPage: if len(redirList) == 1: wikipedia.output(u'Skipping: Page %s is not a redirect.' % redir.aslink()) break #do nothing elif len(redirList) == 2: wikipedia.output( u'Skipping: Redirect target %s is not a redirect.' % newRedir.aslink()) break # do nothing except wikipedia.SectionError: wikipedia.output( u'Warning: Redirect target section %s doesn\'t exist.' % newRedir.aslink()) except wikipedia.BadTitle, e: # str(e) is in the format 'BadTitle: [[Foo]]' wikipedia.output( u'Warning: Redirect target %s is not a valid page title.' % str(e)[10:]) #sometimes this error occures. Invalid Title starting with a '#' except wikipedia.InvalidTitle, err: wikipedia.output(u'Warning: %s' % err) break except wikipedia.NoPage: if len(redirList) == 1: wikipedia.output(u'Skipping: Page %s does not exist.' % redir.aslink()) break else: if self.always: wikipedia.output( u"Skipping: Redirect target %s doesn't exist." % newRedir.aslink()) break # skip if automatic else: wikipedia.output( u"Warning: Redirect target %s doesn't exist." % newRedir.aslink()) except wikipedia.ServerError: wikipedia.output(u'Skipping: Server Error') break else: wikipedia.output( u' Links to: %s.' % targetPage.aslink()) if targetPage.site() != self.site: wikipedia.output(u'Warning: redirect target (%s) is on a different site.' % (targetPage.aslink())) if self.always: break # skip if automatic # watch out for redirect loops if redirList.count(u'%s:%s' % (targetPage.site().lang, targetPage.sectionFreeTitle()) ) > 0: wikipedia.output( u'Warning: Redirect target %s forms a redirect loop.' % targetPage.aslink()) break ###xqt doesn't work. edits twice! try: content = targetPage.get(get_redirect=True) except wikipedia.SectionError: content = wikipedia.Page( targetPage.site(), targetPage.sectionFreeTitle() ).get(get_redirect=True) if targetPage.site().lang in sd_template \ and targetPage.site().lang in sd_tagging_sum: wikipedia.output(u"Tagging redirect for deletion") # Delete the two redirects content = wikipedia.translate(targetPage.site().lang, sd_template)+"\n"+content summ = wikipedia.translate(targetPage.site().lang, sd_tagging_sum) targetPage.put(content, summ) redir.put(content, summ) else: break # TODO Better implement loop redirect else: newRedir = targetPage continue # try: oldText = redir.get(get_redirect=True) except wikipedia.BadTitle: wikipedia.output(u"Bad Title Error") break text = self.site.redirectRegex().sub( '#%s %s' % (self.site.redirect( True ), targetPage.aslink()), oldText) if text == oldText: break summary = wikipedia.translate(self.site, msg_double) % targetPage.aslink() wikipedia.showDiff(oldText, text) if self.prompt(u'Do you want to accept the changes?'): try: redir.put(text, summary) except wikipedia.LockedPage: wikipedia.output(u'%s is locked.' % redir.title()) except wikipedia.SpamfilterError, error: wikipedia.output(u"Saving page [[%s]] prevented by spam filter: %s" % (redir.title(), error.url)) except wikipedia.PageNotSaved, error: wikipedia.output(u"Saving page [[%s]] failed: %s" % (redir.title(), error)) except wikipedia.NoUsername: wikipedia.output(u"Page [[%s]] not saved; sysop privileges required." % redir.title()) except wikipedia.Error, error: wikipedia.output(u"Unexpected error occurred trying to save [[%s]]: %s" % (redir.title(), error)) break | c499f5c4d7eb66e6b361af0a88786c3f2ea91f11 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/c499f5c4d7eb66e6b361af0a88786c3f2ea91f11/redirect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
21,
67,
9056,
67,
7590,
12,
2890,
16,
225,
283,
1214,
67,
529,
4672,
283,
1214,
273,
21137,
18,
1964,
12,
2890,
18,
4256,
16,
283,
1214,
67,
529,
13,
468,
9674,
326,
2077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
21,
67,
9056,
67,
7590,
12,
2890,
16,
225,
283,
1214,
67,
529,
4672,
283,
1214,
273,
21137,
18,
1964,
12,
2890,
18,
4256,
16,
283,
1214,
67,
529,
13,
468,
9674,
326,
2077,
... |
'''%(info, context.position[0], niceDict(' ', context.global_vars), niceDict(' ', context.local_vars))) | ''') % { 'info': info, 'line': context.position[0], 'globals': niceDict(' ', context.global_vars), 'locals': niceDict(' ', context.local_vars) }) | 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,
4672,
2904,
273,
276,
10052,
18,
6939,
328,
273,
10228,
32,
76,
21,
34,
26033,
1776,
1068,
1757,
76,
21,
1870,
16,
2368,
84,
4438,
70,
9822,
87,
175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
2904,
273,
276,
10052,
18,
6939,
328,
273,
10228,
32,
76,
21,
34,
26033,
1776,
1068,
1757,
76,
21,
1870,
16,
2368,
84,
4438,
70,
9822,
87,
175... |
class module_config(wizard.interface): def _action_open(self, cr, uid, datas, context=None): pool=pooler.get_pool(cr.dbname) model_data_obj = pool.get('ir.model.data') act_window_obj = pool.get('ir.actions.act_window') model_data_ids = model_data_obj.search(cr, uid, [ ('name', '=', 'open_module_tree'), ('module', '=', 'base'), ], limit=1, context=context) model_data = model_data_obj.browse(cr, uid, model_data_ids[0], context=context) res = act_window_obj.read(cr, uid, model_data.res_id, context=context) return res states = { 'init': { 'result': { 'type': 'action', 'action': _action_open, 'state': 'end', }, }, } module_config('ir.module.module.config') | def _config(self, cr, uid, data, context=None): return { 'view_type': 'form', 'res_model': 'ir.module.module.configuration.wizard', 'type': 'ir.actions.act_window', } | 1fa164e496a4c038b37d28ad699e7f341ee66d47 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/1fa164e496a4c038b37d28ad699e7f341ee66d47/wizard_module_upgrade.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1425,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
33,
7036,
4672,
327,
288,
296,
1945,
67,
723,
4278,
296,
687,
2187,
296,
455,
67,
2284,
4278,
296,
481,
18,
2978,
18,
2978,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1425,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
33,
7036,
4672,
327,
288,
296,
1945,
67,
723,
4278,
296,
687,
2187,
296,
455,
67,
2284,
4278,
296,
481,
18,
2978,
18,
2978,... | |
run_command(["git", "add", path]) | self.run(["git", "add", path]) | def add(self, path): # path is assumed to be cwd relative? run_command(["git", "add", path]) | 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,
527,
12,
2890,
16,
589,
4672,
468,
589,
353,
12034,
358,
506,
7239,
3632,
35,
1086,
67,
3076,
3816,
6,
6845,
3113,
315,
1289,
3113,
589,
5717,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
589,
4672,
468,
589,
353,
12034,
358,
506,
7239,
3632,
35,
1086,
67,
3076,
3816,
6,
6845,
3113,
315,
1289,
3113,
589,
5717,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
allDay = Block.findBlockByName('AllDayEventsCanvas') splitter.widget.MoveSash(allDay.widget.collapsedHeight) | splitter.widget.MoveSash( splitter.size.height * splitter.splitPercentage ) | def wxSynchronizeWidget(self): super (wxBoxContainer, self).wxSynchronizeWidget () | 0f03a5ed0909b2a77b3a2c183afb8162893784cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/0f03a5ed0909b2a77b3a2c183afb8162893784cc/ContainerBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7075,
19298,
554,
4609,
12,
2890,
4672,
2240,
261,
27226,
3514,
2170,
16,
365,
2934,
27226,
19298,
554,
4609,
1832,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
7075,
19298,
554,
4609,
12,
2890,
4672,
2240,
261,
27226,
3514,
2170,
16,
365,
2934,
27226,
19298,
554,
4609,
1832,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
R = self.base_ring()[str(self.variables()[0])] | if self.is_constant(): R = self.base_ring()[self.parent().variable_names()[0]] else: R = self.base_ring()[str(self.variables()[0])] | def univariate_polynomial(self, R=None): """ Returns a univariate polynomial associated to this multivariate polynomial. INPUT: - ``R`` - (default: None) PolynomialRing If this polynomial is not in at most one variable, then a ValueError exception is raised. This is checked using the is_univariate() method. The new Polynomial is over the same base ring as the given MPolynomial. EXAMPLES:: sage: R.<x,y> = QQbar[] sage: f = 3*x^2 - 2*y + 7*x^2*y^2 + 5 sage: f.univariate_polynomial() Traceback (most recent call last): ... TypeError: polynomial must involve at most one variable sage: g = f.subs({x:10}); g 700*y^2 + (-2)*y + 305 sage: g.univariate_polynomial () 700*y^2 - 2*y + 305 sage: g.univariate_polynomial(PolynomialRing(QQ,'z')) 700*z^2 - 2*z + 305 | 51589e9df1b913ca3c6bcaa53c35ce745f490808 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/51589e9df1b913ca3c6bcaa53c35ce745f490808/multi_polynomial_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
27693,
67,
3915,
13602,
12,
2890,
16,
534,
33,
7036,
4672,
3536,
2860,
279,
640,
27693,
16991,
3627,
358,
333,
1778,
27693,
16991,
18,
225,
12943,
30,
282,
300,
225,
12176,
54,
1033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
27693,
67,
3915,
13602,
12,
2890,
16,
534,
33,
7036,
4672,
3536,
2860,
279,
640,
27693,
16991,
3627,
358,
333,
1778,
27693,
16991,
18,
225,
12943,
30,
282,
300,
225,
12176,
54,
1033... |
output = pydoc.TextDoc().docmodule(module) | doc = pydoc.TextDoc() loc = doc.getdocloc(pydoc_mod) or "" if loc: loc = "\nMODULE DOCS\n " + loc + "\n" output = doc.docmodule(module) | def get_pydoc_text(module): "Returns pydoc generated output as text" output = pydoc.TextDoc().docmodule(module) # cleanup the extra text formatting that pydoc preforms patt = re.compile('\b.') output = patt.sub('', output) return output.strip() | 6ec2b5f40afcf701d16a141f23f0a252b0a01b35 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/6ec2b5f40afcf701d16a141f23f0a252b0a01b35/test_pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2074,
2434,
67,
955,
12,
2978,
4672,
315,
1356,
2395,
2434,
4374,
876,
487,
977,
6,
997,
273,
2395,
2434,
18,
1528,
1759,
1435,
1515,
273,
997,
18,
588,
2434,
1829,
12,
2074,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2074,
2434,
67,
955,
12,
2978,
4672,
315,
1356,
2395,
2434,
4374,
876,
487,
977,
6,
997,
273,
2395,
2434,
18,
1528,
1759,
1435,
1515,
273,
997,
18,
588,
2434,
1829,
12,
2074,
... |
if hasattr(ob, '__class__'): fixClassImplements(ob.__class__) | def _hook(iface, ob, lookup=globalRegistry.lookup1): # FIXME: Workaround zope.interface bug: # Once you look up something in AdapterRegistry, # any further 'classProvides(Only)' statements will not work. # Until this is fixed, make *sure* fixClassImplements was # called before looking anything up in AdapterRegistry. # http://collector.zope.org/Zope3-dev/349 if hasattr(ob, '__class__'): fixClassImplements(ob.__class__) factory = lookup(declarations.providedBy(ob), iface) if factory is None: return None else: return factory(ob) | 00ebf1a1b482ac1f5028e713c4547eaca848cfb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/00ebf1a1b482ac1f5028e713c4547eaca848cfb3/components.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4476,
12,
31479,
16,
3768,
16,
3689,
33,
6347,
4243,
18,
8664,
21,
4672,
468,
9852,
30,
4147,
12716,
998,
1306,
18,
5831,
7934,
30,
468,
12419,
1846,
2324,
731,
5943,
316,
14238,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4476,
12,
31479,
16,
3768,
16,
3689,
33,
6347,
4243,
18,
8664,
21,
4672,
468,
9852,
30,
4147,
12716,
998,
1306,
18,
5831,
7934,
30,
468,
12419,
1846,
2324,
731,
5943,
316,
14238,
... | |
res = askItems([('Number of static points',10),('Background',None,'radio',['Tiles','Structured points','Random points']),('Rotations',2),('Rotation angle',2),('Number of random points',300)]) | res = askItems([('Number of static points',10),('Background',None,'radio',{'choices':['Tiles','Structured points','Random points']}),('Rotations',2),('Rotation angle',2),('Number of random points',300)]) | def MotionInducedBlindness(): """Motion Induced Blindness This is a very nice illusion. Look at the centre of the image. The moving background will give the illusion that the other static points disappear. Blinking or changing your focus will immediately undo the effect. Cool huh? """ resetview('black') res = askItems([('Number of static points',10),('Background',None,'radio',['Tiles','Structured points','Random points']),('Rotations',2),('Rotation angle',2),('Number of random points',300)]) if not res: return nr,a,rot,back,n = res['Number of random points'],res['Rotation angle'],res['Rotations'],res['Background'],res['Number of static points'] draw(shape('star').scale(0.4),color=red,linewidth=2) points = Formex([[0,-10,0]]).rosette(n,360./n) draw(points,color=rand(3),marksize=10) col=rand(3) if back=='Tiles': F = shape('plus').replic2(11,11,3,3).translate([-15,-15,0]) elif back=='Structured points': F = Formex([[0,0,0]]).replic2(30,30,1).translate([-15,-15,0]) else: F = Formex(random.random((nr,3))).scale([30,30,0]).translate([-15,-15,0]) for i in range(rot*360/a): F = F.rotate(a) dr = draw(F,color=col,linewidth=2,bbox=[[-10,-10,0],[10,10,0]]) if i>0: undraw(DR) DR = dr | 6accbdb3eb00e92287843503eb4e3bbd3b28118f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2499/6accbdb3eb00e92287843503eb4e3bbd3b28118f/OpticalIllusions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28994,
382,
2544,
3263,
4802,
728,
4496,
13332,
3536,
29360,
657,
2544,
3263,
8069,
728,
4496,
225,
1220,
353,
279,
8572,
13752,
277,
2906,
7063,
18,
10176,
622,
326,
8301,
266,
434,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28994,
382,
2544,
3263,
4802,
728,
4496,
13332,
3536,
29360,
657,
2544,
3263,
8069,
728,
4496,
225,
1220,
353,
279,
8572,
13752,
277,
2906,
7063,
18,
10176,
622,
326,
8301,
266,
434,
326,
... |
oldTime = LIGOTimeGPS(trigger.end_time,trigger.end_time_ns) | oldTime = date.LIGOTimeGPS(trigger.end_time,trigger.end_time_ns) | def slideTriggersOnRings(triggerList, rings, shifts): """ In-place modify trigger_list so that triggers are slid by appropriate value of shifts along their enclosing ring segment by the algorithm given in XXX. This function calls the function slideTimeOnRing @param triggerList: a SnglInspiralTable @param rings: sorted segment list of possible rings @param shifts: a dictionary of the time-shifts keyed by IFO """ for trigger in triggerList: oldTime = LIGOTimeGPS(trigger.end_time,trigger.end_time_ns) ringIdx = rings.find(oldTime) ring = rings[ringIdx] # check that trigger was represented in rings, actually if ringIdx == len(rings): print >> sys.stderr, "DireErrorAboutRounding" sys.exit(1) # algorithm sanity check: trigger in chosen ring assert trigger.end_time in ring newTime = slideTimeOnRing(oldTime, shifts[trigger.ifo], ring) trigger.end_time = newTime.seconds trigger.end_time_ns = newTime.nanoseconds | 1bcb2e321ad2e8c794399c6f8ca75fa7f409ebb3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/1bcb2e321ad2e8c794399c6f8ca75fa7f409ebb3/SnglInspiralUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12701,
15114,
1398,
54,
899,
12,
10668,
682,
16,
26537,
16,
27552,
4672,
3536,
657,
17,
964,
5612,
3080,
67,
1098,
1427,
716,
11752,
854,
2020,
350,
635,
5505,
460,
434,
27552,
7563,
367... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12701,
15114,
1398,
54,
899,
12,
10668,
682,
16,
26537,
16,
27552,
4672,
3536,
657,
17,
964,
5612,
3080,
67,
1098,
1427,
716,
11752,
854,
2020,
350,
635,
5505,
460,
434,
27552,
7563,
367... |
self.date_picker = wx.DatePickerCtrl(self, | self.date_picker = wx.GenericDatePickerCtrl(self, | def _create_gui(self): self.date_picker = wx.DatePickerCtrl(self, style=wx.DP_DROPDOWN|wx.DP_SHOWCENTURY) self.Bind(wx.EVT_DATE_CHANGED, self._date_picker_on_date_changed, self.date_picker) self.time_picker = TimeCtrl(self, format="24HHMM") # Layout sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(self.date_picker, proportion=1, flag=wx.ALIGN_CENTER_VERTICAL) sizer.Add(self.time_picker, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL) self.SetSizerAndFit(sizer) | 18d332d1bae93f2e96245e9eb4236573a25af843 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/18d332d1bae93f2e96245e9eb4236573a25af843/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
20292,
12,
2890,
4672,
365,
18,
712,
67,
10569,
273,
7075,
18,
7014,
1626,
13194,
12418,
12,
2890,
16,
2154,
33,
27226,
18,
8640,
67,
18768,
12711,
96,
27226,
18,
8640,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
20292,
12,
2890,
4672,
365,
18,
712,
67,
10569,
273,
7075,
18,
7014,
1626,
13194,
12418,
12,
2890,
16,
2154,
33,
27226,
18,
8640,
67,
18768,
12711,
96,
27226,
18,
8640,
... |
if len(self.current) > len(ybreaks): raise "fubar table" if len(self.current) == len(ybreaks): | if len(self.current) > len(xbreaks): raise "fubar table" if len(self.current) == len(xbreaks): | def process(self, data, line): xbreaks = getattr(data, self.xbreaks) ybreaks = getattr(data, self.ybreaks) self.current += map(float, line.split()) if len(self.current) > len(ybreaks): raise "fubar table" if len(self.current) == len(ybreaks): self.current = map(lambda x, s=self.scale: x*s, self.current) self.table.append(self.current) if len(self.table) == len(xbreaks): table = Table(xbreaks, ybreaks, self.table) setattr(data, self.id, table) return 1 self.current = [] return 0 | 7f770db324048a7a5a9a3a5b7781fb090aa5fce0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14747/7f770db324048a7a5a9a3a5b7781fb090aa5fce0/falcon_acdata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
16,
501,
16,
980,
4672,
619,
29292,
273,
3869,
12,
892,
16,
365,
18,
6114,
870,
87,
13,
677,
29292,
273,
3869,
12,
892,
16,
365,
18,
93,
29292,
13,
365,
18,
2972,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
16,
501,
16,
980,
4672,
619,
29292,
273,
3869,
12,
892,
16,
365,
18,
6114,
870,
87,
13,
677,
29292,
273,
3869,
12,
892,
16,
365,
18,
93,
29292,
13,
365,
18,
2972,
1... |
print netmask | def parse_digit(a,netmask): netmask = min(8,max(netmask,0)) print netmask if a == "*": a = (0,256) elif a.find("-") >= 0: x,y = map(int,a.split("-")) if x > y: y = x a = (x & (0xffL<<netmask) , max(y, (x | (0xffL>>(8-netmask))))+1) else: a = (int(a) & (0xffL<<netmask),(int(a) | (0xffL>>(8-netmask)))+1) return a | 1f6b5350274fd37637b5c9a498801b48288bab14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/1f6b5350274fd37637b5c9a498801b48288bab14/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
11052,
12,
69,
16,
2758,
4455,
4672,
24172,
273,
1131,
12,
28,
16,
1896,
12,
2758,
4455,
16,
20,
3719,
309,
279,
422,
15902,
6877,
279,
273,
261,
20,
16,
5034,
13,
1327,
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,
1109,
67,
11052,
12,
69,
16,
2758,
4455,
4672,
24172,
273,
1131,
12,
28,
16,
1896,
12,
2758,
4455,
16,
20,
3719,
309,
279,
422,
15902,
6877,
279,
273,
261,
20,
16,
5034,
13,
1327,
27... | |
if not zlib: print 'zlib not available' return | def PIL_imagedata(self): image = self.image if not zlib: print 'zlib not available' return myimage = image.convert('RGB') imgwidth, imgheight = myimage.size | 28c1f54fe62051db0213739fb570e027a6c70969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/28c1f54fe62051db0213739fb570e027a6c70969/pdfimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29407,
67,
381,
11349,
396,
12,
2890,
4672,
1316,
273,
365,
18,
2730,
3399,
2730,
273,
1316,
18,
6283,
2668,
11343,
6134,
3774,
2819,
16,
3774,
4210,
273,
3399,
2730,
18,
1467,
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,
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,
29407,
67,
381,
11349,
396,
12,
2890,
4672,
1316,
273,
365,
18,
2730,
3399,
2730,
273,
1316,
18,
6283,
2668,
11343,
6134,
3774,
2819,
16,
3774,
4210,
273,
3399,
2730,
18,
1467,
2,
-100,
... | |
updated_lookup, extra_filters = expand_filter_string(cls, lookup) | updated_lookup, extra_filters = expand_filter_string(lookup, cls) | def exclude(self, *args, **kwargs): cls = self.model for arg in args: if isinstance(arg, Q): # modify Q objects in-place (warning: recursion ahead) expand_q_filters(arg, cls) qs = self.get_query_set().exclude(*args) for lookup, value in kwargs.items(): updated_lookup, extra_filters = expand_filter_string(cls, lookup) extra_filters.update({updated_lookup: value}) qs = qs.exclude(**extra_filters) return qs | e9ef2c0c653cdc9f03ebac6c29b0fcdfdef64206 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/e9ef2c0c653cdc9f03ebac6c29b0fcdfdef64206/managers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4433,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
2028,
273,
365,
18,
2284,
364,
1501,
316,
833,
30,
309,
1549,
12,
3175,
16,
2238,
4672,
468,
5612,
2238,
2184,
316,
17,
964,
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,
4433,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
2028,
273,
365,
18,
2284,
364,
1501,
316,
833,
30,
309,
1549,
12,
3175,
16,
2238,
4672,
468,
5612,
2238,
2184,
316,
17,
964,
261,
... |
dtendLine.value = dateForVObject(item.endTime, allDay) | dtendLine.value = dateForVObject(item.endTime, False) | def populate(comp, item): """Populate the given vobject vevent with data from item.""" if item.getAttributeValue('icalUID', default=None) is None: item.icalUID = unicode(item.itsUUID) comp.add('uid').value = item.icalUID | 706b92fa7d9a1166046daabee82ce942663c625c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/706b92fa7d9a1166046daabee82ce942663c625c/ICalendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
2919,
16,
761,
4672,
3536,
19097,
326,
864,
331,
1612,
331,
2575,
598,
501,
628,
761,
12123,
309,
761,
18,
588,
14942,
2668,
1706,
3060,
2187,
805,
33,
7036,
13,
353,
599,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
2919,
16,
761,
4672,
3536,
19097,
326,
864,
331,
1612,
331,
2575,
598,
501,
628,
761,
12123,
309,
761,
18,
588,
14942,
2668,
1706,
3060,
2187,
805,
33,
7036,
13,
353,
599,
30... |
if security_group: params['DBSecurityGroups'] = security_group | if security_groups: l = [] for group in security_groups: if isinstance(group, DBSecurityGroup): l.append(group.name) else: l.append(group) self.build_list_params(params, l, 'DBSecurityGroups.member') | def modify_dbinstance(self, id, param_group=None, security_group=None, preferred_maintenance_window=None, master_password=None, allocated_storage=None): """ Modify an existing DBInstance. | 0de9387d433f1588981b85fd6480bf101bda7fab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/0de9387d433f1588981b85fd6480bf101bda7fab/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5612,
67,
1966,
1336,
12,
2890,
16,
612,
16,
579,
67,
1655,
33,
7036,
16,
4373,
67,
1655,
33,
7036,
16,
9119,
67,
29715,
67,
5668,
33,
7036,
16,
4171,
67,
3664,
33,
7036,
16,
11977,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5612,
67,
1966,
1336,
12,
2890,
16,
612,
16,
579,
67,
1655,
33,
7036,
16,
4373,
67,
1655,
33,
7036,
16,
9119,
67,
29715,
67,
5668,
33,
7036,
16,
4171,
67,
3664,
33,
7036,
16,
11977,
... |
head_dom = xml.dom.minidom.parseString(rml_head) | head_dom = xml.dom.minidom.parseString(rml_head.encode('utf-8')) | def _add_header(self, node, header=1): if header==2: rml_head = self.rml_header2 else: rml_head = self.rml_header | aafc10a79225dcb7d98ea977f0ca536a70603f6f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/aafc10a79225dcb7d98ea977f0ca536a70603f6f/report_sxw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
3374,
12,
2890,
16,
756,
16,
1446,
33,
21,
4672,
309,
1446,
631,
22,
30,
436,
781,
67,
1978,
273,
225,
365,
18,
86,
781,
67,
3374,
22,
469,
30,
436,
781,
67,
1978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
3374,
12,
2890,
16,
756,
16,
1446,
33,
21,
4672,
309,
1446,
631,
22,
30,
436,
781,
67,
1978,
273,
225,
365,
18,
86,
781,
67,
3374,
22,
469,
30,
436,
781,
67,
1978,
... |
if self.currentVar.varType == orange.VarTypes.Continuous: val1 = float(self.Num1) val2 = float(self.Num2) elif self.currentVar.varType == orange.VarTypes.String: val1 = self.Str1 val2 = self.Str2 elif self.currentVar.varType == orange.VarTypes.Discrete: val1 = self.currentVals if not val1: return val2 = None if not self.currentOperatorDict[self.currentVar.varType].isInterval: val2 = None return Condition(True, "AND", self.currentVar.name, self.currentOperatorDict[self.currentVar.varType], self.NegateCondition, val1, val2, self.CaseSensitive) | if self.currentVar: if self.currentVar.varType == orange.VarTypes.Continuous: val1 = float(self.Num1) val2 = float(self.Num2) elif self.currentVar.varType == orange.VarTypes.String: val1 = self.Str1 val2 = self.Str2 elif self.currentVar.varType == orange.VarTypes.Discrete: val1 = self.currentVals if not val1: return val2 = None if not self.currentOperatorDict[self.currentVar.varType].isInterval: val2 = None return Condition(True, "AND", self.currentVar.name, self.currentOperatorDict[self.currentVar.varType], self.NegateCondition, val1, val2, self.CaseSensitive) | def getConditionFromSelection(self): """Returns a condition according to the currently selected attribute / operator / values. """ if self.currentVar.varType == orange.VarTypes.Continuous: val1 = float(self.Num1) val2 = float(self.Num2) elif self.currentVar.varType == orange.VarTypes.String: val1 = self.Str1 val2 = self.Str2 elif self.currentVar.varType == orange.VarTypes.Discrete: val1 = self.currentVals if not val1: return val2 = None if not self.currentOperatorDict[self.currentVar.varType].isInterval: val2 = None return Condition(True, "AND", self.currentVar.name, self.currentOperatorDict[self.currentVar.varType], self.NegateCondition, val1, val2, self.CaseSensitive) | a8ec90c74736ce98a77c355d2a3df358d6ae3f0d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/a8ec90c74736ce98a77c355d2a3df358d6ae3f0d/OWSelectData.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26659,
1265,
6233,
12,
2890,
4672,
3536,
1356,
279,
2269,
4888,
358,
326,
4551,
3170,
1566,
342,
3726,
342,
924,
18,
3536,
309,
365,
18,
2972,
1537,
18,
1401,
559,
422,
578,
726,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26659,
1265,
6233,
12,
2890,
4672,
3536,
1356,
279,
2269,
4888,
358,
326,
4551,
3170,
1566,
342,
3726,
342,
924,
18,
3536,
309,
365,
18,
2972,
1537,
18,
1401,
559,
422,
578,
726,
18,
1... |
cur=self.conn.cursor() cur.execute('select max(rowid) from %s' % name) return int(cur.fetchone()[0]) | return self.conn.db.sqlite_last_insert_rowid() | def getAutoIncrement(self, name): cur=self.conn.cursor() cur.execute('select max(rowid) from %s' % name) return int(cur.fetchone()[0]) | 284dbcca1820d378cd2b2b30cf5cb566c52e66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/284dbcca1820d378cd2b2b30cf5cb566c52e66bf/sqliteconn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26707,
10798,
12,
2890,
16,
508,
4672,
327,
365,
18,
4646,
18,
1966,
18,
19460,
67,
2722,
67,
6387,
67,
492,
350,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26707,
10798,
12,
2890,
16,
508,
4672,
327,
365,
18,
4646,
18,
1966,
18,
19460,
67,
2722,
67,
6387,
67,
492,
350,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
collectionid=self.develCollection.id).one() | collectionid=develCollection.id).one() | def edit_package(self, package, **changes): '''Add a new package to the database. ''' # Check that the tg.identity is allowed to make changes to the package if not identity.in_any_group('cvsadmin'): return dict(status=False, message='User must be in cvsadmin') | bd41a64fe1edd4af78dfc974719b3f80db5e978d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/bd41a64fe1edd4af78dfc974719b3f80db5e978d/dispatcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
67,
5610,
12,
2890,
16,
2181,
16,
2826,
6329,
4672,
9163,
986,
279,
394,
2181,
358,
326,
2063,
18,
9163,
468,
2073,
716,
326,
18289,
18,
10781,
353,
2935,
358,
1221,
3478,
358,
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,
3874,
67,
5610,
12,
2890,
16,
2181,
16,
2826,
6329,
4672,
9163,
986,
279,
394,
2181,
358,
326,
2063,
18,
9163,
468,
2073,
716,
326,
18289,
18,
10781,
353,
2935,
358,
1221,
3478,
358,
3... |
self.ax.set_ylim(ymin=0.6 * normalization) | if len(self.bg_data_sets) > 0 and len(self.fg_data_sets) == 0: self.ax.set_ylim(ymin=0.6 / N) else: self.ax.set_ylim(ymin=0.6 * normalization) | def finalize(self, num_bins=20, normalization=1): epsilon = 1e-8 | 5ee73d67e76b0073ed0978314678da0fd76f2862 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/5ee73d67e76b0073ed0978314678da0fd76f2862/plotutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
12,
2890,
16,
818,
67,
11862,
33,
3462,
16,
13728,
33,
21,
4672,
12263,
273,
404,
73,
17,
28,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
12,
2890,
16,
818,
67,
11862,
33,
3462,
16,
13728,
33,
21,
4672,
12263,
273,
404,
73,
17,
28,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if assume and self._op == operator.eq: return 'equal(%s, %s)'%(l, r) | if assume: if self._op == operator.eq: return 'equal(%s, %s)'%(l, r) elif self._op == operator.ne: return 'notequal(%s, %s)'%(l, r) | def _maxima_init_(self, maxima=maxima, assume=False): """ Return string representation for this symbolic equation in a form suitable for evaluation in Maxima. | 40a8feeaf23bbc7cb6e2d486a93afba20f6632af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/40a8feeaf23bbc7cb6e2d486a93afba20f6632af/equations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1896,
13888,
67,
2738,
67,
12,
2890,
16,
943,
13888,
33,
1896,
13888,
16,
6750,
33,
8381,
4672,
3536,
2000,
533,
4335,
364,
333,
16754,
15778,
316,
279,
646,
10631,
364,
9873,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1896,
13888,
67,
2738,
67,
12,
2890,
16,
943,
13888,
33,
1896,
13888,
16,
6750,
33,
8381,
4672,
3536,
2000,
533,
4335,
364,
333,
16754,
15778,
316,
279,
646,
10631,
364,
9873,
316,
... |
if test_support.is_jython: ref1_list = [ref1] self.assert_(weakref.getweakrefs(o) == ref1_list, "list of refs does not match") del ref1_list else: self.assert_(weakref.getweakrefs(o) == [ref1], "list of refs does not match") | self.assert_(weakref.getweakrefs(o) == [ref1], "list of refs does not match") | def test_getweakrefs(self): o = C() ref1 = weakref.ref(o, self.callback) ref2 = weakref.ref(o, self.callback) del ref1 extra_collect() self.assert_(weakref.getweakrefs(o) == [ref2], "list of refs does not match") | 73bfdf3fe6f19ede47133cec24707657b41aa014 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6753/73bfdf3fe6f19ede47133cec24707657b41aa014/test_weakref.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
26008,
9316,
12,
2890,
4672,
320,
273,
385,
1435,
1278,
21,
273,
16046,
1734,
18,
1734,
12,
83,
16,
365,
18,
3394,
13,
1278,
22,
273,
16046,
1734,
18,
1734,
12,
83,
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,
1842,
67,
588,
26008,
9316,
12,
2890,
4672,
320,
273,
385,
1435,
1278,
21,
273,
16046,
1734,
18,
1734,
12,
83,
16,
365,
18,
3394,
13,
1278,
22,
273,
16046,
1734,
18,
1734,
12,
83,
16... |
self.add_channel (map) def set_reuse_addr (self): | self.add_channel(map) def set_reuse_addr(self): | def set_socket (self, sock, map=None): self.socket = sock | f7eb0d3f501f2e379b8719bda476d318d1e79160 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f7eb0d3f501f2e379b8719bda476d318d1e79160/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
7814,
261,
2890,
16,
7313,
16,
852,
33,
7036,
4672,
365,
18,
7814,
273,
7313,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
7814,
261,
2890,
16,
7313,
16,
852,
33,
7036,
4672,
365,
18,
7814,
273,
7313,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print "Checking base channels on Satellite server" | print timestamp(), "Checking base channels on Satellite server" | def main(): if options.demo: key = False current_channels = {} current_channel_labels = ['rhel-x86_64-server-5'] else: # Login to Satellite server key = login(options.user, options.password) # Build existing channel list current_channels = client.channel.list_all_channels(key) current_channel_labels = [] for channel in current_channels: current_channel_labels.append(channel['label']) if options.debug: print "DEBUG: Channels on current Satellite server:", current_channel_labels if client.api.get_version() < 5.1: # TODO: Haven't tested with Spacewalk, not sure how it is reported print "This script uses features not available with Satellite versions older than 5.1" sys.exit(1) if not options.client_actions_only: # This begins the server actions section if not os.path.exists(options.localdir): try: os.makedirs(options.localdir) except: print "Error: Unable to create %s" % (options.localdir) raise if (not options.delete) and (not options.no_rsync): # Sync local Dell repo with public Dell repo returncode = get_dell_repo(DELL_REPO_URL, options.localdir) if not returncode == 0: print "rsync process exited with returncode:", returncode # Build child channels based on dell repo as needed systems = build_channel_list(options.localdir, SYSTEM_VENDOR_ID) systems['platform_independent'] = PLATFORM_INDEPENDENT # Iterate through list of supported RHEL versions and archs, create parent channels if needed channels = {} print "Checking base channels on Satellite server" for parent in SUPPORTED_CHANNELS: if options.verbose: print "Checking base channel", parent # Check each supported base channel, skip if it does not exist on Satellite server if parent not in current_channel_labels: if options.verbose: print "-%s is not a current base channel, skipping." % (parent) continue else: channels[parent] = SUPPORTED_CHANNELS[parent] channels[parent]['child_channels'] = [] # Initialize key for child channels if options.verbose: print "+%s found on Satellite server, checking child channels." % (parent) if channels[parent]['arch'] == 'i386': # This is because Satellite stores x86 as 'ia32' arch = 'channel-ia32' else: arch = 'channel-' + channels[parent]['arch'] subdir = channels[parent]['subdir'] print " Checking child channels for %s" % parent for system in systems: # use system name plus parent to create a unique child channel c_label = DELL_INFO['label'] + '-' + system + '-' + parent c_name = DELL_INFO['name'] + ' on ' + systems[system] + ' for ' + parent c_summary = DELL_INFO['summary'] + ' on ' + systems[system] + ' running ' + parent c_arch = arch c_dir = options.localdir + system + '/' + subdir if options.verbose: print " Checking child channel:", c_label if channel_exists(key, c_label, current_channels): if options.delete: # Delete child channels if requested if options.demo: print "Deleting channel:", c_label else: delete_channel(key, c_label) else: if options.debug: print "DEBUG: checking for dir:", c_dir if options.verbose: print "Child channel already exists:", c_label if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) else: if not options.delete: # Build child channels if needed if options.debug: print "DEBUG: checking for dir:", c_dir if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) if options.debug: print "DEBUG: %s exists for %s, creating channel" % (subdir, system) if options.demo: if options.verbose: print "Creating child channel:", c_label else: create_channel(key, c_label, c_name, c_summary, c_arch, parent) else: if options.debug: print "DEBUG: %s does not exists for %s" % (subdir, system) if (not options.delete) and (not options.no_packages): # Iterate through channels, pushing rpms from the local repo as needed # TODO: check if rpm is already uploaded and orphaned or part of another channel if options.debug: print "DEBUG: Channel mapping:", channels print "Syncing rpms as needed" for parent in channels: print " Syncing rpms for child channels in %s" % parent for child in channels[parent]['child_channels']: dir = options.localdir + child + '/' + channels[parent]['subdir'] channel = DELL_INFO['label'] + '-' + child + '-' + parent if options.verbose: print " Syncing rpms to child channel", channel if options.debug: print "DEBUG: Looking for rpms in", dir rpms = gen_rpm_list(dir) # Get all packages in child channel existing_packages = client.channel.software.list_all_packages(key, channel) if options.debug: print "DEBUG: Existing packages in", channel, existing_packages for rpm in rpms: if options.debug: print "DEBUG: Working on:", rpm # Strip off '.rpm' at end of file to match against existing entries rpm_name = rpm.split('.rpm')[0] # Now strip off any preceeding paths rpm_name = rpm_name.split('/')[-1] # Iterate through existing packages, and skip existing ones if options.verbose: print "Checking if %s is already on the Satellite server in %s" % (rpm_name, channel) for package in existing_packages: existing_rpm_name = reconstruct_name(package) if options.debug: print "DEBUG: Checking match for %s and %s" % (rpm_name, existing_rpm_name) if existing_rpm_name == rpm_name: # This means the intended rpm is already in Satellite, so skip if options.verbose: print "- %s already in Satellite, skipping" % (rpm_name) break else: if options.verbose: print "+ %s is not in Satellite, adding" % (rpm_name) if options.debug: print "DEBUG: Calling: push_rpm(",rpm, channel, options.user, options.password, options.satserver, ")" returncode = push_rpm(rpm, channel, options.user, options.password, options.satserver) if not returncode == 0: print "rhnpush process exited with returncode:", returncode if returncode == 255: print "You may force package uploads with --force" sys.exit(1) print "Completed uploading rpms." if (not options.server_actions_only) and (not options.demo) and (not options.delete): # This is the client actions section print "Subscribing registered systems to the %s channel" % (PLATFORM_INDEPENDENT) client_systems = subscribe_clients(key) print "Scheduling software installation and actions on clients" client_systems = schedule_actions(key, client_systems) print "Waiting for client actions to complete" client_systems = get_action_results(key, client_systems) print "All actions completed.\n" show_client_results(client_systems) if not options.demo: logout(key) | 07e2421549e748ccb09a392c60834eaea3e54917 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/07e2421549e748ccb09a392c60834eaea3e54917/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
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,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... |
if not self._include_sourcecode: | if not self._incl_sourcecode: | def pysrc_link(self, api_doc): if not self._include_sourcecode: return '' url = self.pysrc_url(api_doc) if url is not None: return ('<span class="codelink"><a href="%s">source ' 'code</a></span>' % url) else: return '' | 05b8c35afe1f11b055514f3441bd068ffc3ac6e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/05b8c35afe1f11b055514f3441bd068ffc3ac6e9/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21027,
1310,
67,
1232,
12,
2890,
16,
1536,
67,
2434,
4672,
309,
486,
365,
6315,
267,
830,
67,
3168,
710,
30,
327,
875,
880,
273,
365,
18,
84,
1900,
1310,
67,
718,
12,
2425,
67,
2434,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21027,
1310,
67,
1232,
12,
2890,
16,
1536,
67,
2434,
4672,
309,
486,
365,
6315,
267,
830,
67,
3168,
710,
30,
327,
875,
880,
273,
365,
18,
84,
1900,
1310,
67,
718,
12,
2425,
67,
2434,... |
def lines(self, account, form): | def lines(self, account, form, history=False): | def lines(self, account, form): self.ids +=[account.id] if not account.check_history and not history: return [] | 778ee423fc47dd52fe69e9a2b756e0772c8aeb94 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/778ee423fc47dd52fe69e9a2b756e0772c8aeb94/general_ledger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2362,
12,
2890,
16,
2236,
16,
646,
16,
4927,
33,
8381,
4672,
365,
18,
2232,
1011,
63,
4631,
18,
350,
65,
309,
486,
2236,
18,
1893,
67,
8189,
471,
486,
4927,
30,
327,
5378,
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,
1,
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,
2362,
12,
2890,
16,
2236,
16,
646,
16,
4927,
33,
8381,
4672,
365,
18,
2232,
1011,
63,
4631,
18,
350,
65,
309,
486,
2236,
18,
1893,
67,
8189,
471,
486,
4927,
30,
327,
5378,
2,
-100,
... |
lfc.lfc_client_setAuthorizationId(0,0,'GSI',dn) | lfc.lfc_client_setAuthorizationId( 0, 0, 'GSI', dn ) | def setAuthorizationId(self,dn): """ Set authorization id for the proxy-less LFC communication """ lfc.lfc_client_setAuthorizationId(0,0,'GSI',dn) | 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,
444,
6063,
548,
12,
2890,
16,
5176,
4672,
3536,
1000,
6093,
612,
364,
326,
2889,
17,
2656,
511,
4488,
18279,
3536,
328,
7142,
18,
80,
7142,
67,
2625,
67,
542,
6063,
548,
12,
20,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
6063,
548,
12,
2890,
16,
5176,
4672,
3536,
1000,
6093,
612,
364,
326,
2889,
17,
2656,
511,
4488,
18279,
3536,
328,
7142,
18,
80,
7142,
67,
2625,
67,
542,
6063,
548,
12,
20,
16,
... |
return | def doUpdate(repos, cfg, pkgList, replaceFiles = False, tagScript = None, keepExisting = False, depCheck = True, recurse = True): client = conaryclient.ConaryClient(repos, cfg) applyList = [] if type(pkgList) is str: pkgList = ( pkgList, ) for pkgStr in pkgList: if os.path.exists(pkgStr) and os.path.isfile(pkgStr): try: cs = changeset.ChangeSetFromFile(pkgStr) except BadContainer, msg: log.error("'%s' is not a valid conary changset: %s" % (pkgStr, msg)) sys.exit(1) applyList.append(cs) elif pkgStr.find("=") >= 0: l = pkgStr.split("=") if len(l) != 2: log.error("too many ='s in %s", pkgStr) return 1 applyList.append((l[0], l[1])) else: applyList.append(pkgStr) try: (cs, depFailures, suggMap) = \ client.updateChangeSet(applyList, replaceFiles, recurse = recurse, resolveDeps = depCheck) if depFailures: print "The following dependencies could not be resolved:" for (troveName, depSet) in depFailures: print " %s:\n\t%s" % \ (troveName, "\n\t".join(str(depSet).split("\n"))) return elif not cfg.autoResolve and suggMap: print "Extra packages are needed for the install" for (req, suggList) in suggMap.iteritems(): print " %s -> %s" % (req, " ".join([x[0] for x in suggList])) return elif suggMap: print "Installing extra packages for dependency resolution" print " %s" % " ".join(suggMap.iterkeys()) return client.applyUpdate(cs, replaceFiles, tagScript, keepExisting, depCheck) except conaryclient.UpdateError, e: log.error(e) except repository.CommitError, e: log.error(e) except database.MissingDependencies, e: print "Dependency check failure:" print "\t" + "\n\t".join(str(e).split("\n")) | 865275e9336c484a9b1fd8f21204c5f76125b86e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/865275e9336c484a9b1fd8f21204c5f76125b86e/updatecmd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1891,
12,
15564,
16,
2776,
16,
3475,
682,
16,
1453,
2697,
273,
1083,
16,
1047,
3651,
273,
599,
16,
3455,
9895,
273,
1083,
16,
5993,
1564,
273,
1053,
16,
11502,
273,
1053,
4672,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1891,
12,
15564,
16,
2776,
16,
3475,
682,
16,
1453,
2697,
273,
1083,
16,
1047,
3651,
273,
599,
16,
3455,
9895,
273,
1083,
16,
5993,
1564,
273,
1053,
16,
11502,
273,
1053,
4672,
10... | |
self.log_error("CGI script exited OK") | self.log_message("CGI script exited OK") | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scriptname) if not os.path.exists(scriptfile): self.send_error(404, "No such CGI script (%s)" % `scriptname`) return if not os.path.isfile(scriptfile): self.send_error(403, "CGI script is not a plain file (%s)" % `scriptname`) return ispy = self.is_python(scriptname) if not ispy: if not (self.have_fork or self.have_popen2): self.send_error(403, "CGI script is not a Python script (%s)" % `scriptname`) return if not self.is_executable(scriptfile): self.send_error(403, "CGI script is not executable (%s)" % `scriptname`) return | 49039020db6b8d0b33f3c6edb6830c02a4fd5fb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/49039020db6b8d0b33f3c6edb6830c02a4fd5fb6/CGIHTTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
277,
273,
3127,
18,
86,
4720,
2668,
4899,
13,
309,
277,
1545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
277,
273,
3127,
18,
86,
4720,
2668,
4899,
13,
309,
277,
1545,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.