rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
inpt, oupt = exec_command_pipe(*args) | inpt, outpt = exec_command_pipe(*args) | def execute(self, cursor, user, ids, datas, context=None): import pydot workflow_obj = self.pool.get('workflow') instance_obj = self.pool.get('workflow.instance') workflow_id = workflow_obj.search(cursor, user, [ ('osv', '=', datas['model']), ], limit=1, context=context) if not workflow_id: raise ExceptOSV('UserError', 'No workflow defined!') workflow_id = workflow_id[0] workflow = workflow_obj.browser(cursor, user, workflow_id, context=context) instance_id = instance_obj.search(cursor, user, [ ('res_id', '=', datas['id']), ('workflow', '=', workflow.id), ], limit=1, context=context) if not instance_id: raise ExceptOSV('UserError', 'No workflow instance defined!') instance_id = instance_id[0] | 0be16e5868ad4a3ea0858e980ed4f4f5f44a99b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/0be16e5868ad4a3ea0858e980ed4f4f5f44a99b9/workflow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
5386,
16,
819,
33,
7036,
4672,
1930,
2395,
9811,
6095,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
13815,
6134,
791,
67,
2603,
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,
1836,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
5386,
16,
819,
33,
7036,
4672,
1930,
2395,
9811,
6095,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
13815,
6134,
791,
67,
2603,
273,
... |
self.flush() | self.mapper.get_session().flush() | def set_loaned(self): """ Set loaned=True for all movies in volume/collection and for movie itself Set loan's date to today's date """ if self.movie == None: debug.show("Loan: wrong movie_id. Aborting") return False if self.person == None: debug.show("Loan: wrong person_id. Aborting") return False if self.collection_id>0 and self.collection==None: debug.show("Loan: wrong collection_id. Aborting") return False if self.volume_id>0 and self.volume==None: debug.show("Loan: wrong volume_id. Aborting") return False if self.collection!=None: self.movie.mapper.mapped_table.update(self.movie.c.collection_id==self.collection_id).execute(loaned=True) self.collection.loaned = True if self.volume!=None: self.movie.mapper.mapped_table.update(self.movie.c.volume_id==self.volume_id).execute(loaned=True) self.volume.loaned = True self.movie.loaned = True if self.date==None: self.date = func.current_date() # update loan date self.return_date = None self.save_or_update() self.flush() self.refresh() return True | 05d3fe4fdd9a5722f27cdf0d935b8f03d01b5fc2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2687/05d3fe4fdd9a5722f27cdf0d935b8f03d01b5fc2/sql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
383,
304,
329,
12,
2890,
4672,
3536,
1000,
28183,
329,
33,
5510,
364,
777,
7344,
29028,
316,
3940,
19,
5548,
471,
364,
21360,
6174,
1000,
28183,
1807,
1509,
358,
10074,
1807,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
383,
304,
329,
12,
2890,
4672,
3536,
1000,
28183,
329,
33,
5510,
364,
777,
7344,
29028,
316,
3940,
19,
5548,
471,
364,
21360,
6174,
1000,
28183,
1807,
1509,
358,
10074,
1807,
15... |
def _sqlTyps(self): | def _sqlType(self): | def _sqlTyps(self): return self.addSQLAttrs("SMALLINT") | e92f62f3efd08128392ea922cc597f58ca2a6e6c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6718/e92f62f3efd08128392ea922cc597f58ca2a6e6c/col.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4669,
559,
12,
2890,
4672,
327,
365,
18,
1289,
3997,
8262,
2932,
23882,
3217,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4669,
559,
12,
2890,
4672,
327,
365,
18,
1289,
3997,
8262,
2932,
23882,
3217,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
119.99999984701215694 | 119.99999984701215693242493354706493878953914933130704861011488 | def incomplete_gamma(s,x,prec=53): r""" Implements the incomplete Gamma function. The argument x and s are complex numbers (x must be a positive real number if s = 0). The result returned is $\int_x^\infty e^{-t}t^{s-1}dt$. EXAMPLES: sage: incomplete_gamma(0.1,6,200) 119.99999984701215694 sage: incomplete_gamma(0,6,200) 120.00000000000000000 sage: incomplete_gamma(0.3,6,200) 119.99990598341125736 sage: incomplete_gamma(0.3,6) 120.0000 sage: incomplete_gamma(0.5,6) 119.9980 sage: incomplete_gamma(0.5,6,100) 119.99830019 """ from sage.libs.pari.all import pari R,a = _setup(prec) b = R(pari(x).incgam(s)) pari.set_real_precision(a) return b | 07959cbeff36f9c9885d5f60b69e01b6eb4d5adc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/07959cbeff36f9c9885d5f60b69e01b6eb4d5adc/special.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14715,
67,
20589,
12,
87,
16,
92,
16,
4036,
33,
8643,
4672,
436,
8395,
29704,
326,
14715,
25409,
445,
18,
225,
1021,
1237,
619,
471,
272,
854,
7233,
5600,
261,
92,
1297,
506,
279,
6895... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14715,
67,
20589,
12,
87,
16,
92,
16,
4036,
33,
8643,
4672,
436,
8395,
29704,
326,
14715,
25409,
445,
18,
225,
1021,
1237,
619,
471,
272,
854,
7233,
5600,
261,
92,
1297,
506,
279,
6895... |
asyncore.loop(use_poll = True) | asyncore.loop(use_poll = False) | def start(self, sock, force): self.__sock = sock # Remove socket if os.path.exists(sock): logSys.error("Fail2ban seems to be already running") if force: logSys.warn("Forcing execution of the server") os.remove(sock) else: raise AsyncServerException("Server already running") # Creates the socket. self.create_socket(socket.AF_UNIX, socket.SOCK_STREAM) self.set_reuse_addr() try: self.bind(sock) except Exception: raise AsyncServerException("Unable to bind socket %s" % self.__sock) self.listen(1) # Sets the init flag. self.__init = True # TODO Add try..catch asyncore.loop(use_poll = True) | d2d93479d5bde4d485b98d810f395be8fbfd129e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12786/d2d93479d5bde4d485b98d810f395be8fbfd129e/asyncserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
16,
7313,
16,
2944,
4672,
365,
16186,
15031,
273,
7313,
468,
3581,
2987,
309,
1140,
18,
803,
18,
1808,
12,
15031,
4672,
613,
12712,
18,
1636,
2932,
3754,
22,
21515,
12001,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
16,
7313,
16,
2944,
4672,
365,
16186,
15031,
273,
7313,
468,
3581,
2987,
309,
1140,
18,
803,
18,
1808,
12,
15031,
4672,
613,
12712,
18,
1636,
2932,
3754,
22,
21515,
12001,... |
"Sets the value of a SAX2 property." | def setProperty(self, name, value): "Sets the value of a SAX2 property." raise SAXNotRecognizedException("Property '%s' not recognized" % name) | c5252b9fd6d85186c0b2dd684b36bb5006dca568 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5252b9fd6d85186c0b2dd684b36bb5006dca568/expatreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7486,
12,
2890,
16,
508,
16,
460,
4672,
1002,
10168,
1248,
5650,
9367,
503,
2932,
1396,
1995,
87,
11,
486,
16332,
6,
738,
508,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7486,
12,
2890,
16,
508,
16,
460,
4672,
1002,
10168,
1248,
5650,
9367,
503,
2932,
1396,
1995,
87,
11,
486,
16332,
6,
738,
508,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
lines = ''.join(self._body_instream.readlines()) | lines = '' while True: line = self._body_instream.readline() if not line: break lines += line | def processInputs(self): 'See IPublisherRequest' # Parse the request XML structure | 528b7405f97b585330639f275e86e5065092a880 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9825/528b7405f97b585330639f275e86e5065092a880/xmlrpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
10059,
12,
2890,
4672,
296,
9704,
2971,
2394,
264,
691,
11,
468,
2884,
326,
590,
3167,
3695,
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,
1207,
10059,
12,
2890,
4672,
296,
9704,
2971,
2394,
264,
691,
11,
468,
2884,
326,
590,
3167,
3695,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sage: g in G | sage: g in G | def __contains__(self, x): """ Return True if $x$ is an element of this group. | 8adc1b276c6e0f5f9d22a15cc642774e63872000 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/8adc1b276c6e0f5f9d22a15cc642774e63872000/linear.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12298,
972,
12,
2890,
16,
619,
4672,
3536,
2000,
1053,
309,
271,
92,
8,
353,
392,
930,
434,
333,
1041,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12298,
972,
12,
2890,
16,
619,
4672,
3536,
2000,
1053,
309,
271,
92,
8,
353,
392,
930,
434,
333,
1041,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def setCurrentEntry(self, entry): self["MenuEntry"].setText(entry) | parent["menu"].onSelectionChanged.append(self.selectionChanged) self.parent = parent self.selectionChanged() def selectionChanged(self): self["MenuEntry"].setText(self.parent["menu"].getCurrent()[0]) | def __init__(self, session, parent): Screen.__init__(self, session) self["MenuTitle"] = Label(parent.menu_title) self["MenuEntry"] = Label("") self["Clock"] = Clock() | 1a6c32a2ad934cb8dfe4e4f356be034b79b91f36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/1a6c32a2ad934cb8dfe4e4f356be034b79b91f36/Menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1339,
16,
982,
4672,
10146,
16186,
2738,
972,
12,
2890,
16,
1339,
13,
365,
9614,
4599,
4247,
11929,
273,
5287,
12,
2938,
18,
5414,
67,
2649,
13,
365,
961... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1339,
16,
982,
4672,
10146,
16186,
2738,
972,
12,
2890,
16,
1339,
13,
365,
9614,
4599,
4247,
11929,
273,
5287,
12,
2938,
18,
5414,
67,
2649,
13,
365,
961... |
raise RuntimeError | raise RuntimeError, msg % (_, one.dtype) | def __init__(self, float_conv=float,int_conv=int, float_to_float=float, float_to_str = lambda v:'%24.16e' % v, title = 'Python floating point number'): """ float_conv - convert integer to float (array) int_conv - convert float (array) to integer float_to_float - convert float array to float float_to_str - convert array float to str title - description of used floating point numbers """ max_iter = range(1000) one = float_conv(1) two = one + one zero = one - one | 0c7be2c208f3f173b3d8913e55aeb3b731fcf3f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/0c7be2c208f3f173b3d8913e55aeb3b731fcf3f7/machar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1431,
67,
4896,
33,
5659,
16,
474,
67,
4896,
33,
474,
16,
1431,
67,
869,
67,
5659,
33,
5659,
16,
1431,
67,
869,
67,
701,
273,
3195,
331,
2497,
9,
324... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1431,
67,
4896,
33,
5659,
16,
474,
67,
4896,
33,
474,
16,
1431,
67,
869,
67,
5659,
33,
5659,
16,
1431,
67,
869,
67,
701,
273,
3195,
331,
2497,
9,
324... |
for fn in "dirstate", "lock": | for fn in "dirstate", "lock", "hgrc", "localtags": | def __del__(self): if self.dir_: self.rmtree(self.dir_, True) | efd87da83dbaa5fa82f65b12ccb7b0e84d78512c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/efd87da83dbaa5fa82f65b12ccb7b0e84d78512c/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3771,
972,
12,
2890,
4672,
309,
365,
18,
1214,
67,
30,
365,
18,
86,
17371,
12,
2890,
18,
1214,
67,
16,
1053,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3771,
972,
12,
2890,
4672,
309,
365,
18,
1214,
67,
30,
365,
18,
86,
17371,
12,
2890,
18,
1214,
67,
16,
1053,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return self._buildAbsolutePageUrl() + "entry?repo="+rdw_helpers.encodeUrl(repo)+"&date="+rdw_helpers.encodeUrl(date.getUrlString()) | return self._buildAbsolutePageUrl(False) + "entry?repo="+rdw_helpers.encodeUrl(repo)+"&date="+rdw_helpers.encodeUrl(date.getUrlString()) | def _buildStatusEntryUrl(self, repo, date): return self._buildAbsolutePageUrl() + "entry?repo="+rdw_helpers.encodeUrl(repo)+"&date="+rdw_helpers.encodeUrl(date.getUrlString()) | a0ee2b9e793581bffec9ed4f6927e5fab49c4eec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2223/a0ee2b9e793581bffec9ed4f6927e5fab49c4eec/page_status.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
1482,
1622,
1489,
12,
2890,
16,
3538,
16,
1509,
4672,
327,
365,
6315,
3510,
10368,
1964,
1489,
12,
8381,
13,
397,
315,
4099,
35,
7422,
1546,
15,
13623,
91,
67,
11397,
18,
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,
3510,
1482,
1622,
1489,
12,
2890,
16,
3538,
16,
1509,
4672,
327,
365,
6315,
3510,
10368,
1964,
1489,
12,
8381,
13,
397,
315,
4099,
35,
7422,
1546,
15,
13623,
91,
67,
11397,
18,
30... |
self.client.voidresp() | self.assertEqual(self.client.voidresp(), "226 transfer complete") | def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.client.voidresp() | 9c6cd56e9177cda47f3b836159696f6471408b47 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/9c6cd56e9177cda47f3b836159696f6471408b47/test_ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
892,
67,
4071,
12,
2890,
4672,
468,
2424,
977,
7313,
273,
365,
18,
2625,
18,
13866,
4172,
2668,
1098,
6134,
365,
18,
11231,
1248,
2520,
1442,
12,
15031,
16,
5832,
18,
1260,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
892,
67,
4071,
12,
2890,
4672,
468,
2424,
977,
7313,
273,
365,
18,
2625,
18,
13866,
4172,
2668,
1098,
6134,
365,
18,
11231,
1248,
2520,
1442,
12,
15031,
16,
5832,
18,
1260,
2... |
self._debug(NIGHTMARE, "buf_append_data") | def buf_append_data (self, data): """we have to make sure that we have no two following DATA things in the tag buffer. Why? To be 100% sure that an ENCLOSED match really matches enclosed data. """ self._debug(NIGHTMARE, "buf_append_data") if data[0]==DATA and self.buf and self.buf[-1][0]==DATA: self.buf[-1][1] += data[1] else: self.buf.append(data) | 2235a065dd104f9a4252037ab7cb36681acd5b89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/2235a065dd104f9a4252037ab7cb36681acd5b89/HtmlParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1681,
67,
6923,
67,
892,
261,
2890,
16,
501,
4672,
3536,
1814,
1240,
358,
1221,
3071,
716,
732,
1240,
1158,
2795,
3751,
8730,
9198,
316,
326,
1047,
1613,
18,
3497,
93,
35,
2974,
506,
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,
1681,
67,
6923,
67,
892,
261,
2890,
16,
501,
4672,
3536,
1814,
1240,
358,
1221,
3071,
716,
732,
1240,
1158,
2795,
3751,
8730,
9198,
316,
326,
1047,
1613,
18,
3497,
93,
35,
2974,
506,
2... | |
cl, bases = entry result = result + prefix + classname(cl, modname) | c, bases = entry result = result + prefix + classname(c, modname) | def doctree(self, tree, modname, parent=None, prefix=''): """Render in text a class tree as returned by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): cl, bases = entry result = result + prefix + classname(cl, modname) if bases and bases != (parent,): parents = map(lambda cl, m=modname: classname(cl, m), bases) result = result + '(%s)' % join(parents, ', ') result = result + '\n' elif type(entry) is type([]): result = result + self.doctree( entry, modname, cl, prefix + ' ') return result | 2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31263,
992,
12,
2890,
16,
2151,
16,
16037,
16,
982,
33,
7036,
16,
1633,
2218,
11,
4672,
3536,
3420,
316,
977,
279,
667,
2151,
487,
2106,
635,
5334,
18,
588,
830,
345,
334,
992,
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,
31263,
992,
12,
2890,
16,
2151,
16,
16037,
16,
982,
33,
7036,
16,
1633,
2218,
11,
4672,
3536,
3420,
316,
977,
279,
667,
2151,
487,
2106,
635,
5334,
18,
588,
830,
345,
334,
992,
1435,
... |
if right: | if right is not False: | def rg(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids + rg(ids2, table, parent) | 913e95856f80f55dce322c84931fd0cbd07c701f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/913e95856f80f55dce322c84931fd0cbd07c701f/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14524,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
13,
6487,
819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14524,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
13,
6487,
819... |
return self.snoozedUntil or \ | result = self.snoozedUntil or \ | def getNextReminderTimeFor(self, remindable): """ Get the time for this remindable's next reminder """ return self.snoozedUntil or \ (self.getBaseTimeFor(remindable) + self.delta) | 2129d6d89cb526e7169c81e817733d2d8fe18d7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/2129d6d89cb526e7169c81e817733d2d8fe18d7f/Reminders.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6927,
1933,
14055,
950,
1290,
12,
2890,
16,
849,
728,
429,
4672,
3536,
968,
326,
813,
364,
333,
849,
728,
429,
1807,
1024,
849,
14055,
3536,
563,
273,
365,
18,
87,
2135,
11142,
329,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6927,
1933,
14055,
950,
1290,
12,
2890,
16,
849,
728,
429,
4672,
3536,
968,
326,
813,
364,
333,
849,
728,
429,
1807,
1024,
849,
14055,
3536,
563,
273,
365,
18,
87,
2135,
11142,
329,
97... |
xk = x0 | def fmin_cg(f, x0, fprime=None, args=(), avegtol=1e-5, epsilon=1.49e-8, maxiter=None, full_output=0, disp=1, retall=0): """Minimize a function with nonlinear conjugate gradient algorithm. Description: Optimize the function, f, whose gradient is given by fprime using the nonlinear conjugate gradient algorithm of Polak and Ribiere See Wright, and Nocedal 'Numerical Optimization', 1999, pg. 120-122. Inputs: f -- the Python function or method to be minimized. x0 -- the initial guess for the minimizer. fprime -- a function to compute the gradient of f. args -- extra arguments to f and fprime. avegtol -- minimum average value of gradient for stopping epsilon -- if fprime is approximated use this value for the step size (can be scalar or vector) Outputs: (xopt, {fopt, func_calls, grad_calls, warnflag}, {allvecs}) xopt -- the minimizer of f. fopt -- the value of f(xopt). func_calls -- the number of function_calls. grad_calls -- the number of gradient calls. warnflag -- an integer warning flag: 1 : 'Maximum number of iterations exceeded.' 2 : 'Gradient and/or function calls not changing' allvecs -- if retall then this vector of the iterates is returned Additional Inputs: avegtol -- the minimum occurs when fprime(xopt)==0. This specifies how close to zero the average magnitude of fprime(xopt) needs to be. maxiter -- the maximum number of iterations. full_output -- if non-zero then return fopt, func_calls, grad_calls, and warnflag in addition to xopt. disp -- print convergence message if non-zero. retall -- return a list of results at each iteration if True """ app_fprime = 0 if fprime is None: app_fprime = 1 x0 = asarray(x0) if maxiter is None: maxiter = len(x0)*200 func_calls = 0 grad_calls = 0 k = 0 N = len(x0) gtol = N*avegtol if app_fprime: gfk = apply(approx_fprime,(x0,f,epsilon)+args) myfprime = (approx_fprime,epsilon) func_calls = func_calls + len(x0) + 1 else: gfk = apply(fprime,(x0,)+args) myfprime = fprime grad_calls = grad_calls + 1 xk = x0 if retall: allvecs = [xk] sk = [2*gtol] warnflag = 0 pk = -gfk old_fval = f(xk,*args) old_old_fval = old_fval + 5000 while (Num.add.reduce(abs(gfk)) > gtol) and (k < maxiter): deltak = Num.dot(gfk,gfk) alpha_k, fc, gc, old_fval, old_old_fval = \ line_search(f,myfprime,xk,pk,gfk,old_fval,old_old_fval,args=args,c2=0.3) func_calls += fc grad_calls += gc xk = xk + alpha_k*pk if retall: allvecs.append(xk) if app_fprime: gfkp1 = apply(approx_fprime,(xk,f,epsilon)+args) func_calls = func_calls + gc + len(x0) + 1 else: gfkp1 = apply(fprime,(xk,)+args) grad_calls = grad_calls + gc + 1 yk = gfkp1 - gfk beta_k = pymax(0,Num.dot(yk,gfkp1)/deltak) pk = -gfkp1 + beta_k * pk gfk = gfkp1 k = k + 1 if disp or full_output: fval = apply(f,(xk,)+args) if warnflag == 2: if disp: print "Warning: Desired error not necessarily achieved due to precision loss" print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls elif k >= maxiter: warnflag = 1 if disp: print "Warning: Maximum number of iterations has been exceeded" print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls else: if disp: print "Optimization terminated successfully." print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls if full_output: retlist = xk, fval, func_calls, grad_calls, warnflag if retall: retlist += (allvecs,) else: retlist = xk if retall: retlist = (xk, allvecs) return retlist | 18d62e07c7b0b8dd2d3680a3b704bd36ff6ae89b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/18d62e07c7b0b8dd2d3680a3b704bd36ff6ae89b/optimize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
1154,
67,
26275,
12,
74,
16,
619,
20,
16,
284,
16382,
33,
7036,
16,
833,
33,
9334,
279,
537,
75,
3490,
33,
21,
73,
17,
25,
16,
12263,
33,
21,
18,
7616,
73,
17,
28,
16,
25743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
1154,
67,
26275,
12,
74,
16,
619,
20,
16,
284,
16382,
33,
7036,
16,
833,
33,
9334,
279,
537,
75,
3490,
33,
21,
73,
17,
25,
16,
12263,
33,
21,
18,
7616,
73,
17,
28,
16,
25743... | |
t, y = intervals[-1][1] | t, y = (n, data[-1]) | def __createMatrices (self, data): """Generate the two matrices for the system of linear equations used to create the spline. """ n = len (data) - 1 | ca38f5779a5058b0dae0dbf87d9fd18fb5b39497 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/ca38f5779a5058b0dae0dbf87d9fd18fb5b39497/Interpolate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2640,
15947,
12660,
261,
2890,
16,
501,
4672,
3536,
4625,
326,
2795,
16415,
364,
326,
2619,
434,
9103,
30369,
1399,
358,
752,
326,
22826,
18,
3536,
290,
273,
562,
261,
892,
13,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2640,
15947,
12660,
261,
2890,
16,
501,
4672,
3536,
4625,
326,
2795,
16415,
364,
326,
2619,
434,
9103,
30369,
1399,
358,
752,
326,
22826,
18,
3536,
290,
273,
562,
261,
892,
13,
300... |
for key, val in defaults: | for key, val in defaults.iteritems(): | def _get_trace_options(self, datadict, defaults={}): datadict = datadict.copy() for key, val in defaults: if key not in datadict: datadict[key] = val | 842ed4e8150c402cb2350695bf8360e8333047f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6471/842ed4e8150c402cb2350695bf8360e8333047f1/qtgnuplot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5129,
67,
2116,
12,
2890,
16,
22034,
933,
16,
3467,
12938,
4672,
22034,
933,
273,
22034,
933,
18,
3530,
1435,
364,
498,
16,
1244,
316,
3467,
18,
2165,
3319,
13332,
309,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5129,
67,
2116,
12,
2890,
16,
22034,
933,
16,
3467,
12938,
4672,
22034,
933,
273,
22034,
933,
18,
3530,
1435,
364,
498,
16,
1244,
316,
3467,
18,
2165,
3319,
13332,
309,
4... |
log.debug("MixerNode.__init__( %i, %i, %i, %s )" % (input, output, value, str(parent)) ) | def __init__(self, input, output, value, parent): QtGui.QAbstractSlider.__init__(self, parent) log.debug("MixerNode.__init__( %i, %i, %i, %s )" % (input, output, value, str(parent)) ) | 4d84dfa73e69c0a0249a7a781ad4f97417b02c0e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11526/4d84dfa73e69c0a0249a7a781ad4f97417b02c0e/matrixmixer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
810,
16,
876,
16,
460,
16,
982,
4672,
23425,
18,
53,
7469,
21824,
16186,
2738,
972,
12,
2890,
16,
982,
13,
613,
18,
4148,
2932,
21294,
264,
907,
16186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
810,
16,
876,
16,
460,
16,
982,
4672,
23425,
18,
53,
7469,
21824,
16186,
2738,
972,
12,
2890,
16,
982,
13,
613,
18,
4148,
2932,
21294,
264,
907,
16186,
... | |
size_a = len(a.digits) * 2 if a._getshort(size_a-1) == 0: size_a -= 1 | size_a = len(a.digits) | def _format(a, base, addL): """ Convert a long int object to a string, using a given conversion base. Return a string object. If base is 8 or 16, add the proper prefix '0' or '0x'. """ size_a = len(a.digits) * 2 if a._getshort(size_a-1) == 0: size_a -= 1 assert base >= 2 and base <= 36 sign = False # Compute a rough upper bound for the length of the string i = base bits = 0 while i > 1: bits += 1 i >>= 1 i = 5 + int(bool(addL)) + (size_a*LONG_BIT + bits-1) // bits s = [chr(0)] * i p = i if addL: p -= 1 s[p] = 'L' if a.sign < 0: sign = True if a.sign == 0: p -= 1 s[p] = '0' elif (base & (base - 1)) == 0: # JRH: special case for power-of-2 bases accum = r_uint(0) accumbits = 0 # # of bits in accum basebits = 1 # # of bits in base-1 i = base while 1: i >>= 1 if i <= 1: break basebits += 1 for i in range(size_a): accum |= a._getshort(i) << accumbits accumbits += SHIFT assert accumbits >= basebits while 1: cdigit = accum & (base - 1) if cdigit < 10: cdigit += ord('0') else: cdigit += ord('A') - 10 assert p > 0 p -= 1 s[p] = chr(cdigit) accumbits -= basebits accum >>= basebits if i < size_a - 1: if accumbits < basebits: break else: if accum <= 0: break else: # Not 0, and base not a power of 2. Divide repeatedly by # base, but for speed use the highest power of base that # fits in a digit. size = size_a pin = a # just for similarity to C source which uses the array # powbase <- largest power of base that fits in a digit. powbase = base # powbase == base ** power power = 1 while 1: newpow = powbase * r_uint(base) if newpow >> SHIFT: # doesn't fit in a digit break powbase = newpow power += 1 # Get a scratch area for repeated division. digitpairs = (size + 1) // 2 scratch = W_LongObject(a.space, [r_uint(0)] * digitpairs, 1) # Repeatedly divide by powbase. while 1: ntostore = power rem = _inplace_divrem1(scratch, pin, powbase, size) pin = scratch # no need to use a again if pin._getshort(size - 1) == 0: size -= 1 # Break rem into digits. assert ntostore > 0 while 1: nextrem = rem // base c = rem - nextrem * base assert p > 0 if c < 10: c += ord('0') else: c += ord('A') - 10 p -= 1 s[p] = chr(c) rem = nextrem ntostore -= 1 # Termination is a bit delicate: must not # store leading zeroes, so must get out if # remaining quotient and rem are both 0. if not (ntostore and (size or rem)): break if size == 0: break if base == 8: if size_a != 0: p -= 1 s[p] = '0' elif base == 16: p -= 1 s[p] ='x' p -= 1 s[p] = '0' elif base != 10: p -= 1 s[p] = '#' p -= 1 s[p] = chr(ord('0') + base % 10) if base > 10: p -= 1 s[p] = chr(ord('0') + base // 10) if sign: p -= 1 s[p] = '-' if p == 0: return ''.join(s) else: return ''.join(s[p:]) | ad929a678777d2ef2df66adef7cd3564d723bca6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ad929a678777d2ef2df66adef7cd3564d723bca6/longobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2139,
12,
69,
16,
1026,
16,
527,
48,
4672,
3536,
4037,
279,
1525,
509,
733,
358,
279,
533,
16,
1450,
279,
864,
4105,
1026,
18,
2000,
279,
533,
733,
18,
971,
1026,
353,
1725,
578... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
69,
16,
1026,
16,
527,
48,
4672,
3536,
4037,
279,
1525,
509,
733,
358,
279,
533,
16,
1450,
279,
864,
4105,
1026,
18,
2000,
279,
533,
733,
18,
971,
1026,
353,
1725,
578... |
else: LoopImageCreator._mountInstallRoot(self) | LoopImageCreator._mountInstallRoot(self) | def _mountInstallRoot(self): if self.isobase: self._baseOnIso(self.isobase) else: LoopImageCreator._mountInstallRoot(self) | b19cfb1d61c393a4fd77da630abb45e46d376227 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9342/b19cfb1d61c393a4fd77da630abb45e46d376227/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4778,
6410,
2375,
12,
2890,
4672,
309,
365,
18,
291,
947,
448,
30,
365,
6315,
1969,
1398,
18516,
12,
2890,
18,
291,
947,
448,
13,
469,
30,
9720,
2040,
10636,
6315,
4778,
6410,
237... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4778,
6410,
2375,
12,
2890,
4672,
309,
365,
18,
291,
947,
448,
30,
365,
6315,
1969,
1398,
18516,
12,
2890,
18,
291,
947,
448,
13,
469,
30,
9720,
2040,
10636,
6315,
4778,
6410,
237... |
try: unicode(self._label) except: print repr(self._label) | def getval(self, colors=None, label=None): if label is not None: self._label = label if colors is not None: self._colors = colors try: unicode(self._label) except: print repr(self._label) return ' '.join([Color(c).hex for c in self._colors or self.colors] + [unicode(self._label or '')]) | 262778dccc67b6f35aa8b5a9f230a327291e8068 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12629/262778dccc67b6f35aa8b5a9f230a327291e8068/fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1125,
12,
2890,
16,
5740,
33,
7036,
16,
1433,
33,
7036,
4672,
309,
1433,
353,
486,
599,
30,
365,
6315,
1925,
273,
1433,
309,
5740,
353,
486,
599,
30,
365,
6315,
9724,
273,
5740,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1125,
12,
2890,
16,
5740,
33,
7036,
16,
1433,
33,
7036,
4672,
309,
1433,
353,
486,
599,
30,
365,
6315,
1925,
273,
1433,
309,
5740,
353,
486,
599,
30,
365,
6315,
9724,
273,
5740,
... | |
action_mode, = cr.fetchone() | action_mode, = cr.fetchone() or ( False, ) if not action_mode: raise Exception("View %d specified in ir.act.window[%d] not found!" % (view_id, a_id)) | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8'))) | eba4a3af3f4e6cc2237618c372bee354a77190c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/eba4a3af3f4e6cc2237618c372bee354a77190c4/convert.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2692,
67,
5414,
1726,
12,
2890,
16,
4422,
16,
1950,
16,
501,
67,
2159,
33,
7036,
4672,
1950,
67,
350,
273,
1950,
18,
588,
2932,
350,
3113,
6309,
2934,
3015,
2668,
9184,
6134,
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,
389,
2692,
67,
5414,
1726,
12,
2890,
16,
4422,
16,
1950,
16,
501,
67,
2159,
33,
7036,
4672,
1950,
67,
350,
273,
1950,
18,
588,
2932,
350,
3113,
6309,
2934,
3015,
2668,
9184,
6134,
365,... |
exclude=0, single=0, randomize=0): | exclude=0, single=0, randomize=0, leakdebug=0): | def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdir -- the directory in which to look for tests (optional) Users other than the Python test suite will certainly want to specify testdir; if it's omitted, the directory containing the Python test suite is searched for. If the tests argument is omitted, the tests listed on the command-line will be used. If that's empty, too, then all *.py files beginning with test_ will be used. The other six default arguments (verbose, quiet, generate, exclude, single, and randomize) allow programmers calling main() directly to set the values that would normally be set by flags on the command line. """ try: opts, args = getopt.getopt(sys.argv[1:], 'vgqxsr') except getopt.error, msg: print msg print __doc__ return 2 for o, a in opts: if o == '-v': verbose = verbose+1 if o == '-q': quiet = 1; verbose = 0 if o == '-g': generate = 1 if o == '-x': exclude = 1 if o == '-s': single = 1 if o == '-r': randomize = 1 if generate and verbose: print "-g and -v don't go together!" return 2 good = [] bad = [] skipped = [] if single: from tempfile import gettempdir filename = os.path.join(gettempdir(), 'pynexttest') try: fp = open(filename, 'r') next = string.strip(fp.read()) tests = [next] fp.close() except IOError: pass for i in range(len(args)): # Strip trailing ".py" from arguments if args[i][-3:] == '.py': args[i] = args[i][:-3] stdtests = STDTESTS[:] nottests = NOTTESTS[:] if exclude: for arg in args: if arg in stdtests: stdtests.remove(arg) nottests[:0] = args args = [] tests = tests or args or findtests(testdir, stdtests, nottests) if single: tests = tests[:1] if randomize: random.shuffle(tests) test_support.verbose = verbose # Tell tests to be moderately quiet save_modules = sys.modules.keys() for test in tests: if not quiet: print test ok = runtest(test, generate, verbose, testdir) if ok > 0: good.append(test) elif ok == 0: bad.append(test) else: if not quiet: print "test", test, print "skipped -- an optional feature could not be imported" skipped.append(test) # Unload the newly imported modules (best effort finalization) for module in sys.modules.keys(): if module not in save_modules and module.startswith("test."): test_support.unload(module) if good and not quiet: if not bad and not skipped and len(good) > 1: print "All", print count(len(good), "test"), "OK." if bad: print count(len(bad), "test"), "failed:", print string.join(bad) if skipped and not quiet: print count(len(skipped), "test"), "skipped:", print string.join(skipped) if single: alltests = findtests(testdir, stdtests, nottests) for i in range(len(alltests)): if tests[0] == alltests[i]: if i == len(alltests) - 1: os.unlink(filename) else: fp = open(filename, 'w') fp.write(alltests[i+1] + '\n') fp.close() break else: os.unlink(filename) return len(bad) > 0 | 59ef890a58c3ecb068f2e7b7f148dd3369de5e25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/59ef890a58c3ecb068f2e7b7f148dd3369de5e25/regrtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
16341,
33,
7036,
16,
1842,
1214,
33,
7036,
16,
3988,
33,
20,
16,
10902,
33,
20,
16,
2103,
33,
20,
16,
4433,
33,
20,
16,
2202,
33,
20,
16,
2744,
554,
33,
20,
16,
20891,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16341,
33,
7036,
16,
1842,
1214,
33,
7036,
16,
3988,
33,
20,
16,
10902,
33,
20,
16,
2103,
33,
20,
16,
4433,
33,
20,
16,
2202,
33,
20,
16,
2744,
554,
33,
20,
16,
20891,
... |
self.header0 = urwid.AttrWrap(SelText(header0_t),'tab active','focus') self.header1 = urwid.AttrWrap(SelText(header1_t),'body','focus') self.header2 = urwid.AttrWrap(SelText(header2_t),'body','focus') | self.header0 = urwid.AttrWrap(SelText(header0_t), 'tab active', 'focus') self.header1 = urwid.AttrWrap(SelText(header1_t), 'body', 'focus') self.header2 = urwid.AttrWrap(SelText(header2_t), 'body', 'focus') | def __init__(self,body,pos,ui,dbus=None): global daemon, wireless, wired | 4fa245b79a41a22da17ae3febbf053c5dd751a5f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12280/4fa245b79a41a22da17ae3febbf053c5dd751a5f/prefs_curses.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3432,
16,
917,
16,
4881,
16,
1966,
407,
33,
7036,
4672,
2552,
8131,
16,
6636,
2656,
16,
341,
2921,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3432,
16,
917,
16,
4881,
16,
1966,
407,
33,
7036,
4672,
2552,
8131,
16,
6636,
2656,
16,
341,
2921,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return value | break if value.find("%(") >= 0: raise InterpolationDepthError(option, section, rawval) return value | def get(self, section, option, raw=0, vars=None): """Get an option value for a given section. | cecb7da2a446f1c0227844233d9d438a365a7cc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cecb7da2a446f1c0227844233d9d438a365a7cc7/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
2442,
16,
1456,
16,
1831,
33,
20,
16,
4153,
33,
7036,
4672,
3536,
967,
392,
1456,
460,
364,
279,
864,
2442,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
12,
2890,
16,
2442,
16,
1456,
16,
1831,
33,
20,
16,
4153,
33,
7036,
4672,
3536,
967,
392,
1456,
460,
364,
279,
864,
2442,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if cache.has_key(path) and cache[path] != info: module = reload(module) | if cache.get(path) == info: continue module = reload(module) | def freshimport(name, cache={}): """Import a module, reloading it if the source file has changed.""" topmodule = __import__(name) module = None for component in split(name, '.'): if module == None: module = topmodule path = split(name, '.')[0] else: module = getattr(module, component) path = path + '.' + component if hasattr(module, '__file__'): file = module.__file__ if os.path.exists(file): info = (file, os.path.getmtime(file), os.path.getsize(file)) if cache.has_key(path) and cache[path] != info: module = reload(module) file = module.__file__ if os.path.exists(file): info = (file, os.path.getmtime(file), os.path.getsize(file)) cache[path] = info return module | f78a81b47baa04c78ca29ff4f4a8236297e852a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f78a81b47baa04c78ca29ff4f4a8236297e852a0/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12186,
5666,
12,
529,
16,
1247,
12938,
4672,
3536,
5010,
279,
1605,
16,
7749,
310,
518,
309,
326,
1084,
585,
711,
3550,
12123,
1760,
2978,
273,
1001,
5666,
972,
12,
529,
13,
1605,
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,
12186,
5666,
12,
529,
16,
1247,
12938,
4672,
3536,
5010,
279,
1605,
16,
7749,
310,
518,
309,
326,
1084,
585,
711,
3550,
12123,
1760,
2978,
273,
1001,
5666,
972,
12,
529,
13,
1605,
273,
... |
addrs = g_dionaea.config()['listen']['addrs'] | addrs = {} | def stop(self, daemon): daemon.close() | dfd53f3fedf35adf886e18ecdc9b8577fd72f775 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8801/dfd53f3fedf35adf886e18ecdc9b8577fd72f775/services.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
12,
2890,
16,
8131,
4672,
8131,
18,
4412,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
12,
2890,
16,
8131,
4672,
8131,
18,
4412,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
else: | else: | def on_add_new_tag(self, widget=None, tid=None, tryagain = False): if not tid: self.tids_to_addtag = self.get_selected_tasks() else: self.tids_to_addtag = [tid] | 32afe1d1c7b29a8896d386d5d5315c738d741c35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/32afe1d1c7b29a8896d386d5d5315c738d741c35/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1289,
67,
2704,
67,
2692,
12,
2890,
16,
3604,
33,
7036,
16,
11594,
33,
7036,
16,
775,
23095,
273,
1083,
4672,
309,
486,
11594,
30,
365,
18,
88,
2232,
67,
869,
67,
1289,
2692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1289,
67,
2704,
67,
2692,
12,
2890,
16,
3604,
33,
7036,
16,
11594,
33,
7036,
16,
775,
23095,
273,
1083,
4672,
309,
486,
11594,
30,
365,
18,
88,
2232,
67,
869,
67,
1289,
2692... |
/.../release/RunChandler --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --catsPerfLog=.../test_profile/time.log --scriptFile=.../tools/QATestScripts/Performance/PerfLargeDataResizeCalendar.py --restore=.../test_profile/__repository__.001 | /.../release/RunChandler --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --catsPerfLog=.../test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfLargeDataResizeCalendar.py --restore=.../test_profile/__repository__.001 | def runPerfTests(options, tests=None): """ Run the Performance Test Suite >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> options.modes = ['debug'] >>> runPerfTests(options) Skipping Performance Tests - release mode not specified False >>> options.modes = ['release'] >>> runPerfTests(options) /.../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --catsPerfLog=.../test_profile/time.log --scriptFile=.../tools/QATestScripts/Performance/PerfImportCalendar.py --create PerfImportCalendar.py | 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... /.../release/RunChandler --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --catsPerfLog=.../test_profile/time.log --scriptFile=.../tools/QATestScripts/Performance/PerfLargeDataResizeCalendar.py --restore=.../test_profile/__repository__.001 PerfLargeDataResizeCalendar.py | 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... Creating repository for startup time tests ... Startup ... ... Creating repository for startup time tests ... Startup_with_large_calendar ... ... Showing performance log in 5 seconds, Ctrl+C to stop tests - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ failed = False savePWD = os.getcwd() try: if 'release' in options.modes: delayedLogger = DelayedLogger() if not options.dryrun: os.chdir(options.chandlerHome) if tests is None: for item in glob.glob(os.path.join(options.profileDir, '__repository__.0*')): if os.path.isdir(item): build_lib.rmdirs(item) else: os.remove(item) testlist = [] testlistLarge = [] if tests is None: testlistStartup = ['startup', 'startup_large'] for item in glob.glob(os.path.join(options.chandlerHome, 'tools', 'QATestScripts', 'Performance', 'Perf*.py')): if 'PerfLargeData' in item: testlistLarge.append(item) else: testlist.append(item) else: testlistStartup = [] for item in tests: if 'PerfLargeData' in item: testlistLarge.append(item) elif item in ('startup', 'startup_large'): testlistStartup.append(item) else: testlist.append(item) # small repo tests if testlist: failed = runScriptPerfTests(options, testlist, logger=delayedLogger) # large repo tests if testlistLarge and (not failed or options.noStop): if runScriptPerfTests(options, testlistLarge, largeData=True, logger=delayedLogger): failed = True # startup tests if testlistStartup and (not failed or options.noStop): if os.name == 'nt' or sys.platform == 'cygwin': t = 'time.exe' elif sys.platform == 'darwin': t = build_lib.getCommand(['which', 'gtime']) if not t: log('%s not found, skipping startup performance tests' % t) log('NOTE: %s is not part of OS X, you need to compile one' + \ 'yourself (get source from http://directory.fsf.org/time.html)' + \ 'or get it from darwinports project.' % t) else: t = '/usr/bin/time' if os.path.isfile(t): if 'startup' in testlistStartup and runStartupPerfTests(options, t, logger=delayedLogger): failed = True if not failed: # Don't continue even if noStop, almost certain these won't work if 'startup_large' in testlistStartup and runStartupPerfTests(options, t, largeData=True, logger=delayedLogger): failed = True else: log('%s not found, skipping startup performance tests' % t) if not tests: log('Showing performance log in 5 seconds, Ctrl+C to stop tests') if not options.dryrun: try: time.sleep(5) except KeyboardInterrupt: sys.exit(0) log('- + ' * 15) delayedLogger.logAll() else: log('Skipping Performance Tests - release mode not specified') finally: os.chdir(savePWD) return failed | ad17cec5f290a1afe127c78e0b20723aa8b8bf15 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/ad17cec5f290a1afe127c78e0b20723aa8b8bf15/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
22016,
14650,
12,
2116,
16,
7434,
33,
7036,
4672,
3536,
1939,
326,
11217,
1359,
7766,
348,
9519,
225,
4080,
702,
273,
1109,
1320,
1435,
4080,
866,
1320,
12,
2116,
13,
4080,
702,
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,
1086,
22016,
14650,
12,
2116,
16,
7434,
33,
7036,
4672,
3536,
1939,
326,
11217,
1359,
7766,
348,
9519,
225,
4080,
702,
273,
1109,
1320,
1435,
4080,
866,
1320,
12,
2116,
13,
4080,
702,
18... |
return super(project_work,self).write(cr, uid, ids,vals,context) | return super(project_work,self).write(cr, uid, ids, vals, context) | def write(self, cr, uid, ids,vals,context={}): vals_line={} | 3378bd4d3a4d503d59d259ae7c1220f1547be7df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/3378bd4d3a4d503d59d259ae7c1220f1547be7df/project_timesheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
4524,
16,
2472,
12938,
4672,
5773,
67,
1369,
12938,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
4524,
16,
2472,
12938,
4672,
5773,
67,
1369,
12938,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
In the above example, the message was accepted for delivery to three of the four addresses, and one was rejected, with the error code 550. If all addresses are accepted, then the method will return an empty dictionary. """ | In the above example, the message was accepted for delivery to three of the four addresses, and one was rejected, with the error code 550. If all addresses are accepted, then the method will return an empty dictionary. """ | def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to (a string will be treated as a list with 1 address) - msg : the message to send. - mail_options : list of ESMTP options (such as 8bitmime) for the mail command - rcpt_options : List of ESMTP options (such as DSN commands) for all the rcpt commands If there has been no previous EHLO or HELO command this session, this method tries ESMTP EHLO first. If the server does ESMTP, message size and each of the specified options will be passed to it. If EHLO fails, HELO will be tried and ESMTP options suppressed. | dfd1c12c67bea1eda4e609be530e5ca4b71d8eb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dfd1c12c67bea1eda4e609be530e5ca4b71d8eb4/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4408,
12,
2890,
16,
628,
67,
4793,
16,
358,
67,
23305,
16,
1234,
16,
4791,
67,
2116,
22850,
6487,
4519,
337,
67,
2116,
33,
8526,
4672,
3536,
1220,
1296,
11199,
392,
7278,
4791,
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,
1366,
4408,
12,
2890,
16,
628,
67,
4793,
16,
358,
67,
23305,
16,
1234,
16,
4791,
67,
2116,
22850,
6487,
4519,
337,
67,
2116,
33,
8526,
4672,
3536,
1220,
1296,
11199,
392,
7278,
4791,
2... |
if istream: istream.close() if ostream: ostream.close() if sock: sock.close() | if istream: istream.close() if ostream: ostream.close() if sock: sock.close() def gettimeout(self): return self.timeout def settimeout(self, timeout): self.timeout = _get_timeout_value(timeout) if self.timeout and self.sock: self.sock.setSoTimeout(int(self.timeout*1000)) | def close(self): if not self.sock: return | 7e3864db15e592bcdf6d221ca5a88c370ad31f83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/7e3864db15e592bcdf6d221ca5a88c370ad31f83/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
309,
486,
365,
18,
15031,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
309,
486,
365,
18,
15031,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sys.stdout.write('%s[Error: Timed out compilation for %s/%s (%d)]\n'% (futuretest, localdir, execname, compoptsnum)) | sys.stdout.write('%s[Error: Timed out compilation for %s/%s'% (futuretest, localdir, execname)) if len(compoptslist) > 1: sys.stdout.write('(%s%s)'%(' '.join(globalCompopts),compopts)) sys.stdout.write(']\n') | def kill_proc(p, timeout): k = subprocess.Popen(['kill',str(p.pid)]) k.wait() now = time.time() end_time = now + timeout # give it a little time while end_time > now: if p.poll(): return now = time.time() # use the big hammer (and don't bother waiting) subprocess.Popen(['kill','-9', str(p.pid)]) return | 104424f171f0895d16c59291ac9da05a2dd76db5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6895/104424f171f0895d16c59291ac9da05a2dd76db5/sub_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
67,
9381,
12,
84,
16,
2021,
4672,
417,
273,
6652,
18,
52,
3190,
12,
3292,
16418,
2187,
701,
12,
84,
18,
6610,
13,
5717,
417,
18,
7048,
1435,
2037,
273,
813,
18,
957,
1435,
679,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
67,
9381,
12,
84,
16,
2021,
4672,
417,
273,
6652,
18,
52,
3190,
12,
3292,
16418,
2187,
701,
12,
84,
18,
6610,
13,
5717,
417,
18,
7048,
1435,
2037,
273,
813,
18,
957,
1435,
679,... |
self.beacons = beacons(self.rover,self.trace,smp.latency+lookAhead) | actualRover = smp.predict(smp.latency)[-1] self.beacons = beacons(actualRover,self.trace,smp.latency+lookAhead) | def processTelemetry(self,tele): """message handler""" # assuming that serverMovementPredictor already # received this tele self.rover = RoverState(tele,self.rover) if self.beginning: commands = [ ControlRecord((1,0),self.rover.localT+1), ControlRecord((1,-1),self.rover.localT+3), ControlRecord((1,2),self.rover.localT+5), ControlRecord((0,0),self.rover.localT+8), ] self.trace = predict( self.rover, commands=commands, interval=10,dt=0.051) self.beginning = False smp = serverMovementPredictor lookAhead = 0.05 self.beacons = beacons(self.rover,self.trace,smp.latency+lookAhead) bestCmds = None bestCost = 1e100 bestPos = None candidates = [] for fc in range(-1,2): for tc in range(-2,3): cmds = [ ControlRecord((fc,tc),tele.localTimeStamp+smp.latency)] candidates.append(cmds) | 7e4ade451b85e4cd3cc83c6ea54b9246b0fcafd7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5773/7e4ade451b85e4cd3cc83c6ea54b9246b0fcafd7/rail_controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
56,
20483,
12,
2890,
16,
29170,
4672,
3536,
2150,
1838,
8395,
468,
15144,
716,
1438,
49,
26140,
21362,
280,
1818,
468,
5079,
333,
268,
6516,
365,
18,
303,
502,
273,
534,
1643,
1119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
56,
20483,
12,
2890,
16,
29170,
4672,
3536,
2150,
1838,
8395,
468,
15144,
716,
1438,
49,
26140,
21362,
280,
1818,
468,
5079,
333,
268,
6516,
365,
18,
303,
502,
273,
534,
1643,
1119... |
FL_Coord, STRING], | FL_Coord, STRING], | def fl_set_tabfolder_offset(ob, offset): """ fl_set_tabfolder_offset(ob, offset) -> num. """ retval = _fl_set_tabfolder_offset(ob, offset) 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,
542,
67,
7032,
5609,
67,
3348,
12,
947,
16,
1384,
4672,
3536,
1183,
67,
542,
67,
7032,
5609,
67,
3348,
12,
947,
16,
1384,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
7032,
5609,
67,
3348,
12,
947,
16,
1384,
4672,
3536,
1183,
67,
542,
67,
7032,
5609,
67,
3348,
12,
947,
16,
1384,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,... |
ROBIN_DEBUG=[('ROBIN_DEBUG',None)] ROBIN_DEBUG=[] | MACROS=[('ROBIN_DEBUG',None)] MACROS=[] | def BIGENDIAN(macname,value=None): 'define a macro if bigendian' return sys.byteorder=='big' and [(macname,value)] or [] | 92f97b6f8cea613f1aae2a10f67396d06e1a10c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/92f97b6f8cea613f1aae2a10f67396d06e1a10c9/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18855,
30597,
12,
5821,
529,
16,
1132,
33,
7036,
4672,
296,
11255,
279,
11522,
309,
5446,
22910,
11,
327,
2589,
18,
7229,
1019,
18920,
14002,
11,
471,
306,
12,
5821,
529,
16,
1132,
25887... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18855,
30597,
12,
5821,
529,
16,
1132,
33,
7036,
4672,
296,
11255,
279,
11522,
309,
5446,
22910,
11,
327,
2589,
18,
7229,
1019,
18920,
14002,
11,
471,
306,
12,
5821,
529,
16,
1132,
25887... |
if(not self.min=='line'): atoms.d = d atoms.du = d / npy.sqrt(npy.vdot(d, d)) | if(not self.min=='line'): self.d = d self.du = d / npy.sqrt(npy.vdot(d, d)) | def step(self, f): atoms = self.atoms self.ni = atoms.nimages-2 # try: atoms.imax # except: atoms.imax=0 # if(not self.ni):atoms.imax=1 g = open('out','w') atoms.r = npy.zeros((self.ni, atoms.natoms, self.dim), 'd') for i in range(1, atoms.nimages-1): atoms.r[i-1] = atoms.images[i].get_positions() print >> g,'atoms.r',atoms.r atoms.f = npy.zeros((self.ni, atoms.natoms, self.dim), 'd') for i in range(1, atoms.nimages-1): atoms.f[i-1] = atoms.images[i].get_forces() print >> g,'atoms.f',atoms.f try: atoms.start except:atoms.start=0 if(not atoms.start): atoms.start = 1 atoms.a = npy.zeros(self.memory+1, 'd') self.ptmp = atoms self.maxstep = npy.sqrt(self.maxstep * self.ni) atoms.lbfgsinit = 0 try: atoms.lbfgsinit except:atoms.lbfgsinit=0 if(not atoms.lbfgsinit): atoms.lbfgsinit = 1 atoms.Ho = npy.ones((self.ni, atoms.natoms, self.dim), 'd') if (not self.min=='line'):atoms.Ho = atoms.Ho * self.alpha atoms.ITR = 1 atoms.s = [1.] atoms.y = [1.] atoms.rho = [1.] else: a1 = abs (npy.vdot(atoms.f, atoms.f_old)) a2 = npy.vdot(atoms.f_old, atoms.f_old) print 'a1,a2 created',a1,a2 if(self.min=='line'): if(a1<=0.5* a2 and a2!=0): reset_flag = 0 else: reset_flag = 1 else: reset_flag = 0 if(reset_flag==0): g1 = open('out1','w') g2 = open('out2','w') print >> g1,'atoms.r',atoms.r print >> g2,'atoms.r_old',atoms.r_old ITR = atoms.ITR#correctly generated if(ITR > self.memory): atoms.s.pop(1) atoms.y.pop(1) atoms.rho.pop(1) ITR=self.memory atoms.s.append(atoms.r - atoms.r_old)#!!atoms.r is not updating # boundry cond # for i in range(atoms.ni): # if(method=='min'):i=0 # try: # DBC(atoms.s[ITR][i],atoms.p[i].Box) #need to make matrix for box # except: # print "Box not found." # if(method=='min'):break atoms.y.append(-(atoms.f-atoms.f_old)) atoms.rho.append(1/npy.vdot(atoms.y[ITR],atoms.s[ITR])) atoms.ITR += 1 else: | 689ed3715e535adf898039f50971002aa6c5a5e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/689ed3715e535adf898039f50971002aa6c5a5e9/glbfgs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2235,
12,
2890,
16,
284,
4672,
9006,
273,
365,
18,
14937,
365,
18,
15834,
273,
9006,
18,
82,
7369,
17,
22,
468,
775,
30,
9006,
18,
381,
651,
468,
1335,
30,
9006,
18,
381,
651,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2235,
12,
2890,
16,
284,
4672,
9006,
273,
365,
18,
14937,
365,
18,
15834,
273,
9006,
18,
82,
7369,
17,
22,
468,
775,
30,
9006,
18,
381,
651,
468,
1335,
30,
9006,
18,
381,
651,
33,
... |
big = [f for f in tkt.fields if f['type'] == 'textarea' and f['name'] != 'description'] | big = [] | def format_props(self): tkt = self.ticket fields = [f for f in tkt.fields if f['type'] != 'textarea' and f['name'] not in ('summary', 'cc')] t = self.modtime or tkt.time_changed width = [0, 0, 0, 0] for i, f in enum([f['name'] for f in fields]): if not tkt.values.has_key(f): continue fval = tkt[f] if fval.find('\n') > -1: continue idx = 2 * (i % 2) if len(f) > width[idx]: width[idx] = len(f) if len(fval) > width[idx + 1]: width[idx + 1] = len(fval) format = ('%%%is: %%-%is | ' % (width[0], width[1]), ' %%%is: %%-%is%s' % (width[2], width[3], CRLF)) l = (width[0] + width[1] + 5) sep = l * '-' + '+' + (self.COLS - l) * '-' txt = sep + CRLF big = [f for f in tkt.fields if f['type'] == 'textarea' and f['name'] != 'description'] i = 0 for f in [f['name'] for f in fields]: if not tkt.values.has_key(f): continue fval = tkt[f] if '\n' in str(fval): big.append((f.capitalize(), CRLF.join(fval.splitlines()))) else: txt += format[i % 2] % (f.capitalize(), fval) i += 1 if not i % 2: txt += CRLF if big: txt += sep for name, value in big: txt += CRLF.join(['', name + ':', value, '', '']) txt += sep return txt | 7b38e5e2562a1b297a40077b152eab2636e37614 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/7b38e5e2562a1b297a40077b152eab2636e37614/Notify.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
9693,
12,
2890,
4672,
268,
8629,
273,
365,
18,
16282,
1466,
273,
306,
74,
364,
284,
316,
268,
8629,
18,
2821,
309,
284,
3292,
723,
3546,
480,
296,
16701,
11,
471,
284,
3292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
9693,
12,
2890,
4672,
268,
8629,
273,
365,
18,
16282,
1466,
273,
306,
74,
364,
284,
316,
268,
8629,
18,
2821,
309,
284,
3292,
723,
3546,
480,
296,
16701,
11,
471,
284,
3292,
... |
self.GenericAddToList('grid', self.__grid, self.__gridDescription) | self.GenericAddToList('Grid', self.__grid, self.__gridDescription) | def XmlAddMembers(self): self.GenericAddToList('ProbeName', self.__ProbeName, self.__ProbeNameDescription) self.GenericAddToList('SiteName', self.__SiteName, self.__SiteNameDescription) self.GenericAddToList('grid', self.__grid, self.__gridDescription) | 5309e91acbcb1ff4563532294063f531f3b845ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/637/5309e91acbcb1ff4563532294063f531f3b845ba/Gratia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5714,
986,
6918,
12,
2890,
4672,
365,
18,
7014,
986,
25772,
2668,
21042,
461,
2187,
365,
16186,
21042,
461,
16,
365,
16186,
21042,
461,
3291,
13,
365,
18,
7014,
986,
25772,
2668,
4956,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5714,
986,
6918,
12,
2890,
4672,
365,
18,
7014,
986,
25772,
2668,
21042,
461,
2187,
365,
16186,
21042,
461,
16,
365,
16186,
21042,
461,
3291,
13,
365,
18,
7014,
986,
25772,
2668,
4956,
4... |
OUTPUT: a permutation group | OUTPUT: - A permutation group. | def PermutationGroup(gens=None, gap_group=None, canonicalize=True): """ Return the permutation group associated to `x` (typically a list of generators). INPUT: - ``gens`` - list of generators - ``gap_group`` - a gap permutation group - ``canonicalize`` - bool (default: True), if True sort generators and remove duplicates OUTPUT: a permutation group EXAMPLES:: sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G Permutation Group with generators [(3,4), (1,2,3)(4,5)] We can also make permutation groups from PARI groups:: sage: H = pari('x^4 - 2*x^3 - 2*x + 1').polgalois() sage: G = PariGroup(H, 4); G PARI group [8, -1, 3, "D(4)"] of degree 4 sage: H = PermutationGroup(G); H # optional - database_gap Transitive group number 3 of degree 4 sage: H.gens() # optional - database_gap [(1,2,3,4), (1,3)] We can also create permutation groups whose generators are Gap permutation objects. :: sage: p = gap('(1,2)(3,7)(4,6)(5,8)'); p (1,2)(3,7)(4,6)(5,8) sage: PermutationGroup([p]) Permutation Group with generators [(1,2)(3,7)(4,6)(5,8)] EXAMPLES: There is an underlying gap object that implements each permutation group. :: sage: G = PermutationGroup([[(1,2,3,4)]]) sage: G._gap_() Group( [ (1,2,3,4) ] ) sage: gap(G) Group( [ (1,2,3,4) ] ) sage: gap(G) is G._gap_() True sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: current_randstate().set_seed_gap() sage: G._gap_().DerivedSeries() [ Group( [ (3,4), (1,2,3)(4,5) ] ), Group( [ (1,5)(3,4), (1,5)(2,4), (1,5,3) ] ) ] TESTS:: sage: PermutationGroup(SymmetricGroup(5)) Traceback (most recent call last): ... TypeError: gens must be a tuple, list, or GapElement """ if not is_ExpectElement(gens) and hasattr(gens, '_permgroup_'): return gens._permgroup_() if gens is not None and not isinstance(gens, (tuple,list, GapElement)): raise TypeError, "gens must be a tuple, list, or GapElement" return PermutationGroup_generic(gens=gens, gap_group=gap_group, canonicalize=canonicalize) | f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13813,
9245,
1114,
12,
23730,
33,
7036,
16,
9300,
67,
1655,
33,
7036,
16,
25839,
33,
5510,
4672,
3536,
2000,
326,
17440,
1041,
3627,
358,
1375,
92,
68,
261,
12846,
6478,
279,
666,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13813,
9245,
1114,
12,
23730,
33,
7036,
16,
9300,
67,
1655,
33,
7036,
16,
25839,
33,
5510,
4672,
3536,
2000,
326,
17440,
1041,
3627,
358,
1375,
92,
68,
261,
12846,
6478,
279,
666,
434,
... |
return word | return self.formatter.text(word) | def _tableZ_repl(self, word): """Handle table row end.""" if self.in_table: result = '' # REMOVED: check for self.in_li, p should always close if self.formatter.in_p: result = self.formatter.paragraph(0) result += self.formatter.table_cell(0) + self.formatter.table_row(0) return result else: return word | 13842dc6639400fbaa508fdaed2284564375030b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/13842dc6639400fbaa508fdaed2284564375030b/wiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2121,
62,
67,
26745,
12,
2890,
16,
2076,
4672,
3536,
3259,
1014,
1027,
679,
12123,
309,
365,
18,
267,
67,
2121,
30,
563,
273,
875,
468,
23769,
12135,
30,
866,
364,
365,
18,
267,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2121,
62,
67,
26745,
12,
2890,
16,
2076,
4672,
3536,
3259,
1014,
1027,
679,
12123,
309,
365,
18,
267,
67,
2121,
30,
563,
273,
875,
468,
23769,
12135,
30,
866,
364,
365,
18,
267,
... |
else: print "Space group is centric." | def ShowSgOpsGeneric(SgOps): print "Number of lattice translations:", SgOps.nLTr() if (SgOps.isCentric()): print "Space group is acentric." else: print "Space group is centric." if (SgOps.isChiral()): print "Space group is chiral." if (SgOps.isEnantiomorphic()): print "Space group is enantiomorphic." print "Number of representative symmetry operations:", SgOps.nSMx() print "Total number of symmetry operations:", SgOps.OrderZ() print print "Parallelepiped containing an asymmetric unit:" try: Brick = SgOps.getBrick() except RuntimeError, e: print " ", e else: print " ", Brick print print "List of symmetry operations:" print "</pre><table border=2 cellpadding=2>" global InTable InTable = 1 RTMxAnalysisHeader() for M in SgOps: RTMxAnalysis(M) print "</table><pre>" InTable = 0 print | 3369de6be03fe91e0980261064d99d4448b75f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/3369de6be03fe91e0980261064d99d4448b75f6f/explore_symmetry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9674,
55,
75,
8132,
7014,
12,
55,
75,
8132,
4672,
1172,
315,
1854,
434,
16690,
7863,
2773,
16,
348,
75,
8132,
18,
82,
48,
1070,
1435,
309,
261,
55,
75,
8132,
18,
291,
39,
18395,
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,
9674,
55,
75,
8132,
7014,
12,
55,
75,
8132,
4672,
1172,
315,
1854,
434,
16690,
7863,
2773,
16,
348,
75,
8132,
18,
82,
48,
1070,
1435,
309,
261,
55,
75,
8132,
18,
291,
39,
18395,
1435... | |
rate_str = '' | minutes = (time.time() - self._start_time) / 60 revisions_added = self._revision_count - self.skip_total rate = revisions_added * 1.0 / minutes if rate > 10: rate_str = "at %.0f/minute " % rate else: rate_str = "at %.1f/minute " % rate | def report_progress(self, details=''): if self._revision_count % self.progress_every == 0: if self.verbose: counts = "%d/%d" % (self._revision_count, self.total_commits) minutes = (time.time() - self._start_time) / 60 rate = self._revision_count * 1.0 / minutes if rate > 10: rate_str = "at %.0f/minute " % rate else: rate_str = "at %.1f/minute " % rate else: counts = "%d" % (self._revision_count,) rate_str = '' self.note("%s commits processed %s%s" % (counts, rate_str, details)) | 672b8e9625a0389dfcee0f7372c32e1e8d8643c6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8703/672b8e9625a0389dfcee0f7372c32e1e8d8643c6/generic_processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
67,
8298,
12,
2890,
16,
3189,
2218,
11,
4672,
309,
365,
6315,
13057,
67,
1883,
738,
365,
18,
8298,
67,
20434,
422,
374,
30,
309,
365,
18,
11369,
30,
6880,
273,
2213,
72,
5258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
67,
8298,
12,
2890,
16,
3189,
2218,
11,
4672,
309,
365,
6315,
13057,
67,
1883,
738,
365,
18,
8298,
67,
20434,
422,
374,
30,
309,
365,
18,
11369,
30,
6880,
273,
2213,
72,
5258,
... |
selections = (sel_atoms_ref, sel_atoms) | selections = (sel_atoms, sel_atoms_ref) | def process_reference_groups(self, pdb_hierarchy, pdb_hierarchy_ref, params): model_iseq_hash = self.build_iseq_hash(pdb_hierarchy=pdb_hierarchy) model_name_hash = self.build_name_hash(pdb_hierarchy=pdb_hierarchy) ref_iseq_hash = self.build_iseq_hash(pdb_hierarchy=pdb_hierarchy_ref) sel_cache = pdb_hierarchy.atom_selection_cache() sel_cache_ref = pdb_hierarchy_ref.atom_selection_cache() match_map = {} | 907e426fd41ff5a0c9492ce2a493a7074b2e48aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/907e426fd41ff5a0c9492ce2a493a7074b2e48aa/reference_model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
6180,
67,
4650,
12,
2890,
16,
10892,
67,
17937,
16,
10892,
67,
17937,
67,
1734,
16,
859,
4672,
938,
67,
784,
85,
67,
2816,
273,
365,
18,
3510,
67,
784,
85,
67,
2816,
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,
1207,
67,
6180,
67,
4650,
12,
2890,
16,
10892,
67,
17937,
16,
10892,
67,
17937,
67,
1734,
16,
859,
4672,
938,
67,
784,
85,
67,
2816,
273,
365,
18,
3510,
67,
784,
85,
67,
2816,
12,
... |
if cbFun and not pendingReqsCount[0]: cbFun(sendRequestHandle, cbCtx) return | pass | def processResponsePdu( self, snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineID, contextName, pduVersion, PDU, statusInformation, sendPduHandle, (cbFun, cbCtx) ): # 3.3.6d ( origTransportDomain, origTransportAddress, origMessageProcessingModel, origSecurityModel, origSecurityName, origSecurityLevel, origContextEngineID, origContextName, origPduVersion, origPdu, origTimeout, origRetryCount, origRetries, sendRequestHandle, pendingReqsCount, ) = self.__pendingReqs[sendPduHandle] del self.__pendingReqs[sendPduHandle] | 4bf47e5d31e72e39ffc4c42b6e3ab83f1586d1c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/4bf47e5d31e72e39ffc4c42b6e3ab83f1586d1c8/ntforg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1064,
52,
2544,
12,
365,
16,
15366,
4410,
16,
883,
7798,
1488,
16,
4373,
1488,
16,
4373,
461,
16,
4373,
2355,
16,
819,
4410,
734,
16,
819,
461,
16,
21160,
1444,
16,
453,
16214,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1064,
52,
2544,
12,
365,
16,
15366,
4410,
16,
883,
7798,
1488,
16,
4373,
1488,
16,
4373,
461,
16,
4373,
2355,
16,
819,
4410,
734,
16,
819,
461,
16,
21160,
1444,
16,
453,
16214,
... |
try: return self._assoc[vertex] except: | if hasattr(self, '_assoc') is False: | def get_vertex(self, vertex): """ Retrieve the object associated with a given vertex. INPUT: vertex -- the given vertex EXAMPLES: sage: d = {0 : graphs.DodecahedralGraph(), 1 : graphs.FlowerSnark(), 2 : graphs.MoebiusKantorGraph(), 3 : graphs.PetersenGraph() } sage: d[2] Moebius-Kantor Graph: Graph on 16 vertices sage: T = graphs.TetrahedralGraph() sage: T.vertices() [0, 1, 2, 3] sage: T.set_vertices(d) sage: T.get_vertex(1) Flower Snark: Graph on 20 vertices | 4dc618e9fc2af20a2ac3fcc7082dc9f20b69def7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/4dc618e9fc2af20a2ac3fcc7082dc9f20b69def7/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
15281,
12,
2890,
16,
5253,
4672,
3536,
10708,
326,
733,
3627,
598,
279,
864,
5253,
18,
225,
12943,
30,
5253,
1493,
326,
864,
5253,
225,
5675,
8900,
11386,
30,
272,
410,
30,
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,
336,
67,
15281,
12,
2890,
16,
5253,
4672,
3536,
10708,
326,
733,
3627,
598,
279,
864,
5253,
18,
225,
12943,
30,
5253,
1493,
326,
864,
5253,
225,
5675,
8900,
11386,
30,
272,
410,
30,
30... |
zip((str,sfloat,int,str),fields[4:8])) elif type == 'SGST': books[longid] = (eid,) + tuple(func(field) for func,field in zip((str,sfloat,int,int,str),fields[4:9])) elif type == 'SLGM': keys[longid] = (eid,) + tuple(func(field) for func,field in zip((str,sfloat,int),fields[4:8])) | zip((str,sfloat,int,str,str),fields[4:9])) | def readFromText(self,textPath): """Reads stats from specified text file.""" alch, ammo, appa, armor, books, clothing, ingredients, keys, lights, misc, sigilstones, soulgems, weapons = [self.type_stats[type] for type in ('ALCH','AMMO','APPA','ARMO','BOOK','CLOT','INGR','KEYM','LIGH','MISC','SGST','SLGM','WEAP')] aliases = self.aliases ins = bolt.CsvReader(textPath) pack,unpack = struct.pack,struct.unpack sfloat = lambda a: unpack('f',pack('f',float(a)))[0] #--Force standard precision for fields in ins: if len(fields) < 3 or fields[2][:2] != '0x': continue type,modName,objectStr,eid = fields[0:4] modName = GPath(modName) longid = (GPath(aliases.get(modName,modName)),int(objectStr[2:],16)) if type == 'ALCH': alch[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value) zip((str,sfloat,int,str),fields[4:8])) elif type == 'AMMO': ammo[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value, damage, speed, enchantPoints) zip((str,sfloat,int,int,sfloat,int,str),fields[4:11])) elif type == 'ARMO': armor[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value, health, strength) zip((str,sfloat,int,int,int,str,str),fields[4:10])) elif type == 'BOOK': books[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value, echantPoints) zip((str,sfloat,int,int,str),fields[4:9])) elif type == 'CLOT': armor[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value, echantPoints) zip((str,sfloat,int,int,str,str),fields[4:10])) elif type == 'INGR': armor[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value) zip((str,sfloat,int,str),fields[4:8])) elif type == 'KEYM': keys[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value) zip((str,sfloat,int,str),fields[4:8])) elif type == 'LIGH': books[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value, duration) zip((str,sfloat,int,int,str),fields[4:9])) elif type == 'MISC': keys[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value) zip((str,sfloat,int,str),fields[4:8])) elif type == 'SGST': books[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value, uses) zip((str,sfloat,int,int,str),fields[4:9])) elif type == 'SLGM': keys[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value) zip((str,sfloat,int),fields[4:8])) elif type == 'WEAP': weapons[longid] = (eid,) + tuple(func(field) for func,field in #--(weight, value, health, damage, speed, reach, epoints) zip((str,sfloat,int,int,int,sfloat,sfloat,int,str),fields[4:13])) ins.close() | aeca1db1240364fac710811ccc7f19b3a36b644a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/aeca1db1240364fac710811ccc7f19b3a36b644a/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20876,
1528,
12,
2890,
16,
955,
743,
4672,
3536,
7483,
3177,
628,
1269,
977,
585,
12123,
524,
343,
16,
2125,
8683,
16,
595,
69,
16,
23563,
280,
16,
6978,
87,
16,
927,
352,
4018,
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,
20876,
1528,
12,
2890,
16,
955,
743,
4672,
3536,
7483,
3177,
628,
1269,
977,
585,
12123,
524,
343,
16,
2125,
8683,
16,
595,
69,
16,
23563,
280,
16,
6978,
87,
16,
927,
352,
4018,
16,
... |
env.log.debug('Adding plugin %s from %s', dist, dist.location) working_set.add(dist) | if dist not in working_set: env.log.debug('Adding plugin %s from %s', dist, dist.location) working_set.add(dist) | def _load_eggs(env, search_path, auto_enable=None): # Note that the following doesn't seem to support unicode search_path distributions, errors = working_set.find_plugins( pkg_resources.Environment(search_path) ) for dist in distributions: env.log.debug('Adding plugin %s from %s', dist, dist.location) working_set.add(dist) | 0fa0a6fdc9b726b89b7725480629e7773f13d516 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9317/0fa0a6fdc9b726b89b7725480629e7773f13d516/loader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
67,
1332,
564,
12,
3074,
16,
1623,
67,
803,
16,
3656,
67,
7589,
33,
7036,
4672,
468,
3609,
716,
326,
3751,
3302,
1404,
19264,
358,
2865,
5252,
1623,
67,
803,
23296,
16,
1334,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
945,
67,
1332,
564,
12,
3074,
16,
1623,
67,
803,
16,
3656,
67,
7589,
33,
7036,
4672,
468,
3609,
716,
326,
3751,
3302,
1404,
19264,
358,
2865,
5252,
1623,
67,
803,
23296,
16,
1334,... |
return list(self._order()) | return iter(self._order()) def getIdAtPosition(self, pos): """Return the nth object id """ return self._order()[pos] | def idsInOrder(self): """Return all object ids, in the correct order """ return list(self._order()) | 3d922a265ba6822bf67d484f90a3c18391f0ce0f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12257/3d922a265ba6822bf67d484f90a3c18391f0ce0f/ordered.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3258,
382,
2448,
12,
2890,
4672,
3536,
990,
777,
733,
3258,
16,
316,
326,
3434,
1353,
3536,
327,
666,
12,
2890,
6315,
1019,
10756,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3258,
382,
2448,
12,
2890,
4672,
3536,
990,
777,
733,
3258,
16,
316,
326,
3434,
1353,
3536,
327,
666,
12,
2890,
6315,
1019,
10756,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
sage: F.cliques_number_of(nodes=[(0, 1), (1, 2)]) | sage: F.cliques_number_of(vertices=[(0, 1), (1, 2)]) | def cliques_number_of(self, nodes=None, cliques=None, with_labels=False): """ Returns a list of the number of maximal cliques containing each node. (Returns a single value if only one input node). | 139028392b54ae237314b7536b21897e9b1d7ed3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/139028392b54ae237314b7536b21897e9b1d7ed3/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
29896,
67,
2696,
67,
792,
12,
2890,
16,
2199,
33,
7036,
16,
4942,
29896,
33,
7036,
16,
598,
67,
5336,
33,
8381,
4672,
3536,
2860,
279,
666,
434,
326,
1300,
434,
943,
2840,
4942,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
29896,
67,
2696,
67,
792,
12,
2890,
16,
2199,
33,
7036,
16,
4942,
29896,
33,
7036,
16,
598,
67,
5336,
33,
8381,
4672,
3536,
2860,
279,
666,
434,
326,
1300,
434,
943,
2840,
4942,
... |
class AddField(Action): """ Adds a field to a model. Takes a Model class and the field name. """ FORWARDS_TEMPLATE = ''' db.add_column(%(table_name)r, %(field_name)r, %(field_def)s, keep_default=False)''' BACKWARDS_TEMPLATE = ''' db.delete_column(%(table_name)r, %(field_column)r)''' def __init__(self, model, field, field_def): self.model = model self.field = field self.field_def = field_def is_null = self.field.null default = (self.field.default is not None) and (self.field.default is not NOT_PROVIDED) if not is_null and not default: self.deal_with_not_null_no_default() def deal_with_not_null_no_default(self): | class _NullIssuesField(object): """ A field that might need to ask a question about rogue NULL values. """ allow_third_null_option = False irreversible = False IRREVERSIBLE_TEMPLATE = ''' raise RuntimeError("Cannot reverse this migration. '%(model_name)s.%(field_name)s' and its values cannot be restored.")''' def deal_with_not_null_no_default(self, field, field_def): | def backwards_code(self): return AddModel.forwards_code(self) | 2cb3c38e68dc5088b49dfcc8b0b8e3e6e10e2915 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/2cb3c38e68dc5088b49dfcc8b0b8e3e6e10e2915/actions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12727,
67,
710,
12,
2890,
4672,
327,
1436,
1488,
18,
1884,
6397,
67,
710,
12,
2890,
13,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12727,
67,
710,
12,
2890,
4672,
327,
1436,
1488,
18,
1884,
6397,
67,
710,
12,
2890,
13,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
check_frequency = (check_info['mx'] - check_info['mn']) / num_checks | if num_checks > 1: check_frequency = (check_info['mx'] - check_info['mn']) \ / (num_checks - 1) else: check_frequency = None; | def get_mirror_statuses(cutoff=default_cutoff): cutoff_time = datetime.datetime.utcnow() - cutoff protocols = list(MirrorProtocol.objects.filter(is_download=True)) # I swear, this actually has decent performance... urls = MirrorUrl.objects.select_related('mirror', 'protocol').filter( mirror__active=True, mirror__public=True, protocol__in=protocols, logs__check_time__gte=cutoff_time).annotate( check_count=Count('logs'), success_count=Count('logs__duration'), last_sync=Max('logs__last_sync'), last_check=Max('logs__check_time'), duration_avg=Avg('logs__duration'), duration_stddev=StdDev('logs__duration') ).order_by('-last_sync', '-duration_avg') # The Django ORM makes it really hard to get actual average delay in the # above query, so run a seperate query for it and we will process the # results here. times = MirrorLog.objects.filter(is_success=True, last_sync__isnull=False, check_time__gte=cutoff_time) delays = {} for log in times: d = log.check_time - log.last_sync delays.setdefault(log.url_id, []).append(d) if urls: last_check = max([u.last_check for u in urls]) num_checks = max([u.check_count for u in urls]) check_info = MirrorLog.objects.filter( check_time__gte=cutoff_time).aggregate( mn=Min('check_time'), mx=Max('check_time')) check_frequency = (check_info['mx'] - check_info['mn']) / num_checks else: last_check = None num_checks = 0 check_frequency = None for url in urls: url.completion_pct = float(url.success_count) / num_checks if url.id in delays: url_delays = delays[url.id] d = sum(url_delays, datetime.timedelta()) / len(url_delays) url.delay = d hours = d.days * 24.0 + d.seconds / 3600.0 url.score = hours + url.duration_avg + url.duration_stddev else: url.delay = None url.score = None url.completion = 0.0 return { 'cutoff': cutoff, 'last_check': last_check, 'num_checks': num_checks, 'check_frequency': check_frequency, 'urls': urls, } | ed49122429276ea1ee9b5b07507e9a3ba3f71cf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11256/ed49122429276ea1ee9b5b07507e9a3ba3f71cf2/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
27197,
67,
21655,
12,
16131,
33,
1886,
67,
16131,
4672,
13383,
67,
957,
273,
3314,
18,
6585,
18,
17892,
3338,
1435,
300,
13383,
16534,
273,
666,
12,
13035,
5752,
18,
6911,
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,
336,
67,
27197,
67,
21655,
12,
16131,
33,
1886,
67,
16131,
4672,
13383,
67,
957,
273,
3314,
18,
6585,
18,
17892,
3338,
1435,
300,
13383,
16534,
273,
666,
12,
13035,
5752,
18,
6911,
18,
... |
y = array(a) | y = array(a,subok=True) | def nanargmax(a, axis=None): """Find the maximum over the given axis ignoring NaNs. """ y = array(a) if not issubclass(y.dtype.type, _nx.integer): y[isnan(a)] = -_nx.inf return y.argmax(axis) | 56aa233a535263f309be2086f451a648d462d518 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/56aa233a535263f309be2086f451a648d462d518/function_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6468,
3175,
1896,
12,
69,
16,
2654,
33,
7036,
4672,
3536,
3125,
326,
4207,
1879,
326,
864,
2654,
14398,
10180,
87,
18,
3536,
677,
273,
526,
12,
69,
16,
1717,
601,
33,
5510,
13,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6468,
3175,
1896,
12,
69,
16,
2654,
33,
7036,
4672,
3536,
3125,
326,
4207,
1879,
326,
864,
2654,
14398,
10180,
87,
18,
3536,
677,
273,
526,
12,
69,
16,
1717,
601,
33,
5510,
13,
309,
... |
print 'Error in script:' print pysrc | log.error('Error in script:\n' + pysrc + '\n') | pysrc = ['def %s:' % signature] | 1cd34dc4f7b279e4ac150be4b4be74d3336fb477 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/1cd34dc4f7b279e4ac150be4b4be74d3336fb477/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
21027,
1310,
273,
10228,
536,
738,
87,
2497,
738,
3372,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
21027,
1310,
273,
10228,
536,
738,
87,
2497,
738,
3372,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
sim = ZEOCacheSimulation(cachelimit) | sim = simclass(cachelimit) | def main(): # Parse options cachelimit = 20*1000*1000 try: opts, args = getopt.getopt(sys.argv[1:], "s:") except getopt.error, msg: usage(msg) return 2 for o, a in opts: if o == '-s': cachelimit = int(float(a) * 1e6) if len(args) != 1: usage("exactly one file argument required") return 2 filename = args[0] # Open file try: f = open(filename, "rb") except IOError, msg: print "can't open %s: %s" % (filename, msg) return 1 # Create simulation object sim = ZEOCacheSimulation(cachelimit) # Print output header sim.printheader() # Read trace file, simulating cache behavior while 1: # Read a record r = f.read(24) if len(r) < 24: break # Decode it ts, code, oid, serial = struct.unpack(">ii8s8s", r) dlen, version, code, current = (code & 0x7fffff00, code & 0x80, code & 0x7e, code & 0x01) # And pass it to the simulation sim.event(ts, dlen, version, code, current, oid, serial) # Finish simulation sim.finish() # Exit code from main() return 0 | 7c6cd709b29c98e3a0df9e9501bbc9857e03429a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/7c6cd709b29c98e3a0df9e9501bbc9857e03429a/simul.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
2884,
702,
7122,
19741,
273,
4200,
14,
18088,
14,
18088,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
87,
2773,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
2884,
702,
7122,
19741,
273,
4200,
14,
18088,
14,
18088,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
87,
2773,
... |
return FiniteField_ext_pariElement(self.__parent, self.__value / right.__value) | return FiniteField_ext_pariElement(self.__parent, self.__value / right.__value, check=False) | def _div_(self, right): if right.__value == 0: raise ZeroDivisionError return FiniteField_ext_pariElement(self.__parent, self.__value / right.__value) | 5cd2c654f9a2b18447febc610c587cfe59e18c90 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5cd2c654f9a2b18447febc610c587cfe59e18c90/finite_field_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2892,
67,
12,
2890,
16,
2145,
4672,
309,
2145,
16186,
1132,
422,
374,
30,
1002,
12744,
28223,
668,
327,
9458,
1137,
974,
67,
408,
67,
1065,
77,
1046,
12,
2890,
16186,
2938,
16,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2892,
67,
12,
2890,
16,
2145,
4672,
309,
2145,
16186,
1132,
422,
374,
30,
1002,
12744,
28223,
668,
327,
9458,
1137,
974,
67,
408,
67,
1065,
77,
1046,
12,
2890,
16186,
2938,
16,
36... |
print """usage: basd64 [-d] [-e] [-u] [-t] [file|-] | print """usage: %s [-d|-e|-u|-t] [file|-] | def test(): """Small test program""" import sys, getopt try: opts, args = getopt.getopt(sys.argv[1:], 'deut') except getopt.error, msg: sys.stdout = sys.stderr print msg print """usage: basd64 [-d] [-e] [-u] [-t] [file|-] -d, -u: decode -e: encode (default) -t: decode string 'Aladdin:open sesame'""" sys.exit(2) func = encode for o, a in opts: if o == '-e': func = encode if o == '-d': func = decode if o == '-u': func = decode if o == '-t': test1(); return if args and args[0] != '-': func(open(args[0], 'rb'), sys.stdout) else: func(sys.stdin, sys.stdout) | 33f9f987fe46bfee692503cefaaae73700cd9f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/33f9f987fe46bfee692503cefaaae73700cd9f6f/base64.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
13332,
3536,
19187,
1842,
5402,
8395,
1930,
2589,
16,
336,
3838,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
323,
322,
6134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13332,
3536,
19187,
1842,
5402,
8395,
1930,
2589,
16,
336,
3838,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
323,
322,
6134... |
return "TARGET:=" + trg.get() | return "TARGET:= " + trg.get() | def repl_target(m): return "TARGET:=" + trg.get() | e2b0b7a15665e7f5130b4f9e830fd32651df813f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2128/e2b0b7a15665e7f5130b4f9e830fd32651df813f/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6831,
67,
3299,
12,
81,
4672,
327,
315,
16374,
30,
33,
315,
397,
27229,
18,
588,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6831,
67,
3299,
12,
81,
4672,
327,
315,
16374,
30,
33,
315,
397,
27229,
18,
588,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return self._getCachedInfo()['venue']['country'] | return self._getCachedInfo('venue', 'country') | def getCountryName(self): """Returns the name of the country where the event is held. """ return self._getCachedInfo()['venue']['country'] | ec1304614ea5bc838c2f5bb83444fc59ac9c26d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/ec1304614ea5bc838c2f5bb83444fc59ac9c26d8/pylast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22669,
461,
12,
2890,
4672,
3536,
1356,
326,
508,
434,
326,
5251,
1625,
326,
871,
353,
15770,
18,
3536,
225,
327,
365,
6315,
588,
9839,
966,
1435,
3292,
24612,
21712,
9082,
3546,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22669,
461,
12,
2890,
4672,
3536,
1356,
326,
508,
434,
326,
5251,
1625,
326,
871,
353,
15770,
18,
3536,
225,
327,
365,
6315,
588,
9839,
966,
1435,
3292,
24612,
21712,
9082,
3546,
2,
-100... |
def __init__(self, task, sleep_interval=5, max_attempts=6, fail_task=None): super(PollTask, self).__init__() | def __init__(self, task, sleep_interval=5, max_attempts=6, fail_task=None, **kwargs): super(PollTask, self).__init__(**kwargs) | def __init__(self, task, sleep_interval=5, max_attempts=6, fail_task=None): super(PollTask, self).__init__() self._task = task self._sleep_interval = sleep_interval self._max_attempts = max_attempts self._fail_task = fail_task self._fail_task.host = self.host | 7420087582c1f2097e35aad0332a5785c25f4a48 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12876/7420087582c1f2097e35aad0332a5785c25f4a48/poller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1562,
16,
5329,
67,
6624,
33,
25,
16,
943,
67,
14359,
33,
26,
16,
2321,
67,
4146,
33,
7036,
16,
2826,
4333,
4672,
2240,
12,
19085,
2174,
16,
365,
2934,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1562,
16,
5329,
67,
6624,
33,
25,
16,
943,
67,
14359,
33,
26,
16,
2321,
67,
4146,
33,
7036,
16,
2826,
4333,
4672,
2240,
12,
19085,
2174,
16,
365,
2934,... |
if id_bibdocs == (): | if id_bibdocs: | def create_download_history_graph_and_box(id_bibrec, ln=CFG_SITE_LANG): """Create graph with citation history for record ID_BIBREC (into a temporary file) and return HTML box refering to that image. Called by Detailed record pages. Notes: if id_bibdoc=0 : its an oustide-stored document and it has no id_bibdoc --> only one line if len(id_bibdocs) <= cfg_id_bibdoc_id_bibrec draw one line per id_bibdoc if len(id_bibdocs) > cfg_id_bibdoc_id_bibrec draw only one line which hold simultaneously the downloads for all id_bibdoc Each time this function is called, all the images older than 10 minutes are deleted. """ _ = gettext_set_language(ln) out = "" # Prepare downloads history graph: if CFG_BIBRANK_SHOW_DOWNLOAD_GRAPHS: html_content = "" # remove images older than 10 minutes remove_old_img("download") # download count graph id_bibdocs = intbitset(run_sql("select distinct id_bibdoc from rnkDOWNLOADS where id_bibrec=%s", (id_bibrec, ))) id_existing_bibdocs = intbitset(run_sql("SELECT id_bibdoc FROM bibrec_bibdoc JOIN bibdoc ON id_bibdoc=id WHERE id_bibrec=%s AND status<>'DELETED'", (id_bibrec, ))) ## FIXME: when bibdocs are deleted we loose the stats. What shall we do with them? id_bibdocs &= id_existing_bibdocs history_analysis_results = () if id_bibdocs == (): pass elif len(id_bibdocs) <= cfg_id_bibdoc_id_bibrec and (0, ) not in id_bibdocs: history_analysis_results = draw_downloads_statistics(id_bibrec, list(id_bibdocs)) else: history_analysis_results = draw_downloads_statistics(id_bibrec, []) if history_analysis_results and history_analysis_results[0]: graph_file_history = CFG_SITE_URL + "/img/" + history_analysis_results[0] file_to_close_history = history_analysis_results[1] html_content += """<tr><td valign=center align=center><img src='%s'/></td>""" % graph_file_history if file_to_close_history : if os.path.exists(file_to_close_history): os.unlink(file_to_close_history) if html_content != "": out += """<br/><br/><table><tr><td class="blocknote"> %s</td></tr><tr><td> <table border="0" cellspacing="1" cellpadding="1">""" % _("Download history:") out += html_content out += "</table></td></tr></table>" if CFG_BIBRANK_SHOW_DOWNLOAD_GRAPHS_CLIENT_IP_DISTRIBUTION: # do we show also user IP repartition? html_content = "" remove_old_img("download") #Users analysis graph ips = database_tuples_to_single_list(run_sql("select client_host from rnkDOWNLOADS where id_bibrec=%s;" % id_bibrec)) if ips: users_analysis_results = create_users_analysis_graph(id_bibrec, ips) if users_analysis_results[0]: graph_file_users = CFG_SITE_URL + "/img/" + users_analysis_results[0] file_to_close_users = users_analysis_results[1] html_content += """<tr><td valign=center align=center><img src='%s'/></td>""" % graph_file_users if file_to_close_users: if os.path.exists(file_to_close_users): os.unlink(file_to_close_users) if html_content != "": out += """<br/><br/><table><tr><td class="blocknote"> %s</td></tr><tr><td> <table border="0" cellspacing="1" cellpadding="1">""" % _("Download user distribution:") out += html_content out += "</table></td></tr></table>" # return html code used by get_file or search_engine return out | 9e6cdfed618ff5b1273021eb48b59acd9c62d323 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/9e6cdfed618ff5b1273021eb48b59acd9c62d323/bibrank_downloads_grapher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
7813,
67,
8189,
67,
4660,
67,
464,
67,
2147,
12,
350,
67,
70,
495,
3927,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
3536,
1684,
2667,
598,
21145,
4927,
364,
1409,
1599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7813,
67,
8189,
67,
4660,
67,
464,
67,
2147,
12,
350,
67,
70,
495,
3927,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
3536,
1684,
2667,
598,
21145,
4927,
364,
1409,
1599,
... |
if node == target: | if node.name == target: | def elementInScope(self, target, tableVariant=False): # AT Use reverse instead of [::-1] when we can rely on Python 2.4 # AT How about while True and simply set node to [-1] and set it to # [-2] at the end... for node in self.openElements[::-1]: if node == target: return True elif node.name == "table": return False elif not tableVariant and node.name in scopingElements: return False elif node.name == "html": return False assert False # We should never reach this point | 3f6081e8cdf476677cbd0ea3842a280aa8d91840 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/3f6081e8cdf476677cbd0ea3842a280aa8d91840/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
930,
382,
3876,
12,
2890,
16,
1018,
16,
1014,
9356,
33,
8381,
4672,
468,
14464,
2672,
4219,
3560,
434,
306,
2866,
17,
21,
65,
1347,
732,
848,
21187,
603,
6600,
576,
18,
24,
468,
14464,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
930,
382,
3876,
12,
2890,
16,
1018,
16,
1014,
9356,
33,
8381,
4672,
468,
14464,
2672,
4219,
3560,
434,
306,
2866,
17,
21,
65,
1347,
732,
848,
21187,
603,
6600,
576,
18,
24,
468,
14464,... |
details = 'Missing section, type: %s' % type | details = 'Missing section (type: %s' % type | def __init__(self, type, name=None): self.type = type self.name = name details = 'Missing section, type: %s' % type if name is not None: details += ', name: %s' % name ConfigurationError.__init__(self, details + ')') | 3d30cabca7ab2b6f898661a131231aa65cfb6016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9785/3d30cabca7ab2b6f898661a131231aa65cfb6016/Common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
16,
508,
33,
7036,
4672,
365,
18,
723,
273,
618,
365,
18,
529,
273,
508,
3189,
273,
296,
4841,
2442,
261,
723,
30,
738,
87,
11,
738,
618,
309,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
16,
508,
33,
7036,
4672,
365,
18,
723,
273,
618,
365,
18,
529,
273,
508,
3189,
273,
296,
4841,
2442,
261,
723,
30,
738,
87,
11,
738,
618,
309,
5... |
raise ParseError() | raise ParseError("Expected base list") | def process_classdef(line, parent_docs, prev_line_doc, lineno, comments, decorators): """ The line handler for class declaration lines, such as: >>> class Foo(Bar, Baz): This handler creates and initializes a new C{VariableDoc} containing a C{ClassDoc}, adds the C{VariableDoc} to the containing namespace, and returns the C{ClassDoc}. """ # Check syntax if len(line)<3 or len(line)>4 or line[-1] != (token.OP, ':'): raise ParseError() # If we're not in a namespace, then ignore it. parent_doc = parent_docs[-1] if not isinstance(parent_doc, NamespaceDoc): return # Get the class's name class_name = parse_name(line[1]) canonical_name = DottedName(parent_doc.canonical_name, class_name) # Create the class's ClassDoc & VariableDoc. class_doc = ClassDoc(variables={}, sort_spec=[], bases=[], subclasses=[], canonical_name=canonical_name) var_doc = VariableDoc(name=class_name, value=class_doc, is_imported=False, is_alias=False) # Add the bases. if len(line) == 4: if (not isinstance(line[2], list) or line[2][0] != (token.OP, '(')): raise ParseError() try: for base in parse_classdef_bases(line[2]): base_doc = lookup_value(base, parent_docs) if base_doc is None: # [XX] This might be a problem?? base_doc = ClassDoc(variables={}, sort_spec=[], bases=[], subclasses=[], imported_from = base) class_doc.bases.append(base_doc) except ParseError: class_doc.bases = UNKNOWN else: class_doc.bases = [] # Register ourselves as a subclass to our bases. if class_doc.bases is not UNKNOWN: for basedoc in class_doc.bases: if isinstance(basedoc, ClassDoc): basedoc.subclasses.append(class_doc) # If the preceeding comment includes a docstring, then add it. add_docstring_from_comments(class_doc, comments) # Add the VariableDoc to our container. set_variable(parent_doc, var_doc) return class_doc | 76aa87c4f3f84f87b6c947e3387d535503259a2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/76aa87c4f3f84f87b6c947e3387d535503259a2a/docparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
1106,
536,
12,
1369,
16,
982,
67,
8532,
16,
2807,
67,
1369,
67,
2434,
16,
7586,
16,
5678,
16,
19423,
4672,
3536,
1021,
980,
1838,
364,
667,
8266,
2362,
16,
4123,
487,
30,
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,
1207,
67,
1106,
536,
12,
1369,
16,
982,
67,
8532,
16,
2807,
67,
1369,
67,
2434,
16,
7586,
16,
5678,
16,
19423,
4672,
3536,
1021,
980,
1838,
364,
667,
8266,
2362,
16,
4123,
487,
30,
2... |
abs(int(snmpEngineTime)-int(msgAuthoritativeEngineTime)) > 150: | idleTime + abs(int(snmpEngineTime) - \ int(msgAuthoritativeEngineTime)) > 150: | def processIncomingMsg( self, snmpEngine, messageProcessingModel, maxMessageSize, securityParameters, securityModel, securityLevel, wholeMsg, msg # XXX ): # 3.2.1 try: securityParameters, rest = decoder.decode( securityParameters, asn1Spec=self._securityParametersSpec ) except PyAsn1Error: snmpInASNParseErrs, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInASNParseErrs') snmpInASNParseErrs.syntax = snmpInASNParseErrs.syntax + 1 raise error.StatusInformation( errorIndication='parseError' ) | ed8bedac8cbcc84339511222025bfba2f8167ab9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/587/ed8bedac8cbcc84339511222025bfba2f8167ab9/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
20370,
3332,
12,
365,
16,
15366,
4410,
16,
883,
7798,
1488,
16,
943,
1079,
1225,
16,
4373,
2402,
16,
4373,
1488,
16,
4373,
2355,
16,
7339,
3332,
16,
1234,
225,
468,
11329,
262,
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,
1207,
20370,
3332,
12,
365,
16,
15366,
4410,
16,
883,
7798,
1488,
16,
943,
1079,
1225,
16,
4373,
2402,
16,
4373,
1488,
16,
4373,
2355,
16,
7339,
3332,
16,
1234,
225,
468,
11329,
262,
3... |
r = conn.recv(l) | r = stream2str( conn.recv(l) ) | def run( self ): global terminate | fd081abd0af582428041d7b17f7ef9f605828342 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10890/fd081abd0af582428041d7b17f7ef9f605828342/slimv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
365,
262,
30,
2552,
10850,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
365,
262,
30,
2552,
10850,
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... |
max_cache_age - integer specifies CACHE_CONTROL max_age in seconds | cache_max_age - integer specifies CACHE_CONTROL max_age in seconds | def make_static(global_conf, document_root, cache_max_age=None): """ Return a WSGI application that serves a directory (configured with document_root) max_cache_age - integer specifies CACHE_CONTROL max_age in seconds """ if cache_max_age is not None: cache_max_age = int(cache_max_age) return StaticURLParser( document_root, cache_max_age=cache_max_age) | 7abbd39f73464e1c64b47854d0fe7954d773c05d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2097/7abbd39f73464e1c64b47854d0fe7954d773c05d/urlparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
3845,
12,
6347,
67,
3923,
16,
1668,
67,
3085,
16,
1247,
67,
1896,
67,
410,
33,
7036,
4672,
3536,
2000,
279,
7649,
13797,
2521,
716,
26255,
279,
1867,
261,
16449,
598,
1668,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
3845,
12,
6347,
67,
3923,
16,
1668,
67,
3085,
16,
1247,
67,
1896,
67,
410,
33,
7036,
4672,
3536,
2000,
279,
7649,
13797,
2521,
716,
26255,
279,
1867,
261,
16449,
598,
1668,
6... |
self.debug = 1 | self.draw_gene_symbol_when_clicked = 0 self.debug = 0 | def __init__(self): """ 2008-01-30 """ program_path = os.path.dirname(sys.argv[0]) xml = gtk.glade.XML(os.path.join(program_path, 'GenomeBrowser.glade')) xml.signal_autoconnect(self) self.app1 = xml.get_widget("app1") self.app1.connect("delete_event", gtk.main_quit) self.app1.set_default_size(1200, 800) self.vbox_matplotlib = xml.get_widget('vbox_matplotlib') # matplotlib canvas fig = Figure(figsize=(8,8)) self.canvas_matplotlib = FigureCanvas(fig) # a gtk.DrawingArea self.canvas_matplotlib.set_size_request(800,600) self.canvas_matplotlib.mpl_connect('pick_event', self.on_canvas_pick) self.vbox_matplotlib.pack_start(self.canvas_matplotlib) #matplotlib axes self.ax = fig.add_subplot(111) # matplotlib toolbar toolbar = NavigationToolbar(self.canvas_matplotlib, self.app1) self.vbox_matplotlib.pack_start(toolbar, False, False) self.textview_output = xml.get_widget('textview_output') self.textbuffer_output = self.textview_output.get_buffer() #redirect stdout/stderr to textbuffer_output t_table=self.textbuffer_output.get_tag_table() tag_err=gtk.TextTag("error") tag_err.set_property("foreground","red") #tag_err.set_property("font","monospace 10") t_table.add(tag_err) tag_out=gtk.TextTag("output") tag_out.set_property("foreground","blue") #tag_out.set_property("font","monospace 10") t_table.add(tag_out) self.dummy_out = yh_gnome.Dummy_File(self.textbuffer_output, tag_out) self.dummy_err = yh_gnome.Dummy_File(self.textbuffer_output, tag_err) sys.stdout = self.dummy_out sys.stderr = self.dummy_err self.app1.show_all() self.filechooserdialog1 = xml.get_widget("filechooserdialog1") self.filechooserdialog1.connect("delete_event", yh_gnome.subwindow_hide) self.dialog_db_connect = xml.get_widget("dialog_db_connect") self.dialog_db_connect.connect("delete_event", yh_gnome.subwindow_hide) self.entry_mysql_hostname = xml.get_widget("entry_mysql_hostname") self.entry_mysql_dbname = xml.get_widget("entry_mysql_dbname") self.entry_postgres_hostname = xml.get_widget("entry_postgres_hostname") self.entry_postgres_dbname = xml.get_widget("entry_postgres_dbname") self.entry_postgres_schema = xml.get_widget("entry_postgres_schema") self.dialog_preferences = xml.get_widget("dialog_preferences") self.dialog_preferences.connect("delete_event", yh_gnome.subwindow_hide) self.checkbutton_debug = xml.get_widget("checkbutton_debug") self.checkbutton_stdout = xml.get_widget("checkbutton_stdout") self.checkbutton_stderr = xml.get_widget("checkbutton_stderr") self.entry_gene_width = xml.get_widget("entry_gene_width") self.aboutdialog1 = xml.get_widget("aboutdialog1") self.aboutdialog1.connect("delete_event", yh_gnome.subwindow_hide) self.mysql_conn = self.mysql_curs = self.postgres_conn = self.postgres_curs = None self.chr_id2size = None self.chr_id2cumu_size = None self.gene_id2artist_object_id = {} self.chr_id2gene_id_ls = {} #chr_id here is str type (db is varchar type) self.gene_id2model = {} self.artist_object_id2artist_gene_id_ls = {} self.gene_width = 1.0 self.debug = 1 | 2f112a0844c7db0cfbcf28f686ddad3fec0a55d0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/2f112a0844c7db0cfbcf28f686ddad3fec0a55d0/GenomeBrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
4044,
28,
17,
1611,
17,
5082,
3536,
5402,
67,
803,
273,
1140,
18,
803,
18,
12287,
12,
9499,
18,
19485,
63,
20,
5717,
2025,
273,
22718,
18,
7043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3536,
4044,
28,
17,
1611,
17,
5082,
3536,
5402,
67,
803,
273,
1140,
18,
803,
18,
12287,
12,
9499,
18,
19485,
63,
20,
5717,
2025,
273,
22718,
18,
7043,
... |
marker.set_position(latitude, longitude) | self.marker.set_position(latitude, longitude) | def champlain_change_marker(self, widget, event, view, marker): if event.button != 1 or event.click_count > 1: return False (latitude, longitude) = view.get_coords_at(int(event.x), int(event.y)) marker.set_position(latitude, longitude) | ae977deff127f686f975f19cb88cb82a53ebc39f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/ae977deff127f686f975f19cb88cb82a53ebc39f/geolocalized-tasks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
462,
2475,
530,
67,
3427,
67,
11145,
12,
2890,
16,
3604,
16,
871,
16,
1476,
16,
5373,
4672,
309,
871,
18,
5391,
480,
404,
578,
871,
18,
7475,
67,
1883,
405,
404,
30,
327,
1083,
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,
462,
2475,
530,
67,
3427,
67,
11145,
12,
2890,
16,
3604,
16,
871,
16,
1476,
16,
5373,
4672,
309,
871,
18,
5391,
480,
404,
578,
871,
18,
7475,
67,
1883,
405,
404,
30,
327,
1083,
225,
... |
return self.localToNetworkTime(self.globalClock.getRealTime()) | return self.localToNetworkTime(self.globalClock.getRealTime(), bits=bits) | def getRealNetworkTime(self): """getRealNetworkTime(self) | 633409b2bf5e7b41caaa168cac1cf1fe5ae3d4d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/633409b2bf5e7b41caaa168cac1cf1fe5ae3d4d2/ClockDelta.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12361,
3906,
950,
12,
2890,
4672,
3536,
588,
6955,
3906,
950,
12,
2890,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12361,
3906,
950,
12,
2890,
4672,
3536,
588,
6955,
3906,
950,
12,
2890,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
with _check_py3k_warnings(("struct integer overflow masking is deprecated", DeprecationWarning), quiet=True): | with check_warnings(quiet=True): | def test_issue4228(self): # Packing a long may yield either 32 or 64 bits with _check_py3k_warnings(("struct integer overflow masking is deprecated", DeprecationWarning), quiet=True): x = struct.pack('L', -1)[:4] self.assertEqual(x, '\xff'*4) | aaf7d385a8ff4b224bdaecaf8aeca35b0897cf77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/aaf7d385a8ff4b224bdaecaf8aeca35b0897cf77/test_struct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13882,
24,
3787,
28,
12,
2890,
4672,
468,
7930,
310,
279,
1525,
2026,
2824,
3344,
3847,
578,
5178,
4125,
598,
866,
67,
12103,
12,
20380,
33,
5510,
4672,
619,
273,
1958,
18,
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,
13882,
24,
3787,
28,
12,
2890,
4672,
468,
7930,
310,
279,
1525,
2026,
2824,
3344,
3847,
578,
5178,
4125,
598,
866,
67,
12103,
12,
20380,
33,
5510,
4672,
619,
273,
1958,
18,
2... |
self._nav_up = elementary.Button(self._parent) | self._nav_up = elementary.Button(self) | def _navigator_init(self): bx = elementary.Box(self._parent) bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bx.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) self.pack(bx, 0, 0, 1, 4) bx.show() | f19f67252e27de0a9cffd2db52e80d7e4b065acc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/f19f67252e27de0a9cffd2db52e80d7e4b065acc/fileselector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
82,
13061,
67,
2738,
12,
2890,
4672,
24356,
273,
930,
814,
18,
3514,
12,
2890,
6315,
2938,
13,
24356,
18,
1467,
67,
11317,
67,
4865,
67,
542,
12,
73,
4423,
18,
24427,
3033,
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,
389,
82,
13061,
67,
2738,
12,
2890,
4672,
24356,
273,
930,
814,
18,
3514,
12,
2890,
6315,
2938,
13,
24356,
18,
1467,
67,
11317,
67,
4865,
67,
542,
12,
73,
4423,
18,
24427,
3033,
67,
... |
self.clearPath() re = compile('.+?;') tmp = re.findall(self.lastroot.value) cnt = 0 for i in tmp: self.servicePath.append(eServiceReference(i[:-1])) cnt += 1 if cnt: path = self.servicePath.pop() self.enterPath(path) else: self.showFavourites() self.saveRoot() | tmp = [x for x in self.lastroot.value.split(';') if x != ''] current = [x.toString() for x in self.servicePath] if tmp != current or self.rootChanged: self.clearPath() cnt = 0 for i in tmp: self.servicePath.append(eServiceReference(i)) cnt += 1 if cnt: path = self.servicePath.pop() self.enterPath(path) else: self.showFavourites() self.saveRoot() self.rootChanged = False | def restoreRoot(self): self.clearPath() re = compile('.+?;') tmp = re.findall(self.lastroot.value) cnt = 0 for i in tmp: self.servicePath.append(eServiceReference(i[:-1])) cnt += 1 if cnt: path = self.servicePath.pop() self.enterPath(path) else: self.showFavourites() self.saveRoot() | a2a6f4401a59a912f39992a989576fc00542d6a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/a2a6f4401a59a912f39992a989576fc00542d6a5/ChannelSelection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
2375,
12,
2890,
4672,
365,
18,
8507,
743,
1435,
283,
273,
4074,
2668,
15591,
35,
4359,
13,
1853,
273,
283,
18,
4720,
454,
12,
2890,
18,
2722,
3085,
18,
1132,
13,
7599,
273,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
2375,
12,
2890,
4672,
365,
18,
8507,
743,
1435,
283,
273,
4074,
2668,
15591,
35,
4359,
13,
1853,
273,
283,
18,
4720,
454,
12,
2890,
18,
2722,
3085,
18,
1132,
13,
7599,
273,
374,
... |
return "-ERR Unknown command: '%s'\r\n" % command | return "-ERR Unknown command: %s\r\n" % repr(command) | def onUnknown(self, command, args): """Unknown POP3 command.""" return "-ERR Unknown command: '%s'\r\n" % command | bb67db5e2dc016a7be764205cf241b78d334ff9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/bb67db5e2dc016a7be764205cf241b78d334ff9b/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
4874,
12,
2890,
16,
1296,
16,
833,
4672,
3536,
4874,
26839,
23,
1296,
12123,
327,
3701,
9712,
9077,
1296,
30,
1995,
87,
8314,
86,
64,
82,
6,
738,
1296,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
4874,
12,
2890,
16,
1296,
16,
833,
4672,
3536,
4874,
26839,
23,
1296,
12123,
327,
3701,
9712,
9077,
1296,
30,
1995,
87,
8314,
86,
64,
82,
6,
738,
1296,
2,
-100,
-100,
-100,
-100,
... |
status, transport_id = py_pjsua.transport_create(1, transport_cfg) | status, transport_id = \ py_pjsua.transport_create(py_pjsua.PJSIP_TRANSPORT_UDP, transport_cfg) | def app_init(): global g_acc_id # Create pjsua before anything else status = py_pjsua.create() if status != 0: err_exit("pjsua create() error", status) # Create and initialize logging config log_cfg = py_pjsua.logging_config_default() log_cfg.level = C_LOG_LEVEL log_cfg.cb = log_cb # Create and initialize pjsua config # Note: for this Python module, thread_cnt must be 0 since Python # doesn't like to be called from alien thread (pjsua's thread # in this case) ua_cfg = py_pjsua.config_default() ua_cfg.thread_cnt = 0 ua_cfg.user_agent = "PJSUA/Python 0.1" ua_cfg.cb.on_incoming_call = on_incoming_call ua_cfg.cb.on_call_media_state = on_call_media_state ua_cfg.cb.on_reg_state = on_reg_state ua_cfg.cb.on_call_state = on_call_state ua_cfg.cb.on_buddy_state = on_buddy_state ua_cfg.cb.on_pager = on_pager ua_cfg.cb.on_pager_status = on_pager_status # Create and initialize media config med_cfg = py_pjsua.media_config_default() med_cfg.ec_tail_len = 0 # # Initialize pjsua!! # status = py_pjsua.init(ua_cfg, log_cfg, med_cfg) if status != 0: err_exit("pjsua init() error", status) # Configure STUN config stun_cfg = py_pjsua.stun_config_default() stun_cfg.stun_srv1 = C_STUN_SRV stun_cfg.stun_srv2 = C_STUN_SRV stun_cfg.stun_port1 = C_STUN_PORT stun_cfg.stun_port2 = C_STUN_PORT # Configure UDP transport config transport_cfg = py_pjsua.transport_config_default() transport_cfg.port = C_SIP_PORT transport_cfg.stun_config = stun_cfg if C_STUN_SRV != "": transport_cfg.use_stun = 1 # Create UDP transport status, transport_id = py_pjsua.transport_create(1, transport_cfg) if status != 0: py_pjsua.destroy() err_exit("Error creating UDP transport", status) # Create initial default account status, acc_id = py_pjsua.acc_add_local(transport_id, 1) if status != 0: py_pjsua.destroy() err_exit("Error creating account", status) g_acc_id = acc_id | 5c9aeadb11f3b2a00f4fc7d5ab63a9562b269d04 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1549/5c9aeadb11f3b2a00f4fc7d5ab63a9562b269d04/pjsua_app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
595,
67,
2738,
13332,
2552,
314,
67,
8981,
67,
350,
225,
468,
1788,
293,
2924,
11886,
1865,
6967,
469,
1267,
273,
2395,
67,
84,
2924,
11886,
18,
2640,
1435,
309,
1267,
480,
374,
30,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
595,
67,
2738,
13332,
2552,
314,
67,
8981,
67,
350,
225,
468,
1788,
293,
2924,
11886,
1865,
6967,
469,
1267,
273,
2395,
67,
84,
2924,
11886,
18,
2640,
1435,
309,
1267,
480,
374,
30,
39... |
self._render_rss(req, db) | self._render_rss(req) | def render_report_list(self, req, db, id): """ uses a user specified sql query to extract some information from the database and presents it as a html table. """ actions = {'create': perm.REPORT_CREATE, 'delete': perm.REPORT_DELETE, 'modify': perm.REPORT_MODIFY} for action in [k for k,v in actions.items() if req.perm.has_permission(v)]: req.hdf['report.can_' + action] = True req.hdf['report.href'] = self.env.href.report(id) if id != -1: req.hdf['report.overview_href'] = self.env.href.report() | 273ee24ce97bc77d4f2568dd28d48bb75d7ce93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/273ee24ce97bc77d4f2568dd28d48bb75d7ce93d/Report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
6006,
67,
1098,
12,
2890,
16,
1111,
16,
1319,
16,
612,
4672,
3536,
4692,
279,
729,
1269,
1847,
843,
358,
2608,
2690,
1779,
628,
326,
2063,
471,
3430,
87,
518,
487,
279,
1729,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
6006,
67,
1098,
12,
2890,
16,
1111,
16,
1319,
16,
612,
4672,
3536,
4692,
279,
729,
1269,
1847,
843,
358,
2608,
2690,
1779,
628,
326,
2063,
471,
3430,
87,
518,
487,
279,
1729,... |
else: | elif ctx: | def _action_inv(self, cursor, user, menu_id, name, value, arg, context=None): if context is None: context = {} ctx = context.copy() if self.CONCURRENCY_CHECK_FIELD in ctx: del ctx[self.CONCURRENCY_CHECK_FIELD] values_obj = self.pool.get('ir.values') values_ids = values_obj.search(cursor, user, [ ('model', '=', self._name), ('key', '=', 'action'), ('key2', '=', 'tree_but_open'), ('res_id', '=', menu_id)], context=context) if values_ids: values_obj.write(cursor, user, values_ids[0], {'value': value}, context=ctx) else: values_obj.create(cursor, user, { 'name': 'Menuitem', 'model': self._name, 'value': value, 'object': True, 'key': 'action', 'key2': 'tree_but_open', 'res_id': menu_id, }, context=ctx) | ffef5afd873a6607261451ac3b7d0818e9d902fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/ffef5afd873a6607261451ac3b7d0818e9d902fd/ir_ui_menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1128,
67,
5768,
12,
2890,
16,
3347,
16,
729,
16,
3824,
67,
350,
16,
508,
16,
460,
16,
1501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
1103,
273,
819,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1128,
67,
5768,
12,
2890,
16,
3347,
16,
729,
16,
3824,
67,
350,
16,
508,
16,
460,
16,
1501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
1103,
273,
819,
18... |
gLogger.info( "Usage:" ) gLogger.info( " %s (<options>|<cfgFile>)*" % sys.argv[0] ) | gLogger.notice( "Usage:" ) gLogger.notice( " %s (<options>|<cfgFile>)*" % sys.argv[0] ) | def showHelp( self, dummy = False ): if self.__usageMessage: gLogger.info( self.__usageMessage ) else: gLogger.info( "Usage:" ) gLogger.info( " %s (<options>|<cfgFile>)*" % sys.argv[0] ) if dummy: gLogger.info( dummy ) | 195f360e788d46e95e6946ec17059f81d5f4002c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/195f360e788d46e95e6946ec17059f81d5f4002c/LocalConfiguration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
6696,
12,
365,
16,
9609,
273,
1083,
262,
30,
309,
365,
16186,
9167,
1079,
30,
314,
3328,
18,
1376,
12,
365,
16186,
9167,
1079,
262,
469,
30,
314,
3328,
18,
20392,
12,
315,
5357,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
6696,
12,
365,
16,
9609,
273,
1083,
262,
30,
309,
365,
16186,
9167,
1079,
30,
314,
3328,
18,
1376,
12,
365,
16186,
9167,
1079,
262,
469,
30,
314,
3328,
18,
20392,
12,
315,
5357,
... |
except: log( '(ipodsync) Error reading ID3v2 information for %s' % ( local_filename, )) | else: log( '(ipodsync) Error reading cover art for %s' % ( local_filename, )) | def set_cover_art(self, track, local_filename): if not ipod_supported(): return False if use_pyid3: try: cover_filename = local_filename + '.cover.jpg' id3v2_tags = id3.ID3v2( local_filename ) for frame in id3v2_tags.frames: if frame.id == 'APIC': cover_file = file(cover_filename, 'w') cover_file.write(frame.image) cover_file.close() if os.path.isfile( cover_filename): gpod.itdb_track_set_thumbnails( track, cover_filename) return True except: log( '(ipodsync) Error reading ID3v2 information for %s' % ( local_filename, )) # If we haven't yet found cover art, fall back to channel cover return self.set_channel_art( track, local_filename) | 10e12718d61e455c7455f4db5f692e23614d8a60 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12778/10e12718d61e455c7455f4db5f692e23614d8a60/libipodsync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3165,
67,
485,
12,
2890,
16,
3298,
16,
1191,
67,
3459,
4672,
309,
486,
2359,
369,
67,
4127,
13332,
327,
1083,
309,
999,
67,
2074,
350,
23,
30,
775,
30,
5590,
67,
3459,
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,
444,
67,
3165,
67,
485,
12,
2890,
16,
3298,
16,
1191,
67,
3459,
4672,
309,
486,
2359,
369,
67,
4127,
13332,
327,
1083,
309,
999,
67,
2074,
350,
23,
30,
775,
30,
5590,
67,
3459,
273,
... |
def _parse_slice(self, slice='', delimeter=':', default=tuple()): if slice: def _select(b, d): try: return int(b) except ValueError: return d bits = [_select(b, d) for b, d in zip(slice.split(delimeter), default or ([None] * 3))] elif default: return default | def _parse_slice(self, _slice, delimeter=':', default=None): bits = map(int, [b for b in _slice.split(delimeter, 2) if b]) or default if not bits: return slice(None) elif len(bits) == 1: return slice(bits[0], bits[0] + 1) | def _parse_slice(self, slice='', delimeter=':', default=tuple()): if slice: def _select(b, d): try: return int(b) except ValueError: return d | e656d919379d3074385aaa63af99e11b9dbe59a2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4645/e656d919379d3074385aaa63af99e11b9dbe59a2/indexshell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
6665,
12,
2890,
16,
2788,
2218,
2187,
10508,
847,
2218,
30,
2187,
805,
33,
8052,
1435,
4672,
309,
2788,
30,
1652,
389,
4025,
12,
70,
16,
302,
4672,
775,
30,
327,
509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2670,
67,
6665,
12,
2890,
16,
2788,
2218,
2187,
10508,
847,
2218,
30,
2187,
805,
33,
8052,
1435,
4672,
309,
2788,
30,
1652,
389,
4025,
12,
70,
16,
302,
4672,
775,
30,
327,
509,
... |
self.terminalProtocol.ps[0] = self.terminalProtocol.ps_init[0] | def enable(self): self.terminalProtocol.receiving += 1 self.terminalProtocol.cursorToBOL() self.terminal.eraseLine() self.terminalProtocol.ps[0] = self.terminalProtocol.ps_init[0] self.terminalProtocol.drawInputLine() | 1d514a80770cf714ff82d80db5c916c2a6fb1fba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/1d514a80770cf714ff82d80db5c916c2a6fb1fba/console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4237,
12,
2890,
4672,
365,
18,
15979,
5752,
18,
8606,
9288,
1011,
404,
365,
18,
15979,
5752,
18,
9216,
774,
38,
1741,
1435,
365,
18,
15979,
18,
264,
448,
1670,
1435,
365,
18,
15979,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4237,
12,
2890,
4672,
365,
18,
15979,
5752,
18,
8606,
9288,
1011,
404,
365,
18,
15979,
5752,
18,
9216,
774,
38,
1741,
1435,
365,
18,
15979,
18,
264,
448,
1670,
1435,
365,
18,
15979,
57... | |
an alternative hash method. The import thing is that the hash method | an alternative mac method. The import thing is that the mac method | def pickle_unquote(string): """URL decode a string and load it into pickle""" try: return loads(string.decode('base64')) # unfortunately pickle can cause pretty every error here. # if we get one we catch it and convert it into an UnquoteError except Exception, e: raise UnquoteError(str(e)) | 84eabcaa81f60d47939ac2d43f01d01eeab598a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14437/84eabcaa81f60d47939ac2d43f01d01eeab598a4/securecookie.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13379,
67,
318,
6889,
12,
1080,
4672,
3536,
1785,
2495,
279,
533,
471,
1262,
518,
1368,
13379,
8395,
775,
30,
327,
6277,
12,
1080,
18,
3922,
2668,
1969,
1105,
26112,
468,
640,
24233,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13379,
67,
318,
6889,
12,
1080,
4672,
3536,
1785,
2495,
279,
533,
471,
1262,
518,
1368,
13379,
8395,
775,
30,
327,
6277,
12,
1080,
18,
3922,
2668,
1969,
1105,
26112,
468,
640,
24233,
133... |
p1 = hex(p1), | parent = self.parents("filediffparent", cl.parents(n), cl.rev), | def diff(): yield self.diff(p1, n, file) | 119bef0e7aec8fc56f36bc5cae2ecefed4c67ad6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/119bef0e7aec8fc56f36bc5cae2ecefed4c67ad6/hgweb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3122,
13332,
2824,
365,
18,
5413,
12,
84,
21,
16,
290,
16,
585,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3122,
13332,
2824,
365,
18,
5413,
12,
84,
21,
16,
290,
16,
585,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib'] | lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib', '/usr/lib/lib64'] | 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') | 1d03076a296c26a77058056cec5b3d72bbc2c88c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d03076a296c26a77058056cec5b3d72bbc2c88c/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 text[0:2] in ['++', '--']: return | def writeline(self, text): if text[0:2] in ['++', '--']: return match = line_re.search(text) if match: self.print_block() self.changeno += 1 self.blockno = 0 self.offset_base = int(match.group(1)) - 1 self.offset_changed = int(match.group(3)) - 1 return ttype = text[0] text = text[1:] text = text.expandtabs(self.tabwidth) if ttype == self.ttype: self.block.append(text) else: if ttype == '+' and self.ttype == '-': self.p_block = self.block self.p_type = self.ttype else: self.print_block() self.block = [text] self.ttype = ttype | dc1de1a9f1391a684aeab071e4f4b1d9784154e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/dc1de1a9f1391a684aeab071e4f4b1d9784154e8/Diff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
3027,
12,
2890,
16,
977,
4672,
845,
273,
980,
67,
266,
18,
3072,
12,
955,
13,
309,
845,
30,
365,
18,
1188,
67,
2629,
1435,
365,
18,
24083,
5764,
1011,
404,
365,
18,
2629,
2135,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
3027,
12,
2890,
16,
977,
4672,
845,
273,
980,
67,
266,
18,
3072,
12,
955,
13,
309,
845,
30,
365,
18,
1188,
67,
2629,
1435,
365,
18,
24083,
5764,
1011,
404,
365,
18,
2629,
2135,... | |
sage: R.<T> = K[[]] | sage: R.<T> = K[] | def degree(self): """ Returns the degree of self, i.e., the largest $n$ so that the coefficient of $x^n$ does not compare equal to $0$. | 94a75f1dbf98c92249195eea8a9b5a0c1825a24f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/94a75f1dbf98c92249195eea8a9b5a0c1825a24f/polynomial_padic_capped_relative_dense.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10782,
12,
2890,
4672,
3536,
2860,
326,
10782,
434,
365,
16,
277,
18,
73,
12990,
326,
12756,
271,
82,
8,
1427,
716,
326,
16554,
434,
271,
92,
66,
82,
8,
1552,
486,
3400,
3959,
358,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10782,
12,
2890,
4672,
3536,
2860,
326,
10782,
434,
365,
16,
277,
18,
73,
12990,
326,
12756,
271,
82,
8,
1427,
716,
326,
16554,
434,
271,
92,
66,
82,
8,
1552,
486,
3400,
3959,
358,
2... |
while node.childNodes.length: | while len(node.childNodes): | def clearNode(node): """ Remove all children from the given node. """ if node.hasChildNodes(): while node.childNodes.length: node.removeChild(node.lastChild) | 0ae37083bdd47893ed2e353de9c0f4f1923d8526 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0ae37083bdd47893ed2e353de9c0f4f1923d8526/domhelpers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
907,
12,
2159,
4672,
3536,
3581,
777,
2325,
628,
326,
864,
756,
18,
3536,
309,
756,
18,
5332,
22460,
13332,
1323,
562,
12,
2159,
18,
3624,
3205,
4672,
756,
18,
4479,
1763,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
907,
12,
2159,
4672,
3536,
3581,
777,
2325,
628,
326,
864,
756,
18,
3536,
309,
756,
18,
5332,
22460,
13332,
1323,
562,
12,
2159,
18,
3624,
3205,
4672,
756,
18,
4479,
1763,
12,
21... |
""" | r""" | def __iter__(self): """ Returns an iterator on the elements of self. | d1bfa2893dda8805bd4c6dd2e7784bcbd0f5a99d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/d1bfa2893dda8805bd4c6dd2e7784bcbd0f5a99d/backtrack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2165,
972,
12,
2890,
4672,
436,
8395,
2860,
392,
2775,
603,
326,
2186,
434,
365,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
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,
1001,
2165,
972,
12,
2890,
4672,
436,
8395,
2860,
392,
2775,
603,
326,
2186,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
nt = self.original_n + self.n_con_low + self.n_con_up | nt = on + self.n_con_low + self.n_con_up | def cons(self, x): """ Evaluate the vector of general constraints for the modified problem. Constraints are stored in the order in which they appear in the original problem. If constraint i is a range constraint, c[i] will be the constraint that has the slack on the lower bound on c[i]. The constraint with the slack on the upper bound on c[i] will be stored in position m + k, where k is the position of index i in rangeC, i.e., k=0 iff constraint i is the range constraint that appears first, k=1 iff it appears second, etc. | 1657382dcb49e8024894f7ed256ab08f5485cccb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13857/1657382dcb49e8024894f7ed256ab08f5485cccb/slacks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1959,
12,
2890,
16,
619,
4672,
3536,
18176,
326,
3806,
434,
7470,
6237,
364,
326,
4358,
6199,
18,
23736,
854,
4041,
316,
326,
1353,
316,
1492,
2898,
9788,
316,
326,
2282,
6199,
18,
971,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1959,
12,
2890,
16,
619,
4672,
3536,
18176,
326,
3806,
434,
7470,
6237,
364,
326,
4358,
6199,
18,
23736,
854,
4041,
316,
326,
1353,
316,
1492,
2898,
9788,
316,
326,
2282,
6199,
18,
971,
... |
self._loadJobs() | self._loadJobs() | def onStart(self): | 1bc3f8ee0f5585b25b04dc37e869f107a4a3f4c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2550/1bc3f8ee0f5585b25b04dc37e869f107a4a3f4c1/Trigger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
1685,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
1685,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.esp_window.fill_color = QColor_to_RGBf(color) | self.fill_QColor = color self.jig.fill_color = QColor_to_RGBf(color) | def change_fill_color(self): '''Slot method to change fill color.''' color = QColorDialog.getColor(self.fill_color, self, "ColorDialog") | 520655b0839e9d192e34605d00ae60ec9bf13e2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/520655b0839e9d192e34605d00ae60ec9bf13e2b/ESPWindowProp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
5935,
67,
3266,
12,
2890,
4672,
9163,
8764,
707,
358,
2549,
3636,
2036,
1093,
6309,
2036,
273,
2238,
2957,
6353,
18,
588,
2957,
12,
2890,
18,
5935,
67,
3266,
16,
365,
16,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2549,
67,
5935,
67,
3266,
12,
2890,
4672,
9163,
8764,
707,
358,
2549,
3636,
2036,
1093,
6309,
2036,
273,
2238,
2957,
6353,
18,
588,
2957,
12,
2890,
18,
5935,
67,
3266,
16,
365,
16,
315... |
if hasattr(klass, 'ziconImage'): klass.ziconImage.manage_upload(file) else: | __traceback_info__=file image=self.getClassAttr('ziconImage', None) if image is None: | def manage_edit(self, meta_type='', icon='', file='', REQUEST=None): """Set basic item properties. """ klass=self.aq_inner.aq_parent.aq_parent._zclass_ if meta_type: self.setClassAttr('meta_type', meta_type) if file: # and hasattr(file, 'content_type'): if hasattr(klass, 'ziconImage'): klass.ziconImage.manage_upload(file) else: self.setClassAttr('ziconImage', OFS.Image.Image('ziconImage','',file)) if not icon: self.setClassAttr('icon', REQUEST['URL1']+'/ziconImage') | e15046bc07bbc7acdb100b4ed05c4d3e3af5048f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e15046bc07bbc7acdb100b4ed05c4d3e3af5048f/Basic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
4619,
12,
2890,
16,
2191,
67,
723,
2218,
2187,
4126,
2218,
2187,
585,
2218,
2187,
12492,
33,
7036,
4672,
3536,
694,
5337,
761,
1790,
18,
3536,
7352,
33,
2890,
18,
69,
85,
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,
10680,
67,
4619,
12,
2890,
16,
2191,
67,
723,
2218,
2187,
4126,
2218,
2187,
585,
2218,
2187,
12492,
33,
7036,
4672,
3536,
694,
5337,
761,
1790,
18,
3536,
7352,
33,
2890,
18,
69,
85,
67... |
MyURLopener = urllib2.build_opener(U2) | MyURLopener = urllib2.build_opener(U2RedirectHandler) | def http_error_302(self, req, fp, code, msg, headers): result = urllib2.HTTPRedirectHandler.http_error_302( self, req, fp, code, msg, headers) result.code = code result.sheaders = [v for v in headers.__str__().split('\n') if v.startswith('Set-Cookie:')] return result | 6cc968feab46fcc11eca39fa179f524f8fdcc771 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/6cc968feab46fcc11eca39fa179f524f8fdcc771/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1062,
67,
1636,
67,
23,
3103,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
4672,
563,
273,
11527,
22,
18,
3693,
5961,
1503,
18,
2505,
67,
1636,
67,
23,
3103,
12,
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,
1062,
67,
1636,
67,
23,
3103,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
4672,
563,
273,
11527,
22,
18,
3693,
5961,
1503,
18,
2505,
67,
1636,
67,
23,
3103,
12,
365,
... |
Subwidget Class --------- ----- entry Entry arrow Button slistbox ScrolledListBox tick Button } cross Button } present if created with the fancy option""" | Subwidget Class --------- ----- entry Entry arrow Button slistbox ScrolledListBox tick Button } cross Button } present if created with the fancy option""" | def invoke(self, name): | 0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4356,
12,
2890,
16,
508,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4356,
12,
2890,
16,
508,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
dirname = os.path.expanduser("~\\Local Settings\\Temp\\") | dirname = os.path.expanduser("$USERPROFILE\\Local Settings\\Temp\\") | def list_files(self): # cache if sys.platform == 'linux2' and self.options["cache"][1]: dirname = os.path.expanduser("~/.cache/") for filename in children_in_directory(dirname, True): yield filename | 1208871789819c5a7f88e29bbb9f6906ac0027c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/1208871789819c5a7f88e29bbb9f6906ac0027c8/CleanerBackend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
2354,
12,
2890,
4672,
468,
1247,
309,
2589,
18,
9898,
422,
296,
20132,
22,
11,
471,
365,
18,
2116,
9614,
2493,
6,
6362,
21,
14542,
4283,
273,
1140,
18,
803,
18,
12320,
1355,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
2354,
12,
2890,
4672,
468,
1247,
309,
2589,
18,
9898,
422,
296,
20132,
22,
11,
471,
365,
18,
2116,
9614,
2493,
6,
6362,
21,
14542,
4283,
273,
1140,
18,
803,
18,
12320,
1355,
... |
variables['DEPTH'] = d | variables['DEPTH'] = d.replace('\\', '/') | def LoadTargetBuildFile(build_file_path, data, aux_data, variables, includes, depth, check): global absolute_build_file_paths # If depth is set, predefine the DEPTH variable to be a relative path from # this build file's directory to the directory identified by depth. if depth: d = gyp.common.RelativePath(depth, os.path.dirname(build_file_path)) if d == '': variables['DEPTH'] = '.' else: variables['DEPTH'] = d # If the generator needs absolue paths, then do so. if absolute_build_file_paths: build_file_path = os.path.abspath(build_file_path) if build_file_path in data['target_build_files']: # Already loaded. return data['target_build_files'].add(build_file_path) gyp.DebugOutput(gyp.DEBUG_INCLUDES, "Loading Target Build File '%s'" % build_file_path) build_file_data = LoadOneBuildFile(build_file_path, data, aux_data, variables, includes, True, check) # Store DEPTH for later use in generators. build_file_data['_DEPTH'] = depth # Set up the included_files key indicating which .gyp files contributed to # this target dict. if 'included_files' in build_file_data: raise KeyError, build_file_path + ' must not contain included_files key' included = GetIncludedBuildFiles(build_file_path, aux_data) build_file_data['included_files'] = [] for included_file in included: # included_file is relative to the current directory, but it needs to # be made relative to build_file_path's directory. included_relative = \ gyp.common.RelativePath(included_file, os.path.dirname(build_file_path)) build_file_data['included_files'].append(included_relative) ProcessToolsetsInDict(build_file_data) # Apply "pre"/"early" variable expansions and condition evaluations. ProcessVariablesAndConditionsInDict(build_file_data, False, variables, build_file_path) # Look at each project's target_defaults dict, and merge settings into # targets. if 'target_defaults' in build_file_data: index = 0 if 'targets' in build_file_data: while index < len(build_file_data['targets']): # This procedure needs to give the impression that target_defaults is # used as defaults, and the individual targets inherit from that. # The individual targets need to be merged into the defaults. Make # a deep copy of the defaults for each target, merge the target dict # as found in the input file into that copy, and then hook up the # copy with the target-specific data merged into it as the replacement # target dict. old_target_dict = build_file_data['targets'][index] new_target_dict = copy.deepcopy(build_file_data['target_defaults']) MergeDicts(new_target_dict, old_target_dict, build_file_path, build_file_path) build_file_data['targets'][index] = new_target_dict index = index + 1 else: raise Exception, \ "Unable to find targets in build file %s" % build_file_path # No longer needed. del build_file_data['target_defaults'] # Look for dependencies. This means that dependency resolution occurs # after "pre" conditionals and variable expansion, but before "post" - # in other words, you can't put a "dependencies" section inside a "post" # conditional within a target. if 'targets' in build_file_data: for target_dict in build_file_data['targets']: if 'dependencies' not in target_dict: continue for dependency in target_dict['dependencies']: other_build_file = \ gyp.common.ResolveTarget(build_file_path, dependency, None)[0] try: LoadTargetBuildFile(other_build_file, data, aux_data, variables, includes, depth, check) except Exception, e: gyp.common.ExceptionAppend( e, 'while loading dependencies of %s' % build_file_path) raise return data | d655dcb46fe07827a380a09adadfaa7d223fd743 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6220/d655dcb46fe07827a380a09adadfaa7d223fd743/input.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
2326,
3116,
812,
12,
3510,
67,
768,
67,
803,
16,
501,
16,
9397,
67,
892,
16,
3152,
16,
6104,
16,
3598,
16,
866,
4672,
2552,
4967,
67,
3510,
67,
768,
67,
4481,
225,
468,
971,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
2326,
3116,
812,
12,
3510,
67,
768,
67,
803,
16,
501,
16,
9397,
67,
892,
16,
3152,
16,
6104,
16,
3598,
16,
866,
4672,
2552,
4967,
67,
3510,
67,
768,
67,
4481,
225,
468,
971,
... |
if opt in ( '-l', '--logfile' ): logFile = opt_value | if opt in ( '-l', '--logfile' ): logFile = opt_value | def main( ): httpPort = gHttpPort httpDir = gHttpDir logFile = gLogFile user = gUser group = gGroup doFork = 'true' shortOpts = 'd:p:l:u:g:fh' longOpts = [ 'httpdir=', 'httpport=', 'logfile=', 'user=', 'group=', 'help' ] try: opts, args = getopt.getopt( sys.argv[1:], shortOpts, longOpts ) except getopt.GetoptError, e: print >>sys.stderr, e usage( ) sys.exit( ) if len( args ) != 0: print >>sys.stderr, 'Error: command arguments are not supported' usage( ) sys.exit( ) for opt, opt_value in opts: if opt in ( '-h', '--help' ): usage( ) sys.exit( ) if opt in ( '-d', '--httpdir' ): httpDir = opt_value if opt in ( '-p', '--httpport' ): try: httpPort = int( opt_value ) except: print >>sys.stderr, 'Error: HTTP port is not valid' usage( ) sys.exit( ) if opt in ( '-l', '--logfile' ): logFile = opt_value if opt in ( '-u', '--user' ): user = opt_value if opt in ( '-g', '--group' ): group = opt_value if opt in ( '-f' ): doFork = 'false' pid = daemonize( httpDir, logFile, user, group, doFork ) if pid > 0: sys.exit( ) runServer( httpPort ) | d4cc2d1599d12bc73db5aa9e3c513fd4c1e1f939 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/d4cc2d1599d12bc73db5aa9e3c513fd4c1e1f939/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
262,
30,
1062,
2617,
273,
314,
2940,
2617,
1062,
1621,
225,
273,
314,
2940,
1621,
20169,
225,
273,
314,
19103,
729,
377,
273,
314,
1299,
1041,
565,
273,
314,
1114,
741,
22662,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
262,
30,
1062,
2617,
273,
314,
2940,
2617,
1062,
1621,
225,
273,
314,
2940,
1621,
20169,
225,
273,
314,
19103,
729,
377,
273,
314,
1299,
1041,
565,
273,
314,
1114,
741,
22662,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.