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 |
|---|---|---|---|---|---|---|
qE.run_and_plot(300) | qE.run_and_plot(300, variables, loggers) plt.show() | def demo_flux() """demo method to test the flux negative constant""" qE = QuickEcell('simple_ecell_mod.eml') variables = ['S', 'P'] flux = qE.ses.createEntityStub('Process:/:C_S1') flux2 = qE.ses.createEntityStub('Process:/:C_S2') loggers = qE.createLoggers(variables) qE.ses.run(100) flux['k'] = -10 flux['k'] = +4 qE.run_and_plot(300) | 1cf86d6668a0f6d9627128153fe0d77a29f0d411 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14363/1cf86d6668a0f6d9627128153fe0d77a29f0d411/quickEcell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21477,
67,
7994,
1435,
3536,
27928,
707,
358,
1842,
326,
11772,
6092,
5381,
8395,
225,
1043,
41,
273,
19884,
41,
3855,
2668,
9647,
67,
557,
1165,
67,
1711,
18,
351,
80,
6134,
3152,
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,
21477,
67,
7994,
1435,
3536,
27928,
707,
358,
1842,
326,
11772,
6092,
5381,
8395,
225,
1043,
41,
273,
19884,
41,
3855,
2668,
9647,
67,
557,
1165,
67,
1711,
18,
351,
80,
6134,
3152,
273,
... |
def getProductReadme(self,p): | def getProductReadme(p): | def getProductReadme(self,p): ''' returns the readme file of the product case-insensitive ''' | d81703303faccd39aa5d8fc70056b260be7c7cbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/d81703303faccd39aa5d8fc70056b260be7c7cbf/portal_quickinstaller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15880,
1994,
3501,
12,
84,
4672,
9163,
1135,
326,
24778,
585,
434,
326,
3017,
648,
17,
31940,
9163,
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,
15880,
1994,
3501,
12,
84,
4672,
9163,
1135,
326,
24778,
585,
434,
326,
3017,
648,
17,
31940,
9163,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
button = wxButton(parentWidget, | button = wx.Button(parentWidget, | def instantiateWidget(self): try: id = Block.getWidgetID(self) except AttributeError: id = 0 | 05ee3872029908caecab080b328ff68d041fce63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/05ee3872029908caecab080b328ff68d041fce63/ControlBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10275,
4609,
12,
2890,
4672,
775,
30,
612,
273,
3914,
18,
588,
4609,
734,
12,
2890,
13,
1335,
6394,
30,
612,
273,
374,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10275,
4609,
12,
2890,
4672,
775,
30,
612,
273,
3914,
18,
588,
4609,
734,
12,
2890,
13,
1335,
6394,
30,
612,
273,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
update_val = {} | update_val = {} | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7865,
67,
81,
10829,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10457,
16,
2117,
67,
350,
33,
8381,
16,
2117,
67,
10488,
67,
350,
33,
8381,
16,
7865,
33,
5510,
16,
819,
33,
7036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7865,
67,
81,
10829,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10457,
16,
2117,
67,
350,
33,
8381,
16,
2117,
67,
10488,
67,
350,
33,
8381,
16,
7865,
33,
5510,
16,
819,
33,
7036,
... |
handler = self.handler(sock_obj, self) | handler = self.handler(sock, self) | def handle_accept(self): """Called when remote client initiates a connection.""" try: sock_obj, addr = self.accept() except TypeError: # for some reason sometimes accept() returns None instead # of a socket return log("[]%s:%s Connected." %addr[:2]) | 93339362815a4da693662426bfe9676331518e54 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7236/93339362815a4da693662426bfe9676331518e54/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
9436,
12,
2890,
4672,
3536,
8185,
1347,
2632,
1004,
1208,
16020,
279,
1459,
12123,
775,
30,
7313,
67,
2603,
16,
3091,
273,
365,
18,
9436,
1435,
1335,
3580,
30,
468,
364,
2690,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
9436,
12,
2890,
4672,
3536,
8185,
1347,
2632,
1004,
1208,
16020,
279,
1459,
12123,
775,
30,
7313,
67,
2603,
16,
3091,
273,
365,
18,
9436,
1435,
1335,
3580,
30,
468,
364,
2690,
... |
r""" Return a list of CuspFamily objects corresponding to the cusps of X_0(N). | r""" Return a list of CuspFamily objects corresponding to the cusps of $X_0(N)$. | def AllCusps(N): r""" Return a list of CuspFamily objects corresponding to the cusps of X_0(N). INPUT: -- (integer) N: the level EXAMPLES: sage: AllCusps(18) [(Inf), (c_{2}), (c_{3,1}), (c_{3,2}), (c_{6,1}), (c_{6,2}), (c_{9}), (0)] """ try: N = ZZ(N) assert N>0 except TypeError: raise TypeError, "N must be an integer" except AssertionError: raise AssertionError, "N must be positive" c = [] for d in divisors(N): n = num_cusps_of_width(N, d) if n == 1: c.append(CuspFamily(N, d)) elif n > 1: for i in xrange(n): c.append(CuspFamily(N, d, label=str(i+1))) return c | 0c130fed7b356e022134568630e483428d00fec2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0c130fed7b356e022134568630e483428d00fec2/etaproducts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4826,
39,
407,
1121,
12,
50,
4672,
436,
8395,
2000,
279,
666,
434,
385,
407,
84,
9203,
2184,
4656,
358,
326,
27964,
1121,
434,
271,
60,
67,
20,
12,
50,
21877,
18,
225,
12943,
30,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4826,
39,
407,
1121,
12,
50,
4672,
436,
8395,
2000,
279,
666,
434,
385,
407,
84,
9203,
2184,
4656,
358,
326,
27964,
1121,
434,
271,
60,
67,
20,
12,
50,
21877,
18,
225,
12943,
30,
149... |
if not torot: return Decimal(self) | def shift(self, other, context=None): """Returns a shifted copy of self, value-of-other times.""" if context is None: context = getcontext() | 72131c27e03458337e49afaafdfa69dde75cde7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/72131c27e03458337e49afaafdfa69dde75cde7e/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4654,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
1356,
279,
21340,
1610,
434,
365,
16,
460,
17,
792,
17,
3011,
4124,
12123,
309,
819,
353,
599,
30,
819,
273,
336,
2472,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4654,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
1356,
279,
21340,
1610,
434,
365,
16,
460,
17,
792,
17,
3011,
4124,
12123,
309,
819,
353,
599,
30,
819,
273,
336,
2472,
1435,
... | |
1) It is possible to give a list of options which must be part of | 1) It is possible to give a list of options which must be part of | def slaves(self): return map(self._nametowidget, self.tk.splitlist( self.tk.call( 'tixForm', 'slaves', self._w))) | f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30403,
12,
2890,
4672,
327,
852,
12,
2890,
6315,
17808,
278,
543,
2208,
16,
365,
18,
16099,
18,
4939,
1098,
12,
365,
18,
16099,
18,
1991,
12,
296,
88,
697,
1204,
2187,
296,
2069,
6606,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
30403,
12,
2890,
4672,
327,
852,
12,
2890,
6315,
17808,
278,
543,
2208,
16,
365,
18,
16099,
18,
4939,
1098,
12,
365,
18,
16099,
18,
1991,
12,
296,
88,
697,
1204,
2187,
296,
2069,
6606,... |
buf.append(u'%s = %s' % (rv, self.value)) | buf.append(u'= %s' % self.value) | def __unicode__(self): buf = self.get_modifiers() buf.append(u'%s %s' % (self.typename, self.name)) if self.value is not None: buf.append(u'%s = %s' % (rv, self.value)) return u' '.join(buf) | d8fe499dc1a383ca37dbc5eb342e493c20226daa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/d8fe499dc1a383ca37dbc5eb342e493c20226daa/cpp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9124,
972,
12,
2890,
4672,
1681,
273,
365,
18,
588,
67,
15432,
1435,
1681,
18,
6923,
12,
89,
11,
9,
87,
738,
87,
11,
738,
261,
2890,
18,
12846,
1069,
16,
365,
18,
529,
3719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9124,
972,
12,
2890,
4672,
1681,
273,
365,
18,
588,
67,
15432,
1435,
1681,
18,
6923,
12,
89,
11,
9,
87,
738,
87,
11,
738,
261,
2890,
18,
12846,
1069,
16,
365,
18,
529,
3719,
... |
def setProblematicStatus(self,fileID,status): req = "UPDATE Problematics SET Status= '%s', LastUpdate=UTC_TIMESTAMP() WHERE FileID = %s;" % (status,fileID) res = self._update(req) | def setProblematicStatus( self, fileID, status ): req = "UPDATE Problematics SET Status= '%s', LastUpdate=UTC_TIMESTAMP() WHERE FileID = %s;" % ( status, fileID ) res = self._update( req ) | def setProblematicStatus(self,fileID,status): req = "UPDATE Problematics SET Status= '%s', LastUpdate=UTC_TIMESTAMP() WHERE FileID = %s;" % (status,fileID) res = self._update(req) return res | c0ad35468416f798369c9462d5f8a11a19686a43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c0ad35468416f798369c9462d5f8a11a19686a43/DataIntegrityDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
13719,
2126,
1482,
12,
365,
16,
585,
734,
16,
1267,
262,
30,
1111,
273,
315,
8217,
21685,
270,
2102,
7855,
2685,
33,
1995,
87,
2187,
6825,
1891,
33,
11471,
67,
17201,
1435,
4852,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
13719,
2126,
1482,
12,
365,
16,
585,
734,
16,
1267,
262,
30,
1111,
273,
315,
8217,
21685,
270,
2102,
7855,
2685,
33,
1995,
87,
2187,
6825,
1891,
33,
11471,
67,
17201,
1435,
4852,
... |
self.environ["REMOTE_ADDR"] = self.__request.get_remote_host(apache.REMOTE_NOLOOKUP) | self.environ["REMOTE_ADDR"] = self.__request.connection.remote_ip | def __init__(self, request): """Constructor of the class. Initialises the necessesary values. It should never be used, use getWrapper method instead. """ self.__request = request try: self.cookies = parse_cookie(self.__request.headers_in[ "Cookie" ]) except KeyError: self.cookies = {} self.environ = {} self.environ["REMOTE_ADDR"] = self.__request.get_remote_host(apache.REMOTE_NOLOOKUP) self.response = ResponseWrapper( request ) try: self.session = request.session except AttributeError: self.session = None request.cds_wrapper = self #sticks the current wrapper to the mp request # so in succesive request it can be recovered | 01a2952ab39c5dbac377335d0181394cc592f06a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/01a2952ab39c5dbac377335d0181394cc592f06a/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
590,
4672,
3536,
6293,
434,
326,
667,
18,
10188,
6141,
326,
290,
3957,
281,
814,
924,
18,
2597,
1410,
5903,
506,
1399,
16,
999,
336,
3611,
707,
3560,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
590,
4672,
3536,
6293,
434,
326,
667,
18,
10188,
6141,
326,
290,
3957,
281,
814,
924,
18,
2597,
1410,
5903,
506,
1399,
16,
999,
336,
3611,
707,
3560,
18,... |
'041666388ef9655d48996a66dada1193d6646012a7b25a24fb10e6075cf0fc54' | 'ab2203a8c3de943309b685513a29060339c001acce5900dcd6427a02c1fb8011' radiogatun[8] -------------- >>> hasher = pyradiogatun.new(wl=8) >>> hasher.update('Santa Barbara, California') >>> hasher.hexdigest() 'e08f5cdbbfd8f5f3c479464a60ac186963e741d28f654e2c961d2f9bebc7de31' | def new(wl=64,arg=None): """Return a new RadioGatun hash object wl = wordlength (in bits) of the RadioGatun hash method between 1 and 64 (default = 64) arg = if present, the method call update(arg) is made EXAMPLES: (testvectors from: http://radiogatun.noekeon.org/) ========== >>> import pyradiogatun radiogatun[64] --------------- >>> hasher = pyradiogatun.new() >>> hasher.update('1234567890123456') >>> hasher.hexdigest() 'caaec14b5b4a7960d6854709770e3071d635d60224f58aa385867e549ef4cc42' >>> hasher = pyradiogatun.new() >>> hasher.update('Santa Barbara, California') >>> hasher.hexdigest() '0d08daf2354fa95aaa5b6a50f514384ecdd35940252e0631002e600e13cd285f' radiogatun[32] --------------- >>> hasher = pyradiogatun.new(32) >>> hasher.update('1234567890123456') >>> hasher.hexdigest() '59612324f3f42d3096e69125d2733b86143ae668ae9ed561ad785e0eac8dba25' >>> hasher = pyradiogatun.new(32) >>> hasher.update('Santa Barbara, California') >>> hasher.hexdigest() '041666388ef9655d48996a66dada1193d6646012a7b25a24fb10e6075cf0fc54' """ crypto = RadioGatunType(wl) if arg: crypto.update(arg) return crypto | 7b516f8fe1f3a2988cacd3343c2fa51aae031fd3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8009/7b516f8fe1f3a2988cacd3343c2fa51aae031fd3/pyradiogatun.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
21504,
33,
1105,
16,
3175,
33,
7036,
4672,
3536,
990,
279,
394,
31552,
43,
270,
318,
1651,
733,
225,
19564,
225,
273,
2076,
2469,
261,
267,
4125,
13,
434,
326,
31552,
43,
270,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
21504,
33,
1105,
16,
3175,
33,
7036,
4672,
3536,
990,
279,
394,
31552,
43,
270,
318,
1651,
733,
225,
19564,
225,
273,
2076,
2469,
261,
267,
4125,
13,
434,
326,
31552,
43,
270,... |
>>> from numpy import clip, log10, array, bartlett >>> from numpy.fft import fft | >>> from numpy import clip, log10, array, bartlett, linspace >>> from numpy.fft import fft, fftshift | def bartlett(M): """ Return the Bartlett window. The Bartlett window is very similar to a triangular window, except that the end points are at zero. It is often used in signal processing for tapering a signal, without generating too much ripple in the frequency domain. Parameters ---------- M : int Number of points in the output window. If zero or less, an empty array is returned. Returns ------- out : array The triangular window, normalized to one (the value one appears only if the number of samples is odd), with the first and last samples equal to zero. See Also -------- blackman, hamming, hanning, kaiser Notes ----- The Bartlett window is defined as .. math:: w(n) = \\frac{2}{M-1} \\left( \\frac{M-1}{2} - \\left|n - \\frac{M-1}{2}\\right| \\right) Most references to the Bartlett window come from the signal processing literature, where it is used as one of many windowing functions for smoothing values. Note that convolution with this window produces linear interpolation. It is also known as an apodization (which means"removing the foot", i.e. smoothing discontinuities at the beginning and end of the sampled signal) or tapering function. The fourier transform of the Bartlett is the product of two sinc functions. Note the excellent discussion in Kanasewich. References ---------- .. [1] M.S. Bartlett, "Periodogram Analysis and Continuous Spectra", Biometrika 37, 1-16, 1950. .. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics", The University of Alberta Press, 1975, pp. 109-110. .. [3] A.V. Oppenheim and R.W. Schafer, "Discrete-Time Signal Processing", Prentice-Hall, 1999, pp. 468-471. .. [4] Wikipedia, "Window function", http://en.wikipedia.org/wiki/Window_function .. [5] W.H. Press, B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling, "Numerical Recipes", Cambridge University Press, 1986, page 429. Examples -------- >>> np.bartlett(12) array([ 0. , 0.18181818, 0.36363636, 0.54545455, 0.72727273, 0.90909091, 0.90909091, 0.72727273, 0.54545455, 0.36363636, 0.18181818, 0. ]) Plot the window and its frequency response (requires SciPy and matplotlib): >>> from numpy import clip, log10, array, bartlett >>> from numpy.fft import fft >>> import matplotlib.pyplot as plt >>> window = bartlett(51) >>> plt.plot(window) >>> plt.title("Bartlett window") >>> plt.ylabel("Amplitude") >>> plt.xlabel("Sample") >>> plt.show() >>> A = fft(window, 2048) / 25.5 >>> mag = abs(fftshift(A)) >>> freq = linspace(-0.5,0.5,len(A)) >>> response = 20*log10(mag) >>> response = clip(response,-100,100) >>> plt.plot(freq, response) >>> plt.title("Frequency response of Bartlett window") >>> plt.ylabel("Magnitude [dB]") >>> plt.xlabel("Normalized frequency [cycles per sample]") >>> plt.axis('tight'); plt.show() """ if M < 1: return array([]) if M == 1: return ones(1, float) n = arange(0,M) return where(less_equal(n,(M-1)/2.0),2.0*n/(M-1),2.0-2.0*n/(M-1)) | d3133f1ed2d3c2e56853d14a5b3e5e1f2cff11e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/d3133f1ed2d3c2e56853d14a5b3e5e1f2cff11e2/function_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
485,
1810,
88,
12,
49,
4672,
3536,
2000,
326,
605,
485,
1810,
88,
2742,
18,
225,
1021,
605,
485,
1810,
88,
2742,
353,
8572,
7281,
358,
279,
6882,
13077,
2742,
16,
1335,
716,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
485,
1810,
88,
12,
49,
4672,
3536,
2000,
326,
605,
485,
1810,
88,
2742,
18,
225,
1021,
605,
485,
1810,
88,
2742,
353,
8572,
7281,
358,
279,
6882,
13077,
2742,
16,
1335,
716,
326,
... |
self.saveButton.setEnabled(len(self.selectedRules) > 0) | def updateRuleList(self): self.selectedRules = sum(sum((row[self.sel_colmin : self.sel_colmax+1] for row in self.ingrid[self.sel_rowmin : self.sel_rowmax+1]), []), []) self.displayRules() self.updateConfSupp() self.saveButton.setEnabled(len(self.selectedRules) > 0) | adb773ef60e4c7c06d7b59f3e8231ad4e20a9fa1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/adb773ef60e4c7c06d7b59f3e8231ad4e20a9fa1/OWAssociationRulesViewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
2175,
682,
12,
2890,
4672,
365,
18,
8109,
4478,
273,
2142,
12,
1364,
12443,
492,
63,
2890,
18,
1786,
67,
1293,
1154,
294,
365,
18,
1786,
67,
1293,
1896,
15,
21,
65,
364,
1027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
2175,
682,
12,
2890,
4672,
365,
18,
8109,
4478,
273,
2142,
12,
1364,
12443,
492,
63,
2890,
18,
1786,
67,
1293,
1154,
294,
365,
18,
1786,
67,
1293,
1896,
15,
21,
65,
364,
1027,
... | |
('until_count', 'CHECK(until IS NULL OR count IS NULL)', | ('until_count_only_one', 'CHECK(until IS NULL OR count IS NULL OR count = 0)', | def __init__(self): super(RRule, self).__init__() self._sql_constraints += [ ('until_count', 'CHECK(until IS NULL OR count IS NULL)', 'Only one of "until" and "count" can be set!'), ] self._constraints += [ ('check_bysecond', 'invalid_bysecond'), ('check_byminute', 'invalid_byminute'), ('check_byhour', 'invalid_byhour'), ('check_byday', 'invalid_byday'), ('check_bymonthday', 'invalid_bymonthday'), ('check_byyearday', 'invalid_byyearday'), ('check_byweekno', 'invalid_byweekno'), ('check_bymonth', 'invalid_bymonth'), ('check_bysetpos', 'invalid_bysetpos'), ] self._error_messages.update({ 'invalid_bysecond': 'Invalid "By Second"', 'invalid_byminute': 'Invalid "By Minute"', 'invalid_byhour': 'Invalid "By Hour"', 'invalid_byday': 'Invalid "By Day"', 'invalid_bymonthday': 'Invalid "By Month Day"', 'invalid_byyearday': 'Invalid "By Year Day"', 'invalid_byweekno': 'Invalid "By Week Number"', 'invalid_bymonth': 'Invalid "By Month"', 'invalid_bysetpos': 'Invalid "By Position"', }) | d29ae85197e568ceda8537efed158ecdb7e37ef6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9294/d29ae85197e568ceda8537efed158ecdb7e37ef6/calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2240,
12,
54,
2175,
16,
365,
2934,
972,
2738,
972,
1435,
365,
6315,
4669,
67,
11967,
1011,
306,
7707,
12198,
67,
1883,
67,
3700,
67,
476,
2187,
296,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2240,
12,
54,
2175,
16,
365,
2934,
972,
2738,
972,
1435,
365,
6315,
4669,
67,
11967,
1011,
306,
7707,
12198,
67,
1883,
67,
3700,
67,
476,
2187,
296,
10... |
'updated' : updated } | 'updated' : updated} | def getByMac(self, mac): """ Get a computer by its MAC from the cache. | 7d4c01312b9d0063d2b865273b702cc8f69a8d06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/7d4c01312b9d0063d2b865273b702cc8f69a8d06/cache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9979,
9990,
12,
2890,
16,
5318,
4672,
3536,
968,
279,
26579,
635,
2097,
14246,
628,
326,
1247,
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,... | [
1,
1,
1,
1,
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,
9979,
9990,
12,
2890,
16,
5318,
4672,
3536,
968,
279,
26579,
635,
2097,
14246,
628,
326,
1247,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for name in arg.getArgNames(): if name in argnames: raise SyntaxError("duplicate argument '%s' in function definition" % name) argnames[name] = 1 | for argname in arg.getArgNames(): if argname in argnames: raise SyntaxError("duplicate argument '%s' in function definition" % argname) argnames[argname] = 1 | def __init__(self, space, func, isLambda, class_name, mod): self.module = mod if isLambda: name = "<lambda>" else: assert isinstance(func, ast.Function) name = func.name # Find duplicated arguments. argnames = {} for arg in func.argnames: if isinstance(arg, ast.AssName): if arg.name in argnames: raise SyntaxError("duplicate argument '%s' in function definition" % arg.name) argnames[arg.name] = 1 elif isinstance(arg, ast.AssTuple): for name in arg.getArgNames(): if name in argnames: raise SyntaxError("duplicate argument '%s' in function definition" % name) argnames[name] = 1 if 'None' in argnames: raise SyntaxError('assignment to None is not allowed') | b67a4979c785014d79580372082ef2e97ce47c83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/b67a4979c785014d79580372082ef2e97ce47c83/pycodegen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3476,
16,
1326,
16,
353,
12025,
16,
667,
67,
529,
16,
681,
4672,
365,
18,
2978,
273,
681,
309,
353,
12025,
30,
508,
273,
3532,
14661,
2984,
469,
30,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3476,
16,
1326,
16,
353,
12025,
16,
667,
67,
529,
16,
681,
4672,
365,
18,
2978,
273,
681,
309,
353,
12025,
30,
508,
273,
3532,
14661,
2984,
469,
30,
18... |
"""Return a random string usable as a multipart boundary. The method used is so that it is *very* unlikely that the same string of characters will every occur again in the Universe, so the caller needn't check the data it is packing for the occurrence of the boundary. | """Return a string usable as a multipart boundary. The string chosen is unique within a single program run, and incorporates the user id (if available), process id (if available), and current time. So it's very unlikely the returned string appears in message text, but there's no guarantee. | def choose_boundary(): """Return a random string usable as a multipart boundary. The method used is so that it is *very* unlikely that the same string of characters will every occur again in the Universe, so the caller needn't check the data it is packing for the occurrence of the boundary. The boundary contains dots so you have to quote it in the header.""" global _prefix import time import random if _prefix is None: import socket hostid = socket.gethostbyname(socket.gethostname()) try: uid = `os.getuid()` except AttributeError: uid = '1' try: pid = `os.getpid()` except AttributeError: pid = '1' _prefix = hostid + '.' + uid + '.' + pid timestamp = '%.3f' % time.time() seed = `random.randint(0, 32767)` return _prefix + '.' + timestamp + '.' + seed | b88933f5ae6ea190eaa76d2a1423cf8300d4bab1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b88933f5ae6ea190eaa76d2a1423cf8300d4bab1/mimetools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
67,
16604,
13332,
3536,
990,
279,
533,
15603,
487,
279,
10263,
7679,
18,
225,
1021,
533,
10447,
353,
3089,
3470,
279,
2202,
5402,
1086,
16,
471,
316,
3850,
3831,
815,
326,
729,
612... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
67,
16604,
13332,
3536,
990,
279,
533,
15603,
487,
279,
10263,
7679,
18,
225,
1021,
533,
10447,
353,
3089,
3470,
279,
2202,
5402,
1086,
16,
471,
316,
3850,
3831,
815,
326,
729,
612... |
f = theano.function([a],a.sum(d).sum(dd)) | f = theano.function([a],a.sum(d).sum(dd),mode=self.mode) | def test_local_sum_sum(self): a=T.tensor3() input=numpy.arange(3*3*3).reshape(3,3,3) dims=[(0,0),(1,0),(2,0),(0,1),(1,1),(2,1)] | 60f4eb558d15e778691a242263c792b36310dee0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/60f4eb558d15e778691a242263c792b36310dee0/test_opt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3729,
67,
1364,
67,
1364,
12,
2890,
4672,
279,
33,
56,
18,
13720,
23,
1435,
810,
33,
15974,
18,
297,
726,
12,
23,
14,
23,
14,
23,
2934,
1955,
1273,
12,
23,
16,
23,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3729,
67,
1364,
67,
1364,
12,
2890,
4672,
279,
33,
56,
18,
13720,
23,
1435,
810,
33,
15974,
18,
297,
726,
12,
23,
14,
23,
14,
23,
2934,
1955,
1273,
12,
23,
16,
23,
16,
... |
def pso_reduce(key, value_iter): | def pso_reduce(self, key, value_iter): | def pso_reduce(key, value_iter): comparator = self.function.comparator particle = None best = None bestval = float('inf') | 36ae431c781eadb36d132d2c809bd3683200ef09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/966/36ae431c781eadb36d132d2c809bd3683200ef09/standardpso.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
2048,
67,
12498,
12,
2890,
16,
498,
16,
460,
67,
2165,
4672,
8862,
273,
365,
18,
915,
18,
832,
2528,
20036,
273,
599,
3796,
273,
599,
3796,
1125,
273,
1431,
2668,
10625,
6134,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
293,
2048,
67,
12498,
12,
2890,
16,
498,
16,
460,
67,
2165,
4672,
8862,
273,
365,
18,
915,
18,
832,
2528,
20036,
273,
599,
3796,
273,
599,
3796,
1125,
273,
1431,
2668,
10625,
6134,
2,
... |
def main(uri, http_user, sort = "hostname", order = "asc"): | def main(uri, http_user, sort="hostname", order="asc", configuration=None, machines=None, **kwargs): | def main(uri, http_user, sort = "hostname", order = "asc"): """ display all machines in a nice HTML page. """ start = time.time() m = machines.machines accounts = {} ordered = {} totals = { _('managed'): 0, _('floating'): 0 } title = _("Machines") data = w.page_body_start(uri, http_user, ctxtnav, title) if order == "asc": reverseorder = "desc" else: reverseorder = "asc" data += '<table>\n <tr>' for (sortcolumn, sortname) in ( ("status", _("Status")), ("hostname", _("Host name")), ("ip", _("IP address")), ("ether", _("Hardware address")), ("expiry", _("Expiry")), ("managed", _("Managed")) ): if sortcolumn == sort: data += ''' <th><img src="/images/sort_%s.gif" alt="%s order image" />  <a href="/machines/list/%s/%s" title="%s">%s</a> </th>\n''' % (order, order, sortcolumn, reverseorder, _("Click to sort in reverse order."), sortname) else: data += ''' <th> <a href="/machines/list/%s/asc" title="%s">%s</a> </th>\n''' % (sortcolumn, _("Click to sort on this column."), sortname) data += ' </tr>\n' def html_build_compact(index, accounts = accounts): mid = ordered[index] hostname = m[mid]['hostname'] edit = 'machine %s (IP %s)' % (hostname, m[mid]['ip']) if m[mid]['managed']: totals[_('managed')] += 1 else: totals[_('floating')] += 1 power_statuses = { host_status.UNKNOWN: (None, 'unknown', _('''Host %s is in an unknown state. Nothing is possible. ''' '''Please wait for a reconnection.''')), host_status.OFFLINE: (None, 'offline', _('''Host %s is offline, and cannot be powered on from here,''' '''Only from the machine itself.''')), host_status.ASLEEP: ('shutdown', 'asleep', _('Shutdown the machine %s')), host_status.IDLE: ('shutdown', 'idle', _('Shutdown the machine %s')), host_status.ACTIVE: ('shutdown', 'active', _('Shutdown the machine %s')), } status = m[mid]['status'] if power_statuses[status][0]: html_data = ''' <tr class="userdata"> <!-- STATUS --> <td class="user_action_center"> <a href="/machines/%s/%s" title="%s" class="%s"> <span class="delete-entry"> </span></a> </td>''' % ( power_statuses[status][0], hostname, power_statuses[status][2] % hostname, power_statuses[status][1] ) else: html_data = ''' <tr class="userdata"> <!-- STATUS --> <td class="user_action_center"> <span class="%s" title="%s"> </span> </td>''' % ( power_statuses[status][1], power_statuses[status][2] % hostname) html_data += ''' <!-- HOSTNAME --> <td class="paddedright"> <a href="/machines/edit/%s" title="%s" class="edit-entry">%s%s</a> </td> <!-- IP --> <td class="paddedright"> <a href="/machines/edit/%s" title="%s" class="edit-entry">%s</a> </td> <!-- ETHER --> <td class="paddedright"> <a href="/machines/edit/%s" title="%s" class="edit-entry">%s</a> </td> <!-- EXPIRY --> <td class="paddedright"> <a href="/machines/edit/%s" title="%s" class="edit-entry">%s</a> </td> ''' % ( hostname, edit, hostname, ''' <img src='/images/16x16/alt.png' alt='%s' />''' % _('This machine is an ALT® client.') if machines.is_alt(mid) else '', hostname, edit, m[mid]['ip'], hostname, edit, m[mid]['ether'], hostname, edit, format_time_delta( float(m[mid]['expiry']) - time.time(), use_neg=True) \ if m[mid]['expiry'] else '-' ) if m[mid]['managed']: html_data += ''' <!-- MANAGED --> <td class="user_action_center"> <a href="/machines/unmanage/%s" title="%s" class="managed"> <span class="delete-entry"> </span></a> </td> ''' % (hostname, _("""Unmanage machine (remove it from """ """configuration, in order to allow it to be managed by """ """another server.""")) else: html_data += ''' <!-- UNMANAGED --> <td class="user_action_center"> <a href="/machines/manage/%s" title="%s" class="floating"> <span class="delete-entry"> </span></a> </td> ''' % (hostname, _("""Manage machine (fix its IP address and """ """configure various aspects of the client).""")) return html_data for mid in machines.keys(): machine = m[mid] hostname = machine['hostname'] # we add the hostname to gecosValue and lockedValue to be sure to obtain # unique values. This prevents problems with empty or non-unique GECOS # and when sorting on locked status (accounts would be overwritten and # lost because sorting must be done on unique values). accounts[mid] = { 'status' : str(machine['status']) + hostname, 'hostname': hostname, 'ip' : machine['ip'], 'ether' : machine['ether'], 'expiry' : machine['expiry'], 'managed' : str(machine['managed']) + hostname } # index on the column choosen for sorting, and keep trace of the mid # to find account data back after ordering. ordered[hlstr.validate_name(accounts[mid][sort])] = mid memberkeys = ordered.keys() memberkeys.sort() if order == "desc": memberkeys.reverse() data += ''.join(map(html_build_compact, memberkeys)) def print_totals(totals): output = "" for total in totals: if totals[total] != 0: output += ''' <tr class="list_total"> <td colspan="5" class="total_left">%s</td> <td class="total_right">%d</td> </tr> ''' % (_("number of <strong>%s</strong> machines:") % total, totals[total]) return output data += ''' <tr> <td colspan="5"> </td></tr> %s <tr class="list_total"> <td colspan="5" class="total_left">%s</td> <td class="total_right">%d</td> </tr> | 5c6e0536d2363f635c0b43a50e8af7ca9d102236 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/5c6e0536d2363f635c0b43a50e8af7ca9d102236/machines.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1650,
16,
1062,
67,
1355,
16,
1524,
1546,
10358,
3113,
1353,
1546,
3691,
3113,
1664,
33,
7036,
16,
15942,
33,
7036,
16,
2826,
4333,
4672,
3536,
2562,
777,
15942,
316,
279,
1375... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1650,
16,
1062,
67,
1355,
16,
1524,
1546,
10358,
3113,
1353,
1546,
3691,
3113,
1664,
33,
7036,
16,
15942,
33,
7036,
16,
2826,
4333,
4672,
3536,
2562,
777,
15942,
316,
279,
1375... |
effective_date =fields.DateTime('Effective Date', readonly=True, states={ 'readonly': "state != 'draft'", }) | effective_date =fields.DateTime('Effective Date', readonly=True,) | def button_draft(self, cursor, user, ids, context=None): workflow_service = LocalService('workflow') for packing in self.browse(cursor, user, ids, context=context): workflow_service.trg_create(user, self._name, packing.id, cursor) return True | 8976e7d0fed471bfae1d91d991f045b9bc72f546 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/8976e7d0fed471bfae1d91d991f045b9bc72f546/packing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3568,
67,
17153,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
819,
33,
7036,
4672,
6095,
67,
3278,
273,
3566,
1179,
2668,
13815,
6134,
364,
2298,
310,
316,
365,
18,
25731,
12,
9216,
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,
3568,
67,
17153,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
819,
33,
7036,
4672,
6095,
67,
3278,
273,
3566,
1179,
2668,
13815,
6134,
364,
2298,
310,
316,
365,
18,
25731,
12,
9216,
16,
... |
], CONTEXT) | ], 0, None, None, CONTEXT) | def test0030float(self): ''' Test Float. ''' float1_id = self.float.create({ 'float': 1.1, }, CONTEXT) self.assert_(float1_id) | 52062c763bf1737b3f2071e48338f60845edc54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/52062c763bf1737b3f2071e48338f60845edc54d/test_tryton.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
713,
5082,
5659,
12,
2890,
4672,
9163,
7766,
5450,
18,
9163,
1431,
21,
67,
350,
273,
365,
18,
5659,
18,
2640,
12590,
296,
5659,
4278,
404,
18,
21,
16,
19879,
13862,
13,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
713,
5082,
5659,
12,
2890,
4672,
9163,
7766,
5450,
18,
9163,
1431,
21,
67,
350,
273,
365,
18,
5659,
18,
2640,
12590,
296,
5659,
4278,
404,
18,
21,
16,
19879,
13862,
13,
365,
18,
... |
data = u'' | lines = [] | def encode(self): schema = self.schema data = u'' | 9c304e96fd2e9000bc0705a1e22c27dae136e023 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/9c304e96fd2e9000bc0705a1e22c27dae136e023/Schema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
2890,
4672,
1963,
273,
365,
18,
4821,
501,
273,
582,
6309,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
2890,
4672,
1963,
273,
365,
18,
4821,
501,
273,
582,
6309,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
and not (isinstance(model_pool._columns[x[0]],fields.function) or isinstance(model_pool._columns[x[0]],fields.related)), fields_get.items())) | and not (isinstance(model_pool._columns[x[0]],fields.function) or isinstance(model_pool._columns[x[0]],fields.related) or isinstance(model_pool._columns[x[0]],fields.dummy)), fields_get.items())) | def _path_get(self,cr, uid, models, filter_ids=[]): | d87bc46608c9be71a24b77fcc816258ae66031d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d87bc46608c9be71a24b77fcc816258ae66031d6/base_report_creator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
803,
67,
588,
12,
2890,
16,
3353,
16,
4555,
16,
3679,
16,
1034,
67,
2232,
33,
8526,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
803,
67,
588,
12,
2890,
16,
3353,
16,
4555,
16,
3679,
16,
1034,
67,
2232,
33,
8526,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def refresh_icon(self, key, klass, data, icon): index = self.data[key].index | def refresh_icon(self, key, klass, data, icon_num): icon = self.data[key] index = icon.index del icon.data if 'extra_methods' in icon.__dict__: del icon.extra_methods | def refresh_icon(self, key, klass, data, icon): index = self.data[key].index obj = klass(key, data, index) self.data[key] = obj self.SetStringItem(index, 0, key, icon) | 2581bd9be1bab9d645f5a46e90a807d79311df25 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9927/2581bd9be1bab9d645f5a46e90a807d79311df25/icon_display.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
67,
3950,
12,
2890,
16,
498,
16,
7352,
16,
501,
16,
4126,
67,
2107,
4672,
4126,
273,
365,
18,
892,
63,
856,
65,
770,
273,
4126,
18,
1615,
1464,
4126,
18,
892,
309,
296,
7763,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
67,
3950,
12,
2890,
16,
498,
16,
7352,
16,
501,
16,
4126,
67,
2107,
4672,
4126,
273,
365,
18,
892,
63,
856,
65,
770,
273,
4126,
18,
1615,
1464,
4126,
18,
892,
309,
296,
7763,
... |
exercise_by_name[ex.name] = ex | self.exercise_by_name[ex.name] = ex | def __init__(self, exercises, user_exercises): self.exercises = exercises exercise_by_name = {} for ex in exercises: exercise_by_name[ex.name] = ex ex.coverers = [] ex.user_exercise = None ex.next_review = None # Not set initially ex.is_review_candidate = False ex.is_ancestor_review_candidate = None # Not set initially for ex in exercises: for covered in ex.covers: exercise_by_name[covered].coverers.append(ex) ex.prerequisites_ex = [] for prereq in ex.prerequisites: ex.prerequisites_ex.append(exercise_by_name[prereq]) for ex in user_exercises: exercise_by_name[ex.exercise].user_exercise = ex | bc35f7ac77c188a86d8196e17a4a19d7431722b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/bc35f7ac77c188a86d8196e17a4a19d7431722b7/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
431,
12610,
6141,
16,
729,
67,
8913,
71,
6141,
4672,
365,
18,
8913,
71,
6141,
273,
431,
12610,
6141,
24165,
67,
1637,
67,
529,
273,
2618,
364,
431,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
431,
12610,
6141,
16,
729,
67,
8913,
71,
6141,
4672,
365,
18,
8913,
71,
6141,
273,
431,
12610,
6141,
24165,
67,
1637,
67,
529,
273,
2618,
364,
431,
316,
... |
assert len(divvy) == 2 | assert len(divvy) == 2, len(divvy) | def test_random_20_a_succ_III(self): ht = khmer.new_hashbits(20, 4**13+1) filename = os.path.join(thisdir, 'test-data/random-20-a.fa') outfile = filename + '.out' | 3749dbc57b09888c4a058f1d60ad190792428f55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/3749dbc57b09888c4a058f1d60ad190792428f55/test_subset_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9188,
67,
3462,
67,
69,
67,
26560,
952,
67,
6954,
45,
12,
2890,
4672,
14049,
273,
417,
76,
6592,
18,
2704,
67,
2816,
6789,
12,
3462,
16,
1059,
636,
3437,
15,
21,
13,
1544,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9188,
67,
3462,
67,
69,
67,
26560,
952,
67,
6954,
45,
12,
2890,
4672,
14049,
273,
417,
76,
6592,
18,
2704,
67,
2816,
6789,
12,
3462,
16,
1059,
636,
3437,
15,
21,
13,
1544,
... |
if self.command.parents: | if parents: | def pre_process_files(self): """Prepare for committing.""" self.revision_id = self.gen_revision_id() self.inv_delta = [] # cache of texts for this commit, indexed by file-id self.lines_for_commit = {} | e881e144a2feaa0247b9e5aba3d1d9dda79f5f06 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8703/e881e144a2feaa0247b9e5aba3d1d9dda79f5f06/generic_processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
67,
2567,
67,
2354,
12,
2890,
4672,
3536,
7543,
364,
3294,
1787,
12123,
365,
18,
13057,
67,
350,
273,
365,
18,
4507,
67,
13057,
67,
350,
1435,
365,
18,
5768,
67,
9878,
273,
5378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
67,
2567,
67,
2354,
12,
2890,
4672,
3536,
7543,
364,
3294,
1787,
12123,
365,
18,
13057,
67,
350,
273,
365,
18,
4507,
67,
13057,
67,
350,
1435,
365,
18,
5768,
67,
9878,
273,
5378,
... |
if b.type == 'h': | if b.type in 'hd': | def add_bond( self, b, page): """adds bond item to page""" s = graphics_style( stroke_color=self.paper.any_color_to_rgb_string( b.line_color), stroke_width=Screen.px_to_cm( b.line_width)) style_name = self.get_appropriate_style_name( s) l_group = page # items to export if b.type == 'h': items = b.items else: if b.center: if not b.order == 2: print "shit!" items = [] else: items = [b.item] # simple doubles? if b.type == 'n' or (not b.simple_double and not b.center): items += b.second items += b.third line_items = [] else: line_items = b.second + b.third # the export itself if b.type in 'nh': for i in items: coords = map( Screen.px_to_cm, self.paper.coords( i)) self.create_oo_line( coords, page, style_name) elif b.type == 'b': # bold bonds width is determined by the wedge_width s = graphics_style( stroke_color=self.paper.any_color_to_rgb_string( b.line_color), stroke_width=Screen.px_to_cm( b.wedge_width)) b_style_name = self.get_appropriate_style_name( s) for i in items: coords = map( Screen.px_to_cm, self.paper.coords( i)) self.create_oo_line( coords, page, b_style_name) elif b.type == 'w': s = graphics_style( stroke_color=self.paper.any_color_to_rgb_string( b.line_color), fill_color=self.paper.any_color_to_rgb_string( b.line_color), stroke_width=Screen.px_to_cm( b.line_width)) style_name = self.get_appropriate_style_name( s) for i in items: coords = map( Screen.px_to_cm, self.paper.coords( i)) point_array = [] for i in range( 0, len( coords), 2): point_array.append( (coords[i], coords[i+1])) self.create_oo_polygon( point_array, page, style_name) elif b.type == 'h': for i in items: for p in i: coords = map( Screen.px_to_cm, self.paper.coords( p)) self.create_oo_line( coords, page, style_name) elif b.type == 'a': s = graphics_style( stroke_color=self.paper.any_color_to_rgb_string( b.line_color), stroke_width=Screen.px_to_cm( b.line_width)) style_name = self.get_appropriate_style_name( s) for i in items: coords = self.paper.coords( i) points = [] for j in range( 0, len( coords), 2): points.append( ( Screen.px_to_cm( coords[j]), Screen.px_to_cm(coords[j+1]))) self.create_oo_polyline( points, page, style_name) # line_items for i in line_items: coords = map( Screen.px_to_cm, self.paper.coords( i)) self.create_oo_line( coords, page, style_name) | a7f41f159ab1fedbb658f89ee3b35ba20b1965cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4298/a7f41f159ab1fedbb658f89ee3b35ba20b1965cf/openoffice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
26425,
12,
365,
16,
324,
16,
1363,
4672,
3536,
25428,
8427,
761,
358,
1363,
8395,
272,
273,
17313,
67,
4060,
12,
11040,
67,
3266,
33,
2890,
18,
27400,
18,
2273,
67,
3266,
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,
527,
67,
26425,
12,
365,
16,
324,
16,
1363,
4672,
3536,
25428,
8427,
761,
358,
1363,
8395,
272,
273,
17313,
67,
4060,
12,
11040,
67,
3266,
33,
2890,
18,
27400,
18,
2273,
67,
3266,
67,
... |
should = [('association', 'DoNothing', 'Specialization'), ('implements', 'Ancestor', 'Interface'), ('specialization', 'Specialization', 'Ancestor')] self._relations = should self.assertEquals(relations, should) | self.assertEquals(relations, self._should_rels) | def test_exctract_relations(self): """test extract_relations between classes""" cd = DefaultDiadefGenerator(Linker(PROJECT), HANDLER).visit(PROJECT)[1] cd.extract_relationships() relations = _process_relations(cd.relationships) should = [('association', 'DoNothing', 'Specialization'), ('implements', 'Ancestor', 'Interface'), ('specialization', 'Specialization', 'Ancestor')] self._relations = should self.assertEquals(relations, should) | da40d28740131445607779e678bf653f7cfc810b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/928/da40d28740131445607779e678bf653f7cfc810b/unittest_pyreverse_diadefs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
338,
299,
14266,
67,
15018,
12,
2890,
4672,
3536,
3813,
2608,
67,
15018,
3086,
3318,
8395,
7976,
273,
2989,
40,
1155,
536,
3908,
12,
2098,
264,
12,
17147,
3631,
24166,
14668,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
338,
299,
14266,
67,
15018,
12,
2890,
4672,
3536,
3813,
2608,
67,
15018,
3086,
3318,
8395,
7976,
273,
2989,
40,
1155,
536,
3908,
12,
2098,
264,
12,
17147,
3631,
24166,
14668,
2... |
if (r.isUnix and self.config["p_dot_trunc_only_win"]): | if (r.isUnix() and self.config["p_dot_trunc_only_win"]): | def identifyVuln(self, URL, Params, VulnParam, PostData, Language, isPost=False, blindmode=None, isUnix=None): xml2config = self.config["XML2CONFIG"] if (blindmode == None): | 265ad72f029ee3595b8259f24b1b66f8de3d2036 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4412/265ad72f029ee3595b8259f24b1b66f8de3d2036/targetScanner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9786,
58,
332,
82,
12,
2890,
16,
1976,
16,
8861,
16,
776,
332,
82,
786,
16,
5616,
751,
16,
9889,
16,
26047,
33,
8381,
16,
29696,
3188,
33,
7036,
16,
353,
18729,
33,
7036,
4672,
2025,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9786,
58,
332,
82,
12,
2890,
16,
1976,
16,
8861,
16,
776,
332,
82,
786,
16,
5616,
751,
16,
9889,
16,
26047,
33,
8381,
16,
29696,
3188,
33,
7036,
16,
353,
18729,
33,
7036,
4672,
2025,... |
f = urllib.urlopen('http://localhost:8814/') content = f.read() self.assert_('Welcome' in content) self.assert_('Username' in content) | browser = Browser() browser.go('http://localhost:8814/') self.assert_('Welcome' in browser.content) self.assert_('Username' in browser.content) | def test(self): f = urllib.urlopen('http://localhost:8814/') content = f.read() self.assert_('Welcome' in content) self.assert_('Username' in content) | d3ed95df44cfd67313028c2646f9fac780a0ec52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/d3ed95df44cfd67313028c2646f9fac780a0ec52/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
4672,
284,
273,
11527,
18,
295,
18589,
2668,
2505,
2207,
13014,
30,
5482,
3461,
2473,
13,
913,
273,
284,
18,
896,
1435,
365,
18,
11231,
67,
2668,
59,
16312,
11,
316,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
4672,
284,
273,
11527,
18,
295,
18589,
2668,
2505,
2207,
13014,
30,
5482,
3461,
2473,
13,
913,
273,
284,
18,
896,
1435,
365,
18,
11231,
67,
2668,
59,
16312,
11,
316,
91... |
for scsiinfo in os.popen('lsscsi -g %s' % option).readlines(): | for scsiinfo in os.popen('lsscsi -g %s 2>/dev/null' % option).readlines(): | def _vscsi_get_scsidevices_by_lsscsi(option = ""): """ get all scsi devices information by lsscsi """ devices = [] for scsiinfo in os.popen('lsscsi -g %s' % option).readlines(): s = scsiinfo.split() hctl = s[0][1:-1] try: devname = s[-2].split('/dev/')[1] except IndexError: devname = None try: sg = s[-1].split('/dev/')[1] scsi_id = _vscsi_get_scsiid(sg) except IndexError: sg = None scsi_id = None devices.append([hctl, devname, sg, scsi_id]) return devices | 61846fe25c6fbd569a6c2cff0101f7ee5dce99e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/61846fe25c6fbd569a6c2cff0101f7ee5dce99e7/vscsi_util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
90,
1017,
7722,
67,
588,
67,
1017,
5564,
2094,
67,
1637,
67,
3251,
1017,
7722,
12,
3482,
273,
1408,
4672,
3536,
336,
777,
888,
7722,
7166,
1779,
635,
7180,
1017,
7722,
3536,
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,
90,
1017,
7722,
67,
588,
67,
1017,
5564,
2094,
67,
1637,
67,
3251,
1017,
7722,
12,
3482,
273,
1408,
4672,
3536,
336,
777,
888,
7722,
7166,
1779,
635,
7180,
1017,
7722,
3536,
225,
... |
... content = TextField() | ... content = TextField(), ... time = DateTimeField() | def _to_json(self, value): if isinstance(value, Schema): return value.unwrap() return dict(value) | 28425a662c4cd6db57c590ed9aced7ea9268b782 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9373/28425a662c4cd6db57c590ed9aced7ea9268b782/schema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
869,
67,
1977,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
4611,
4672,
327,
460,
18,
318,
4113,
1435,
327,
2065,
12,
1132,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
869,
67,
1977,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
4611,
4672,
327,
460,
18,
318,
4113,
1435,
327,
2065,
12,
1132,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
item=self.todo.GetItem(todoIndexStart+i.wx()) | item=self.todo.GetItem(todoIndexStart+i.wx) | def updateTodo(self): self.todo.DeleteAllItems() todoIndex=0 self.todo.list=[] todoMax=[self.todoMax(child) for child in self.app.children]+[1] todoMax=max(todoMax) for child in self.app.children: todoIndexStart=todoIndex for task in child.todoList: line,urgency,entry=task item=self.todo.InsertStringItem(todoIndex, os.path.basename(child.fileName)) self.todo.SetStringItem(todoIndex, 1, str(line+1)) self.todo.SetStringItem(todoIndex, 2, str(urgency)) self.todo.SetStringItem(todoIndex, 3, entry) self.todo.list.append((child.fileName,line+1)) self.todo.SetItemData(item,todoIndex) todoIndex+=1 if child.todoMax==todoMax: for i in child.todoHighlights: item=self.todo.GetItem(todoIndexStart+i.wx()) item.SetBackgroundColour(wx.Colour(255,255,0)) self.todo.SetItem(item) | 0c6465cae6e831fd32cb581348049d6d5044ab4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2464/0c6465cae6e831fd32cb581348049d6d5044ab4d/Parent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
56,
7370,
12,
2890,
4672,
365,
18,
9012,
18,
2613,
1595,
3126,
1435,
10621,
1016,
33,
20,
365,
18,
9012,
18,
1098,
33,
8526,
10621,
2747,
22850,
2890,
18,
9012,
2747,
12,
3624,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
56,
7370,
12,
2890,
4672,
365,
18,
9012,
18,
2613,
1595,
3126,
1435,
10621,
1016,
33,
20,
365,
18,
9012,
18,
1098,
33,
8526,
10621,
2747,
22850,
2890,
18,
9012,
2747,
12,
3624,
1... |
for key in ('LDFLAGS', 'BASECFLAGS'): | for key in ('LDFLAGS', 'BASECFLAGS', 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): | def get_config_vars(*args): """With no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes everything needed to build extensions and install both pure modules and extensions. On Unix, this means every variable defined in Python's installed Makefile; on Windows and Mac OS it's a much smaller set. With arguments, return a list of values that result from looking up each argument in the configuration variable dictionary. """ global _config_vars if _config_vars is None: func = globals().get("_init_" + os.name) if func: func() else: _config_vars = {} # Normalized versions of prefix and exec_prefix are handy to have; # in fact, these are the standard versions used most places in the # Distutils. _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX if sys.platform == 'darwin': kernel_version = os.uname()[2] # Kernel version (8.4.3) major_version = int(kernel_version.split('.')[0]) if major_version < 8: # On Mac OS X before 10.4, check if -arch and -isysroot # are in CFLAGS or LDFLAGS and remove them if they are. # This is needed when building extensions on a 10.3 system # using a universal build of python. for key in ('LDFLAGS', 'BASECFLAGS'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) flags = re.sub('-isysroot [^ \t]*', ' ', flags) _config_vars[key] = flags if args: vals = [] for name in args: vals.append(_config_vars.get(name)) return vals else: return _config_vars | fd1593e1692d1fa21628f464050af225f8bcc579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/fd1593e1692d1fa21628f464050af225f8bcc579/sysconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1425,
67,
4699,
30857,
1968,
4672,
3536,
1190,
1158,
1775,
16,
327,
279,
3880,
434,
777,
1664,
3152,
9368,
364,
326,
783,
4072,
18,
225,
3055,
1230,
333,
6104,
7756,
3577,
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,
336,
67,
1425,
67,
4699,
30857,
1968,
4672,
3536,
1190,
1158,
1775,
16,
327,
279,
3880,
434,
777,
1664,
3152,
9368,
364,
326,
783,
4072,
18,
225,
3055,
1230,
333,
6104,
7756,
3577,
358,
... |
def _log(channel_id, trace_code='X', msg=None, timestamp=None): | def _log(channel_id, trace_code='-', msg=None, timestamp=None): | def _log(channel_id, trace_code='X', msg=None, timestamp=None): if timestamp is None: timestamp = datetime.datetime.now() entry = '%s %s %s' % (trace_code, channel_id, _format_datetime(timestamp)) if msg: entry += ' %s' % repr(msg)[1:-1] tracelog.info(entry) | c5f47c9805b00a8c4614a89136b93c34552e361b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7695/c5f47c9805b00a8c4614a89136b93c34552e361b/tracelog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1330,
12,
4327,
67,
350,
16,
2606,
67,
710,
2218,
17,
2187,
1234,
33,
7036,
16,
2858,
33,
7036,
4672,
309,
2858,
353,
599,
30,
2858,
273,
3314,
18,
6585,
18,
3338,
1435,
225,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1330,
12,
4327,
67,
350,
16,
2606,
67,
710,
2218,
17,
2187,
1234,
33,
7036,
16,
2858,
33,
7036,
4672,
309,
2858,
353,
599,
30,
2858,
273,
3314,
18,
6585,
18,
3338,
1435,
225,
12... |
str = '' include = string.split(include) | include = include.split() | def _formatStyle(self, include=''): str = '' include = string.split(include) keys = self.style.keys() if include: #2.1-safe version of the line below follows: #keys = filter(lambda k: k in include, keys) tmp = [] for word in keys: if word in include: tmp.append(word) keys = tmp | 37afe6db14252697b2c6f0bd32cd0cbf4e4ebe03 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/37afe6db14252697b2c6f0bd32cd0cbf4e4ebe03/renderSVG.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2139,
2885,
12,
2890,
16,
2341,
2218,
11,
4672,
2341,
273,
2341,
18,
4939,
1435,
1311,
273,
365,
18,
4060,
18,
2452,
1435,
309,
2341,
30,
468,
22,
18,
21,
17,
4626,
1177,
434,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2139,
2885,
12,
2890,
16,
2341,
2218,
11,
4672,
2341,
273,
2341,
18,
4939,
1435,
1311,
273,
365,
18,
4060,
18,
2452,
1435,
309,
2341,
30,
468,
22,
18,
21,
17,
4626,
1177,
434,
3... |
cty.c_uint, [cty.POINTER(FL_OBJECT), cty.c_int], | cty.c_uint, [cty.POINTER(FL_OBJECT), cty.c_int], | def fl_get_menu_maxitems(ob): """ fl_get_menu_maxitems(ob) -> items num. """ retval = _fl_get_menu_maxitems(ob) 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,
588,
67,
5414,
67,
1896,
3319,
12,
947,
4672,
3536,
1183,
67,
588,
67,
5414,
67,
1896,
3319,
12,
947,
13,
317,
1516,
818,
18,
3536,
225,
5221,
273,
389,
2242,
67,
588,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
588,
67,
5414,
67,
1896,
3319,
12,
947,
4672,
3536,
1183,
67,
588,
67,
5414,
67,
1896,
3319,
12,
947,
13,
317,
1516,
818,
18,
3536,
225,
5221,
273,
389,
2242,
67,
588,
67,
... |
if state["vertex_filt"] != None: self.set_vertex_filter(state["vertex_filt"][0], state["vertex_filt"][1]) if state["edge_filt"] != None: self.set_edge_filter(state["edge_filt"][0], state["edge_filt"][1]) | if state.has_key("vfilt"): vprop = self.vertex_properties["_Graph__pickle__vfilter"] self.set_vertex_filter(vprop, state["vfilt"]) if state.has_key("efilt"): eprop = self.edge_properties["_Graph__pickle__efilter"] self.set_edge_filter(vprop, state["efilt"]) | def __setstate__(self, state): self.__init__() blob = state["blob"] if blob != "": sio = StringIO(blob) self.load(sio, "xml") if state["vertex_filt"] != None: self.set_vertex_filter(state["vertex_filt"][0], state["vertex_filt"][1]) if state["edge_filt"] != None: self.set_edge_filter(state["edge_filt"][0], state["edge_filt"][1]) | e4c0938932a948700bcdc901170bce1120dfba12 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3516/e4c0938932a948700bcdc901170bce1120dfba12/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
2019,
972,
12,
2890,
16,
919,
4672,
365,
16186,
2738,
972,
1435,
4795,
273,
919,
9614,
10721,
11929,
309,
4795,
480,
1408,
30,
272,
1594,
273,
15777,
12,
10721,
13,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
2019,
972,
12,
2890,
16,
919,
4672,
365,
16186,
2738,
972,
1435,
4795,
273,
919,
9614,
10721,
11929,
309,
4795,
480,
1408,
30,
272,
1594,
273,
15777,
12,
10721,
13,
365,
18,
... |
if [child.get(field) for field in important[child.tag]] == \ [equiv[0].get(field) for field in important[child.tag]]: | if [child.get(field) for field in important[child.tag]] == \ [equiv[0].get(field) for field in important[child.tag]]: new.remove(child) old.remove(equiv[0]) else: print "+", lxml.etree.tostring(child), print "-", lxml.etree.tostring(equiv[0]), | def compare(new, old): for i in range(2): #this is hardcoded.. may be a better looping method for child in new.getchildren(): equiv = old.xpath('%s[@name="%s"]' % (child.tag, child.get('name'))) if not important.has_key(child.tag): print "tag type %s not handled" % (child.tag) continue if len(equiv) == 0: print "didn't find matching %s %s" % (child.tag, child.get('name')) continue elif len(equiv) >= 1: if child.tag == 'ConfigFile': if child.text != equiv[0].text: continue if [child.get(field) for field in important[child.tag]] == \ [equiv[0].get(field) for field in important[child.tag]]: if len(old.getchildren()) == 0 and len(new.getchildren()) == 0: return True if new.tag == 'Independant': name = 'Indep' else: name = new.get('name') print name, ["%s.%s" % (child.tag, child.get('name')) for child in old.getchildren()], print ["%s.%s" % (child.tag, child.get('name')) for child in new.getchildren()] return False | 073aa424c3201b869a8a008aa09652cbc9545836 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/073aa424c3201b869a8a008aa09652cbc9545836/crosscheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
2704,
16,
1592,
4672,
364,
277,
316,
1048,
12,
22,
4672,
468,
2211,
353,
7877,
24808,
838,
2026,
506,
279,
7844,
25004,
707,
364,
1151,
316,
394,
18,
588,
5906,
13332,
1298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
2704,
16,
1592,
4672,
364,
277,
316,
1048,
12,
22,
4672,
468,
2211,
353,
7877,
24808,
838,
2026,
506,
279,
7844,
25004,
707,
364,
1151,
316,
394,
18,
588,
5906,
13332,
1298,
... |
'Header', 'Iterators', 'MIMEAudio', 'MIMEBase', 'MIMEImage', 'MIMEMessage', 'MIMEText', 'Message', 'Parser', 'Utils', 'base64MIME', | 'Header', 'Iterators', 'MIMEAudio', 'MIMEBase', 'MIMEImage', 'MIMEMessage', 'MIMEMultipart', 'MIMENonMultipart', 'MIMEText', 'Message', 'Parser', 'Utils', 'base64MIME', | def test__all__(self): module = __import__('email') all = module.__all__ all.sort() self.assertEqual(all, ['Charset', 'Encoders', 'Errors', 'Generator', 'Header', 'Iterators', 'MIMEAudio', 'MIMEBase', 'MIMEImage', 'MIMEMessage', 'MIMEText', 'Message', 'Parser', 'Utils', 'base64MIME', 'message_from_file', 'message_from_string', 'quopriMIME']) | 3bd570bb549aa4927794cadcd005688d43efc369 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3bd570bb549aa4927794cadcd005688d43efc369/test_email.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
972,
454,
972,
12,
2890,
4672,
1605,
273,
1001,
5666,
972,
2668,
3652,
6134,
777,
273,
1605,
16186,
454,
972,
777,
18,
3804,
1435,
365,
18,
11231,
5812,
12,
454,
16,
10228,
9652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
972,
454,
972,
12,
2890,
4672,
1605,
273,
1001,
5666,
972,
2668,
3652,
6134,
777,
273,
1605,
16186,
454,
972,
777,
18,
3804,
1435,
365,
18,
11231,
5812,
12,
454,
16,
10228,
9652,
... |
self.logger_pid = None | self.logger_popen = None | def __init__(self, hostname, user="root", port=22, initialize=True, conmux_log="console.log", conmux_warnings="status.log", conmux_server=None, conmux_attach=None, netconsole_log=None, netconsole_port=6666, autodir=None): """ Construct a SSHHost object Args: hostname: network hostname or address of remote machine user: user to log in as on the remote machine port: port the ssh daemon is listening on on the remote machine """ self.hostname= hostname self.user= user self.port= port self.tmp_dirs= [] self.initialize = initialize self.autodir = autodir | 70f47baec37f656e768786a983ce39b6d7651ff6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/70f47baec37f656e768786a983ce39b6d7651ff6/ssh_host.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5199,
16,
729,
1546,
3085,
3113,
1756,
33,
3787,
16,
4046,
33,
5510,
16,
356,
81,
2616,
67,
1330,
1546,
8698,
18,
1330,
3113,
356,
81,
2616,
67,
12103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5199,
16,
729,
1546,
3085,
3113,
1756,
33,
3787,
16,
4046,
33,
5510,
16,
356,
81,
2616,
67,
1330,
1546,
8698,
18,
1330,
3113,
356,
81,
2616,
67,
12103,
... |
cmdVar = RO.KeyVariable.CmdVar( cmdStr = cmdStr, actor = self.echelleModel.actor, ) self.statusBar.doCmd(cmdVar) | self.doCmd(cmdStr, actor=self.echelleModel.actor) | def doApply(self, wdg=None): """Apply changes to configuration""" cmdStr = self.inputCont.getString() if not cmdStr: return | 94d83ab10cc3cf99c706f58fc8bb83b65aa73420 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6354/94d83ab10cc3cf99c706f58fc8bb83b65aa73420/ECamWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
7001,
12,
2890,
16,
14452,
75,
33,
7036,
4672,
3536,
7001,
3478,
358,
1664,
8395,
1797,
1585,
273,
365,
18,
2630,
660,
18,
588,
780,
1435,
309,
486,
1797,
1585,
30,
327,
2,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
7001,
12,
2890,
16,
14452,
75,
33,
7036,
4672,
3536,
7001,
3478,
358,
1664,
8395,
1797,
1585,
273,
365,
18,
2630,
660,
18,
588,
780,
1435,
309,
486,
1797,
1585,
30,
327,
2,
-100,
... |
SendMail(fromAddr, options.toAddr, startTime, buildName, "building", | SendMail(fromAddr, mailtoAddr, startTime, buildName, "building", | def main(): global buildscriptFile parser = OptionParser(usage="%prog [options] buildName", version="%prog 1.2") parser.add_option("-t", "--toAddr", action="store", type="string", dest="toAddr", default="buildreport@osafoundation.org", help="Where to mail script reports\n" " [default] buildreport@osafoundation.org") parser.add_option("-p", "--project", action="store", type="string", dest="project", default="chandler", help="Name of script to use (without .py extension)\n" "[default] chandler") parser.add_option("-o", "--output", action="store", type="string", dest="outputDir", default=os.path.join(os.environ['HOME'],"output"), help="Name of temp output directory\n" " [default] ~/output") parser.add_option("-a", "--alert", action="store", type="string", dest="alertAddr", default="buildman@osafoundation.org", help="E-mail to notify on build errors \n" " [default] buildman@osafoundation.org") | d408e117db6efa17cce01fc2c6e49ab155d30dfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d408e117db6efa17cce01fc2c6e49ab155d30dfd/tindertest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
1361,
4263,
812,
225,
2082,
273,
18862,
12,
9167,
11613,
14654,
306,
2116,
65,
1361,
461,
3113,
1177,
11613,
14654,
404,
18,
22,
7923,
2082,
18,
1289,
67,
3482,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
1361,
4263,
812,
225,
2082,
273,
18862,
12,
9167,
11613,
14654,
306,
2116,
65,
1361,
461,
3113,
1177,
11613,
14654,
404,
18,
22,
7923,
2082,
18,
1289,
67,
3482,
2932,
... |
Preferences.IS.registerImage('Images/Modules/JavaModule.png', getJavaModuleData()) Preferences.IS.registerImage('Images/Palette/JavaPalette.png', getJavaPaletteData()) | Preferences.IS.registerImage('Images/Modules/Java_s.png', getJavaModuleData()) Preferences.IS.registerImage('Images/Palette/Java.png', getJavaPaletteData()) | def getJavaModuleData(): return \ | e01ce6194ed4f3cb4f346d4ab9fbbfdffab7a0c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/e01ce6194ed4f3cb4f346d4ab9fbbfdffab7a0c3/JavaSupport.plug-in.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18911,
3120,
751,
13332,
327,
521,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18911,
3120,
751,
13332,
327,
521,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
allParams = None | allParams = [] | def update(self, value): self.stock_id = value[0] if self.stock_id: self.node.setAttribute('stock_id', self.stock_id) elif self.node.hasAttribute('stock_id'): self.node.removeAttribute('stock_id') xxxParam.update(self, value[1]) | 610e05a43333536658b4a620df1ba43791240903 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12725/610e05a43333536658b4a620df1ba43791240903/xxx.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
460,
4672,
365,
18,
15381,
67,
350,
273,
460,
63,
20,
65,
309,
365,
18,
15381,
67,
350,
30,
365,
18,
2159,
18,
542,
1499,
2668,
15381,
67,
350,
2187,
365,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
460,
4672,
365,
18,
15381,
67,
350,
273,
460,
63,
20,
65,
309,
365,
18,
15381,
67,
350,
30,
365,
18,
2159,
18,
542,
1499,
2668,
15381,
67,
350,
2187,
365,
18,
1... |
for lfn,repDict in res['Value']['Successful'].items(): if len(repDict.keys()) == 0: zeroReplicaFiles.append(lfn) if len(zeroReplicaFiles) > 0: res = self.removeFile(zeroReplicaFiles) | for lfn, repDict in res['Value']['Successful'].items(): if len( repDict.keys() ) == 0: zeroReplicaFiles.append( lfn ) if len( zeroReplicaFiles ) > 0: res = self.removeFile( zeroReplicaFiles ) | def removeReplica(self, lfn): res = self.__checkArgumentFormat(lfn) if not res['OK']: return res lfns = res['Value'] created = False if len(lfns) > 2: created = self.__openSession() failed = {} successful = {} for lfn,info in lfns.items(): if (not info.has_key('PFN')) or (not info.has_key('SE')): failed[lfn] = "Required parameters not supplied" else: pfn = info['PFN'] se = info['SE'] res = self.__removeReplica(pfn) if res['OK']: successful[lfn] = True else: failed[lfn] = res['Message'] lfnRemoved = successful.keys() if len(lfnRemoved) > 0: res = self.getReplicas(lfnRemoved,True) zeroReplicaFiles = [] if not res['OK']: if created: self.__closeSession() return res else: for lfn,repDict in res['Value']['Successful'].items(): if len(repDict.keys()) == 0: zeroReplicaFiles.append(lfn) if len(zeroReplicaFiles) > 0: res = self.removeFile(zeroReplicaFiles) if not res['OK']: if created: self.__closeSession() return res if created: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
14222,
12,
2890,
16,
328,
4293,
4672,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
80,
4293,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
18594,
2387,
273,
400,
3292,
620,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
14222,
12,
2890,
16,
328,
4293,
4672,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
80,
4293,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
18594,
2387,
273,
400,
3292,
620,
3... |
develop_egg_link = os.path.join(lib_py, 'site-packages', dist.project_name) + '.egg-link' | develop_egg_link = os.path.join(lib_py, 'site-packages', dist.project_name) + '.egg-link' | def uninstall(self, auto_confirm=False): assert self.check_if_exists(), "Cannot uninstall requirement %s, not installed" % (self.name,) dist = self.satisfied_by remove_paths = set() remove_from_easy_install_pth = set() easy_install_pth = os.path.join(lib_py, os.path.join('site-packages', 'easy-install.pth')) | 83f9d9c18b33d7eaefd25541ebfcc8eb4c825233 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12982/83f9d9c18b33d7eaefd25541ebfcc8eb4c825233/pip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16577,
12,
2890,
16,
3656,
67,
10927,
33,
8381,
4672,
1815,
365,
18,
1893,
67,
430,
67,
1808,
9334,
315,
4515,
16577,
12405,
738,
87,
16,
486,
5876,
6,
738,
261,
2890,
18,
529,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16577,
12,
2890,
16,
3656,
67,
10927,
33,
8381,
4672,
1815,
365,
18,
1893,
67,
430,
67,
1808,
9334,
315,
4515,
16577,
12405,
738,
87,
16,
486,
5876,
6,
738,
261,
2890,
18,
529,
16,
1... |
if len(indexList) > 1: | if len(indexList) >= 1: | def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # # Check to see if wiki file with name already exists # maxCount=0 while os.path.exists(wikiFilename) and maxCount < 10: sys.stdout.write("File %s already exists.\n"%\ os.path.split(wikiFilename)[1]) wikiFilename=wikiFilename+".wiki" maxCount=maxCount+1 # #Create the wikipage object etc # wikiPage=wiki(wikiFilename) # # Create top two trigger params tables # cTable=wikiPage.wikiTable(2,9) cTable.data=[ ["Trigger Type", "Rank", "FAR", "SNR", "IFOS(Coinc)", "Instruments(Active)", "Coincidence Time (s)", "Total Mass (mSol)", "Chirp Mass (mSol)" ], ["%s"%(wikiCoinc.type), "%s"%(wikiCoinc.rank), "%s"%(wikiCoinc.far), "%s"%(wikiCoinc.snr), "%s"%(wikiCoinc.ifos), "%s"%(wikiCoinc.instruments), "%s"%(wikiCoinc.time), "%s"%(wikiCoinc.mass), "%s"%(wikiCoinc.mchirp) ] ] pTable=wikiPage.wikiTable(len(wikiCoinc.sngls_in_coinc())+1,7) pTable.data[0]=[ "IFO", "GPS Time(s)", "SNR", "CHISQR", "Mass 1", "Mass 2", "Chirp Mass" ] for row,cSngl in enumerate(wikiCoinc.sngls_in_coinc()): pTable.data[row+1]=[ "%s"%(cSngl.ifo), "%s"%(cSngl.time), "%s"%(cSngl.snr), "%s"%(cSngl.chisqr), "%s"%(cSngl.mass1), "%s"%(cSngl.mass2), "%s"%(cSngl.mchirp) ] #Write the tables into the Wiki object wikiPage.putText("Coincident Trigger Event Information: %s\n"\ %(stfu_pipe.gpsTimeToReadableDate(wikiCoinc.time))) wikiPage.insertTable(cTable) wikiPage.putText("Corresponding Coincident Single IFO Trigger Information\n") wikiPage.insertTable(pTable) #Generate a table of contents to appear after candidate params table wikiPage.tableOfContents(3) #Begin including each checklist item as section with subsections wikiPage.section("Follow-up Checklist") #Put each checklist item wikiPage.subsection("Checklist Summary") wikiPage.subsubsection("Does this candidate pass this checklist?") wikiPage.subsubsection("Answer") wikiPage.subsubsection("Relevant Information and Comments") wikiPage.insertHR() # #First real checklist item wikiPage.subsection("#0 False Alarm Probability") wikiPage.subsubsection("Question") wikiPage.putText("What is the false alarm rate associated with this candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") farTable=wikiPage.wikiTable(2,1) farTable.setTableStyle("background-color: yellow; text-align center;") farTable.data[0][0]="False Alarm Rate" farTable.data[1][0]="%s"%(wikiCoinc.far) wikiPage.insertTable(farTable) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#1 Data Quality Flags") wikiPage.subsubsection("Question") wikiPage.putText("Can the data quality flags coincident with this candidate be safely disregarded?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPath=os.path.split(wikiFilename)[0] dqFileList=wikiFileFinder.get_findFlags() if len(dqFileList) != 1: sys.stdout.write("Warning: DQ flags data product import problem.\n") print "Found %i files."%len(dqFileList) for mf in dqFileList: print mf for myFile in dqFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#2 Veto Investigations") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate survive the veto investigations performed at its time?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") vetoFileList=wikiFileFinder.get_findVetos() if len(vetoFileList) != 1: sys.stdout.write("Warning: Veto flags data product import problem.\n") for myFile in vetoFileList:print myFile for myFile in vetoFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#3 IFO Status") wikiPage.subsubsection("Question") wikiPage.putText("Are the interferometers operating normally with a reasonable level of sensitivity around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") #Add link to Daily Stats if wikiCoinc.time <= endOfS5: statsLink=wikiPage.makeExternalLink("http://blue.ligo-wa.caltech.edu/scirun/S5/DailyStatistics/",\ "S5 Daily Stats Page") else: statsLink="This should be a link to S6 Daily Stats!\n" wikiPage.putText(statsLink) #Link figures of merit #Get link for all members of wikiCoinc wikiPage.putText("Figures of Merit\n") if wikiCoinc.time > endOfS5: fomLinks=dict() elems=0 for wikiSngl in wikiCoinc.sngls: if not(wikiSngl.ifo.upper().rstrip().lstrip() == 'V1'): fomLinks[wikiSngl.ifo]=stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo) elems=elems+len(fomLinks[wikiSngl.ifo]) else: for myLabel,myLink,myThumb in stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo): wikiPage.putText("%s\n"%(wikiPage.makeExternalLink(myLink,myLabel))) if elems%3 != 0: sys.stdout.write("Generation of FOM links seems incomplete!\n") cols=4 rows=(elems/3)+1 fTable=wikiPage.wikiTable(rows,cols) fTable.data[0]=["IFO,Shift","FOM1","FOM2","FOM3"] currentIndex=0 for myIFOKey in fomLinks.keys(): for label,link,thumb in fomLinks[myIFOKey]: myRow=currentIndex/int(3)+1 myCol=currentIndex%int(3)+1 fTable.data[myRow][0]=label thumbURL=thumb fTable.data[myRow][myCol]="%s"%(wikiPage.linkedRemoteImage(thumb,link)) currentIndex=currentIndex+1 wikiPage.insertTable(fTable) else: wikiPage.putText("Can not automatically fetch S5 FOM links.") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#4 Candidate Appearance") wikiPage.subsubsection("Question") wikiPage.putText("Do the Qscan figures show what we would expect for a gravitational-wave event?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() for sngl in wikiCoinc.sngls: frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'hoft') indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*/%s/*/%s/*index.html"%(frametype,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened.png"\ %(sngl.time,channelName)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened?thumb.png"\ %(sngl.time,channelName)) # #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("GW data channel scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >= 1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >= 1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: Candidate appearance plot import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#5 Seismic Plots") wikiPage.subsubsection("Question") wikiPage.putText("Is the seismic activity insignificant around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() for sngl in wikiCoinc.sngls: indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*index.html"%(sngl.ifo,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEIS?_512.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEIS?_512.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Seismic scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: Seismic plots product import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#6 Other environmental causes") wikiPage.subsubsection("Question") wikiPage.putText("Were the environmental disturbances (other than seismic) insignificant at the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() #Select only PEM channels for sngl in wikiCoinc.sngls: imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if myFile.upper().__contains__("PEM"): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if myFile.upper().__contains__("PEM"): thumbDict[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(imageDict[sngl.ifo]) < 1: wikiPage.putText("PEM scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: PEM plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#7 Auxiliary degree of freedom") wikiPage.subsubsection("Question") wikiPage.putText("Were the auxiliary channel transients coincident with the candidate insignificant?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() #Select only AUX channels for sngl in wikiCoinc.sngls: imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if not myFile.upper().__contains__("PEM"): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if not myFile.upper().__contains__("PEM"): thumbDict[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Other scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: AUX plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#8 Electronic Log Book") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the comments posted by the sci-mons or the operators in the e-log?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiLinkLHOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"H1"), "Hanford eLog") wikiLinkLLOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"L1"), "Livingston eLog") wikiPage.putText("%s\n\n%s\n\n"%(wikiLinkLHOlog,wikiLinkLLOlog)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#9 Glitch Report") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the weekly glitch report?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") if int(wikiCoinc.time) >= endOfS5: wikiLinkGlitch=wikiPage.makeExternalLink( "https://www.lsc-group.phys.uwm.edu/twiki/bin/view/DetChar/GlitchStudies", "Glitch Reports for S6" ) else: wikiLinkGlitch=wikiPage.makeExternalLink( "http://www.lsc-group.phys.uwm.edu/glitch/investigations/s5index.html#shift", "Glitch Reports for S5" ) wikiPage.putText("%s\n"%(wikiLinkGlitch)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#10 Snr versus time") wikiPage.subsubsection("Question") wikiPage.putText("Is this trigger significant in a SNR versus time plot of all triggers in its analysis chunk?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#11 Parameters of the candidate") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate have a high likelihood of being a gravitational-wave according to its parameters?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Effective Distance Ratio Test\n") effDList=wikiFileFinder.get_effDRatio() if len(effDList) != 1: sys.stdout.write("Warning: Effective Distance Test import problem.\n") for myFile in effDList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#12 Snr and Chisq") wikiPage.subsubsection("Question") wikiPage.putText("Are the SNR and CHISQ time series consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") # #Put plots SNR and Chi sqr # indexList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*.html") thumbList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_snr-*thumb.png") thumbList.extend(fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_chisq-*thumb.png")) thumbList.sort() indexList=[file2URL.convert(x) for x in indexList] thumbList=[file2URL.convert(x) for x in thumbList] #Two thumb types possible "_thumb.png" or ".thumb.png" imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] ifoCount=len(wikiCoinc.sngls) rowLabel={"SNR":1,"CHISQ":2} rowCount=len(rowLabel) colCount=ifoCount if len(indexList) >= 1: snrTable=wikiPage.wikiTable(rowCount+1,colCount+1) for i,sngl in enumerate(wikiCoinc.sngls): myIndex="" for indexFile in indexList: if indexFile.__contains__("_pipe_%s_FOLLOWUP_"%sngl.ifo): myIndex=indexFile if myIndex=="": snrTable.data[0][i+1]=" %s "%sngl.ifo else: snrTable.data[0][i+1]=wikiPage.makeExternalLink(myIndex,sngl.ifo) for col,sngl in enumerate(wikiCoinc.sngls): for row,label in enumerate(rowLabel.keys()): snrTable.data[row+1][0]=label for k,image in enumerate(imageList): if (image.__contains__("_%s-"%label.lower()) \ and image.__contains__("pipe_%s_FOLLOWUP"%sngl.ifo)): snrTable.data[row+1][col+1]=" %s "%(thumbList[k]) wikiPage.insertTable(snrTable) else: sys.stdout.write("Warning: SNR and CHISQ plots not found.\n") wikiPage.putText("SNR and CHISQ plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#13 Template bank veto") wikiPage.subsubsection("Question") wikiPage.putText("Is the bank veto value consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#14 Coherent studies") wikiPage.subsubsection("Question") wikiPage.putText("Are the triggers found in multiple interferometers coherent with each other?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") indexList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),"*.html") if len(indexList) > 1: myIndex=file2URL.convert(indexList[0]) wikiPage.putText(wikiPage.makeExternalLink(myIndex,\ "%s Coherence Study Results"%(wikiCoinc.ifos))) thumbList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),\ "PLOT_CHIA_%s_snr-squared*thumb.png"%(wikiCoinc.time)) imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] rowCount=len(imageList) colCount=1 cohSnrTimeTable=wikiPage.wikiTable(rowCount+1,colCount) cohSnrTimeTable.data[0][0]="%s Coherent SNR Squared Times Series"%(wikiCoinc.ifos) for i,image in enumerate(imageList): cohSnrTimeTable.data[i+1][0]=wikiPage.linkedRemoteImaage(image,thumbList[i]) wikiPage.insertTable(cohSnrTimeTable) else: sys.stdout.write("Warning: Coherent plotting jobs not found.\n") wikiPage.putText("Coherent Studies plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#15 Segmentation Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in segmentation?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#16 Calibration Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in calibration that are consistent with systematic uncertainties?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # | be59aad69241ec292bf7ade293713b7edd707ebd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/be59aad69241ec292bf7ade293713b7edd707ebd/makeCheckListWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
1564,
1098,
12,
13044,
5359,
33,
7036,
16,
13044,
27055,
71,
33,
7036,
16,
13044,
2471,
33,
7036,
16,
768,
22,
1785,
33,
7036,
4672,
3536,
2985,
358,
2911,
279,
866,
1098,
1625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
1564,
1098,
12,
13044,
5359,
33,
7036,
16,
13044,
27055,
71,
33,
7036,
16,
13044,
2471,
33,
7036,
16,
768,
22,
1785,
33,
7036,
4672,
3536,
2985,
358,
2911,
279,
866,
1098,
1625,
... |
logger.debug(sql2 % (data['signature'], data['version'], data['product'], data['total'], data['win'], data['mac'], data['lin'], data['rank'], last_rank, "", data['uptime_average'], data['users'])) | logger.debug(sql2 % (data['signature'], data['version'], data['product'], data['total'], data['win'], data['mac'], data['lin'], data['rank'], last_rank, "", data['uptime_average'], data['users'], update_time)) | def calc_ranks(crashes): """ Calculate the new ranks of the crashes, by total number of crashes """ ranks = [] for signature, data in crashes.items(): ranks.append([signature, data['total']]) ranks = sorted(ranks, key=itemgetter(1)) ranks.reverse() for rank in range(0, len(ranks)): crashes[ranks[rank][0]]['rank'] = rank + 1 if configContext.debug: for signature, data in crashes.items(): logger.debug("%s is ranked at: %d" % (signature, crashes[signature]['rank'])) | 5323035cc87dbb881b2513a10eff8e00ccc278ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12383/5323035cc87dbb881b2513a10eff8e00ccc278ab/topcrashes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
11500,
87,
12,
3353,
7690,
4672,
3536,
9029,
326,
394,
24828,
434,
326,
4422,
7690,
16,
635,
2078,
1300,
434,
4422,
7690,
3536,
24828,
273,
5378,
225,
364,
3372,
16,
501,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
11500,
87,
12,
3353,
7690,
4672,
3536,
9029,
326,
394,
24828,
434,
326,
4422,
7690,
16,
635,
2078,
1300,
434,
4422,
7690,
3536,
24828,
273,
5378,
225,
364,
3372,
16,
501,
316,
... |
library_dirs=[dblib_dir], runtime_library_dirs=[dblib_dir], | library_dirs=dblib_dir, runtime_library_dirs=dblib_dir, | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 637e5aa23d513f9f0eb05233f49db4bd638d2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/637e5aa23d513f9f0eb05233f49db4bd638d2eee/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... |
if self._resultSet is not []: | if self._resultSet: | def onItemLoad(self, view): self._callbacks = {} self.monitorCallbacks = {} try: if self._resultSet is not []: self._compile() self._queryStringIsStale = False self.stale = False else: self._queryStringIsStale = True except AttributeError: self._queryStringIsStale = True self.stale = True | cbc0be7ef8988247369a52928cabf8d83ba84c80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/cbc0be7ef8988247369a52928cabf8d83ba84c80/Query.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
1180,
2563,
12,
2890,
16,
1476,
4672,
365,
6315,
13316,
273,
2618,
365,
18,
10259,
10617,
273,
2618,
775,
30,
309,
365,
6315,
2088,
694,
30,
365,
6315,
11100,
1435,
365,
6315,
2271,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
1180,
2563,
12,
2890,
16,
1476,
4672,
365,
6315,
13316,
273,
2618,
365,
18,
10259,
10617,
273,
2618,
775,
30,
309,
365,
6315,
2088,
694,
30,
365,
6315,
11100,
1435,
365,
6315,
2271,... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 202) else quickfix.DoubleField.__init__(self, 202, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
26599,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
26599,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
... |
FL_Coord, STRING], | FL_Coord, STRING], | def fl_create_labelframe(type, x, y, w, h, label): """ fl_create_labelframe(type, x, y, w, h, label) -> object """ retval = _fl_create_labelframe(type, x, y, w, h, label) 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,
2640,
67,
1925,
3789,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
1925,
3789,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
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,
1183,
67,
2640,
67,
1925,
3789,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
1925,
3789,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
... |
for txt in glob.glob( os.path.join(statusObj.tmpdir, os.path.basename(hdr))[:-len(".hdr")] + ".[Tt][Xx][Tt]") | for txt in glob.glob( os.path.join(statusObj.tmpdir, os.path.basename(hdr))[:-len(".hdr")] + ".[Tt][Xx][Tt]"): | def genericBiosDup(statusObj, outputTopdir, logger, *args, **kargs): deps = {} packageXml = os.path.join(statusObj.tmpdir, "package.xml") # these are (int, str) tuple for sysId, reqver in common.getBiosDependencies( packageXml): deps[sysId] = reqver gotOne=False for hdr, id, ver in getHdrIdVer(statusObj.tmpdir): gotOne=True dest, packageIni = copyHdr(hdr, id, ver, outputTopdir, logger) if os.path.exists(os.path.join(dest, "package.xml")): os.unlink(os.path.join(dest, "package.xml")) if os.path.exists(packageXml): shutil.copy( packageXml, dest) for txt in glob.glob( "%s.[Tt][Xx][Tt]" % statusObj.file[:-len(".txt")] ): shutil.copyfile( txt, os.path.join(dest, "relnotes.txt") ) for txt in glob.glob( os.path.join(statusObj.tmpdir, os.path.basename(hdr))[:-len(".hdr")] + ".[Tt][Xx][Tt]") shutil.copyfile( txt, os.path.join(dest, "relnotes.txt") ) #setup deps minVer = deps.get(id) requires = "" if minVer: requires = "system_bios(ven_0x1028_dev_0x%04x) >= %s" % (id, minVer) common.setIni(packageIni, "package", requires=requires) writePackageIni(dest, packageIni) return True | 161f78de3845e3119b072c6cda552a723861c919 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/36/161f78de3845e3119b072c6cda552a723861c919/extract_bios.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5210,
38,
7441,
30419,
12,
2327,
2675,
16,
876,
3401,
1214,
16,
1194,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
8740,
273,
2618,
2181,
4432,
273,
1140,
18,
803,
18,
5701,
12,
2327,
2675... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5210,
38,
7441,
30419,
12,
2327,
2675,
16,
876,
3401,
1214,
16,
1194,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
8740,
273,
2618,
2181,
4432,
273,
1140,
18,
803,
18,
5701,
12,
2327,
2675... |
self.assertEquals(events, [(client.fileno(), _epoll.OUT), (server.fileno(), _epoll.OUT)]) | self.assertEquals( dict(events), {client.fileno(): _epoll.OUT, server.fileno(): _epoll.OUT}) | def testControlAndWait(self): port = socket.socket() port.bind(('127.0.0.1', 0)) port.listen(1) | 09f1fc70826634fec0dd123a6028d58c0f14463b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/09f1fc70826634fec0dd123a6028d58c0f14463b/test_epoll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3367,
1876,
5480,
12,
2890,
4672,
1756,
273,
2987,
18,
7814,
1435,
1756,
18,
4376,
12,
2668,
14260,
18,
20,
18,
20,
18,
21,
2187,
374,
3719,
1756,
18,
18085,
12,
21,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3367,
1876,
5480,
12,
2890,
4672,
1756,
273,
2987,
18,
7814,
1435,
1756,
18,
4376,
12,
2668,
14260,
18,
20,
18,
20,
18,
21,
2187,
374,
3719,
1756,
18,
18085,
12,
21,
13,
2,
-10... |
polygon.strokewidth = 16 | polygon.strokewidth = 12 | def changePolygon(): polygon = canvas.getChild(0) polygon.strokewidth = 16 polygon.color="FFFF00" pos = polygon.pos pos.append((10, 90)) polygon.pos = pos | 2f363736b7a0f54b60b2765120b4683855253046 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7300/2f363736b7a0f54b60b2765120b4683855253046/VectorTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
11787,
13332,
7154,
273,
5953,
18,
588,
1763,
12,
20,
13,
7154,
18,
334,
3250,
14434,
273,
2593,
7154,
18,
3266,
1546,
8998,
713,
6,
949,
273,
7154,
18,
917,
949,
18,
6923,
12443... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2549,
11787,
13332,
7154,
273,
5953,
18,
588,
1763,
12,
20,
13,
7154,
18,
334,
3250,
14434,
273,
2593,
7154,
18,
3266,
1546,
8998,
713,
6,
949,
273,
7154,
18,
917,
949,
18,
6923,
12443... |
o = sage.misc.misc.word_wrap(o, ncols=numcols) | def do_POST(self): global current_log, fulltext_log ctype, pdict = cgi.parse_header(self.headers.getheader('content-type')) length = int(self.headers.getheader('content-length')) if ctype == 'multipart/form-data': self.body = cgi.parse_multipart(self.rfile, pdict) elif ctype == 'application/x-www-form-urlencoded': qs = self.rfile.read(length) C = cgi.parse_qs(qs, keep_blank_values=1) number = eval(C.keys()[0]) current_dir = "%s/%d"%(directory,number) code_to_eval = C[C.keys()[0]][0] fulltext_log += '\n#%s\n'%('-'*70) + '\n' + code_to_eval + '\n\n' try: if number > len(current_log)-1: current_log.set_last_cmd(code_to_eval) number = len(current_log)-1 else: # re-evaluating a code block current_log[number].cmd = code_to_eval #code_to_eval = code_to_eval.replace('\\','') s = sage.misc.preparser.preparse_file(code_to_eval, magic=False, do_time=True, ignore_prompts=True) s = [x for x in s.split('\n') if len(x.split()) > 0 and \ x.lstrip()[0] != '#'] # remove all blank lines and comment lines if len(s) > 0: t = s[-1] if len(t) > 0 and not ':' in t and \ not t[0].isspace() and not t[:3] == '"""': t = t.replace("'","\\'") s[-1] = "exec compile('%s', '', 'single')"%t | 4769c49f27b63d5653f3113eb8009a910aa9fc8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/4769c49f27b63d5653f3113eb8009a910aa9fc8f/server1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3798,
12,
2890,
4672,
2552,
783,
67,
1330,
16,
1983,
955,
67,
1330,
11920,
16,
293,
1576,
273,
276,
10052,
18,
2670,
67,
3374,
12,
2890,
18,
2485,
18,
75,
546,
18105,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3798,
12,
2890,
4672,
2552,
783,
67,
1330,
16,
1983,
955,
67,
1330,
11920,
16,
293,
1576,
273,
276,
10052,
18,
2670,
67,
3374,
12,
2890,
18,
2485,
18,
75,
546,
18105,
2668,
... | |
npos, _ = predictorCorrectorStep(siv, pos, h, 1e-6) if not npos: return poly nx = int(npos[0]) ny = int(npos[1]) if nx != x or ny != y: | npos, nh = predictorCorrectorStep(siv, pos, h, 1e-6) h = max(min(h, nh), 1e-5) nix = int(npos[0]) niy = int(npos[1]) if nix != ix or niy != iy: | def followContour(siv, geomap, nodeLabel, h): pos = geomap.node(nodeLabel).position() x = round(pos[0]) y = round(pos[1]) poly = [pos] while True: npos, _ = predictorCorrectorStep(siv, pos, h, 1e-6) if not npos: return poly nx = int(npos[0]) ny = int(npos[1]) if nx != x or ny != y: # determine grid intersection diff = npos - pos if nx != x: intersectionX = round(npos[0]) intersectionY = pos[1]+(intersectionX-pos[0])*diff[1]/diff[0] else: intersectionY = round(npos[1]) intersectionX = pos[0]+(intersectionY-pos[1])*diff[0]/diff[1] intersection = Vector2(intersectionX, intersectionY) # connect to crossed Node node = geomap.nearestNode(intersection, 0.01) if node and node.label() == nodeLabel: # and len(poly) < 2: print "coming from node %d to %d, ignoring crossing, poly len: %d" \ % (nodeLabel, node.label(), len(poly)) pass elif node: poly.append(node.position()) print "added", geomap.addEdge(nodeLabel, node.label(), poly) if not node.degree() % 2: return poly = [node.position()] nodeLabel = node.label() else: sys.stderr.write("WARNING: level contour crossing grid at %s without intersection Node!\n" % repr(intersection)) x = nx y = ny poly.append(npos) pos = npos | 06f56e130542a1c91cca5aded8b43db966347318 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/06f56e130542a1c91cca5aded8b43db966347318/levelcontours.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2805,
660,
477,
12,
87,
427,
16,
7364,
438,
16,
756,
2224,
16,
366,
4672,
949,
273,
7364,
438,
18,
2159,
12,
2159,
2224,
2934,
3276,
1435,
619,
273,
3643,
12,
917,
63,
20,
5717,
677,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2805,
660,
477,
12,
87,
427,
16,
7364,
438,
16,
756,
2224,
16,
366,
4672,
949,
273,
7364,
438,
18,
2159,
12,
2159,
2224,
2934,
3276,
1435,
619,
273,
3643,
12,
917,
63,
20,
5717,
677,... |
p = _parse(source, pattern, flags) | p = _parse(source, state, flags) | def _parse(source, pattern, flags=()): # parse regular expression pattern into an operator list. subpattern = SubPattern(pattern) this = None while 1: if str(source.next) in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if this and this[0] not in SPECIAL_CHARS: subpattern.append((LITERAL, this)) elif this == "[": # character set set = [] | 842e911e887411eb043a164240fdb6b694895e87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/842e911e887411eb043a164240fdb6b694895e87/sre_parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
3168,
16,
1936,
16,
2943,
33,
1435,
4672,
225,
468,
1109,
6736,
2652,
1936,
1368,
392,
3726,
666,
18,
225,
720,
4951,
273,
2592,
3234,
12,
4951,
13,
225,
333,
273,
599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2670,
12,
3168,
16,
1936,
16,
2943,
33,
1435,
4672,
225,
468,
1109,
6736,
2652,
1936,
1368,
392,
3726,
666,
18,
225,
720,
4951,
273,
2592,
3234,
12,
4951,
13,
225,
333,
273,
599,
... |
pkgitems = {} | def fetchPackages(self, packages, caching=OPTIONAL, targetdir=None): fetcher = self._fetcher fetcher.reset() fetcher.setCaching(caching) if targetdir is None: localdir = os.path.join(sysconf.get("data-dir"), "packages/") if not os.path.isdir(localdir): os.makedirs(localdir) fetcher.setLocalDir(localdir, mangle=False) else: fetcher.setLocalDir(targetdir, mangle=False) pkgitems = {} for pkg in packages: loader = [x for x in pkg.loaders if not x.getInstalled()][0] info = loader.getInfo(pkg) urls = info.getURLs() pkgitems[pkg] = [] for url in urls: pkgitems[pkg].append(fetcher.enqueue(url, md5=info.getMD5(url), sha=info.getSHA(url), size=info.getSize(url), validate=info.validate)) fetcher.run(what="packages") failed = fetcher.getFailedSet() if failed: raise Error, "Failed to download packages:\n" + \ "\n".join([" %s: %s" % (url, failed[url]) for url in failed]) pkgpaths = {} for pkg in packages: pkgpaths[pkg] = [item.getTargetPath() for item in pkgitems[pkg]] return pkgpaths | 1c7fc105b076899caecec0e1ec9e513fa4221667 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/1c7fc105b076899caecec0e1ec9e513fa4221667/control.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
11425,
12,
2890,
16,
5907,
16,
11393,
33,
14165,
16,
1018,
1214,
33,
7036,
4672,
20521,
273,
365,
6315,
5754,
264,
20521,
18,
6208,
1435,
20521,
18,
542,
17712,
12,
17703,
310,
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,
2158,
11425,
12,
2890,
16,
5907,
16,
11393,
33,
14165,
16,
1018,
1214,
33,
7036,
4672,
20521,
273,
365,
6315,
5754,
264,
20521,
18,
6208,
1435,
20521,
18,
542,
17712,
12,
17703,
310,
13,... | |
m = imp.load_module(name, open(filename), filename,('.py','U',1)) | path = [os.path.dirname(filename)] file, pathname, description = imp.find_module(name, path) try: m = imp.load_module(name, file, pathname, description) finally: file.close() | def rundocs(self, filename=None): """ Run doc string tests found in filename. """ import doctest if filename is None: f = get_frame(1) filename = f.f_globals['__file__'] name = os.path.splitext(os.path.basename(filename))[0] m = imp.load_module(name, open(filename), filename,('.py','U',1)) tests = doctest.DocTestFinder().find(m) runner = doctest.DocTestRunner(verbose=False) for test in tests: runner.run(test) return | ab513918819e227187168222ca8a81dc996d89ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/ab513918819e227187168222ca8a81dc996d89ca/numpytest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
1074,
22280,
12,
2890,
16,
1544,
33,
7036,
4672,
3536,
1939,
997,
533,
7434,
1392,
316,
1544,
18,
3536,
1930,
31263,
395,
309,
1544,
353,
599,
30,
284,
273,
336,
67,
3789,
12,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
1074,
22280,
12,
2890,
16,
1544,
33,
7036,
4672,
3536,
1939,
997,
533,
7434,
1392,
316,
1544,
18,
3536,
1930,
31263,
395,
309,
1544,
353,
599,
30,
284,
273,
336,
67,
3789,
12,
21,... |
child = self.endColumn() | self.endColumn() | def endElement(self, name): if name == AdcData.tagName: child = self.endAdcData() elif name == AdcInterval.tagName: child = self.endAdcInterval() elif name == Array.tagName: child = self.endArray() elif name == Column.tagName: child = self.endColumn() elif name == Comment.tagName: child = self.endComment() elif name == Detector.tagName: child = self.endDetector() elif name == Dim.tagName: child = self.endDim() elif name == IGWDFrame.tagName: child = self.endIGWDFrame() elif name == LIGO_LW.tagName: child = self.endLIGO_LW() elif name == Param.tagName: child = self.endParam() elif name == Stream.tagName: child = self.endStream() elif name == Table.tagName: child = self.endTable() elif name == Time.tagName: child = self.endTime() else: raise ElementError, "unknown element tag %s" % name self.current = self.current.parentNode | 6a0495b866a107c919f9c3e2efc75bc3e19b0d53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/6a0495b866a107c919f9c3e2efc75bc3e19b0d53/ligolw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
12,
2890,
16,
508,
4672,
309,
508,
422,
4052,
71,
751,
18,
2692,
461,
30,
1151,
273,
365,
18,
409,
1871,
71,
751,
1435,
1327,
508,
422,
4052,
71,
4006,
18,
2692,
461,
30,
1151... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
12,
2890,
16,
508,
4672,
309,
508,
422,
4052,
71,
751,
18,
2692,
461,
30,
1151,
273,
365,
18,
409,
1871,
71,
751,
1435,
1327,
508,
422,
4052,
71,
4006,
18,
2692,
461,
30,
1151... |
'ja': u'Portal', 'pt': u'Desentrevistas', 'th': u'ไร้คำคม', 'zh-hk': u'香港語', 'zh-tw': u'香港語' | 'ja': u'Portal', 'pt': u'Desentrevistas', 'th': u'ไร้คำคม', 'zh-hk': u'香港語', 'zh-tw': u'香港語' | def __init__(self): family.Family.__init__(self) self.name = 'uncyclopedia' | 5291e54d99c50e05679c62b06fbab03ab3f57e0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/5291e54d99c50e05679c62b06fbab03ab3f57e0d/uncyclopedia_family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
551,
93,
7550,
1845,
1155,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
551,
93,
7550,
1845,
1155,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return | return 0 | def push(self, repo, patch=None, force=False, list=False, mergeq=None, all=False, move=False): diffopts = self.diffopts() wlock = repo.wlock() try: heads = [] for b, ls in repo.branchmap().iteritems(): heads += ls if not heads: heads = [nullid] if repo.dirstate.parents()[0] not in heads: self.ui.status(_("(working directory not at a head)\n")) | 4ed1cd18108dba38f4217aad85e12f4721ad3800 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/4ed1cd18108dba38f4217aad85e12f4721ad3800/mq.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1817,
12,
2890,
16,
3538,
16,
4729,
33,
7036,
16,
2944,
33,
8381,
16,
666,
33,
8381,
16,
2691,
85,
33,
7036,
16,
777,
33,
8381,
16,
3635,
33,
8381,
4672,
1901,
617,
1092,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1817,
12,
2890,
16,
3538,
16,
4729,
33,
7036,
16,
2944,
33,
8381,
16,
666,
33,
8381,
16,
2691,
85,
33,
7036,
16,
777,
33,
8381,
16,
3635,
33,
8381,
4672,
1901,
617,
1092,
273,
365,
... |
csweight, pw[prvpkg], order, "provide using %s" % prvpkg) | csweight, -getpriority(prvpkg), order, "provide using %s" % prvpkg) | def _pending(self, pending): trans = self._trans changeset = self._changeset locked = self._locked depth = self._depth if traceVerbosity<4: self.trace(1, "_pending(pw=%f, yw=%f)", (self._pruneweight, self._yieldweight)) else: self.trace(4, "_pending(%s, pw=%f, yw=%f)", (pending, self._pruneweight, self._yieldweight)) | 2ea21c157577a37e2ff2b7a187ee3525f5d9ba89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/2ea21c157577a37e2ff2b7a187ee3525f5d9ba89/transaction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9561,
12,
2890,
16,
4634,
4672,
906,
273,
365,
6315,
2338,
22463,
273,
365,
6315,
6329,
278,
8586,
273,
365,
6315,
15091,
3598,
273,
365,
6315,
5979,
309,
2606,
30594,
32,
24,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9561,
12,
2890,
16,
4634,
4672,
906,
273,
365,
6315,
2338,
22463,
273,
365,
6315,
6329,
278,
8586,
273,
365,
6315,
15091,
3598,
273,
365,
6315,
5979,
309,
2606,
30594,
32,
24,
30,
... |
exts.append( Extension('_App', ['app/_Appmodule.c'], | exts.append( Extension('_Res', ['res/_Resmodule.c'], | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | bc1f5a74849c11691df5d869e4f8617ce8f90688 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bc1f5a74849c11691df5d869e4f8617ce8f90688/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... |
OUTPUT: - an order in a quaternion algebra | OUTPUT: an order in a quaternion algebra | def left_order(self): """ Return the left order associated to this fractional ideal. | 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,
1019,
12,
2890,
4672,
3536,
2000,
326,
2002,
1353,
3627,
358,
333,
20462,
23349,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2002,
67,
1019,
12,
2890,
4672,
3536,
2000,
326,
2002,
1353,
3627,
358,
333,
20462,
23349,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 6 sage: a(2) 28 sage: a(7) 137438691328 sage: a.list(7) [6, 28, 496, 8128, 33550336, 8589869056, 137438691328] AUTHOR: -- Jaap Spies (2007-01-25) """ def __init__(self): | INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000396;a Perfect numbers: equal to sum of proper divisors. sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 6 sage: a(2) 28 sage: a(7) 137438691328 sage: a.list(7) [6, 28, 496, 8128, 33550336, 8589869056, 137438691328] AUTHOR: -- Jaap Spies (2007-01-25) """ | def _eval(self, n): return Integer(2**sloane.A000043(n) - 1) | d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
22,
636,
87,
383,
8806,
18,
37,
2787,
8942,
12,
82,
13,
300,
404,
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,
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,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
22,
636,
87,
383,
8806,
18,
37,
2787,
8942,
12,
82,
13,
300,
404,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
params={} | params=[] | def search_(self): learner=orngSVM.SVMLearner() for attr in ("name", "kernel_type", "degree", "shrinking", "probability", "normalization"): setattr(learner, attr, getattr(self, attr)) | c2c788214d6d56a96f45200b47b17d6dfaead1f2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/c2c788214d6d56a96f45200b47b17d6dfaead1f2/OWSVM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
12,
2890,
4672,
884,
24834,
33,
280,
3368,
55,
7397,
18,
23927,
1495,
2091,
1224,
1435,
364,
1604,
316,
7566,
529,
3113,
315,
8111,
67,
723,
3113,
315,
21361,
3113,
315,
674,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
12,
2890,
4672,
884,
24834,
33,
280,
3368,
55,
7397,
18,
23927,
1495,
2091,
1224,
1435,
364,
1604,
316,
7566,
529,
3113,
315,
8111,
67,
723,
3113,
315,
21361,
3113,
315,
674,
... |
if fileId in _memo1_ and _memo1_[fileId].root == rootNode: script = _memo1_[fileId] | if _memo2_[0] == rootNode: script = _memo2_[1] | def getScript(node, fileId): # TODO: checking the root nodes is a fix, as they sometimes differ (prob. caching) rootNode = findRoot(node) #if fileId in _memo1_: if fileId in _memo1_ and _memo1_[fileId].root == rootNode: script = _memo1_[fileId] else: #rootNode = findRoot(node) #if fileId in _memo1_ and _memo1_[fileId].root != rootNode: #print "-- re-calculating scopes for: %s" % fileId script = Script(rootNode, fileId) _memo1_[fileId] = script return script | c7e5ea9850537859dec1341be81f8d9fc4ace1f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/c7e5ea9850537859dec1341be81f8d9fc4ace1f9/DependencyLoader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22611,
12,
2159,
16,
21223,
4672,
468,
2660,
30,
6728,
326,
1365,
2199,
353,
279,
2917,
16,
487,
2898,
16594,
15221,
261,
7748,
18,
11393,
13,
10181,
273,
1104,
2375,
12,
2159,
13,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22611,
12,
2159,
16,
21223,
4672,
468,
2660,
30,
6728,
326,
1365,
2199,
353,
279,
2917,
16,
487,
2898,
16594,
15221,
261,
7748,
18,
11393,
13,
10181,
273,
1104,
2375,
12,
2159,
13,
468,
... |
if dE < 0: last_state.x = current_state.x.copy() last_state.cost = current_state.cost | last_state.x = current_state.x.copy() last_state.cost = current_state.cost | def anneal(func, x0, args=(), schedule='fast', full_output=0, T0=None, Tf=1e-12, maxeval=None, maxaccept=None, maxiter=400, boltzmann=1.0, learn_rate=0.5, feps=1e-6, quench=1.0, m=1.0, n=1.0, lower=-100, upper=100, dwell=50): """Minimize a function using simulated annealing. Schedule is a schedule class implementing the annealing schedule. Available ones are 'fast', 'cauchy', 'boltzmann' Inputs: func -- Function to be optimized x0 -- Parameters to be optimized over args -- Extra parameters to function schedule -- Annealing schedule to use (a class) full_output -- Return optional outputs T0 -- Initial Temperature (estimated as 1.2 times the largest cost-function deviation over random points in the range) Tf -- Final goal temperature maxeval -- Maximum function evaluations maxaccept -- Maximum changes to accept maxiter -- Maximum cooling iterations learn_rate -- scale constant for adjusting guesses boltzmann -- Boltzmann constant in acceptance test (increase for less stringent test at each temperature). feps -- Stopping relative error tolerance for the function value in last four coolings. quench, m, n -- Parameters to alter fast_sa schedule lower, upper -- lower and upper bounds on x0 (scalar or array). dwell -- The number of times to search the space at each temperature. Outputs: (xmin, {Jmin, T, feval, iter, accept,} retval) xmin -- Point giving smallest value found retval -- Flag indicating stopping condition: 0 : Cooled to global optimum 1 : Cooled to final temperature 2 : Maximum function evaluations 3 : Maximum cooling iterations reached 4 : Maximum accepted query locations reached Jmin -- Minimum value of function found T -- final temperature feval -- Number of function evaluations iter -- Number of cooling iterations accept -- Number of tests accepted. """ x0 = asarray(x0) schedule = eval(schedule+'_sa()') # initialize the schedule schedule.init(dims=len(x0),func=func,args=args,boltzmann=boltzmann,T0=T0, learn_rate=learn_rate, lower=lower, upper=upper, m=m, n=n, quench=quench, dwell=dwell) current_state, last_state, best_state = _state(), _state(), _state() feval = 0 done = 0 if T0 is None: x0 = schedule.getstart_temp(best_state) else: best_state.x = None best_state.cost = 300e8 last_state.x = asarray(x0).copy() fval = func(x0,*args) schedule.feval += 1 last_state.cost = fval if last_state.cost < best_state.cost: best_state.cost = fval best_state.x = asarray(x0).copy() schedule.T = schedule.T0 fqueue = [100,300,500,700] iter=0 while 1: for n in range(dwell): xnew = schedule.update_guess(x0) fval = func(xnew,*args) schedule.feval += 1 current_state.x = asarray(xnew).copy() current_state.cost = fval dE = current_state.cost - last_state.cost if schedule.accept_test(dE): if dE < 0: last_state.x = current_state.x.copy() last_state.cost = current_state.cost if last_state.cost < best_state.cost: best_state.x = last_state.x.copy() best_state.cost = last_state.cost schedule.update_temp() iter += 1 # Stopping conditions # 0) last saved values of f from each cooling step # are all very similar (effectively cooled) # 1) Tf is set and we are below it # 2) maxeval is set and we are past it # 3) maxiter is set and we are past it # 4) maxaccept is set and we are past it fqueue.append(squeeze(last_state.cost)) tmp = fqueue.pop(0) af = asarray(fqueue)*1.0 if all(abs((af-af[0])/af[0]) < feps): retval = 0 if abs(af[-1]-best_state.cost) > feps*10: retval = 5 print "Warning: Cooled to %f at %f but this is not" \ % (squeeze(last_state.cost), squeeze(last_state.x)) \ + " the smallest point found." break if (Tf is not None) and (schedule.T < Tf): retval = 1 break if (maxeval is not None) and (schedule.feval > maxeval): retval = 2 break if (iter > maxiter): print "Warning: Maximum number of iterations exceeded." retval = 3 break if (maxaccept is not None) and (schedule.accepted > maxaccept): retval = 4 break if full_output: return best_state.x, best_state.cost, schedule.T, \ schedule.feval, iter, schedule.accepted, retval else: return best_state.x, retval | 5d83f70d8d9b65f40e4932969c9d8113c8f4f8cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/5d83f70d8d9b65f40e4932969c9d8113c8f4f8cd/anneal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
392,
4644,
287,
12,
644,
16,
619,
20,
16,
833,
33,
9334,
4788,
2218,
8076,
2187,
1983,
67,
2844,
33,
20,
16,
399,
20,
33,
7036,
16,
399,
74,
33,
21,
73,
17,
2138,
16,
943,
8622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
392,
4644,
287,
12,
644,
16,
619,
20,
16,
833,
33,
9334,
4788,
2218,
8076,
2187,
1983,
67,
2844,
33,
20,
16,
399,
20,
33,
7036,
16,
399,
74,
33,
21,
73,
17,
2138,
16,
943,
8622,
... |
a = a._ppimport_module | a = getattr(a,'_ppimport_module',a) | def ppresolve(a,ignore_failure=None): """ Return resolved object a. a can be module name, postponed module, postponed modules attribute, string representing module attribute, or any Python object. """ global _ppimport_is_enabled if _ppimport_is_enabled: disable() a = ppresolve(a,ignore_failure=ignore_failure) enable() return a if type(a) is type(''): ns = a.split('.') if ignore_failure: try: a = ppimport(ns[0]) except: return a else: a = ppimport(ns[0]) b = [ns[0]] del ns[0] while ns: if hasattr(a,'_ppimport_importer') or \ hasattr(a,'_ppimport_module'): a = a._ppimport_module if hasattr(a,'_ppimport_attr'): a = a._ppimport_attr b.append(ns[0]) del ns[0] if ignore_failure and not hasattr(a, b[-1]): a = '.'.join(ns+b) b = '.'.join(b) if sys.modules.has_key(b) and sys.modules[b] is None: del sys.modules[b] return a a = getattr(a,b[-1]) if hasattr(a,'_ppimport_importer') or \ hasattr(a,'_ppimport_module'): a = a._ppimport_module if hasattr(a,'_ppimport_attr'): a = a._ppimport_attr return a | 932e8becfb3ad5bd3f7bb1de237c15e79aa1f00c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/932e8becfb3ad5bd3f7bb1de237c15e79aa1f00c/ppimport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8228,
10828,
12,
69,
16,
6185,
67,
12251,
33,
7036,
4672,
3536,
2000,
4640,
733,
279,
18,
225,
279,
848,
506,
1605,
508,
16,
1603,
500,
329,
1605,
16,
1603,
500,
329,
4381,
1566,
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,
8228,
10828,
12,
69,
16,
6185,
67,
12251,
33,
7036,
4672,
3536,
2000,
4640,
733,
279,
18,
225,
279,
848,
506,
1605,
508,
16,
1603,
500,
329,
1605,
16,
1603,
500,
329,
4381,
1566,
16,
... |
line() | line("map-open-2") | def compileNode(node, enableDebug=False): global indent global pretty if node.getChild("commentsBefore", False) != None: line() for comment in node.getChild("commentsBefore").children: # Additional new lines before big comment if comment.get("detail", False) == "multi": line() pretty += comment.get("text") # New line after singleline comment without line-ending if not comment.get("text").endswith("\n"): line() # Additional new lines after big comment elif comment.get("detail", False) == "multi": line() ################################################################## # Opening... ################################################################## if node.type == "map": if node.hasChildren(): line() pretty += "{" if node.hasChildren(): plus() line() elif node.type == "array": if node.hasChildren(): line() pretty += "[" if node.hasChildren(): plus() line() elif node.type == "block": line() pretty += "{" plus() line() elif node.type == "params": pretty += "(" elif node.type == "group": pretty += "(" elif node.type == "case": minus() line() pretty += "case " elif node.type == "catch": pretty += "catch" elif node.type == "finally": pretty += "finally" elif node.type == "delete": pretty += "delete " elif node.type == "break": pretty += "break" if node.get("label", False): pretty += " " + node.get("label", False) elif node.type == "continue": pretty += "continue" if node.get("label", False): pretty += " " + node.get("label", False) elif node.type == "elseStatement": line() pretty += "else" # This is a elseStatement without a block around (a set of {}) if not node.hasChild("block"): pretty += " " elif node.type == "switch" and node.get("switchType") == "case": pretty += "switch" elif node.type == "switch" and node.get("switchType") == "catch": pretty += "try" elif node.type == "throw": pretty += "throw " elif node.type == "instantiation": pretty += "new " elif node.type == "return": pretty += "return" if node.hasChildren(): pretty += " " elif node.type == "definitionList": pretty += "var " elif node.type == "default": minus() line() pretty += "default:" plus() line() elif node.type == "keyvalue": keyString = node.get("key") keyQuote = node.get("quotation", False) if keyQuote != None: # print "USE QUOTATION" if keyQuote == "doublequotes": keyString = '"' + keyString + '"' else: keyString = "'" + keyString + "'" elif keyString in config.JSPROTECTED or not KEY.match(keyString): print "ATTENTION: Auto protect key: %s" % keyString keyString = "\"" + keyString + "\"" pretty += keyString + " : " elif node.type == "expression": if node.parent.type == "loop": loopType = node.parent.get("loopType") if loopType == "DO": pretty += "while" # open expression block of IF/WHILE/DO-WHILE/FOR statements pretty += "(" elif node.parent.type == "catch": # open expression block of CATCH statement pretty += "(" elif node.parent.type == "switch" and node.parent.get("switchType") == "case": # open expression block of SWITCH statement pretty += "(" elif node.type == "loop": loopType = node.get("loopType") if loopType == "IF": pretty += "if" elif loopType == "WHILE": pretty += "while" elif loopType == "FOR": pretty += "for" elif loopType == "DO": pretty += "do" elif loopType == "WITH": pretty += "with" else: print "UNKNOWN LOOP TYPE: %s" % loopType elif node.type == "function": functionDeclHasParams = False pretty += "function" functionName = node.get("name", False) if functionName != None: pretty += " %s" % functionName elif node.type == "identifier": name = node.get("name", False) if name != None: pretty += name elif node.type == "call": callHasParams = False elif node.type == "definition": if node.parent.type != "definitionList": pretty += "var " pretty += node.get("identifier") elif node.type == "constant": if node.get("constantType") == "string": if node.get("detail") == "singlequotes": pretty += "'" else: pretty += '"' pretty += node.get("value") if node.get("detail") == "singlequotes": pretty += "'" else: pretty += '"' else: pretty += node.get("value") elif node.type == "third": if node.parent.type == "operation": if node.parent.get("operator") == "HOOK": pretty += " : " else: print "Unknown third argument... Not a hook" elif node.type == "labelTerminator": pretty += ":" ################################################################## # Children content ################################################################## if node.hasChildren(): childPosition = 1 childrenNumber = 0 # We need to ignore comment blocks # childrenNumber = len(node.children) for child in node.children: if child.type == "comment" or child.type == "commentsBefore": pass else: childrenNumber += 1 previousType = None for child in node.children: if child.type == "comment" or child.type == "commentsBefore": continue # Hints for close of node later if node.type == "call" and child.type == "params": callHasParams = True elif node.type == "function": if child.type == "params": functionDeclHasParams = True elif child.type == "body" and not functionDeclHasParams: # has no params before body, fix it here, and add body afterwards pretty += "()" functionDeclHasParams = True elif node.type == "definition" and child.type == "assignment": oper = child.get("operator", False) pretty += " " if oper != None: pretty += getTokenSource(oper) else: pretty += "=" pretty += " " elif node.type == "accessor" and child.type == "key": pretty += "[" elif node.type == "accessor" and child.type == "right": pretty += "." elif node.type == "loop" and node.get("loopType") == "FOR": if child.type == "first": pretty += "(" elif child.type == "statement": pretty += ")" else: if child.type == "second" and node.getChild("first", False) == None: pretty += "(" if child.type == "third" and node.getChild("first", False) == None and node.getChild("second", False) == None: pretty += "(" if not pretty.endswith(";") and not pretty.endswith("\n"): pretty += ";" elif node.type == "operation" and node.get("left", False) == "true": op = node.get("operator") if op == "TYPEOF": pretty += "typeof " elif op == None: print "BAD OPERATOR [A]: %s" % op else: pretty += getTokenSource(op) # Add child compileNode(child, enableDebug) if node.type == "operation" and child.type == "first" and node.get("left", False) != "true": op = node.get("operator") if op == "IN": pretty += " in " elif op == "INSTANCEOF": pretty += " instanceof " elif op == None: print "BAD OPERATOR [B]: %s" % op else: pretty += " " pretty += getTokenSource(op) pretty += " " elif node.type == "assignment" and child.type == "left": oper = node.get("operator", False) pretty += " " if oper != None: pretty += getTokenSource(oper) else: pretty += "=" pretty += " " elif node.type == "accessor" and child.type == "key": pretty += "]" # Separate children in parent list if childPosition < childrenNumber: if node.type == "variable": pretty += "." elif node.type == "map": pretty += ", " line() elif node.type == "array": pretty += ", " line() elif node.type == "definitionList": pretty += ", " elif node.type == "params": pretty += ", " elif node.type == "statementList": pretty += ", " separators = [ "block", "assignment", "call", "operation", "definition", "definitionList", "return", "break", "continue", "delete", "accessor", "instantiation", "throw", "variable", "function" ] not_after = [ "case", "default" ] not_in = [ "definitionList", "statementList", "params", "variable", "array" ] if node.type in [ "block", "file", "switch" ]: if not previousType in not_after: if child.type in separators: # pretty += "[[SEMI]]" semicolon() # not last child if childPosition == childrenNumber and node.type in [ "block", "switch", "file" ]: pass else: # pretty += "[[LINE]]" line() # Next... childPosition += 1 previousType = child.type ################################################################## # Closing... ################################################################## if node.type == "map": if node.hasChildren(): minus() line() pretty += "}" elif node.type == "array": if node.hasChildren(): minus() line() pretty += "]" elif node.type == "block": minus() line() pretty += "}" # Not it: # Function assignment if node.parent.type == "body" and node.parent.parent.type == "function" and node.parent.parent.parent.type == "right": pass else: line() elif node.type == "params": pretty += ")" elif node.type == "switch" and node.get("switchType") == "case": minus() minus() line() pretty += "}" # additional new line line() line() elif node.type == "group": pretty += ")" elif node.type == "case": pretty += ":" plus() line() elif node.type == "call" and not callHasParams: pretty += "()" elif node.type == "function" and not functionDeclHasParams: pretty += "()" elif node.type == "expression": if node.parent.type == "loop": pretty += ")" elif node.parent.type == "catch": pretty += ")" elif node.parent.type == "switch" and node.parent.get("switchType") == "case": pretty += ")" line() pretty += "{" plus() plus() elif node.type == "case": plus() line() | 9899d5c45563dd4f9057d173402244e0cf855c51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/9899d5c45563dd4f9057d173402244e0cf855c51/prettyprint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
907,
12,
2159,
16,
4237,
2829,
33,
8381,
4672,
225,
2552,
3504,
2552,
7517,
282,
309,
756,
18,
588,
1763,
2932,
9231,
4649,
3113,
1083,
13,
480,
599,
30,
980,
2932,
1458,
17,
319... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
907,
12,
2159,
16,
4237,
2829,
33,
8381,
4672,
225,
2552,
3504,
2552,
7517,
282,
309,
756,
18,
588,
1763,
2932,
9231,
4649,
3113,
1083,
13,
480,
599,
30,
980,
2932,
1458,
17,
319... |
isContainer = self._isContainer(attr) | hasLength = self._hasLength(attr) | def run(self): try: while True: # yield up here instead of at the end, since we skip back to the # top of the while loop from various points yield None #import pdb;pdb.set_trace() curObj = None if self._curObjRef is None: self._curObjRef = self._baseObjRef try: for result in self._curObjRef.getContainer(): yield None curObj = result except: self.notify.debug('lost current container: %s' % self._curObjRef) # that container is gone, try again self._curObjRef = None continue self.notify.debug('--> %s' % self._curObjRef) | d9560fa19bec29d4ea08e0b58cd1b7384659f9ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/d9560fa19bec29d4ea08e0b58cd1b7384659f9ff/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
775,
30,
1323,
1053,
30,
468,
2824,
731,
2674,
3560,
434,
622,
326,
679,
16,
3241,
732,
2488,
1473,
358,
326,
468,
1760,
434,
326,
1323,
2798,
628,
11191,
3143,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
775,
30,
1323,
1053,
30,
468,
2824,
731,
2674,
3560,
434,
622,
326,
679,
16,
3241,
732,
2488,
1473,
358,
326,
468,
1760,
434,
326,
1323,
2798,
628,
11191,
3143,
2... |
def getCacheDir(tmpdir='/var/tmp', reuse=True): | def getCacheDir(tmpdir='/var/tmp', reuse=True, prefix='yum-'): | def getCacheDir(tmpdir='/var/tmp', reuse=True): """return a path to a valid and safe cachedir - only used when not running as root or when --tempcache is set""" uid = os.geteuid() try: usertup = pwd.getpwuid(uid) username = usertup[0] except KeyError: return None # if it returns None then, well, it's bollocksed prefix = 'yum-' if reuse: # check for /var/tmp/yum-username-* - prefix = 'yum-%s-' % username dirpath = '%s/%s*' % (tmpdir, prefix) cachedirs = sorted(glob.glob(dirpath)) for thisdir in cachedirs: stats = os.lstat(thisdir) if S_ISDIR(stats[0]) and S_IMODE(stats[0]) == 448 and stats[4] == uid: return thisdir # make the dir (tempfile.mkdtemp()) cachedir = tempfile.mkdtemp(prefix=prefix, dir=tmpdir) return cachedir | 3f0d169e7eeb965c1e9d438fa6f278a8ab204950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/3f0d169e7eeb965c1e9d438fa6f278a8ab204950/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8577,
1621,
12,
5645,
1214,
2218,
19,
1401,
19,
5645,
2187,
11827,
33,
5510,
16,
1633,
2218,
93,
379,
6627,
4672,
3536,
2463,
279,
589,
358,
279,
923,
471,
4183,
3472,
481,
300,
1338,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8577,
1621,
12,
5645,
1214,
2218,
19,
1401,
19,
5645,
2187,
11827,
33,
5510,
16,
1633,
2218,
93,
379,
6627,
4672,
3536,
2463,
279,
589,
358,
279,
923,
471,
4183,
3472,
481,
300,
1338,
... |
self._priorValuesStack = Stack() self._curParamStack = Stack() | self._curParamStack = [] self._priorValuesStack = [] | def __init__(self, *args, **kwArgs): assert issubclass(self.ParamSet, ParamObj.ParamSet) # If you pass in a ParamSet obj, its values will be applied to this # object in the constructor. params = None if len(args) == 1 and len(kwArgs) == 0: # if there's one argument, assume that it's a ParamSet params = args[0] elif len(kwArgs) > 0: assert len(args) == 0 # if we've got keyword arguments, make a ParamSet out of them params = self.ParamSet(**kwArgs) | bc118592712a1b70a0b9a248ebe439604a6431c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/bc118592712a1b70a0b9a248ebe439604a6431c3/PythonUtil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
9987,
2615,
4672,
1815,
14664,
12,
2890,
18,
786,
694,
16,
3014,
2675,
18,
786,
694,
13,
468,
971,
1846,
1342,
316,
279,
3014,
694,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
9987,
2615,
4672,
1815,
14664,
12,
2890,
18,
786,
694,
16,
3014,
2675,
18,
786,
694,
13,
468,
971,
1846,
1342,
316,
279,
3014,
694,
... |
{'name':'VAT%s%%'%(p_tax*100), 'description':'VAT%s%%'%(p_tax*100), | {'name':'TAX%s%%'%(p_tax*100), 'description':'TAX%s%%'%(p_tax*100), | def execute(self, cr, uid, ids, context=None): if context is None: context = {} super(account_installer, self).execute(cr, uid, ids, context=context) record = self.browse(cr, uid, ids, context=context)[0] company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id for res in self.read(cr, uid, ids): if record.charts == 'configurable': mod_obj = self.pool.get('ir.model.data') fp = tools.file_open(opj('account','configurable_account_chart.xml')) tools.convert_xml_import(cr, 'account', fp, {}, 'init',True, None) fp.close() self.generate_configurable_chart(cr, uid, ids, context=context) obj_tax = self.pool.get('account.tax') obj_product = self.pool.get('product.product') ir_values = self.pool.get('ir.values') s_tax = (res.get('sale_tax',0.0))/100 p_tax = (res.get('purchase_tax',0.0))/100 tax_val = {} default_tax = [] | 3ac06a178ac1b3e9a98090f621c16012c5ba4454 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3ac06a178ac1b3e9a98090f621c16012c5ba4454/installer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
2240,
12,
4631,
67,
20163,
16,
365,
2934,
8837,
12,
3353,
16,
4555,
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,
1836,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
2240,
12,
4631,
67,
20163,
16,
365,
2934,
8837,
12,
3353,
16,
4555,
16,... |
rho = L.solve(R, r[1:]) | rho = np.linalg.solve(R, r[1:]) | def yule_walker(self, X, order=1, method="unbiased", df=None, inv=False): """ Estimate AR(p) parameters from a sequence X using Yule-Walker equation. unbiased or maximum-likelihood estimator (mle) See, for example: http://en.wikipedia.org/wiki/Autoregressive_moving_average_model :Parameters: X : a 1d ndarray method : ``string`` Method can be "unbiased" or "mle" and this determines denominator in estimate of autocorrelation function (ACF) at lag k. If "mle", the denominator is n=r.shape[0], if "unbiased" the denominator is n-k. df : ``integer`` Specifies the degrees of freedom. If df is supplied, then it is assumed the X has df degrees of freedom rather than n. """ method = str(method).lower() if method not in ["unbiased", "mle"]: raise ValueError, "ACF estimation method must be 'unbiased' \ or 'MLE'" X = np.asarray(X, np.float64) X -= X.mean() n = df or X.shape[0] if method == "unbiased": denom = lambda k: n - k else: denom = lambda k: n if len(X.shape) != 1: raise ValueError, "expecting a vector to estimate AR parameters" r = np.zeros(order+1, np.float64) r[0] = (X**2).sum() / denom(0) for k in range(1,order+1): r[k] = (X[0:-k]*X[k:]).sum() / denom(k) R = toeplitz(r[:-1]) rho = L.solve(R, r[1:]) sigmasq = r[0] - (r[1:]*rho).sum() if inv == True: return rho, np.sqrt(sigmasq), L.inv(R) else: return rho, np.sqrt(sigmasq) | d2943ba86f6fded3206a1c709529212d0c25be17 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12658/d2943ba86f6fded3206a1c709529212d0c25be17/regression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
677,
725,
67,
11348,
264,
12,
2890,
16,
1139,
16,
1353,
33,
21,
16,
707,
1546,
318,
13266,
8905,
3113,
3013,
33,
7036,
16,
2198,
33,
8381,
4672,
3536,
17787,
4988,
6052,
12,
84,
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,
677,
725,
67,
11348,
264,
12,
2890,
16,
1139,
16,
1353,
33,
21,
16,
707,
1546,
318,
13266,
8905,
3113,
3013,
33,
7036,
16,
2198,
33,
8381,
4672,
3536,
17787,
4988,
6052,
12,
84,
13,
... |
help="filename with isochore segments. Also accepts a glob in parantheses [default=%default]." ) | help="filename with isochore segments. Also accepts a glob in parentheses [default=%default]." ) | def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] ) parser.add_option("-a", "--annotation-file", dest="annotation_files", type="string", action="append", help="filename with annotations [default=%default]." ) parser.add_option("-s", "--segment-file", dest="segment_files", type="string", action="append", help="filename with segments. Also accepts a glob in parantheses [default=%default]." ) parser.add_option("-w", "--workspace-file", dest="workspace_files", type="string", action="append", help="filename with workspace segments. Also accepts a glob in parantheses [default=%default]." ) parser.add_option("-i", "--isochore-file", dest="isochore_files", type="string", action="append", help="filename with isochore segments. Also accepts a glob in parantheses [default=%default]." ) parser.add_option("-l", "--sample-file", dest="sample_files", type="string", action="append", help="filename with sample files. Start processing from samples [default=%default]." ) parser.add_option("-c", "--counter", dest="counter", type="choice", choices=("nucleotide-overlap", "nucleotide-density", "segment-overlap", ), help="quantity to test [default=%default]." ) parser.add_option("-n", "--num-samples", dest="num_samples", type="int", help="number of samples to compute [default=%default]." ) parser.add_option("-e", "--cache", dest="cache", type="string", help="filename for caching samples [default=%default]." ) parser.add_option("-o", "--order", dest="output_order", type="choice", choices = ( "track", "annotation", "fold", "pvalue", "qvalue" ), help="order results in output by fold, track, etc. [default=%default]." ) parser.add_option("-p", "--pvalue-method", dest="pvalue_method", type="choice", choices = ( "empirical", "norm", ), help="type of pvalue reported [default=%default]." ) parser.add_option("-q", "--qvalue-method", dest="qvalue_method", type="choice", choices = ( "storey", ), help="method to perform multiple testing correction by controlling the fdr [default=%default]." ) parser.add_option( "--qvalue-lambda", dest="qvalue_lambda", type="float", help="fdr computation: lambda [default=%default]." ) parser.add_option( "--qvalue-pi0-method", dest="qvalue_pi0_method", type="choice", choices = ("smoother", "bootstrap" ), help="fdr computation: method for estimating pi0 [default=%default]." ) parser.add_option( "--counts-file", dest="input_filename_counts", type="string", help="start processing from counts - no segments required [default=%default]." ) parser.add_option( "--output-plots-pattern", dest="output_plots_pattern", type="string", help="output pattern for plots [default=%default]" ) parser.add_option( "--output-samples-pattern", dest="output_samples_pattern", type="string", help="output pattern for samples. Samples are stored in bed format, one for " " each segment [default=%default]" ) parser.add_option( "--bucket-size", dest="bucket_size", type="int", help="size of a bin for histogram of segment lengths [default=%default]" ) parser.add_option( "--nbuckets", dest="nbuckets", type="int", help="number of bins for histogram of segment lengths [default=%default]" ) parser.set_defaults( annotation_files = [], segment_files = [], workspace_files = [], sample_files = [], num_samples = 1000, nbuckets = 100000, bucket_size = 1, counter = "nucleotide-overlap", output_stats = "all", output_counts = True, output_order = "fold", cache = None, input_filename_counts = None, pvalue_method = "empirical", output_plots_pattern = None, output_samples_pattern = None, qvalue_method = "storey", qvalue_lambda = None, qvalue_pi0_method = "smoother", ) ## add common options (-h/--help, ...) and parse command line (options, args) = E.Start( parser, argv = argv, add_output_options = True ) ################################################## if options.input_filename_counts: annotator_results = gat.fromCounts( options.input_filename_counts ) else: annotator_results = fromSegments( options, args ) if options.pvalue_method != "empirical": E.info("updating pvalues to %s" % options.pvalue_method ) gat.updatePValues( gat.iterator_results(annotator_results), options.pvalue_method ) ################################################## ################################################## ################################################## ## compute global fdr ################################################## E.info( "computing FDR statistics" ) gat.updateQValues( list(gat.iterator_results(annotator_results)), method = options.qvalue_method, vlambda = options.qvalue_lambda, pi0_method = options.qvalue_pi0_method ) ################################################## # plot histograms if options.output_plots_pattern and HASPLOT: E.info("plotting sample stats" ) for r in gat.iterator_results(annotator_results): plt.figure() key = "%s-%s" % (r.track, r.annotation) s = r.samples hist, bins = numpy.histogram( s, new = True, normed = True, bins = numpy.arange( s.min(), s.max() + 1, 1.0) ) plt.plot( bins[:-1], hist, label = key ) sigma = r.stddev mu = r.expected plt.plot(bins, 1.0/(sigma * numpy.sqrt(2 * numpy.pi)) * numpy.exp( - (bins - mu)**2 / (2 * sigma**2) ), label = "fit", linewidth=2, color='r' ) plt.legend() filename = re.sub(options.output_plots_pattern, "%s", key) plt.savefig( filename ) ################################################## ################################################## ## output ################################################## outfile = sys.stdout outfile.write("\t".join( gat.AnnotatorResult.headers ) + "\n" ) output = list( gat.iterator_results( annotator_results ) ) if options.output_order == "track": output.sort( key = lambda x: (x.track, x.annotation) ) elif options.output_order == "annotation": output.sort( key = lambda x: (x.annotation, x.track) ) elif options.output_order == "fold": output.sort( key = lambda x: x.fold ) elif options.output_order == "pvalue": output.sort( key = lambda x: x.pvalue ) elif options.output_order == "qvalue": output.sort( key = lambda x: x.qvalue ) else: raise ValueError("unknown sort order %s" % options.output_order ) for result in output: outfile.write( str(result) + "\n" ) ## write footer and output benchmark information. E.Stop() | 1a405cb5c805471533be3edcc09edf69ae1106a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8016/1a405cb5c805471533be3edcc09edf69ae1106a5/gatrun.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
5261,
273,
599,
262,
30,
3536,
4263,
2774,
18,
225,
8940,
1296,
980,
702,
316,
2589,
18,
19485,
16,
3308,
380,
19485,
14,
353,
864,
18,
3536,
225,
309,
486,
5261,
30,
5261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
5261,
273,
599,
262,
30,
3536,
4263,
2774,
18,
225,
8940,
1296,
980,
702,
316,
2589,
18,
19485,
16,
3308,
380,
19485,
14,
353,
864,
18,
3536,
225,
309,
486,
5261,
30,
5261,
... |
page = location.group(1) | contents = location.group(1) | def findpage(t): try: location = re.search(starttext+"([^\Z]*?)"+endtext,t) if include: page = location.group() else: page = location.group(1) except AttributeError: return try: title = re.search("'''(.*?)'''",page).group(1) except AttributeError: wikipedia.output(u"No title found - skipping a page.") else: pl = wikipedia.Page(mysite,wikipedia.UnicodeToAsciiHtml(title)) wikipedia.output(pl.title()) if pl.exists(): wikipedia.output(u"Page %s already exists, not adding!"%title) else: pl.put(page, comment = commenttext, minorEdit = False) findpage(t[location.end()+1:]) return | 956a51cebb6f0b0d40ba72bd9751eeaf34e18a16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/956a51cebb6f0b0d40ba72bd9751eeaf34e18a16/pagefromfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
2433,
12,
88,
4672,
775,
30,
2117,
273,
283,
18,
3072,
12,
1937,
955,
9078,
19042,
62,
5772,
35,
2225,
15,
409,
955,
16,
88,
13,
309,
2341,
30,
1363,
273,
2117,
18,
1655,
1435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
2433,
12,
88,
4672,
775,
30,
2117,
273,
283,
18,
3072,
12,
1937,
955,
9078,
19042,
62,
5772,
35,
2225,
15,
409,
955,
16,
88,
13,
309,
2341,
30,
1363,
273,
2117,
18,
1655,
1435,... |
Fields = StripComments(Fields) | Fields = StripComments(Fields).strip() | def CheckMemberVariableFormat(Value, ModelId): ErrMsgList = [] # Member variable format pattern. Pattern = re.compile(r'^[A-Z]+\S*[a-z]\S*$') LBPos = Value.find('{') RBPos = Value.find('}') Fields = Value[LBPos + 1 : RBPos] Fields = StripComments(Fields) if ModelId == DataClass.MODEL_IDENTIFIER_ENUMERATE: FieldsList = Fields.split(',') else: FieldsList = Fields.split(';') for Field in FieldsList: Field = Field.strip() if Field == '': continue # For the condition that the field in struct is an array with [] sufixes... if Field[-1] == ']': LBPos = Field.find('[') Field = Field[0:LBPos] # For the condition that bit field ": Number" if Field.find(':') != -1: ColonPos = Field.find(':') Field = Field[0:ColonPos] Field = Field.strip() if Field == '': continue # Enum could directly assign value to variable Field = Field.split('=')[0].strip() TokenList = Field.split() # Remove pointers before variable if not Pattern.match(TokenList[-1].lstrip('*')): ErrMsgList.append(TokenList[-1]) return ErrMsgList | 75928ff31b96e48c7c4f0ced9a86c86c6ef8e8f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/914/75928ff31b96e48c7c4f0ced9a86c86c6ef8e8f8/c.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
4419,
3092,
1630,
12,
620,
16,
3164,
548,
4672,
1926,
3332,
682,
273,
5378,
468,
8596,
2190,
740,
1936,
18,
6830,
273,
283,
18,
11100,
12,
86,
19856,
63,
37,
17,
62,
26446,
55,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
4419,
3092,
1630,
12,
620,
16,
3164,
548,
4672,
1926,
3332,
682,
273,
5378,
468,
8596,
2190,
740,
1936,
18,
6830,
273,
283,
18,
11100,
12,
86,
19856,
63,
37,
17,
62,
26446,
55,
... |
if type(devname) is TupleType: docs[ele.sig_name.data] = (ele.alt_name.data, ele.description.data, []) for d in devname: docs[ele.sig_name.data][2].append(d) else: docs[ele.sig_name.data] = (ele.alt_name.data, ele.description.data, [devname]) | try: if type(devname) is TupleType: docs[ele.sig_name.data] = (ele.alt_name.data, ele.description.data, []) for d in devname: docs[ele.sig_name.data][2].append(d) else: docs[ele.sig_name.data] = (ele.alt_name.data, ele.description.data, [devname]) except AttributeError: pass | def create_tabs (string): "Create a number of tabs according to the length of string" x = '' lim = (32 - len(string) + 7) / 8 if lim <= 0: lim = 1 for i in range(0, lim): x += "\t" return x | 5a603db73eac9b325d379217de41c4d0af0cfd30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4046/5a603db73eac9b325d379217de41c4d0af0cfd30/patch-headers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
16056,
261,
1080,
4672,
315,
1684,
279,
1300,
434,
10920,
4888,
358,
326,
769,
434,
533,
6,
619,
273,
875,
20167,
273,
261,
1578,
300,
562,
12,
1080,
13,
397,
2371,
13,
342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
16056,
261,
1080,
4672,
315,
1684,
279,
1300,
434,
10920,
4888,
358,
326,
769,
434,
533,
6,
619,
273,
875,
20167,
273,
261,
1578,
300,
562,
12,
1080,
13,
397,
2371,
13,
342,
... |
config['blog_title'] += ' : %s' % re.sub(r'/[^/]+\.\w+$','',data['pi_bl']) | config['blog_title'] += ' : %s' % filename | def run(self): """ Main loop for pyblosxom. """ config = self._request.getConfiguration() data = self._request.getData() pyhttp = self._request.getHttp() | b0a8896393d7b257c437ce75077b8d462908b7aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/b0a8896393d7b257c437ce75077b8d462908b7aa/pyblosxom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
12740,
2798,
364,
2395,
70,
383,
30319,
362,
18,
3536,
642,
273,
365,
6315,
2293,
18,
588,
1750,
1435,
501,
273,
365,
6315,
2293,
18,
588,
751,
1435,
2395,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
12740,
2798,
364,
2395,
70,
383,
30319,
362,
18,
3536,
642,
273,
365,
6315,
2293,
18,
588,
1750,
1435,
501,
273,
365,
6315,
2293,
18,
588,
751,
1435,
2395,
... |
This is an interface for a function (with attributes) which participates in a given Flow. It is typical to implement this using a function given attributes. Every attribute may be missing to provide minimal behavior. isIterable This is true if the function returns an iterable object; in 2.1 this is either a list or array or something with a next() function. In short, this means that for each application of the function, 0..M subordinate calls will be made. nextState If the next state of the function is fixed, then this attribute can be set. In this case, the return value from the function call can just be the value, rather than a (state, value) tuple. If nextState is not provided and if isIterable is true, then each call to next() in the iteration must be a (state,value) tuple. | This function constructs a FlowStage tuple which is used inside the Flow mechanism to track state, etc. If an argument is provided, then it is used; otherwise the callable is searched for the same attribute, else, the default is used. onFinish This function attribute, if present, will be called after all subordinate flows have been finished. It can be used as an end-of-list indicator. isIterable This is true if the function returns an iterable object; in 2.1 this is either a list or array or something with a next() function. In short, this means that for each application of the function, 0..M subordinate calls will be made. isDynamic If this is true, then the return value of each call is a (nextFlow, nextValue) pair, where nextFlow is a Flow object (see below). | def iter(lst): from types import ListType, TupleType if type(lst) == type([]) or type(lst) == type(tuple()): return _ListIterator(lst) else: return lst.__iter__() | 4cf3103eb894bde67fe5e1250725e8ef11de7f5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4cf3103eb894bde67fe5e1250725e8ef11de7f5a/flow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1400,
12,
16923,
4672,
628,
1953,
1930,
987,
559,
16,
7257,
559,
309,
618,
12,
16923,
13,
422,
618,
3816,
5717,
578,
618,
12,
16923,
13,
422,
618,
12,
8052,
1435,
4672,
327,
389,
682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1400,
12,
16923,
4672,
628,
1953,
1930,
987,
559,
16,
7257,
559,
309,
618,
12,
16923,
13,
422,
618,
3816,
5717,
578,
618,
12,
16923,
13,
422,
618,
12,
8052,
1435,
4672,
327,
389,
682,
... |
presenceclient.login(reactor, webappConfig.registration_host, webappConfig.registration_port, maayPortal.webQuerier, webappConfig.get_node_id(), socket.gethostbyname(socket.gethostname()), webappConfig.rpcserver_port, webappConfig.bandwidth) | presenceclient.notify(reactor, webappConfig.registration_host, webappConfig.registration_port, maayPortal.webQuerier, webappConfig.get_node_id(), socket.gethostbyname(socket.gethostname()), webappConfig.rpcserver_port, webappConfig.bandwidth) | def run(): webappConfig = ServerConfiguration() webappConfig.load() maayPortal = MaayPortal(webappConfig) website = appserver.NevowSite(MaaySessionWrapper(maayPortal, mindFactory=MaayMindFactory)) website.remember(Maay404(), inevow.ICanHandleNotFound) website.remember(webappConfig, IServerConfiguration) presenceclient.login(reactor, webappConfig.registration_host, webappConfig.registration_port, maayPortal.webQuerier, webappConfig.get_node_id(), socket.gethostbyname(socket.gethostname()), webappConfig.rpcserver_port, webappConfig.bandwidth) rpcserver = server.Site(MaayRPCServer(webappConfig.get_node_id(), maayPortal)) reactor.listenTCP(webappConfig.webserver_port, website) reactor.listenTCP(webappConfig.rpcserver_port, rpcserver) try: print "-------------Server mainloop-------------" reactor.run() finally: print "-----------Shutting down Server----------" | c492f5906afea8cae65017a9cc09193a66a755e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2259/c492f5906afea8cae65017a9cc09193a66a755e1/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
13332,
28945,
809,
273,
3224,
1750,
1435,
28945,
809,
18,
945,
1435,
10843,
528,
24395,
273,
490,
69,
528,
24395,
12,
4875,
2910,
809,
13,
12504,
273,
595,
3567,
18,
6586,
90,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13332,
28945,
809,
273,
3224,
1750,
1435,
28945,
809,
18,
945,
1435,
10843,
528,
24395,
273,
490,
69,
528,
24395,
12,
4875,
2910,
809,
13,
12504,
273,
595,
3567,
18,
6586,
90,
543,... |
if splitter >= 0 and not string[splitter + 1] == '=': | if splitter >= 0 and not string[splitter + 1] == '=' and splitter < 80: | def __FindSplit(self, string): """Finds a place to split a string.""" splitter = string.find('=') if splitter >= 0 and not string[splitter + 1] == '=': return splitter parts = string.split('(') if len(parts) > 1: splitter = len(parts[0]) for ii in range(1, len(parts)): if not parts[ii - 1][-3:] == "if ": return splitter splitter += len(parts[ii]) + 1 done = False end = len(string) last_splitter = -1 while not done: splitter = string[0:end].rfind(',') if splitter < 0: return last_splitter elif splitter >= 80: end = splitter else: return splitter | 8a837bb40249dfd9f0a2736abdab4f64592c99db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/8a837bb40249dfd9f0a2736abdab4f64592c99db/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3125,
5521,
12,
2890,
16,
533,
4672,
3536,
8947,
279,
3166,
358,
1416,
279,
533,
12123,
21553,
273,
533,
18,
4720,
2668,
2218,
13,
309,
21553,
1545,
374,
471,
486,
533,
63,
4939,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3125,
5521,
12,
2890,
16,
533,
4672,
3536,
8947,
279,
3166,
358,
1416,
279,
533,
12123,
21553,
273,
533,
18,
4720,
2668,
2218,
13,
309,
21553,
1545,
374,
471,
486,
533,
63,
4939,
... |
logerror(traceback.format_exc()) self.close() | except: logerror(traceback.format_exc()) self.close() | def handle_error(self): """Called to handle any uncaught exceptions.""" try: raise except (KeyboardInterrupt, SystemExit, asyncore.ExitNow): raise logerror(traceback.format_exc()) self.close() | 14dfdb7c027f301585f2ee98435e61f18386ca06 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7236/14dfdb7c027f301585f2ee98435e61f18386ca06/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
1636,
12,
2890,
4672,
3536,
8185,
358,
1640,
1281,
6301,
16510,
4798,
12123,
775,
30,
1002,
1335,
261,
17872,
14126,
16,
25454,
16,
4326,
479,
18,
6767,
8674,
4672,
1002,
613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
1636,
12,
2890,
4672,
3536,
8185,
358,
1640,
1281,
6301,
16510,
4798,
12123,
775,
30,
1002,
1335,
261,
17872,
14126,
16,
25454,
16,
4326,
479,
18,
6767,
8674,
4672,
1002,
613,
... |
// *********************************************** // ** Get number of local types + 1 // returns: value >= 1. 1 means that there are no local types. long GetMaxLocalType(void); | def ParseTypes(inputtype, flags): """ Parse type declarations @param input: file name or C declarations (depending on the flags) @param flags: combination of PT_... constants or 0 @return: number of errors """ return idaapi.idc_parse_types(inputtype, flags) | 7d0f7431439c021ca8ff7fab2a58afcbdd115fe3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/7d0f7431439c021ca8ff7fab2a58afcbdd115fe3/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2884,
2016,
12,
2630,
723,
16,
2943,
4672,
3536,
2884,
618,
12312,
225,
632,
891,
810,
30,
585,
508,
578,
385,
12312,
261,
5817,
310,
603,
326,
2943,
13,
632,
891,
2943,
30,
10702,
434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2884,
2016,
12,
2630,
723,
16,
2943,
4672,
3536,
2884,
618,
12312,
225,
632,
891,
810,
30,
585,
508,
578,
385,
12312,
261,
5817,
310,
603,
326,
2943,
13,
632,
891,
2943,
30,
10702,
434... | |
self._canvas.ellipse(x1,y1,x2,y2) | self._canvas.ellipse(x1,y1,x2,y2, link_info=self._get_link_info_dict(ellipse)) | def drawEllipse(self, ellipse): #need to convert to pdfgen's bounding box representation x1 = ellipse.cx - ellipse.rx x2 = ellipse.cx + ellipse.rx y1 = ellipse.cy - ellipse.ry y2 = ellipse.cy + ellipse.ry self._canvas.ellipse(x1,y1,x2,y2) | 37afe6db14252697b2c6f0bd32cd0cbf4e4ebe03 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/37afe6db14252697b2c6f0bd32cd0cbf4e4ebe03/renderSVG.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
4958,
10472,
12,
2890,
16,
26838,
4672,
468,
14891,
358,
1765,
358,
4863,
2137,
275,
1807,
7552,
3919,
4335,
619,
21,
273,
26838,
18,
71,
92,
300,
26838,
18,
20122,
619,
22,
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,
3724,
4958,
10472,
12,
2890,
16,
26838,
4672,
468,
14891,
358,
1765,
358,
4863,
2137,
275,
1807,
7552,
3919,
4335,
619,
21,
273,
26838,
18,
71,
92,
300,
26838,
18,
20122,
619,
22,
273,
... |
if (medication.rx_count > 1): | if (medication[0].rx_count > 1): | def prescription(request, patient_id, medication_idx='0'): user_state = _get_user_state(request) ctx = get_base_context(request, 'prescription', user_state, patient_id) ss = SiteState.objects.get_or_create(user=request.user)[0] ss.save_last_location(request.path, ctx['section']) idx = int(medication_idx) previous_url = _get_previous_page('prescription', patient_id, user_state, idx) if (_is_combination(user_state, patient_id)): tag = user_state['patients'][patient_id]['combination'][idx] else: tag = user_state['patients'][patient_id]['prescribe'] medication = Medication.objects.get(tag=tag) # this is an ugly little workaround due to the django template ifequal tag # i was trying to compare a Model.id property with the stored json selection which is a string by default # with no way to cast in the templates, I have to specifically send down ints to the template to # get this to work. Django's templates may be a little too crippled for my tastes... dosage_idx = -1 concentration_idx = -1 refill_idx = -1 dosage2_idx = -1 concentration2_idx = -1 refill2_idx = -1 if (user_state['patients'][patient_id].has_key(tag)): rx = user_state['patients'][patient_id][tag] dosage_idx = int(rx['dosage']) concentration_idx = int(rx['concentration']) refill_idx = int(rx['refill']) if (medication.rx_count > 1): dosage2_idx = int(rx['dosage2']) concentration2_idx = int(rx['concentration2']) refill2_idx = int(rx['refill2']) ctx['medication'] = medication ctx['medication_idx'] = medication_idx ctx['previous_url'] = previous_url ctx['dosage_idx'] = dosage_idx ctx['concentration_idx'] = concentration_idx ctx['refill_idx'] = refill_idx ctx['dosage2_idx'] = dosage2_idx ctx['concentration2_idx'] = concentration2_idx ctx['refill2_idx'] = refill2_idx ctx['navigate'] = True template = loader.get_template('activity_virtual_patient/prescription.html') return HttpResponse(template.render(ctx)) | 047a1cc88104fea0534da6171920931b7745b17f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5732/047a1cc88104fea0534da6171920931b7745b17f/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4075,
24136,
12,
2293,
16,
18608,
67,
350,
16,
6735,
829,
67,
3465,
2218,
20,
11,
4672,
729,
67,
2019,
273,
389,
588,
67,
1355,
67,
2019,
12,
2293,
13,
1103,
273,
336,
67,
1969,
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,
4075,
24136,
12,
2293,
16,
18608,
67,
350,
16,
6735,
829,
67,
3465,
2218,
20,
11,
4672,
729,
67,
2019,
273,
389,
588,
67,
1355,
67,
2019,
12,
2293,
13,
1103,
273,
336,
67,
1969,
67,
... |
from GXD_Expression where _AssayType_key in (1,2,3,4,5,6,8,9)', 'auto') | 'from GXD_Expression where _AssayType_key in (1,2,3,4,5,6,8,9)', 'auto') | def fullCoded(): # # Full Coded stats uses GXD_Expression # fp.write(2*CRT + 'GXD Assay and Results:' + 2*CRT) db.sql('select _Assay_key, _Refs_key, _Marker_key, source = "E" into #gxd ' + \ 'from GXD_Expression where _Refs_key in %s ' + \ 'and _AssayType_key in (1,2,3,4,5,6,8,9)' % (electronic), None) db.sql('insert into #gxd select _Assay_key, _Refs_key, _Marker_key, source = "L" ' + \ 'from GXD_Expression where _Refs_key not in %s ' + \ 'and _AssayType_key in (1,2,3,4,5,6,8,9)' % (electronic), None) db.sql('create index idx1 on #gxd(_Assay_key)', None) db.sql('create index idx2 on #gxd(_Refs_key)', None) db.sql('create index idx3 on #gxd(_Marker_key)', None) db.sql('create index idx4 on #gxd(source)', None) # # total number of references # results = db.sql('select acount = count(distinct _Refs_key) from #gxd', 'auto') for r in results: fp.write('Assay References: ' + str(r['acount']) + 2*CRT) # # Assays, Assay Results and Genes by source # fp.write('Assays and Assay Results by Source:' + CRT) fp.write('(Electronic References are: ' + elect_ref1 + CRT) fp.write(' ' + elect_ref2 + CRT) fp.write(' ' + elect_ref3 + 2*CRT) fp.write(string.ljust(' ', 15)) fp.write(string.ljust('Electronic Submission', 25)) fp.write(string.ljust('Literature Submission', 25)) fp.write(string.ljust('Total', 10) + CRT) fp.write(string.ljust('-------------', 15)) fp.write(string.ljust('---------------------', 25)) fp.write(string.ljust('---------------------', 25)) fp.write(string.ljust('-----', 10) + CRT) # # Assays # results = db.sql('select count(distinct _Assay_key) from #gxd where source = "E"', 'auto') for r in results: ecount = r[''] results = db.sql('select count(distinct _Assay_key) from #gxd where source = "L"', 'auto') for r in results: lcount = r[''] fp.write(string.ljust('Assays', 15)) fp.write(string.ljust(str(ecount), 25)) fp.write(string.ljust(str(lcount), 25)) fp.write(string.ljust(str(ecount + lcount), 10) + CRT) # # Results # results = db.sql('select count(_Assay_key) from #gxd where source = "E"', 'auto') for r in results: ecount = r[''] results = db.sql('select count(_Assay_key) from #gxd where source = "L"', 'auto') for r in results: lcount = r[''] fp.write(string.ljust('Assay Results', 15)) fp.write(string.ljust(str(ecount), 25)) fp.write(string.ljust(str(lcount), 25)) fp.write(string.ljust(str(ecount + lcount), 10) + CRT) # # Genes # results = db.sql('select genes = count(distinct _Marker_key) ' + \ from GXD_Expression where _AssayType_key in (1,2,3,4,5,6,8,9)', 'auto') fp.write(2*CRT + 'Number of genes with GXD data: ' + str(results[0]['genes']) + CRT) | 1793da969b474b042e9c1a10792d75517b4a68aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/340/1793da969b474b042e9c1a10792d75517b4a68aa/GXD_Stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1983,
1085,
72,
13332,
225,
468,
468,
11692,
3356,
72,
3177,
4692,
611,
22953,
67,
2300,
468,
225,
4253,
18,
2626,
12,
22,
14,
5093,
56,
397,
296,
43,
22953,
4725,
528,
471,
10351,
249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1983,
1085,
72,
13332,
225,
468,
468,
11692,
3356,
72,
3177,
4692,
611,
22953,
67,
2300,
468,
225,
4253,
18,
2626,
12,
22,
14,
5093,
56,
397,
296,
43,
22953,
4725,
528,
471,
10351,
249... |
try: d[str] = _deepcopy_atomic except NameError: pass | def _deepcopy_atomic(x, memo): return x | 7b7242c2f68fba436df5e0b646ad32687c57c1e7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/7b7242c2f68fba436df5e0b646ad32687c57c1e7/copy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16589,
3530,
67,
27718,
12,
92,
16,
11063,
4672,
327,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16589,
3530,
67,
27718,
12,
92,
16,
11063,
4672,
327,
619,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
except: continue elif (bond[0].startswith('H') or bond[1].startswith('H')): if show_hydrogen: if (bond[0] in mc_atoms or bond[1] in mc_atoms): try: mc_h_veclist += kin_vec(key_hash[bond[0]], | except: continue elif (bond[0].startswith('H') or bond[1].startswith('H')): if show_hydrogen: if (bond[0] in mc_atoms or bond[1] in mc_atoms): try: mc_h_veclist += kin_vec(key_hash[bond[0]], | def get_kin_lots(chain, pdbID=None, index=0, show_hydrogen=True): mc_atoms = ["N", "CA", "C", "O", "OXT", "P", "OP1", "OP2", "O5'", "C5'", "C4'", "O4'", "C1'", "C3'", "O3'", "C2'", "O2'"] mc_veclist = "" sc_veclist = "" mc_h_veclist = "" sc_h_veclist = "" ca_trace = "" virtual_bb = "" water_list = "" kin_out = "" color = get_chain_color(index) mc_veclist = "@vectorlist {mc} color= %s master= {mainchain}\n" % color sc_veclist = "@vectorlist {sc} color= cyan master= {sidechain}\n" ca_trace = "@vectorlist {Calphas} color= %s master= {Calphas}\n" % color virtual_bb = "@vectorlist {Virtual BB} color= %s off master= {Virtual BB}\n" % color water_list = "@balllist {water O} color= peachtint radius= 0.15 master= {water}\n" hets = "@vectorlist {het} color= pink master= {hets}\n" het_h = "@vectorlist {ht H} color= gray nobutton master= {hets} master= {H's}\n" if show_hydrogen: mc_h_veclist = \ "@vectorlist {mc H} color= gray nobutton master= {mainchain} master= {H's}\n" sc_h_veclist = \ "@vectorlist {sc H} color= gray nobutton master= {sidechain} master= {H's}\n" prev_resid = None prev_C_xyz = None prev_C_key = None prev_CA_xyz = None prev_CA_key = None cur_resid = None cur_C_xyz = None cur_C_key = None cur_CA_xyz = None cur_CA_key = None prev_O3_xyz = None prev_O3_key = None cur_O3_xyz = None cur_O3_key = None p_hash_key = {} p_hash_xyz = {} c1_hash_key = {} c1_hash_xyz = {} c4_hash_key = {} c4_hash_xyz = {} for residue_group in chain.residue_groups(): cur_resid = residue_group.resseq #print dir(residue_group) #sys.exit() for atom_group in residue_group.atom_groups(): #print dir(atom_group) #sys.exit() key_hash = {} xyz_hash = {} het_hash = {} for atom in atom_group.atoms(): #print dir(atom) #sys.exit() key = "%s %s %s%s B%.2f %s" % ( atom.name.lower(), atom_group.resname.lower(), chain.id, residue_group.resseq, atom.b, pdbID) key_hash[atom.name.strip()] = key xyz_hash[atom.name.strip()] = atom.xyz if(common_residue_names_get_class(atom_group.resname) == "common_amino_acid"): if atom.name == ' C ': cur_C_xyz = atom.xyz cur_C_key = key if atom.name == ' CA ': cur_CA_key = key cur_CA_xyz = atom.xyz if prev_CA_key != None and prev_CA_xyz != None: if int(residue_group.resid()) - int(prev_resid) == 1: try: ca_trace += kin_vec(prev_CA_key, prev_CA_xyz, key, atom.xyz) except: continue if atom.name == ' N ': if prev_C_key != None and prev_C_xyz != None: if int(residue_group.resid()) - int(prev_resid) == 1: try: mc_veclist += kin_vec(prev_C_key, prev_C_xyz, key, atom.xyz) except: continue elif(common_residue_names_get_class(atom_group.resname) == "common_rna_dna"): if atom.name == " O3'": cur_O3_xyz = atom.xyz cur_O3_key = key elif atom.name == ' P ': if prev_O3_key != None and prev_O3_xyz != None: if int(residue_group.resid()) - int(prev_resid) == 1: try: mc_veclist += kin_vec(prev_O3_key, prev_O3_xyz, key, atom.xyz) except: continue p_hash_key[int(residue_group.resseq)] = key p_hash_xyz[int(residue_group.resseq)] = atom.xyz elif atom.name == " C1'": c1_hash_key[int(residue_group.resseq)] = key c1_hash_xyz[int(residue_group.resseq)] = atom.xyz elif atom.name == " C4'": c4_hash_key[int(residue_group.resseq)] = key c4_hash_xyz[int(residue_group.resseq)] = atom.xyz elif atom_group.resname.lower() == 'hoh': if atom.name == ' O ': water_list += "{%s} P %.3f %.3f %.3f\n" % ( key, atom.xyz[0], atom.xyz[1], atom.xyz[2]) elif atom.hetero == True: het_hash[atom.name.strip()] = [key, atom.xyz] # print common_residue_names_get_class(atom_group.resname) if(common_residue_names_get_class(atom_group.resname) == "common_rna_dna"): try: virtual_bb += "{%s} P %.3f %.3f %.3f {%s} L %.3f %.3f %.3f\n" % ( c4_hash_key[int(residue_group.resseq)-1], c4_hash_xyz[int(residue_group.resseq)-1][0], c4_hash_xyz[int(residue_group.resseq)-1][1], c4_hash_xyz[int(residue_group.resseq)-1][2], p_hash_key[int(residue_group.resseq)], p_hash_xyz[int(residue_group.resseq)][0], p_hash_xyz[int(residue_group.resseq)][1], p_hash_xyz[int(residue_group.resseq)][2]) except: continue try: virtual_bb += "{%s} P %.3f %.3f %.3f {%s} L %.3f %.3f %.3f\n" % ( p_hash_key[int(residue_group.resseq)], p_hash_xyz[int(residue_group.resseq)][0], p_hash_xyz[int(residue_group.resseq)][1], p_hash_xyz[int(residue_group.resseq)][2], c4_hash_key[int(residue_group.resseq)], c4_hash_xyz[int(residue_group.resseq)][0], c4_hash_xyz[int(residue_group.resseq)][1], c4_hash_xyz[int(residue_group.resseq)][2]) except: continue try: virtual_bb += "{%s} P %.3f %.3f %.3f {%s} L %.3f %.3f %.3f\n" % ( c4_hash_key[int(residue_group.resseq)], c4_hash_xyz[int(residue_group.resseq)][0], c4_hash_xyz[int(residue_group.resseq)][1], c4_hash_xyz[int(residue_group.resseq)][2], c1_hash_key[int(residue_group.resseq)], c1_hash_xyz[int(residue_group.resseq)][0], c1_hash_xyz[int(residue_group.resseq)][1], c1_hash_xyz[int(residue_group.resseq)][2]) except: continue bonds = get_bond_pairs(code=atom_group.resname) prev_CA_xyz = cur_CA_xyz prev_CA_key = cur_CA_key prev_C_xyz = cur_C_xyz prev_C_key = cur_C_key prev_resid = cur_resid prev_O3_key = cur_O3_key prev_O3_xyz = cur_O3_xyz if (common_residue_names_get_class(atom_group.resname) == 'other'): for bond in bonds: if (bond[0].startswith('H') or bond[1].startswith('H')): if show_hydrogen: try: het_h += kin_vec(het_hash[bond[0]][0], het_hash[bond[0]][1], het_hash[bond[1]][0], het_hash[bond[1]][1]) except: continue else: try: hets += "{%s} P %.3f %.3f %.3f {%s} L %.3f %.3f %.3f\n" % ( het_hash[bond[0]][0], het_hash[bond[0]][1][0], het_hash[bond[0]][1][1], het_hash[bond[0]][1][2], het_hash[bond[1]][0], het_hash[bond[1]][1][0], het_hash[bond[1]][1][1], het_hash[bond[1]][1][2]) except: continue for bond in bonds: if bond[0] in mc_atoms and bond[1] in mc_atoms: try: mc_veclist += kin_vec(key_hash[bond[0]], xyz_hash[bond[0]], key_hash[bond[1]], xyz_hash[bond[1]]) except: continue elif (bond[0].startswith('H') or bond[1].startswith('H')): if show_hydrogen: if (bond[0] in mc_atoms or bond[1] in mc_atoms): try: mc_h_veclist += kin_vec(key_hash[bond[0]], xyz_hash[bond[0]], key_hash[bond[1]], xyz_hash[bond[1]]) except: continue else: try: sc_h_veclist += kin_vec(key_hash[bond[0]], xyz_hash[bond[0]], key_hash[bond[1]], xyz_hash[bond[1]]) except: continue else: try: sc_veclist += kin_vec(key_hash[bond[0]], xyz_hash[bond[0]], key_hash[bond[1]], xyz_hash[bond[1]]) except: continue #clean up empty lists: if len(mc_veclist.splitlines()) > 1: kin_out += mc_veclist if len(mc_h_veclist.splitlines()) > 1: kin_out += mc_h_veclist if len(ca_trace.splitlines()) > 1: kin_out += ca_trace if len(sc_veclist.splitlines()) > 1: kin_out += sc_veclist if len(sc_h_veclist.splitlines()) > 1: kin_out += sc_h_veclist if len(water_list.splitlines()) > 1: kin_out += water_list if len(virtual_bb.splitlines()) > 1: kin_out += virtual_bb if len(hets.splitlines()) > 1: kin_out += hets if len(het_h.splitlines()) > 1: kin_out += het_h return kin_out | cf23624f960f6654c1080d039c5b085f6133a56c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/cf23624f960f6654c1080d039c5b085f6133a56c/validation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
15984,
67,
80,
6968,
12,
5639,
16,
10892,
734,
33,
7036,
16,
770,
33,
20,
16,
2405,
67,
18112,
24096,
33,
5510,
4672,
6108,
67,
14937,
273,
8247,
50,
3113,
315,
3587,
3113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15984,
67,
80,
6968,
12,
5639,
16,
10892,
734,
33,
7036,
16,
770,
33,
20,
16,
2405,
67,
18112,
24096,
33,
5510,
4672,
6108,
67,
14937,
273,
8247,
50,
3113,
315,
3587,
3113,
... |
res[r[self._fields_id][0]].append(r['id']) | res.setdefault(r[self._fields_id][0], []).append(r['id']) | def get(self, cr, obj, ids, name, user=None, offset=0, context={}, values={}): res = {} for id in ids: res[id] = [] | 79f8455aadedd62976f313be75d3d2ab7c5a5e1f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/79f8455aadedd62976f313be75d3d2ab7c5a5e1f/hr_timesheet_sheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
4422,
16,
1081,
16,
3258,
16,
508,
16,
729,
33,
7036,
16,
1384,
33,
20,
16,
819,
28793,
924,
12938,
4672,
400,
273,
2618,
364,
612,
316,
3258,
30,
400,
63,
350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
4422,
16,
1081,
16,
3258,
16,
508,
16,
729,
33,
7036,
16,
1384,
33,
20,
16,
819,
28793,
924,
12938,
4672,
400,
273,
2618,
364,
612,
316,
3258,
30,
400,
63,
350,
... |
if self.old_AR is not None: os.environ['AR'] = self.old_AR | for name, value in self.old_flags: if value is not None: os.environ[name] = value elif name in os.environ: del os.environ[name] | def tearDown(self): if self.old_AR is not None: os.environ['AR'] = self.old_AR | ba353e807acff73f4507094462498cffd00b2b0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/ba353e807acff73f4507094462498cffd00b2b0d/test_sysconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
309,
365,
18,
1673,
67,
985,
353,
486,
599,
30,
1140,
18,
28684,
3292,
985,
3546,
273,
365,
18,
1673,
67,
985,
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,
268,
2091,
4164,
12,
2890,
4672,
309,
365,
18,
1673,
67,
985,
353,
486,
599,
30,
1140,
18,
28684,
3292,
985,
3546,
273,
365,
18,
1673,
67,
985,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not validFocus and menuEvent: processMenuWinEvent(*menuEvent) | if menuEvent: if menuEvent[0] in (winUser.EVENT_SYSTEM_MENUSTART, winUser.EVENT_SYSTEM_MENUPOPUPSTART): processMenuStartWinEvent(*menuEvent, validFocus=validFocus) else: processMenuEndWinEvent(*menuEvent, validFocus=validFocus) | def pumpAll(): #Receive all the winEvents from the limiter for this cycle winEvents=winEventLimiter.flushEvents() focusWinEvents=[] validFocus=False menuEvent=None for winEvent in winEvents: #We want to only pass on one focus event to NVDA, but we always want to use the most recent possible one if winEvent[0]==winUser.EVENT_OBJECT_FOCUS: focusWinEvents.append(winEvent) continue else: for focusWinEvent in reversed(focusWinEvents): if processFocusWinEvent(*(focusWinEvent[1:])): validFocus=True break focusWinEvents=[] if winEvent[0]==winUser.EVENT_SYSTEM_FOREGROUND: processForegroundWinEvent(*(winEvent[1:])) elif winEvent[0]==winUser.EVENT_OBJECT_DESTROY: processDestroyWinEvent(*winEvent[1:]) elif winEvent[0] in MENU_EVENTIDS: # Handle this later. menuEvent=winEvent else: processGenericWinEvent(*winEvent) for focusWinEvent in reversed(focusWinEvents): if processFocusWinEvent(*(focusWinEvent[1:])): validFocus=True break if not validFocus and menuEvent: # There was no valid focus event, so try the menu event as a last resort. processMenuWinEvent(*menuEvent) | b59046b91fbffcda489d70a94caba32ca89099e5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/b59046b91fbffcda489d70a94caba32ca89099e5/IAccessibleHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
2801,
1595,
13332,
468,
11323,
777,
326,
5657,
3783,
628,
326,
25057,
364,
333,
8589,
5657,
3783,
33,
8082,
1133,
22329,
18,
11330,
3783,
1435,
7155,
18049,
3783,
33,
8526,
923,
9233,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
2801,
1595,
13332,
468,
11323,
777,
326,
5657,
3783,
628,
326,
25057,
364,
333,
8589,
5657,
3783,
33,
8082,
1133,
22329,
18,
11330,
3783,
1435,
7155,
18049,
3783,
33,
8526,
923,
9233,... |
version = '0.1' | version = '0.1.2' | def _get_installed_version_from_module(self, module): try: return module.get_version().split()[0] except AttributeError: return '0.9.6' | cb27925b9b104ac853c7497d9352db8513f29608 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/cb27925b9b104ac853c7497d9352db8513f29608/build_externals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
13435,
67,
1589,
67,
2080,
67,
2978,
12,
2890,
16,
1605,
4672,
775,
30,
327,
1605,
18,
588,
67,
1589,
7675,
4939,
1435,
63,
20,
65,
1335,
6394,
30,
327,
296,
20,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
13435,
67,
1589,
67,
2080,
67,
2978,
12,
2890,
16,
1605,
4672,
775,
30,
327,
1605,
18,
588,
67,
1589,
7675,
4939,
1435,
63,
20,
65,
1335,
6394,
30,
327,
296,
20,
18,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.