rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
self.tk.call(self._w, 'active', 'clear') | self.tk.call(self._w, 'active', 'clear') | def active_clear(self): | 0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2695,
67,
8507,
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,
2695,
67,
8507,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if node.hasAttribute('plugin') or '.plugin.' in name: | if node.hasAttribute('plugin'): | def valfunc(node): name = node.getAttribute('name') if name.startswith('plugin'): return '2%s' % name if node.hasAttribute('plugin') or '.plugin.' in name: return '1%s' % name if 'gui' in name: return '3%s' % name return '0%s' % name | d9ac152ca72e84f19dca7bca1ffe5fc1c248f73f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11399/d9ac152ca72e84f19dca7bca1ffe5fc1c248f73f/xmlconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1244,
644,
12,
2159,
4672,
508,
273,
756,
18,
588,
1499,
2668,
529,
6134,
309,
508,
18,
17514,
1918,
2668,
4094,
11,
4672,
327,
296,
22,
9,
87,
11,
738,
508,
309,
756,
18,
5332,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1244,
644,
12,
2159,
4672,
508,
273,
756,
18,
588,
1499,
2668,
529,
6134,
309,
508,
18,
17514,
1918,
2668,
4094,
11,
4672,
327,
296,
22,
9,
87,
11,
738,
508,
309,
756,
18,
5332,
1499... |
Encoders.encode_base64(msg) | Encoders.encode_base64(mesg) | def main(): """ Here we do the job """ global DEBUG, LOGFILE, MBOT_ADDRESS, CONFIG_FILE config_file = CONFIG_FILE try: opts, args = getopt.getopt(sys.argv[1:], "c:") except getopt.GetoptError: # print help information and exit: usage() sys.exit(2) for o, a in opts: if o == "-c": config_file = a Conf = read_defaults(config_file) logfile = open(LOGFILE, 'a') logfile.write(dolog("Using config file %s\n" % config_file)) DEBUG = DEBUG == 'True' or DEBUG == 'true' # we read the mail mesg = read_email() sender = mesg.get('From') subject = mime_decode_header(mesg.get('Subject')) mesg_id = mesg.get('Message-Id') date = mesg.get('Date') dest = mesg.get('To') # we only consider (parse) the text/plain parts of message if mesg.is_multipart(): body = [] for part in mesg.walk(): if part.get_content_type() == "text/plain": body.append(part.get_payload(decode=1)) else: body.append(part) else: body = [mesg.get_payload()] logfile.write(dolog("message: %s %s %s \n" % (mesg_id, sender, subject))) # we prepare the response resp = MIMEMultipart() resp['Subject'] = 'Re: %s' % subject resp['To'] = sender resp['In-Reply-To'] = mesg_id # we initialize a handler corresponding to the given subject if subject.find('wget') == 0: h = UrlHandler.UrlHandler(subject[4:]) elif subject.find('google') == 0: h = GoogleHandler.GoogleHandler(subject[6:]) elif subject.find('news') == 0: h = NewsHandler.NewsHandler(subject[4:], dest, sender, date) elif subject.find('|') == 0: h = PipeHandler.PipeHandler(subject[1:]) else: h = MailHandler.MailHandler(subject) # then we read the handler config h.read_conf(Conf) for part in body: for (type, out) in h.handle(part): maintype, subtype = type.split('/', 1) if maintype == 'text': data = MIMEText(out, _subtype=subtype) if DEBUG: print out elif maintype == 'image': data = MIMEImage(out, _subtype=subtype) elif maintype == 'audio': data = MIMEAudio(out, _subtype=subtype) else: data = MIMEBase(maintype, subtype) data.set_payload(out) Encoders.encode_base64(msg) # When in debug mode, we do not send back mail if not DEBUG: resp.attach(data) # Then we send the mail if not DEBUG: logfile.write(dolog("Sending from %s to %s \n" % (MBOT_ADDRESS, sender))) s = smtplib.SMTP() s.connect() s.sendmail(MBOT_ADDRESS, sender, resp.as_string()) s.close() | 675f92c0d9a887bbfcdce90eb4b00c76c28a9e36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3144/675f92c0d9a887bbfcdce90eb4b00c76c28a9e36/mbot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
13743,
732,
741,
326,
1719,
3536,
2552,
6369,
16,
2018,
3776,
16,
17897,
1974,
67,
15140,
16,
9128,
67,
3776,
225,
642,
67,
768,
273,
9128,
67,
3776,
775,
30,
1500,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3536,
13743,
732,
741,
326,
1719,
3536,
2552,
6369,
16,
2018,
3776,
16,
17897,
1974,
67,
15140,
16,
9128,
67,
3776,
225,
642,
67,
768,
273,
9128,
67,
3776,
775,
30,
1500,
... |
create_phy = classmethod(create_phy) recreate = classmethod(recreate) create = classmethod(create) | def get_by_name_label(cls, name): return [inst.get_uuid() for inst in XendAPIStore.get_all(cls.getClass()) if inst.get_name_label() == name] create_phy = classmethod(create_phy) recreate = classmethod(recreate) create = classmethod(create) get_by_name_label = classmethod(get_by_name_label) | def create(self, record): """ Called from API, to create a new network """ # Create new uuids uuid = genuuid.createString() | 7e6f8371df8651623b34d3183ca9fe4b5b6f6613 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/7e6f8371df8651623b34d3183ca9fe4b5b6f6613/XendNetwork.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
1409,
4672,
3536,
11782,
628,
1491,
16,
358,
752,
279,
394,
2483,
3536,
468,
1788,
394,
26938,
3822,
273,
314,
2104,
1911,
18,
2640,
780,
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,
752,
12,
2890,
16,
1409,
4672,
3536,
11782,
628,
1491,
16,
358,
752,
279,
394,
2483,
3536,
468,
1788,
394,
26938,
3822,
273,
314,
2104,
1911,
18,
2640,
780,
1435,
2,
-100,
-100,
-100,
... |
common = contenta[-1].findSuffix(contentb[-1]) if common: regexa = RegexAnd.join( contenta[:-1] ) & common[0] regexb = RegexAnd.join( contentb[:-1] ) & common[1] regex = (regexa | regexb) if matchSingleValue(common[2]) and matchSingleValue(regex): return regex + common[2] | def _or_(self, regex, reverse): if regex.__class__ == RegexString: contentb = [regex] elif regex.__class__ == RegexAnd: contentb = regex.content else: return None | 4a8d93e059c3f6a04f35567f0126ed487a6490e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/4a8d93e059c3f6a04f35567f0126ed487a6490e6/regex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
280,
67,
12,
2890,
16,
3936,
16,
4219,
4672,
309,
3936,
16186,
1106,
972,
422,
15078,
780,
30,
913,
70,
273,
306,
7584,
65,
1327,
3936,
16186,
1106,
972,
422,
15078,
1876,
30,
913... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
280,
67,
12,
2890,
16,
3936,
16,
4219,
4672,
309,
3936,
16186,
1106,
972,
422,
15078,
780,
30,
913,
70,
273,
306,
7584,
65,
1327,
3936,
16186,
1106,
972,
422,
15078,
1876,
30,
913... | |
obj.runningJob.errors.append("Not yet Ready") | self.logging.warning( obj.runningJob['schedulerId'] + \ ' output not yet ready' ) obj.runningJob.errors.append("Job current status doesn") | def getOutput( self, obj, outdir='' ): """ retrieve job output """ | 7c4efde2270e23664acd0941720340358547054e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/7c4efde2270e23664acd0941720340358547054e/SchedulerGLite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11062,
12,
365,
16,
1081,
16,
15398,
2218,
11,
262,
30,
3536,
4614,
1719,
876,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11062,
12,
365,
16,
1081,
16,
15398,
2218,
11,
262,
30,
3536,
4614,
1719,
876,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
DeleteKey(key, "sub_key") | DeleteKey(key, subkeystr) | def DeleteTestData(self, root_key): key = OpenKey(root_key, test_key_name, 0, KEY_ALL_ACCESS) sub_key = OpenKey(key, "sub_key", 0, KEY_ALL_ACCESS) # It is not necessary to delete the values before deleting # the key (although subkeys must not exist). We delete them # manually just to prove we can :-) for value_name, value_data, value_type in test_data: DeleteValue(sub_key, value_name) | f3eb94a6b1ba946a780f9bec3f012f5a68326881 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/f3eb94a6b1ba946a780f9bec3f012f5a68326881/test_winreg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2504,
4709,
751,
12,
2890,
16,
1365,
67,
856,
4672,
498,
273,
3502,
653,
12,
3085,
67,
856,
16,
1842,
67,
856,
67,
529,
16,
374,
16,
5311,
67,
4685,
67,
13204,
13,
720,
67,
856,
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,
2504,
4709,
751,
12,
2890,
16,
1365,
67,
856,
4672,
498,
273,
3502,
653,
12,
3085,
67,
856,
16,
1842,
67,
856,
67,
529,
16,
374,
16,
5311,
67,
4685,
67,
13204,
13,
720,
67,
856,
27... |
def __init__(self, model, filename, mode='r', endian = '>', verbose=0): | def __init__(self, model, filename, mode='r', endian = '@', verbose=0): | def __init__(self, model, filename, mode='r', endian = '>', verbose=0): self.model = model # big endian is only for files calculated on Suns or HP # otherwise use '<' FortranBinaryFile.__init__(self, filename, mode, endian, verbose=verbose) | a0a799e0cc476387b842df00eb32b18444ae3305 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2567/a0a799e0cc476387b842df00eb32b18444ae3305/MarcT16File.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
938,
16,
1544,
16,
1965,
2218,
86,
2187,
14759,
273,
4622,
2187,
3988,
33,
20,
4672,
365,
18,
2284,
273,
938,
468,
5446,
14759,
353,
1338,
364,
1390,
889... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
938,
16,
1544,
16,
1965,
2218,
86,
2187,
14759,
273,
4622,
2187,
3988,
33,
20,
4672,
365,
18,
2284,
273,
938,
468,
5446,
14759,
353,
1338,
364,
1390,
889... |
print | print | def execute(execute=True, verbose=True): a=theano.shared(numpy.ones(shapes, dtype=theano.config.floatX)) b=theano.shared(numpy.ones(shapes, dtype=theano.config.floatX)) c=theano.shared(numpy.ones(shapes, dtype=theano.config.floatX)) f=theano.function([],updates={c:0.4*c+.8*T.dot(a,b)}) if verbose: print 'Some theano flags:' print ' blas.ldflags=',theano.config.blas.ldflags print ' compiledir=',theano.config.compiledir print ' floatX=',theano.config.floatX print print 'Numpy config:(used when the theano flags "blas.ldflags" is empty)' numpy.show_config(); print 'Numpy dot module:',numpy.dot.__module__; print 'Numpy file location that was loaded:',numpy.__file__; print 'Numpy version:',numpy.__version__ print if any( [x.op.__class__.__name__=='Gemm' for x in f.maker.env.toposort()]): print 'Used the cpu' elif any( [x.op.__class__.__name__=='GpuGemm' for x in f.maker.env.toposort()]): print 'Used the gpu' else: print 'ERROR, not able to tell if theano used the cpu or the gpu' print f.maker.env.toposort() t0=0 t1=-1 if execute: t0=time.time() for i in range(iters): f() t1=time.time() if verbose and execute: print print 'this execution time took %.2fs'%(t1-t0) return t1-t0 | b0b78690a119f26c7612051575ece09c6ab01612 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/b0b78690a119f26c7612051575ece09c6ab01612/check_blas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
8837,
33,
5510,
16,
3988,
33,
5510,
4672,
225,
279,
33,
5787,
31922,
18,
11574,
12,
15974,
18,
5322,
12,
17648,
16,
3182,
33,
5787,
31922,
18,
1425,
18,
5659,
60,
3719,
324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
8837,
33,
5510,
16,
3988,
33,
5510,
4672,
225,
279,
33,
5787,
31922,
18,
11574,
12,
15974,
18,
5322,
12,
17648,
16,
3182,
33,
5787,
31922,
18,
1425,
18,
5659,
60,
3719,
324,
... |
proxy = _make_proxy() tc.assertTrue(proxy.back_end_has_command('test')) tc.assertFalse(proxy.back_end_has_command('xyzzy')) tc.assertFalse(proxy.back_end_has_command('gomill-passthrough')) | fx = Proxy_fixture(tc) tc.assertTrue(fx.proxy.back_end_has_command('test')) tc.assertFalse(fx.proxy.back_end_has_command('xyzzy')) tc.assertFalse(fx.proxy.back_end_has_command('gomill-passthrough')) | def test_back_end_has_command(tc): proxy = _make_proxy() tc.assertTrue(proxy.back_end_has_command('test')) tc.assertFalse(proxy.back_end_has_command('xyzzy')) tc.assertFalse(proxy.back_end_has_command('gomill-passthrough')) | d3c1810c39f74e2ab0ab81debc544cc7ea34da4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6121/d3c1810c39f74e2ab0ab81debc544cc7ea34da4d/gtp_proxy_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
823,
67,
409,
67,
5332,
67,
3076,
12,
5111,
4672,
12661,
273,
7659,
67,
904,
10970,
12,
5111,
13,
1715,
18,
11231,
5510,
12,
19595,
18,
5656,
18,
823,
67,
409,
67,
5332,
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,
1842,
67,
823,
67,
409,
67,
5332,
67,
3076,
12,
5111,
4672,
12661,
273,
7659,
67,
904,
10970,
12,
5111,
13,
1715,
18,
11231,
5510,
12,
19595,
18,
5656,
18,
823,
67,
409,
67,
5332,
67... |
self.assertEqual(self.client.voidresp(), "226 transfer complete") | self.client.voidresp() | def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.assertEqual(self.client.voidresp(), "226 transfer complete") | bb2ceebe4c9695fd23f5fa9d68a116aee667a188 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/bb2ceebe4c9695fd23f5fa9d68a116aee667a188/test_ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
892,
67,
4071,
12,
2890,
4672,
468,
2424,
977,
7313,
273,
365,
18,
2625,
18,
13866,
4172,
2668,
1098,
6134,
365,
18,
11231,
1248,
2520,
1442,
12,
15031,
16,
5832,
18,
1260,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
892,
67,
4071,
12,
2890,
4672,
468,
2424,
977,
7313,
273,
365,
18,
2625,
18,
13866,
4172,
2668,
1098,
6134,
365,
18,
11231,
1248,
2520,
1442,
12,
15031,
16,
5832,
18,
1260,
2... |
def end_double(self, join=string.join): self.append(float(join(self._data, ""))) | def end_double(self, data): self.append(float(data)) | def end_double(self, join=string.join): self.append(float(join(self._data, ""))) self._value = 0 | 80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
9056,
12,
2890,
16,
501,
4672,
365,
18,
6923,
12,
5659,
12,
892,
3719,
365,
6315,
1132,
273,
374,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
9056,
12,
2890,
16,
501,
4672,
365,
18,
6923,
12,
5659,
12,
892,
3719,
365,
6315,
1132,
273,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.ui.note(_("found new changesets starting at ") + | self.ui.debug(_("found new changesets starting at ") + | def findincoming(self, remote, base=None, heads=None, force=False): """Return list of roots of the subsets of missing nodes from remote | 05da6255c340dc7fab1b01e6a6e79351a6e27de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/05da6255c340dc7fab1b01e6a6e79351a6e27de4/localrepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
31033,
12,
2890,
16,
2632,
16,
1026,
33,
7036,
16,
22742,
33,
7036,
16,
2944,
33,
8381,
4672,
3536,
990,
666,
434,
12876,
434,
326,
30760,
434,
3315,
2199,
628,
2632,
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,
1104,
31033,
12,
2890,
16,
2632,
16,
1026,
33,
7036,
16,
22742,
33,
7036,
16,
2944,
33,
8381,
4672,
3536,
990,
666,
434,
12876,
434,
326,
30760,
434,
3315,
2199,
628,
2632,
2,
-100,
-1... |
if self.__updating_lock.acquire(False)\ and len(self.__updating_queue) > 0: | if self.__updating_lock.acquire(False): | def external_add_node(self,tid): if not tid: raise ValueError('cannot add node None') if self.__initialized: self.__updating_queue.append([tid,'add']) if self.__updating_lock.acquire(False)\ and len(self.__updating_queue) > 0: self.__execution_loop() | 1353624828358255e5a28cdf04d1e44631909f7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/1353624828358255e5a28cdf04d1e44631909f7c/filteredtree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3903,
67,
1289,
67,
2159,
12,
2890,
16,
18081,
4672,
309,
486,
11594,
30,
1002,
2068,
2668,
12892,
527,
756,
599,
6134,
309,
365,
16186,
13227,
30,
365,
16186,
5533,
1776,
67,
4000,
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,
3903,
67,
1289,
67,
2159,
12,
2890,
16,
18081,
4672,
309,
486,
11594,
30,
1002,
2068,
2668,
12892,
527,
756,
599,
6134,
309,
365,
16186,
13227,
30,
365,
16186,
5533,
1776,
67,
4000,
18,
... |
sage: q.list() | sage: q.list() | def data_to_list(out, n, time): """ Convert output of Hart's sieve and n to a list and time. INPUT: out -- snapshot of text output of Hart's QuadraticSieve program n -- the integer being factored OUTPUT: list -- proper factors found so far str -- time information """ i = out.find('FACTORS:') if i == -1: return [], '', out # whole thing else: verbose = out[:i] out = out[i+len('FACTORS:')+1:].strip() if time: w = out.split('\n') for i in range(len(w)): if 'user' in w[i]: break if i < len(w): t = w[i].strip() out = '\n'.join([w[j] for j in range(i)]) else: t = '' else: t = '' Z = sage.rings.integer.Integer v = out.split() v = list(set([Z(m) for m in v if Z(m) != n])) v.sort() return v, t, verbose | 9ee4c5396b77f1c67933cd4efe2dc621880260d6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/9ee4c5396b77f1c67933cd4efe2dc621880260d6/qsieve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
501,
67,
869,
67,
1098,
12,
659,
16,
290,
16,
813,
4672,
3536,
4037,
876,
434,
670,
485,
1807,
272,
21271,
471,
290,
358,
279,
666,
471,
813,
18,
225,
12943,
30,
596,
1493,
4439,
434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
501,
67,
869,
67,
1098,
12,
659,
16,
290,
16,
813,
4672,
3536,
4037,
876,
434,
670,
485,
1807,
272,
21271,
471,
290,
358,
279,
666,
471,
813,
18,
225,
12943,
30,
596,
1493,
4439,
434... |
key, name = os.path.split( key ) value, type = _winreg.QueryValueEx( key, name ) self.__init_from_bytes__( value ) | key, name = os.path.split(key) value, type = _winreg.QueryValueEx(key, name) self.__init_from_bytes__(value) | def __init_from_reg_key__( self, key, name = None ): if not name: key, name = os.path.split( key ) value, type = _winreg.QueryValueEx( key, name ) self.__init_from_bytes__( value ) | c68039a3f4004e3fe46621e4c6512fd2401398fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/677/c68039a3f4004e3fe46621e4c6512fd2401398fc/win32timezone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
67,
2080,
67,
1574,
67,
856,
972,
12,
365,
16,
498,
16,
508,
273,
599,
262,
30,
309,
486,
508,
30,
498,
16,
508,
273,
1140,
18,
803,
18,
4939,
12,
856,
13,
460,
16,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
67,
2080,
67,
1574,
67,
856,
972,
12,
365,
16,
498,
16,
508,
273,
599,
262,
30,
309,
486,
508,
30,
498,
16,
508,
273,
1140,
18,
803,
18,
4939,
12,
856,
13,
460,
16,
6... |
TixSubWidget.__init__(self, master, name, destroy_physically) | TixSubWidget.__init__(self, master, name, destroy_physically) | def __init__(self, master, name, destroy_physically=1): | 86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return _measure.observatory(self, name.upper()) | return _measures.observatory(self, name.upper()) | def observatory(self, name): """Get a (position) measure for the given obervatory :param name: the name of the observatory :returns: a position measure """ return _measure.observatory(self, name.upper()) | 187b2d51045f54fa34a7e021c22160e45c9dbd75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7472/187b2d51045f54fa34a7e021c22160e45c9dbd75/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8681,
8452,
12,
2890,
16,
508,
4672,
3536,
967,
279,
261,
3276,
13,
6649,
364,
326,
864,
320,
744,
90,
8452,
225,
294,
891,
508,
30,
326,
508,
434,
326,
8681,
8452,
294,
6154,
30,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8681,
8452,
12,
2890,
16,
508,
4672,
3536,
967,
279,
261,
3276,
13,
6649,
364,
326,
864,
320,
744,
90,
8452,
225,
294,
891,
508,
30,
326,
508,
434,
326,
8681,
8452,
294,
6154,
30,
27... |
print "Run crashed! Sorry...", e1, e2 | print "Run crashed! Sorry..." | def run(self, lib, state, tfinal=0.2): | 51a47c569962e0deed4749b7fada1f2e923a341a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3697/51a47c569962e0deed4749b7fada1f2e923a341a/run.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
2561,
16,
919,
16,
268,
6385,
33,
20,
18,
22,
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,
... | [
1,
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,
1086,
12,
2890,
16,
2561,
16,
919,
16,
268,
6385,
33,
20,
18,
22,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
sApps += '<a:option img="%s" caption="%s" value="%s" selected="%s"/>' % (app['icon'], app['displayName'], app['launchUrl'], sSelected) | sApps += \ '<a:option img="%s" caption="%s" value="%s" selected="%s"/>' % \ (app['icon'], app['displayName'], app['launchUrl'], sSelected) | def setParams(self): self.response.setHeader('cache-control', 'no-cache') self.params['TASK_BAR_POS'] = self.session.user.settings.value.setdefault('TASK_BAR_POS', 'bottom') if self.params['TASK_BAR_POS'] == 'bottom': self.params['CHECKED_TOP'] = 'false' self.params['CHECKED_BOTTOM'] = 'true' else: self.params['CHECKED_TOP'] = 'true' self.params['CHECKED_BOTTOM'] = 'false' autoRun = self.session.user.settings.value.setdefault('AUTO_RUN', '') if self.session.user.settings.value.setdefault('RUN_MAXIMIZED', False) == True: self.params['RUN_MAXIMIZED_VALUE'] = 'true' else: self.params['RUN_MAXIMIZED_VALUE'] = 'false' | 9a2f8b99a4794ca66a515bfe9ca832718bd20756 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2504/9a2f8b99a4794ca66a515bfe9ca832718bd20756/ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31705,
12,
2890,
4672,
365,
18,
2740,
18,
542,
1864,
2668,
2493,
17,
7098,
2187,
296,
2135,
17,
2493,
6134,
225,
365,
18,
2010,
3292,
15580,
67,
21908,
67,
7057,
3546,
273,
365,
18,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31705,
12,
2890,
4672,
365,
18,
2740,
18,
542,
1864,
2668,
2493,
17,
7098,
2187,
296,
2135,
17,
2493,
6134,
225,
365,
18,
2010,
3292,
15580,
67,
21908,
67,
7057,
3546,
273,
365,
18,
31... |
reqNodeIdx, provInstId, provNodeIdx) in result: | reqNodeIdx, provInstId, provNodeIdx, reqDepNum) in result: | def _gatherResolution(self, result): # these track the nodes which satisfy each depId. brokenByErase # tracks what used to provide something but is being removed, while # satisfied tracks what now provides it unresolveable = set() brokenByErase = {} satisfied = { 0 : 0 } wasIn = {} | 2eee789e85d115af648cea4bb94da4b379c7f713 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8747/2eee789e85d115af648cea4bb94da4b379c7f713/deptable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
75,
4806,
11098,
12,
2890,
16,
563,
4672,
468,
4259,
3298,
326,
2199,
1492,
18866,
1517,
5993,
548,
18,
12933,
858,
41,
5648,
468,
13933,
4121,
1399,
358,
5615,
5943,
1496,
353,
383... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
75,
4806,
11098,
12,
2890,
16,
563,
4672,
468,
4259,
3298,
326,
2199,
1492,
18866,
1517,
5993,
548,
18,
12933,
858,
41,
5648,
468,
13933,
4121,
1399,
358,
5615,
5943,
1496,
353,
383... |
if self.gateway: | if self.gateway and self.connector.type == "router": | def encode_xml(self, dom, doc, internal): dummynet.EmulatedConnection.encode_xml(self, dom, doc, internal) if self.gateway: dom.setAttribute("gateway", self.gateway) if internal: if self.tinc_port: dom.setAttribute("tinc_port", str(self.tinc_port)) | b7ff2febf751393dcad9efffe44675577cca50dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3860/b7ff2febf751393dcad9efffe44675577cca50dc/tinc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
67,
2902,
12,
2890,
16,
4092,
16,
997,
16,
2713,
4672,
4569,
81,
878,
278,
18,
1514,
11799,
1952,
18,
3015,
67,
2902,
12,
2890,
16,
4092,
16,
997,
16,
2713,
13,
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,
2017,
67,
2902,
12,
2890,
16,
4092,
16,
997,
16,
2713,
4672,
4569,
81,
878,
278,
18,
1514,
11799,
1952,
18,
3015,
67,
2902,
12,
2890,
16,
4092,
16,
997,
16,
2713,
13,
309,
365,
18,
... |
conf = YumConf(verbose, releasever, arch, BuildArchTranslate(arch), buildroot, c, reposdirs) | barch = buildarchtranslate.get(arch, arch) conf = YumConf(verbose, releasever, arch, barch, buildroot, c, reposdirs) | def readRepos(releasever, configfiles, arch, buildroot, readdebug, readsrc, reposdirs, verbose, readcompsfile=0): # Read in /etc/yum.conf config files. repos = [] for c in configfiles: conf = YumConf(verbose, releasever, arch, BuildArchTranslate(arch), buildroot, c, reposdirs) #print conf.vars for key in conf.vars.keys(): if key == "main": #mainconf = conf.vars["main"] #if mainconf.has_key("distroverpkg"): # distroverpkg = [mainconf["distroverpkg"]] continue sec = conf[key] if sec.get("enabled") == "0": continue baseurls = sec.get("baseurl", []) excludes = sec.get("exclude", "") # If we have mirrorlist grab it, read it and add the extended # lines to our baseurls, just like yum does. if sec.has_key("mirrorlist"): for mlist in sec["mirrorlist"]: mlist = conf.extendValue(mlist) if verbose > 2: print "Getting mirrorlist from %s." % mlist fname = cacheLocal([mlist], "mirrorlist", key, 1, verbose, nofilename=1) lines = [] if fname: lines = open(fname).readlines() for l in lines: l = l.replace("$ARCH", "$basearch")[:-1] if l: baseurls.append(conf.extendValue(l)) if not baseurls: print "%s:" % key, "No url for this section in conf file." return None repo = RpmRepo(baseurls, excludes, verbose, key, readsrc) repo.read() if not readdebug: repo.delDebuginfo() if readcompsfile: repo.compsfile = cacheLocal(baseurls, "/repodata/comps.xml", key + "/repo") repos.append(repo) return repos | 427871e48b993cbe1bec0e26f0693386c8014c95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/427871e48b993cbe1bec0e26f0693386c8014c95/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
28453,
12,
9340,
502,
16,
642,
2354,
16,
6637,
16,
1361,
3085,
16,
855,
4148,
16,
855,
4816,
16,
13686,
8291,
16,
3988,
16,
855,
31532,
768,
33,
20,
4672,
468,
2720,
316,
342,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28453,
12,
9340,
502,
16,
642,
2354,
16,
6637,
16,
1361,
3085,
16,
855,
4148,
16,
855,
4816,
16,
13686,
8291,
16,
3988,
16,
855,
31532,
768,
33,
20,
4672,
468,
2720,
316,
342,
1... |
self.center = (reduceTheta(self.center[0]), center[1]) | self.center = (reduceTheta(self.center[0]), self.center[1]) | def __init__(self, center, radius): """Creates a new spherical circle with the given center and radius. """ self.center = sphericalCoords(center) self.radius = float(radius) self.boundingBox = None if self.radius < 0.0 or self.radius > 180.0: raise RuntimeError( 'Circle radius is negative or greater than 180 deg') self.center = (reduceTheta(self.center[0]), center[1]) | fc58c266e9ed7e70e36ba8e8b8b9b6a69e5f215f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6528/fc58c266e9ed7e70e36ba8e8b8b9b6a69e5f215f/geometry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4617,
16,
5725,
4672,
3536,
2729,
279,
394,
272,
21570,
12470,
598,
326,
864,
4617,
471,
5725,
18,
3536,
365,
18,
5693,
273,
272,
21570,
13089,
12,
5693,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4617,
16,
5725,
4672,
3536,
2729,
279,
394,
272,
21570,
12470,
598,
326,
864,
4617,
471,
5725,
18,
3536,
365,
18,
5693,
273,
272,
21570,
13089,
12,
5693,
... |
furthestBlock.childNodes.remove(furthestBlock) | furthestBlock.parent.removeChild(furthestBlock) | def endTagFormatting(self, name): """The much-feared adoption agency algorithm""" # XXX I don't like while True + break... too much # possibility of infinite loops while True: # Step 1 paragraph 1 afeElement = self.parser.elementInActiveFormattingElements(name) if not afeElement or (afeElement in self.parser.openElements and not self.parser.elementInScope(afeElement.name)): self.parser.parseError() return | 4a9afa5240a765a75eb29592887545baf51a5215 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/4a9afa5240a765a75eb29592887545baf51a5215/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
23974,
12,
2890,
16,
508,
4672,
3536,
1986,
9816,
17,
3030,
2258,
1261,
3482,
1737,
2075,
4886,
8395,
468,
11329,
467,
2727,
1404,
3007,
1323,
1053,
397,
898,
2777,
4885,
9816,
468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
23974,
12,
2890,
16,
508,
4672,
3536,
1986,
9816,
17,
3030,
2258,
1261,
3482,
1737,
2075,
4886,
8395,
468,
11329,
467,
2727,
1404,
3007,
1323,
1053,
397,
898,
2777,
4885,
9816,
468,... |
return valgrind_test.RunTool(cmd) | return valgrind_test.RunTool(cmd, "layout") | def TestLayoutChunk(self, chunk_num, chunk_size): # Run tests [chunk_num*chunk_size .. (chunk_num+1)*chunk_size) from the # list of tests. Wrap around to beginning of list at end. # If chunk_size is zero, run all tests in the list once. # If a text file is given as argument, it is used as the list of tests. # # Build the ginormous commandline in 'cmd'. # It's going to be roughly # python valgrind_test.py ... python run_webkit_tests.py ... # but we'll use the --indirect flag to valgrind_test.py # to avoid valgrinding python. # Start by building the valgrind_test.py commandline. cmd = self._DefaultCommand("webkit") cmd.append("--trace_children") cmd.append("--indirect") # Now build script_cmd, the run_webkits_tests.py commandline # Store each chunk in its own directory so that we can find the data later chunk_dir = os.path.join("layout", "chunk_%05d" % chunk_num) test_shell = os.path.join(self._options.build_dir, "test_shell") out_dir = os.path.join(google.path_utils.ScriptDir(), "latest") out_dir = os.path.join(out_dir, chunk_dir) if os.path.exists(out_dir): old_files = glob.glob(os.path.join(out_dir, "*.txt")) for f in old_files: os.remove(f) else: os.makedirs(out_dir) script = os.path.join(self._source_dir, "webkit", "tools", "layout_tests", "run_webkit_tests.py") script_cmd = ["python", script, "--run-singly", "-v", "--noshow-results", "--time-out-ms=200000", "--nocheck-sys-deps"] # Pass build mode to run_webkit_tests.py. We aren't passed it directly, # so parse it out of build_dir. run_webkit_tests.py can only handle # the two values "Release" and "Debug". # TODO(Hercules): unify how all our scripts pass around build mode # (--mode / --target / --build_dir / --debug) if self._options.build_dir.endswith("Debug"): script_cmd.append("--debug"); if (chunk_size > 0): script_cmd.append("--run-chunk=%d:%d" % (chunk_num, chunk_size)) if len(self._args): # if the arg is a txt file, then treat it as a list of tests if os.path.isfile(self._args[0]) and self._args[0][-4:] == ".txt": script_cmd.append("--test-list=%s" % self._args[0]) else: script_cmd.extend(self._args) self._ReadGtestFilterFile("layout", script_cmd) # Now run script_cmd with the wrapper in cmd cmd.extend(["--"]) cmd.extend(script_cmd) return valgrind_test.RunTool(cmd) | 4ec5079fe12c534bccefbad831e9a8f208490e86 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4ec5079fe12c534bccefbad831e9a8f208490e86/chrome_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7766,
3744,
5579,
12,
2890,
16,
2441,
67,
2107,
16,
2441,
67,
1467,
4672,
468,
1939,
7434,
306,
6551,
67,
2107,
14,
6551,
67,
1467,
6116,
261,
6551,
67,
2107,
15,
21,
17653,
6551,
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,
7766,
3744,
5579,
12,
2890,
16,
2441,
67,
2107,
16,
2441,
67,
1467,
4672,
468,
1939,
7434,
306,
6551,
67,
2107,
14,
6551,
67,
1467,
6116,
261,
6551,
67,
2107,
15,
21,
17653,
6551,
67,
... |
self.body.append ('\\end{enumerate}\n' ) def astext (self): if self.pdfinfo is not None and self.pdfauthor: self.pdfinfo.append ('pdfauthor={%s}' % self.pdfauthor) if self.pdfinfo: pdfinfo = '\\hypersetup{\n' + ',\n'.join (self.pdfinfo) + '\n}\n' else: pdfinfo = '' head = '\\title{%s}\n' % self.title if self.auth_stack: auth_head = '\\author{%s}\n' % ' \\and\n'.join (\ ['~\\\\\n'.join (auth_lines) for auth_lines in self.auth_stack]) head += auth_head if self.date: date_head = '\\date{%s}\n' % self.date head += date_head return ''.join (self.head_prefix + [head] + self.head + [pdfinfo] + self.body_prefix + self.body + self.body_suffix) | self.out.append ('\\end{enumerate}\n' ) | def depart_enumerated_list (self, node): if ('contents' in getattr (self, 'topic_classes', [])): self.body.append ('\\end{list}\n') else: self.body.append ('\\end{enumerate}\n' ) | 7fa34d63a11663a7daeb27efb01eb826b364662a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1278/7fa34d63a11663a7daeb27efb01eb826b364662a/rst2beamer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26000,
67,
7924,
19007,
67,
1098,
261,
2890,
16,
756,
4672,
309,
7707,
3980,
11,
316,
3869,
261,
2890,
16,
296,
10476,
67,
4701,
2187,
5378,
3719,
30,
365,
18,
3432,
18,
6923,
7707,
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,
26000,
67,
7924,
19007,
67,
1098,
261,
2890,
16,
756,
4672,
309,
7707,
3980,
11,
316,
3869,
261,
2890,
16,
296,
10476,
67,
4701,
2187,
5378,
3719,
30,
365,
18,
3432,
18,
6923,
7707,
16... |
from_param = classmethod(from_param) | def from_param(cls, obj): if not isinstance(obj, ndarray): raise TypeError, "argument must be an ndarray" if cls._dtype_ is not None \ and obj.dtype != cls._dtype_: raise TypeError, "array must have data type %s" % cls._dtype_ if cls._ndim_ is not None \ and obj.ndim != cls._ndim_: raise TypeError, "array must have %d dimension(s)" % cls._ndim_ if cls._shape_ is not None \ and obj.shape != cls._shape_: raise TypeError, "array must have shape %s" % str(cls._shape_) if cls._flags_ is not None \ and ((obj.flags.num & cls._flags_) != cls._flags_): raise TypeError, "array must have flags %s" % \ _flags_fromnum(cls._flags_) return obj.ctypes | 8845905c2517e39a58d0d9b6287e873116fda932 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/8845905c2517e39a58d0d9b6287e873116fda932/ctypeslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
891,
12,
6429,
16,
1081,
4672,
309,
486,
1549,
12,
2603,
16,
8304,
4672,
1002,
3580,
16,
315,
3446,
1297,
506,
392,
8304,
6,
309,
2028,
6315,
8972,
67,
353,
486,
599,
521,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
891,
12,
6429,
16,
1081,
4672,
309,
486,
1549,
12,
2603,
16,
8304,
4672,
1002,
3580,
16,
315,
3446,
1297,
506,
392,
8304,
6,
309,
2028,
6315,
8972,
67,
353,
486,
599,
521,
4... | |
def do_footer(self): stdout.write('}\n') | def do_val(self, val, prefix, last): name = (val.getAttribute('suffix') or val.getAttribute('name')).replace('_', '') stdout.write("""\ | e562d7cdac8cd00b1ec7c9a7392ec1fc7d3edbed /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7593/e562d7cdac8cd00b1ec7c9a7392ec1fc7d3edbed/qt4-constants-gen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1125,
12,
2890,
16,
1244,
16,
1633,
16,
1142,
4672,
508,
273,
261,
1125,
18,
588,
1499,
2668,
8477,
6134,
578,
1244,
18,
588,
1499,
2668,
529,
6134,
2934,
2079,
2668,
67,
2187... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
67,
1125,
12,
2890,
16,
1244,
16,
1633,
16,
1142,
4672,
508,
273,
261,
1125,
18,
588,
1499,
2668,
8477,
6134,
578,
1244,
18,
588,
1499,
2668,
529,
6134,
2934,
2079,
2668,
67,
2187... | |
ParseDbg.add("parse_ver (header) version(%s) = %s (%s)" % (plugin, p_ver_orig, p_ver)) | self.pdbg("parse_ver (header) version(%s) = %s (%s)" % (plugin, p_ver_orig, p_ver)) | def parse_ver(self): match = re_ver_fun.match(self.buffer) if match: p = match.span(0)[1] self.buffer = self.buffer[p:] ParseDbg.add("parse_ver new buffer = %s" % self.buffer) op = match.group(1) orig_ver = match.group(2) ver = format_version(orig_ver) plugin = C.cname(match.group(3)) expr = "[VER %s %s %s]" % (op, orig_ver, plugin) ParseDbg.add("parse_ver, expr=%s ver=%s" % (expr, ver)) if not plugin in self.active: ParseDbg.add("parse_ver [VER] \"%s\" not active" % plugin) return(False, expr) # file does not exist if self.datadir == None: # this case is reached when doing fromfile checks # and we do not have the actual plugin to check, so # we assume that the plugin matches the given version if op == '=': return(True, expr) else: return(False, expr) desc = plugin_description(self.datadir.find_path(plugin)) match = re_header_version.search(desc) if match: p_ver_orig = match.group(1) p_ver = format_version(p_ver_orig) ParseDbg.add("parse_ver (header) version(%s) = %s (%s)" % (plugin, p_ver_orig, p_ver)) else: match = re_filename_version.search(plugin) if match: p_ver_orig = match.group(1) p_ver = format_version(p_ver_orig) ParseDbg.add("parse_ver (filename) version(%s) = %s (%s)" % (plugin, p_ver_orig, p_ver)) else: ParseDbg.add("parse_ver no version for %s" % plugin) return(False, expr) ParseDbg.add("parse_ver compare p_ver=%s %s ver=%s" % (p_ver, op, ver)) if op == '=': return(p_ver == ver, expr) elif op == '<': return(p_ver < ver, expr) elif op == '>': return(p_ver > ver, expr) else: self.parse_error(_["Invalid [VER] operator: %s"] % self.buffer) return(None, None) self.parse_error(_["Invalid [VER] function: %s"] % self.buffer) return(None, None) | 57b9dbd56a9e011788ef60900e9a91776ddbb48d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2827/57b9dbd56a9e011788ef60900e9a91776ddbb48d/mlox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
502,
12,
2890,
4672,
845,
273,
283,
67,
502,
67,
12125,
18,
1916,
12,
2890,
18,
4106,
13,
309,
845,
30,
293,
273,
845,
18,
3969,
12,
20,
25146,
21,
65,
365,
18,
4106,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
502,
12,
2890,
4672,
845,
273,
283,
67,
502,
67,
12125,
18,
1916,
12,
2890,
18,
4106,
13,
309,
845,
30,
293,
273,
845,
18,
3969,
12,
20,
25146,
21,
65,
365,
18,
4106,
273... |
HamFolderItemsEvent) | HamFolderItemsEvent, "filtering") | def UpdateFolderHooks(self): config = self.manager.config.filter new_hooks = {} new_hooks.update( self._HookFolderEvents(config.watch_folder_ids, config.watch_include_sub, HamFolderItemsEvent) ) # For spam manually moved if config.spam_folder_id: new_hooks.update( self._HookFolderEvents([config.spam_folder_id], False, SpamFolderItemsEvent) ) for k in self.folder_hooks.keys(): if not new_hooks.has_key(k): self.folder_hooks[k].Close() self.folder_hooks = new_hooks | 54e586400b93724e781110ac3a96d9911643ea6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/54e586400b93724e781110ac3a96d9911643ea6f/addin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
3899,
13620,
12,
2890,
4672,
642,
273,
365,
18,
4181,
18,
1425,
18,
2188,
394,
67,
10468,
273,
2618,
394,
67,
10468,
18,
2725,
12,
365,
6315,
5394,
3899,
3783,
12,
1425,
18,
7585... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
3899,
13620,
12,
2890,
4672,
642,
273,
365,
18,
4181,
18,
1425,
18,
2188,
394,
67,
10468,
273,
2618,
394,
67,
10468,
18,
2725,
12,
365,
6315,
5394,
3899,
3783,
12,
1425,
18,
7585... |
if USE_FROZEN: frozenmodules = [] | if USE_ZIPIMPORT: import zipfile relpath = pathjoin("Contents", "Resources", ZIP_ARCHIVE) abspath = pathjoin(self.bundlepath, relpath) zf = zipfile.ZipFile(abspath, "w", zipfile.ZIP_DEFLATED) | def addPythonModules(self): self.message("Adding Python modules", 1) | fe0a44eba5386cceb89f4dbb183ff48b4d42426e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/fe0a44eba5386cceb89f4dbb183ff48b4d42426e/bundlebuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
15774,
7782,
12,
2890,
4672,
365,
18,
2150,
2932,
13962,
6600,
4381,
3113,
404,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
15774,
7782,
12,
2890,
4672,
365,
18,
2150,
2932,
13962,
6600,
4381,
3113,
404,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gnucap += self.to_gnucap_res(self.gnucap_name + "_all", 0, 2, self.resitance) return gnucap | gnucap_resp = self.to_gnucap_res(self.gnucap_name + "_all", 0, 2, self.resitance) gnucap[0] += gnucap_resp[0] gnucap[1] += gnucap_resp[1] return [gnucap[0], gnucap[1]] | def to_gnucap(self, model): | 13ee6c41f57e9506834260f5eae4b05b66b6faeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/13ee6c41f57e9506834260f5eae4b05b66b6faeb/electric.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
1600,
5286,
438,
12,
2890,
16,
938,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
1600,
5286,
438,
12,
2890,
16,
938,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ticket['priority'] = bug['priority'] | ticket['priority'] = bug['priority'].lower() | def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla if BZ_VERSION == '2.11': print 'Using Buzvilla v%s schema.' % BZ_VERSION activityFields['removed'] = 'oldvalue' activityFields['added'] = 'newvalue' # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % (_db, _host, _user, _password) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "cleaning all tickets..." c = trac.db().cursor() c.execute("""DELETE FROM ticket_change""") trac.db().commit() c.execute("""DELETE FROM ticket""") trac.db().commit() c.execute("""DELETE FROM attachment""") os.system('rm -rf %s' % trac.env.get_attachments_dir()) os.mkdir(trac.env.get_attachments_dir()) trac.db().commit() print print "1. import severities..." severities = (('blocker', '1'), ('critical', '2'), ('major', '3'), ('normal', '4'), ('minor', '5'), ('trivial', '6'), ('enhancement', '7')) trac.setSeverityList(severities) print print "2. import components..." sql = "SELECT value, initialowner AS owner FROM components" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() for component in components: component['owner'] = trac.getLoginName(mysql_cur, component['owner']) trac.setComponentList(components, 'value') print print "3. import priorities..." priorities = (('P1', '1'), ('P2', '2'), ('P3', '3'), ('P4', '4'), ('P5', '5')) trac.setPriorityList(priorities) print print "4. import versions..." sql = "SELECT DISTINCTROW value FROM versions" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print print "5. import milestones..." mysql_cur.execute("SELECT value FROM milestones") milestones = mysql_cur.fetchall() if milestones[0] == '---': trac.setMilestoneList(milestones, 'value') else: trac.setMilestoneList([], '') print print '6. retrieving bugs...' sql = "SELECT * FROM bugs " if PRODUCTS: sql += " WHERE %s" % productFilter('product', PRODUCTS) sql += " ORDER BY bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print print "7. import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'] ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s" % bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] if bug['target_milestone'] == '---': ticket['milestone'] = '' else: ticket['milestone'] = bug['target_milestone'] bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] keywords = string.split(bug['keywords'], ' ') mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time=desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value=desc['thetext']) mysql_cur.execute("SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' ticketChanges = [] for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == 'resolution' or field_name == 'bug_status': removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == 'resolution': resolution = added.lower() keywordChange = False oldKeywords = string.join(keywords, " ") # convert bugzilla field names... if field_name == 'bug_severity': field_name = 'severity' elif field_name == 'assigned_to': field_name = 'owner' elif field_name == 'bug_status': field_name = 'status' if removed in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[added] keywords.append(kw) keywordChange = True added = statusXlator[added] removed = statusXlator[removed] elif field_name == 'short_desc': field_name = 'summary' elif field_name == 'product': if removed in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[added] keywords.append(kw) keywordChange = True ticketChange = {} ticketChange['ticket'] = bugid ticketChange['time'] = activity['bug_when'] ticketChange['author'] = trac.getLoginName(mysql_cur, activity['who']) ticketChange['field'] = field_name ticketChange['oldvalue'] = removed ticketChange['newvalue'] = added if keywordChange: newKeywords = string.join(keywords, " ") ticketChangeKw = ticketChange ticketChangeKw['field'] = 'keywords' ticketChangeKw['oldvalue'] = oldKeywords ticketChangeKw['newvalue'] = newKeywords #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field='keywords', oldvalue=oldKeywords, newvalue=newKeywords) ticketChanges.append(ticketChangeKw) if field_name in IGNORED_ACTIVITY_FIELDS: continue # skip changes that have no effect (think translation!) if added == removed: continue # bugzilla splits large summary changes into two records for oldChange in ticketChanges: if (field_name == 'summary' and oldChange['field'] == ticketChange['field'] and oldChange['time'] == ticketChange['time'] and oldChange['author'] == ticketChange['author']): oldChange['oldvalue'] += " " + ticketChange['oldvalue'] oldChange['newvalue'] += " " + ticketChange['newvalue'] break else: #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field=field_name, oldvalue=removed, newvalue=added) ticketChanges.append (ticketChange) for ticketChange in ticketChanges: trac.addTicketChange (**ticketChange) # for some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == 'closed': ticket['resolution'] = resolution if bug['bug_status'] in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug['bug_status']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) if bug['product'] in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[bug['product']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) tracAttachment = Attachment(a['filename'], a['thedata']) trac.addAttachment(bugid, tracAttachment, a['description'], author) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) print "Success!" | 63f7bce156a2ed5a10227f95c07a9ae105efaf62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/63f7bce156a2ed5a10227f95c07a9ae105efaf62/bugzilla2trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... |
flavorFilter=FLAVOR_FILTER_BEST, pathList = [], | flavorFilter=FLAVOR_FILTER_BEST, | def displayTroves(cfg, troveSpecs=[], whatProvidesList=[], # query options versionFilter=VERSION_FILTER_LATEST, flavorFilter=FLAVOR_FILTER_BEST, pathList = [], useAffinity = False, # trove options info = False, digSigs = False, showDeps = False, showBuildReqs = False, # file options ls = False, lsl = False, ids = False, sha1s = False, tags = False, fileDeps = False, fileVersions = False, # collection options showTroves = False, recurse = None, showAllTroves = False, weakRefs = False, showTroveFlags = False, alwaysDisplayHeaders = False ): """ Displays information about troves found in repositories @param repos: a network repository client @type repos: repository.netclient.NetworkRepositoryClient @param cfg: conary config @type cfg: conarycfg.ConaryConfiguration @param troveSpecs: troves to search for @type troveSpecs: list of troveSpecs (n[=v][[f]]) @param versionFilter: add documentation here. Check man page for general description @type versionFilter: bool @param flavorFilter: add documentation here. Check man page for general description. @type flavorFilter: bool @param useAffinity: If False, disallow affinity database use. @type useAffinity: bool @param info: If true, display general information about the trove @type info: bool @param digSigs: If true, display digital signatures for a trove. @type digSigs: bool @param showBuildReqs: If true, display the versions and flavors of the build requirements that were used to build the given troves @type showBuildReqs: bool @param showDeps: If true, display provides and requires information for the trove. @type showDeps: bool @param ls: If true, list files in the trove @type ls: bool @param lsl: If true, list files in the trove + ls -l information @type lsl: bool @param ids: If true, list pathIds for files in the troves @type ids: bool @param sha1s: If true, list sha1s for files in the troves @type sha1s: bool @param tags: If true, list tags for files in the troves @type tags: bool @param fileDeps: If true, print file-level dependencies @type fileDeps: bool @param fileVersions: If true, print fileversions @type fileVersions: bool @param showTroves: If true, display byDefault True child troves of this trove @type showTroves: bool @param recurse: display child troves of this trove, recursively @type recurse: bool @param showAllTroves: If true, display all byDefault False child troves of this trove @type showAllTroves: bool @param weakRefs: display both weak and strong references of this trove. @type weakRefs: bool @param showTroveFlags: display [<flags>] list with information about the given troves. @type showTroveFlags: bool @param alwaysDisplayHeaders: If true, display headers even when listing files. @type alwaysDisplayHeaders: bool @rtype: None """ client = conaryclient.ConaryClient(cfg) repos = client.getRepos() if useAffinity: affinityDb = client.db else: affinityDb = None whatProvidesList = [ deps.parseDep(x) for x in whatProvidesList ] troveTups = getTrovesToDisplay(repos, troveSpecs, pathList, whatProvidesList, versionFilter, flavorFilter, cfg.installLabelPath, cfg.flavor, affinityDb) dcfg = display.DisplayConfig(repos, affinityDb) dcfg.setTroveDisplay(deps=showDeps, info=info, showBuildReqs=showBuildReqs, digSigs=digSigs, fullVersions=cfg.fullVersions, showLabels=cfg.showLabels, fullFlavors=cfg.fullFlavors, showComponents = cfg.showComponents, baseFlavors = cfg.flavor) dcfg.setFileDisplay(ls=ls, lsl=lsl, ids=ids, sha1s=sha1s, tags=tags, fileDeps=fileDeps, fileVersions=fileVersions) recurseOne = showTroves or showAllTroves or weakRefs if recurse is None and not recurseOne and troveSpecs: # if we didn't explicitly set recurse and we're not recursing one # level explicitly and we specified troves (so everything won't # show up at the top level anyway), guess at whether to recurse recurse = True in (ls, lsl, ids, sha1s, tags, showDeps, fileDeps, fileVersions) displayHeaders = alwaysDisplayHeaders or showTroveFlags dcfg.setChildDisplay(recurseAll = recurse, recurseOne = recurseOne, showNotByDefault = showAllTroves, showWeakRefs = weakRefs, showTroveFlags = showTroveFlags, displayHeaders = displayHeaders, checkExists = False) if troveSpecs: dcfg.setPrimaryTroves(set(troveTups)) formatter = display.TroveFormatter(dcfg) display.displayTroves(dcfg, formatter, troveTups) | 265bcb4c0689a25b47b13c420fe54e28b29f7ab4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/265bcb4c0689a25b47b13c420fe54e28b29f7ab4/queryrep.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
56,
303,
3324,
12,
7066,
16,
23432,
537,
15999,
22850,
6487,
4121,
17727,
682,
22850,
6487,
468,
843,
702,
1177,
1586,
33,
5757,
67,
11126,
67,
10512,
882,
16,
19496,
1586,
33,
42,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
56,
303,
3324,
12,
7066,
16,
23432,
537,
15999,
22850,
6487,
4121,
17727,
682,
22850,
6487,
468,
843,
702,
1177,
1586,
33,
5757,
67,
11126,
67,
10512,
882,
16,
19496,
1586,
33,
42,... |
self.addstr(' -'*(self.width//2-1)) | self.addnstr('- '*(self.width//2), self.width) | def write_line_separator(self): """ """ self.win.attron(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR)) self.addstr(' -'*(self.width//2-1)) self.win.attroff(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR)) | 53a5536cf12cbe8474f37b1c8e31b60489b2b62f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/53a5536cf12cbe8474f37b1c8e31b60489b2b62f/window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1369,
67,
11287,
12,
2890,
4672,
3536,
3536,
365,
18,
8082,
18,
1747,
265,
12,
1397,
2420,
18,
3266,
67,
6017,
12,
7997,
18,
10989,
67,
12917,
67,
5151,
67,
4550,
3719,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1369,
67,
11287,
12,
2890,
4672,
3536,
3536,
365,
18,
8082,
18,
1747,
265,
12,
1397,
2420,
18,
3266,
67,
6017,
12,
7997,
18,
10989,
67,
12917,
67,
5151,
67,
4550,
3719,
365,
... |
names.extend(filter(lambda n: n not in ('.', '..'), dir.entries.keys())) | def _glob1(self, pattern, ondisk=True, source=False, strings=False): """ Globs for and returns a list of entry names matching a single pattern in this directory. | 2958b4895e2270f8e56503dbda89ab0dced75be0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12817/2958b4895e2270f8e56503dbda89ab0dced75be0/FS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10581,
21,
12,
2890,
16,
1936,
16,
603,
10863,
33,
5510,
16,
1084,
33,
8381,
16,
2064,
33,
8381,
4672,
3536,
18901,
87,
364,
471,
1135,
279,
666,
434,
1241,
1257,
3607,
279,
2202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10581,
21,
12,
2890,
16,
1936,
16,
603,
10863,
33,
5510,
16,
1084,
33,
8381,
16,
2064,
33,
8381,
4672,
3536,
18901,
87,
364,
471,
1135,
279,
666,
434,
1241,
1257,
3607,
279,
2202,... | |
for child in doc.childNodes: if child.nodeType == xml.dom.core.ELEMENT: tables = child.getElementsByTagName("table") for table in tables: fixup_table(doc, table) | for table in find_all_elements(doc, "table"): fixup_table(doc, table) | def fixup_table_structures(doc): # must be done after remap_element_names(), or the tables won't be found for child in doc.childNodes: if child.nodeType == xml.dom.core.ELEMENT: tables = child.getElementsByTagName("table") for table in tables: fixup_table(doc, table) | 6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
67,
2121,
67,
27979,
12,
2434,
4672,
468,
1297,
506,
2731,
1839,
21674,
67,
2956,
67,
1973,
9334,
578,
326,
4606,
8462,
1404,
506,
1392,
364,
1014,
316,
1104,
67,
454,
67,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
67,
2121,
67,
27979,
12,
2434,
4672,
468,
1297,
506,
2731,
1839,
21674,
67,
2956,
67,
1973,
9334,
578,
326,
4606,
8462,
1404,
506,
1392,
364,
1014,
316,
1104,
67,
454,
67,
6... |
self.longTypes = set(('MGEF','ACTI','LIGH','WTHR','CONT','DOOR','EXPL','IPCT','PROJ','ASPC','SOUN','REGN')) | self.longTypes = set(('MGEF','ACTI','LIGH','WTHR','CONT','DOOR','EXPL','IPCT','PROJ','ASPC','WEAP','SOUN','REGN')) | def initPatchFile(self,patchFile,loadMods): """Prepare to handle specified patch mod. All functions are called after this.""" Patcher.initPatchFile(self,patchFile,loadMods) self.id_data = {} #--Names keyed by long fid. self.srcClasses = set() #--Record classes actually provided by src mods/files. self.sourceMods = self.getConfigChecked() self.isActive = len(self.sourceMods) != 0 self.classestemp = set() #--Type Fields recAttrs_class = self.recAttrs_class = {} for recClass in (MreMgef,): recAttrs_class[recClass] = ('castingSound','boltSound','hitSound','areaSound') for recClass in (MreActi,): recAttrs_class[recClass] = ('soundLooping','soundActivation') for recClass in (MreLigh,MreTact): recAttrs_class[recClass] = ('sound',) for recClass in (MreWthr,): recAttrs_class[recClass] = ('sounds',) for recClass in (MreCont,): recAttrs_class[recClass] = ('soundOpen','soundClose') for recClass in (MreDoor,): recAttrs_class[recClass] = ('soundOpen','soundClose','soundLoop') for recClass in (MreExpl,MreIpct,): recAttrs_class[recClass] = ('soundLevel','sound1','sound2') for recClass in (MreProj,): recAttrs_class[recClass] = ('sound','soundCountDown','soundDisable','soundLevel') for recClass in (MreAspc,): recAttrs_class[recClass] = ('soundLooping','useSoundFromRegion','environmentType') for recClass in (MreWeap,): recAttrs_class[recClass] = ('soundGunShot3D','soundGunShot2D','soundGunShot3DLooping','soundLevel') #--Needs Longs self.longTypes = set(('MGEF','ACTI','LIGH','WTHR','CONT','DOOR','EXPL','IPCT','PROJ','ASPC','SOUN','REGN')) | a615e8547fe5fe7615e4e9bc94e9cafa1925f9da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/a615e8547fe5fe7615e4e9bc94e9cafa1925f9da/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
7332,
812,
12,
2890,
16,
2272,
812,
16,
945,
1739,
87,
4672,
3536,
7543,
358,
1640,
1269,
4729,
681,
18,
4826,
4186,
854,
2566,
1839,
333,
12123,
12042,
264,
18,
2738,
7332,
812,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
7332,
812,
12,
2890,
16,
2272,
812,
16,
945,
1739,
87,
4672,
3536,
7543,
358,
1640,
1269,
4729,
681,
18,
4826,
4186,
854,
2566,
1839,
333,
12123,
12042,
264,
18,
2738,
7332,
812,
... |
if(t.name == "SUSPEND START"): data.vprint("SUSPEND START %f %s:%d" % (t.time, sysvals.ftracefile, count)) inthepipe = True | if(t.name == 'SUSPEND START'): testrun[testidx].inthepipe = True data.setStart(t.time) | def analyzeTraceLog(): global sysvals, data # the ftrace data is tied to the dmesg data if(not data.usedmesg): return # read through the ftrace and parse the data data.vprint("Analyzing the ftrace data...") ftrace_line_fmt = r"^ *(?P<time>[0-9\.]*) *\| *(?P<cpu>[0-9]*)\)"+\ " *(?P<proc>.*)-(?P<pid>[0-9]*) *\|"+\ "[ +!]*(?P<dur>[0-9\.]*) .*\| (?P<msg>.*)" ftemp = dict() inthepipe = False tf = open(sysvals.ftracefile, 'r') count = 0 for line in tf: count = count + 1 # grab the time stamp if it's valid if(count == 1): parseStamp(line) continue # parse only valid lines m = re.match(ftrace_line_fmt, line) if(not m): continue m_time = m.group("time") m_pid = m.group("pid") m_msg = m.group("msg") m_dur = m.group("dur") if(m_time and m_pid and m_msg): t = FTraceLine(m_time, m_msg, m_dur) pid = int(m_pid) else: continue # the line should be a call, return, or event if(not t.fcall and not t.freturn and not t.fevent): continue # only parse the ftrace data during suspend/resume if(not inthepipe): # look for the suspend start marker if(t.fevent): if(t.name == "SUSPEND START"): data.vprint("SUSPEND START %f %s:%d" % (t.time, sysvals.ftracefile, count)) inthepipe = True continue else: # look for the resume end marker if(t.fevent): if(t.name == "RESUME COMPLETE"): data.vprint("RESUME COMPLETE %f %s:%d" % (t.time, sysvals.ftracefile, count)) inthepipe = False break continue # create a callgraph object for the data if(pid not in ftemp): ftemp[pid] = FTraceCallGraph() # when the call is finished, see which device matches it if(ftemp[pid].addLine(t, m)): if(not ftemp[pid].sanityCheck()): id = "task %s cpu %s" % (pid, m.group("cpu")) data.vprint("Sanity check failed for "+id+", ignoring this callback") continue callstart = ftemp[pid].start callend = ftemp[pid].end for p in data.phases: if(data.dmesg[p]['start'] <= callstart and callstart <= data.dmesg[p]['end']): list = data.dmesg[p]['list'] for devname in list: dev = list[devname] if(pid == dev['pid'] and callstart <= dev['start'] and callend >= dev['end']): data.vprint("%15s [%f - %f] %s(%d)" % (p, callstart, callend, devname, pid)) dev['ftrace'] = ftemp[pid] break ftemp[pid] = FTraceCallGraph() tf.close() | 0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
3448,
1343,
13332,
2552,
2589,
4524,
16,
501,
225,
468,
326,
284,
5129,
501,
353,
268,
2092,
358,
326,
9113,
281,
75,
501,
309,
12,
902,
501,
18,
3668,
26244,
75,
4672,
327,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
3448,
1343,
13332,
2552,
2589,
4524,
16,
501,
225,
468,
326,
284,
5129,
501,
353,
268,
2092,
358,
326,
9113,
281,
75,
501,
309,
12,
902,
501,
18,
3668,
26244,
75,
4672,
327,
225... |
def poll(self): | def poll(self, _deadstate=None): | def poll(self): """Check if child process has terminated. Returns returncode attribute.""" if self.returncode is None: if WaitForSingleObject(self._handle, 0) == WAIT_OBJECT_0: self.returncode = GetExitCodeProcess(self._handle) _active.remove(self) return self.returncode | 5caf2e855f5d02e4881436d90cc26a4288483b36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5caf2e855f5d02e4881436d90cc26a4288483b36/subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7672,
12,
2890,
16,
389,
22097,
2019,
33,
7036,
4672,
3536,
1564,
309,
1151,
1207,
711,
14127,
18,
225,
2860,
18125,
1566,
12123,
309,
365,
18,
2463,
710,
353,
599,
30,
309,
24129,
5281,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7672,
12,
2890,
16,
389,
22097,
2019,
33,
7036,
4672,
3536,
1564,
309,
1151,
1207,
711,
14127,
18,
225,
2860,
18125,
1566,
12123,
309,
365,
18,
2463,
710,
353,
599,
30,
309,
24129,
5281,... |
This function uses the algorithm of [Edmonds74] to calculate the | This function uses the algorithm of [Edmonds74]_ to calculate the | def wigner_9j(j_1, j_2, j_3, j_4, j_5, j_6, j_7, j_8, j_9, prec=None): r""" Calculate the Wigner 9j symbol `Wigner9j(j_1,j_2,j_3,j_4,j_5,j_6,j_7,j_8,j_9)`. INPUT: - ``j_1``, ..., ``j_9`` - integer or half integer - ``prec`` - precision, default: None. Providing a precision can drastically speed up the calculation. OUTPUT: rational number times the square root of a rational number (if prec=None), or real number if a precision is given EXAMPLES: A couple of examples and test cases, note that for speed reasons a precision is given:: sage: wigner_9j(1,1,1, 1,1,1, 1,1,0 ,prec=64) # ==1/18 0.0555555555555555555 sage: wigner_9j(1,1,1, 1,1,1, 1,1,1) 0 sage: wigner_9j(1,1,1, 1,1,1, 1,1,2 ,prec=64) # ==1/18 0.0555555555555555556 sage: wigner_9j(1,2,1, 2,2,2, 1,2,1 ,prec=64) # ==-1/150 -0.00666666666666666667 sage: wigner_9j(3,3,2, 2,2,2, 3,3,2 ,prec=64) # ==157/14700 0.0106802721088435374 sage: wigner_9j(3,3,2, 3,3,2, 3,3,2 ,prec=64) # ==3221*sqrt(70)/(246960*sqrt(105)) - 365/(3528*sqrt(70)*sqrt(105)) 0.00944247746651111739 sage: wigner_9j(3,3,1, 3.5,3.5,2, 3.5,3.5,1 ,prec=64) # ==3221*sqrt(70)/(246960*sqrt(105)) - 365/(3528*sqrt(70)*sqrt(105)) 0.0110216678544351364 sage: wigner_9j(100,80,50, 50,100,70, 60,50,100 ,prec=1000)*1.0 1.05597798065761e-7 sage: wigner_9j(30,30,10, 30.5,30.5,20, 30.5,30.5,10 ,prec=1000)*1.0 # ==(80944680186359968990/95103769817469)*sqrt(1/682288158959699477295) 0.0000325841699408828 sage: wigner_9j(64,62.5,114.5, 61.5,61,112.5, 113.5,110.5,60, prec=1000)*1.0 -3.41407910055520e-39 sage: wigner_9j(15,15,15, 15,3,15, 15,18,10, prec=1000)*1.0 -0.0000778324615309539 sage: wigner_9j(1.5,1,1.5, 1,1,1, 1.5,1,1.5) 0 It is an error to have arguments that are not integer or half integer values or do not fulfil the triangle relation:: sage: wigner_9j(0.5,0.5,0.5, 0.5,0.5,0.5, 0.5,0.5,0.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation sage: wigner_9j(1,1,1, 0.5,1,1.5, 0.5,1,2.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation ALGORITHM: This function uses the algorithm of [Edmonds74] to calculate the value of the 3j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03]. REFERENCES: - [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) """ imin = 0 imax = min(j_1 + j_9, j_2 + j_6, j_4 + j_8) sumres = 0 for kk in range(imin, imax + 1): sumres = sumres + (2 * kk + 1) * \ racah(j_1, j_2, j_9, j_6, j_3, kk, prec) * \ racah(j_4, j_6, j_8, j_2, j_5, kk, prec) * \ racah(j_1, j_4, j_9, j_8, j_7, kk, prec) return sumres | 88e8ded3e4e8fadbc380d719dcf3bdc6eab9d557 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/88e8ded3e4e8fadbc380d719dcf3bdc6eab9d557/wigner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
724,
264,
67,
29,
78,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
525,
67,
24,
16,
525,
67,
25,
16,
525,
67,
26,
16,
525,
67,
27,
16,
525,
67,
28,
16,
525,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
724,
264,
67,
29,
78,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
525,
67,
24,
16,
525,
67,
25,
16,
525,
67,
26,
16,
525,
67,
27,
16,
525,
67,
28,
16,
525,
6... |
infos.append((link, rawlink, fragment)) | infos.append((link, rawlink, fragment)) | def getlinkinfos(self): | f97eecccb714a71cf5a1ca9399cd9c579014a5b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f97eecccb714a71cf5a1ca9399cd9c579014a5b9/wcnew.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1232,
18227,
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,
336,
1232,
18227,
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,
-... |
print 'Got',lang_identifier% sudo wicd -foe Traceback (most recent call last): File "/usr/lib/wicd/wicd-daemon.py", line 59, in <module> from wicd.configmanager import ConfigManager ImportError: No module named configmanager | print 'Got',lang_identifier | def run(self): import urllib, shutil shutil.rmtree('translations/') os.makedirs('translations') filename, headers = urllib.urlretrieve('http://wicd.net/translator/get_id_list.php') id_file = open(filename, 'r') lines = id_file.readlines() # remove the \n from the end of lines, and remove blank entries lines = [ x.strip() for x in lines if not x.strip() is '' ] for id in lines: # http://wicd.net/translator/download_po.php?language=11 pofile, poheaders = urllib.urlretrieve('http://wicd.net/translator/download_po.php?language='+str(id)) #for i in `cat ids`; do #wget "http://wicd.sourceforge.net/translator/download_po.php?language=$i&version=$1" -O "language_$i" #iden=`python -c "import sys; print open('language_$i','r').readlines()[1].strip()[2:]"` #mv "language_$i" po/$iden.po #mkdir -p $iden/LC_MESSAGES/ #msgfmt --output-file=$iden/LC_MESSAGES/wicd.mo po/$iden.po lang_identifier = open(pofile,'r').readlines()[1].strip()[2:] shutil.move(pofile, lang_identifier+'.po') print 'Got',lang_identifier% sudo wicd -foe | 9a846b8e43389c1112d3265298f6d5b150aacfd8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12280/9a846b8e43389c1112d3265298f6d5b150aacfd8/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1930,
11527,
16,
11060,
11060,
18,
86,
17371,
2668,
13457,
2473,
13,
1140,
18,
81,
9477,
10539,
2668,
13457,
6134,
1544,
16,
1607,
273,
11527,
18,
718,
17466,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1930,
11527,
16,
11060,
11060,
18,
86,
17371,
2668,
13457,
2473,
13,
1140,
18,
81,
9477,
10539,
2668,
13457,
6134,
1544,
16,
1607,
273,
11527,
18,
718,
17466,
2668,
... |
return _PackInt1(97) + _PackInt1(term) else: return _PackInt1(98) + _PackInt4(term) | return _PackInt1(MAGIC_SMALL_INTEGER) + _PackInt1(term) else: return _PackInt1(MAGIC_INTEGER) + _PackInt4(term) | def _PackInt(term): if 0 <= term < 256: return _PackInt1(97) + _PackInt1(term) else: return _PackInt1(98) + _PackInt4(term) | f5a33431908f2d30884e237b626d15ed55b2f169 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7565/f5a33431908f2d30884e237b626d15ed55b2f169/erl_term.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4420,
1702,
12,
6408,
4672,
309,
374,
1648,
2481,
411,
8303,
30,
327,
389,
4420,
1702,
21,
12,
49,
22247,
67,
23882,
67,
14217,
13,
397,
389,
4420,
1702,
21,
12,
6408,
13,
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,
389,
4420,
1702,
12,
6408,
4672,
309,
374,
1648,
2481,
411,
8303,
30,
327,
389,
4420,
1702,
21,
12,
49,
22247,
67,
23882,
67,
14217,
13,
397,
389,
4420,
1702,
21,
12,
6408,
13,
469,
... |
IStatusMessage(self.request).addStatusMessage(_('statusmessage_no_recipients'), type='error') | IStatusMessage(self.request).addStatusMessage(_(u'statusmessage_no_recipients'), type='error') | def send_notification(self): """""" sp = getToolByName(self.context, 'portal_properties').site_properties use_view_action = self.context.Type() in sp.getProperty('typesUseViewActionInListings', ()) if len(self.request.get('to_list', [])): comment = self.request.get('comment', '') notify(NotificationEvent(self.context, comment)) self.request.RESPONSE.redirect(self.context.absolute_url() + (use_view_action and '/view' or '') ) else: IStatusMessage(self.request).addStatusMessage(_('statusmessage_no_recipients'), type='error') self.request.RESPONSE.redirect(self.context.absolute_url() + '/notification_form') | 51fd2ea9410fc7104e2365d87e081482205eac69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11890/51fd2ea9410fc7104e2365d87e081482205eac69/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
9927,
12,
2890,
4672,
3536,
8395,
1694,
273,
336,
6364,
5911,
12,
2890,
18,
2472,
16,
296,
24386,
67,
4738,
16063,
4256,
67,
4738,
999,
67,
1945,
67,
1128,
273,
365,
18,
2472... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
9927,
12,
2890,
4672,
3536,
8395,
1694,
273,
336,
6364,
5911,
12,
2890,
18,
2472,
16,
296,
24386,
67,
4738,
16063,
4256,
67,
4738,
999,
67,
1945,
67,
1128,
273,
365,
18,
2472... |
print "Nick is not okay" | LOG.debug( "Nick is not okay" ) | def checkIncomingNick(self, n): try: inick = dc_to_irc(n.nick) | 94194b78b83de3d89b6ffd035804de2c82bbaff0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4752/94194b78b83de3d89b6ffd035804de2c82bbaff0/dtella_bridgeserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
20370,
29756,
12,
2890,
16,
290,
4672,
775,
30,
316,
1200,
273,
6744,
67,
869,
67,
481,
71,
12,
82,
18,
17091,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
20370,
29756,
12,
2890,
16,
290,
4672,
775,
30,
316,
1200,
273,
6744,
67,
869,
67,
481,
71,
12,
82,
18,
17091,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provided, changes to the CKAN regsiter will not be allowed. Please use the | provided, changes to the CKAN register will not be allowed. Please use the | def help_ckanregister(self, line=None): import datapkg usage = \ | efda96f2ec778f19a32585def08d503701b30cce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12519/efda96f2ec778f19a32585def08d503701b30cce/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
363,
304,
4861,
12,
2890,
16,
980,
33,
7036,
4672,
1930,
501,
10657,
4084,
273,
521,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2809,
67,
363,
304,
4861,
12,
2890,
16,
980,
33,
7036,
4672,
1930,
501,
10657,
4084,
273,
521,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if (res == 11): | sig = res & 0x7F if (GetVerbose() and res != 0): print GetColor("red") + "Process exited with exit status %d and signal code %d" % ((res & 0xFF00) >> 8, sig) + GetColor() if (sig == signal.SIGINT): raise KeyboardInterrupt if (sig == signal.SIGSEGV or res == 35584 or res == 34304): | def oscmd(cmd, ignoreError = False): if VERBOSE: print GetColor("blue") + cmd.split(" ", 1)[0] + " " + GetColor("magenta") + cmd.split(" ", 1)[1] + GetColor() sys.stdout.flush() if sys.platform == "win32": exe = cmd.split()[0] if not (len(exe) > 4 and exe[-4:] == ".exe"): exe += ".exe" if os.path.isfile(exe)==0: for i in os.environ["PATH"].split(";"): if os.path.isfile(os.path.join(i, exe)): exe = os.path.join(i, exe) break if os.path.isfile(exe)==0: exit("Cannot find "+exe+" on search path") res = os.spawnl(os.P_WAIT, exe, cmd) else: res = os.system(cmd) if (res == 11): if (LocateBinary("gdb") and GetVerbose()): print GetColor("red") + "Received SIGSEGV, retrieving traceback..." + GetColor() os.system("gdb -batch -ex 'handle SIG33 pass nostop noprint' -ex 'set pagination 0' -ex 'run' -ex 'bt full' -ex 'info registers' -ex 'thread apply all backtrace' -ex 'quit' --args %s < /dev/null" % cmd) else: print GetColor("red") + "Received SIGSEGV" + GetColor() if res != 0 and not ignoreError: if "interrogate" in cmd.split(" ", 1)[0] and GetVerbose(): print GetColor("red") + "Interrogate failed, retrieving debug output..." + GetColor() os.system(cmd.split(" ", 1)[0] + " -v " + cmd.split(" ", 1)[1]) exit("") | 8bfdcc76bfb217bdf5e3398e2da84f2077af9270 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/8bfdcc76bfb217bdf5e3398e2da84f2077af9270/makepandacore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31476,
1264,
12,
4172,
16,
2305,
668,
273,
1083,
4672,
309,
27857,
30,
1172,
968,
2957,
2932,
14081,
7923,
397,
1797,
18,
4939,
2932,
3104,
404,
25146,
20,
65,
397,
315,
315,
397,
968,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31476,
1264,
12,
4172,
16,
2305,
668,
273,
1083,
4672,
309,
27857,
30,
1172,
968,
2957,
2932,
14081,
7923,
397,
1797,
18,
4939,
2932,
3104,
404,
25146,
20,
65,
397,
315,
315,
397,
968,
... |
source = os.path.expanduser(source) | dest = os.path.expanduser(dest) | def AtomsWriter(dest, format=None, *args, **kwargs): """Return a file-like object capable of writing Atoms in the specified format. If `format` is not given it is inferred from the file extension of `dest`.""" if format is None: if isinstance(dest, str): if dest in AtomsWriters: format = dest else: source = os.path.expanduser(source) base, ext = os.path.splitext(dest) format = ext[1:] else: format = dest.__class__ if format in AtomsWriters: return AtomsWriters[format](dest, *args, **kwargs) else: raise ValueError("Don't know how to write Atoms to format %r" % format) | 5a047a73137b91dfc492d7c676cf0fb285c11cda /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/5a047a73137b91dfc492d7c676cf0fb285c11cda/atomslist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7149,
87,
2289,
12,
10488,
16,
740,
33,
7036,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
990,
279,
585,
17,
5625,
733,
22863,
434,
7410,
7149,
87,
316,
326,
1269,
740,
18,
971,
1375,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7149,
87,
2289,
12,
10488,
16,
740,
33,
7036,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
990,
279,
585,
17,
5625,
733,
22863,
434,
7410,
7149,
87,
316,
326,
1269,
740,
18,
971,
1375,
... |
this = apply(_quickfix.new_SecuritySettlAgentCode, args) | this = _quickfix.new_SecuritySettlAgentCode(*args) | def __init__(self, *args): this = apply(_quickfix.new_SecuritySettlAgentCode, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
4368,
694,
6172,
3630,
1085,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
4368,
694,
6172,
3630,
1085,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
... |
if self.vline: if self.mattri: (m, n, count, dbl)=self.mattri[0] else: n=len(self.idx) objfile.write("LINES\t0 %d\n" % n) | for (start, count) in self.lines: objfile.write("LINES\t%d %d\n" % (start, count)) | def export(self, scale, output, fslayers): if self.comment=="X-Plane library object": return if scale!=1: comment="%s scaled x%s" % (self.comment, scale) filename="%s_%02d%02d.obj" % ( self.filename[:-4], int(scale), round(scale*100,0)%100) else: comment=self.comment filename=self.filename | d52454584fd931bed95ea87de25c69b1469d201c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11663/d52454584fd931bed95ea87de25c69b1469d201c/convutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
12,
2890,
16,
3159,
16,
876,
16,
284,
2069,
3907,
4672,
309,
365,
18,
3469,
31713,
60,
17,
19505,
5313,
733,
6877,
327,
309,
3159,
5,
33,
21,
30,
2879,
11613,
87,
12304,
619,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
12,
2890,
16,
3159,
16,
876,
16,
284,
2069,
3907,
4672,
309,
365,
18,
3469,
31713,
60,
17,
19505,
5313,
733,
6877,
327,
309,
3159,
5,
33,
21,
30,
2879,
11613,
87,
12304,
619,
9... |
def get_path_links(href, path, rev): links = [] parts = path.split('/') if not parts[-1]: parts.pop() path = '/' for part in parts: path = path + part + '/' links.append({ 'name': part or 'root', 'href': href.browser(path, rev=rev) }) | def get_path_links(href, fullpath, rev): links = [{'name': 'root', 'href': href.browser(rev=rev)}] path = '' for part in [p for p in fullpath.split('/') if p]: path += part + '/' links.append({'name': part, 'href': href.browser(path, rev=rev)}) | def get_path_links(href, path, rev): links = [] parts = path.split('/') if not parts[-1]: parts.pop() path = '/' for part in parts: path = path + part + '/' links.append({ 'name': part or 'root', 'href': href.browser(path, rev=rev) }) return links | 67190d8dcb06dd922aeef78ed791fe079d0983f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/67190d8dcb06dd922aeef78ed791fe079d0983f5/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
803,
67,
7135,
12,
7547,
16,
15170,
16,
5588,
4672,
4716,
273,
20031,
11,
529,
4278,
296,
3085,
2187,
296,
7547,
4278,
3897,
18,
11213,
12,
9083,
33,
9083,
13,
11839,
589,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
803,
67,
7135,
12,
7547,
16,
15170,
16,
5588,
4672,
4716,
273,
20031,
11,
529,
4278,
296,
3085,
2187,
296,
7547,
4278,
3897,
18,
11213,
12,
9083,
33,
9083,
13,
11839,
589,
273... |
def test_from_pkg_import_module(self): import sys sys.path.append('impsubdir') from pkg import a self.assert_('pkg' in sys.modules) self.assert_('pkg.a' in sys.modules) self.assert_(hasattr(a, 'imamodule')) | def test_from_pkg_import_module(self): import sys sys.path.append('impsubdir') from pkg import a self.assert_('pkg' in sys.modules) self.assert_('pkg.a' in sys.modules) self.assert_(hasattr(a, 'imamodule')) | def test_from_pkg_import_module(self): import sys sys.path.append('impsubdir') from pkg import a self.assert_('pkg' in sys.modules) self.assert_('pkg.a' in sys.modules) self.assert_(hasattr(a, 'imamodule')) | d8d6120b82e16ed4a6d60fa312d81a3f25c467ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/d8d6120b82e16ed4a6d60fa312d81a3f25c467ac/test_import.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2080,
67,
10657,
67,
5666,
67,
2978,
12,
2890,
4672,
1930,
2589,
2589,
18,
803,
18,
6923,
2668,
381,
1121,
373,
1214,
6134,
628,
3475,
1930,
279,
365,
18,
11231,
67,
2668,
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,
1842,
67,
2080,
67,
10657,
67,
5666,
67,
2978,
12,
2890,
4672,
1930,
2589,
2589,
18,
803,
18,
6923,
2668,
381,
1121,
373,
1214,
6134,
628,
3475,
1930,
279,
365,
18,
11231,
67,
2668,
10... |
itemId = '' | itemId = None | def addAcl(self, userGroup, trovePattern, label, write, capped, admin): cu = self.db.cursor() | 26f4f246a1a3cefb1f833223a913259960f2efca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/26f4f246a1a3cefb1f833223a913259960f2efca/netauth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
13538,
12,
2890,
16,
26205,
16,
23432,
537,
3234,
16,
1433,
16,
1045,
16,
3523,
1845,
16,
3981,
4672,
15985,
273,
365,
18,
1966,
18,
9216,
1435,
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,
527,
13538,
12,
2890,
16,
26205,
16,
23432,
537,
3234,
16,
1433,
16,
1045,
16,
3523,
1845,
16,
3981,
4672,
15985,
273,
365,
18,
1966,
18,
9216,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-... |
self.__conn.simple_bind_s( self.__binddn, self.__bindpw ) | try: self.__conn.simple_bind_s( self.__binddn, self.__bindpw ) except ldap.LDAPError: del self.__conn self.__connect() | def _search_ldap(self, username ): """ Search LDAP for this username and return info about them @raise error.NotUnique: if more than one user is found, this shouldn't happen @raise error.NotUser: if the user doesn't exist in this auth source @return: information from LDAP related to this user """ self.__conn.simple_bind_s( self.__binddn, self.__bindpw ) result = self.__conn.search_st(self.__basedn, self.__scope, self.__filter % username, [self.__username_attribute,self.__mail_attribute,self.__name_attribute]) | e6c600d822ed72b0d33cb2f49d3f67dfa7796976 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7602/e6c600d822ed72b0d33cb2f49d3f67dfa7796976/interfaces.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3072,
67,
14394,
12,
2890,
16,
2718,
262,
30,
3536,
5167,
11916,
364,
333,
2718,
471,
327,
1123,
2973,
2182,
225,
632,
11628,
555,
18,
1248,
6303,
30,
309,
1898,
2353,
1245,
729,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3072,
67,
14394,
12,
2890,
16,
2718,
262,
30,
3536,
5167,
11916,
364,
333,
2718,
471,
327,
1123,
2973,
2182,
225,
632,
11628,
555,
18,
1248,
6303,
30,
309,
1898,
2353,
1245,
729,
... |
'installer_item_hash'): | item_hash_key): | def download_installeritem(item_pl): """Downloads a installer item. Raises an error if there are issues...""" location = item_pl.get('installer_item_location') if not location: raise MunkiDownloadError("No installer_item_location in item info.") ManagedInstallDir = munkicommon.pref('ManagedInstallDir') downloadbaseurl = munkicommon.pref('PackageURL') or \ munkicommon.pref('SoftwareRepoURL') + '/pkgs/' if not downloadbaseurl.endswith('/'): downloadbaseurl = downloadbaseurl + '/' munkicommon.display_debug2('Download base URL is: %s' % downloadbaseurl) mycachedir = os.path.join(ManagedInstallDir, 'Cache') # build a URL, quoting the the location to encode reserved characters pkgurl = downloadbaseurl + urllib2.quote(location) # grab last path component of location to derive package name. pkgname = os.path.basename(location) destinationpath = os.path.join(mycachedir, pkgname) munkicommon.display_detail('Downloading %s from %s' % (pkgname, location)) # bump up verboseness so we get download percentage done feedback. # this is kind of a hack... oldverbose = munkicommon.verbose munkicommon.verbose = oldverbose + 1 dl_message = 'Downloading %s...' % pkgname try: changed = getHTTPfileIfChangedAtomically(pkgurl, destinationpath, resume=True, message=dl_message) except CurlDownloadError: munkicommon.verbose = oldverbose raise # set verboseness back. munkicommon.verbose = oldverbose if changed: if not verifySoftwarePackageIntegrity(destinationpath, item_pl, 'installer_item_hash'): raise PackageVerificationError() | 7233ea384c0d8f73c40e1623556e9fc24f98637e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6241/7233ea384c0d8f73c40e1623556e9fc24f98637e/updatecheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4224,
67,
20163,
1726,
12,
1726,
67,
412,
4672,
3536,
22141,
279,
16050,
761,
18,
20497,
392,
555,
309,
1915,
854,
8296,
7070,
3660,
2117,
273,
761,
67,
412,
18,
588,
2668,
20163,
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,
4224,
67,
20163,
1726,
12,
1726,
67,
412,
4672,
3536,
22141,
279,
16050,
761,
18,
20497,
392,
555,
309,
1915,
854,
8296,
7070,
3660,
2117,
273,
761,
67,
412,
18,
588,
2668,
20163,
67,
... |
def _get_discount_invoice(self, cursor, user, move_line): | def _get_discount_invoice(self, cr, uid, move_line): | def _get_discount_invoice(self, cursor, user, move_line): '''Return the discount for the move line''' return 0.0 | 18be8e52469417aa8e0ec02e033c0942d0ad805f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/18be8e52469417aa8e0ec02e033c0942d0ad805f/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
23650,
67,
16119,
12,
2890,
16,
4422,
16,
4555,
16,
3635,
67,
1369,
4672,
9163,
990,
326,
12137,
364,
326,
3635,
980,
26418,
327,
374,
18,
20,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
23650,
67,
16119,
12,
2890,
16,
4422,
16,
4555,
16,
3635,
67,
1369,
4672,
9163,
990,
326,
12137,
364,
326,
3635,
980,
26418,
327,
374,
18,
20,
2,
-100,
-100,
-100,
-100,
... |
nm = aux_node.name docuname = nm[ : len(nm) - 4 ] | docuname = aux_node.name[:-4] | def tex_build(task, command='LATEX'): env = task.env bld = task.generator.bld if not env['PROMPT_LATEX']: env.append_value('LATEXFLAGS', '-interaction=batchmode') env.append_value('PDFLATEXFLAGS', '-interaction=batchmode') fun = latex_fun if command == 'PDFLATEX': fun = pdflatex_fun node = task.inputs[0] srcfile = node.abspath() sr2 = node.parent.get_bld().abspath() + os.pathsep + node.parent.get_src().abspath() + os.pathsep aux_node = node.change_ext('.aux') idx_node = node.change_ext('.idx') nm = aux_node.name docuname = nm[ : len(nm) - 4 ] # 4 is the size of ".aux" # important, set the cwd for everybody task.cwd = task.inputs[0].parent.get_bld().abspath() warn('first pass on %s' % command) task.env.env = {'TEXINPUTS': sr2} task.env.SRCFILE = srcfile ret = fun(task) if ret: return ret # look in the .aux file if there is a bibfile to process try: ct = Utils.readf(aux_node.abspath()) except (OSError, IOError): error('error bibtex scan') else: fo = g_bibtex_re.findall(ct) # there is a .aux file to process if fo: warn('calling bibtex') task.env.env = {'BIBINPUTS': sr2, 'BSTINPUTS': sr2} task.env.SRCFILE = docuname ret = bibtex_fun(task) if ret: error('error when calling bibtex %s' % docuname) return ret # look on the filesystem if there is a .idx file to process try: idx_path = idx_node.abspath() os.stat(idx_path) except OSError: error('error file.idx scan') else: warn('calling makeindex') task.env.SRCFILE = idx_node.name task.env.env = {} ret = makeindex_fun(task) if ret: error('error when calling makeindex %s' % idx_path) return ret hash = '' i = 0 while i < 10: # prevent against infinite loops - one never knows i += 1 # watch the contents of file.aux prev_hash = hash try: hash = Utils.h_file(aux_node.abspath()) except KeyError: error('could not read aux.h -> %s' % aux_node.abspath()) pass # debug #print "hash is, ", hash, " ", old_hash # stop if file.aux does not change anymore if hash and hash == prev_hash: break # run the command warn('calling %s' % command) task.env.env = {'TEXINPUTS': sr2 + os.pathsep} task.env.SRCFILE = srcfile ret = fun(task) if ret: error('error when calling %s %s' % (command, latex_compile_cmd)) return ret return None # ok | c65c026b2df5cefd7d1a7fbd065c15aafae26ea7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/c65c026b2df5cefd7d1a7fbd065c15aafae26ea7/tex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16573,
67,
3510,
12,
4146,
16,
1296,
2218,
10512,
60,
11,
4672,
1550,
273,
1562,
18,
3074,
324,
1236,
273,
1562,
18,
8812,
18,
70,
1236,
225,
309,
486,
1550,
3292,
3373,
49,
1856,
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,
16573,
67,
3510,
12,
4146,
16,
1296,
2218,
10512,
60,
11,
4672,
1550,
273,
1562,
18,
3074,
324,
1236,
273,
1562,
18,
8812,
18,
70,
1236,
225,
309,
486,
1550,
3292,
3373,
49,
1856,
67,
... |
"Keyword 'My Kw' defined multiple times") | "Keyword 'my kw' defined multiple times") | def test_creating_duplicate_keyword_in_test_case_file(self): lib = self._get_userlibrary('NOT_RESOURCE', 'MYKW', 'my kw') assert_equals(len(lib.handlers.keys()), 1) assert_true(lib.handlers.has_key('mykw')) assert_equals(lib.handlers['mykw']._error, "Keyword 'My Kw' defined multiple times") | 763fd32e4e361435d2b8599a84f8c71d56f84f5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/763fd32e4e361435d2b8599a84f8c71d56f84f5e/test_userlibrary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
23799,
67,
17342,
67,
11041,
67,
267,
67,
3813,
67,
3593,
67,
768,
12,
2890,
4672,
2561,
273,
365,
6315,
588,
67,
1355,
12083,
2668,
4400,
67,
11395,
2187,
296,
22114,
30134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23799,
67,
17342,
67,
11041,
67,
267,
67,
3813,
67,
3593,
67,
768,
12,
2890,
4672,
2561,
273,
365,
6315,
588,
67,
1355,
12083,
2668,
4400,
67,
11395,
2187,
296,
22114,
30134,
... |
m[i,j] = 0 | mat[i,j] = 0 | def hecke_matrix(self, m, n, use_recurrence = False, exact_arith = False): r""" Calculate the matrix of the `T_m` operator in the basis of this space, truncated to an `n \times n` matrix. Conventions are that operators act on the left on column vectors (this is the opposite of the conventions of the sage.modules.matrix_morphism class!) Uses naive q-expansion arguments if use_recurrence=False and uses the Kolberg style recurrences if use_recurrence=True. | 838a498abee29f10814d0a05c45a15fbb11d024c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/838a498abee29f10814d0a05c45a15fbb11d024c/genus0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
762,
73,
67,
5667,
12,
2890,
16,
312,
16,
290,
16,
999,
67,
266,
17131,
273,
1083,
16,
5565,
67,
297,
483,
273,
1083,
4672,
436,
8395,
9029,
326,
3148,
434,
326,
1375,
56,
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,
366,
762,
73,
67,
5667,
12,
2890,
16,
312,
16,
290,
16,
999,
67,
266,
17131,
273,
1083,
16,
5565,
67,
297,
483,
273,
1083,
4672,
436,
8395,
9029,
326,
3148,
434,
326,
1375,
56,
67,
... |
def __init__(self, space, level=rzlib.Z_DEFAULT_COMPRESSION): | def __init__(self, space, level=rzlib.Z_DEFAULT_COMPRESSION, method=rzlib.Z_DEFLATED, wbits=rzlib.MAX_WBITS, memLevel=rzlib.DEF_MEM_LEVEL, strategy=rzlib.Z_DEFAULT_STRATEGY): | def __init__(self, space, level=rzlib.Z_DEFAULT_COMPRESSION): # XXX CPython actually exposes 4 more undocumented parameters beyond # level. self.space = space try: self.stream = rzlib.deflateInit(level) except rzlib.RZlibError, e: raise zlib_error(self.space, e.msg) except ValueError: raise OperationError(space.w_ValueError, space.wrap("Invalid initialization option")) self.lock = space.allocate_lock() | 73c850b3db71ca9a722bd8033e4650ce655940ae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/73c850b3db71ca9a722bd8033e4650ce655940ae/interp_zlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3476,
16,
1801,
33,
86,
94,
2941,
18,
62,
67,
5280,
67,
4208,
14227,
4672,
468,
11329,
5181,
18490,
6013,
431,
10522,
1059,
1898,
640,
5457,
329,
1472,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3476,
16,
1801,
33,
86,
94,
2941,
18,
62,
67,
5280,
67,
4208,
14227,
4672,
468,
11329,
5181,
18490,
6013,
431,
10522,
1059,
1898,
640,
5457,
329,
1472,
1... |
memory = "0" | memory = 0 vcpus = 1 | def GetAllInstancesInfo(self): """Get properties of all instances. | bfc30ec0c8afc0a2d8299d1d55d343fd32d51894 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/bfc30ec0c8afc0a2d8299d1d55d343fd32d51894/hv_fake.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17594,
5361,
966,
12,
2890,
4672,
3536,
967,
1790,
434,
777,
3884,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
17594,
5361,
966,
12,
2890,
4672,
3536,
967,
1790,
434,
777,
3884,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.curNode.appendChild(node) self.curNode = node | def startElement(self, name, attrs): node = self.document.createElement(name) | 37ce29a4b515f0f3d5c14c4ccb2c320ae150df99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/37ce29a4b515f0f3d5c14c4ccb2c320ae150df99/pulldom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13591,
12,
2890,
16,
508,
16,
3422,
4672,
756,
273,
365,
18,
5457,
18,
2640,
1046,
12,
529,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13591,
12,
2890,
16,
508,
16,
3422,
4672,
756,
273,
365,
18,
5457,
18,
2640,
1046,
12,
529,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
import priv, database | import priv | def handler(self, **args): """Allows someone to add material onto a factoid (that isn't locked) by saying "foo is also bar", for example""" import priv, database from irclib import Event from time import time target = self.return_to_sender(args) # args["text"] should look something like: # "moobot: foo is also bar blatz qux" # Grab the factoid to change: factoid_key = self.strip_words(args["text"], 1).split(" is ")[0] # Grab the stuff to tack on: to_add = self.strip_words(args["text"], 1).split(" is also ")[1] | e1e6b64160001d2d23ad7d039dc8a4073fa7d332 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10749/e1e6b64160001d2d23ad7d039dc8a4073fa7d332/factoids.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1838,
12,
2890,
16,
2826,
1968,
4672,
3536,
19132,
18626,
358,
527,
9390,
10170,
279,
5410,
839,
261,
19056,
5177,
1404,
8586,
13,
635,
12532,
310,
315,
11351,
353,
2546,
4653,
3113,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1838,
12,
2890,
16,
2826,
1968,
4672,
3536,
19132,
18626,
358,
527,
9390,
10170,
279,
5410,
839,
261,
19056,
5177,
1404,
8586,
13,
635,
12532,
310,
315,
11351,
353,
2546,
4653,
3113,
364,
... |
headers = _header_parser.parse(self.fp) | headers = rfc822.Message(self.fp) | def read_multi(self, environ, keep_blank_values, strict_parsing): """Internal: read a part that is itself multipart.""" ib = self.innerboundary if not valid_boundary(ib): raise ValueError, 'Invalid boundary in multipart form: %r' % (ib,) self.list = [] klass = self.FieldStorageClass or self.__class__ part = klass(self.fp, {}, ib, environ, keep_blank_values, strict_parsing) # Throw first part away while not part.done: headers = _header_parser.parse(self.fp) part = klass(self.fp, headers, ib, environ, keep_blank_values, strict_parsing) self.list.append(part) self.skip_lines() | 3a703b60593e2bc2ddde232eaad365e4c126ff42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a703b60593e2bc2ddde232eaad365e4c126ff42/cgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
7027,
12,
2890,
16,
5473,
16,
3455,
67,
12111,
67,
2372,
16,
5490,
67,
24979,
4672,
3536,
3061,
30,
855,
279,
1087,
716,
353,
6174,
10263,
12123,
9834,
273,
365,
18,
7872,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
7027,
12,
2890,
16,
5473,
16,
3455,
67,
12111,
67,
2372,
16,
5490,
67,
24979,
4672,
3536,
3061,
30,
855,
279,
1087,
716,
353,
6174,
10263,
12123,
9834,
273,
365,
18,
7872,
166... |
def __song_started(self, player, song, next): | def __song_started(self, player, song, next, play): | def __song_started(self, player, song, next): next.set_sensitive(bool(song)) | 4bc11d2a2ab986e0795a30d4bb81dbd9ad42f6c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4764/4bc11d2a2ab986e0795a30d4bb81dbd9ad42f6c5/controls.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
816,
75,
67,
14561,
12,
2890,
16,
7291,
16,
17180,
16,
1024,
16,
6599,
4672,
1024,
18,
542,
67,
23481,
12,
6430,
12,
816,
75,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
816,
75,
67,
14561,
12,
2890,
16,
7291,
16,
17180,
16,
1024,
16,
6599,
4672,
1024,
18,
542,
67,
23481,
12,
6430,
12,
816,
75,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
data_ = line[key_counter.i_iobs] if(key_counter.i_flag is not None): flag_ = line[key_counter.i_flag] if(data_.count("*")>0 or data_.count("?")>0 or data_=="."): continue | def __init__(self, key_counter, file_name, file_lines, wavelength_id, crystal_id, crystal_symmetry): self.indices = flex.miller_index() self.data = flex.double() self.sigmas = flex.double() self.flags = flex.std_string() self.file_name = file_name start_counter = 0 start_flag = False for i_line, line in enumerate(file_lines): line_orig = line h_,k_,l_,data_,sigma_,flag_ = [None]*6 line = line.strip() line = line.split() if len(line) == 0: continue if(len(key_counter.keys) != start_counter or not start_flag): if(len(line) == 1): if(line[0] == "loop_"): start_flag = True if(start_flag and (line[0].replace("_refln.","") in key_counter.keys) and line[0] != "loop_"): start_counter += 1 if(len(key_counter.keys) == start_counter and start_flag): result_hkl = list(self.access_hkl(line=line, key_counter=key_counter)) if(result_hkl.count(None) == 0): wavelength_id_and_crystal_id_ok = True if(wavelength_id is not None): if(int(line[key_counter.i_wavelength_id]) != wavelength_id): wavelength_id_and_crystal_id_ok = False if(crystal_id is not None): if(int(line[key_counter.i_crystal_id]) != crystal_id): wavelength_id_and_crystal_id_ok = False if(wavelength_id_and_crystal_id_ok): if(len(line) != len(key_counter.keys)): if(self.is_break(file_lines=file_lines, i_line=i_line, key_counter=key_counter, line=line)): break if(len(line) == len(key_counter.keys)): try: if(key_counter.i_fobs is not None): data_ = line[key_counter.i_fobs] if(key_counter.i_sfobs is not None): sigma_ = line[key_counter.i_sfobs] else: if(key_counter.i_siobs is not None): sigma_ = line[key_counter.i_siobs] data_ = line[key_counter.i_iobs] if(key_counter.i_flag is not None): flag_ = line[key_counter.i_flag] if(data_.count("*")>0 or data_.count("?")>0 or data_=="."): continue if(sigma_ is not None): if(sigma_.count("*")>0 or sigma_.count("?")>0 or sigma_=="."): sigma_ = 1.0 except: self.reset(message ="Cannot extract column data,#1.",line=line) break try: data_ = float(data_) if(data_ == 0.0): continue if(sigma_ is not None): sigma_ = float(sigma_) if(sigma_ < 0.0): if(data_ == sigma_): continue except: if(self.is_break(file_lines=file_lines, i_line=i_line, key_counter=key_counter, line=line)): break assert result_hkl.count(None) == 0 assert data_ is not None if(result_hkl.count(0) != 3 and data_ != 0): if(max(max(result_hkl), abs(min(result_hkl))) > 10000): self.reset(message ="Too big Miller index (> 10000).",line=line) break self.indices.append(result_hkl) self.data.append(data_) if(flag_ is not None): self.flags.append(flag_) if(sigma_ is not None): self.sigmas.append(sigma_) else: if(self.data.size() > 0 and len(line) != len(key_counter.keys)): if(self.is_break(file_lines=file_lines, i_line=i_line, key_counter=key_counter, line=line)): break if(self.indices.size() != self.data.size()): self.reset(message = "self.indices.size() != self.data.size()") if(len(self.sigmas) > 0): if(self.indices.size() != self.sigmas.size()): self.reset(message = "self.indices.size() != self.sigmas.size()") else: self.sigmas = flex.double(self.data.size(), 1.0) if(self.indices.size() > 0 and self.flags.size() > 0): if(self.indices.size() != self.flags.size()): self.reset(message = "self.indices.size() != self.flags.size()") else: self.flags, cif_selection = get_array_of_r_free_flags( flags = self.flags, crystal_symmetry = crystal_symmetry, indices = self.indices, file_name = file_name) if([self.flags, cif_selection].count(None) == 0): self.indices = self.indices.select(cif_selection) self.data = self.data.select(cif_selection) self.sigmas = self.sigmas.select(cif_selection) self.flags = self.flags.select(cif_selection) if(self.indices.size() == 0): print "No data extracted from input cif file." | a65b21a3cd6a6059e3de1205015024f5517301c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/a65b21a3cd6a6059e3de1205015024f5517301c3/cif_as_mtz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
498,
67,
7476,
16,
585,
67,
529,
16,
585,
67,
3548,
16,
21410,
67,
350,
16,
4422,
31365,
67,
350,
16,
4422,
31365,
67,
8117,
18042,
4672,
365,
18,
6836... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
498,
67,
7476,
16,
585,
67,
529,
16,
585,
67,
3548,
16,
21410,
67,
350,
16,
4422,
31365,
67,
350,
16,
4422,
31365,
67,
8117,
18042,
4672,
365,
18,
6836... | |
print 'Generating %s' % vcproj_filename | def _GenerateProject(vcproj_filename, build_file, spec, options): """Generates a vcproj file. Arguments: vcproj_filename: Filename of the vcproj file to generate. build_file: Filename of the .gyp file that the vcproj file comes from. spec: The target dictionary containing the properties of the target. """ print 'Generating %s' % vcproj_filename p = MSVSProject.Writer(vcproj_filename) p.Create(spec['target_name']) # Get directory project file is in. gyp_dir = os.path.split(vcproj_filename)[0] # Pick target configuration type. config_type = { 'executable': '1', 'application': '1', 'shared_library': '2', 'static_library': '4', 'none': '10', }[spec['type']] for config_name, c in spec['configurations'].iteritems(): # Process each configuration. vsprops_dirs = c.get('msvs_props', []) vsprops_dirs = [_FixPath(i) for i in vsprops_dirs] # Prepare the list of tools as a dictionary. tools = dict() # Add in msvs_settings. for tool in c.get('msvs_settings', {}): options = c['msvs_settings'][tool] for option in options: _ToolAppend(tools, tool, option, options[option]) # Add in includes. include_dirs = c.get('include_dirs', []) include_dirs = [_FixPath(i) for i in include_dirs] _ToolAppend(tools, 'VCCLCompilerTool', 'AdditionalIncludeDirectories', include_dirs) # Add in libraries. libraries = spec.get('libraries', []) # Strip out -l, as it is not used on windows (but is needed so we can pass # in libraries that are assumed to be in the default library path). libraries = [re.sub('^(\-l)', '', lib) for lib in libraries] # Add them. _ToolAppend(tools, 'VCLinkerTool', 'AdditionalDependencies', libraries) # Add defines. defines = [] for d in c.get('defines', []): if type(d) == list: fd = '='.join([str(dpart).replace('"', '\\"') for dpart in d]) else: fd = str(d).replace('"', '\\"') defines.append(fd) _ToolAppend(tools, 'VCCLCompilerTool', 'PreprocessorDefinitions', defines) _ToolAppend(tools, 'VCResourceCompilerTool', 'PreprocessorDefinitions', defines) # Change program database directory to prevent collisions. _ToolAppend(tools, 'VCCLCompilerTool', 'ProgramDataBaseFileName', '$(IntDir)\\$(ProjectName)\\vc80.pdb') # Add disabled warnings. disabled_warnings = [str(i) for i in c.get('msvs_disabled_warnings', [])] _ToolAppend(tools, 'VCCLCompilerTool', 'DisableSpecificWarnings', disabled_warnings) # Add Pre-build. prebuild = c.get('msvs_prebuild') _ToolAppend(tools, 'VCPreBuildEventTool', 'CommandLine', prebuild) # Add Post-build. postbuild = c.get('msvs_postbuild') _ToolAppend(tools, 'VCPostBuildEventTool', 'CommandLine', postbuild) # Turn on precompiled headers if appropriate. header = c.get('msvs_precompiled_header') if header: header = os.path.split(header)[1] _ToolAppend(tools, 'VCCLCompilerTool', 'UsePrecompiledHeader', '2') _ToolAppend(tools, 'VCCLCompilerTool', 'PrecompiledHeaderThrough', header) _ToolAppend(tools, 'VCCLCompilerTool', 'ForcedIncludeFiles', header) # Convert tools to expected form. tool_list = [] for tool, options in tools.iteritems(): # Collapse options with lists. options_fixed = {} for option, value in options.iteritems(): if type(value) == list: if tool == 'VCLinkerTool' and option == 'AdditionalDependencies': options_fixed[option] = ' '.join(value) else: options_fixed[option] = ';'.join(value) else: options_fixed[option] = value # Add in this tool. tool_list.append(MSVSProject.Tool(tool, options_fixed)) # Prepare configuration attributes. prepared_attrs = {} source_attrs = c.get('msvs_configuration_attributes', {}) for a in source_attrs: prepared_attrs[a] = source_attrs[a] # Add props files. prepared_attrs['InheritedPropertySheets'] = ';'.join(vsprops_dirs) # Set configuration type. prepared_attrs['ConfigurationType'] = config_type # Add in this configuration. p.AddConfig('|'.join([config_name, c.get('configuration_platform', 'Win32')]), attrs=prepared_attrs, tools=tool_list) # Prepare list of sources. sources = spec.get('sources', []) # Add in the gyp file. sources.append(os.path.split(build_file)[1]) # Add in 'action' inputs and outputs. actions = spec.get('actions', []) for a in actions: for i in a.get('inputs', []): if i not in sources: sources.append(i) if a.get('process_outputs_as_sources', False): for i in a.get('outputs', []): if i not in sources: sources.append(i) # Add rules. rules = spec.get('rules', []) for config_name, c in spec['configurations'].iteritems(): # Don't generate rules file if not needed. if not rules: continue # Create rules file. rule_filename = '%s_%s%s.rules' % (spec['target_name'], config_name, options.suffix) rules_file = MSVSToolFile.Writer(os.path.join(gyp_dir, rule_filename)) rules_file.Create(spec['target_name']) # Add each rule. for r in rules: rule_name = r['rule_name'] rule_ext = r['extension'] outputs = [_FixPath(i) for i in r.get('outputs', [])] cmd = _PrepareAction(c, r, has_input_path=True) rules_file.AddCustomBuildRule(name=rule_name, extensions=[rule_ext], outputs=outputs, cmd=cmd) # Write out rules file. rules_file.Write() # Add rule file into project. p.AddToolFile(rule_filename) # Add sources for each applicable rule. for r in rules: # Done if not processing outputs as sources. if not r.get('process_outputs_as_sources', False): continue # Get some properties for this rule. rule_ext = r['extension'] outputs = r.get('outputs', []) # Find sources to which this applies. rule_sources = [s for s in sources if s.endswith('.' + rule_ext)] for s in rule_sources: for o in outputs: nout = o nout = nout.replace('$(InputName)', os.path.splitext(os.path.split(s)[1])[0]) nout = nout.replace('$(InputExt)', os.path.splitext(os.path.split(s)[1])[1]) nout = nout.replace('$(InputFileName)', os.path.split(s)[1]) nout = nout.replace('$(InputPath)', os.path.split(s)[0]) if nout not in sources: sources.append(nout) # Convert to proper windows form. sources = [_FixPath(i) for i in sources] # Exclude excluded ones. excluded_sources = spec.get('sources_excluded', []) # Convert to proper windows form. excluded_sources = [_FixPath(i) for i in excluded_sources] # Add excluded into sources sources += excluded_sources # List of precompiled header related keys. precomp_keys = [ 'msvs_precompiled_header', 'msvs_precompiled_source', ] # Gather a list of precompiled header related sources. precompiled_related = [] for config_name, c in spec['configurations'].iteritems(): for k in precomp_keys: f = c.get(k) if f: precompiled_related.append(_FixPath(f)) # Find the excluded ones, minus the precompiled header related ones. fully_excluded = [i for i in excluded_sources if i not in precompiled_related] # Convert to folders and the right slashes. sources = [i.split('\\') for i in sources] sources = _SourceInFolders(sources, excluded=fully_excluded) # Add in files. p.AddFiles(sources) # Exclude excluded sources from being built. for f in excluded_sources: for config_name, c in spec['configurations'].iteritems(): precomped = [_FixPath(c.get(i, '')) for i in precomp_keys] # Don't do this for ones that are precompiled header related. if f not in precomped: p.AddFileConfig(f, _ConfigFullName(config_name, c), {'ExcludedFromBuild': 'true'}) # Add in tool files (rules). tool_files = set() for config_name, c in spec['configurations'].iteritems(): for f in c.get('msvs_tool_files', []): tool_files.add(f) for f in tool_files: p.AddToolFile(f) # Handle pre-compiled headers source stubs specially. for config_name, c in spec['configurations'].iteritems(): source = c.get('msvs_precompiled_source') if source: source = _FixPath(source) # UsePrecompiledHeader=1 for if using precompiled headers. tool = MSVSProject.Tool('VCCLCompilerTool', {'UsePrecompiledHeader': '1'}) p.AddFileConfig(source, _ConfigFullName(config_name, c), {}, tools=[tool]) # Add actions. actions = spec.get('actions', []) for a in actions: for config_name, c in spec['configurations'].iteritems(): inputs = [_FixPath(i) for i in a.get('inputs', [])] outputs = [_FixPath(i) for i in a.get('outputs', [])] cmd = _PrepareAction(c, a, has_input_path=False) tool = MSVSProject.Tool( 'VCCustomBuildTool', { 'Description': a['action_name'], 'AdditionalDependencies': ';'.join(inputs), 'Outputs': ';'.join(outputs), 'CommandLine': cmd, }) # Pick second input as the primary one, unless there's only one. # TODO(bradnelson): this is a bit of a hack, find something more general. if len(inputs) > 1: primary_input = inputs[1] else: primary_input = inputs[0] # Add to the properties of primary input. p.AddFileConfig(primary_input, _ConfigFullName(config_name, c), tools=[tool]) # Write it out. p.Write() # Return the guid so we can refer to it elsewhere. return p.guid | 5d4328382a6fdbe17089b3cfff76babe72d3e80d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/5d4328382a6fdbe17089b3cfff76babe72d3e80d/msvs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4625,
4109,
12,
4227,
17995,
67,
3459,
16,
1361,
67,
768,
16,
857,
16,
702,
4672,
3536,
6653,
279,
12802,
17995,
585,
18,
225,
13599,
30,
12802,
17995,
67,
3459,
30,
16671,
434,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4625,
4109,
12,
4227,
17995,
67,
3459,
16,
1361,
67,
768,
16,
857,
16,
702,
4672,
3536,
6653,
279,
12802,
17995,
585,
18,
225,
13599,
30,
12802,
17995,
67,
3459,
30,
16671,
434,
3... | |
resolution=resolutions[0])) | resolution=tag(resolutions[0], resolution))) | def render_ticket_action_control(self, req, ticket, action): | 2e3fe1993c32c7abb8d0c7e86eec4f07fb7bb7cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/2e3fe1993c32c7abb8d0c7e86eec4f07fb7bb7cd/default_workflow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
16282,
67,
1128,
67,
7098,
12,
2890,
16,
1111,
16,
9322,
16,
1301,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
16282,
67,
1128,
67,
7098,
12,
2890,
16,
1111,
16,
9322,
16,
1301,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
yield self.get_html(self.url) | max_per_page = 1000 max_pages = 10 delta = datetime.datetime.now() - self.last_updated_time() hours_ago = math.ceil((delta.seconds / 3600.0) + (delta.days * 24)) for page in range(1, max_pages + 1): url = LIST_URL + '&start=%d&page=%d&num_results=%d' % ( hours_ago, page, max_per_page) yield self.get_html(url) | def list_pages(self): yield self.get_html(self.url) | 7fa37ba874d94c12b5efdfb819de1a05f663c91f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10327/7fa37ba874d94c12b5efdfb819de1a05f663c91f/seeclickfix_retrieval.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
7267,
12,
2890,
4672,
2824,
365,
18,
588,
67,
2620,
12,
2890,
18,
718,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
666,
67,
7267,
12,
2890,
4672,
2824,
365,
18,
588,
67,
2620,
12,
2890,
18,
718,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
f2.sort() print f2 | sf2 = set(u"\\".join((unicode(test_support.TESTFN), f)) for f in f2) self.failUnlessEqual(len(f1), len(self.files)) self.failUnlessEqual(sf2, set(self.files)) | def test_listdir(self): f1 = os.listdir(test_support.TESTFN) # Printing f1 is not appropriate, as specific filenames # returned depend on the local encoding f2 = os.listdir(unicode(test_support.TESTFN, sys.getfilesystemencoding())) f2.sort() print f2 | 8db6caff540618d19a399db320f5777659c98054 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/8db6caff540618d19a399db320f5777659c98054/test_pep277.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1098,
1214,
12,
2890,
4672,
284,
21,
273,
1140,
18,
1098,
1214,
12,
3813,
67,
13261,
18,
16961,
19793,
13,
468,
3038,
310,
284,
21,
353,
486,
5505,
16,
487,
2923,
9066,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1098,
1214,
12,
2890,
4672,
284,
21,
273,
1140,
18,
1098,
1214,
12,
3813,
67,
13261,
18,
16961,
19793,
13,
468,
3038,
310,
284,
21,
353,
486,
5505,
16,
487,
2923,
9066,
468,
... |
if(p == "resume_cpu"): | if(p == 'resume_machine'): | def analyzeKernelLog(): global sysvals, data print("PROCESSING DATA") data.vprint("Analyzing the dmesg data...") if(os.path.exists(sysvals.dmesgfile) == False): print("ERROR: %s doesn't exist") % sysvals.dmesgfile return False lf = sortKernelLog() phase = "suspend_runtime" dm = { 'suspend_general': r"PM: Syncing filesystems.*", 'suspend_early': r"PM: suspend of devices complete after.*", 'suspend_noirq': r"PM: late suspend of devices complete after.*", 'suspend_cpu': r"PM: noirq suspend of devices complete after.*", 'resume_cpu': r"ACPI: Low-level resume complete.*", 'resume_noirq': r"ACPI: Waking up from system sleep state.*", 'resume_early': r"PM: noirq resume of devices complete after.*", 'resume_general': r"PM: early resume of devices complete after.*", 'resume_complete': r".*Restarting tasks \.\.\..*", } if(sysvals.suspendmode == "standby"): dm['resume_cpu'] = r"PM: Restoring platform NVS memory" elif(sysvals.suspendmode == "disk"): dm['suspend_early'] = r"PM: freeze of devices complete after.*" dm['suspend_noirq'] = r"PM: late freeze of devices complete after.*" dm['suspend_cpu'] = r"PM: noirq freeze of devices complete after.*" dm['resume_cpu'] = r"PM: Restoring platform NVS memory" dm['resume_early'] = r"PM: noirq restore of devices complete after.*" dm['resume_general'] = r"PM: early restore of devices complete after.*" action_start = 0.0 for line in lf: # -- preprocessing -- # parse each dmesg line into the time and message m = re.match(r".*(\[ *)(?P<ktime>[0-9\.]*)(\]) (?P<msg>.*)", line) if(m): ktime = float(m.group("ktime")) msg = m.group("msg") else: print line continue # -- phase changes -- # suspend_general start if(re.match(dm['suspend_general'], msg)): phase = "suspend_general" data.dmesg[phase]['start'] = ktime data.start = ktime # action start: syncing filesystems action_start = ktime # suspend_early start elif(re.match(dm['suspend_early'], msg)): data.dmesg["suspend_general"]['end'] = ktime phase = "suspend_early" data.dmesg[phase]['start'] = ktime # suspend_noirq start elif(re.match(dm['suspend_noirq'], msg)): data.dmesg["suspend_early"]['end'] = ktime phase = "suspend_noirq" data.dmesg[phase]['start'] = ktime # suspend_cpu start elif(re.match(dm['suspend_cpu'], msg)): data.dmesg["suspend_noirq"]['end'] = ktime phase = "suspend_cpu" data.dmesg[phase]['start'] = ktime # resume_cpu start elif(re.match(dm['resume_cpu'], msg)): data.tSuspended = ktime data.dmesg["suspend_cpu"]['end'] = ktime phase = "resume_cpu" data.dmesg[phase]['start'] = ktime # resume_noirq start elif(re.match(dm['resume_noirq'], msg)): data.dmesg["resume_cpu"]['end'] = ktime phase = "resume_noirq" data.dmesg[phase]['start'] = ktime # action end: ACPI resume data.newAction("resume_cpu", "ACPI", -1, "", action_start, ktime) # resume_early start elif(re.match(dm['resume_early'], msg)): data.dmesg["resume_noirq"]['end'] = ktime phase = "resume_early" data.dmesg[phase]['start'] = ktime # resume_general start elif(re.match(dm['resume_general'], msg)): data.dmesg["resume_early"]['end'] = ktime phase = "resume_general" data.dmesg[phase]['start'] = ktime # resume complete start elif(re.match(dm['resume_complete'], msg)): data.dmesg["resume_general"]['end'] = ktime data.end = ktime phase = "resume_runtime" break # -- device callbacks -- if(phase in data.phases): # device init call if(re.match(r"calling (?P<f>.*)\+ @ .*, parent: .*", msg)): sm = re.match(r"calling (?P<f>.*)\+ @ (?P<n>.*), parent: (?P<p>.*)", msg); f = sm.group("f") n = sm.group("n") p = sm.group("p") if(f and n and p): data.newAction(phase, f, int(n), p, ktime, -1) # device init return elif(re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs", msg)): sm = re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs(?P<a>.*)", msg); f = sm.group("f") t = sm.group("t") list = data.dmesg[phase]['list'] if(f in list): dev = list[f] dev['length'] = int(t) dev['end'] = ktime data.vprint("%15s [%f - %f] %s(%d) %s" % (phase, dev['start'], dev['end'], f, dev['pid'], dev['par'])) # -- phase specific actions -- if(phase == "suspend_general"): if(re.match(r"PM: Preparing system for mem sleep.*", msg)): data.newAction(phase, "filesystem-sync", -1, "", action_start, ktime) elif(re.match(r"Freezing user space processes .*", msg)): action_start = ktime elif(re.match(r"Freezing remaining freezable tasks.*", msg)): data.newAction(phase, "freeze-user-processes", -1, "", action_start, ktime) action_start = ktime elif(re.match(r"PM: Entering (?P<mode>[a-z,A-Z]*) sleep.*", msg)): data.newAction(phase, "freeze-tasks", -1, "", action_start, ktime) elif(phase == "suspend_cpu"): m = re.match(r"smpboot: CPU (?P<cpu>[0-9]*) is now offline", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"ACPI: Preparing to enter system sleep state.*", msg)): action_start = ktime elif(re.match(r"Disabling non-boot CPUs .*", msg)): data.newAction(phase, "ACPI", -1, "", action_start, ktime) action_start = ktime elif(phase == "resume_cpu"): m = re.match(r"CPU(?P<cpu>[0-9]*) is up", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"Enabling non-boot CPUs .*", msg)): action_start = ktime # fill in any missing phases lp = "suspend_general" for p in data.phases: if(p == "suspend_general"): continue if(data.dmesg[p]['start'] < 0): data.dmesg[p]['start'] = data.dmesg[lp]['end'] if(p == "resume_cpu"): data.tSuspended = data.dmesg[lp]['end'] if(data.dmesg[p]['end'] < 0): data.dmesg[p]['end'] = data.dmesg[p]['start'] lp = p data.fixupInitcallsThatDidntReturn() return True | 0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
11286,
1343,
13332,
2552,
2589,
4524,
16,
501,
225,
1172,
2932,
16560,
1360,
8730,
7923,
501,
18,
90,
1188,
2932,
979,
4647,
310,
326,
9113,
281,
75,
501,
7070,
13,
309,
12,
538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
11286,
1343,
13332,
2552,
2589,
4524,
16,
501,
225,
1172,
2932,
16560,
1360,
8730,
7923,
501,
18,
90,
1188,
2932,
979,
4647,
310,
326,
9113,
281,
75,
501,
7070,
13,
309,
12,
538,
... |
if hasattr(tree,'xinclude') | if hasattr(tree,'xinclude'): | def fixup_sym_attributes(sym): #if not sym.find('CssParameter'): # return attrib = {} metawriter = sym.attrib.get('meta-writer') if metawriter: attrib['meta-writer'] = metawriter metaoutput = sym.attrib.get('meta-output') if metaoutput: attrib['meta-output'] = metaoutput for css in sym.findall('CssParameter'): key = css.attrib.get('name') value = css.text attrib[key] = value sym.clear() # remove CssParameter elements for k,v in attrib.items(): # insert attributes instead sym.attrib[k] = v | 3f2f9fb4e586baa8a7b6b259702e063c33f17bd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12100/3f2f9fb4e586baa8a7b6b259702e063c33f17bd7/upgrade_map_xml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
67,
8117,
67,
4350,
12,
8117,
4672,
468,
430,
486,
5382,
18,
4720,
2668,
7359,
1662,
11,
4672,
468,
565,
327,
5885,
273,
2618,
2191,
6299,
273,
5382,
18,
14588,
18,
588,
266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
67,
8117,
67,
4350,
12,
8117,
4672,
468,
430,
486,
5382,
18,
4720,
2668,
7359,
1662,
11,
4672,
468,
565,
327,
5885,
273,
2618,
2191,
6299,
273,
5382,
18,
14588,
18,
588,
266... |
def __init__(self, text, aspect_ratio=1, textual=False): | def __init__(self, text, aspect_ratio=1, textual=False, widechars='F,W'): | def __init__(self, text, aspect_ratio=1, textual=False): """Take a ASCII art figure and store it, prepare for ``recognize``""" self.aspect_ratio = float(aspect_ratio) self.textual = textual # XXX TODO tab expansion # detect size of input image, store as list of lines self.image = [] max_x = 0 y = 0 for line in text.splitlines(): max_x = max(max_x, len(line)) self.image.append(line) y += 1 self.width = max_x self.height = y # make sure it's rectangular (extend short lines to max width) for y, line in enumerate(self.image): if len(line) < max_x: self.image[y] = line + ' '*(max_x-len(line)) # initialize other data structures self.classification = [[None]*self.width for y in range(self.height)] self.shapes = [] self.nominal_size = NOMINAL_SIZE | e14a8247a278be5c343de11fd68331a6ec306ee6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1203/e14a8247a278be5c343de11fd68331a6ec306ee6/aafigure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
977,
16,
9648,
67,
9847,
33,
21,
16,
25774,
33,
8381,
16,
14812,
7549,
2218,
42,
16,
59,
11,
4672,
3536,
13391,
279,
11768,
3688,
7837,
471,
1707,
518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
977,
16,
9648,
67,
9847,
33,
21,
16,
25774,
33,
8381,
16,
14812,
7549,
2218,
42,
16,
59,
11,
4672,
3536,
13391,
279,
11768,
3688,
7837,
471,
1707,
518,
... |
if 'author' in field.tags: continue | if 'author' in field.tags: break | def _check_basic(self, doc): """ Check the description, author, version, and see-also fields of C{doc}. This is used as a helper function by L{_check_module}, L{_check_class}, and L{_check_func}. | 3ae73909296a51f3970680fb4cadb06e12dcd77e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/3ae73909296a51f3970680fb4cadb06e12dcd77e/checker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
13240,
12,
2890,
16,
997,
4672,
3536,
2073,
326,
2477,
16,
2869,
16,
1177,
16,
471,
2621,
17,
31144,
1466,
434,
385,
95,
2434,
5496,
225,
1220,
353,
1399,
487,
279,
4222... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
13240,
12,
2890,
16,
997,
4672,
3536,
2073,
326,
2477,
16,
2869,
16,
1177,
16,
471,
2621,
17,
31144,
1466,
434,
385,
95,
2434,
5496,
225,
1220,
353,
1399,
487,
279,
4222... |
l1 = wx.StaticText( self, -1, "wx.ColumnHeader (1001)", (20, 20), (200, 20) ) | cntlID = 1001 prompt = "wx.ColumnHeader (%d)" %(cntlID) l1 = wx.StaticText( self, -1, prompt, (20, 20), (200, 20) ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log | 97785f3f33dd20f2b36619b4084b435cbedc5e2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/97785f3f33dd20f2b36619b4084b435cbedc5e2e/ColumnHeader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
982,
16,
613,
262,
30,
7075,
18,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
300,
21,
16,
2154,
33,
27226,
18,
3417,
67,
18111,
67,
862,
4066,
3217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
982,
16,
613,
262,
30,
7075,
18,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
300,
21,
16,
2154,
33,
27226,
18,
3417,
67,
18111,
67,
862,
4066,
3217,
... |
logfile, 0, '') | logfile, 0, '') | def lamexec(DEBUGON, nproc, wait, cmd, nodes, logfile): 'Execute commands in parallel using LAM/MPI.' from os import access,F_OK found = 0 uname = os.uname() nodelen = len(string.split(nodes,',')) try: if DEBUGON: printlog('o2tf.lamexec: LAMEXEC = %s' % config.LAMEXEC, logfile, 0, '') printlog('o2tf.lamexec: nproc = %s' % nproc, logfile, 0, '') printlog('o2tf.lamexec: cmd = %s' % cmd, logfile, 0, '') printlog('o2tf.lamexec: nodelen = %d' % nodelen, logfile, 0, '') printlog('o2tf.lamexec: nodes = %s' % nodes, logfile, 0, '') pid = os.spawnv(os.P_NOWAIT, '/bin/bash', ['bash', '-xc', config.LAMEXEC + ' -np %s %s n0-%d %s' % \ ( nproc, wait, nodelen - 1, cmd)]) os.waitpid(pid,0) except os.error: pass | 657bfc37c22ea26052b0df161170cb3df469efec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1915/657bfc37c22ea26052b0df161170cb3df469efec/o2tf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17310,
4177,
12,
9394,
673,
16,
290,
9381,
16,
2529,
16,
1797,
16,
2199,
16,
15204,
4672,
296,
5289,
4364,
316,
7230,
1450,
511,
2192,
19,
49,
1102,
1093,
628,
1140,
1930,
2006,
16,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17310,
4177,
12,
9394,
673,
16,
290,
9381,
16,
2529,
16,
1797,
16,
2199,
16,
15204,
4672,
296,
5289,
4364,
316,
7230,
1450,
511,
2192,
19,
49,
1102,
1093,
628,
1140,
1930,
2006,
16,
42... |
1.4686939399158851571389675973266042613269567366290087227976756763109369658595121387227244973 + 2.2873552871788423912081719067005018089555862566683556809386581141036471601893454092673448521*I | 1.46869393991588515713896759732660426132695673662900872279767567631093696585951213872272449 + 2.28735528717884239120817190670050180895558625666835568093865811410364716018934540926734485*I | def exp(self): """ Compute exp(z). | 0f85c81e959512e75d1c3f66db056b379125ea81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0f85c81e959512e75d1c3f66db056b379125ea81/complex_number.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1329,
12,
2890,
4672,
3536,
8155,
1329,
12,
94,
2934,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1329,
12,
2890,
4672,
3536,
8155,
1329,
12,
94,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
gLogger.error("RemovalAgent.execute: Operation not supported.", operation) | gLogger.error( "RemovalAgent.execute: Operation not supported.", operation ) | def executeRequest(self): ################################################ # Get a request from request DB gMonitor.addMark( "Iteration", 1 ) res = self.RequestDBClient.getRequest('removal') if not res['OK']: gLogger.info("RemovalAgent.execute: Failed to get request from database.") return S_OK() elif not res['Value']: gLogger.info("RemovalAgent.execute: No requests to be executed found.") return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] sourceServer= res['Value']['Server'] try: jobID = int(res['Value']['JobID']) except: jobID = 0 gLogger.info("RemovalAgent.execute: Obtained request %s" % requestName) | 639c184ef75c7730d44d5168750f1731c63bf98b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/639c184ef75c7730d44d5168750f1731c63bf98b/RemovalAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
691,
12,
2890,
4672,
19709,
26487,
13151,
468,
968,
279,
590,
628,
590,
2383,
314,
7187,
18,
1289,
3882,
12,
315,
10795,
3113,
404,
262,
400,
273,
365,
18,
691,
2290,
1227,
18,
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,
1836,
691,
12,
2890,
4672,
19709,
26487,
13151,
468,
968,
279,
590,
628,
590,
2383,
314,
7187,
18,
1289,
3882,
12,
315,
10795,
3113,
404,
262,
400,
273,
365,
18,
691,
2290,
1227,
18,
5... |
self.treeCtrl.AddColumn(_('Item Name')) self.treeCtrl.AddColumn(_('Display Name')) self.treeCtrl.AddColumn(_('Kind')) self.treeCtrl.AddColumn(_('UUID')) self.treeCtrl.AddColumn(_('URL')) | info = wxTreeListColumnInfo() labels=['Item Name', 'Display Name', 'Kind', 'UUID', '', 'URL'] colLabels = map(_, labels) colSize = [80, 80, 80, 120, 10, 120] for x in range(len(colLabels)): info.SetText(colLabels[x]) info.SetWidth(colSize[x]) self.treeCtrl.AddColumnInfo(info) | def OnInit(self): """ Initializes the repository viewer, setting up the layout and populating the tree ctrl. """ # @@@ sizer layout should be handled in xrc, but xrc # does not yet support wxTreeListCtrl | 86c5b86176d7fa090fa4e11b866395109276fdd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/86c5b86176d7fa090fa4e11b866395109276fdd7/RepositoryViewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
2570,
12,
2890,
4672,
3536,
10188,
3128,
326,
3352,
14157,
16,
3637,
731,
326,
3511,
471,
3650,
1776,
326,
2151,
6414,
18,
3536,
468,
22175,
36,
272,
1824,
3511,
1410,
506,
7681,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
2570,
12,
2890,
4672,
3536,
10188,
3128,
326,
3352,
14157,
16,
3637,
731,
326,
3511,
471,
3650,
1776,
326,
2151,
6414,
18,
3536,
468,
22175,
36,
272,
1824,
3511,
1410,
506,
7681,
3... |
({'dc:': 'http://purl.org/dc/elements/1.1/'}, ['book', 'title'], '{ ?book dc:title ?title }') | ({'dc': 'http://purl.org/dc/elements/1.1/'}, ['book', 'title'], '{ ?book dc:title ?title }') | def parse(s): """parse some sparql >>> parse('PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT ?book ?title WHERE { ?book dc:title ?title }') ({'dc:': 'http://purl.org/dc/elements/1.1/'}, ['book', 'title'], '{ ?book dc:title ?title }') """ ns = {} while 1: s = s.strip() k, s = s.split(None, 1) k = k.lower() if k == 'prefix': pfx, s = s.split(None, 1) utrm, s = s.split(None, 1) ns[pfx] = utrm[1:-1] # remove <> around <foo> elif k == 'select': vars = [] while 1: s = s.strip() if s[0] == '{': return ns, vars, s else: k, s = s.split(None, 1) if k.lower() == 'where': continue vars.append(k[1:]) # ?foo becomes foo | bd609350f303b312d0b1c3a8ea55a6b4f442f69e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/bd609350f303b312d0b1c3a8ea55a6b4f442f69e/sparqltoy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
87,
4672,
3536,
2670,
2690,
272,
25366,
225,
4080,
1109,
2668,
6307,
6744,
30,
1377,
411,
2505,
2207,
84,
718,
18,
3341,
19,
7201,
19,
6274,
19,
21,
18,
21,
21259,
9111,
692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
87,
4672,
3536,
2670,
2690,
272,
25366,
225,
4080,
1109,
2668,
6307,
6744,
30,
1377,
411,
2505,
2207,
84,
718,
18,
3341,
19,
7201,
19,
6274,
19,
21,
18,
21,
21259,
9111,
692,... |
class product_uom_consol(): | class product_uom_consol(osv.osv): | # def _factor(self, cursor, user, ids, name, arg, context): | ec0ff44f71b71f9b8e11d0d1e5ba91a86e5f5dd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7359/ec0ff44f71b71f9b8e11d0d1e5ba91a86e5f5dd7/unit_analisys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
565,
1652,
389,
6812,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
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,
... | [
1,
1,
1,
1,
1,
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,
468,
565,
1652,
389,
6812,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
try: self.sc_definer_id = self.coinc_def_table.get_coinc_def_id([lsctables.CoincTable.tableName, lsctables.SimBurstTable.tableName]) except KeyError: | def summarize(self, xmldoc, live_time_program, verbose = False): """ Compute and record some summary information about the database. Call this after all the data has been inserted, and before you want any of this information. """ cursor = self.connection.cursor() | 85c425461e0928b16bdba8c9a1e71290a886f81e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/85c425461e0928b16bdba8c9a1e71290a886f81e/SnglBurstUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28712,
12,
2890,
16,
2025,
2434,
16,
8429,
67,
957,
67,
12890,
16,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
18,
225,
3049,
333,
1839,
777,
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,
28712,
12,
2890,
16,
2025,
2434,
16,
8429,
67,
957,
67,
12890,
16,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
18,
225,
3049,
333,
1839,
777,
326,
... | |
class List(vistrails_module.Module): | class List(Module): | def compute(self): result = "" for i in range(self.fieldCount): v = i+1 port = "str%s" % v if self.hasInputFromPort(port): inp = self.getInputFromPort(port) result += inp self.setResult("value", result) | bbb89ebe493db9587a30f7ab1f63c48c2c8e5e95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/bbb89ebe493db9587a30f7ab1f63c48c2c8e5e95/basic_modules.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
12,
2890,
4672,
563,
273,
1408,
364,
277,
316,
1048,
12,
2890,
18,
1518,
1380,
4672,
331,
273,
277,
15,
21,
1756,
273,
315,
701,
9,
87,
6,
738,
331,
309,
365,
18,
5332,
1210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
12,
2890,
4672,
563,
273,
1408,
364,
277,
316,
1048,
12,
2890,
18,
1518,
1380,
4672,
331,
273,
277,
15,
21,
1756,
273,
315,
701,
9,
87,
6,
738,
331,
309,
365,
18,
5332,
1210,
... |
'show_as' : lambda *a : 'busy', | 'show_as' : lambda *a : 'busy', | def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attendee_ids = attendee_obj.import_cal(cr, uid, eventdata['attendees']) vals = { 'ref':'%s,%d'%('crm.meeting', meeting_id) } attendee_obj.write(cr, uid, attendee_ids, vals) if name == "alarms": model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] alarm_ids = alarm_obj.import_cal(cr, uid, eventdata['alarms']) vals = { 'res_id' : meeting.id, 'model_id' : model_id, } alarm_obj.write(cr, uid, alarm_ids, vals) alarm = alarm_obj.browse(cr, uid, alarm_ids)[0] self.write(cr, uid, [meeting_id], {'alarm_id':alarm.alarm_id}) return True | 75258015cae6ae0d493e7eb6204a16eafed73cd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/75258015cae6ae0d493e7eb6204a16eafed73cd9/crm_meeting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
892,
12,
2890,
16,
4422,
16,
4555,
16,
18721,
310,
67,
350,
16,
508,
16,
460,
16,
1501,
16,
819,
4672,
309,
486,
460,
30,
327,
27645,
20953,
67,
2603,
273,
365,
18,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
892,
12,
2890,
16,
4422,
16,
4555,
16,
18721,
310,
67,
350,
16,
508,
16,
460,
16,
1501,
16,
819,
4672,
309,
486,
460,
30,
327,
27645,
20953,
67,
2603,
273,
365,
18,
6... |
while n >= 0: | while n > 0: | def list_of_first_n(v,n): """ Given an iterator v, return first n elements it produces as a list. INPUT: v -- an interator n -- an integer OUTPUT: list EXAMPLES: sage: sage.server.notebook.interact.list_of_first_n(Primes(), 10) [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31] sage: sage.server.notebook.interact.list_of_first_n((1..5), 10) [1, 2, 3, 4, 5] sage: sage.server.notebook.interact.list_of_first_n(QQ, 10) [0, 1, -1, 1/2, -1/2, 2, -2, 1/3, -1/3, 3/2, -3/2] """ if not hasattr(v, 'next'): v = v.__iter__() w = [] while n >= 0: try: w.append(v.next()) except StopIteration: return w n -= 1 return w | 5bda3f7b9543bf188cca7d25e82f044fad322c0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5bda3f7b9543bf188cca7d25e82f044fad322c0b/interact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
792,
67,
3645,
67,
82,
12,
90,
16,
82,
4672,
3536,
16803,
392,
2775,
331,
16,
327,
1122,
290,
2186,
518,
15505,
487,
279,
666,
18,
225,
12943,
30,
331,
1493,
392,
1554,
639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
792,
67,
3645,
67,
82,
12,
90,
16,
82,
4672,
3536,
16803,
392,
2775,
331,
16,
327,
1122,
290,
2186,
518,
15505,
487,
279,
666,
18,
225,
12943,
30,
331,
1493,
392,
1554,
639,... |
1) A method to add a new package 2) A method to add a new branch 3) A method to edit an existing package 4) A method to edit and existing branch | 1) A method to add a new package 2) A method to add a new branch 3) A method to edit an existing package 4) A method to edit and existing branch | def add_edit_package(self, pkg, owner=None, description=None, branches=None, cc_list=None, comaintainers=None, groups=None): '''Add or edit a package to the database. | 1249f349fd343814d4ff0aac752d9d991a3d6a42 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9952/1249f349fd343814d4ff0aac752d9d991a3d6a42/pkgdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
4619,
67,
5610,
12,
2890,
16,
3475,
16,
3410,
33,
7036,
16,
2477,
33,
7036,
16,
11483,
33,
7036,
16,
4946,
67,
1098,
33,
7036,
16,
532,
1598,
8234,
33,
7036,
16,
3252,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
4619,
67,
5610,
12,
2890,
16,
3475,
16,
3410,
33,
7036,
16,
2477,
33,
7036,
16,
11483,
33,
7036,
16,
4946,
67,
1098,
33,
7036,
16,
532,
1598,
8234,
33,
7036,
16,
3252,
33,
... |
print "STDOUT ============" print self.stdout() print "STDERR ============" print self.stderr() | self.dump_stdio() | def run_build_system( self, extra_args='', subdir='', stdout = None, stderr = '', status = 0, match = None, pass_toolset = None, **kw): | acb95541c1ae810986670149b66b15b0bccaf0a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9981/acb95541c1ae810986670149b66b15b0bccaf0a8/BoostBuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
3510,
67,
4299,
12,
365,
16,
2870,
67,
1968,
2218,
2187,
16921,
2218,
2187,
3909,
273,
599,
16,
4514,
273,
10226,
1267,
273,
374,
16,
845,
273,
599,
16,
1342,
67,
6738,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
3510,
67,
4299,
12,
365,
16,
2870,
67,
1968,
2218,
2187,
16921,
2218,
2187,
3909,
273,
599,
16,
4514,
273,
10226,
1267,
273,
374,
16,
845,
273,
599,
16,
1342,
67,
6738,
542,
... |
if vslot == AUTO_PHP_SLOT: raise VmError("Device @ vslot 0x%x doesn't support hotplug." % (vslot)) | def hvm_destroyPCIDevice(self, vslot): log.debug("hvm_destroyPCIDevice called %s", vslot) | 1db031409bd7cde3c245320bd98a4970548b5b00 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/1db031409bd7cde3c245320bd98a4970548b5b00/XendDomainInfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
3489,
67,
11662,
3513,
734,
73,
633,
12,
2890,
16,
331,
14194,
4672,
613,
18,
4148,
2932,
76,
3489,
67,
11662,
3513,
734,
73,
633,
2566,
738,
87,
3113,
331,
14194,
13,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
3489,
67,
11662,
3513,
734,
73,
633,
12,
2890,
16,
331,
14194,
4672,
613,
18,
4148,
2932,
76,
3489,
67,
11662,
3513,
734,
73,
633,
2566,
738,
87,
3113,
331,
14194,
13,
2,
-100,
... | |
if opt == "--ldaploadcert": | if opt == "--ldaploadcacert": | def applyKickstart(self): if self.ks.authconfig.authconfig != "": authstr = string.split(self.ks.authconfig.authconfig) opts, args = getopt.getopt(authstr, "d:h",["enablemd5", "enablenis", "nisdomain=", "nisserver=", "useshadow", "enableshadow", "enableldap", "enableldapauth", "ldapserver=", "ldapbasedn=", "ldaploadcert=", "enableldaptls", "enablekrb5", "krb5realm=", "krb5kdc=", "krb5adminserver=", "enablehesiod", "hesiodlhs=", "hesiodrhs=", "enablesmbauth", "smbservers=", "smbworkgroup=", "enablecache"]) | 15668e754a445736f142e847116e561506d5b359 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5376/15668e754a445736f142e847116e561506d5b359/auth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
47,
1200,
1937,
12,
2890,
4672,
309,
365,
18,
7904,
18,
1944,
1425,
18,
1944,
1425,
480,
1408,
30,
1357,
701,
273,
533,
18,
4939,
12,
2890,
18,
7904,
18,
1944,
1425,
18,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
47,
1200,
1937,
12,
2890,
4672,
309,
365,
18,
7904,
18,
1944,
1425,
18,
1944,
1425,
480,
1408,
30,
1357,
701,
273,
533,
18,
4939,
12,
2890,
18,
7904,
18,
1944,
1425,
18,
1944,
... |
fh.setLevel(hconfig.LOGLEVEL) | fh.setLevel(loglevel) | def startlogging(): """Start the logging system to store rotational log based on date.""" harness_logger.setLevel(hconfig.LOGLEVEL) #Get date for logfile date = time.strftime("%Y%m%d") #create file handler and set level to debug fh = logging.handlers.RotatingFileHandler(filename=hconfig.LOGDIR + date + ".log", maxBytes=2**20, backupCount=50) fh.setLevel(hconfig.LOGLEVEL) #create console handler and set level to error ch = logging.StreamHandler() ch.setLevel(logging.ERROR) #create formatter formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") #add formatter to fh fh.setFormatter(formatter) #add formatter to ch ch.setFormatter(formatter) #add fh to logger harness_logger.addHandler(fh) #add ch to logger harness_logger.addHandler(ch) harness_logger.debug("Logging started.") | dcdb1b008b0e19c9fae70c2b35fa575069e7ec2e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7283/dcdb1b008b0e19c9fae70c2b35fa575069e7ec2e/harness.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
11167,
13332,
3536,
1685,
326,
2907,
2619,
358,
1707,
6752,
287,
613,
2511,
603,
1509,
12123,
225,
366,
1303,
403,
67,
4901,
18,
542,
2355,
12,
76,
1425,
18,
4842,
10398,
13,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
11167,
13332,
3536,
1685,
326,
2907,
2619,
358,
1707,
6752,
287,
613,
2511,
603,
1509,
12123,
225,
366,
1303,
403,
67,
4901,
18,
542,
2355,
12,
76,
1425,
18,
4842,
10398,
13,
468,
... |
tmp_file.close() | _sync_close(tmp_file) | def add(self, message): """Add message and return assigned key.""" tmp_file = self._create_tmp() try: self._dump_message(message, tmp_file) finally: tmp_file.close() if isinstance(message, MaildirMessage): subdir = message.get_subdir() suffix = self.colon + message.get_info() if suffix == self.colon: suffix = '' else: subdir = 'new' suffix = '' uniq = os.path.basename(tmp_file.name).split(self.colon)[0] dest = os.path.join(self._path, subdir, uniq + suffix) os.rename(tmp_file.name, dest) if isinstance(message, MaildirMessage): os.utime(dest, (os.path.getatime(dest), message.get_date())) return uniq | d8ffef20d6b24248af5d2395eeb882cee23cf54d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d8ffef20d6b24248af5d2395eeb882cee23cf54d/mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
883,
4672,
3536,
986,
883,
471,
327,
6958,
498,
12123,
1853,
67,
768,
273,
365,
6315,
2640,
67,
5645,
1435,
775,
30,
365,
6315,
8481,
67,
2150,
12,
2150,
16,
1853,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
883,
4672,
3536,
986,
883,
471,
327,
6958,
498,
12123,
1853,
67,
768,
273,
365,
6315,
2640,
67,
5645,
1435,
775,
30,
365,
6315,
8481,
67,
2150,
12,
2150,
16,
1853,
... |
return (life_capacity * 100) / design_capacity | return (life_capacity * 100) / current_capacity | def percent(self): """Returns percentage capacity of all batteries""" | d9046690729321e024ac4dab17519db74c4f42c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/d9046690729321e024ac4dab17519db74c4f42c9/acpi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5551,
12,
2890,
4672,
3536,
1356,
11622,
7519,
434,
777,
324,
9293,
606,
8395,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5551,
12,
2890,
4672,
3536,
1356,
11622,
7519,
434,
777,
324,
9293,
606,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return self._dfs_bases([], Set()) def _dfs_bases(self, mro, seen): | return self._dfs_bases([], Set(), warn_about_bad_bases) def _dfs_bases(self, mro, seen, warn_about_bad_bases): | def mro(self): if self.is_newstyle_class(): return self._c3_mro() else: return self._dfs_bases([], Set()) | fd8e933e7dc320245c23dc52320d4c5698c01feb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/fd8e933e7dc320245c23dc52320d4c5698c01feb/apidoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
303,
12,
2890,
4672,
309,
365,
18,
291,
67,
2704,
4060,
67,
1106,
13332,
327,
365,
6315,
71,
23,
67,
81,
303,
1435,
469,
30,
327,
365,
6315,
12381,
67,
18602,
3816,
6487,
1000,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
312,
303,
12,
2890,
4672,
309,
365,
18,
291,
67,
2704,
4060,
67,
1106,
13332,
327,
365,
6315,
71,
23,
67,
81,
303,
1435,
469,
30,
327,
365,
6315,
12381,
67,
18602,
3816,
6487,
1000,
... |
if isinstance(obj, BaseProxy): | if isinstance(obj, (BaseProxy, EthernetAddr)): | def isproxy(obj): if isinstance(obj, BaseProxy): return True elif isinstance(obj, (list, tuple)): for v in obj: if isproxy(v): return True return False | 33010e0461a9611e7d585f759cbebb36fcad0279 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7385/33010e0461a9611e7d585f759cbebb36fcad0279/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
5656,
12,
2603,
4672,
309,
1549,
12,
2603,
16,
261,
2171,
3886,
16,
512,
27281,
3178,
3719,
30,
327,
1053,
1327,
1549,
12,
2603,
16,
261,
1098,
16,
3193,
3719,
30,
364,
331,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
5656,
12,
2603,
4672,
309,
1549,
12,
2603,
16,
261,
2171,
3886,
16,
512,
27281,
3178,
3719,
30,
327,
1053,
1327,
1549,
12,
2603,
16,
261,
1098,
16,
3193,
3719,
30,
364,
331,
316,
... |
list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive) | pimpinstaller = pimp.PimpInstaller(self.pimpdb) list, messages = pimpinstaller.prepareInstall(pkg, force, recursive) | def installpackage(self, sel, output, recursive, force): pkg = self.packages[sel] list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive) if messages: return messages messages = self.pimpinstaller.install(list, output) return messages | 67798fcc80b94b6e3dc69ea6078bb793a9bc2640 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/67798fcc80b94b6e3dc69ea6078bb793a9bc2640/PackageManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
5610,
12,
2890,
16,
357,
16,
876,
16,
5904,
16,
2944,
4672,
3475,
273,
365,
18,
10308,
63,
1786,
65,
293,
14532,
20163,
273,
293,
14532,
18,
52,
14532,
18678,
12,
2890,
18,
84,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
5610,
12,
2890,
16,
357,
16,
876,
16,
5904,
16,
2944,
4672,
3475,
273,
365,
18,
10308,
63,
1786,
65,
293,
14532,
20163,
273,
293,
14532,
18,
52,
14532,
18678,
12,
2890,
18,
84,
... |
if selection.fileName == '..': | if selection.fileName == u'..': | def onEnter (self): selection = self.model.items[self.selectedItem] | 5f003fa66305ac8935c5608a773efc5e9baee6db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9028/5f003fa66305ac8935c5608a773efc5e9baee6db/candy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
10237,
261,
2890,
4672,
4421,
273,
365,
18,
2284,
18,
3319,
63,
2890,
18,
8109,
1180,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
10237,
261,
2890,
4672,
4421,
273,
365,
18,
2284,
18,
3319,
63,
2890,
18,
8109,
1180,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if kw and cnf: cnf = _cnfmerge((cnf, kw)) elif kw: cnf = kw opts = () for k, v in cnf.items(): opts = opts + ('-'+k, v) return opts | if kw and cnf: cnf = _cnfmerge((cnf, kw)) elif kw: cnf = kw opts = () for k, v in cnf.items(): opts = opts + ('-'+k, v) return opts | def _options(self, cnf, kw ): | b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2116,
12,
2890,
16,
23118,
16,
5323,
262,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2116,
12,
2890,
16,
23118,
16,
5323,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
client.window.push_handlers(on_button_press=on_button_press) | client.actor.push_handlers(on_button_press=on_button_press) | def on_button_press(evt): stroke = (evt.state, evt.detail) if stroke in self.bindings: info = ActionInfo(screen=self.app.get_screen_by_root(evt.root), x=evt.event_x, y=evt.event_y, client=client) self.app.plugins['actions'].emit(self.bindings[stroke], info) | cb48a699a7595aee4222d00461c52dd9873269cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10761/cb48a699a7595aee4222d00461c52dd9873269cb/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
5391,
67,
1028,
12,
73,
11734,
4672,
11040,
273,
261,
73,
11734,
18,
2019,
16,
6324,
18,
8992,
13,
309,
11040,
316,
365,
18,
15863,
30,
1123,
273,
4382,
966,
12,
9252,
33,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
5391,
67,
1028,
12,
73,
11734,
4672,
11040,
273,
261,
73,
11734,
18,
2019,
16,
6324,
18,
8992,
13,
309,
11040,
316,
365,
18,
15863,
30,
1123,
273,
4382,
966,
12,
9252,
33,
2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.