rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
'uos_id': move_line.product_uos.id, | 'uos_id': uos_id, | def action_invoice_create(self, cursor, user, ids, journal_id=False, group=False, type='out_invoice', context=None): '''Return ids of created invoices for the pickings''' invoice_obj = self.pool.get('account.invoice') invoice_line_obj = self.pool.get('account.invoice.line') invoices_group = {} res = {} | 459b4639a8b5f9c69d6da936fc0140557bf0d848 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/459b4639a8b5f9c69d6da936fc0140557bf0d848/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
16119,
67,
2640,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
13001,
67,
350,
33,
8381,
16,
1041,
33,
8381,
16,
618,
2218,
659,
67,
16119,
2187,
819,
33,
7036,
4672,
9163,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
16119,
67,
2640,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
13001,
67,
350,
33,
8381,
16,
1041,
33,
8381,
16,
618,
2218,
659,
67,
16119,
2187,
819,
33,
7036,
4672,
9163,
99... |
drawline(light(black,0.2), pos, pos * V(1,0,1) - V(0,6,0)) | drawline(light(black, 0.2), pos, pos * V(1,0,1) - V(0, 6, 0)) | def draw(self, glpane): # this main guy is the one that needs to be transparent, so you can see what's he's making under him! # and, the thing he might make also needs to be transparent but there. and, a key should put it down for you... and unput it. # and, remove any other stuff in same pos! pos = self.pos ## + self.space.now # 070813 experiment -- works [since then, glpane .mode -> self.space, but i don't want to move this guy (the 3d cursor) drawbrick(self.color, pos, self.dir, 1,1,1) ## 2.0,4.0,6.0) # uses current GL context glDisable(GL_LIGHTING) drawbrick(gray, pos * V(1,0,1) - V(0,6,0), self.dir, 1, 1, 0.02) # brick dims for this dir are x,inout,z glEnable(GL_LIGHTING) drawline(light(black,0.2), pos, pos * V(1,0,1) - V(0,6,0)) #e and a line between them deads = [] for thing in self.stuff.itervalues(): #e move to superclass? ... well, they need to notice our shadow hitting them! be transparent? fog? # i bet transparent is not super hard to do... note that for cubes (or any convex solids) # it's easy to know back to front order... if thing.dead: # (thing.dead was set during a command -- don't draw it) deads.append(thing) else: thing.draw(glpane) # arg? if thing.dead: # (thing.dead was set during draw method itself, which may or may not have returned early) deads.append(thing) for thing in deads: thing.destroy() del self.stuff[id(thing)] return | 55ac4fdc2a170bd52fcbe417587721669a976b6f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/55ac4fdc2a170bd52fcbe417587721669a976b6f/test_animation_mode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
5118,
29009,
4672,
468,
333,
2774,
3058,
93,
353,
326,
1245,
716,
4260,
358,
506,
17270,
16,
1427,
1846,
848,
2621,
4121,
1807,
3904,
1807,
10480,
3613,
366,
381,
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,
3724,
12,
2890,
16,
5118,
29009,
4672,
468,
333,
2774,
3058,
93,
353,
326,
1245,
716,
4260,
358,
506,
17270,
16,
1427,
1846,
848,
2621,
4121,
1807,
3904,
1807,
10480,
3613,
366,
381,
5,
... |
ofp = open(ofname, 'w') | ofp = io.open(ofname, 'wb') | def __init__(self, name_finfo_dlen_rlen, ofp): name, finfo, dlen, rlen = name_finfo_dlen_rlen if isinstance(ofp, basestring): ofname = ofp ofp = open(ofname, 'w') if os.name == 'mac': fss = FSSpec(ofname) fss.SetCreatorType('BnHq', 'TEXT') ofp.write('(This file must be converted with BinHex 4.0)\n\n:') hqxer = _Hqxcoderengine(ofp) self.ofp = _Rlecoderengine(hqxer) self.crc = 0 if finfo is None: finfo = FInfo() self.dlen = dlen self.rlen = rlen self._writeinfo(name, finfo) self.state = _DID_HEADER | 2b5df605d4feb6b9f3d5c2b690131cf85c3b0fed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/2b5df605d4feb6b9f3d5c2b690131cf85c3b0fed/binhex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
67,
926,
617,
67,
72,
1897,
67,
1321,
275,
16,
434,
84,
4672,
508,
16,
15190,
16,
302,
1897,
16,
436,
1897,
273,
508,
67,
926,
617,
67,
72,
1897... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
67,
926,
617,
67,
72,
1897,
67,
1321,
275,
16,
434,
84,
4672,
508,
16,
15190,
16,
302,
1897,
16,
436,
1897,
273,
508,
67,
926,
617,
67,
72,
1897... |
status = 'alloc', path=root[1], | status = 'alloc', path=mount_point+root[1], | def insert_inode(inode): # dont do anything for realloc inodes if inode.alloc == 2: return | c80fece303360cd00580c108e974d657ad6bf55b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5568/c80fece303360cd00580c108e974d657ad6bf55b/Sleuthkit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
267,
390,
12,
267,
390,
4672,
468,
14046,
741,
6967,
364,
2863,
1829,
316,
1145,
309,
17870,
18,
9853,
422,
576,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
267,
390,
12,
267,
390,
4672,
468,
14046,
741,
6967,
364,
2863,
1829,
316,
1145,
309,
17870,
18,
9853,
422,
576,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.assertEqual(re.match('(x)*', 50000*'x').span(), (0, 50000)) | try: re.match('(x)*', 50000*'x') except RuntimeError, v: self.assertEqual(str(v), "maximum recursion limit exceeded") else: self.fail("re.match('(x)*', 50000*'x') should have failed") | def test_limitations(self): # Try nasty case that overflows the straightforward recursive # implementation of repeated groups. self.assertEqual(re.match('(x)*', 50000*'x').span(), (0, 50000)) | 79ee0feec0575f93c25781283f5925254a8cc6c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/79ee0feec0575f93c25781283f5925254a8cc6c6/test_re.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3595,
1012,
12,
2890,
4672,
468,
6161,
290,
689,
93,
648,
716,
9391,
87,
326,
21251,
11565,
5904,
468,
4471,
434,
12533,
3252,
18,
365,
18,
11231,
5812,
12,
266,
18,
1916,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
3595,
1012,
12,
2890,
4672,
468,
6161,
290,
689,
93,
648,
716,
9391,
87,
326,
21251,
11565,
5904,
468,
4471,
434,
12533,
3252,
18,
365,
18,
11231,
5812,
12,
266,
18,
1916,
26... |
for fd in (env['wsgi.input'], env['wsgi.output']): if hasattr(fd, 'fileno') and fd.fileno() >= 0: msvcrt.setmode(fd.fileno(), os.O_BINARY) | fd = env['wsgi.input'] if hasattr(fd, 'fileno') and fd.fileno() >= 0: msvcrt.setmode(fd.fileno(), os.O_BINARY) | def __call__(self, env, start_response): if os.name == 'nt': import msvcrt for fd in (env['wsgi.input'], env['wsgi.output']): if hasattr(fd, 'fileno') and fd.fileno() >= 0: msvcrt.setmode(fd.fileno(), os.O_BINARY) start_time = time.time() try: request = Request(env) except Exception, exc: log.ERROR('invalid request: %s' % exc) traceback.print_exc() response = self.http500() else: try: response = self.dispatch(request) if not isinstance(response, Response): log.ERROR('invalid result from dispatch(): %r' % response) response = self.http500() except Exception, exc: response = self.http500(exc) response.finish() start_response( '%d %s' % (response.status_code, response.status_text), response.headers.items() ) if isinstance(response.content, str): yield response.content else: while True: d = response.content.read(0x20000) if not d: break yield d log.info('request took %f s' % (time.time() - start_time)) | 67d5d45342c2bee1342ba4c6c068150bf305eb43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/67d5d45342c2bee1342ba4c6c068150bf305eb43/wsgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1550,
16,
787,
67,
2740,
4672,
309,
1140,
18,
529,
422,
296,
496,
4278,
1930,
4086,
90,
3353,
88,
5194,
273,
1550,
3292,
28539,
18,
2630,
3546,
309,
3859... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1550,
16,
787,
67,
2740,
4672,
309,
1140,
18,
529,
422,
296,
496,
4278,
1930,
4086,
90,
3353,
88,
5194,
273,
1550,
3292,
28539,
18,
2630,
3546,
309,
3859... |
state_machine.ConstantStateStrategy( max(textsPeriodInSeconds * 4, self._MINIMUM_MESSAGE_PERIOD) ) | state_machine.ConstantStateStrategy(idleTextsPeriodInSeconds) | def __init__(self, cookiePath = None, defaults = None): if defaults is None: defaults = self._DEFAULTS else: for key, (quant, unit) in defaults.iteritems(): if quant == 0: defaults[key] = (self._DEFAULTS[key], unit) elif quant < 0: defaults[key] = (state_machine.UpdateStateMachine.INFINITE_PERIOD, unit) self._username = None self._password = None | 072ed9010fad8302874906f9fe8d4c7e5c5a4545 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13096/072ed9010fad8302874906f9fe8d4c7e5c5a4545/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3878,
743,
273,
599,
16,
3467,
273,
599,
4672,
309,
3467,
353,
599,
30,
3467,
273,
365,
6315,
5280,
55,
469,
30,
364,
498,
16,
261,
17753,
16,
2836,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3878,
743,
273,
599,
16,
3467,
273,
599,
4672,
309,
3467,
353,
599,
30,
3467,
273,
365,
6315,
5280,
55,
469,
30,
364,
498,
16,
261,
17753,
16,
2836,
13... |
.. rubric:: Migrating classes to :class:`UniqueRepresentation` and unpickling | .. rubric:: Migrating classes to ``UniqueRepresentation`` and unpickling | ... def __reduce__(self): | 3ad8f8ee66cf0bee4df83ef7133de99688591e96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3ad8f8ee66cf0bee4df83ef7133de99688591e96/unique_representation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
4202,
1652,
1001,
12498,
972,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
4202,
1652,
1001,
12498,
972,
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,
-... |
fh = open(filename, "w") | fh = open(filename, "wb") | def file_write(filename, data): fh = open(filename, "w") try: fh.write(data) finally: fh.close() | 91eb953b7cba4fc0e3bb609c31fac6af847c4613 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4862/91eb953b7cba4fc0e3bb609c31fac6af847c4613/default.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
67,
2626,
12,
3459,
16,
501,
4672,
7625,
273,
1696,
12,
3459,
16,
315,
9464,
7923,
775,
30,
7625,
18,
2626,
12,
892,
13,
3095,
30,
7625,
18,
4412,
1435,
225,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
67,
2626,
12,
3459,
16,
501,
4672,
7625,
273,
1696,
12,
3459,
16,
315,
9464,
7923,
775,
30,
7625,
18,
2626,
12,
892,
13,
3095,
30,
7625,
18,
4412,
1435,
225,
2,
-100,
-100,
-100... |
table.attach(self.control_panel, 0, 1, 1, 2) | table.attach(self.control_panel, 0, 1, 1, 2, xoptions=0, yoptions=0) | def __init__(self, data, dim_names=[], title="sliceview", cmap=p.cm.bone): self.data = p.asarray(data) | 12103a63872d82631066300b2fbb6fbbaf4d63ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7241/12103a63872d82631066300b2fbb6fbbaf4d63ee/new_sliceview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
501,
16,
2464,
67,
1973,
22850,
6487,
2077,
1546,
6665,
1945,
3113,
11136,
33,
84,
18,
7670,
18,
19930,
4672,
365,
18,
892,
273,
293,
18,
345,
1126,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
501,
16,
2464,
67,
1973,
22850,
6487,
2077,
1546,
6665,
1945,
3113,
11136,
33,
84,
18,
7670,
18,
19930,
4672,
365,
18,
892,
273,
293,
18,
345,
1126,
12,
... |
print "Adding Qline: %s" % nickmask | LOG.info( "Adding Qline: %s" % nickmask ) | def handleCmd_TKL(self, prefix, args): | 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,
1640,
5931,
67,
56,
47,
48,
12,
2890,
16,
1633,
16,
833,
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,
... | [
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,
1640,
5931,
67,
56,
47,
48,
12,
2890,
16,
1633,
16,
833,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
no_comaintainers = sqlalchemy.select([model.PackageListing.id], | no_comaintainers = sqlalchemy.select([model.PackageListing.id], | def index(self): if identity.current.anonymous: own = 'need to be logged in' else: own = model.PackageListing.query.filter_by(owner=fasid).count() # most packages owned in DEVEL collection top_owners_select = sqlalchemy.select( [func.count(model.PackageListing.owner).label('numpkgs'), model.PackageListing.owner], and_( model.PackageListing.collectionid==DEVEL, model.PackageListing.owner!=ORPHAN_ID)).group_by( model.PackageListing.owner).order_by( desc('numpkgs')).limit(20) top_owners_names = [] for listing in top_owners_select.execute(): top_owners_names.append(self.fas.cache[int(listing.owner)]['username']) | 9632e88aef7435300565e923e2057e435e2b7f8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/9632e88aef7435300565e923e2057e435e2b7f8d/stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
309,
4215,
18,
2972,
18,
19070,
30,
4953,
273,
296,
14891,
358,
506,
7545,
316,
11,
469,
30,
4953,
273,
938,
18,
2261,
19081,
18,
2271,
18,
2188,
67,
1637,
12,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
309,
4215,
18,
2972,
18,
19070,
30,
4953,
273,
296,
14891,
358,
506,
7545,
316,
11,
469,
30,
4953,
273,
938,
18,
2261,
19081,
18,
2271,
18,
2188,
67,
1637,
12,
8... |
m=__builtin__.__import__(name,level=1) | m=__builtin__.__import__(name) | def eval(self,x): """ EXAMPLES: sage: from sage.misc.inline_fortran import InlineFortran sage: s = open(os.environ['SAGE_ROOT'] + '/examples/fortran/FIB1.F').read() sage: test_fortran = InlineFortran(globals()) #-- requires fortran sage: test_fortran(s) # -- requires fortran sage: import numpy sage: n = numpy.array(range(10),dtype=float) sage: fib(n,int(10)) # -- requires fortran sage: n # -- requires fortran array([ 0., 1., 1., 2., 3., 5., 8., 13., 21., 34.]) """ if len(x.splitlines()) == 1 and os.path.exists(x): filename = x x = open(x).read() if filename.lower().endswith('.f90'): x = '!f90\n' + x global count # On linux g77_shared should be a script that runs sage_fortran -shared # On OSX it should be a script that runs gfortran -bundle -undefined dynamic_lookup path = os.environ['SAGE_LOCAL']+'/bin/sage-g77_shared' from numpy import f2py #name = tmp_dir() + '/fortran_module_%d'%count name = 'fortran_module_%d'%count if os.path.exists(name): os.unlink(name) s_lib_path="" s_lib="" for s in self.library_paths: s_lib_path=s_lib_path+"-L"+s+" " | 6913388ba2955b0490fcecac7a196656b53b237a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/6913388ba2955b0490fcecac7a196656b53b237a/inline_fortran.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
92,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
628,
272,
410,
18,
23667,
18,
10047,
67,
1884,
13171,
1930,
16355,
1290,
13171,
272,
410,
30,
272,
273,
1696,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
92,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
628,
272,
410,
18,
23667,
18,
10047,
67,
1884,
13171,
1930,
16355,
1290,
13171,
272,
410,
30,
272,
273,
1696,
1... |
def init(geni_username, vesselcount, vesseltype, program_filename, *args): | def init(geni_username, vesselcount, vesseltype, program_filename): | def init(geni_username, vesselcount, vesseltype, program_filename, *args): """ <Purpose> Initializes the deployment of an arbitrary service. Populates a global configuration dictionary and returns a dict of data that could be required by the run() function. init() must be called before the run() function. Note on the return dict: The return value of init() is meant to contain data that is needed by calls to explib.start_vessel() within the run() function. At the time of creation of this library, the only such data that is required by deployable services is the user's GENI port. To add support for services requiring more arguments, simply add the necessary data to the dictionary returned by this function. <Arguments> geni_username SeattleGENI username. Used to locate and handle public and private key files. vesselcount The number of vessels on which to deploy. vesseltype The type of vessel to acquire, based on the SEATTLEGENI_VESSEL_TYPE_* constants within experimentlib.py program_filename The filename of the program to deploy and monitor on vessels. *args [Optional] Any additional arguments will be passed to the program deployed on vessels. <Exceptions> ValueError Raised if argument vesseltype doesn't match one of the experimentlib SEATTLEGENI_VESSEL_TYPE_* constants, if argument program file does not exist, or if argument number of vessels on which to deploy exceeds the user's number of vessel credits. <Side Effects> Initializes certain global variables. <Returns> A dictionary containing data that clients might need for running program on vessels. """ # Fill config dict with argument data # Validate vesseltype, based on constants in explib if vesseltype not in [explib.SEATTLEGENI_VESSEL_TYPE_WAN, explib.SEATTLEGENI_VESSEL_TYPE_LAN, explib.SEATTLEGENI_VESSEL_TYPE_NAT, explib.SEATTLEGENI_VESSEL_TYPE_RAND]: raise ValueError('Invalid vessel type specified. Argument vessel type must be one of the SEATTLEGENI_VESSEL_TYPE_* constants defined in experimentlib.py') config['vesseltype'] = vesseltype # Verify that program file exists if not os.path.isfile(program_filename): raise ValueError('Specified program file ' + program_filename + ' does not exist') config['program_filename'] = program_filename # Setup explib identity object and GENI details config['identity'] = explib.create_identity_from_key_files( geni_username + '.publickey', geni_username + '.privatekey') config['geni_port'] = explib.seattlegeni_user_port(config['identity']) # Validate number of vessels on which to deploy num_vslcredits = explib.seattlegeni_max_vessels_allowed(config['identity']) if vesselcount > num_vslcredits: raise ValueError('Invalid number of vessels specified. The number of deployed vessels must be less than or equal to the user\'s number of vessel credits.') config['vesselcount'] = vesselcount # Create and populate the return dict ret_dict = { 'geni_port': config['geni_port'] } return ret_dict | c350a143212d411e5944d5c012b1612f03ddbde4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7995/c350a143212d411e5944d5c012b1612f03ddbde4/overlord.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
4507,
77,
67,
5053,
16,
331,
403,
292,
1883,
16,
331,
403,
292,
723,
16,
5402,
67,
3459,
4672,
3536,
411,
10262,
4150,
34,
10188,
3128,
326,
6314,
434,
392,
11078,
1156,
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,
1208,
12,
4507,
77,
67,
5053,
16,
331,
403,
292,
1883,
16,
331,
403,
292,
723,
16,
5402,
67,
3459,
4672,
3536,
411,
10262,
4150,
34,
10188,
3128,
326,
6314,
434,
392,
11078,
1156,
18,
... |
filename = '/var/named/reverse.rocks.domain.%s.local'\ | filename = '/var/named/reverse.rocks.domain.%s.local' \ | def writeReverse(self, serial): for subnet in self.owner.getSubnets(): forward_sn = string.join(subnet, '.') | a3bd7e823c5b9339b688a69b4394e5cb1f1cd489 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7066/a3bd7e823c5b9339b688a69b4394e5cb1f1cd489/plugin_dns.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12650,
12,
2890,
16,
2734,
4672,
364,
8821,
316,
365,
18,
8443,
18,
588,
25211,
13332,
5104,
67,
8134,
273,
533,
18,
5701,
12,
19926,
16,
2611,
13,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
1045,
12650,
12,
2890,
16,
2734,
4672,
364,
8821,
316,
365,
18,
8443,
18,
588,
25211,
13332,
5104,
67,
8134,
273,
533,
18,
5701,
12,
19926,
16,
2611,
13,
2,
-100,
-100,
-100,
-100,
-10... |
ix = h & 0xff000000 | ix = h & 0xff000000L | def myhash(s, magic): h = 0 for c in map(ord, s.upper()): h = (h * magic) + c ix = h & 0xff000000 if ix: h = (h ^ ((ix>>24) & 0xff)) & 0x00ffffff return h | 9e20872ba59891867e733a6bf73ae9e6c08289b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9e20872ba59891867e733a6bf73ae9e6c08289b1/makeunicodedata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
2816,
12,
87,
16,
8146,
4672,
366,
273,
374,
364,
276,
316,
852,
12,
517,
16,
272,
18,
5797,
1435,
4672,
366,
273,
261,
76,
380,
8146,
13,
397,
276,
8288,
273,
366,
473,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
2816,
12,
87,
16,
8146,
4672,
366,
273,
374,
364,
276,
316,
852,
12,
517,
16,
272,
18,
5797,
1435,
4672,
366,
273,
261,
76,
380,
8146,
13,
397,
276,
8288,
273,
366,
473,
374,
... |
for product in pool.get('product.product').browse(self.cr,self.uid,product_ids): | for product in pool.get('product.product').read(self.cr,self.uid,product_ids,['name','code']): | def _get_categories(self, products,form): cat_ids=[] res=[] self.pricelist = form['price_list'] self._set_quantity(form) pool = pooler.get_pool(self.cr.dbname) pro_ids=[] for product in products: pro_ids.append(product.id) if product.categ_id.id not in cat_ids: cat_ids.append(product.categ_id.id) cats=pool.get('product.category').browse(self.cr,self.uid,cat_ids) for cat in cats: product_ids=pool.get('product.product').search(self.cr,self.uid,[('id','in',pro_ids),('categ_id','=',cat.id)]) products = [] for product in pool.get('product.product').browse(self.cr,self.uid,product_ids): val={ 'id':product.id, 'name':product.name, 'code':product.code } i = 1 for qty in self.quantity: val['qty'+str(i)]=self._get_price(self.pricelist,product.id,qty) i += 1 products.append(val) res.append({'name':cat.name,'products':products}) return res | 967b12f89f806186cbdd8d4b6f8a7df52dac28c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/967b12f89f806186cbdd8d4b6f8a7df52dac28c7/product_pricelist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
8995,
12,
2890,
16,
10406,
16,
687,
4672,
6573,
67,
2232,
33,
8526,
400,
33,
8526,
365,
18,
683,
335,
5449,
273,
646,
3292,
8694,
67,
1098,
3546,
365,
6315,
542,
67,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
8995,
12,
2890,
16,
10406,
16,
687,
4672,
6573,
67,
2232,
33,
8526,
400,
33,
8526,
365,
18,
683,
335,
5449,
273,
646,
3292,
8694,
67,
1098,
3546,
365,
6315,
542,
67,
16... |
""" Parses the request, returning a dictionary of the keys. | """Parses the request, returning a dictionary of the keys. | def parse_formvars(environ, all_as_list=False, include_get_vars=True): """ Parses the request, returning a dictionary of the keys. If ``all_as_list`` is true, then all values will be lists. If not, then only values that show up multiple times will be lists. If ``include_get_vars`` is true and this was a POST request, then GET (query string) variables will also be folded into the dictionary. All values should be strings, except for file uploads which are left as FieldStorage instances. """ source = (environ.get('QUERY_STRING', ''), environ['wsgi.input'], environ['REQUEST_METHOD'], all_as_list, include_get_vars) if 'paste.parsed_formvars' in environ: parsed, check_source = environ['paste.parsed_formvars'] if check_source == source: return parsed fs = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ, keep_blank_values=1) formvars = {} for name in fs.keys(): values = fs[name] if not isinstance(values, list): values = [values] for value in values: if not value.filename: value = value.value if name in formvars: if isinstance(formvars[name], list): formvars[name].append(value) else: formvars[name] = [formvars[name], value] elif all_as_list: formvars[name] = [value] else: formvars[name] = value if environ['REQUEST_METHOD'] == 'POST' and include_get_vars: for name, value in parse_querystring(environ): if name in formvars: if isinstance(formvars[name], list): formvars[name].append(value) else: formvars[name] = [formvars[name], value] elif all_as_list: formvars[name] = [value] else: formvars[name] = value environ['paste.parsed_formvars'] = (formvars, source) return formvars | 049b5949b4f52646f27fc1e52173d17e611502fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/049b5949b4f52646f27fc1e52173d17e611502fd/request.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
687,
4699,
12,
28684,
16,
777,
67,
345,
67,
1098,
33,
8381,
16,
2341,
67,
588,
67,
4699,
33,
5510,
4672,
3536,
6656,
326,
590,
16,
5785,
279,
3880,
434,
326,
1311,
18,
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,
1109,
67,
687,
4699,
12,
28684,
16,
777,
67,
345,
67,
1098,
33,
8381,
16,
2341,
67,
588,
67,
4699,
33,
5510,
4672,
3536,
6656,
326,
590,
16,
5785,
279,
3880,
434,
326,
1311,
18,
225,... |
self.runCmd(str, trace = (True if trace else False), check = not error) | self.runCmd(str, msg=msg, trace = (True if trace else False), check = not error) | def expect(self, str, msg=None, patterns=None, startstr=None, substrs=None, trace=False, error=False, matching=True, exe=True): """ Similar to runCmd; with additional expect style output matching ability. | 201d66f9f3f1e5c68ce46989e50464740b85fbc3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/201d66f9f3f1e5c68ce46989e50464740b85fbc3/lldbtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4489,
12,
2890,
16,
609,
16,
1234,
33,
7036,
16,
6884,
33,
7036,
16,
787,
701,
33,
7036,
16,
2373,
87,
33,
7036,
16,
2606,
33,
8381,
16,
555,
33,
8381,
16,
3607,
33,
5510,
16,
1507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4489,
12,
2890,
16,
609,
16,
1234,
33,
7036,
16,
6884,
33,
7036,
16,
787,
701,
33,
7036,
16,
2373,
87,
33,
7036,
16,
2606,
33,
8381,
16,
555,
33,
8381,
16,
3607,
33,
5510,
16,
1507... |
short_desc = "General-purpose Python bindings for the HDF5 library" | short_desc = "Read and write HDF5 files from Python" | def run(self): if os.path.exists('MANIFEST'): os.remove('MANIFEST') | f971b2ce1f3c1b5bc2a81ed9453ffa35869159ae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10380/f971b2ce1f3c1b5bc2a81ed9453ffa35869159ae/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
309,
1140,
18,
803,
18,
1808,
2668,
9560,
30050,
11,
4672,
1140,
18,
4479,
2668,
9560,
30050,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
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,
4672,
309,
1140,
18,
803,
18,
1808,
2668,
9560,
30050,
11,
4672,
1140,
18,
4479,
2668,
9560,
30050,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
out.append('\n\t%s: %s,' % (prettify(k), prettify(v))) out.append(len(obj) and '\n\t}' or '}') | out.append('\n\0%s: %s,' % (prettify(k), prettify(v))) out.append(len(obj) and '\n\0}' or '}') | def prettify(obj): if hasattr(obj, 'getSource'): return obj.getSource() else: #basic type t = type(obj) if t in [types.StringType, types.UnicodeType, types.IntType, types.FloatType, types.LongType, types.NoneType]: return repr(obj) elif t is types.DictType: out = ['{'] for k,v in obj.items(): out.append('\n\t%s: %s,' % (prettify(k), prettify(v))) out.append(len(obj) and '\n\t}' or '}') return string.join(out, '') elif t is types.ListType: out = ["["] for x in obj: out.append('\n\t%s,' % prettify(x)) out.append(len(obj) and '\n\t]' or ']') return string.join(out, '') elif t is types.TupleType: out = ["("] for x in obj: out.append('\n\t%s,' % prettify(x)) out.append(len(obj) and '\n\t)' or ')') return string.join(out, '') else: raise TypeError("Unsupported type %s when trying to prettify %s." % (t, obj)) | 8fe5bd8521c56292cbda81a5e16ab51d100d5840 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8fe5bd8521c56292cbda81a5e16ab51d100d5840/aot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
748,
1164,
12,
2603,
4672,
309,
3859,
12,
2603,
16,
296,
588,
1830,
11,
4672,
327,
1081,
18,
588,
1830,
1435,
469,
30,
468,
13240,
618,
268,
273,
618,
12,
2603,
13,
225,
309,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
748,
1164,
12,
2603,
4672,
309,
3859,
12,
2603,
16,
296,
588,
1830,
11,
4672,
327,
1081,
18,
588,
1830,
1435,
469,
30,
468,
13240,
618,
268,
273,
618,
12,
2603,
13,
225,
309,
26... |
def __init__(self, docformatter, container): self._container = container self._docformatter = docformatter self._docmap = docformatter._docmap def translate_identifier_xref(self, identifier, label=None): if label is None: label = identifier uid = findUID(identifier, container, self._docmap) if uid is None: self._failed_xrefs[identifier] = 1 return self._docformatter._uid_to_href(uid, label, 'link') def translate_indexterm(self, indexterm): anchor = self._docformatter._term_index_to_anchor(indexterm) return ('<a name="%s"></a><i class="indexterm">%s</i>' % (anchor, childstr)) def report_failed_xrefs(self): failed_xrefs = self._failed_xrefs.keys() if failed_xrefs: if sys.stderr.softspace: print >>sys.stderr if len(failed_xrefs) == 1: estr = 'could not find a UID for: ' + failed_xrefs[0] else: estr = 'could not find UIDs for: ' + ', '.join(failed_xrefs) print >>sys.stderr, estr | if type(obj) is types.InstanceType: link = doc.createElement('link') name = doc.createElement('name') target = doc.createElement('target') para.appendChild(link) link.appendChild(name) link.appendChild(target) name.appendChild(doc.createTextNode(str(obj.__class__.__name__))) target.appendChild(doc.createTextNode(str(obj.__class__))) else: code = doc.createElement('code') para.appendChild(code) code.appendChild(doc.createTextNode(type(obj).__name__)) return ParsedEpytextDocstring(doc) import plaintext | def __init__(self, docformatter, container): self._container = container self._docformatter = docformatter self._docmap = docformatter._docmap | a34ef38592d70569e5d780000480219b6fd0641b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/a34ef38592d70569e5d780000480219b6fd0641b/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
997,
12354,
16,
1478,
4672,
365,
6315,
3782,
273,
1478,
365,
6315,
2434,
12354,
273,
997,
12354,
365,
6315,
2434,
1458,
273,
997,
12354,
6315,
2434,
1458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
997,
12354,
16,
1478,
4672,
365,
6315,
3782,
273,
1478,
365,
6315,
2434,
12354,
273,
997,
12354,
365,
6315,
2434,
1458,
273,
997,
12354,
6315,
2434,
1458,
... |
""" | """ | def flimage_enable_jpeg(): """ flimage_enable_jpeg() """ _flimage_enable_jpeg() | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
2730,
67,
7589,
67,
14423,
13332,
3536,
1183,
2730,
67,
7589,
67,
14423,
1435,
3536,
225,
389,
2242,
2730,
67,
7589,
67,
14423,
1435,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
2730,
67,
7589,
67,
14423,
13332,
3536,
1183,
2730,
67,
7589,
67,
14423,
1435,
3536,
225,
389,
2242,
2730,
67,
7589,
67,
14423,
1435,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.names['Orientation'] = {'wxVERTICAL': wxVERTICAL, | self.names['Orientation'] = {'wxVERTICAL': wxVERTICAL, | def __init__(self, name, designer, objClass): SizerDTC.__init__(self, name, designer, objClass) self.editors['Orientation'] = EnumPropEdit self.names['Orientation'] = {'wxVERTICAL': wxVERTICAL, 'wxHORIZONTAL': wxHORIZONTAL} self.options['Orientation'] = [wxVERTICAL, wxHORIZONTAL] | 6855cdd6e993138a31fabc262e2e332cdd94b9fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6855cdd6e993138a31fabc262e2e332cdd94b9fc/SizerCompanions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
8281,
264,
16,
1081,
797,
4672,
348,
1824,
9081,
39,
16186,
2738,
972,
12,
2890,
16,
508,
16,
8281,
264,
16,
1081,
797,
13,
365,
18,
4619,
138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
8281,
264,
16,
1081,
797,
4672,
348,
1824,
9081,
39,
16186,
2738,
972,
12,
2890,
16,
508,
16,
8281,
264,
16,
1081,
797,
13,
365,
18,
4619,
138... |
"""Equal if all attributes and index are equal""" | """Equal if all attributes are equal""" | def __eq__(self, ea): """Equal if all attributes and index are equal""" assert isinstance(ea, ExtendedAttributes) return ea.index == self.index and ea.attr_dict == self.attr_dict | ed018f06a8deec3624aca62bffd5ef904557029d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8033/ed018f06a8deec3624aca62bffd5ef904557029d/eas_acls.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
24164,
4672,
3536,
5812,
309,
777,
1677,
854,
3959,
8395,
1815,
1549,
12,
24852,
16,
14094,
2498,
13,
327,
24164,
18,
1615,
422,
365,
18,
1615,
471,
24164... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
24164,
4672,
3536,
5812,
309,
777,
1677,
854,
3959,
8395,
1815,
1549,
12,
24852,
16,
14094,
2498,
13,
327,
24164,
18,
1615,
422,
365,
18,
1615,
471,
24164... |
pattern = join(self.packageResourceFolder, pat) | pattern = join(self.resourceFolder, pat) | def _addResources(self): "Add Welcome/ReadMe/License files, .lproj folders and scripts." | 997429a5f47037de601ff9bd7d4bd4b538927106 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/997429a5f47037de601ff9bd7d4bd4b538927106/buildpkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
3805,
12,
2890,
4672,
315,
986,
678,
16312,
19,
1994,
4667,
19,
13211,
1390,
16,
263,
80,
17995,
9907,
471,
8873,
1199,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
3805,
12,
2890,
4672,
315,
986,
678,
16312,
19,
1994,
4667,
19,
13211,
1390,
16,
263,
80,
17995,
9907,
471,
8873,
1199,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
A resource specificiation dict of the form {'rspec_type':type, 'number_of_nodes':num} | A resource specification dict of the form {'rspec_type':type, 'number_of_nodes':num} | def acquire_resources(auth, rspec): """ <Purpose> Acquires resources for users over XMLRPC. <Arguments> auth An authorization dict of the form {'username':username, 'password':password} rspec A resource specificiation dict of the form {'rspec_type':type, 'number_of_nodes':num} <Exceptions> Raises xmlrpclib Fault objects: 100, "GENIOpError" for internal errors. 103, "GENINotEnoughCredits" if user has insufficient vessel credits to complete request. <Returns> A list of 'info' dictionaries, each 'infodict' contains acquired vessel info. """ geni_user = _auth(auth) resource_type = rspec['rspec_type'] num_vessels = rspec['number_of_nodes'] acquired_vessels = [] # validate rspec data if not isinstance(resource_type, str) or not isinstance(num_vessels, int): raise xmlrpclib.Fault(102, "GENIInvalidUserInput: rspec has invalid data types.") if (resource_type != "lan" and resource_type != "wan" and \ resource_type != "random") or num_vessels < 1: raise xmlrpclib.Fault(102, "GENIInvalidUserInput: rspec has invalid values.") # since acquired_vessels expects rand instead of random if resource_type == 'random': resource_type = 'rand' try: acquired_vessels = interface.acquire_vessels(geni_user, num_vessels, resource_type) except DoesNotExistError: raise xmlrpclib.Fault(100, "GENIOpError: Internal GENI Error! Recieved a DoesNotExistError while calling interface.acquire_vessels") except UnableToAcquireResourcesError, err: raise xmlrpclib.Fault(100, "GENIOpError: Internal GENI Error! Unable to fulfill vessel acquire request at this given time. Please try again later.") except InsufficientUserResourcesError, err: raise xmlrpclib.Fault(103, "GENINotEnoughCredits: You do not have enough vessel credits to acquire the number of vessels requested.") except ProgrammerError, err: raise xmlrpclib.Fault(100, "GENIOpError: Internal GENI Error! Recieved a ProgrammerError while calling interface.acquire_vessels. Details: " + str(err)) # since acquire_vessels returns a list of Vessel objects, we # need to convert them into a list of 'info' dictionaries. return interface.get_vessel_infodict_list(acquired_vessels) | f18ee9fdda2c7ff2bc524b991ff88cb6c55b98e8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/f18ee9fdda2c7ff2bc524b991ff88cb6c55b98e8/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10533,
67,
4683,
12,
1944,
16,
436,
2793,
4672,
3536,
411,
10262,
4150,
34,
12848,
4138,
2703,
364,
3677,
1879,
3167,
8087,
18,
411,
4628,
34,
1357,
1922,
6093,
2065,
434,
326,
646,
1366... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10533,
67,
4683,
12,
1944,
16,
436,
2793,
4672,
3536,
411,
10262,
4150,
34,
12848,
4138,
2703,
364,
3677,
1879,
3167,
8087,
18,
411,
4628,
34,
1357,
1922,
6093,
2065,
434,
326,
646,
1366... |
self.objectPositions[key] = len(self.objects) | self.objectPositions[key] = len(self.objects)+1 | def add(self, key, obj): self.objectPositions[key] = len(self.objects) # its position self.objects.append(obj) #obj.doc = self return len(self.objects) - 1 # give its position | ea47db2c40665f54063731916816f8ca3efd7566 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/ea47db2c40665f54063731916816f8ca3efd7566/pdfdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
498,
16,
1081,
4672,
225,
365,
18,
1612,
11024,
63,
856,
65,
273,
562,
12,
2890,
18,
6911,
27921,
21,
225,
468,
2097,
1754,
365,
18,
6911,
18,
6923,
12,
2603,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
498,
16,
1081,
4672,
225,
365,
18,
1612,
11024,
63,
856,
65,
273,
562,
12,
2890,
18,
6911,
27921,
21,
225,
468,
2097,
1754,
365,
18,
6911,
18,
6923,
12,
2603,
13,
... |
assert type(s) is str | # function def block, then self.def_name will be its name; | b37e11279e9e82e10e5fbab0c884b75fef8dea1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/b37e11279e9e82e10e5fbab0c884b75fef8dea1e/html_colorize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
445,
1652,
1203,
16,
1508,
365,
18,
536,
67,
529,
903,
506,
2097,
508,
31,
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,
468,
445,
1652,
1203,
16,
1508,
365,
18,
536,
67,
529,
903,
506,
2097,
508,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
_dictEntries = [] | def __init__(self, items=()): _dictEntries = [] for name,value in items: if type(name) in (list, tuple, frozenset, set): for item in name: _dictEntries.append((item, value)) else: _dictEntries.append((name, value)) dict.__init__(self, _dictEntries) self.default = None | 5e5309d9e1b81e6ea67c6e6c86d82d0a3ab62a2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9368/5e5309d9e1b81e6ea67c6e6c86d82d0a3ab62a2e/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1516,
33,
1435,
4672,
364,
508,
16,
1132,
316,
1516,
30,
309,
618,
12,
529,
13,
316,
261,
1098,
16,
3193,
16,
23462,
16,
444,
4672,
364,
761,
316,
508,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1516,
33,
1435,
4672,
364,
508,
16,
1132,
316,
1516,
30,
309,
618,
12,
529,
13,
316,
261,
1098,
16,
3193,
16,
23462,
16,
444,
4672,
364,
761,
316,
508,... | |
for x in range(len(stats)): for y in range(x+1,len(stats)): key = str(":".join( ("correl", track, headers[x], headers[y] ) )) result = self.getDataFromCache(key) if result == None: xvals, yvals = stats[x], stats[y] take = [i for i in range(len(xvals)) if xvals[i] != None and yvals[i] != None ] xvals = [xvals[i] for i in take ] yvals = [yvals[i] for i in take ] try: result = Stats.doCorrelationTest( xvals, yvals ) except ValueError, msg: continue self.saveDataInCache( key, (result,) ) else: result = result[0] results[(track,headers[x],headers[y])] = result debug( "finished pairwise statistical computations" ) return results def render(self, data): lines = [] if len(data) == 0: return lines tests = self.getTestResults( data ) if len(tests) == 0: return lines lines.append( ".. csv-table:: %s" % self.mTracker.getShortCaption() ) lines.append( ' :header: "track","var1","var2","%s" ' % '","'.join( Stats.CorrelationTest().getHeaders() ) ) lines.append( '' ) for track, xx in data: headers, stats = xx if len(stats) == 0: continue | matrix = numpy.zeros( (len( stats), len(stats) ), numpy.float) | def getTestResults( self, data ): """perform pairwise statistical tests on data.""" | 2b9d905686efbbdd911c786e3e0eb22c315b071e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8044/2b9d905686efbbdd911c786e3e0eb22c315b071e/Renderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29384,
3447,
12,
365,
16,
501,
262,
30,
3536,
16092,
21886,
610,
376,
1706,
7434,
603,
501,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29384,
3447,
12,
365,
16,
501,
262,
30,
3536,
16092,
21886,
610,
376,
1706,
7434,
603,
501,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.create_boot_floppy() if self.tftp_root: self.setup_pxe_boot() | print " url: " + str(self.url) print " kernel: " + str(self.kernel) print " initrd: " + str(self.initrd) print " nfs_server: " + str(self.nfs_server) print " nfs_dir: " + str(self.nfs_dir) print " nfs_mount: " + str(self.nfs_mount) if self.unattended_file and self.floppy_img is not None: self.create_boot_floppy() if self.medium == "cdrom": if self.tftp_root: self.setup_pxe_boot() elif self.medium == "url": self.setup_url() elif self.medium == "nfs": self.setup_nfs() else: raise SetupError("Unexpected installation method %s" % self.medium) | def setup(self): print "Starting unattended install setup" | e61f7fe7afa5590c4f5dc8e0d1fd40bf590176a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/e61f7fe7afa5590c4f5dc8e0d1fd40bf590176a0/unattended.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
4672,
1172,
315,
11715,
640,
270,
8140,
3799,
3875,
6,
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,
3875,
12,
2890,
4672,
1172,
315,
11715,
640,
270,
8140,
3799,
3875,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
first_name = randstr(10) last_name = randstr(20) email = randstr(10, letters + digits) + "@" + randhostname() bio = randstr(50) | first_name = randstr(128) last_name = randstr(128) email = randstr(119, letters + digits) + "@" + randhostname() bio = randstr(254) | def unicmp(a, b, encoding = "utf-8"): """ When connected directly to the DB, values are returned as raw 8-bit strings that may need to be decoded (as UTF-8 by default) in order to compare them against expected Python Unicode strings. """ is8bit = re.compile("[\x80-\xff]").search if isinstance(a, str) and is8bit(a): a = unicode(a, encoding) if isinstance(b, str) and is8bit(b): b = unicode(b, encoding) return a == b | 8cecf35d2c665fe2ac2e0982da46d39e3fc05b42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/8cecf35d2c665fe2ac2e0982da46d39e3fc05b42/Test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
335,
1291,
12,
69,
16,
324,
16,
2688,
273,
315,
3158,
17,
28,
6,
4672,
3536,
5203,
5840,
5122,
358,
326,
2383,
16,
924,
854,
2106,
487,
1831,
1725,
17,
3682,
2064,
716,
2026,
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,
640,
335,
1291,
12,
69,
16,
324,
16,
2688,
273,
315,
3158,
17,
28,
6,
4672,
3536,
5203,
5840,
5122,
358,
326,
2383,
16,
924,
854,
2106,
487,
1831,
1725,
17,
3682,
2064,
716,
2026,
16... |
items = tuple(self._catalog.uids.items()) for path, i in items: | items = tuple(self._catalog.uids.items()) for path, i in items: | def manage_catalogReindex(self, REQUEST): """ iterate over the whole catalog, deleting inexistent references and refreshing objects""" items = tuple(self._catalog.uids.items()) | cfd505d9a2182b9077ddeae6401e006e7c7152ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cfd505d9a2182b9077ddeae6401e006e7c7152ca/ZCatalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
7199,
426,
1615,
12,
2890,
16,
12492,
4672,
3536,
7401,
1879,
326,
7339,
6222,
16,
12993,
316,
19041,
5351,
471,
4460,
310,
2184,
8395,
1516,
273,
3193,
12,
2890,
6315,
7199,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
7199,
426,
1615,
12,
2890,
16,
12492,
4672,
3536,
7401,
1879,
326,
7339,
6222,
16,
12993,
316,
19041,
5351,
471,
4460,
310,
2184,
8395,
1516,
273,
3193,
12,
2890,
6315,
7199,
... |
print "Page %s is a redirect; skipping." % page.aslink() | pywikibot.output(u"Page %s is a redirect; skipping." % page.aslink()) | def run(self): for page in self.generator: try: text = page.get(get_redirect = self.touch_redirects) # convert ISBN numbers page.put(text) except pywikibot.NoPage: print "Page %s does not exist?!" % page.aslink() except pywikibot.IsRedirectPage: print "Page %s is a redirect; skipping." % page.aslink() except pywikibot.LockedPage: print "Page %s is locked?!" % page.aslink() | 5c61ca8cdbb4c3d2cfa7ba78a9d4f96c7ae308cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/5c61ca8cdbb4c3d2cfa7ba78a9d4f96c7ae308cd/isbn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
364,
1363,
316,
365,
18,
8812,
30,
775,
30,
977,
273,
1363,
18,
588,
12,
588,
67,
7590,
273,
365,
18,
14084,
67,
22715,
13,
468,
1765,
4437,
15388,
5600,
1363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
364,
1363,
316,
365,
18,
8812,
30,
775,
30,
977,
273,
1363,
18,
588,
12,
588,
67,
7590,
273,
365,
18,
14084,
67,
22715,
13,
468,
1765,
4437,
15388,
5600,
1363,
... |
print "Nick is okay" | LOG.debug( "Nick is okay" ) | def checkIncomingNick(self, n): try: inick = dc_to_irc(n.nick) | 69835a631879faf4f1d962b8382f2deb518e961d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8524/69835a631879faf4f1d962b8382f2deb518e961d/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,
... |
@classmethod def to_mol_seq(cls, elem): | def mol_seq(self, elem): | def to_id(cls, elem): provider = elem.get('provider') or elem.get('type') return Tree.Id(elem.text.strip(), provider) | 5f38465441061de22d67bc9df2281f70d7ac37ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/5f38465441061de22d67bc9df2281f70d7ac37ce/PhyloXMLIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
350,
12,
6429,
16,
3659,
4672,
2893,
273,
3659,
18,
588,
2668,
6778,
6134,
578,
3659,
18,
588,
2668,
723,
6134,
327,
4902,
18,
548,
12,
10037,
18,
955,
18,
6406,
9334,
2893,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
350,
12,
6429,
16,
3659,
4672,
2893,
273,
3659,
18,
588,
2668,
6778,
6134,
578,
3659,
18,
588,
2668,
723,
6134,
327,
4902,
18,
548,
12,
10037,
18,
955,
18,
6406,
9334,
2893,
... |
def create_paragraph(pdf_stylesheet, element, content): """ """ | def create_paragraph(pdf_stylesheet, alias_style, element, content): """ Create a reportlab paragraph widget. """ | def create_paragraph(pdf_stylesheet, element, content): """ """ parent_style = 'Normal' style_attr = {} content = ''.join(content) bulletText = None for key, attr_value in element[1].iteritems(): key = key[1] if key == 'style': parent_style = attr_value elif key == 'bulletText': bulletText = attr_value else: if key == 'alignment': attr_value = __tab_para_alignment.get(attr_value, __tab_para_alignment['left']) elif key in ['leftIndent', 'rightIndent']: attr_value = get_value_reportlab(attr_value) style_attr[key] = attr_value if not pdf_stylesheet.has_key(parent_style): parent_style = 'Normal' style = ParagraphStyle('', parent=pdf_stylesheet[parent_style], **style_attr) return Paragraph(content, style, bulletText) | 51b02e012792ad1fcdef1300580c1d6a58548c1f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/51b02e012792ad1fcdef1300580c1d6a58548c1f/rml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
22445,
12,
7699,
67,
19403,
16,
2308,
67,
4060,
16,
930,
16,
913,
4672,
3536,
1788,
279,
2605,
7411,
10190,
3604,
18,
3536,
225,
982,
67,
4060,
273,
296,
5506,
11,
2154,
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,
752,
67,
22445,
12,
7699,
67,
19403,
16,
2308,
67,
4060,
16,
930,
16,
913,
4672,
3536,
1788,
279,
2605,
7411,
10190,
3604,
18,
3536,
225,
982,
67,
4060,
273,
296,
5506,
11,
2154,
67,
... |
server = ServerProxy("http://betty.userland.com") | server = ServerProxy("http://time.xmlrpc.com/RPC2") | def __getattr__(self, name): # magic method dispatcher return _Method(self.__request, name) | 966b7db4480744da47be1adf4595a30cbad7e3b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/966b7db4480744da47be1adf4595a30cbad7e3b8/xmlrpclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
468,
8146,
707,
7393,
327,
389,
1305,
12,
2890,
16186,
2293,
16,
508,
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,
0,
0,
0,
0,
0,
0,
0,
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,
588,
1747,
972,
12,
2890,
16,
508,
4672,
468,
8146,
707,
7393,
327,
389,
1305,
12,
2890,
16186,
2293,
16,
508,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise TypeError('BAD STRIDES', a.strides, b.strides) | e = TypeError('Stride mismatch', (a.shape, b.shape, a.strides, b.strides, str(op))) if raise_on_err: raise e else: print >> sys.stderr, 'WARNING:', e | def _check_strides_match(a, b): try: strides_eq = a.strides == b.strides except: return # no strides if not strides_eq: raise TypeError('BAD STRIDES', a.strides, b.strides) | e7d32ce644f2d1998f145b0600e928924abfeb24 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/e7d32ce644f2d1998f145b0600e928924abfeb24/debugmode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
701,
4369,
67,
1916,
12,
69,
16,
324,
4672,
775,
30,
21626,
67,
11253,
273,
279,
18,
701,
4369,
422,
324,
18,
701,
4369,
1335,
30,
327,
468,
1158,
21626,
225,
309,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
701,
4369,
67,
1916,
12,
69,
16,
324,
4672,
775,
30,
21626,
67,
11253,
273,
279,
18,
701,
4369,
422,
324,
18,
701,
4369,
1335,
30,
327,
468,
1158,
21626,
225,
309,
486... |
if dY>=0 and dX>=0: | if dY>=0 and dX>0: | def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->(1,0) is angle 0 radians, then we rotate counter clockwise from there... What is returned in a three element tuple (numsides,style,angle) which can be put into a plot call via marker=X as a **kwarg """ if A == None or B == None: return (3,0,0) if( A != type(tuple()) and len(A) != 2) \ or \ ( B != type(tuple()) and len(B) != 2): return (3,0,0) # # Calculate orientation of triangle # Ang = arcsin(dY/dX) dY=float(B[-1]-A[-1]) dX=float(B[0]-A[0]) if dY>=0 and dX>=0: myAngle=arctan(dY/dX) elif dY>=0 and dX<0: myAngle=pi-arctan(dY/dX) elif dY<0 and dX<0: myAngle=arctan(dY/dX)+pi elif dY<0 and dX>0: myAngle=(2.0*pi)-arctan(dY/dX) else: myAngle=0 return (3,0,myAngle) | 71dea064b0b5c449f3e842ab7b29e96c4c6c42a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/71dea064b0b5c449f3e842ab7b29e96c4c6c42a0/followupPDSurface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14644,
4926,
12,
37,
33,
7036,
16,
38,
33,
7036,
4672,
3536,
15510,
87,
2795,
5901,
5574,
487,
10384,
261,
92,
21,
16,
93,
21,
13,
471,
261,
92,
22,
16,
93,
22,
13,
2777,
9697,
333... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14644,
4926,
12,
37,
33,
7036,
16,
38,
33,
7036,
4672,
3536,
15510,
87,
2795,
5901,
5574,
487,
10384,
261,
92,
21,
16,
93,
21,
13,
471,
261,
92,
22,
16,
93,
22,
13,
2777,
9697,
333... |
clause = '%s title like "%%%s%%"' % (clause, searchstr) | if exact_match: clause = '%s title="%s"' % (clause, searchstr) else: clause = '%s title like "%%%s%%"' % (clause, searchstr) | def search(self, searchstr, by_chan=None, search_title=True, search_subtitle=True, search_description=True): """ Return a list of programs with a title similar to the given parameter. If by_chan is given, it has to be a valid channel id and only programs from this channel will be returned. Result is a list of Programs. This function will only return programs with a stop time greater the current time. """ if not (search_title or search_subtitle or search_description): return [] | 4de8c80486a5c6d0ad8e61e5774661b67f5d5e0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/4de8c80486a5c6d0ad8e61e5774661b67f5d5e0f/guide.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
1623,
701,
16,
635,
67,
7472,
33,
7036,
16,
1623,
67,
2649,
33,
5510,
16,
1623,
67,
1717,
2649,
33,
5510,
16,
1623,
67,
3384,
33,
5510,
4672,
3536,
2000,
279,
666... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
1623,
701,
16,
635,
67,
7472,
33,
7036,
16,
1623,
67,
2649,
33,
5510,
16,
1623,
67,
1717,
2649,
33,
5510,
16,
1623,
67,
3384,
33,
5510,
4672,
3536,
2000,
279,
666... |
opcodes = diff2._get_opcodes(['A', 'B b'], ['A', 'B B'], | opcodes = Diff._get_opcodes(['A', 'B b'], ['A', 'B B'], | def test_space_and_case_changes(self): opcodes = diff2._get_opcodes(['A', 'B b'], ['A', 'B B'], ignore_case=0, ignore_space_changes=0) self.assertEqual(('equal', 0, 1, 0, 1), opcodes.next()) self.assertEqual(('replace', 1, 2, 1, 2), opcodes.next()) | 38e384d376102113c1e3a6caf204ad89dc23aa61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/38e384d376102113c1e3a6caf204ad89dc23aa61/diff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2981,
67,
464,
67,
3593,
67,
6329,
12,
2890,
4672,
1061,
7000,
273,
13008,
6315,
588,
67,
556,
7000,
12,
3292,
37,
2187,
296,
38,
324,
17337,
10228,
37,
2187,
296,
38,
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,
1842,
67,
2981,
67,
464,
67,
3593,
67,
6329,
12,
2890,
4672,
1061,
7000,
273,
13008,
6315,
588,
67,
556,
7000,
12,
3292,
37,
2187,
296,
38,
324,
17337,
10228,
37,
2187,
296,
38,
225,
... |
self.assertEquals(len(l), size) self.assertEquals(l.count(1), size // 5) | self.assertEquals(len(l), size * 5) self.assertEquals(l.count(1), size) | def test_sort(self, size): l = [1, 2, 3, 4, 5] * (size // 5) l.sort() self.assertEquals(len(l), size) self.assertEquals(l.count(1), size // 5) self.assertEquals(l[:10], [1] * 10) self.assertEquals(l[-10:], [5] * 10) | 636d1adc496d164c344c7505fdccb652d190f169 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/636d1adc496d164c344c7505fdccb652d190f169/test_bigmem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3804,
12,
2890,
16,
963,
4672,
328,
273,
306,
21,
16,
576,
16,
890,
16,
1059,
16,
1381,
65,
380,
261,
1467,
368,
1381,
13,
328,
18,
3804,
1435,
365,
18,
11231,
8867,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3804,
12,
2890,
16,
963,
4672,
328,
273,
306,
21,
16,
576,
16,
890,
16,
1059,
16,
1381,
65,
380,
261,
1467,
368,
1381,
13,
328,
18,
3804,
1435,
365,
18,
11231,
8867,
12,
... |
if machine == 'ppc': | if machine in ('ppc', 'Power Macintosh'): | def _mac_ver_xml(): fn = '/System/Library/CoreServices/SystemVersion.plist' if not os.path.exists(fn): return None try: import plistlib except ImportError: return None pl = plistlib.readPlist(fn) release = pl['ProductVersion'] versioninfo=('', '', '') machine = os.uname()[4] if machine == 'ppc': # for compatibility with the gestalt based code machine = 'PowerPC' return release,versioninfo,machine | a31ef123875f2fc76ba287545b1e74253d3cad40 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/a31ef123875f2fc76ba287545b1e74253d3cad40/platform.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5821,
67,
502,
67,
2902,
13332,
2295,
273,
1173,
3163,
19,
9313,
19,
4670,
5676,
19,
3163,
1444,
18,
17842,
11,
309,
486,
1140,
18,
803,
18,
1808,
12,
4293,
4672,
327,
599,
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,
389,
5821,
67,
502,
67,
2902,
13332,
2295,
273,
1173,
3163,
19,
9313,
19,
4670,
5676,
19,
3163,
1444,
18,
17842,
11,
309,
486,
1140,
18,
803,
18,
1808,
12,
4293,
4672,
327,
599,
225,
... |
first_frame=df.nframes-1, num_frames=1) sch0 = schedule[0] | first_frame=df.nframes-1, num_frames=1)[0] | def playSong(key): client.connect(mpdHost, mpdPort) client.password(mpdPass) songs = songLookup[key] song = songs[random.randint(0, len(songs)-1)] pl = client.playlist() if song['file'] in pl: client.play(pl.index(song['file'])) else: client.add(song['file']) client.play(len(pl)) #length one higher now, with added song client.close() client.disconnect() | 53efdec748405816d41c7667e1b1f87d1c4a08dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2109/53efdec748405816d41c7667e1b1f87d1c4a08dc/singalong.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
55,
932,
12,
856,
4672,
1004,
18,
3612,
12,
1291,
72,
2594,
16,
6749,
72,
2617,
13,
1004,
18,
3664,
12,
1291,
72,
6433,
13,
272,
7260,
273,
17180,
6609,
63,
856,
65,
17180,
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,
6599,
55,
932,
12,
856,
4672,
1004,
18,
3612,
12,
1291,
72,
2594,
16,
6749,
72,
2617,
13,
1004,
18,
3664,
12,
1291,
72,
6433,
13,
272,
7260,
273,
17180,
6609,
63,
856,
65,
17180,
273... |
[0, 1, 2, 3, 4] :: | [0, 3, 6, 7, 2, 5, 1, 4] sage: list(D.depth_first_search(0, ignore_direction=True)) [0, 7, 6, 3, 5, 2, 1, 4] You can specify a maximum distance in which to search. A distance of zero returns the ``start`` vertices:: sage: D = DiGraph( { 0: [1,2,3], 1: [4,5], 2: [5], 3: [6], 5: [7], 6: [7], 7: [0]}) sage: list(D.depth_first_search(0,distance=0)) [0] sage: list(D.depth_first_search(0,distance=1)) [0, 3, 2, 1] Multiple starting vertices can be specified in a list:: sage: D = DiGraph( { 0: [1,2,3], 1: [4,5], 2: [5], 3: [6], 5: [7], 6: [7], 7: [0]}) sage: list(D.depth_first_search([0])) [0, 3, 6, 7, 2, 5, 1, 4] sage: list(D.depth_first_search([0,6])) [0, 3, 6, 7, 2, 5, 1, 4] sage: list(D.depth_first_search([0,6],distance=0)) [0, 6] sage: list(D.depth_first_search([0,6],distance=1)) [0, 3, 2, 1, 6, 7] sage: list(D.depth_first_search(6,ignore_direction=True,distance=2)) [6, 7, 5, 0, 3] More generally, you can specify a ``neighbors`` function. For example, you can traverse the graph backwards by setting ``neighbors`` to be the :meth:`.predecessor` function of the graph:: sage: D = DiGraph( { 0: [1,2,3], 1: [4,5], 2: [5], 3: [6], 5: [7], 6: [7], 7: [0]}) sage: list(D.depth_first_search(5,neighbors=D.predecessors, distance=2)) [5, 2, 0, 1] sage: list(D.depth_first_search(5,neighbors=D.successors, distance=2)) [5, 7, 0] sage: list(D.depth_first_search(5,neighbors=D.neighbors, distance=2)) [5, 7, 6, 0, 2, 1, 4] TESTS:: | def depth_first_search(self, u, ignore_direction=False): """ Returns an iterator over vertices in a depth-first ordering. INPUT: - ``u`` - vertex at which to start search - ``ignore_direction`` - (default False) only applies to directed graphs. If True, searches across edges in either direction. EXAMPLES:: sage: G = Graph( { 0: {1: 1}, 1: {2: 1}, 2: {3: 1}, 3: {4: 2}, 4: {0: 2} } ) sage: list(G.breadth_first_search(0)) [0, 1, 4, 2, 3] sage: list(G.depth_first_search(0)) [0, 4, 3, 2, 1] :: sage: D = DiGraph( { 0: {1: 1}, 1: {2: 1}, 2: {3: 1}, 3: {4: 2}, 4: {0: 2} } ) sage: list(D.breadth_first_search(0)) [0, 1, 2, 3, 4] sage: list(D.depth_first_search(0)) [0, 1, 2, 3, 4] :: sage: D = DiGraph({1:[0], 2:[0]}) sage: list(D.depth_first_search(0)) [0] sage: list(D.depth_first_search(0, ignore_direction=True)) [0, 2, 1] """ # This function is straight from an old version of networkx if not self._directed or ignore_direction: neighbors=self.neighbor_iterator else: neighbors=self.successor_iterator # nlist=[] # list of nodes in a DFS preorder seen={} # nodes seen queue=[u] # use as LIFO queue seen[u]=True while queue: v=queue.pop() # nlist.append(v) yield v for w in neighbors(v): if w not in seen: seen[w]=True queue.append(w) | c8bfb483048a8a540eb440247e6b469e9aaf39b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/c8bfb483048a8a540eb440247e6b469e9aaf39b0/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3598,
67,
3645,
67,
3072,
12,
2890,
16,
582,
16,
2305,
67,
9855,
33,
8381,
4672,
3536,
2860,
392,
2775,
1879,
6928,
316,
279,
3598,
17,
3645,
9543,
18,
225,
12943,
30,
282,
300,
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,
3598,
67,
3645,
67,
3072,
12,
2890,
16,
582,
16,
2305,
67,
9855,
33,
8381,
4672,
3536,
2860,
392,
2775,
1879,
6928,
316,
279,
3598,
17,
3645,
9543,
18,
225,
12943,
30,
282,
300,
225,
... |
if config.usage.show_infobar_on_zap.value: self.doShow() | def subserviceSelected(self, service): del self.bouquets if not service is None: if isinstance(service[1], str): if service[1] == "quickzap": from Screens.SubservicesQuickzap import SubservicesQuickzap self.session.open(SubservicesQuickzap, service[2]) else: self["SubserviceQuickzapAction"].setEnabled(True) if config.usage.show_infobar_on_zap.value: self.doShow() self.session.nav.playService(service[1]) | 8ed4d48a8dc5cf0a399ae147b34f845a15fb94d4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/8ed4d48a8dc5cf0a399ae147b34f845a15fb94d4/InfoBarGenerics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
720,
3278,
7416,
12,
2890,
16,
1156,
4672,
1464,
365,
18,
16818,
372,
2413,
309,
486,
1156,
353,
599,
30,
309,
1549,
12,
3278,
63,
21,
6487,
609,
4672,
309,
1156,
63,
21,
65,
422,
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,
720,
3278,
7416,
12,
2890,
16,
1156,
4672,
1464,
365,
18,
16818,
372,
2413,
309,
486,
1156,
353,
599,
30,
309,
1549,
12,
3278,
63,
21,
6487,
609,
4672,
309,
1156,
63,
21,
65,
422,
31... | |
self.assertEquals('653645', obj.issn) | self.assertEquals('653645', obj.isbn) | def testFormat(self): portal = self.layer['portal'] request = self.layer['request'] setRoles(portal, TEST_USER_NAME, ['Manager']) reviews = portal.reviews reviews.invokeFactory('Publication', id='pub', title='pub') publication = reviews.pub publication.invokeFactory('Volume', id='vol', title='vol') vol = publication.vol vol.invokeFactory('Issue', id='issue', title='issue') issue = vol.issue pt = getToolByName(portal, 'portal_types') issueType = pt.getTypeInfo(issue) # We are lazy here, allowing an issue to contain all documents issueType.filter_content_types = False | 210449271edd39a39aa8b4fde2b3d84539c4b5a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10562/210449271edd39a39aa8b4fde2b3d84539c4b5a5/testExcelImport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1630,
12,
2890,
4672,
11899,
273,
365,
18,
6363,
3292,
24386,
3546,
590,
273,
365,
18,
6363,
3292,
2293,
3546,
444,
6898,
12,
24386,
16,
22130,
67,
4714,
67,
1985,
16,
10228,
1318,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1630,
12,
2890,
4672,
11899,
273,
365,
18,
6363,
3292,
24386,
3546,
590,
273,
365,
18,
6363,
3292,
2293,
3546,
444,
6898,
12,
24386,
16,
22130,
67,
4714,
67,
1985,
16,
10228,
1318,... |
elif data0 == 99: | elif data0 == MAGIC_FLOAT: | def _UnpackOneTerm(data): dataLen = len(data) if len(data) == 0: return (None, data) data0 = ord(data[0]) if data0 == 97: # small_integer_ext if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) return (ErlNumber(n), data[2:]) elif data0 == 98: # integer_ext if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) return (ErlNumber(i), data[5:]) elif data0 == 99: # float_ext if dataLen < 32: return (None, data) floatData = data[1:32] try: nullIndex = string.index(floatData, chr(0)) floatStr = floatData[0:nullIndex] except ValueError: floatStr = floatData f = string.atof(floatStr) return (ErlNumber(f), data[32:]) elif data0 == 100: # atom_ext if dataLen < 3: return (None, data) atomLen = _ReadInt2(data[1:3]) if dataLen < 3 + atomLen: return (None, data) atomText = data[3:3 + atomLen] return (ErlAtom(atomText), data[3 + atomLen:]) elif data0 == 101: # reference_ext (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlRef(node, id, creation), remainingData[5:]) elif data0 == 102: # port_ext (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlPort(node, id, creation), remainingData[5:]) elif data0 == 103: # pid_ext (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 9: return (None, data) id = _ReadId(remainingData[0:4], 15) serial = _ReadInt4(remainingData[4:8]) creation = _ReadCreation(remainingData[8]) return (ErlPid(node, id, serial, creation), remainingData[9:]) elif data0 == 104: # small_tuple_ext if dataLen < 2: return (None, data) arity = _ReadInt1(data[1]) (elements, remainingData) = _UnpackTermSeq(arity, data[2:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == 105: # large_tuple_ext if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == 106: # nil_ext: return (ErlList([]), data[1:]) elif data0 == 107: # string_ext if dataLen < 3: return (None, data) strlen = _ReadInt2(data[1:3]) if dataLen < 3 + strlen: return (None, data) s = data[3:3 + strlen] return (ErlString(s), data[3 + strlen:]) elif data0 == 108: # list_ext if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlList(elements), remainingData) elif data0 == 109: # binary_ext if dataLen < 5: return (None, data) binlen = _ReadInt4(data[1:5]) if dataLen < 5 + binlen: return (None, data) s = data[5:5 + binlen] return (ErlBinary(s), data[5 + binlen:]) elif data0 == 110: # small_big_ext if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) if dataLen < 2 + 1 + n: return (None, data) sign = _ReadInt1(data[2]) bignum = 0L for i in range(n): d = _ReadInt1(data[3 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[3 + n:]) elif data0 == 111: # large_big_ext if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) if dataLen < 5 + 1 + n: return (None, data) sign = _ReadInt1(data[5]) bignum = 0L for i in range(n): d = _ReadInt1(data[6 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[6 + n:]) elif data0 == 78: # new_cache if dataLen < 4: return (None, data) index = _ReadInt1(data[1]) atomLen = _ReadInt2(data[2:4]) if dataLen < 4 + atomLen: return (None, data) atomText = data[4:4 + atomLen] return (ErlAtom(atomText, cache=index), data[4 + atomLen:]) elif data0 == 67: # cached_atom if dataLen < 2: return (None, data) index = _ReadInt1(data[1]) return (ErlAtom(None, cache=index), data[2:]) elif data0 == 114: # new_reference_ext if dataLen < 3: return (None, data) idLen = _ReadInt2(data[1:3]) (node, remainingData) = _UnpackOneTerm(data[3:]) if node == None: return (None, data) nprim = 4 * idLen if len(remainingData) < 1 + nprim: return (None, data) creation = _ReadCreation(remainingData[0]) remainingData = remainingData[1:] id0 = _ReadId(remainingData[0:4]) id = [id0] remainingData = remainingData[4:] for i in idLen: i = _ReadInt4(remainingData[0:4]) remainingData = remainingData[4:] return (ErlRef(node, creation, id), remainingData) elif data0 == 117: # fun_ext if dataLen < 5: return (None, data) freevarsLen = _ReadInt4(data[1:5]) (pid, remainingData1) = _UnpackOneTerm(data[5:]) if pid == None: return (None, data) (module, remainingData2) = _UnpackOneTerm(remainingData1) if module == None: return (None, data) (index, remainingData3) = _UnpackOneTerm(remainingData2) if index == None: return (None, data) (uniq, remainingData4) = _UnpackOneTerm(remainingData3) if uniq == None: return (None, data) (freeVars, remainingData5) = _UnpackTermSeq(freevarsLen, remainingData4) if freeVars == None: return (None, data) return (ErlFun(pid, module, index, uniq, freeVars), remainingData5) else: print "Bad tag %s" % `data0` return (None, data) | 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,
23649,
3335,
4065,
12,
892,
4672,
501,
2891,
273,
562,
12,
892,
13,
225,
309,
562,
12,
892,
13,
422,
374,
30,
327,
261,
7036,
16,
501,
13,
225,
501,
20,
273,
4642,
12,
892,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23649,
3335,
4065,
12,
892,
4672,
501,
2891,
273,
562,
12,
892,
13,
225,
309,
562,
12,
892,
13,
422,
374,
30,
327,
261,
7036,
16,
501,
13,
225,
501,
20,
273,
4642,
12,
892,
63... |
self._plugins = [self._server_plugin, self._ll_plugin] | self._plugins = [] debug_flags = set(environ.get('PRESENCE_SERVICE_DEBUG', '').split(',')) if 'disable-gabble' not in debug_flags: self._plugins.append(self._server_plugin) if 'disable-salut' not in debug_flags: self._plugins.append(self._ll_plugin) | def __init__(self): self._next_object_id = 0 | c527ed1f9453d09c99e91667cf110672f1bc583c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3113/c527ed1f9453d09c99e91667cf110672f1bc583c/presenceservice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
6315,
4285,
67,
1612,
67,
350,
273,
374,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
6315,
4285,
67,
1612,
67,
350,
273,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
""" Convert spike trains to theirs time functions. | """ Convert spike trains to theirs time functions. | def spikes_to_signal(fs, spike_trains, tmax=None): """ Convert spike trains to theirs time functions. fs: sampling frequency (Hz) spike_trains: trains of spikes to be converted (ms) tmax: length of the output signal (ms) return: time signal >>> spikes_to_signal(10, [np.array([100]), np.array([200, 300])]) array([[ 0., 0.], [ 1., 0.], [ 0., 1.], [ 0., 1.]]) """ if tmax == None: tmax = max( [max(train) for train in spike_trains] ) max_len = np.ceil( tmax * fs / 1000 ) + 1 signals = np.zeros( (max_len, len(spike_trains)) ) for i,train in enumerate(spike_trains): s = spikes_to_signal_1D(fs, train, tmax) signals[:,i] = s return signals | 058fc682a7d8f8cb34f4db6a445bc613fa8db0f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7039/058fc682a7d8f8cb34f4db6a445bc613fa8db0f0/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1694,
25235,
67,
869,
67,
10420,
12,
2556,
16,
28883,
67,
313,
4167,
16,
28986,
33,
7036,
4672,
3536,
4037,
28883,
1284,
2679,
358,
3675,
87,
813,
4186,
18,
225,
2662,
30,
11558,
8670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1694,
25235,
67,
869,
67,
10420,
12,
2556,
16,
28883,
67,
313,
4167,
16,
28986,
33,
7036,
4672,
3536,
4037,
28883,
1284,
2679,
358,
3675,
87,
813,
4186,
18,
225,
2662,
30,
11558,
8670,
... |
print mkfs_cmd | def mkfs(self, fstype=None, args='', record=True): """ Format a partition to filesystem type | 662f76bda53f3b39610e52556ebe4e8573de519d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/662f76bda53f3b39610e52556ebe4e8573de519d/base_partition.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
2556,
12,
2890,
16,
20223,
388,
33,
7036,
16,
833,
2218,
2187,
1409,
33,
5510,
4672,
3536,
4077,
279,
3590,
358,
6496,
618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
2556,
12,
2890,
16,
20223,
388,
33,
7036,
16,
833,
2218,
2187,
1409,
33,
5510,
4672,
3536,
4077,
279,
3590,
358,
6496,
618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
(undersized or oversized or sia_uri_changed or ca_detail.latest_ca_cert != cert_map[ski]): ca_detail.update(gctx, parent, self, rc, cert_map[ski], undersized, oversized, sia_uri_changed, | (undersized or oversized or sia_uri_changed or ca_detail.latest_ca_cert != cert_map[ski].cert): ca_detail.update(gctx, parent, self, rc, cert_map[ski].cert, undersized, oversized, sia_uri_changed, | def check_for_updates(self, gctx, parent, rc): """Parent has signaled continued existance of a resource class we already knew about, so we need to check for an updated certificate, changes in resource coverage, etc. | 22a68a4f2cc5ce6528b322b020c65ad539077af2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/119/22a68a4f2cc5ce6528b322b020c65ad539077af2/sql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1884,
67,
14703,
12,
2890,
16,
314,
5900,
16,
982,
16,
4519,
4672,
3536,
3054,
711,
4277,
329,
17545,
5957,
1005,
1359,
434,
279,
1058,
667,
732,
1818,
417,
2704,
2973,
16,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1884,
67,
14703,
12,
2890,
16,
314,
5900,
16,
982,
16,
4519,
4672,
3536,
3054,
711,
4277,
329,
17545,
5957,
1005,
1359,
434,
279,
1058,
667,
732,
1818,
417,
2704,
2973,
16,
14... |
join_conditions = ' '.join([ 'JOIN experiment, experiment_summary, experiment_map', 'ON experiment.experiment_id == experiment_summary.experiment_id', 'AND experiment_summary.experiment_summ_id == experiment_map.experiment_summ_id', 'AND experiment_map.coinc_event_id == coinc_inspiral.coinc_event_id' ]) return join_conditions | return """ JOIN experiment, experiment_summary, experiment_map ON ( experiment.experiment_id == experiment_summary.experiment_id AND experiment_summary.experiment_summ_id == experiment_map.experiment_summ_id AND experiment_map.coinc_event_id == coinc_inspiral.coinc_event_id )""" | def join_experiment_tables_to_coinc_inspiral(): """ Writes JOIN string to join the experiment, experiment_summary, and experiment_map table to the coinc_inspiral table. NOTE: Should only use when querying the coinc_inspiral table (i.e., the only table listed in the FROM statement is the coinc_inspiral). """ join_conditions = ' '.join([ 'JOIN experiment, experiment_summary, experiment_map', 'ON experiment.experiment_id == experiment_summary.experiment_id', 'AND experiment_summary.experiment_summ_id == experiment_map.experiment_summ_id', 'AND experiment_map.coinc_event_id == coinc_inspiral.coinc_event_id' ]) return join_conditions | 562169c874c243a11ae23d004e13cc0c8cbdf521 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/562169c874c243a11ae23d004e13cc0c8cbdf521/ligolw_sqlutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
67,
18142,
67,
9373,
67,
869,
67,
12645,
71,
67,
267,
1752,
481,
287,
13332,
3536,
30053,
7645,
533,
358,
1233,
326,
8724,
16,
8724,
67,
7687,
16,
471,
8724,
67,
1458,
1014,
358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
67,
18142,
67,
9373,
67,
869,
67,
12645,
71,
67,
267,
1752,
481,
287,
13332,
3536,
30053,
7645,
533,
358,
1233,
326,
8724,
16,
8724,
67,
7687,
16,
471,
8724,
67,
1458,
1014,
358,... |
raise "\nERROR: In Order To Append/Insert Controls You Have To Use The Style TR_HAS_VARIABLE_ROW_HEIGHT" | raise Exception("\nERROR: In Order To Append/Insert Controls You Have To Use The Style TR_HAS_VARIABLE_ROW_HEIGHT") | def InsertItemByIndex(self, parentId, before, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None): """Auxiliary function to cope with the C++ hideous multifunction.""" | e1463b9df091ad0e9d76292564d4389882b28de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/e1463b9df091ad0e9d76292564d4389882b28de1/customtreectrl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8040,
1180,
21268,
12,
2890,
16,
11582,
16,
1865,
16,
977,
16,
5691,
67,
723,
33,
20,
16,
341,
4880,
33,
7036,
16,
1316,
29711,
21,
16,
357,
2040,
29711,
21,
16,
501,
33,
7036,
4672,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8040,
1180,
21268,
12,
2890,
16,
11582,
16,
1865,
16,
977,
16,
5691,
67,
723,
33,
20,
16,
341,
4880,
33,
7036,
16,
1316,
29711,
21,
16,
357,
2040,
29711,
21,
16,
501,
33,
7036,
4672,... |
referer="%s/yourbaskets.py/display" % weburl, | referer="%s/yourbaskets/display" % weburl, | def perform_modifybasket(req, userID, callback='yes', confirm=0): """modify email and password of an account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="2"></a>2. Modify baskets.   <small>[<a title="See guide" href="%s/admin/webaccess/guide.html#4">?</a>]</small>""" % weburl res = run_sql("SELECT id, email, password FROM user WHERE id=%s" % userID) output = "" if res: text = """To modify the baskets for this account, you have to login as the user.""" output += createhiddenform(action="%s/youraccount/login?" % sweburl, text=text, p_email=res[0][1], p_pw=res[0][2], referer="%s/yourbaskets.py/display" % weburl, button="Login") output += "Remember that you will be logged out as the current user." #baskets = run_sql("SELECT basket.id, basket.name, basket.public FROM basket, user_basket WHERE id_user=%s and user_basket.id_basket=basket.id" % userID) #output += "<table><tr>" #for (id, name, public) in baskets: # output += "<tr><td>%s<br>Public: %s</td></tr>" % (name, (public=="y" and "Yes" or "No")) # basket_records = run_sql("SELECT id_record, nb_order FROM basket_record WHERE id_basket=%s" % id) # for (id_record, nb_order) in basket_records: # output += "<tr><td></td><td>" # output += print_record(id_record) # output += "</td></tr>" # #output += "</tr></table>" else: output += '<b><span class="info">The account id given does not exist.</span></b>' try: body = [output, extra] except NameError: body = [output] if callback: return perform_editaccount(req, userID, mtype='perform_modifybasket', content=addadminbox(subtitle, body), callback='yes') else: return addadminbox(subtitle, body) | eb41e0138f797721ce4525751eba5816caba74f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1931/eb41e0138f797721ce4525751eba5816caba74f5/webaccessadmin_lib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
17042,
26219,
12,
3658,
16,
16299,
16,
1348,
2218,
9707,
2187,
6932,
33,
20,
4672,
3536,
17042,
2699,
471,
2201,
434,
392,
2236,
8395,
225,
261,
1944,
67,
710,
16,
1357,
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,
3073,
67,
17042,
26219,
12,
3658,
16,
16299,
16,
1348,
2218,
9707,
2187,
6932,
33,
20,
4672,
3536,
17042,
2699,
471,
2201,
434,
392,
2236,
8395,
225,
261,
1944,
67,
710,
16,
1357,
67,
... |
msg['From'] = tools.ustr(self.server[serverid]['from_email']) | if context.get('email_from', self.server[serverid]['from_email']): msg['From'] = context.get('email_from', self.server[serverid]['from_email']) elif tools.config['email_from']: msg['From'] = tools.config['email_from'] else: raise osv.except_osv(_('Error'), _("Please specify server option --email-from !")) | def test_verify_email(self, cr, uid, ids, toemail, test=False, code=False): serverid = ids[0] self.open_connection(cr, uid, ids, serverid) key = False if test and self.server[serverid]['state'] == 'confirm': body = self.server[serverid]['test_email'] or '' else: body = self.server[serverid]['verify_email'] or '' #ignore the code key = self.gen_private_key(cr, uid, ids) #md5(time.strftime('%Y-%m-%d %H:%M:%S') + toemail).hexdigest(); body = body.replace("__code__", key) user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid])[0] body = body.replace("__user__", user.name) if len(body.strip()) <= 0: raise osv.except_osv(_('Message Error!'), _('Please configure Email Server Messages [Verification / Test]')) try: msg = MIMEText(body.encode('utf8') or '',_subtype='plain',_charset='utf-8') except: msg = MIMEText(body or '',_subtype='plain',_charset='utf-8') if not test and not self.server[serverid]['state'] == 'confirm': msg['Subject'] = _('OpenERP SMTP server Email Registration Code!') else: msg['Subject'] = _('OpenERP Test Email!') msg['To'] = toemail msg['From'] = tools.ustr(self.server[serverid]['from_email']) message = msg.as_string() if self.server[serverid]['disclaimers']: body = body + "\n" + self.server[serverid]['disclaimers'] queue = pooler.get_pool(cr.dbname).get('email.smtpclient.queue') queue.create(cr, uid, { 'to':toemail, 'server_id':serverid, 'name':msg['Subject'], 'body':body, 'serialized_message':message, 'priority':1, 'type':'system' }) if self.server[serverid]['state'] != 'confirm': self.write(cr, uid, ids, {'state':'waiting', 'code':key}) return True | 5a558b6b1034593b8c71deeda96db7e8dd5329c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5a558b6b1034593b8c71deeda96db7e8dd5329c3/smtpclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
8705,
67,
3652,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
358,
3652,
16,
1842,
33,
8381,
16,
981,
33,
8381,
4672,
225,
1438,
350,
273,
3258,
63,
20,
65,
365,
18,
3190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8705,
67,
3652,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
358,
3652,
16,
1842,
33,
8381,
16,
981,
33,
8381,
4672,
225,
1438,
350,
273,
3258,
63,
20,
65,
365,
18,
3190,
... |
"""Testing PUT the reviewrequests/<id>/reviews/<id>/replies/draft API with comment""" | """Testing PUT the reviewrequests/<id>/reviews/<id>/replies/<id> API with comment""" | def test_put_reply_with_diff_comment(self): """Testing PUT the reviewrequests/<id>/reviews/<id>/replies/draft API with comment""" comment_text = "My Comment Text" | 9f1b80912a1de87469573d6d750058daf84fc652 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/9f1b80912a1de87469573d6d750058daf84fc652/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
458,
67,
10629,
67,
1918,
67,
5413,
67,
3469,
12,
2890,
4672,
3536,
22218,
11443,
326,
10725,
11420,
28177,
350,
16893,
266,
7061,
28177,
350,
16893,
266,
5259,
28177,
350,
34,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
458,
67,
10629,
67,
1918,
67,
5413,
67,
3469,
12,
2890,
4672,
3536,
22218,
11443,
326,
10725,
11420,
28177,
350,
16893,
266,
7061,
28177,
350,
16893,
266,
5259,
28177,
350,
34,
... |
RANGELEN = 10 TESTLEN = 10 a = range(RANGELEN) b = range(RANGELEN) | TESTLEN = 1000 RANGELEN = max(TESTLEN, 1000) a = range(RANGELEN/2)*2 b = range(RANGELEN/2)*2 | def pp(i): for x in i: print x | 28f308c327fa62506cb1304b163a51fc59e737c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/28f308c327fa62506cb1304b163a51fc59e737c3/LazySort.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8228,
12,
77,
4672,
364,
619,
316,
277,
30,
1172,
619,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8228,
12,
77,
4672,
364,
619,
316,
277,
30,
1172,
619,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
ifp = open(srcfss.as_pathname(), 'rb') ofp = open(dstfss.as_pathname(), 'wb') | ifp = open(src, 'rb') ofp = open(dst, 'wb') | def copy(src, dst, createpath=0, copydates=1, forcetype=None): """Copy a file, including finder info, resource fork, etc""" if createpath: mkdirs(os.path.split(dst)[0]) srcfss = macfs.FSSpec(src) dstfss = macfs.FSSpec(dst) ifp = open(srcfss.as_pathname(), 'rb') ofp = open(dstfss.as_pathname(), 'wb') d = ifp.read(BUFSIZ) while d: ofp.write(d) d = ifp.read(BUFSIZ) ifp.close() ofp.close() ifp = openrf(srcfss.as_pathname(), '*rb') ofp = openrf(dstfss.as_pathname(), '*wb') d = ifp.read(BUFSIZ) while d: ofp.write(d) d = ifp.read(BUFSIZ) ifp.close() ofp.close() sf = srcfss.GetFInfo() df = dstfss.GetFInfo() df.Creator, df.Type = sf.Creator, sf.Type if forcetype != None: df.Type = forcetype df.Flags = (sf.Flags & (kIsStationary|kNameLocked|kHasBundle|kIsInvisible|kIsAlias)) dstfss.SetFInfo(df) if copydates: crdate, mddate, bkdate = srcfss.GetDates() dstfss.SetDates(crdate, mddate, bkdate) touched(dstfss) | ec12af040117a276cdcb9205f40f01ce8e3e2d8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ec12af040117a276cdcb9205f40f01ce8e3e2d8a/macostools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
4816,
16,
3046,
16,
752,
803,
33,
20,
16,
1610,
9683,
33,
21,
16,
364,
71,
5872,
33,
7036,
4672,
3536,
2951,
279,
585,
16,
6508,
7532,
1123,
16,
1058,
12515,
16,
5527,
8395... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
4816,
16,
3046,
16,
752,
803,
33,
20,
16,
1610,
9683,
33,
21,
16,
364,
71,
5872,
33,
7036,
4672,
3536,
2951,
279,
585,
16,
6508,
7532,
1123,
16,
1058,
12515,
16,
5527,
8395... |
class_ = "image_button insertUnorderedList_large", | class_ = "image_button insertOrderedList_large", | def __init__( self, notebook, hide_toolbar = False, note_word = None ): Div.__init__( self, Div( P( Div( Input( type = u"button", id = u"newNote", title = u"make a new %s [ctrl-M]" % ( note_word or u"note" ), class_ = "image_button newNote_large", ), class_ = u"button_background" ), Div( Input( type = u"button", id = u"createLink", title = u"link [ctrl-L]", class_ = "image_button createLink_large", ), class_ = u"button_background" ), # Notebook.READ_WRITE_FOR_OWN_NOTES should not have a file upload button ( notebook.read_write == Notebook.READ_WRITE ) and Div( Input( type = u"button", id = u"attachFile", title = u"attach file or image", class_ = "image_button attachFile_large", ), class_ = u"button_background" ) or None, ), P( Div( Input( type = u"button", id = u"bold", title = u"bold [ctrl-B]", class_ = "image_button bold_large", ), class_ = u"button_background" ), Div( Input( type = u"button", id = u"italic", title = u"italic [ctrl-I]", class_ = "image_button italic_large", ), class_ = u"button_background" ), Div( Input( type = u"button", id = u"underline", title = u"underline [ctrl-U]", class_ = "image_button underline_large", ), class_ = u"button_background" ), Div( Input( type = u"button", id = u"strikethrough", title = u"strikethrough [ctrl-S]", class_ = "image_button strikethrough_large", ), class_ = u"button_background" ), Div( Input( type = u"button", id = u"font", title = u"font", class_ = "image_button font_large", ), class_ = u"button_background" ), Div( Input( type = u"button", id = u"title", title = u"title", class_ = "image_button title_large", ), class_ = u"button_background" ), ), P( Div( Input( type = u"button", id = u"insertUnorderedList", title = u"bullet list [ctrl-period]", class_ = "image_button insertUnorderedList_large", ), class_ = u"button_background" ), Div( Input( type = u"button", id = u"insertOrderedList", title = u"numbered list [ctrl-1]", class_ = "image_button insertUnorderedList_large", ), class_ = u"button_background" ), ), class_ = u"button_wrapper", ), | 23ad536d13e534a5e247e2c7b97c8a1c0a699991 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6754/23ad536d13e534a5e247e2c7b97c8a1c0a699991/Toolbar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
14718,
16,
6853,
67,
18849,
273,
1083,
16,
4721,
67,
1095,
273,
599,
262,
30,
21411,
16186,
2738,
972,
12,
365,
16,
21411,
12,
453,
12,
21411,
12,
2741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
365,
16,
14718,
16,
6853,
67,
18849,
273,
1083,
16,
4721,
67,
1095,
273,
599,
262,
30,
21411,
16186,
2738,
972,
12,
365,
16,
21411,
12,
453,
12,
21411,
12,
2741,
... |
def visit_field(self, node): self.body.append(self.starttag(node, 'tr', '', CLASS='field')) def depart_field(self, node): self.body.append('</tr>\n') def visit_field_body(self, node): self.body.append(self.starttag(node, 'td', '', CLASS='field-body')) if len(node) and isinstance(node[0], nodes.paragraph): node[0].set_class('first') def depart_field_body(self, node): self.body.append('</td>\n') def visit_field_list(self, node): self.body.append(self.starttag(node, 'table', frame='void', rules='none', CLASS='field-list')) self.body.append('<col class="field-name" />\n' '<col class="field-body" />\n' '<tbody valign="top">\n') def depart_field_list(self, node): self.body.append('</tbody>\n</table>\n') def visit_field_name(self, node): atts = {} if self.in_docinfo: atts['class'] = 'docinfo-name' else: atts['class'] = 'field-name' if len(node.astext()) > 14: atts['colspan'] = 2 self.context.append('</tr>\n<tr><td> </td>') else: self.context.append('') self.body.append(self.starttag(node, 'th', '', **atts)) def depart_field_name(self, node): self.body.append(':</th>') self.body.append(self.context.pop()) | def visit_field(self, node): self.body.append(self.starttag(node, 'tr', '', CLASS='field')) | 4f3175cae1eee1640728f93c57e26392c3a44d52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/4f3175cae1eee1640728f93c57e26392c3a44d52/OOwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
1518,
12,
2890,
16,
756,
4672,
365,
18,
3432,
18,
6923,
12,
2890,
18,
1937,
2692,
12,
2159,
16,
296,
313,
2187,
10226,
7383,
2218,
1518,
26112,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
3757,
67,
1518,
12,
2890,
16,
756,
4672,
365,
18,
3432,
18,
6923,
12,
2890,
18,
1937,
2692,
12,
2159,
16,
296,
313,
2187,
10226,
7383,
2218,
1518,
26112,
2,
-100,
-100,
-100,
-100,
-10... | |
__builtin__.open = __builtin__.file = _open | __builtin__.file = _file __builtin__.open = _open | def run(self, func): """Run 'func' under os sandboxing""" try: self._copy(self) __builtin__.open = __builtin__.file = self._open self._active = True return func() finally: self._active = False __builtin__.open = __builtin__.file = _open self._copy(_os) | d424393e0fa423eb23d0b0b4ec447b8044b0ff50 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8186/d424393e0fa423eb23d0b0b4ec447b8044b0ff50/sandbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
1326,
4672,
3536,
1997,
296,
644,
11,
3613,
1140,
15202,
310,
8395,
775,
30,
365,
6315,
3530,
12,
2890,
13,
1001,
24553,
25648,
3190,
273,
1001,
24553,
25648,
768,
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,
1086,
12,
2890,
16,
1326,
4672,
3536,
1997,
296,
644,
11,
3613,
1140,
15202,
310,
8395,
775,
30,
365,
6315,
3530,
12,
2890,
13,
1001,
24553,
25648,
3190,
273,
1001,
24553,
25648,
768,
27... |
' -collection:"DELETED" -collection:"DUMMY"') | ' -980__:"DELETED" -980__:"DUMMY"') | def calculate_reclist(self): """Calculate, set and return the (reclist, reclist_with_nonpublic_subcolls) tuple for given collection.""" if self.calculate_reclist_run_already or str(self.dbquery).startswith("hostedcollection:"): # do we have to recalculate? return (self.reclist, self.reclist_with_nonpublic_subcolls) write_message("... calculating reclist of %s" % self.name, verbose=6) reclist = HitSet() # will hold results for public sons only; good for storing into DB reclist_with_nonpublic_subcolls = HitSet() # will hold results for both public and nonpublic sons; good for deducing total # number of documents if not self.dbquery: # A - collection does not have dbquery, so query recursively all its sons # that are either non-restricted or that have the same restriction rules for coll in self.get_sons(): coll_reclist, coll_reclist_with_nonpublic_subcolls = coll.calculate_reclist() if ((coll.restricted_p() is None) or (coll.restricted_p() == self.restricted_p())): # add this reclist ``for real'' only if it is public reclist.union_update(coll_reclist) reclist_with_nonpublic_subcolls.union_update(coll_reclist_with_nonpublic_subcolls) else: # B - collection does have dbquery, so compute it: # (note: explicitly remove DELETED records) if CFG_CERN_SITE: reclist = search_pattern(None, self.dbquery + \ ' -collection:"DELETED" -collection:"DUMMY"') else: reclist = search_pattern(None, self.dbquery + ' -collection:"DELETED"') reclist_with_nonpublic_subcolls = copy.deepcopy(reclist) # store the results: self.nbrecs = len(reclist_with_nonpublic_subcolls) self.reclist = reclist self.reclist_with_nonpublic_subcolls = reclist_with_nonpublic_subcolls # last but not least, update the speed-up flag: self.calculate_reclist_run_already = 1 # return the two sets: return (self.reclist, self.reclist_with_nonpublic_subcolls) | 7722c7f78102adad631d8801b1834246e9e2c390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/7722c7f78102adad631d8801b1834246e9e2c390/websearch_webcoll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
67,
266,
830,
376,
12,
2890,
4672,
3536,
8695,
16,
444,
471,
327,
326,
261,
266,
830,
376,
16,
283,
830,
376,
67,
1918,
67,
5836,
482,
67,
1717,
1293,
3251,
13,
3193,
364,
864,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
67,
266,
830,
376,
12,
2890,
4672,
3536,
8695,
16,
444,
471,
327,
326,
261,
266,
830,
376,
16,
283,
830,
376,
67,
1918,
67,
5836,
482,
67,
1717,
1293,
3251,
13,
3193,
364,
864,... |
if( type(value) != self._metas[key][0] ) : | if key in self._metaTypes and type(value) != self._metaTypes[key] : | def set_metadata(self, key, value, notify=True): """Sets the value of a meta data.""" if( value == None ): return if key not in self._metas : raise Exception("This key does not exist : " + key) | 32182ef0ddf273b9a6767e2866166bde311fe575 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11338/32182ef0ddf273b9a6767e2866166bde311fe575/metadatadict.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4165,
12,
2890,
16,
498,
16,
460,
16,
5066,
33,
5510,
4672,
3536,
2785,
326,
460,
434,
279,
2191,
501,
12123,
309,
12,
460,
422,
599,
262,
30,
327,
309,
498,
486,
316,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4165,
12,
2890,
16,
498,
16,
460,
16,
5066,
33,
5510,
4672,
3536,
2785,
326,
460,
434,
279,
2191,
501,
12123,
309,
12,
460,
422,
599,
262,
30,
327,
309,
498,
486,
316,
365,
... |
self.valid_values=self.required_values | def __init__(self,spec,addlargs): self.required_values=["version_stamp","target","subarch","rel_type","rel_version","snapshot","source_subpath"] if not addlargs.has_key("grp"): raise CatalystError,"Required value \"grp\" not specified in spec." self.required_values.extend(["grp","grp/use"]) for x in addlargs["grp"]: self.required_values.append("grp/"+x+"/packages") self.required_values.append("grp/"+x+"/type") generic_stage_target.__init__(self,spec,addlargs) self.valid_values=self.required_values | a56d8423d1b8872c398653c1c18582e64588c283 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/a56d8423d1b8872c398653c1c18582e64588c283/targets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2793,
16,
1289,
80,
1968,
4672,
365,
18,
4718,
67,
2372,
33,
9614,
1589,
67,
14317,
15937,
3299,
15937,
1717,
991,
15937,
2878,
67,
723,
15937,
2878,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2793,
16,
1289,
80,
1968,
4672,
365,
18,
4718,
67,
2372,
33,
9614,
1589,
67,
14317,
15937,
3299,
15937,
1717,
991,
15937,
2878,
67,
723,
15937,
2878,
67,
... | |
[x^2 + x + 1, [0, 1], -3, 1, [Mat([1, -0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I]), [1, 0.36602540378443864676372317075293618347; 1, -1.3660254037844386467637231707529361835], 0, [2, -1; -1, -1], [3, 2; 0, 1], [1, -1; -1, -2], [3, [2, -1; 1, 1]]], [-0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I], [1, x], [1, 0; 0, 1], [1, 0, 0, -1; 0, 1, 1, -1]] | [x^2 + x + 1, [0, 1], -3, 1, ...[1, x], [1, 0; 0, 1], [1, 0, 0, -1; 0, 1, 1, -1]] | def _pari_init_(self): """ Needed for conversion of number field to PARI. EXAMPLES: sage: k = NumberField(x^2 + x + 1, 'a') sage: k._pari_init_() 'nfinit(x^2 + x + 1)' sage: k._pari_() [x^2 + x + 1, [0, 1], -3, 1, [Mat([1, -0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I]), [1, 0.36602540378443864676372317075293618347; 1, -1.3660254037844386467637231707529361835], 0, [2, -1; -1, -1], [3, 2; 0, 1], [1, -1; -1, -2], [3, [2, -1; 1, 1]]], [-0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I], [1, x], [1, 0; 0, 1], [1, 0, 0, -1; 0, 1, 1, -1]] sage: pari(k) [x^2 + x + 1, [0, 1], -3, 1, [Mat([1, -0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I]), [1, 0.36602540378443864676372317075293618347; 1, -1.3660254037844386467637231707529361835], 0, [2, -1; -1, -1], [3, 2; 0, 1], [1, -1; -1, -2], [3, [2, -1; 1, 1]]], [-0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I], [1, x], [1, 0; 0, 1], [1, 0, 0, -1; 0, 1, 1, -1]] """ return 'nfinit(%s)'%self.pari_polynomial() | 2eda69a95aa48a63a5116acfb99b0ab52ed7fe12 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/2eda69a95aa48a63a5116acfb99b0ab52ed7fe12/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1065,
77,
67,
2738,
67,
12,
2890,
4672,
3536,
26480,
364,
4105,
434,
1300,
652,
358,
3939,
45,
18,
225,
5675,
8900,
11386,
30,
272,
410,
30,
417,
273,
3588,
974,
12,
92,
66,
22,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1065,
77,
67,
2738,
67,
12,
2890,
4672,
3536,
26480,
364,
4105,
434,
1300,
652,
358,
3939,
45,
18,
225,
5675,
8900,
11386,
30,
272,
410,
30,
417,
273,
3588,
974,
12,
92,
66,
22,... |
req = req + struct.pack(">H",destport).decode() | req = req + self.__decode(struct.pack(">H",destport)) | def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setproxy method so we support the USERNAME/PASSWORD # authentication (in addition to the standard none). self.sendall("\x05\x02\x00\x02") else: # No username/password were entered, therefore we # only support connections with no authentication. self.sendall("\x05\x01\x00") # We'll receive the server's response to determine which # method was selected chosenauth = self.__recvall(2) if chosenauth[0] != "\x05": self.close() raise GeneralProxyError((1,_generalerrors[1])) # Check the chosen authentication method if chosenauth[1] == "\x00": # No authentication is required pass elif chosenauth[1] == "\x02": # Okay, we need to perform a basic username/password # authentication. self.sendall("\x01" + chr(len(self.__proxy[4])) + self.__proxy[4] + chr(len(self.__proxy[5])) + self.__proxy[5]) authstat = self.__recvall(2) if authstat[0] != "\x01": # Bad response self.close() raise GeneralProxyError((1,_generalerrors[1])) if authstat[1] != "\x00": # Authentication failed self.close() raise Socks5AuthError((3,_socks5autherrors[3])) # Authentication succeeded else: # Reaching here is always bad self.close() if chosenauth[1] == "\xFF": raise Socks5AuthError((2,_socks5autherrors[2])) else: raise GeneralProxyError((1,_generalerrors[1])) # Now we can request the actual connection req = "\x05\x01\x00" # If the given destination address is an IP address, we'll # use the IPv4 address request even if remote resolving was specified. try: ipaddr = socket.inet_aton(destaddr) req = req + "\x01" + ipaddr except socket.error: # Well it's not an IP number, so it's probably a DNS name. if self.__proxy[3]==True: # Resolve remotely ipaddr = None req = req + "\x03" + chr(len(destaddr)) + destaddr else: # Resolve locally ipaddr = socket.inet_aton(socket.gethostbyname(destaddr)) req = req + "\x01" + ipaddr req = req + struct.pack(">H",destport).decode() self.sendall(req) # Get the response resp = self.__recvall(4) if resp[0] != "\x05": self.close() raise GeneralProxyError((1,_generalerrors[1])) elif resp[1] != "\x00": # Connection failed self.close() if ord(resp[1])<=8: raise Socks5Error((ord(resp[1]),_socks5errors[ord(resp[1])])) else: raise Socks5Error((9,_socks5errors[9])) # Get the bound address/port elif resp[3] == "\x01": boundaddr = self.__recvall(4) elif resp[3] == "\x03": resp = resp + self.recv(1) boundaddr = self.__recvall(ord(resp[4])) else: self.close() raise GeneralProxyError((1,_generalerrors[1])) boundport = struct.unpack(">H",bytes(self.__recvall(2), 'utf8'))[0] self.__proxysockname = (boundaddr,boundport) if ipaddr != None: self.__proxypeername = (socket.inet_ntoa(ipaddr),destport) else: self.__proxypeername = (destaddr,destport) | 68a7f45c672c819937cd4b768ba99a202efeaac2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9386/68a7f45c672c819937cd4b768ba99a202efeaac2/socks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
4672,
3536,
972,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
13,
423,
27445,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
4672,
3536,
972,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
13,
423,
27445,
1... |
prefix = wikipedia.input(u'Input the prefix name:') else: prefix = wikipedia.Page(wikipedia.getSite(), arg[8:]) listpageTitle = wikipedia.input(u'List of pages:') listpage = wikipedia.Page(wikipedia.getSite(), listpageTitle) gen = pagegenerators.LinkedPageGenerator(listpage) preloadingGen = pagegenerators.PreloadingGenerator(gen) bot = MovePagesWithPrefix(preloadingGen, prefix, delete) bot.run() | prefix = wikipedia.input(u'Input the prefix:') else: prefix = arg[8:] | def main(): singlepage = [] gen = cat = ref = link = start = prefix = None FromName = ToName = None delete = False for arg in wikipedia.handleArgs(): if arg.startswith('-cat'): if len(arg) == 4: cat = wikipedia.input(u'Please enter the category name:') else: cat = arg[5:] categ = catlib.Category(wikipedia.getSite(), 'Category:%s'%cat) gen = pagegenerators.CategorizedPageGenerator(categ) elif arg.startswith('-ref'): if len(arg) == 4: ref = wikipedia.input(u'Links to which page should be processed?') else: ref = arg[5:] refer = wikipedia.Page(wikipedia.getSite(), ref) gen = pagegenerators.ReferringPageGenerator(refer) elif arg.startswith('-link'): if len(arg) == 5: link = wikipedia.input(u'Links from which page should be processed?') else: link = arg[6:] links = wikipedia.Page(wikipedia.getSite(), link) gen = pagegenerators.LinkedPageGenerator(links) elif arg.startswith('-start'): if len(arg) == 6: start = wikipedia.input(u'Which page to start from:') else: start = arg[7:] startp = wikipedia.Page(wikipedia.getSite(), start) gen = pagegenerators.AllpagesPageGenerator(startp.titleWithoutNamespace(),namespace=startp.namespace()) elif arg.startswith('-new'): if not number: number = config.special_page_limit gen = pagegenerators.NewpagesPageGenerator(number) elif arg == '-del': delete = True elif arg.startswith('-from:'): oldName = arg[len('-from:'):] FromName = True elif arg.startswith('-to:'): newName = arg[len('-to:'):] ToName = True elif arg.startswith('-prefix'): if len(arg) == len('-prefix'): prefix = wikipedia.input(u'Input the prefix name:') else: prefix = wikipedia.Page(wikipedia.getSite(), arg[8:]) listpageTitle = wikipedia.input(u'List of pages:') listpage = wikipedia.Page(wikipedia.getSite(), listpageTitle) gen = pagegenerators.LinkedPageGenerator(listpage) preloadingGen = pagegenerators.PreloadingGenerator(gen) bot = MovePagesWithPrefix(preloadingGen, prefix, delete) bot.run() else: singlepage.append(arg) if singlepage: page = wikipedia.Page(wikipedia.getSite(), ' '.join(singlepage)) gen = iter([page]) elif ((FromName and ToName) == True): wikipedia.output(u'Do you will move %s to %s' % (oldName, newName)) oldName = wikipedia.Page(wikipedia.getSite(), newName) msg = wikipedia.setAction(comment) oldName.move(newName, msg, throttle=True) if delete == True: pagedel = wikipedia.Page(wikipedia.getSite(), page) deletemsg = wikipedia.setAction(deletecomment) pagedel.delete(page, deletemsg) if gen: preloadingGen = pagegenerators.PreloadingGenerator(gen) bot = MovePagesBot(preloadingGen, delete) bot.run() else: wikipedia.showHelp('movepages') | e7c42b5a3f1380bd681e18fa4ad17146fc3d208b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/e7c42b5a3f1380bd681e18fa4ad17146fc3d208b/movepages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2202,
2433,
273,
5378,
3157,
273,
6573,
273,
1278,
273,
1692,
273,
787,
273,
1633,
273,
599,
6338,
461,
273,
2974,
461,
273,
599,
1430,
273,
1083,
225,
364,
1501,
316,
21137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2202,
2433,
273,
5378,
3157,
273,
6573,
273,
1278,
273,
1692,
273,
787,
273,
1633,
273,
599,
6338,
461,
273,
2974,
461,
273,
599,
1430,
273,
1083,
225,
364,
1501,
316,
21137... |
if type(modules) == str: | if type(module_name) == str: | def delete_package(self, package): """delete_package(package): Removes an entire package from the registry.""" | d1f3e2383d14e2b786322d2e733432b75be1cc61 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/d1f3e2383d14e2b786322d2e733432b75be1cc61/module_registry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
5610,
12,
2890,
16,
2181,
4672,
3536,
3733,
67,
5610,
12,
5610,
4672,
20284,
392,
7278,
2181,
628,
326,
4023,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
5610,
12,
2890,
16,
2181,
4672,
3536,
3733,
67,
5610,
12,
5610,
4672,
20284,
392,
7278,
2181,
628,
326,
4023,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
- n -- an integer between 0 and 3, inclusive. | - ``n`` - an integer between 0 and 3, inclusive. | def gen(self, n): """ Return the n-th generator. | 1ec65dfa0c3aab294b8ecca3f5f5493e154b7172 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/1ec65dfa0c3aab294b8ecca3f5f5493e154b7172/quaternion_algebra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
12,
2890,
16,
290,
4672,
3536,
2000,
326,
290,
17,
451,
4456,
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,
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,
3157,
12,
2890,
16,
290,
4672,
3536,
2000,
326,
290,
17,
451,
4456,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
- gens -- a list of elements of this quaternion order - check -- bool (default: True); if False, then gens must 4-tuple that forms a Hermite basis for an ideal | - ``gens`` -- a list of elements of this quaternion order - ``check`` -- bool (default: ``True``); if ``False``, then ``gens`` must 4-tuple that forms a Hermite basis for an ideal | def left_ideal(self, gens, check=True): r""" Return the ideal with given gens over `\mathbf{Z}`. | aa7c8c5c25a8f62637a37f480aa5f24e29d7fbee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/aa7c8c5c25a8f62637a37f480aa5f24e29d7fbee/quaternion_algebra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2002,
67,
831,
287,
12,
2890,
16,
314,
773,
16,
866,
33,
5510,
4672,
436,
8395,
2000,
326,
23349,
598,
864,
314,
773,
1879,
1375,
64,
15949,
17156,
95,
62,
97,
8338,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2002,
67,
831,
287,
12,
2890,
16,
314,
773,
16,
866,
33,
5510,
4672,
436,
8395,
2000,
326,
23349,
598,
864,
314,
773,
1879,
1375,
64,
15949,
17156,
95,
62,
97,
8338,
2,
-100,
-100,
-... |
if seek and (seek.isCurrentlySeekable() & 1) and not (seek.isCurrentlySeekable() & 2): if not self.fast_winding_hint_message_showed: | if seek and not (seek.isCurrentlySeekable() & 2): if not self.fast_winding_hint_message_showed and (seek.isCurrentlySeekable() & 1): | def seekFwd(self): seek = self.getSeek() if seek and (seek.isCurrentlySeekable() & 1) and not (seek.isCurrentlySeekable() & 2): if not self.fast_winding_hint_message_showed: self.session.open(MessageBox, _("No fast winding possible yet.. but you can use the number buttons to skip forward/backward!"), MessageBox.TYPE_INFO, timeout=10) self.fast_winding_hint_message_showed = True return if self.seekstate == self.SEEK_STATE_PLAY: self.setSeekState(self.makeStateForward(int(config.seek.enter_forward.value))) elif self.seekstate == self.SEEK_STATE_PAUSE: if len(config.seek.speeds_slowmotion.value): self.setSeekState(self.makeStateSlowMotion(config.seek.speeds_slowmotion.value[-1])) else: self.setSeekState(self.makeStateForward(int(config.seek.enter_forward.value))) elif self.seekstate == self.SEEK_STATE_EOF: pass elif self.isStateForward(self.seekstate): speed = self.seekstate[1] if self.seekstate[2]: speed /= self.seekstate[2] speed = self.getHigher(speed, config.seek.speeds_forward.value) or config.seek.speeds_forward.value[-1] self.setSeekState(self.makeStateForward(speed)) elif self.isStateBackward(self.seekstate): speed = -self.seekstate[1] if self.seekstate[2]: speed /= self.seekstate[2] speed = self.getLower(speed, config.seek.speeds_backward.value) if speed: self.setSeekState(self.makeStateBackward(speed)) else: self.setSeekState(self.SEEK_STATE_PLAY) elif self.isStateSlowMotion(self.seekstate): speed = self.getLower(self.seekstate[2], config.seek.speeds_slowmotion.value) or config.seek.speeds_slowmotion.value[0] self.setSeekState(self.makeStateSlowMotion(speed)) | 1c954ba161bc3cd4b838b3c5a423d41847f0382a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/1c954ba161bc3cd4b838b3c5a423d41847f0382a/InfoBarGenerics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
42,
3623,
12,
2890,
4672,
6520,
273,
365,
18,
588,
16134,
1435,
309,
6520,
471,
486,
261,
16508,
18,
291,
3935,
715,
16134,
429,
1435,
473,
576,
4672,
309,
486,
365,
18,
8076,
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,
6520,
42,
3623,
12,
2890,
4672,
6520,
273,
365,
18,
588,
16134,
1435,
309,
6520,
471,
486,
261,
16508,
18,
291,
3935,
715,
16134,
429,
1435,
473,
576,
4672,
309,
486,
365,
18,
8076,
67... |
arena=sendcached.sendcached_arena, scope=sendcached.sendcached_scope, | arena=cache.cache_arena, scope=cache.cache_scope, | def test_put_cache_guess_ct_give_lm(self): """Test if put_cache() works, when we give filename (so it guesses content_type) and last_modified""" request = self.request key = 'nooneknowsit' filename = "test.png" data = "dontcare" url = sendcached.put_cache(request, key, data, filename=filename, last_modified=1) assert key in url | 26cdd567d6dc43a37f820bd8425f39ba67660582 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/26cdd567d6dc43a37f820bd8425f39ba67660582/test_cache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
458,
67,
2493,
67,
20885,
67,
299,
67,
75,
688,
67,
25972,
12,
2890,
4672,
3536,
4709,
309,
1378,
67,
2493,
1435,
6330,
16,
1347,
732,
8492,
1544,
261,
2048,
518,
7274,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
458,
67,
2493,
67,
20885,
67,
299,
67,
75,
688,
67,
25972,
12,
2890,
4672,
3536,
4709,
309,
1378,
67,
2493,
1435,
6330,
16,
1347,
732,
8492,
1544,
261,
2048,
518,
7274,
281,
... |
Subgroup of Mordell Weil group: [] sage: EQ.search(2) The previous command produces the following output:: P1 = [0:1:0] is torsion point, order 1 P1 = [1:-1:1] is torsion point, order 2 P1 = [2:2:1] is torsion point, order 3 P1 = [9:23:1] is torsion point, order 6 sage: E = mwrank_EllipticCurve([0,0,1,-7,6]) sage: EQ = mwrank_MordellWeil(E) sage: EQ.search(2) sage: EQ Subgroup of Mordell Weil group: [[1:-1:1], [-2:3:1], [-14:25:8]] Example to illustrate the verbose parameter:: sage: E = mwrank_EllipticCurve([0,0,1,-7,6]) sage: EQ = mwrank_MordellWeil(E, verbose=False) sage: EQ.search(1) sage: EQ Subgroup of Mordell Weil group: [[1:-1:1], [-2:3:1], [-14:25:8]] sage: EQ = mwrank_MordellWeil(E, verbose=True) sage: EQ.search(1) The previous command produces the following output:: P1 = [0:1:0] is torsion point, order 1 P1 = [-3:0:1] is generator number 1 saturating up to 20...Checking 2-saturation Points have successfully been 2-saturated (max q used = 7) Checking 3-saturation Points have successfully been 3-saturated (max q used = 7) Checking 5-saturation Points have successfully been 5-saturated (max q used = 23) Checking 7-saturation Points have successfully been 7-saturated (max q used = 41) Checking 11-saturation Points have successfully been 11-saturated (max q used = 17) Checking 13-saturation Points have successfully been 13-saturated (max q used = 43) Checking 17-saturation Points have successfully been 17-saturated (max q used = 31) Checking 19-saturation Points have successfully been 19-saturated (max q used = 37) done P2 = [-2:3:1] is generator number 2 saturating up to 20...Checking 2-saturation possible kernel vector = [1,1] This point may be in 2E(Q): [14:-52:1] ...and it is! Replacing old generator Points have successfully been 2-saturated (max q used = 7) Index gain = 2^1 Checking 3-saturation Points have successfully been 3-saturated (max q used = 13) Checking 5-saturation Points have successfully been 5-saturated (max q used = 67) Checking 7-saturation Points have successfully been 7-saturated (max q used = 53) Checking 11-saturation Points have successfully been 11-saturated (max q used = 73) Checking 13-saturation Points have successfully been 13-saturated (max q used = 103) Checking 17-saturation Points have successfully been 17-saturated (max q used = 113) Checking 19-saturation Points have successfully been 19-saturated (max q used = 47) done (index = 2). Gained index 2, new generators = [ [1:-1:1] [-2:3:1] ] P3 = [-14:25:8] is generator number 3 saturating up to 20...Checking 2-saturation Points have successfully been 2-saturated (max q used = 11) Checking 3-saturation Points have successfully been 3-saturated (max q used = 13) Checking 5-saturation Points have successfully been 5-saturated (max q used = 71) Checking 7-saturation Points have successfully been 7-saturated (max q used = 101) Checking 11-saturation Points have successfully been 11-saturated (max q used = 127) Checking 13-saturation Points have successfully been 13-saturated (max q used = 151) Checking 17-saturation Points have successfully been 17-saturated (max q used = 139) Checking 19-saturation Points have successfully been 19-saturated (max q used = 179) done (index = 1). P4 = [-1:3:1] = -1*P1 + -1*P2 + -1*P3 (mod torsion) P4 = [0:2:1] = 2*P1 + 0*P2 + 1*P3 (mod torsion) P4 = [2:13:8] = -3*P1 + 1*P2 + -1*P3 (mod torsion) P4 = [1:0:1] = -1*P1 + 0*P2 + 0*P3 (mod torsion) P4 = [2:0:1] = -1*P1 + 1*P2 + 0*P3 (mod torsion) P4 = [18:7:8] = -2*P1 + -1*P2 + -1*P3 (mod torsion) P4 = [3:3:1] = 1*P1 + 0*P2 + 1*P3 (mod torsion) P4 = [4:6:1] = 0*P1 + -1*P2 + -1*P3 (mod torsion) P4 = [36:69:64] = 1*P1 + -2*P2 + 0*P3 (mod torsion) P4 = [68:-25:64] = -2*P1 + -1*P2 + -2*P3 (mod torsion) P4 = [12:35:27] = 1*P1 + -1*P2 + -1*P3 (mod torsion) sage: EQ Subgroup of Mordell Weil group: [[1:-1:1], [-2:3:1], [-14:25:8]] Example to illustrate the `process points` parameter:: sage: E = mwrank_EllipticCurve([0,0,1,-7,6]) sage: EQ = mwrank_MordellWeil(E, verbose=False, pp=1) sage: EQ.search(1); EQ Subgroup of Mordell Weil group: [[1:-1:1], [-2:3:1], [-14:25:8]] sage: EQ = mwrank_MordellWeil(E, verbose=False, pp=0) sage: EQ.search(1); EQ Subgroup of Mordell Weil group: [[-3:0:1], [-2:3:1], [-14:25:8], [-1:3:1], [0:2:1], [2:13:8], [1:0:1], [2:0:1], [18:7:8], [3:3:1], [4:6:1], [36:69:64], [68:-25:64], [12:35:27]] | Subgroup of Mordell-Weil group: [] | def __init__(self, curve, verbose=True, pp=1, maxr=999): r""" Constructor for the :class:`mwrank_MordellWeil` class. | 9932a677a12413086a59217c4c0d425b0543b6eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/9932a677a12413086a59217c4c0d425b0543b6eb/interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
8882,
16,
3988,
33,
5510,
16,
8228,
33,
21,
16,
943,
86,
33,
11984,
4672,
436,
8395,
11417,
364,
326,
294,
1106,
28288,
81,
91,
11500,
67,
49,
517,
116... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
8882,
16,
3988,
33,
5510,
16,
8228,
33,
21,
16,
943,
86,
33,
11984,
4672,
436,
8395,
11417,
364,
326,
294,
1106,
28288,
81,
91,
11500,
67,
49,
517,
116... |
'CONTENT_TYPE': 'application/x-www-urlencoded', | 'CONTENT_TYPE': 'application/x-www-form-urlencoded', | def make_post(body): e = { 'CONTENT_TYPE': 'application/x-www-urlencoded', 'CONTENT_LENGTH': str(len(body)), 'wsgi.input': StringIO(body), } return e | 76da4633eae92f618adf40d530f340fa27a71d98 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2097/76da4633eae92f618adf40d530f340fa27a71d98/test_request_form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2767,
12,
3432,
4672,
425,
273,
288,
296,
9689,
67,
2399,
4278,
296,
3685,
19,
92,
17,
5591,
17,
687,
17,
19690,
2187,
296,
9689,
67,
7096,
4278,
609,
12,
1897,
12,
3432,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2767,
12,
3432,
4672,
425,
273,
288,
296,
9689,
67,
2399,
4278,
296,
3685,
19,
92,
17,
5591,
17,
687,
17,
19690,
2187,
296,
9689,
67,
7096,
4278,
609,
12,
1897,
12,
3432,
1... |
def __lt__(self, other): | def __le__(self, other): | def __lt__(self, other): return self.x >= other.x | 96887c0a68cdc0da0037495e2112b3444c735570 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/96887c0a68cdc0da0037495e2112b3444c735570/test_heapq.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
298,
972,
12,
2890,
16,
1308,
4672,
327,
365,
18,
92,
1545,
1308,
18,
92,
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,
1001,
298,
972,
12,
2890,
16,
1308,
4672,
327,
365,
18,
92,
1545,
1308,
18,
92,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
x = self.text.winfo_rootx() y = self.text.winfo_rooty() self.dropdown.geometry("+%d+%d" % (x, y)) self.dropdown.wm_overrideredirect(1) self.dropdown.withdraw() | def _draw(self): """Draw and configure contained widgets.""" self.text = tk.Entry(self, textvariable=self.variable) self.button = tk.Button(self, text="+", command=self.open) self.text.grid(row=0, column=0) self.button.grid(row=0, column=1) # Dropdown list, displayed when button is clicked self.dropdown = tk.Toplevel(self) self.chooser = tk.Listbox(self.dropdown, background='white') for choice in self.choices: self.chooser.insert('end', choice) self.chooser.bind('<Button-1>', self.choose) self.chooser.grid() # Align dropdown list with the text box x = self.text.winfo_rootx() y = self.text.winfo_rooty() self.dropdown.geometry("+%d+%d" % (x, y)) # Don't draw window manager frame around the dropdown self.dropdown.wm_overrideredirect(1) # Hide until later self.dropdown.withdraw() | dd1240379aaefe7700d4a180e1bd0e4639e31e72 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/dd1240379aaefe7700d4a180e1bd0e4639e31e72/support.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9446,
12,
2890,
4672,
3536,
6493,
471,
5068,
7542,
10965,
12123,
365,
18,
955,
273,
13030,
18,
1622,
12,
2890,
16,
977,
6105,
33,
2890,
18,
6105,
13,
365,
18,
5391,
273,
13030,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9446,
12,
2890,
4672,
3536,
6493,
471,
5068,
7542,
10965,
12123,
365,
18,
955,
273,
13030,
18,
1622,
12,
2890,
16,
977,
6105,
33,
2890,
18,
6105,
13,
365,
18,
5391,
273,
13030,
18... | |
logging.warning( "ROLLBACK because " + str(e)) | logging.warning( "ROLLBACK create user because '%s'." % str(e)) | def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass).""" | 2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
1299,
12,
2890,
16,
1142,
529,
273,
599,
16,
1122,
529,
273,
599,
16,
2201,
273,
599,
16,
3354,
67,
1655,
33,
7036,
16,
3042,
33,
7036,
16,
4343,
292,
33,
7036,
16,
3925,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
1299,
12,
2890,
16,
1142,
529,
273,
599,
16,
1122,
529,
273,
599,
16,
2201,
273,
599,
16,
3354,
67,
1655,
33,
7036,
16,
3042,
33,
7036,
16,
4343,
292,
33,
7036,
16,
3925,
33,
... |
game.state.kcmdr[n] = iq | game.state.kcmdr.append(iq) | def tryexit(enemy, look, irun): "A bad guy attempts to bug out." iq = coord() iq.i = game.quadrant.i+(look.i+(QUADSIZE-1))/QUADSIZE - 1 iq.j = game.quadrant.j+(look.j+(QUADSIZE-1))/QUADSIZE - 1 if not welcoming(iq): return False; if enemy.type == 'R': return False; # Romulans cannot escape! if not irun: # avoid intruding on another commander's territory if enemy.type == 'C': if iq in game.state.kcmdr: return False # refuse to leave if currently attacking starbase if game.battle == game.quadrant: return False # don't leave if over 1000 units of energy if enemy.power > 1000.0: return False # emit escape message and move out of quadrant. # we know this if either short or long range sensors are working if not damaged(DSRSENS) or not damaged(DLRSENS) or \ game.condition == "docked": prout(crmena(True, enemy.type, "sector", enemy.location) + \ (_(" escapes to Quadrant %s (and regains strength).") % q)) # handle local matters related to escape enemy.move(None) game.klhere -= 1 if game.condition != "docked": newcnd() # Handle global matters related to escape game.state.galaxy[game.quadrant.i][game.quadrant.j].klingons -= 1 game.state.galaxy[iq.i][iq.j].klingons += 1 if enemy.type=='S': game.iscate = False game.ientesc = False game.isatb = 0 schedule(FSCMOVE, 0.2777) unschedule(FSCDBAS) game.state.kscmdr=iq else: for cmdr in game.state.kcmdr: if cmdr == game.quadrant: game.state.kcmdr[n] = iq break return True; # success | eafdd35f1af1e4e93d3609a0adbe768b562907e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/eafdd35f1af1e4e93d3609a0adbe768b562907e0/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
775,
8593,
12,
275,
351,
93,
16,
2324,
16,
277,
2681,
4672,
315,
37,
5570,
3058,
93,
7531,
358,
7934,
596,
1199,
24288,
273,
2745,
1435,
24288,
18,
77,
273,
7920,
18,
21733,
6890,
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,
775,
8593,
12,
275,
351,
93,
16,
2324,
16,
277,
2681,
4672,
315,
37,
5570,
3058,
93,
7531,
358,
7934,
596,
1199,
24288,
273,
2745,
1435,
24288,
18,
77,
273,
7920,
18,
21733,
6890,
18,
... |
rational arithmetic, even if the base ring is an inexact p-adic ring. | rational arithmetic, even if the base ring is an inexact `p`-adic ring. | 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. | d7c9d61652cabcfb658c91a720989214f7a469bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d7c9d61652cabcfb658c91a720989214f7a469bd/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 fl_popup_entry_set_text(p1, p2): """ fl_popup_entry_set_text(p1, p2) -> num. """ retval = _fl_popup_entry_set_text(p1, p2) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
16086,
67,
4099,
67,
542,
67,
955,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
16086,
67,
4099,
67,
542,
67,
955,
12,
84,
21,
16,
293,
22,
13,
317,
818,
18,
3536,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
16086,
67,
4099,
67,
542,
67,
955,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
16086,
67,
4099,
67,
542,
67,
955,
12,
84,
21,
16,
293,
22,
13,
317,
818,
18,
3536,
22... |
for i in range(0, len(self.data), MAX_BASE64): b = self.data[i:i+MAX_BASE64] | for i in range(0, len(self.rawdata), MAX_BASE64): b = self.type2test(self.rawdata[i:i+MAX_BASE64]) | def test_base64valid(self): # Test base64 with valid data MAX_BASE64 = 57 lines = [] for i in range(0, len(self.data), MAX_BASE64): b = self.data[i:i+MAX_BASE64] a = binascii.b2a_base64(b) lines.append(a) res = "" for line in lines: b = binascii.a2b_base64(line) res = res + b self.assertEqual(res, self.rawdata) | db983a7c38ba3d98649c916afa12340bd8b6bed2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/db983a7c38ba3d98649c916afa12340bd8b6bed2/test_binascii.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1969,
1105,
877,
12,
2890,
4672,
468,
7766,
1026,
1105,
598,
923,
501,
4552,
67,
8369,
1105,
273,
15981,
2362,
273,
5378,
364,
277,
316,
1048,
12,
20,
16,
562,
12,
2890,
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,
1842,
67,
1969,
1105,
877,
12,
2890,
4672,
468,
7766,
1026,
1105,
598,
923,
501,
4552,
67,
8369,
1105,
273,
15981,
2362,
273,
5378,
364,
277,
316,
1048,
12,
20,
16,
562,
12,
2890,
18,
... |
migrModel='Continuous Gene Glow', migrGen=5, migrRate=[[0.99, 0.01], [0, 1.]], | migrModel='Continuous Gene Glow', migrGen=0, migrRate=[[0.99, 0.01], [0, 1.]], | def __init__(self, name='simu', useSavedExpanded=False, step=100, showAlleleFreq=True, figureStep=200, drawLDPlot=False, haploview='haploview', ldRegions=[0, 500], ldSampleSize=200, HapMap_dir='../HapMap', pops=['CEU'], markerList='', chrom=[2], numMarkers=[1000], startPos=0, endingPos=0, minAF=0, minDiffAF=0, minDist=0, mutaRate=1e-6, recMap='genetic', recIntensity=0.01, convProb=0, convMode='Tract length', convParam=0.02, forCtrlLoci=[], forCtrlFreq=[], backCtrlLoci=[], backCtrlFreq=[], fitness=[1,1,1], mlSelModel='none', backMigrRate=0.0001, scale=10, custom='', initCopy=10, initGen=100, initSize=4800, expandGen=500, expandSize=42000, expandedName='expanded.bin', migrModel='Continuous Gene Glow', migrGen=5, migrRate=[[0.99, 0.01], [0, 1.]], ancestry=True, matingScheme='random', admixedName='admixed.bin'): # expand all params to different options (self.name, self.useSavedExpanded, self.step, self.showAlleleFreq, self.figureStep, self.drawLDPlot, self.haploview, self.ldRegions, self.ldSampleSize, self.HapMap_dir, self.pops, self.markerList, self.chrom, self.numMarkers, self.startPos, self.endingPos, self.minAF, self.minDiffAF, self.minDist, self.mutaRate, self.recMap, self.recIntensity, self.convProb, self.convMode, self.convParam, self.forCtrlLoci, self.forCtrlFreq, self.backCtrlLoci, self.backCtrlFreq, self.fitness, self.mlSelModel, self.backMigrRate, self.scale, self.custom, self.initCopy, self.initGen, self.initSize, self.expandGen, self.expandSize, self.expandedName, self.migrModel, self.migrGen, self.migrRate, self.ancestry, self.matingScheme, self.admixedName) \ = (name, useSavedExpanded, step, showAlleleFreq, figureStep, drawLDPlot, haploview, ldRegions, ldSampleSize, HapMap_dir, pops, markerList, chrom, numMarkers, startPos, endingPos, minAF, minDiffAF, minDist, mutaRate, recMap, recIntensity, convProb, convMode, convParam, forCtrlLoci, forCtrlFreq, backCtrlLoci, backCtrlFreq, fitness, mlSelModel, backMigrRate, scale, custom, initCopy, initGen, initSize, expandGen, expandSize, expandedName, migrModel, migrGen, migrRate, ancestry, matingScheme, admixedName) # preparations self.createSimulationDir() self.expandedFile = self.setFile(self.expandedName) self.admixedFile = self.setFile(self.admixedName) # self.ctrlLoci = self.forCtrlLoci + self.backCtrlLoci # adjust parameters startPos, endPos etc. self.prepareMarkerParams() # marker list file and ld map file. self.trajFile = os.path.join(self.name, 'trajectory.csv') self.markerListFile = os.path.join(self.name, 'markers.lst') self.markerMapFile = os.path.join(self.name, 'ld.map') # parameters for ld plots if len(self.ldRegions) == 2 and type(self.ldRegions[0]) in [IntType, LongType]: self.ldRegions = [self.ldRegions] # scaling self.mutaRate *= self.scale self.recIntensity *= self.scale self.backMigrRate *= self.scale self.step /= self.scale self.figureStep /= self.scale self.initGen /= self.scale self.expandGen /= self.scale self.convMode = { 'Tract length': CONVERT_TractLength, 'Number of markers': CONVERT_NumMarkers, 'Geometric distribution': CONVERT_GeometricDistribution, 'Exponential Distribution': CONVERT_ExponentialDistribution }[self.convMode] # self.prepareFitnessParams() # cutomized migrator and mating schemes if self.custom != '': exec('import %s as custom' % self.custom) | b94b365376d7f57d8fa0c640154ed7d242bb5dea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/401/b94b365376d7f57d8fa0c640154ed7d242bb5dea/simuAdmixture.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
2218,
9812,
89,
2187,
999,
16776,
17957,
33,
8381,
16,
2235,
33,
6625,
16,
2405,
1595,
6516,
14485,
33,
5510,
16,
7837,
4160,
33,
6976,
16,
3724,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
2218,
9812,
89,
2187,
999,
16776,
17957,
33,
8381,
16,
2235,
33,
6625,
16,
2405,
1595,
6516,
14485,
33,
5510,
16,
7837,
4160,
33,
6976,
16,
3724,
12... |
yield ldtpized_name, obj, '%s ldtpized_obj_index[abbrev_role]) | yield ldtpized_name, obj, u'%s ldtpized_obj_index[abbrev_role]) | def _appmap_pairs(self, gui): ldtpized_list = [] ldtpized_obj_index = {} for obj in self._list_objects(gui): abbrev_role, abbrev_name = self._ldtpize_accessible(obj) if abbrev_role in ldtpized_obj_index: ldtpized_obj_index[abbrev_role] += 1 else: ldtpized_obj_index[abbrev_role] = 0 if abbrev_name == '': ldtpized_name_base = abbrev_role ldtpized_name = '%s%d' % (ldtpized_name_base, ldtpized_obj_index[abbrev_role]) else: ldtpized_name_base = '%s%s' % (abbrev_role, abbrev_name) ldtpized_name = ldtpized_name_base i = 1 while ldtpized_name in ldtpized_list: ldtpized_name = '%s%d' % (ldtpized_name_base, i) i += 1 ldtpized_list.append(ldtpized_name) yield ldtpized_name, obj, '%s#%d' % (abbrev_role, ldtpized_obj_index[abbrev_role]) | f1d3b330c9cc7519afb68be535da1273a51f9270 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11266/f1d3b330c9cc7519afb68be535da1273a51f9270/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2910,
1458,
67,
11545,
12,
2890,
16,
13238,
4672,
16916,
6834,
1235,
67,
1098,
273,
5378,
16916,
6834,
1235,
67,
2603,
67,
1615,
273,
2618,
364,
1081,
316,
365,
6315,
1098,
67,
6911... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2910,
1458,
67,
11545,
12,
2890,
16,
13238,
4672,
16916,
6834,
1235,
67,
1098,
273,
5378,
16916,
6834,
1235,
67,
2603,
67,
1615,
273,
2618,
364,
1081,
316,
365,
6315,
1098,
67,
6911... |
assert dt2.col1.hour == _now.hour assert dt2.col1.minute == _now.minute assert dt2.col1.second == int(_now.second) | if getConnection().dbName == "sqlite": assert dt2.col2.hour == _now.hour assert dt2.col2.minute == _now.minute assert dt2.col2.second == int(_now.second) else: assert dt2.col2.hour == 0 assert dt2.col2.minute == 0 assert dt2.col2.second == 0 | def test_mxDateTime(): setupClass(DateTime2) _now = now() dt2 = DateTime2(col1=_now, col2=_now, col3=Time(_now.hour, _now.minute, int(_now.second))) | 7bd17e62d604b90ee0fd39876882b87d60584158 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/7bd17e62d604b90ee0fd39876882b87d60584158/test_datetime.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11023,
5096,
13332,
3875,
797,
12,
5096,
22,
13,
389,
3338,
273,
2037,
1435,
3681,
22,
273,
3716,
22,
12,
1293,
21,
33,
67,
3338,
16,
645,
22,
33,
67,
3338,
16,
645,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11023,
5096,
13332,
3875,
797,
12,
5096,
22,
13,
389,
3338,
273,
2037,
1435,
3681,
22,
273,
3716,
22,
12,
1293,
21,
33,
67,
3338,
16,
645,
22,
33,
67,
3338,
16,
645,
23,
... |
def force_test_exit(): import os fork_pid = os.fork() if fork_pid: return fork_pid | def spawn_force_test_exit_process(self, parent_pid): import os fork_pid = os.fork() if fork_pid: return fork_pid | def handlerB(*args): global b_called b_called = True if verbose: print "handlerB invoked", args raise HandlerBCalled, args | 9f2b93e03ac1b79f2a25aeb2c3b094fbe816d1d4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/9f2b93e03ac1b79f2a25aeb2c3b094fbe816d1d4/test_signal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1838,
38,
30857,
1968,
4672,
2552,
324,
67,
11777,
324,
67,
11777,
273,
1053,
309,
3988,
30,
1172,
315,
4176,
38,
8187,
3113,
833,
1002,
4663,
38,
8185,
16,
833,
225,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1838,
38,
30857,
1968,
4672,
2552,
324,
67,
11777,
324,
67,
11777,
273,
1053,
309,
3988,
30,
1172,
315,
4176,
38,
8187,
3113,
833,
1002,
4663,
38,
8185,
16,
833,
225,
2,
-100,
-100,
-1... |
canvas.setStrokeColorRGB(1,0,0) | canvas.setStrokeColor(red) | def myLaterPages(canvas, doc): #canvas.drawImage("snkanim.gif", 36, 36) canvas.saveState() canvas.setStrokeColorRGB(1,0,0) canvas.setLineWidth(5) canvas.line(66,72,66,PAGE_HEIGHT-72) canvas.setFont('Times-Roman',12) canvas.drawString(4 * inch, 0.75 * inch, "Page %d" % doc.page) canvas.restoreState() | 4dd2d12518353ba3030029bc130c21d5f071c2c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/4dd2d12518353ba3030029bc130c21d5f071c2c9/layout.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
20607,
5716,
12,
15424,
16,
997,
4672,
468,
15424,
18,
9446,
2040,
2932,
8134,
79,
304,
381,
18,
13905,
3113,
6580,
16,
6580,
13,
5953,
18,
5688,
1119,
1435,
5953,
18,
542,
14602,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
20607,
5716,
12,
15424,
16,
997,
4672,
468,
15424,
18,
9446,
2040,
2932,
8134,
79,
304,
381,
18,
13905,
3113,
6580,
16,
6580,
13,
5953,
18,
5688,
1119,
1435,
5953,
18,
542,
14602,
... |
id = genObjectId(title) | id = 'w_' + genObjectId(title) | def manage_addWidget(klass, container, id="", title=None, REQUEST=None, **kwargs): """Add widget""" if not title: title = str(klass) if not id: id = genObjectId(title) if id=='respondent': # reserved id idSuffix = '_w' # TODO: refactor SurveyAnswer and remove this workaround else: idSuffix = '' while (id+idSuffix in container.objectIds() or getattr(container, id+idSuffix, None) is not None): idSuffix = genRandomId(p_length=4) id = id + idSuffix # Get selected language lang = REQUEST and REQUEST.form.get('lang', None) lang = lang or kwargs.get('lang', container.gl_get_selected_language()) widget = klass(id, title=title, lang=lang, **kwargs) container.gl_add_languages(widget) container._setObject(id, widget) widget = container._getOb(id) if REQUEST: REQUEST.RESPONSE.redirect(REQUEST.HTTP_REFERER) return id | 3a9e7492ddfcb2208305401042db28cf6054bf95 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/3a9e7492ddfcb2208305401042db28cf6054bf95/Widget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
1289,
4609,
12,
22626,
16,
1478,
16,
612,
1546,
3113,
2077,
33,
7036,
16,
12492,
33,
7036,
16,
2826,
4333,
4672,
3536,
986,
3604,
8395,
309,
486,
2077,
30,
2077,
273,
609,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
1289,
4609,
12,
22626,
16,
1478,
16,
612,
1546,
3113,
2077,
33,
7036,
16,
12492,
33,
7036,
16,
2826,
4333,
4672,
3536,
986,
3604,
8395,
309,
486,
2077,
30,
2077,
273,
609,
1... |
cam = ren.GetActiveCamera() cpos = cam.GetPosition() cfol = cam.GetFocalPoint() cup = cam.GetViewUp() | def interactionEvent(self, istyle, name): """ interactionEvent(istyle: vtkInteractorStyle, name: str) -> None Make sure interactions sync across selected renderers """ if name=='MouseWheelForwardEvent': istyle.OnMouseWheelForward() if name=='MouseWheelBackwardEvent': istyle.OnMouseWheelBackward() sheet = self.findSheetTabWidget() if sheet: iren = istyle.GetInteractor() ren = self.interacting if not ren: ren = self.getActiveRenderer(iren) if ren: cam = ren.GetActiveCamera() cpos = cam.GetPosition() cfol = cam.GetFocalPoint() cup = cam.GetViewUp() cells = sheet.getSelectedLocations() for (row, col) in cells: cell = sheet.getCell(row, col) if hasattr(cell, 'getRendererList'): rens = cell.getRendererList() for r in rens: if r!=ren: dcam = r.GetActiveCamera() dcam.SetPosition(cpos) dcam.SetFocalPoint(cfol) dcam.SetViewUp(cup) r.ResetCameraClippingRange() cell.update() | e25f6b3864d5c7d3cb40e9df2cffa8fe2ac6dfdb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/e25f6b3864d5c7d3cb40e9df2cffa8fe2ac6dfdb/vtkcell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13581,
1133,
12,
2890,
16,
277,
4060,
16,
508,
4672,
3536,
13581,
1133,
12,
376,
1362,
30,
13659,
2465,
3362,
2885,
16,
508,
30,
609,
13,
317,
599,
4344,
3071,
23877,
3792,
10279,
3170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13581,
1133,
12,
2890,
16,
277,
4060,
16,
508,
4672,
3536,
13581,
1133,
12,
376,
1362,
30,
13659,
2465,
3362,
2885,
16,
508,
30,
609,
13,
317,
599,
4344,
3071,
23877,
3792,
10279,
3170,
... | |
import sipconfig, os try: set except NameError: from sets import Set as set | import sipconfig, os try: set except NameError: from sets import Set as set | def config(self): if self.packages is not None: return self.packages | 1ec6a2e7b9110e36ba6866622bf265f1103a0b8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2074/1ec6a2e7b9110e36ba6866622bf265f1103a0b8a/sip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
12,
2890,
4672,
309,
365,
18,
10308,
353,
486,
599,
30,
327,
365,
18,
10308,
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,
642,
12,
2890,
4672,
309,
365,
18,
10308,
353,
486,
599,
30,
327,
365,
18,
10308,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
ks = KeyStatistic(_('Avg Cached Memory'), sum(cached)/len(cached), | ks = KeyStatistic(_('Avg Cached Memory'), round(sum(cached)/len(cached), 2), | def get_graph(self, end_date, report_days, host=None, user=None, email=None): if email or host or user: return None | 76334c6b3cd698e75ba1c275cbedf6be7e3e6aea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/87/76334c6b3cd698e75ba1c275cbedf6be7e3e6aea/untangle_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4660,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
309,
2699,
578,
1479,
578,
729,
30,
327,
599,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4660,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
309,
2699,
578,
1479,
578,
729,
30,
327,
599,
2,
-10... |
if section is None or section == 'paths': if root is None: root = os.getcwd() items = section and [(name, value)] or [] for cdata in self.cdata, self.ucdata, self.overlay: if not items and 'paths' in cdata: pathsitems = cdata.items('paths') else: pathsitems = items for n, path in pathsitems: if path and "://" not in path and not os.path.isabs(path): cdata.set("paths", n, os.path.normpath(os.path.join(root, path))) | root = root or os.getcwd() for c in self.cdata, self.ucdata, self.overlay: for n, p in c.items('paths'): if p and "://" not in p and not os.path.isabs(p): c.set("paths", n, os.path.normpath(os.path.join(root, p))) | def fixconfig(self, section=None, name=None, value=None, root=None): # translate paths relative to root (or home) into absolute paths if section is None or section == 'paths': if root is None: root = os.getcwd() items = section and [(name, value)] or [] for cdata in self.cdata, self.ucdata, self.overlay: if not items and 'paths' in cdata: pathsitems = cdata.items('paths') else: pathsitems = items for n, path in pathsitems: if path and "://" not in path and not os.path.isabs(path): cdata.set("paths", n, os.path.normpath(os.path.join(root, path))) | d6ebd715bf86908c99a2c7999b8986ccb1bd0fd3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/d6ebd715bf86908c99a2c7999b8986ccb1bd0fd3/ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
1425,
12,
2890,
16,
2442,
33,
7036,
16,
508,
33,
7036,
16,
460,
33,
7036,
16,
1365,
33,
7036,
4672,
468,
4204,
2953,
3632,
358,
1365,
261,
280,
6382,
13,
1368,
4967,
2953,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1425,
12,
2890,
16,
2442,
33,
7036,
16,
508,
33,
7036,
16,
460,
33,
7036,
16,
1365,
33,
7036,
4672,
468,
4204,
2953,
3632,
358,
1365,
261,
280,
6382,
13,
1368,
4967,
2953,
309,
... |
return (beta, coeffs, coeff_names, basis, m, lambda x:math.exp(x)/(1.0+math.exp(x))) | return (beta, coeffs, coeff_names, basis, m, lambda x:math.exp(x)/(1.0+math.exp(x)),0) | def __call__(self,classifier,examples, buckets): # skip domain translation and masking robustc = classifier.classifier primitivec = robustc.classifier beta = -primitivec.beta[0] | e79ace60fc6ec671079d5cf322daa70694026a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/e79ace60fc6ec671079d5cf322daa70694026a6f/orngLinVis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1106,
1251,
16,
16858,
16,
9169,
4672,
468,
2488,
2461,
4794,
471,
3066,
310,
27920,
71,
273,
14622,
18,
1106,
1251,
846,
1038,
427,
557,
273,
27920,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1106,
1251,
16,
16858,
16,
9169,
4672,
468,
2488,
2461,
4794,
471,
3066,
310,
27920,
71,
273,
14622,
18,
1106,
1251,
846,
1038,
427,
557,
273,
27920,
71,
... |
def finalization (self, finalized): if self.pns_articulator: self.pns_articulator = None | def finalization (self, finalized): if self.pns_articulator: self.pns_articulator = None | 13a785671c02f96b075541baf8233dd4c62a6f66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/13a785671c02f96b075541baf8233dd4c62a6f66/pns_articulator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
727,
1588,
261,
2890,
16,
727,
1235,
4672,
309,
365,
18,
84,
2387,
67,
485,
335,
11775,
30,
365,
18,
84,
2387,
67,
485,
335,
11775,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
727,
1588,
261,
2890,
16,
727,
1235,
4672,
309,
365,
18,
84,
2387,
67,
485,
335,
11775,
30,
365,
18,
84,
2387,
67,
485,
335,
11775,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
number=None | self.address=None | def __init__(self,name,value,rfc2425parameters={}): self.name=name if self.name.upper()!="EMAIL": raise RuntimeError,"VCardEmail handles only 'EMAIL' type" if isinstance(value,libxml2.xmlNode): number=None self.type=[] n=value.children vns=get_node_ns(value) while n: if n.type!='element': n=n.next continue ns=get_node_ns(n) if (ns and vns and ns.getContent()!=vns.getContent()): n=n.next continue if n.name=='USERID': self.address=unicode(n.getContent(),"utf-8","replace") elif n.name in ("HOME","WORK","INTERNET","X400"): self.type.append(n.name.lower()) n=n.next if self.type==[]: self.type=["internet"] if not self.address: raise Empty,"No USERID" else: t=rfc2425parameters.get("type") if t: self.type=t.split(",") else: self.type=["internet"] self.address=value | 8c6f1bf79fd2c6da637f442661b1da2d525517ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/8c6f1bf79fd2c6da637f442661b1da2d525517ae/vcard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
529,
16,
1132,
16,
16784,
3247,
2947,
3977,
12938,
4672,
365,
18,
529,
33,
529,
309,
365,
18,
529,
18,
5797,
1435,
5,
1546,
14686,
6877,
1002,
7265,
1083... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
529,
16,
1132,
16,
16784,
3247,
2947,
3977,
12938,
4672,
365,
18,
529,
33,
529,
309,
365,
18,
529,
18,
5797,
1435,
5,
1546,
14686,
6877,
1002,
7265,
1083... |
group=self.group, | group=self.group or None, | def get_href(self, format=None): return self.env.href.query(order=self.order, desc=self.desc and 1 or None, group=self.group, groupdesc=self.groupdesc and 1 or None, verbose=self.verbose and 1 or None, format=format, **self.constraints) | 06a98123cf1bba119a8c171d1b06fbba91532ab4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/06a98123cf1bba119a8c171d1b06fbba91532ab4/query.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7547,
12,
2890,
16,
740,
33,
7036,
4672,
327,
365,
18,
3074,
18,
7547,
18,
2271,
12,
1019,
33,
2890,
18,
1019,
16,
3044,
33,
2890,
18,
5569,
471,
404,
578,
599,
16,
1041,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7547,
12,
2890,
16,
740,
33,
7036,
4672,
327,
365,
18,
3074,
18,
7547,
18,
2271,
12,
1019,
33,
2890,
18,
1019,
16,
3044,
33,
2890,
18,
5569,
471,
404,
578,
599,
16,
1041,
... |
self.report(unvertext, self.imageName, notification, head, smwl) | self.report(self.unvertext, self.imageName, notification, head, smwl) | def checkStep(self): # nothing = Defining an empty image description nothing = ['', ' ', ' ', ' ', '\n', '\n ', '\n ', '\n\n', '\n \n', ' \n', ' \n ', ' \n \n'] # something = Minimal requirements for an image description. # If this fits, no tagging will take place (if there aren't other issues) # MIT license is ok on italian wikipedia, let also this here something = ['{{'] # Don't put "}}" here, please. Useless and can give problems. # Unused file extensions. Does not contain PDF. notallowed = ("xcf", "xls", "sxw", "sxi", "sxc", "sxd") brackets = False delete = False extension = self.imageName.split('.')[-1] # get the extension from the image's name # Load the notification messages HiddenTN = wikipedia.translate(self.site, HiddenTemplateNotification) unvertext = wikipedia.translate(self.site, n_txt) di = wikipedia.translate(self.site, delete_immediately) dih = wikipedia.translate(self.site, delete_immediately_head) din = wikipedia.translate(self.site, delete_immediately_notification) nh = wikipedia.translate(self.site, nothing_head) nn = wikipedia.translate(self.site, nothing_notification) dels = wikipedia.translate(self.site, del_comm) smwl = wikipedia.translate(self.site, second_message_without_license) | f45f17b2da5bfc90ecd37d48bcac310c9da2dcdf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/f45f17b2da5bfc90ecd37d48bcac310c9da2dcdf/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
4160,
12,
2890,
4672,
468,
5083,
273,
18003,
310,
392,
1008,
1316,
2477,
5083,
273,
10228,
2187,
296,
2265,
296,
225,
2265,
296,
282,
2265,
2337,
82,
2187,
2337,
82,
2265,
2337,
82,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
4160,
12,
2890,
4672,
468,
5083,
273,
18003,
310,
392,
1008,
1316,
2477,
5083,
273,
10228,
2187,
296,
2265,
296,
225,
2265,
296,
282,
2265,
2337,
82,
2187,
2337,
82,
2265,
2337,
82,... |
mark, | def _make_commit(self, t): # # Create the Commit object from the parser tokens... # | 4f7e24351e8619f6f89645b4457ccb6c62f12487 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10384/4f7e24351e8619f6f89645b4457ccb6c62f12487/parseit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
7371,
12,
2890,
16,
268,
4672,
468,
468,
1788,
326,
10269,
733,
628,
326,
2082,
2430,
2777,
468,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
7371,
12,
2890,
16,
268,
4672,
468,
468,
1788,
326,
10269,
733,
628,
326,
2082,
2430,
2777,
468,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.