rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
def parse(self): | def parse(self,type_regex=None): | def parse(self): """ Each line of the frame cache file is like the following: | 24b81d2ec6995782c831003011aff6c9c31e0e57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3589/24b81d2ec6995782c831003011aff6c9c31e0e57/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
723,
67,
7584,
33,
7036,
4672,
3536,
8315,
980,
434,
326,
2623,
1247,
585,
353,
3007,
326,
3751,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
723,
67,
7584,
33,
7036,
4672,
3536,
8315,
980,
434,
326,
2623,
1247,
585,
353,
3007,
326,
3751,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'zope.ucol >= 1.0', 'zope.html >= 0.0.1'], | 'zope.ucol >= 1.0', 'zope.html >= 0.0.1', 'zope.file', 'zope.mimetype'], | def get_version(): version_file = os.path.join('src', 'schooltool', 'version.txt') f = open(version_file, 'r') result = f.read() f.close() return result | 4c4886487ac7b8857d496bd131b88823af59a8e4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7127/4c4886487ac7b8857d496bd131b88823af59a8e4/setup.eggs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1589,
13332,
1177,
67,
768,
273,
1140,
18,
803,
18,
5701,
2668,
4816,
2187,
296,
28204,
1371,
6738,
2187,
296,
1589,
18,
5830,
6134,
284,
273,
1696,
12,
1589,
67,
768,
16,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1589,
13332,
1177,
67,
768,
273,
1140,
18,
803,
18,
5701,
2668,
4816,
2187,
296,
28204,
1371,
6738,
2187,
296,
1589,
18,
5830,
6134,
284,
273,
1696,
12,
1589,
67,
768,
16,
296... |
suite.addTest(AlignatorDPLocalTestCase) | suite.addTest(AlignatorDPLocalTestCase) suite.addTest(AlignatorIterativeTestCase) | def suite(): suite = unittest.TestSuite() suite.addTest(AlignatorDPGlobalWithEndGapsPenaltiesTestCase) suite.addTest(AlignatorDPGlobalNoEndGapsPenaltiesTestCase) suite.addTest(AlignatorDPLocalTestCase) return suite | 5e733af4aecd66ad999b1b3957404bcb27462623 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8012/5e733af4aecd66ad999b1b3957404bcb27462623/test_Alignator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11371,
13332,
11371,
273,
2836,
3813,
18,
4709,
13587,
1435,
11371,
18,
1289,
4709,
12,
10044,
639,
8640,
5160,
1190,
1638,
43,
6679,
24251,
2390,
606,
4709,
2449,
13,
11371,
18,
1289,
470... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11371,
13332,
11371,
273,
2836,
3813,
18,
4709,
13587,
1435,
11371,
18,
1289,
4709,
12,
10044,
639,
8640,
5160,
1190,
1638,
43,
6679,
24251,
2390,
606,
4709,
2449,
13,
11371,
18,
1289,
470... |
if not cl.__dict__.has_key(name): | if object.im_class is not cl: | def docroutine(self, object, name=None, cl=None): """Produce text documentation for a function or method object.""" realname = object.__name__ name = name or realname note = '' skipdocs = 0 if inspect.ismethod(object): if cl: if not cl.__dict__.has_key(name): base = object.im_class basename = base.__name__ if base.__module__ != cl.__module__: basename = base.__module__ + '.' + basename note = ' from %s' % basename skipdocs = 1 else: if object.im_self: note = ' method of %s' % self.repr(object.im_self) else: note = ' unbound %s method' % object.im_class.__name__ object = object.im_func | 74c8389b13d177e8560524598e1bc08247df81b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74c8389b13d177e8560524598e1bc08247df81b5/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
22640,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
927,
33,
7036,
4672,
3536,
25884,
977,
7323,
364,
279,
445,
578,
707,
733,
12123,
2863,
529,
273,
733,
16186,
529,
972,
508,
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,
997,
22640,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
927,
33,
7036,
4672,
3536,
25884,
977,
7323,
364,
279,
445,
578,
707,
733,
12123,
2863,
529,
273,
733,
16186,
529,
972,
508,
273,
... |
print " $Revision: 1.10 $" print " $Date: 2002/01/08 16:19:51 $" | print " $Revision: 1.11 $" print " $Date: 2002/01/24 01:09:28 $" | def showVersion(): print print "RCS" print " $Revision: 1.10 $" print " $Date: 2002/01/08 16:19:51 $" print " $Author: noel $" print " $Source: /home/noel/active/projects/NoelOTL/RCS/otl2html.py,v $" print | 9f68eab08cc65f8a07b2f97786fc61f5fa8a2985 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6154/9f68eab08cc65f8a07b2f97786fc61f5fa8a2985/otl2html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
1444,
13332,
1172,
1172,
315,
54,
4596,
6,
1172,
315,
271,
7939,
30,
404,
18,
2499,
271,
6,
1172,
315,
271,
1626,
30,
4044,
22,
19,
1611,
19,
3247,
8743,
30,
5908,
30,
6030,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
1444,
13332,
1172,
1172,
315,
54,
4596,
6,
1172,
315,
271,
7939,
30,
404,
18,
2499,
271,
6,
1172,
315,
271,
1626,
30,
4044,
22,
19,
1611,
19,
3247,
8743,
30,
5908,
30,
6030,
27... |
return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) | return eval(maxima.eval("jacobi_sn(%s,%s)"%(float(x),float(m)))) | def jacobi(sym,x,m): r""" Here sym = "pq", where p,q in {c,d,n,s}. This returns the value of the Jacobi function pq(x,m), as described in the documentation for SAGE's "special" module. There are a total of 12 functions described by this. EXAMPLES: sage: jacobi("sn",1,1) 0.76159415595576485 sage: jacobi("cd",1,1/2) 0.72400972165937116 sage: jacobi("cn",1,1/2);jacobi("dn",1,1/2);jacobi("cn",1,1/2)/jacobi("dn",1,1/2) 0.59597656767214113 0.82316100163159622 0.72400972165937116 sage: jsn = lambda x: jacobi("sn",x,1) sage: P= plot(jsn,0,1) Now to view this, just type show(P). """ #R = x.parent() #y = R.gen() if sym=="dc": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="nc": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="sc": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="cd": return eval(maxima.eval("jacobi_cd(%s,%s)"%(RR(x),RR(m)))) if sym=="nd": return eval(maxima.eval("jacobi_nd(%s,%s)"%(RR(x),RR(m)))) if sym=="sd": return eval(maxima.eval("jacobi_sd(%s,%s)"%(RR(x),RR(m)))) if sym=="cn": return eval(maxima.eval("jacobi_cn(%s,%s)"%(RR(x),RR(m)))) if sym=="dn": return eval(maxima.eval("jacobi_dn(%s,%s)"%(RR(x),RR(m)))) if sym=="sn": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="cs": return eval(maxima.eval("jacobi_cs(%s,%s)"%(RR(x),RR(m)))) if sym=="ds": return eval(maxima.eval("jacobi_ds(%s,%s)"%(RR(x),RR(m)))) if sym=="ns": return eval(maxima.eval("jacobi_ns(%s,%s)"%(RR(x),RR(m)))) return 1 | cc779567aa298acc09ea51c1b5c6837eab786d56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/cc779567aa298acc09ea51c1b5c6837eab786d56/special.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20138,
30875,
12,
8117,
16,
92,
16,
81,
4672,
436,
8395,
13743,
5382,
273,
315,
84,
85,
3113,
1625,
293,
16,
85,
316,
288,
71,
16,
72,
16,
82,
16,
87,
5496,
1220,
1135,
326,
460,
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,
20138,
30875,
12,
8117,
16,
92,
16,
81,
4672,
436,
8395,
13743,
5382,
273,
315,
84,
85,
3113,
1625,
293,
16,
85,
316,
288,
71,
16,
72,
16,
82,
16,
87,
5496,
1220,
1135,
326,
460,
4... |
active, inactive = universe.get_active_inactive() a = universe.cell[:,active[0]] b = universe.cell[:,active[1]] | active, inactive = universe.cell.active_inactive a = universe.cell.matrix[:,active[0]] b = universe.cell.matrix[:,active[1]] | def create_pattern(): "Read the atom positions and transform them to the flat coordinates" active, inactive = universe.get_active_inactive() a = universe.cell[:,active[0]] b = universe.cell[:,active[1]] c = numpy.cross(a,b) tmp_cell = UnitCell(numpy.array([a,b,c]).transpose()) r = tmp_cell.calc_align_rotation_matrix() | 1a9b8e314b34f747fb6118588cefe2bcf5ba0405 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11052/1a9b8e314b34f747fb6118588cefe2bcf5ba0405/tube.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4951,
13332,
315,
1994,
326,
3179,
6865,
471,
2510,
2182,
358,
326,
3569,
5513,
6,
2695,
16,
16838,
273,
29235,
18,
3855,
18,
3535,
67,
27366,
279,
273,
29235,
18,
3855,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4951,
13332,
315,
1994,
326,
3179,
6865,
471,
2510,
2182,
358,
326,
3569,
5513,
6,
2695,
16,
16838,
273,
29235,
18,
3855,
18,
3535,
67,
27366,
279,
273,
29235,
18,
3855,
18,
5... |
def __init__(self, nagios_instance='http://monitor.mgmt.stage.redhat.com/nagios/cgi-bin/cmd.cgi'): | def __init__(self, nagios_instance='http://monitor.mgmt.stage.redhat.com' + '/nagios/cgi-bin/cmd.cgi'): | def __init__(self, nagios_instance='http://monitor.mgmt.stage.redhat.com/nagios/cgi-bin/cmd.cgi'): """ You need a Kerberos ticket before running this. I'm not going to pass passwords over HTTP. """ self.nagios_instance = nagios_instance opener = urllib2.build_opener(HTTPKerberosAuthHandler()) urllib2.install_opener(opener) | bb29eec751694579f6d2612e2ac277d88fc6328f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12876/bb29eec751694579f6d2612e2ac277d88fc6328f/nagios.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
290,
346,
7441,
67,
1336,
2218,
2505,
2207,
10259,
18,
9319,
18,
12869,
18,
1118,
11304,
18,
832,
11,
397,
1173,
27132,
7441,
19,
19062,
17,
4757,
19,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
290,
346,
7441,
67,
1336,
2218,
2505,
2207,
10259,
18,
9319,
18,
12869,
18,
1118,
11304,
18,
832,
11,
397,
1173,
27132,
7441,
19,
19062,
17,
4757,
19,
41... |
raise ApplicationConfigurationError(None,"The workflow job.inputdata.type='FILE_STAGER' is not enabled for the %s backend." % job.backend._name ) | if job.inputdata and job.inputdata._name in [ 'DQ2Dataset' ] and job.inputdata.type == 'FILE_STAGER': raise ApplicationConfigurationError(None,"The workflow job.inputdata.type='FILE_STAGER' is not enabled for the %s backend." % job.backend._name ) | def master_configure(self): | 5c2cd3646805fac7dd114fed7a3b371f9e556dbc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/5c2cd3646805fac7dd114fed7a3b371f9e556dbc/Athena.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4171,
67,
14895,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4171,
67,
14895,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
class Protocol: | class Protocol(object): | def __repr__(self): return ("<Message header=%r data=%r>"% (self.header, self.data)) | 916065f9c3794df9859b8eab30952cf800414d6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10498/916065f9c3794df9859b8eab30952cf800414d6b/rtmp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
7566,
32,
1079,
1446,
5095,
86,
501,
5095,
86,
2984,
9,
261,
2890,
18,
3374,
16,
365,
18,
892,
3719,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
7566,
32,
1079,
1446,
5095,
86,
501,
5095,
86,
2984,
9,
261,
2890,
18,
3374,
16,
365,
18,
892,
3719,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gLogger.info("SRM2Storage.putFile: Put file to storage, performing post transfer check.") | gLogger.debug("SRM2Storage.putFile: Put file to storage, performing post transfer check.") | def putFile(self,fileTuple): """Put a file to the physical storage """ if type(fileTuple) == types.TupleType: urls = [fileTuple] elif type(fileTuple) == types.ListType: urls = fileTuple else: return S_ERROR("SRM2Storage.putFile: Supplied file info must be tuple of list of tuples.") | 65f6eeefcc68513bb80614609dded77332a53729 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/65f6eeefcc68513bb80614609dded77332a53729/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
812,
12,
2890,
16,
768,
9038,
4672,
3536,
6426,
279,
585,
358,
326,
11640,
2502,
3536,
309,
618,
12,
768,
9038,
13,
422,
1953,
18,
9038,
559,
30,
6903,
273,
306,
768,
9038,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
812,
12,
2890,
16,
768,
9038,
4672,
3536,
6426,
279,
585,
358,
326,
11640,
2502,
3536,
309,
618,
12,
768,
9038,
13,
422,
1953,
18,
9038,
559,
30,
6903,
273,
306,
768,
9038,
65,
... |
groups = gl['groups'] | groups = gl[1]['groups'] | def _syncdb_handler(sender, **kwargs): # Import FAS groups verbosity = kwargs.get('verbosity', 1) if verbosity > 0: print _('Loading FAS groups...') try: gl = connection.group_list({'username': settings.FAS_USERNAME, 'password': settings.FAS_PASSWORD}) except AuthError: if verbosity > 0: print _('Unable to load FAS groups. Did you set ' 'FAS_USERNAME and FAS_PASSWORD?') else: groups = gl['groups'] for group in groups: _new_group(group) if verbosity > 0: print _('FAS groups loaded. Don\'t forget to set ' 'FAS_USERNAME and FAS_PASSWORD to a low-privilege ' 'account.') | 5e4c79558b1f0be23e361dc48f9ae321d39c8b2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9952/5e4c79558b1f0be23e361dc48f9ae321d39c8b2b/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8389,
1966,
67,
4176,
12,
15330,
16,
2826,
4333,
4672,
468,
6164,
478,
3033,
3252,
11561,
273,
1205,
18,
588,
2668,
16629,
8807,
2187,
404,
13,
309,
11561,
405,
374,
30,
1172,
389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8389,
1966,
67,
4176,
12,
15330,
16,
2826,
4333,
4672,
468,
6164,
478,
3033,
3252,
11561,
273,
1205,
18,
588,
2668,
16629,
8807,
2187,
404,
13,
309,
11561,
405,
374,
30,
1172,
389,
... |
if fd == 3: | if fd == 13: | def do_ll_os__ll_os_close(self, fd): if fd == 3: self.sock.close() self.sock = None else: raise OSError("Wrong fd %d" % (fd,)) | 1013acb49de18e040a05c64553de836a9724fb9a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/1013acb49de18e040a05c64553de836a9724fb9a/sandlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2906,
67,
538,
972,
2906,
67,
538,
67,
4412,
12,
2890,
16,
5194,
4672,
309,
5194,
422,
5958,
30,
365,
18,
15031,
18,
4412,
1435,
365,
18,
15031,
273,
599,
469,
30,
1002,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
67,
2906,
67,
538,
972,
2906,
67,
538,
67,
4412,
12,
2890,
16,
5194,
4672,
309,
5194,
422,
5958,
30,
365,
18,
15031,
18,
4412,
1435,
365,
18,
15031,
273,
599,
469,
30,
1002,
100... |
A DiGraph is a set of vertices connected by oriented edges (cf. http://en.wikipedia.org/wiki/Digraph_%28mathematics%29 ). One can very easily create a directed graph in sage by typing:: sage: g=DiGraph() By typing the name of the DiGraph, one can get some basic information | A digraph or directed graph is a set of vertices connected by oriented edges (cf. http://en.wikipedia.org/wiki/Digraph_%28mathematics%29 ). One can very easily create a directed graph in Sage by typing:: sage: g = DiGraph() By typing the name of the digraph, one can get some basic information | def min_spanning_tree(self, weight_function=lambda e: 1, algorithm='Kruskal', starting_vertex=None ): """ Returns the edges of a minimum spanning tree, if one exists, otherwise returns False. | de4709933461015623fada3458699ad66b31a1d7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/de4709933461015623fada3458699ad66b31a1d7/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
67,
1752,
10903,
67,
3413,
12,
2890,
16,
3119,
67,
915,
33,
14661,
425,
30,
404,
16,
4886,
2218,
47,
8010,
79,
287,
2187,
5023,
67,
15281,
33,
7036,
262,
30,
3536,
2860,
326,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
67,
1752,
10903,
67,
3413,
12,
2890,
16,
3119,
67,
915,
33,
14661,
425,
30,
404,
16,
4886,
2218,
47,
8010,
79,
287,
2187,
5023,
67,
15281,
33,
7036,
262,
30,
3536,
2860,
326,
5... |
if commonsActive == True: | if commonsActive == True and site.family.name != "commons": | def checkbot(): """ Main function """ # Command line configurable parameters repeat = True # Restart after having check all the images? limit = 80 # How many images check? time_sleep = 30 # How many time sleep after the check? skip_number = 0 # How many images to skip before checking? waitTime = 0 # How many time sleep before the check? commonsActive = False # Check if on commons there's an image with the same name? normal = False # Check the new images or use another generator? urlUsed = False # Use the url-related function instead of the new-pages generator regexGen = False # Use the regex generator untagged = False # Use the untagged generator duplicatesActive = False # Use the duplicate option duplicatesReport = False # Use the duplicate-report option sendemailActive = False # Use the send-email # Here below there are the parameters. for arg in wikipedia.handleArgs(): if arg.startswith('-limit'): if len(arg) == 7: limit = int(wikipedia.input(u'How many files do you want to check?')) else: limit = int(arg[7:]) if arg.startswith('-time'): if len(arg) == 5: time_sleep = int(wikipedia.input(u'How many seconds do you want runs to be apart?')) else: time_sleep = int(arg[6:]) elif arg == '-break': repeat = False elif arg == '-commons': commonsActive = True elif arg.startswith('-duplicates'): duplicatesActive = True if len(arg) == 11: duplicates_rollback = 1 elif len(arg) > 11: duplicates_rollback = int(arg[12:]) elif arg == '-duplicatereport': duplicatesReport = True elif arg == '-sendemail': sendemailActive = True elif arg.startswith('-skip'): if len(arg) == 5: skip = True skip_number = int(wikipedia.input(u'How many files do you want to skip?')) elif len(arg) > 5: skip = True skip_number = int(arg[6:]) elif arg.startswith('-wait'): if len(arg) == 5: wait = True waitTime = int(wikipedia.input(u'How many time do you want to wait before checking the files?')) elif len(arg) > 5: wait = True waitTime = int(arg[6:]) elif arg.startswith('-start'): if len(arg) == 6: firstPageTitle = wikipedia.input(u'From witch page do you want to start?') elif len(arg) > 6: firstPageTitle = arg[7:] firstPageTitle = firstPageTitle.replace("File:", '').replace("file:", "") generator = wikipedia.getSite().allpages(start=firstPageTitle, namespace=6) repeat = False elif arg.startswith('-page'): if len(arg) == 5: regexPageName = str(wikipedia.input(u'Which page do you want to use for the regex?')) elif len(arg) > 5: regexPageName = str(arg[6:]) repeat = False regexGen = True elif arg.startswith('-url'): if len(arg) == 4: regexPageUrl = str(wikipedia.input(u'Which url do you want to use for the regex?')) elif len(arg) > 4: regexPageUrl = str(arg[5:]) urlUsed = True repeat = False regexGen = True elif arg.startswith('-regex'): if len(arg) == 6: regexpToUse = str(wikipedia.input(u'Which regex do you want to use?')) elif len(arg) > 6: regexpToUse = str(arg[7:]) generator = 'regex' repeat = False elif arg.startswith('-cat'): if len(arg) == 4: catName = str(wikipedia.input(u'In which category do I work?')) elif len(arg) > 4: catName = str(arg[5:]) catSelected = catlib.Category(wikipedia.getSite(), 'Category:%s' % catName) generator = pagegenerators.CategorizedPageGenerator(catSelected) repeat = False elif arg.startswith('-ref'): if len(arg) == 4: refName = str(wikipedia.input(u'The references of what page should I parse?')) elif len(arg) > 4: refName = str(arg[5:]) generator = pagegenerators.ReferringPageGenerator(wikipedia.Page(wikipedia.getSite(), refName)) repeat = False elif arg.startswith('-untagged'): untagged = True if len(arg) == 9: projectUntagged = str(wikipedia.input(u'In which project should I work?')) elif len(arg) > 9: projectUntagged = str(arg[10:]) # Understand if the generator it's the default or not. try: generator except NameError: normal = True # Define the site. site = wikipedia.getSite() # Block of text to translate the parameters set above. image_old_namespace = u"%s:" % site.image_namespace() image_namespace = u"File:" # If the images to skip are 0, set the skip variable to False (the same for the wait time) if skip_number == 0: skip = False if waitTime == 0: wait = False # A little block-statement to ensure that the bot will not start with en-parameters if site.lang not in project_inserted: wikipedia.output(u"Your project is not supported by this script. You have to edit the script and add it!") return # Reading the log of the new images if another generator is not given. if normal == True: if limit == 1: wikipedia.output(u"Retrieving the latest file for checking...") else: wikipedia.output(u"Retrieving the latest %d files for checking..." % limit) # Main Loop while 1: # Defing the Main Class. mainClass = main(site, sendemailActive = sendemailActive, duplicatesReport = duplicatesReport) # Untagged is True? Let's take that generator if untagged == True: generator = mainClass.untaggedGenerator(projectUntagged, limit) normal = False # Ensure that normal is False # Normal True? Take the default generator if normal == True: generator = site.newimages(number = limit) # if urlUsed and regexGen, get the source for the generator if urlUsed == True and regexGen == True: textRegex = site.getUrl(regexPageUrl, no_hostname = True) # Not an url but a wiki page as "source" for the regex elif regexGen == True: pageRegex = wikipedia.Page(site, regexPageName) try: textRegex = pageRegex.get() except wikipedia.NoPage: wikipedia.output(u"%s doesn't exist!" % page.title()) textRegex = '' # No source, so the bot will quit later. # If generator is the regex' one, use your own Generator using an url or page and a regex. if generator == 'regex' and regexGen == True: generator = mainClass.regexGenerator(regexpToUse, textRegex) # Ok, We (should) have a generator, so let's go on. # Take the additional settings for the Project mainClass.takesettings() # Not the main, but the most important loop. #parsed = False if wait: # Let's sleep... generator = mainClass.wait(waitTime, generator, normal, limit) for image in generator: # When you've a lot of image to skip before working use this workaround, otherwise # let this commented, thanks. [ decoment also parsed = False if you want to use it # #if image.title() != u'Immagine:Nytlogo379x64.gif' and not parsed: # wikipedia.output(u"%s already parsed." % image.title()) # continue #else: # parsed = True # If the generator returns something that is not an image, simply skip it. if normal == False and regexGen == False: if image_namespace.lower() not in image.title().lower() and \ image_old_namespace.lower() not in image.title().lower() and 'file:' not in image.title().lower(): wikipedia.output(u'%s seems not an file, skip it...' % image.title()) continue if normal: imageData = image image = imageData[0] timestamp = imageData[1] uploader = imageData[2] comment = imageData[3] # useless, in reality.. else: timestamp = None uploader = None comment = None # useless, also this, let it here for further developments try: imageName = image.title().split(image_namespace)[1] # Deleting the namespace (useless here) except IndexError:# Namespace image not found, that's not an image! Let's skip... try: imageName = image.title().split(image_old_namespace)[1] except IndexError: wikipedia.output(u"%s is not a file, skipping..." % image.title()) continue mainClass.setParameters(imageName, timestamp, uploader) # Setting the image for the main class # Skip block if skip == True: skip = mainClass.skipImages(skip_number, limit) if skip == True: continue # Check on commons if there's already an image with the same name if commonsActive == True: response = mainClass.checkImageOnCommons() if response == False: continue # Check if there are duplicates of the image on the project selected if duplicatesActive == True: response2 = mainClass.checkImageDuplicated(duplicates_rollback) if response2 == False: continue resultCheck = mainClass.checkStep() if resultCheck: continue # A little block to perform the repeat or to break. if repeat == True: printWithTimeZone(u"Waiting for %s seconds," % time_sleep) time.sleep(time_sleep) elif repeat == False: wikipedia.output(u"\t\t\t>> STOP! <<") break # Exit | 6c58ef341b2e48f33504e7485b4b93cee6f7e0c5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/6c58ef341b2e48f33504e7485b4b93cee6f7e0c5/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
4819,
13332,
3536,
12740,
445,
3536,
468,
3498,
980,
14593,
1472,
7666,
273,
1053,
468,
20709,
1839,
7999,
866,
777,
326,
4602,
35,
1800,
273,
8958,
468,
9017,
4906,
4602,
866,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
4819,
13332,
3536,
12740,
445,
3536,
468,
3498,
980,
14593,
1472,
7666,
273,
1053,
468,
20709,
1839,
7999,
866,
777,
326,
4602,
35,
1800,
273,
8958,
468,
9017,
4906,
4602,
866,
35,
... |
sage: a = animate(v, xmin=0, ymin=0) | sage: a = animate(v, xmin=0, ymin=0) | def graphics_array(self, ncols=3): """ Return a graphics array with the given number of columns with plots of the frames of this animation. | f4789762a95f5ca46886a066896eb6dfd2df3273 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f4789762a95f5ca46886a066896eb6dfd2df3273/animate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17313,
67,
1126,
12,
2890,
16,
21330,
33,
23,
4672,
3536,
2000,
279,
17313,
526,
598,
326,
864,
1300,
434,
2168,
598,
17931,
434,
326,
7793,
434,
333,
8794,
18,
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,
17313,
67,
1126,
12,
2890,
16,
21330,
33,
23,
4672,
3536,
2000,
279,
17313,
526,
598,
326,
864,
1300,
434,
2168,
598,
17931,
434,
326,
7793,
434,
333,
8794,
18,
2,
-100,
-100,
-100,
-1... |
context = self._getContext() | def _start_link(self, attrsD): attrsD.setdefault('rel', 'alternate') attrsD.setdefault('type', 'text/html') attrsD = self._itsAnHrefDamnIt(attrsD) if attrsD.has_key('href'): attrsD['href'] = self.resolveURI(attrsD['href']) expectingText = self.infeed or self.inentry or self.insource context = self._getContext() context.setdefault('links', []) context['links'].append(FeedParserDict(attrsD)) if attrsD['rel'] == 'enclosure': self._start_enclosure(attrsD) if attrsD.has_key('href'): expectingText = 0 if (attrsD.get('rel') == 'alternate') and (self.mapContentType(attrsD.get('type')) in self.html_types): context['link'] = attrsD['href'] else: self.push('link', expectingText) | 44482af2baebba8741223b8967e4efeaf8365c45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/44482af2baebba8741223b8967e4efeaf8365c45/feedparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1937,
67,
1232,
12,
2890,
16,
3422,
40,
4672,
3422,
40,
18,
542,
1886,
2668,
2878,
2187,
296,
16025,
340,
6134,
3422,
40,
18,
542,
1886,
2668,
723,
2187,
296,
955,
19,
2620,
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,
389,
1937,
67,
1232,
12,
2890,
16,
3422,
40,
4672,
3422,
40,
18,
542,
1886,
2668,
2878,
2187,
296,
16025,
340,
6134,
3422,
40,
18,
542,
1886,
2668,
723,
2187,
296,
955,
19,
2620,
6134,... | |
forms of weight $2$ with character $\epsilon. | forms of weight $2$ with character $\epsilon$. | def CohenOesterle(eps, k): r""" Compute the Cohen-Oesterle function associate to eps, $k$. This is a summand in the formula for the dimension of the space of cusp forms of weight $2$ with character $\epsilon. INPUT: eps -- Dirichlet character k -- integer OUTPUT: element of the base ring of eps. EXAMPLES: sage: G.<eps> = DirichletGroup(7) sage: sage.modular.dims.CohenOesterle(eps, 2) -2/3 sage: sage.modular.dims.CohenOesterle(eps, 4) -1 """ N = eps.modulus() facN = factor(N) f = eps.conductor() gamma_k = 0 if k%4==2: gamma_k = frac(-1,4) elif k%4==0: gamma_k = frac(1,4) mu_k = 0 if k%3==2: mu_k = frac(-1,3) elif k%3==0: mu_k = frac(1,3) def _lambda(r,s,p): """ Used internally by the CohenOesterle function. INPUT: r, s, p -- integers OUTPUT: Integer EXAMPLES: (indirect doctest) sage: K = CyclotomicField(3) sage: eps = DirichletGroup(7*43,K).0^2 sage: sage.modular.dims.CohenOesterle(eps,2) -4/3 """ if 2*s<=r: if r%2==0: return p**(r//2) + p**((r//2)-1) return 2*p**((r-1)//2) return 2*(p**(r-s)) #end def of lambda K = eps.base_ring() return K(frac(-1,2) * mul([_lambda(r,valuation(f,p),p) for p, r in facN]) + \ gamma_k * mul([CO_delta(r,p,N,eps) for p, r in facN]) + \ mu_k * mul([CO_nu(r,p,N,eps) for p, r in facN])) | c82112a889c87779a875085f7c30d0e045ec245d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/c82112a889c87779a875085f7c30d0e045ec245d/dims.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7695,
76,
275,
51,
7654,
298,
12,
13058,
16,
417,
4672,
436,
8395,
8155,
326,
7695,
76,
275,
17,
51,
7654,
298,
445,
13251,
358,
7785,
16,
271,
79,
8,
18,
225,
1220,
353,
279,
2142,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7695,
76,
275,
51,
7654,
298,
12,
13058,
16,
417,
4672,
436,
8395,
8155,
326,
7695,
76,
275,
17,
51,
7654,
298,
445,
13251,
358,
7785,
16,
271,
79,
8,
18,
225,
1220,
353,
279,
2142,
... |
del context[objid] | del context[objid] | def __format(self, object, stream, indent, allowance, context, level): level = level + 1 if context.has_key(id(object)): object = _Recursion(object) self.__recursive = 1 rep = self.__repr(object, context, level - 1) objid = id(object) context[objid] = 1 typ = type(object) sepLines = len(rep) > (self.__width - 1 - indent - allowance) | ba4d72bf0a5b1cae692d9b74ac4f71499e942a90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ba4d72bf0a5b1cae692d9b74ac4f71499e942a90/pprint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2139,
12,
2890,
16,
733,
16,
1407,
16,
3504,
16,
1699,
1359,
16,
819,
16,
1801,
4672,
1801,
273,
1801,
397,
404,
309,
819,
18,
5332,
67,
856,
12,
350,
12,
1612,
3719,
30,
733,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2139,
12,
2890,
16,
733,
16,
1407,
16,
3504,
16,
1699,
1359,
16,
819,
16,
1801,
4672,
1801,
273,
1801,
397,
404,
309,
819,
18,
5332,
67,
856,
12,
350,
12,
1612,
3719,
30,
733,
... |
u.warn(_("abort: %s - %s\n") % (inst.strerror, inst.filename)) | u.warn(_("abort: %s: %s\n") % (inst.strerror, inst.filename)) | def print_time(): t = get_times() u.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3])) | f9d9ccf159173372d8688dc87e7c082029077b5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/f9d9ccf159173372d8688dc87e7c082029077b5c/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
957,
13332,
268,
273,
336,
67,
8293,
1435,
582,
18,
8935,
24899,
2932,
950,
30,
2863,
12639,
23,
74,
18043,
261,
1355,
12639,
23,
74,
15,
9,
18,
23,
74,
2589,
12639,
23,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
957,
13332,
268,
273,
336,
67,
8293,
1435,
582,
18,
8935,
24899,
2932,
950,
30,
2863,
12639,
23,
74,
18043,
261,
1355,
12639,
23,
74,
15,
9,
18,
23,
74,
2589,
12639,
23,
74... |
f = self.frags[0] if 1 and hasattr(self,'blPara') and getattr(self,'_splitpara',0): return f.clone(kind=0, lines=self.blPara.lines) lines = [] lineno = 0 self.height = 0 f = self.frags[0] if hasattr(f,'text'): text = f.text else: text = ''.join(getattr(f,'words',[])) from reportlab.lib.textsplit import wordSplit lines = wordSplit(text, maxWidths[0], f.fontName, f.fontSize) wrappedLines = [(sp, [line]) for (sp, line) in lines] return f.clone(kind=0, lines=wrappedLines, ascent=f.fontSize, descent=-0.2*f.fontSize) | if hasattr(self,'blPara') and getattr(self,'_splitpara',0): return self.blPara autoLeading = getattr(self,'autoLeading',getattr(style,'autoLeading','')) calcBounds = autoLeading not in ('','off') return cjkFragSplit(frags, maxWidths, calcBounds) | def breakLinesCJK(self, width): """Initially, the dumbest possible wrapping algorithm. Cannot handle font variations.""" | eec5bf031dd52b1c7c781cc7f260f1554571bbc1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/eec5bf031dd52b1c7c781cc7f260f1554571bbc1/paragraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
898,
5763,
39,
19474,
12,
2890,
16,
1835,
4672,
3536,
2570,
6261,
16,
326,
302,
3592,
395,
3323,
14702,
4886,
18,
14143,
1640,
3512,
28401,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
898,
5763,
39,
19474,
12,
2890,
16,
1835,
4672,
3536,
2570,
6261,
16,
326,
302,
3592,
395,
3323,
14702,
4886,
18,
14143,
1640,
3512,
28401,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for c in self.children.values(): c.destroy() if self.master.children.has_key(self._name): del self.master.children[self._name] if self.master.subwidget_list.has_key(self._name): del self.master.subwidget_list[self._name] if self.destroy_physically: self.tk.call('destroy', self._w) | for c in self.children.values(): c.destroy() if self.master.children.has_key(self._name): del self.master.children[self._name] if self.master.subwidget_list.has_key(self._name): del self.master.subwidget_list[self._name] if self.destroy_physically: self.tk.call('destroy', self._w) | def destroy(self): | b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5546,
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,
0,
0,... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5546,
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,
-100,
-... |
self.assertEqual([credit_card], self.GetAutoFillProfile()['credit_cards']) | self.assertEqual([expected_credit_card], self.GetAutoFillProfile()['credit_cards']) | def testAutofillInvalid(self): """Test filling in invalid values for profiles and credit cards.""" # First try profiles with invalid input. without_invalid = {'NAME_FIRST': u'Will', 'ADDRESS_HOME_CITY': 'Sunnyvale', 'ADDRESS_HOME_STATE': 'CA', 'ADDRESS_HOME_ZIP': 'my_zip', 'ADDRESS_HOME_COUNTRY': 'USA'} # Add some invalid fields. with_invalid = without_invalid.copy() with_invalid['PHONE_HOME_WHOLE_NUMBER'] = 'Invalid_Phone_Number' with_invalid['PHONE_FAX_WHOLE_NUMBER'] = 'Invalid_Fax_Number' self.FillAutoFillProfile(profiles=[with_invalid]) self.assertEqual([without_invalid], self.GetAutoFillProfile()['profiles']) | 980e9d73673ae07b048fa98e687be8469d0a3428 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/980e9d73673ae07b048fa98e687be8469d0a3428/autofill.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7150,
792,
737,
1941,
12,
2890,
4672,
3536,
4709,
25740,
316,
2057,
924,
364,
11788,
471,
12896,
18122,
12123,
468,
5783,
775,
11788,
598,
2057,
810,
18,
2887,
67,
5387,
273,
13666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7150,
792,
737,
1941,
12,
2890,
4672,
3536,
4709,
25740,
316,
2057,
924,
364,
11788,
471,
12896,
18122,
12123,
468,
5783,
775,
11788,
598,
2057,
810,
18,
2887,
67,
5387,
273,
13666,
... |
if dodiff: | if dodiff == 'binary': fp.write(''.join(header)) b85diff(fp, to, tn) elif dodiff: | def addmodehdr(header, omode, nmode): if omode != nmode: header.append('old mode %s\n' % omode) header.append('new mode %s\n' % nmode) | 13b19aa85f8698c99c928c81b5592c352d772e5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/13b19aa85f8698c99c928c81b5592c352d772e5c/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
3188,
16587,
12,
3374,
16,
320,
3188,
16,
290,
3188,
4672,
309,
320,
3188,
480,
290,
3188,
30,
1446,
18,
6923,
2668,
1673,
1965,
738,
87,
64,
82,
11,
738,
320,
3188,
13,
1446,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
3188,
16587,
12,
3374,
16,
320,
3188,
16,
290,
3188,
4672,
309,
320,
3188,
480,
290,
3188,
30,
1446,
18,
6923,
2668,
1673,
1965,
738,
87,
64,
82,
11,
738,
320,
3188,
13,
1446,
1... |
matt.append(bpy.data.materials.new(materials[idx_mat][0])) matt[n].diffuse_color=materials[idx_mat][1][:3] matt[n].alpha=materials[idx_mat][1][3] if materials[idx_mat][1][3]<1.0: matt[n].use_transparency=True matt[n].specular_color=materials[idx_mat][3][:3] matt[n].specular_alpha=materials[idx_mat][3][3] | if idx_mat>=0: matt.append(bpy.data.materials.new(materials[idx_mat][0])) matt[n].diffuse_color=materials[idx_mat][1][:3] matt[n].alpha=materials[idx_mat][1][3] if materials[idx_mat][1][3]<1.0: matt[n].use_transparency=True matt[n].specular_color=materials[idx_mat][3][:3] matt[n].specular_alpha=materials[idx_mat][3][3] raise_small_hardness=param_vector[2] default_hardeness=param_vector[3] if len(materials[idx_mat][3])==5: if raise_small_hardness and (materials[idx_mat][3][4]<default_hardeness): matt[n].specular_hardness=default_hardeness else: matt[n].specular_hardness=materials[idx_mat][3][4] import_emmissive=True; if import_emmissive: emm_c=materials[idx_mat][4][:3] matt[n].emit=(emm_c[0]+emm_c[1]+emm_c[2])/3 | def create_materials(groups,materials,textures,orbiterpath,param_vector): ''' To create materials, some steps has to be done: 1. Create unique material+texture pairs with corresponding mesh groups 2. Create textures 3. Create materials,assign textures to them if needed, assign materials to mesh groups ''' #1. ==========counting material/texture combinations=========== print("-----------Creating materials-----------") matpairset=set() matpair=[] # [(mat,tex),[mgroups...]] Unique mat+tex and corresponding groups for n in range(len(groups)): l=(groups[n][1],groups[n][2]) #print(l) if l not in matpairset: matpairset.add(l) matpair.append([l,[]]) #fill unique mat+tex combination for n in range(len(groups)): l=(groups[n][1],groups[n][2]) for i in range(len(matpair)): if l==matpair[i][0]: matpair[i][1].append(n) #fill array of corresponding groups print("\nUnique pairs:",len(matpairset),"\n",matpairset) if VERBOSE_OUT: print(matpair) #2.==============create textures======================= tx=[] tex_load_fails=0 print ("lalala",orbiterpath) orbiter_path_ok=os.access(orbiterpath,os.F_OK) if not(orbiter_path_ok): print("Orbiter path is wrong! path=",orbiterpath) print("creating textures") for n in range(len(textures)): tx.append(bpy.data.textures.new(textures[n][1],"IMAGE")) if orbiter_path_ok: fpath=find_texture_path(orbiterpath,textures[n][0]) if fpath=="": tex_load_fails=tex_load_fails+1 continue #Trying to load data try: img=bpy.data.images.load(fpath) except: print("Can not load image, file is possibly corrupted : ",fpath) tex_load_fails=tex_load_fails+1 continue else: tex_load_fails=tex_load_fails+1 continue tx[n].image=img tx[n].use_alpha=True #3.=================Create materials===================== print("creating materials") n=0 matt=[] mat_index_out_of_range=False for pair in matpair: #create material object idx_mat=pair[0][0]-1 if (idx_mat)>len(materials)-1: #There are some .msh files with wrong mat indices mat_index_out_of_range=True print("WARNING! Material index out of range in GEOM(s):",pair[1],". Using the last material.") idx_mat=len(materials)-1 idx_tex=pair[0][1]-1 if VERBOSE_OUT: print("idx_mat=",idx_mat) print("mat_name=",materials[idx_mat][0]) print("diff=",materials[idx_mat][1][:3]) if len(textures)>0: print("tex=",textures[idx_tex][1],"idx=",idx_tex) matt.append(bpy.data.materials.new(materials[idx_mat][0])) #diffuse component matt[n].diffuse_color=materials[idx_mat][1][:3] matt[n].alpha=materials[idx_mat][1][3] if materials[idx_mat][1][3]<1.0: matt[n].use_transparency=True #specular component matt[n].specular_color=materials[idx_mat][3][:3] matt[n].specular_alpha=materials[idx_mat][3][3] raise_small_hardness=param_vector[2] default_hardeness=param_vector[3] if len(materials[idx_mat][3])==5: if raise_small_hardness and (materials[idx_mat][3][4]<default_hardeness): matt[n].specular_hardness=default_hardeness else: matt[n].specular_hardness=materials[idx_mat][3][4] #there aren't different ambient and emissive color component in blender #ambient is very often equal to diffuse, it's like amb=1.0 in blender #Emmissive component: import_emmissive=True; if import_emmissive: emm_c=materials[idx_mat][4][:3] matt[n].emit=(emm_c[0]+emm_c[1]+emm_c[2])/3 #Adding texture to material if idx_tex>=0: mtex=matt[n].texture_slots.add() mtex.texture=tx[idx_tex] mtex.texture_coords="UV" #mtex.map_colordiff = True #mtex.map_alpha = True #mtex.map_coloremission = True #mtex.map_density = True #mtex.mapping = 'FLAT' for grp_idx in pair[1]: groups[grp_idx][5].data.materials.append(matt[n]) n=n+1 print("=============Materials creation summary:=================") print("Created ",n," materials,") print("Loaded ",len(tx)-tex_load_fails," textures.") if not(orbiter_path_ok): print("WARNING! Orbiter path is wrong or not accessible, textures cannot be loaded!") print("Wrong path=",orbiterpath) if tex_load_fails>0: print("WARNING! ",tex_load_fails," of ",len(tx)," textures aren't loaded, possibly wrong file name(s)!") if mat_index_out_of_range: print("WARNNG! Material numbers of some GEOMs are out of range, see above!") | ec8905efedfda89511122eccacd10f493de9b5f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10993/ec8905efedfda89511122eccacd10f493de9b5f3/io_orbiter_msh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
20542,
87,
12,
4650,
16,
20542,
87,
16,
955,
1823,
16,
16640,
2165,
803,
16,
891,
67,
7737,
4672,
9163,
2974,
752,
31824,
16,
2690,
6075,
711,
358,
506,
2731,
30,
404,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
20542,
87,
12,
4650,
16,
20542,
87,
16,
955,
1823,
16,
16640,
2165,
803,
16,
891,
67,
7737,
4672,
9163,
2974,
752,
31824,
16,
2690,
6075,
711,
358,
506,
2731,
30,
404,
18,
1... |
print >>sys.stderr,"rquery: send_query: Sent to",peers_to_query,"peers" | print >>sys.stderr,"rquery: send_query: Sent to",peers_to_query,"peers; query=", query | def network_send_query_callback(self,query,usercallback,max_peers_to_query): """ Called by overlay thread """ p = self.create_query(query,usercallback) m = QUERY+p query_conn_callback_lambda = lambda exc,dns,permid,selversion:self.conn_callback(exc,dns,permid,selversion,m) | e6fadf9a13c1bc37fff325bf57a0aff0c86cdcab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/e6fadf9a13c1bc37fff325bf57a0aff0c86cdcab/RemoteQueryMsgHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2483,
67,
4661,
67,
2271,
67,
3394,
12,
2890,
16,
2271,
16,
1355,
3394,
16,
1896,
67,
30502,
67,
869,
67,
2271,
4672,
3536,
11782,
635,
9218,
2650,
3536,
293,
273,
365,
18,
2640,
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,
2483,
67,
4661,
67,
2271,
67,
3394,
12,
2890,
16,
2271,
16,
1355,
3394,
16,
1896,
67,
30502,
67,
869,
67,
2271,
4672,
3536,
11782,
635,
9218,
2650,
3536,
293,
273,
365,
18,
2640,
67,
... |
if self.datasetname and not (job.application._name in ['Athena','AthenaTask'] and job.backend._name in [ 'LCG', 'Local', 'LSF', 'PBS', 'SGE']): | if self.datasetname and not (job.application._name in ['Athena', 'AthenaTask', 'AMAAthena' ] and job.backend._name in [ 'LCG', 'Local', 'LSF', 'PBS', 'SGE']): | def fill(self, type=None, name=None, **options ): """Determine outputdata and outputsandbox locations of finished jobs and fill output variable""" | 50a5026c4d7db935f42714a90c6e58778ea81f5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/50a5026c4d7db935f42714a90c6e58778ea81f5d/DQ2Dataset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
12,
2890,
16,
618,
33,
7036,
16,
508,
33,
7036,
16,
2826,
2116,
262,
30,
3536,
8519,
876,
892,
471,
6729,
9069,
7838,
434,
6708,
6550,
471,
3636,
876,
2190,
8395,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
12,
2890,
16,
618,
33,
7036,
16,
508,
33,
7036,
16,
2826,
2116,
262,
30,
3536,
8519,
876,
892,
471,
6729,
9069,
7838,
434,
6708,
6550,
471,
3636,
876,
2190,
8395,
2,
-100,
-100,
... |
proxy_auth = base64.b64encode(proxy_passwd.encode()).strip() | proxy_auth = base64.b64encode(proxy_passwd.encode()).decode('ascii') | def _open_generic_http(self, connection_factory, url, data): """Make an HTTP connection using connection_class. | 70ed85ce19963c0378b0b3709d5bbf6fbfb6acaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/70ed85ce19963c0378b0b3709d5bbf6fbfb6acaf/request.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
67,
13540,
67,
2505,
12,
2890,
16,
1459,
67,
6848,
16,
880,
16,
501,
4672,
3536,
6464,
392,
2239,
1459,
1450,
1459,
67,
1106,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
67,
13540,
67,
2505,
12,
2890,
16,
1459,
67,
6848,
16,
880,
16,
501,
4672,
3536,
6464,
392,
2239,
1459,
1450,
1459,
67,
1106,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
noheaders(), 'file:'+file) | headers, 'file:'+file) | def open_local_file(self, url): host, file = splithost(url) if not host: return addinfourl( open(url2pathname(file), 'rb'), noheaders(), 'file:'+file) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfourl( open(url2pathname(file), 'rb'), noheaders(), 'file:'+file) raise IOError, ('local file error', 'not on local host') | e9a8940e275731d0de26af6b1360453333f2a907 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e9a8940e275731d0de26af6b1360453333f2a907/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
3729,
67,
768,
12,
2890,
16,
880,
4672,
1479,
16,
585,
273,
6121,
483,
669,
12,
718,
13,
309,
486,
1479,
30,
327,
527,
10625,
477,
80,
12,
1696,
12,
718,
22,
28336,
12,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
3729,
67,
768,
12,
2890,
16,
880,
4672,
1479,
16,
585,
273,
6121,
483,
669,
12,
718,
13,
309,
486,
1479,
30,
327,
527,
10625,
477,
80,
12,
1696,
12,
718,
22,
28336,
12,
7... |
for lfn,info in lfns.items(): | for lfn, info in lfns.items(): | def setReplicaStatus(self,lfn): res = self.__checkArgumentFormat(lfn) if not res['OK']: return res lfns = res['Value'] created = False if len(lfns) > 2: created = self.__openSession() failed = {} successful = {} for lfn,info in lfns.items(): pfn = info['PFN'] se = info['SE'] status = info['Status'] res = self.__setReplicaStatus(pfn,status[0]) if res['OK']: successful[lfn] = True else: failed[lfn] = res['Message'] if created: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
14222,
1482,
12,
2890,
16,
80,
4293,
4672,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
80,
4293,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
18594,
2387,
273,
400,
3292,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14222,
1482,
12,
2890,
16,
80,
4293,
4672,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
80,
4293,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
18594,
2387,
273,
400,
3292,
62... |
assert checker.check_output(expected, str(result), ELLIPSIS), result | _check_output(result, expected) | def test_freeze_bazaar_clone(): """ Test freezing a Bazaar clone. """ reset_env() env = get_env() checker = OutputChecker() result = env.run('bzr', 'checkout', '-r', '174', 'http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1/', 'django-wikiapp') result = env.run(os.path.join(env.bin_dir, 'python'), 'setup.py', 'develop', cwd=env.scratch_path/'django-wikiapp') result = run_pip('freeze', expect_stderr=True) expected = textwrap.dedent("""\ Script result: ...pip freeze -- stdout: -------------------- -e bzr+http://bazaar.launchpad.net/...django-wikiapp/django-wikiapp/release-0.1/@...#egg=django_wikiapp-... ...""") assert checker.check_output(expected, str(result), ELLIPSIS), result result = run_pip('freeze', '-f', 'bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1/#egg=django-wikiapp', expect_stderr=True) expected = textwrap.dedent("""\ Script result: ...pip freeze -f bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1/#egg=django-wikiapp -- stdout: -------------------- -f bzr+http://bazaar.launchpad.net/...django-wikiapp/django-wikiapp/release-0.1/#egg=django-wikiapp -e bzr+http://bazaar.launchpad.net/...django-wikiapp/django-wikiapp/release-0.1/@...#egg=django_wikiapp-... ...""") assert checker.check_output(expected, str(result), ELLIPSIS), result | 23d3d0fdb48cf271676f74c50d5d52819a2e9e01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12982/23d3d0fdb48cf271676f74c50d5d52819a2e9e01/test_freeze.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
29631,
67,
70,
1561,
69,
297,
67,
14056,
13332,
3536,
7766,
4843,
94,
310,
279,
605,
1561,
69,
297,
3236,
18,
225,
3536,
2715,
67,
3074,
1435,
1550,
273,
336,
67,
3074,
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,
1842,
67,
29631,
67,
70,
1561,
69,
297,
67,
14056,
13332,
3536,
7766,
4843,
94,
310,
279,
605,
1561,
69,
297,
3236,
18,
225,
3536,
2715,
67,
3074,
1435,
1550,
273,
336,
67,
3074,
1435,... |
minimal. In the integer case, see Integer._xgcd() for minimal | minimal. In the integer case, see :meth:`sage.rings.integer.Integer._xgcd()` for minimal | def xgcd(a, b): """ Returns triple (g,s,t) such that `g = s*a+t*b = gcd(a,b)`. INPUT: - ``a, b`` - integers or univariate polynomials (or any type with an xgcd method). OUTPUT: - ``g, s, t`` - such that g = s\*a + t\*b .. note:: There is no guarantee that the returned cofactors (s and t) are minimal. In the integer case, see Integer._xgcd() for minimal cofactors. EXAMPLES:: sage: xgcd(56, 44) (4, 4, -5) sage: 4*56 + (-5)*44 4 sage: g, a, b = xgcd(5/1, 7/1); g, a, b (1, 3, -2) sage: a*(5/1) + b*(7/1) == g True sage: x = polygen(QQ) sage: xgcd(x^3 - 1, x^2 - 1) (x - 1, 1, -x) sage: K.<g> = NumberField(x^2-3) sage: R.<a,b> = K[] sage: S.<y> = R.fraction_field()[] sage: xgcd(y^2, a*y+b) (b^2/a^2, 1, ((-1)/a)*y + b/a^2) sage: xgcd((b+g)*y^2, (a+g)*y+b) ((b^3 + (g)*b^2)/(a^2 + (2*g)*a + 3), 1, ((-b + (-g))/(a + (g)))*y + (b^2 + (g)*b)/(a^2 + (2*g)*a + 3)) """ try: return a.xgcd(b) except AttributeError: pass if not isinstance(a, sage.rings.integer.Integer): a = ZZ(a) return a.xgcd(ZZ(b)) | 08206c95546f1db2a947692b19f3ca4ec939d5d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/08206c95546f1db2a947692b19f3ca4ec939d5d9/arith.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
75,
4315,
12,
69,
16,
324,
4672,
3536,
2860,
14543,
261,
75,
16,
87,
16,
88,
13,
4123,
716,
1375,
75,
273,
272,
14,
69,
15,
88,
14,
70,
273,
14876,
12,
69,
16,
70,
13,
8338,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
75,
4315,
12,
69,
16,
324,
4672,
3536,
2860,
14543,
261,
75,
16,
87,
16,
88,
13,
4123,
716,
1375,
75,
273,
272,
14,
69,
15,
88,
14,
70,
273,
14876,
12,
69,
16,
70,
13,
8338,... |
if queueObj['commands'] == False: | if queueObj['local_filepath']: | def writeOut(self, queueObj): """Write relevant queueObj information to stdout and/or to the outfile (if one is set)""" if queueObj['commands'] == False: queueObj['commands'] = "sshpt: sftp.put %s %s:%s" % (queueObj['local_filepath'], queueObj['host'], queueObj['remote_filepath']) elif queueObj['sudo'] is False: if len(queueObj['commands']) > 1: # Only prepend 'index: ' if we were passed more than one command queueObj['commands'] = "\n".join(["%s: %s" % (index, command) for index, command in enumerate(queueObj['commands'])]) else: queueObj['commands'] = "".join(queueObj['commands']) else: if len(queueObj['commands']) > 1: # Only prepend 'index: ' if we were passed more than one command queueObj['commands'] = "\n".join(["%s: sudo -u %s %s" % (index, queueObj['run_as'], command) for index, command in enumerate(queueObj['commands'])]) else: queueObj['commands'] = "sudo -u %s" % "".join(queueObj['commands']) if len(queueObj['command_output']) > 1: # Only prepend 'index: ' if we were passed more than one command queueObj['command_output'] = "\n".join(["%s: %s" % (index, command) for index, command in enumerate(queueObj['command_output'])]) else: queueObj['command_output'] = "\n".join(queueObj['command_output']) csv_out = "\"%s\",\"%s\",\"%s\",\"%s\",\"%s\"" % (queueObj['host'], queueObj['connection_result'], datetime.datetime.now(), queueObj['commands'], queueObj['command_output']) self.printToStdout(csv_out) if self.outfile is not None: csv_out = "%s\n" % csv_out output = open(self.outfile, 'a') output.write(csv_out) output.close() | 4f8f6cdfc55c998b5417f29f7315b2347d1e9ca3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11566/4f8f6cdfc55c998b5417f29f7315b2347d1e9ca3/sshpt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
1182,
12,
2890,
16,
2389,
2675,
4672,
3536,
3067,
9368,
2389,
2675,
1779,
358,
3909,
471,
19,
280,
358,
326,
8756,
261,
430,
1245,
353,
444,
15574,
309,
2389,
2675,
3292,
3729,
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,
1045,
1182,
12,
2890,
16,
2389,
2675,
4672,
3536,
3067,
9368,
2389,
2675,
1779,
358,
3909,
471,
19,
280,
358,
326,
8756,
261,
430,
1245,
353,
444,
15574,
309,
2389,
2675,
3292,
3729,
67,... |
for subarch in subarches: if self.has_key(('base', arch, subarch)): avail = self['base', arch, subarch].get('available', True) | for featureset in featuresets: if self.has_key(('base', arch, featureset)): avail = self['base', arch, featureset].get('available', True) | def _readArch(self, arch): config = ConfigParser(self.schemas) config.read(self.getFiles("%s/%s" % (arch, self.config_name))) | 4fce5d1f110fa164dbdea466ff857ee6aec6f31a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5794/4fce5d1f110fa164dbdea466ff857ee6aec6f31a/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
12269,
12,
2890,
16,
6637,
4672,
642,
273,
25076,
12,
2890,
18,
17928,
13,
642,
18,
896,
12,
2890,
18,
588,
2697,
27188,
87,
5258,
87,
6,
738,
261,
991,
16,
365,
18,
1425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
896,
12269,
12,
2890,
16,
6637,
4672,
642,
273,
25076,
12,
2890,
18,
17928,
13,
642,
18,
896,
12,
2890,
18,
588,
2697,
27188,
87,
5258,
87,
6,
738,
261,
991,
16,
365,
18,
1425,
... |
_do_under_lines(i, t_off, tx) | _do_under_lines(i, t_off+leftIndent, tx) | def drawPara(self,debug=0): """Draws a paragraph according to the given style. Returns the final y position at the bottom. Not safe for paragraphs without spaces e.g. Japanese; wrapping algorithm will go infinite.""" | 6c7e147d9130dacadd2fe093bd3e271add7cebe3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/6c7e147d9130dacadd2fe093bd3e271add7cebe3/paragraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
23529,
12,
2890,
16,
4148,
33,
20,
4672,
3536,
25113,
279,
10190,
4888,
358,
326,
864,
2154,
18,
2860,
326,
727,
677,
1754,
622,
326,
5469,
18,
2288,
4183,
364,
24552,
2887,
7292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
23529,
12,
2890,
16,
4148,
33,
20,
4672,
3536,
25113,
279,
10190,
4888,
358,
326,
864,
2154,
18,
2860,
326,
727,
677,
1754,
622,
326,
5469,
18,
2288,
4183,
364,
24552,
2887,
7292,
... |
tls_port=settings.sip.tls_port if 'tls' in settings.sip.transport_list else None, | tls_port=None, | def _initialize_subsystems(self): account_manager = AccountManager() dns_manager = DNSManager() engine = Engine() notification_center = NotificationCenter() session_manager = SessionManager() settings = SIPSimpleSettings() | 588d6c81239e6ba116f0d44589339842c0495b5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/588d6c81239e6ba116f0d44589339842c0495b5d/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11160,
67,
1717,
4299,
87,
12,
2890,
4672,
2236,
67,
4181,
273,
6590,
1318,
1435,
6605,
67,
4181,
273,
8858,
1318,
1435,
4073,
273,
10507,
1435,
3851,
67,
5693,
273,
8050,
8449,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11160,
67,
1717,
4299,
87,
12,
2890,
4672,
2236,
67,
4181,
273,
6590,
1318,
1435,
6605,
67,
4181,
273,
8858,
1318,
1435,
4073,
273,
10507,
1435,
3851,
67,
5693,
273,
8050,
8449,
143... |
sage: I.basis() | sage: I.basis() | def basis(self): """ Return an immutable sequence of elements of this ideal (note: their parent is the number field) that form a basis for this ideal viewed as a ZZ-module. | bc7c504dc9cf63a945e3f2f80173db8800f39ac6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/bc7c504dc9cf63a945e3f2f80173db8800f39ac6/number_field_ideal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10853,
12,
2890,
4672,
3536,
2000,
392,
11732,
3102,
434,
2186,
434,
333,
23349,
261,
7652,
30,
3675,
982,
353,
326,
1300,
652,
13,
716,
646,
279,
10853,
364,
333,
23349,
1476,
329,
487,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10853,
12,
2890,
4672,
3536,
2000,
392,
11732,
3102,
434,
2186,
434,
333,
23349,
261,
7652,
30,
3675,
982,
353,
326,
1300,
652,
13,
716,
646,
279,
10853,
364,
333,
23349,
1476,
329,
487,... |
except: | except KeyError: | def InstallConfigFile(self, entry): '''Install ConfigFile Entry''' if self.setup['dryrun'] or self.setup['verbose']: print "Installing ConfigFile %s" % (entry.get('name')) if self.setup['dryrun']: return False parent = "/".join(entry.get('name').split('/')[:-1]) if parent: try: sloc = lstat(parent) try: if not S_ISDIR(sloc[ST_MODE]): unlink(parent) mkdir(parent) except OSError: return False except OSError: # need to handle mkdir -p case mkdir(parent) | a1e655a987bee4dde768f3b0974bb77cb5c5b723 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/a1e655a987bee4dde768f3b0974bb77cb5c5b723/Toolset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
13705,
12,
2890,
16,
1241,
4672,
9163,
6410,
31988,
3841,
26418,
309,
365,
18,
8401,
3292,
25011,
2681,
3546,
578,
365,
18,
8401,
3292,
11369,
3546,
30,
1172,
315,
6410,
310,
31988,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
13705,
12,
2890,
16,
1241,
4672,
9163,
6410,
31988,
3841,
26418,
309,
365,
18,
8401,
3292,
25011,
2681,
3546,
578,
365,
18,
8401,
3292,
11369,
3546,
30,
1172,
315,
6410,
310,
31988,... |
patch = patch and str(patch) | def lookup(self, patch, strict=False): patch = patch and str(patch) | 082c7ebaef0e9bf46ec594f501aab0cfc1a1989a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/082c7ebaef0e9bf46ec594f501aab0cfc1a1989a/mq.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
12,
2890,
16,
4729,
16,
5490,
33,
8381,
4672,
4729,
273,
4729,
471,
609,
12,
2272,
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,
... | [
1,
1,
1,
1,
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,
3689,
12,
2890,
16,
4729,
16,
5490,
33,
8381,
4672,
4729,
273,
4729,
471,
609,
12,
2272,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if VALID_SECTOR(w.x,w.y) and game.quad[w.x][w.y]==IHDOT: | if VALID_SECTOR(w.i,w.j) and game.quad[w.i][w.j]==IHDOT: | def mayday(): "Yell for help from nearest starbase." # There's more than one way to move in this game! scanner.chew() # Test for conditions which prevent calling for help if game.condition == "docked": prout(_("Lt. Uhura- \"But Captain, we're already docked.\"")) return if damaged(DRADIO): prout(_("Subspace radio damaged.")) return if not game.state.baseq: prout(_("Lt. Uhura- \"Captain, I'm not getting any response from Starbase.\"")) return if game.landed: prout(_("You must be aboard the %s.") % crmshp()) return # OK -- call for help from nearest starbase game.nhelp += 1 if game.base.x!=0: # There's one in this quadrant ddist = (game.base - game.sector).distance() else: ddist = FOREVER for ibq in game.state.baseq: xdist = QUADSIZE * (ibq - game.quadrant).distance() if xdist < ddist: ddist = xdist # Since starbase not in quadrant, set up new quadrant game.quadrant = ibq newqad() # dematerialize starship game.quad[game.sector.x][game.sector.y]=IHDOT proutn(_("Starbase in Quadrant %s responds--%s dematerializes") \ % (game.quadrant, crmshp())) game.sector.invalidate() for m in range(1, 5+1): w = game.base.scatter() if VALID_SECTOR(w.x,w.y) and game.quad[w.x][w.y]==IHDOT: # found one -- finish up game.sector = w break if not game.sector.is_valid(): prout(_("You have been lost in space...")) finish(FMATERIALIZE) return # Give starbase three chances to rematerialize starship probf = math.pow((1.0 - math.pow(0.98,ddist)), 0.33333333) for m in range(1, 3+1): if m == 1: proutn(_("1st")) elif m == 2: proutn(_("2nd")) elif m == 3: proutn(_("3rd")) proutn(_(" attempt to re-materialize ") + crmshp()) game.quad[ix][iy]=(IHMATER0,IHMATER1,IHMATER2)[m-1] textcolor("red") warble() if randreal() > probf: break prout(_("fails.")) curses.delay_output(500) textcolor(None) if m > 3: game.quad[ix][iy]=IHQUEST game.alive = False drawmaps(1) setwnd(message_window) finish(FMATERIALIZE) return game.quad[ix][iy]=game.ship textcolor("green") prout(_("succeeds.")) textcolor(None) dock(False) skip(1) prout(_("Lt. Uhura- \"Captain, we made it!\"")) | e67cf36a789c4ab1cd905a9a08e91d219395f538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/e67cf36a789c4ab1cd905a9a08e91d219395f538/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2026,
2881,
13332,
315,
61,
1165,
364,
2809,
628,
11431,
10443,
1969,
1199,
468,
6149,
1807,
1898,
2353,
1245,
4031,
358,
3635,
316,
333,
7920,
5,
7683,
18,
343,
359,
1435,
468,
7766,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2026,
2881,
13332,
315,
61,
1165,
364,
2809,
628,
11431,
10443,
1969,
1199,
468,
6149,
1807,
1898,
2353,
1245,
4031,
358,
3635,
316,
333,
7920,
5,
7683,
18,
343,
359,
1435,
468,
7766,
36... |
d0 = mx.DateTime.strptime(proj.date_start,'%Y-%m-%d') | d0 = DateTime.strptime(proj.date_start,'%Y-%m-%d') | def _compute_project(cr, uid, project, date_begin): tasks, last_date = _compute_tasks(cr, uid, project.tasks, date_begin) for proj in project.child_id: d0 = mx.DateTime.strptime(proj.date_start,'%Y-%m-%d') if d0 > last_date: last_date = d0 t2, l2 = _compute_project(cr, uid, proj, last_date) tasks.update(t2) last_date = l2 return tasks, last_date | 1d8975eb30ed6fc5207e146b26f41c17b375abf6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/1d8975eb30ed6fc5207e146b26f41c17b375abf6/_date_compute.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
4406,
12,
3353,
16,
4555,
16,
1984,
16,
1509,
67,
10086,
4672,
4592,
16,
1142,
67,
712,
273,
389,
9200,
67,
9416,
12,
3353,
16,
4555,
16,
1984,
18,
9416,
16,
1509,
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,
9200,
67,
4406,
12,
3353,
16,
4555,
16,
1984,
16,
1509,
67,
10086,
4672,
4592,
16,
1142,
67,
712,
273,
389,
9200,
67,
9416,
12,
3353,
16,
4555,
16,
1984,
18,
9416,
16,
1509,
67,... |
print val | sys.stdout.write(val) | def return_(val): """ Return the specified return value in the appropriate format """ if val == True: print "true" sys.exit(0) elif val == False: print "false" sys.exit(1) else: print val sys.exit(255) | 961d2437ed9bcf20019eb9ba61f747546b0d27b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/961d2437ed9bcf20019eb9ba61f747546b0d27b2/cmdline_auth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
327,
67,
12,
1125,
4672,
3536,
2000,
326,
1269,
327,
460,
316,
326,
5505,
740,
3536,
309,
1244,
422,
1053,
30,
1172,
315,
3767,
6,
2589,
18,
8593,
12,
20,
13,
1327,
1244,
422,
1083,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
327,
67,
12,
1125,
4672,
3536,
2000,
326,
1269,
327,
460,
316,
326,
5505,
740,
3536,
309,
1244,
422,
1053,
30,
1172,
315,
3767,
6,
2589,
18,
8593,
12,
20,
13,
1327,
1244,
422,
1083,
... |
oscmd("built/bin/egg2bam -pr " + preconv + " -o " + bam + " " + egg) | oscmd("built/bin/egg2bam " + preconv + " -o " + bam + " " + egg) | def CompileBam(preconv, bam, egg): if (egg[-4:] == ".flt"): ifile = os.path.basename(egg) oscmd("built/bin/flt2egg -pr " + preconv + " -o built/tmp/"+ifile+".egg" + " " + egg) oscmd("built/bin/egg2bam -o " + bam + " built/tmp/"+ifile+".egg") else: oscmd("built/bin/egg2bam -pr " + preconv + " -o " + bam + " " + egg) | 28070dd33e12beb6eebc9a9bb33e34410c2ce46d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/28070dd33e12beb6eebc9a9bb33e34410c2ce46d/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16143,
38,
301,
12,
1484,
4896,
16,
11400,
16,
25144,
4672,
309,
261,
23171,
18919,
24,
26894,
422,
3552,
31864,
6,
4672,
309,
398,
273,
1140,
18,
803,
18,
13909,
12,
23171,
13,
31476,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16143,
38,
301,
12,
1484,
4896,
16,
11400,
16,
25144,
4672,
309,
261,
23171,
18919,
24,
26894,
422,
3552,
31864,
6,
4672,
309,
398,
273,
1140,
18,
803,
18,
13909,
12,
23171,
13,
31476,
... |
self.MaxSecondColumnWidth = 0 | self.MaxFileNamePerformerColumnWidth = 0 self.MaxArtistWidth = 0 | def clear(self): """ Empty the playlist. """ self.Playlist.DeleteAllItems() self.PlaylistSongStructList = [] self.MaxSecondColumnWidth = 0 # Can be the file name or performer name. self.MaxTitleWidth = 0 | 7d6c2cead80b3d812ebc0d6027018fbc93b8714c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12653/7d6c2cead80b3d812ebc0d6027018fbc93b8714c/pykaraoke.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
12,
2890,
4672,
3536,
8953,
326,
16428,
18,
3536,
365,
18,
30194,
18,
2613,
1595,
3126,
1435,
365,
18,
30194,
55,
932,
3823,
682,
273,
5378,
365,
18,
2747,
4771,
4990,
264,
1494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
12,
2890,
4672,
3536,
8953,
326,
16428,
18,
3536,
365,
18,
30194,
18,
2613,
1595,
3126,
1435,
365,
18,
30194,
55,
932,
3823,
682,
273,
5378,
365,
18,
2747,
4771,
4990,
264,
1494,
... |
cr.execute('select min(nextcall) as min_next_call from ir_cron where numbercall<>0 and active and nextcall>=now()') | cr.execute('select min(nextcall) as min_next_call from ir_cron where numbercall<>0 and active') | def _poolJobs(self, db_name, check=False): try: db, pool = pooler.get_db_and_pool(db_name) except: return False cr = db.cursor() try: if not pool._init: now = datetime.now() cr.execute('select * from ir_cron where numbercall<>0 and active and nextcall<=now() order by priority') for job in cr.dictfetchall(): nextcall = datetime.strptime(job['nextcall'], '%Y-%m-%d %H:%M:%S') numbercall = job['numbercall'] | b0aa6bf32df51adbd0014240b70f115aacafaaaa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/b0aa6bf32df51adbd0014240b70f115aacafaaaa/ir_cron.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6011,
7276,
12,
2890,
16,
1319,
67,
529,
16,
866,
33,
8381,
4672,
775,
30,
1319,
16,
2845,
273,
2845,
264,
18,
588,
67,
1966,
67,
464,
67,
6011,
12,
1966,
67,
529,
13,
1335,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6011,
7276,
12,
2890,
16,
1319,
67,
529,
16,
866,
33,
8381,
4672,
775,
30,
1319,
16,
2845,
273,
2845,
264,
18,
588,
67,
1966,
67,
464,
67,
6011,
12,
1966,
67,
529,
13,
1335,
3... |
model = self.get_model(record.model) | def process_record(self, node): import osv record, fields = node.items()[0] model = self.get_model(record.model) model_bases = model.__class__.__bases__ if osv.osv.osv_memory in model_bases: record_dict=self.create_osv_memory_record(record, fields) else: self.validate_xml_id(record.id) if self.isnoupdate(record) and self.mode != 'init': id = self.pool.get('ir.model.data')._update_dummy(self.cr, self.uid, record.model, self.module, record.id) # check if the resource already existed at the last update if id: self.id_map[record] = int(id) return None else: if not self._coerce_bool(record.forcecreate): return None model = self.get_model(record.model) record_dict = self._create_record(model, fields) self.logger.debug("RECORD_DICT %s" % record_dict) if not osv.osv.osv_memory in model_bases: id = self.pool.get('ir.model.data')._update(self.cr, self.uid, record.model, \ self.module, record_dict, record.id, noupdate=self.isnoupdate(record), mode=self.mode) self.id_map[record.id] = int(id) if config.get('import_partial', False): self.cr.commit() | 754e4abd6996e6b2fca6feeeae686f0703bd1215 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/754e4abd6996e6b2fca6feeeae686f0703bd1215/yaml_import.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
3366,
12,
2890,
16,
756,
4672,
1930,
1140,
90,
1409,
16,
1466,
273,
756,
18,
3319,
1435,
63,
20,
65,
938,
67,
18602,
273,
938,
16186,
1106,
972,
16186,
18602,
972,
309,
1140,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3366,
12,
2890,
16,
756,
4672,
1930,
1140,
90,
1409,
16,
1466,
273,
756,
18,
3319,
1435,
63,
20,
65,
938,
67,
18602,
273,
938,
16186,
1106,
972,
16186,
18602,
972,
309,
1140,... | |
allocator = manager.openmdao_main_resource_LocalAllocator(name) | allocator = \ manager.openmdao_main_resource_LocalAllocator(name=name, allow_shell=allow_shell) | def __init__(self, name, machines, authkey=None, allow_shell=False): if authkey is None: authkey = multiprocessing.current_process().authkey if authkey is None: authkey = 'PublicKey' multiprocessing.current_process().authkey = authkey | f365224bf0b748c37566da94c6fb6600942dcd7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/f365224bf0b748c37566da94c6fb6600942dcd7b/resource.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
15942,
16,
1357,
856,
33,
7036,
16,
1699,
67,
10304,
33,
8381,
4672,
309,
1357,
856,
353,
599,
30,
1357,
856,
273,
21828,
18,
2972,
67,
2567,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
15942,
16,
1357,
856,
33,
7036,
16,
1699,
67,
10304,
33,
8381,
4672,
309,
1357,
856,
353,
599,
30,
1357,
856,
273,
21828,
18,
2972,
67,
2567,
... |
print 'load system-stepper' | def loadModel( self, aFileObject ): anEmlParser = eml.EmlParser( aFileObject ) self.__thePreModel = anEmlParser.parse() | 8de54d8253d8992d96fed5ff8e4e3f6e15b0965b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/8de54d8253d8992d96fed5ff8e4e3f6e15b0965b/Session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
1488,
12,
365,
16,
279,
21471,
262,
30,
392,
41,
781,
2678,
273,
801,
80,
18,
41,
781,
2678,
12,
279,
21471,
262,
365,
16186,
5787,
1386,
1488,
273,
392,
41,
781,
2678,
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,
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,
1262,
1488,
12,
365,
16,
279,
21471,
262,
30,
392,
41,
781,
2678,
273,
801,
80,
18,
41,
781,
2678,
12,
279,
21471,
262,
365,
16186,
5787,
1386,
1488,
273,
392,
41,
781,
2678,
18,
267... | |
self._create_stylecmds() def _create_stylecmds(self): t2c = self.ttype2cmd = {Token: ''} | self._create_stylesheet() def _create_stylesheet(self): t2n = self.ttype2name = {Token: ''} | def __init__(self, **options): Formatter.__init__(self, **options) self.docclass = options.get('docclass', 'article') self.preamble = options.get('preamble', '') self.linenos = get_bool_opt(options, 'linenos', False) self.linenostart = abs(get_int_opt(options, 'linenostart', 1)) self.linenostep = abs(get_int_opt(options, 'linenostep', 1)) self.verboptions = options.get('verboptions', '') self.nobackground = get_bool_opt(options, 'nobackground', False) self.commandprefix = options.get('commandprefix', 'PY') | 23174d003ddef264e12aea8db04492915ff167fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2885/23174d003ddef264e12aea8db04492915ff167fc/latex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
2116,
4672,
14924,
16186,
2738,
972,
12,
2890,
16,
2826,
2116,
13,
365,
18,
2434,
1106,
273,
702,
18,
588,
2668,
2434,
1106,
2187,
296,
11480,
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,
1001,
2738,
972,
12,
2890,
16,
2826,
2116,
4672,
14924,
16186,
2738,
972,
12,
2890,
16,
2826,
2116,
13,
365,
18,
2434,
1106,
273,
702,
18,
588,
2668,
2434,
1106,
2187,
296,
11480,
6134,
... |
return text.ljust(_tw + len(text) - len(_strip_core_re.sub('', text))) + '\r' | return text.ljust(_tw + len(text) - len(_ansi_re.sub('', text))) + '\r' | def term_width_line(text): if not codes: # if no coloring, don't output fancy backspaces return text + '\n' else: # codes are not displayed and must be taken into account by introducing the correction factor return text.ljust(_tw + len(text) - len(_strip_core_re.sub('', text))) + '\r' | 7eb85e159a23526b823a636ccc956d61be1fba16 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/7eb85e159a23526b823a636ccc956d61be1fba16/console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2481,
67,
2819,
67,
1369,
12,
955,
4672,
309,
486,
6198,
30,
468,
309,
1158,
2036,
310,
16,
2727,
1404,
876,
31701,
1473,
9554,
327,
977,
397,
2337,
82,
11,
469,
30,
468,
6198,
854,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2481,
67,
2819,
67,
1369,
12,
955,
4672,
309,
486,
6198,
30,
468,
309,
1158,
2036,
310,
16,
2727,
1404,
876,
31701,
1473,
9554,
327,
977,
397,
2337,
82,
11,
469,
30,
468,
6198,
854,
... |
printlist( [Response_Message,Response_Code,CURR_CODE,DISPATCH_DATE,ORIGIN_TYPE,ORIGIN_LOCATION_CODE,ORIGIN_CODE, ORIGIN_DESCR,DESTINATION_LOCATION_CODE,DESTINATION_CODE,LTI_ID,LOADING_DATE,ORGANIZATION_ID,TRAN_TYPE_CODE,VEHICLE_REGISTRATION,MODETRANS_CODE, COMMENTS,PERSON_CODE,PERSON_OUC,CERTIFING_TITLE,TRANS_CONTRACTOR_CODE,SUPPLIER1_OUC,DRIVER_NAME,LICENSE,CURR_CONTAINER_NUMBER,settings.COMPAS_STATION, Full_coi,COMM_CATEGORY_CODE,COMM_CODE,PCKKCODE,ALLCODE,QUALITY,strNetTotal,strGrossTotal,strUnitsLoaded,strUnitNet,strUnitGross,empty]) cursor.callproc(u'write_waybill.dispatch',(Response_Message,Response_Code,CURR_CODE,DISPATCH_DATE,ORIGIN_TYPE,ORIGIN_LOCATION_CODE,ORIGIN_CODE, ORIGIN_DESCR,DESTINATION_LOCATION_CODE,DESTINATION_CODE,LTI_ID,LOADING_DATE,ORGANIZATION_ID,TRAN_TYPE_CODE,VEHICLE_REGISTRATION,MODETRANS_CODE, COMMENTS,PERSON_CODE,PERSON_OUC,CERTIFING_TITLE,TRANS_CONTRACTOR_CODE,SUPPLIER1_OUC,DRIVER_NAME,LICENSE,CURR_CONTAINER_NUMBER,settings.COMPAS_STATION, Full_coi,COMM_CATEGORY_CODE,COMM_CODE,PCKKCODE,ALLCODE,QUALITY,strNetTotal,strGrossTotal,strUnitsLoaded,strUnitNet,strUnitGross,u'')) if( Response_Code.getvalue() == 'S'): pass else: all_ok =False self.ErrorMessages += Full_coi+":"+Response_Message.getvalue() + " " self.ErrorCodes += Full_coi+":"+ Response_Code.getvalue()+ " " print Response_Message.getvalue() print Response_Code.getvalue() | if isBulk: pass strUnitsLoaded=u'1.000' strUnitNet = u'' strUnitGross = u'' strNetTotal = u'%.3f' % UnitsLoaded strGrossTotal = u'%.3f' % UnitsLoaded printlist( [Response_Message,Response_Code,CURR_CODE,DISPATCH_DATE,ORIGIN_TYPE,ORIGIN_LOCATION_CODE,ORIGIN_CODE, ORIGIN_DESCR,DESTINATION_LOCATION_CODE,DESTINATION_CODE,LTI_ID,LOADING_DATE,ORGANIZATION_ID,TRAN_TYPE_CODE,VEHICLE_REGISTRATION,MODETRANS_CODE, COMMENTS,PERSON_CODE,PERSON_OUC,CERTIFING_TITLE,TRANS_CONTRACTOR_CODE,SUPPLIER1_OUC,DRIVER_NAME,LICENSE,CURR_CONTAINER_NUMBER,settings.COMPAS_STATION, Full_coi,COMM_CATEGORY_CODE,COMM_CODE,PCKKCODE,ALLCODE,QUALITY,strNetTotal,strGrossTotal,strUnitsLoaded,strUnitNet,strUnitGross,empty]) cursor.callproc(u'write_waybill.dispatch',(Response_Message,Response_Code,CURR_CODE,DISPATCH_DATE,ORIGIN_TYPE,ORIGIN_LOCATION_CODE,ORIGIN_CODE, ORIGIN_DESCR,DESTINATION_LOCATION_CODE,DESTINATION_CODE,LTI_ID,LOADING_DATE,ORGANIZATION_ID,TRAN_TYPE_CODE,VEHICLE_REGISTRATION,MODETRANS_CODE, COMMENTS,PERSON_CODE,PERSON_OUC,CERTIFING_TITLE,TRANS_CONTRACTOR_CODE,SUPPLIER1_OUC,DRIVER_NAME,LICENSE,CURR_CONTAINER_NUMBER,settings.COMPAS_STATION, Full_coi,COMM_CATEGORY_CODE,COMM_CODE,PCKKCODE,ALLCODE,QUALITY,strNetTotal,strGrossTotal,strUnitsLoaded,strUnitNet,strUnitGross,u'')) if( Response_Code.getvalue() == 'S'): pass else: all_ok =False self.ErrorMessages += Full_coi+":"+Response_Message.getvalue() + " " self.ErrorCodes += Full_coi+":"+ Response_Code.getvalue()+ " " print Response_Message.getvalue() print Response_Code.getvalue() | def write_dispatch_waybill_compas(self,waybill_id): #try: db = cx_Oracle.Connection(self.ConnectionString) cursor = db.cursor() self.ErrorMessages = u'' self.ErrorCodes = u'' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybill.loadingdetail_set.select_related() LTI= lineItems[0].siNo dispatch_person = EpicPerson.objects.get(person_pk = the_waybill.dispatcherName) # make dispatch remarks:::: dispatch_remarks = the_waybill.dispatchRemarks CODE = the_waybill.waybillNumber DOCUMENT_CODE = u'wb' DISPATCH_DATE=unicode(the_waybill.dateOfDispatch.strftime("%Y%m%d")) ORIGIN_TYPE=LTI.ORIGIN_TYPE ORIGIN_LOCATION_CODE=LTI.ORIGIN_LOCATION_CODE ORIGIN_CODE=LTI.ORIGIN_WH_CODE ORIGIN_DESCR=u'' DESTINATION_LOCATION_CODE=LTI.DESTINATION_LOCATION_CODE DESTINATION_CODE=unicode(the_waybill.destinationWarehouse.ORG_CODE) PRO_ACTIVITY_CODE=u"" ACTIVITY_OUC=u"" LNDARRM_CODE=u"" LTI_ID=LTI.LTI_ID LOADING_DATE=unicode(the_waybill.dateOfLoading.strftime("%Y%m%d")) ORGANIZATION_ID=LTI.CONSEGNEE_CODE TRAN_TYPE_CODE=the_waybill.transactionType TRAN_TYPE_DESCR=the_waybill.transportVehicleRegistration MODETRANS_CODE=the_waybill.transportType COMMENTS= removeNonAsciiChars(dispatch_remarks) PERSON_CODE=dispatch_person.code PERSON_OUC=dispatch_person.org_unit_code CERTIFING_TITLE=dispatch_person.title TRANS_CONTRACTOR_CODE=LTI.TRANSPORT_CODE SUPPLIER1_OUC=LTI.TRANSPORT_OUC DRIVER_NAME=the_waybill.transportDriverName LICENSE=the_waybill.transportDriverLicenceID VEHICLE_REGISTRATION=the_waybill.transportVehicleRegistration TRAILER_PLATE=the_waybill.transportTrailerRegistration CONTAINER_NUMBER=the_waybill.containerOneNumber all_ok = True ## For each lineItems # check if is bulk isBulk = lineItems[0].siNo.isBulk() | a725ab4f31235e4d56f98acad31e3de83d373abc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12559/a725ab4f31235e4d56f98acad31e3de83d373abc/compas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
10739,
67,
1888,
17240,
67,
2919,
345,
12,
2890,
16,
1888,
17240,
67,
350,
4672,
468,
698,
30,
1319,
273,
9494,
67,
23601,
18,
1952,
12,
2890,
18,
1952,
780,
13,
3347,
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,
1045,
67,
10739,
67,
1888,
17240,
67,
2919,
345,
12,
2890,
16,
1888,
17240,
67,
350,
4672,
468,
698,
30,
1319,
273,
9494,
67,
23601,
18,
1952,
12,
2890,
18,
1952,
780,
13,
3347,
273,
... |
if key == 'allowedTypes' and isinstance(kwargs[key], types.ObjectType): | if key == 'allowedTypes' and isinstance(kwargs[key], types.TypeType): | def addOption(self, pos=-1, **kwargs): ''' Append an entry to the parameter specification list. Dictionary entries should be specified as keyword arguments such as ``longarg='option='``. More specifically, you can specify parameters ``arg``, ``longarg`` (required), ``label``, ``allowedTypes``, ``default`` (required), ``description``, ``validate``, ``chooseOneOf``, ``chooseFrom`` and ``separator``. This option will have a name specified by ``longarg`` (without optional trailing ``=``) and an initial default value specified by ``default``. | 6531c3fc06bd255a78557c1b5a395ce1613a09e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/6531c3fc06bd255a78557c1b5a395ce1613a09e3/simuOpt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12966,
12,
2890,
16,
949,
29711,
21,
16,
2826,
4333,
4672,
9163,
6181,
392,
1241,
358,
326,
1569,
7490,
666,
18,
16447,
3222,
1410,
506,
1269,
487,
4932,
1775,
4123,
487,
12176,
5748,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12966,
12,
2890,
16,
949,
29711,
21,
16,
2826,
4333,
4672,
9163,
6181,
392,
1241,
358,
326,
1569,
7490,
666,
18,
16447,
3222,
1410,
506,
1269,
487,
4932,
1775,
4123,
487,
12176,
5748,
31... |
self.hboxlayout18.addWidget(self.textLabel1_3_2_2) | self.hboxlayout21.addWidget(self.textLabel1_3_2_2) | def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,609,642).size()).expandedTo(UserPrefsDialog.minimumSizeHint())) | 30deb2219e016847d91b37e801c50b75fbd1c3cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/30deb2219e016847d91b37e801c50b75fbd1c3cf/UserPrefsDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
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,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
18,... |
name="index.html" template="%s" permission="zope.Public" for="zope.app.component.tests.views.IC" /> """ % path | name="index.html" template="%s" permission="zope.Public" for="zope.app.component.tests.views.IC" /> ''' % path | def testProtectedtemplate(self): | 1cfc7ddd1cac0110cca3e909215477e1c59bbca3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9523/1cfc7ddd1cac0110cca3e909215477e1c59bbca3/test_directives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
15933,
3202,
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,
... | [
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,
1842,
15933,
3202,
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,
... |
raise BuilderError("Cannot have any other activities if the `unknown' activity is specified") | raise BuilderError("Cannot have any other moods if the `unknown' mood is specified") | def _build_element(self, element, nsmap): values = self.values if 'unknown' in values and len(values) > 1: raise BuilderError("Cannot have any other activities if the `unknown' activity is specified") for note in self.notes: note.to_element(parent=element, nsmap=nsmap) XMLMultipleChoiceElement._build_element(self, element, nsmap) | ba0ceb4aa7ddb546d08e131174346c7c20bb8f6d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5703/ba0ceb4aa7ddb546d08e131174346c7c20bb8f6d/rpid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
67,
2956,
12,
2890,
16,
930,
16,
3153,
1458,
4672,
924,
273,
365,
18,
2372,
309,
296,
8172,
11,
316,
924,
471,
562,
12,
2372,
13,
405,
404,
30,
1002,
5008,
668,
2932,
4515... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
2956,
12,
2890,
16,
930,
16,
3153,
1458,
4672,
924,
273,
365,
18,
2372,
309,
296,
8172,
11,
316,
924,
471,
562,
12,
2372,
13,
405,
404,
30,
1002,
5008,
668,
2932,
4515... |
dir = f[0] | dir = convert_path(f[0]) | def run (self): self.mkpath(self.install_dir) for f in self.data_files: if type(f) == StringType: # it's a simple file, so copy it if self.warn_dir: self.warn("setup script did not provide a directory for " "'%s' -- installing right in '%s'" % (f, self.install_dir)) (out, _) = self.copy_file(f, self.install_dir) self.outfiles.append(out) else: # it's a tuple with path to install to and a list of files dir = f[0] if not os.path.isabs(dir): dir = os.path.join(self.install_dir, dir) elif self.root: dir = change_root(self.root, dir) self.mkpath(dir) for data in f[1]: (out, _) = self.copy_file(data, dir) self.outfiles.append(out) | bd19d839d25ef41f08709589134bfe9a88571e52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bd19d839d25ef41f08709589134bfe9a88571e52/install_data.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
365,
18,
24816,
803,
12,
2890,
18,
5425,
67,
1214,
13,
364,
284,
316,
365,
18,
892,
67,
2354,
30,
309,
618,
12,
74,
13,
422,
31570,
30,
468,
518,
1807,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
261,
2890,
4672,
365,
18,
24816,
803,
12,
2890,
18,
5425,
67,
1214,
13,
364,
284,
316,
365,
18,
892,
67,
2354,
30,
309,
618,
12,
74,
13,
422,
31570,
30,
468,
518,
1807,
279,
... |
def wmfactory_description(self): | def wmfactory_description(self, request): | def wmfactory_description(self): return str(self.desc) | 1f9b14db77842d9b235b6a5df945c6bf6a18c561 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1f9b14db77842d9b235b6a5df945c6bf6a18c561/form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18200,
6848,
67,
3384,
12,
2890,
16,
590,
4672,
327,
609,
12,
2890,
18,
5569,
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,
... | [
1,
1,
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,
18200,
6848,
67,
3384,
12,
2890,
16,
590,
4672,
327,
609,
12,
2890,
18,
5569,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
... >>> print x/0 | ... >>> print x//0 | >>> def f(x): | 1c5bc1c9d7a4a0d0670565bc03dd9354f9fe2fe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1c5bc1c9d7a4a0d0670565bc03dd9354f9fe2fe5/test_doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
284,
12,
92,
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,
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,
4080,
1652,
284,
12,
92,
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,
-100... |
(fw+fx+fy+fz,(fw,fx,fy,fz),(fwv,fxv,fyv,fzv),1,fwv+fxv+fyv+fzv,'float32'), ((fw+fx)+(fy+fz),(fw,fx,fy,fz),(fwv,fxv,fyv,fzv),1,fwv+fxv+fyv+fzv,'float32'), | (fw+fx+fy+fz,(fw,fx,fy,fz),(fwv,fxv,fyv,fzv),1,fwv+fxv+fyv+fzv,'float32'), ((fw+fx)+(fy+fz),(fw,fx,fy,fz),(fwv,fxv,fyv,fzv),1,fwv+fxv+fyv+fzv,'float32'), | def my_init(shp, dtype='float64', num=0): #ret = theano._asarray(numpy.random.rand(*shp),dtype=dtype) ret = numpy.zeros(shp, dtype=dtype)+num return ret | 2ad632716275d2ff65c4d7210a480fc8166f0ecd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/2ad632716275d2ff65c4d7210a480fc8166f0ecd/test_opt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
67,
2738,
12,
674,
84,
16,
3182,
2218,
5659,
1105,
2187,
818,
33,
20,
4672,
468,
1349,
273,
326,
31922,
6315,
345,
1126,
12,
15974,
18,
9188,
18,
7884,
30857,
674,
84,
3631,
8972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
67,
2738,
12,
674,
84,
16,
3182,
2218,
5659,
1105,
2187,
818,
33,
20,
4672,
468,
1349,
273,
326,
31922,
6315,
345,
1126,
12,
15974,
18,
9188,
18,
7884,
30857,
674,
84,
3631,
8972... |
firstLineIndent = -epsilon, leftIndent = 0*delta + epsilon) levelOneParaStyle = \ ParagraphStyle(name='LevelOne', parent = levelZeroParaStyle, leading=11, firstLineIndent = -epsilon, leftIndent = 1*delta + epsilon) levelTwoParaStyle = \ ParagraphStyle(name='LevelTwo', parent = levelOneParaStyle, leading=11, firstLineIndent = -epsilon, leftIndent = 2*delta + epsilon) levelThreeParaStyle = \ ParagraphStyle(name='LevelThree', parent = levelTwoParaStyle, leading=11, firstLineIndent = -epsilon, leftIndent = 3*delta + epsilon) levelFourParaStyle = \ ParagraphStyle(name='LevelFour', parent = levelTwoParaStyle, leading=11, firstLineIndent = -epsilon, leftIndent = 4*delta + epsilon) | firstLineIndent = x*delta, leftIndent = x*delta + epsilon) defaultLevelStyles.append(s) | def add(self,x): if x not in self: list.append(self,x) | d97e82cb7278382d065be008ee571313be90209b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/d97e82cb7278382d065be008ee571313be90209b/tableofcontents.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
92,
4672,
309,
619,
486,
316,
365,
30,
666,
18,
6923,
12,
2890,
16,
92,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
92,
4672,
309,
619,
486,
316,
365,
30,
666,
18,
6923,
12,
2890,
16,
92,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for j in range(3): k = f.v[j].index | for j, v in enumerate(f.v): k = v.index | def file_callback(filename): if not filename.lower().endswith('.ctm'): filename += '.ctm' # Get object mesh from the selected object scn = bpy.data.scenes.active ob = scn.objects.active if not ob: Blender.Draw.PupMenu('Error%t|Select 1 active object') return mesh = BPyMesh.getMeshFromObject(ob, None, False, False, scn) if not mesh: Blender.Draw.PupMenu('Error%t|Could not get mesh data from active object') return # Check which mesh properties are present... hasVertexUV = mesh.vertexUV or mesh.faceUV hasVertexColors = mesh.vertexColors # Show a GUI for the export settings pupBlock = [] EXPORT_APPLY_MODIFIERS = Draw.Create(1) pupBlock.append(('Apply Modifiers', EXPORT_APPLY_MODIFIERS, 'Use transformed mesh data.')) EXPORT_NORMALS = Draw.Create(1) pupBlock.append(('Normals', EXPORT_NORMALS, 'Export vertex normal data.')) if hasVertexUV: EXPORT_UV = Draw.Create(1) pupBlock.append(('UVs', EXPORT_UV, 'Export texface UV coords.')) if hasVertexColors: EXPORT_COLORS = Draw.Create(1) pupBlock.append(('Colors', EXPORT_COLORS, 'Export vertex Colors.')) EXPORT_MG2 = Draw.Create(0) pupBlock.append(('Fixed Point', EXPORT_MG2, 'Use limited precision algorithm (MG2 method = better compression).')) if not Draw.PupBlock('Export...', pupBlock): return # Adjust export settings according to GUI selections EXPORT_APPLY_MODIFIERS = EXPORT_APPLY_MODIFIERS.val EXPORT_NORMALS = EXPORT_NORMALS.val if hasVertexUV: EXPORT_UV = EXPORT_UV.val else: EXPORT_UV = False if hasVertexColors: EXPORT_COLORS = EXPORT_COLORS.val else: EXPORT_COLORS = False EXPORT_MG2 = EXPORT_MG2.val is_editmode = Blender.Window.EditMode() if is_editmode: Blender.Window.EditMode(0, '', 0) Window.WaitCursor(1) try: # Get the mesh, again, if we wanted modifiers (from GUI selection) if EXPORT_APPLY_MODIFIERS: mesh = BPyMesh.getMeshFromObject(ob, None, EXPORT_APPLY_MODIFIERS, False, scn) if not mesh: Blender.Draw.PupMenu('Error%t|Could not get mesh data from active object') return mesh.transform(ob.matrixWorld, True) # Count triangles (quads count as two triangles) triangleCount = 0 for f in mesh.faces: if len(f.v) == 4: triangleCount += 2 else: triangleCount += 1 # Extract indices from the Blender mesh (quads are split into two triangles) pindices = cast((c_int * 3 * triangleCount)(), POINTER(c_int)) i = 0 for f in mesh.faces: pindices[i] = c_int(f.v[0].index) pindices[i + 1] = c_int(f.v[1].index) pindices[i + 2] = c_int(f.v[2].index) i += 3 if len(f.v) == 4: pindices[i] = c_int(f.v[0].index) pindices[i + 1] = c_int(f.v[2].index) pindices[i + 2] = c_int(f.v[3].index) i += 3 # Extract vertex array from the Blender mesh vertexCount = len(mesh.verts) pvertices = cast((c_float * 3 * vertexCount)(), POINTER(c_float)) i = 0 for v in mesh.verts: pvertices[i] = c_float(v.co.x) pvertices[i + 1] = c_float(v.co.y) pvertices[i + 2] = c_float(v.co.z) i += 3 # Extract normals if EXPORT_NORMALS: pnormals = cast((c_float * 3 * vertexCount)(), POINTER(c_float)) i = 0 for v in mesh.verts: pnormals[i] = c_float(v.no.x) pnormals[i + 1] = c_float(v.no.y) pnormals[i + 2] = c_float(v.no.z) i += 3 else: pnormals = POINTER(c_float)() # Extract UVs if EXPORT_UV: ptexCoords = cast((c_float * 2 * vertexCount)(), POINTER(c_float)) if mesh.faceUV: for f in mesh.faces: for j in range(3): k = f.v[j].index if k < vertexCount: uv = f.uv[j] ptexCoords[k * 2] = uv[0] ptexCoords[k * 2 + 1] = uv[1] else: i = 0 for v in mesh.verts: ptexCoords[i] = c_float(v.uvco[0]) ptexCoords[i + 1] = c_float(v.uvco[1]) i += 2 else: ptexCoords = POINTER(c_float)() # Extract colors if EXPORT_COLORS: pcolors = cast((c_float * 4 * vertexCount)(), POINTER(c_float)) for f in mesh.faces: for j in range(3): k = f.v[j].index if k < vertexCount: col = f.col[j] pcolors[k * 4] = col.r / 256.0 pcolors[k * 4 + 1] = col.g / 256.0 pcolors[k * 4 + 2] = col.b / 256.0 pcolors[k * 4 + 3] = 1.0 else: pcolors = POINTER(c_float)() # Load the OpenCTM shared library if os.name == 'nt': libHDL = WinDLL('openctm.dll') else: libName = find_library('openctm') if not libName: Blender.Draw.PupMenu('Could not find the OpenCTM shared library') return libHDL = CDLL(libName) if not libHDL: Blender.Draw.PupMenu('Could not open the OpenCTM shared library') return # Get all the functions from the shared library that we need ctmNewContext = libHDL.ctmNewContext ctmNewContext.argtypes = [c_int] ctmNewContext.restype = c_void_p ctmFreeContext = libHDL.ctmFreeContext ctmFreeContext.argtypes = [c_void_p] ctmDefineMesh = libHDL.ctmDefineMesh ctmDefineMesh.argtypes = [c_void_p, POINTER(c_float), c_int, POINTER(c_int), c_int, POINTER(c_float)] ctmSave = libHDL.ctmSave ctmSave.argtypes = [c_void_p, c_char_p] ctmAddTexMap = libHDL.ctmAddTexMap ctmAddTexMap.argtypes = [c_void_p, POINTER(c_float), c_char_p] ctmAddTexMap.restype = c_int ctmAddAttribMap = libHDL.ctmAddAttribMap ctmAddAttribMap.argtypes = [c_void_p, POINTER(c_float), c_char_p] ctmAddAttribMap.restype = c_int ctmCompressionMethod = libHDL.ctmCompressionMethod ctmCompressionMethod.argtypes = [c_void_p, c_int] ctmVertexPrecisionRel = libHDL.ctmVertexPrecisionRel ctmVertexPrecisionRel.argtypes = [c_void_p, c_float] # Create an OpenCTM context ctm = ctmNewContext(0x0102) try: # Define the mesh ctmDefineMesh(ctm, pvertices, c_int(vertexCount), pindices, c_int(triangleCount), pnormals) # Add texture coordinates? if EXPORT_UV: ctmAddTexMap(ctm, ptexCoords, c_char_p("Pigment")) # Add colors? if EXPORT_COLORS: ctmAddAttribMap(ctm, pcolors, c_char_p("Colors")) # Set compression method if EXPORT_MG2: ctmCompressionMethod(ctm, 0x0203) ctmVertexPrecisionRel(ctm, 0.01) else: ctmCompressionMethod(ctm, 0x0202) # Save the file ctmSave(ctm, c_char_p(filename)) finally: # Free the OpenCTM context ctmFreeContext(ctm) finally: Window.WaitCursor(0) if is_editmode: Blender.Window.EditMode(1, '', 0) | 3587580bf5c2db8cbc8d00035e389ad054d696e8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11511/3587580bf5c2db8cbc8d00035e389ad054d696e8/openctm_export.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
67,
3394,
12,
3459,
4672,
225,
309,
486,
1544,
18,
8167,
7675,
5839,
1918,
2668,
18,
299,
81,
11,
4672,
1544,
1011,
2418,
299,
81,
11,
225,
468,
968,
733,
6986,
628,
326,
3170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
67,
3394,
12,
3459,
4672,
225,
309,
486,
1544,
18,
8167,
7675,
5839,
1918,
2668,
18,
299,
81,
11,
4672,
1544,
1011,
2418,
299,
81,
11,
225,
468,
968,
733,
6986,
628,
326,
3170,
... |
@match(r'^\s*(?:please\s+)?(tell|pm|privmsg|msg|ask|remind)' | @match(r'^\s*(?:please\s+)?(tell|pm|privmsg|msg|ask)' | def __init__(self, from_id, to_id, memo, private=False): self.from_id = from_id self.to_id = to_id self.memo = memo self.private = private self.delivered = False self.time = datetime.utcnow() | c38358a69a574495233e12ec0a3aa82eaff27376 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12048/c38358a69a574495233e12ec0a3aa82eaff27376/memo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
628,
67,
350,
16,
358,
67,
350,
16,
11063,
16,
3238,
33,
8381,
4672,
365,
18,
2080,
67,
350,
273,
628,
67,
350,
365,
18,
869,
67,
350,
273,
358,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
628,
67,
350,
16,
358,
67,
350,
16,
11063,
16,
3238,
33,
8381,
4672,
365,
18,
2080,
67,
350,
273,
628,
67,
350,
365,
18,
869,
67,
350,
273,
358,
67,
... |
if x[0] == 'string' or x[0] == 'symbol': | if x and (x[0] == 'string' or x[0] == 'symbol'): | def getstring(x, err): if x[0] == 'string' or x[0] == 'symbol': return x[1] raise error.ParseError(err) | 3de03448cbc2250eda25d6fe0ab01b0973319f0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/3de03448cbc2250eda25d6fe0ab01b0973319f0c/revset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1080,
12,
92,
16,
393,
4672,
309,
619,
471,
261,
92,
63,
20,
65,
422,
296,
1080,
11,
578,
619,
63,
20,
65,
422,
296,
7175,
11,
4672,
327,
619,
63,
21,
65,
1002,
555,
18,
210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1080,
12,
92,
16,
393,
4672,
309,
619,
471,
261,
92,
63,
20,
65,
422,
296,
1080,
11,
578,
619,
63,
20,
65,
422,
296,
7175,
11,
4672,
327,
619,
63,
21,
65,
1002,
555,
18,
210... |
default style of "polymorphic" loading, that is, which tables are queried at once. <classes> is any single or list of mappers and/or classes indicating the inherited classes that should be loaded at once. The special value ``'*'`` may be used to indicate all descending classes should be loaded immediately. The second tuple argument <selectable> indicates a selectable that will be used to query for multiple classes. Normally, it is left as None, in which case this mapper will form an outer join from the base mapper's table to that of all desired sub-mappers. When specified, it provides the selectable to be used for polymorphic loading. When with_polymorphic includes mappers which load from a "concrete" inheriting table, the <selectable> argument is required, since it usually requires more complex UNION queries. | default style of "polymorphic" loading, that is, which tables are queried at once. <classes> is any single or list of mappers and/or classes indicating the inherited classes that should be loaded at once. The special value ``'*'`` may be used to indicate all descending classes should be loaded immediately. The second tuple argument <selectable> indicates a selectable that will be used to query for multiple classes. Normally, it is left as None, in which case this mapper will form an outer join from the base mapper's table to that of all desired sub-mappers. When specified, it provides the selectable to be used for polymorphic loading. When with_polymorphic includes mappers which load from a "concrete" inheriting table, the <selectable> argument is required, since it usually requires more complex UNION queries. | def mapper(class_, local_table=None, *args, **params): """Return a new [sqlalchemy.orm#Mapper] object. class\_ The class to be mapped. local_table The table to which the class is mapped, or None if this mapper inherits from another mapper using concrete table inheritance. entity_name A name to be associated with the `class`, to allow alternate mappings for a single class. always_refresh If True, all query operations for this mapped class will overwrite all data within object instances that already exist within the session, erasing any in-memory changes with whatever information was loaded from the database. Usage of this flag is highly discouraged; as an alternative, see the method `populate_existing()` on [sqlalchemy.orm.query#Query]. allow_column_override If True, allows the usage of a ``relation()`` which has the same name as a column in the mapped table. The table column will no longer be mapped. allow_null_pks Indicates that composite primary keys where one or more (but not all) columns contain NULL is a valid primary key. Primary keys which contain NULL values usually indicate that a result row does not contain an entity and should be skipped. batch Indicates that save operations of multiple entities can be batched together for efficiency. setting to False indicates that an instance will be fully saved before saving the next instance, which includes inserting/updating all table rows corresponding to the entity as well as calling all ``MapperExtension`` methods corresponding to the save operation. column_prefix A string which will be prepended to the `key` name of all Columns when creating column-based properties from the given Table. Does not affect explicitly specified column-based properties concrete If True, indicates this mapper should use concrete table inheritance with its parent mapper. extension A [sqlalchemy.orm#MapperExtension] instance or list of ``MapperExtension`` instances which will be applied to all operations by this ``Mapper``. inherits Another ``Mapper`` for which this ``Mapper`` will have an inheritance relationship with. inherit_condition For joined table inheritance, a SQL expression (constructed ``ClauseElement``) which will define how the two tables are joined; defaults to a natural join between the two tables. inherit_foreign_keys when inherit_condition is used and the condition contains no ForeignKey columns, specify the "foreign" columns of the join condition in this list. else leave as None. order_by A single ``Column`` or list of ``Columns`` for which selection operations should use as the default ordering for entities. Defaults to the OID/ROWID of the table if any, or the first primary key column of the table. non_primary Construct a ``Mapper`` that will define only the selection of instances, not their persistence. Any number of non_primary mappers may be created for a particular class. polymorphic_on Used with mappers in an inheritance relationship, a ``Column`` which will identify the class/mapper combination to be used with a particular row. Requires the ``polymorphic_identity`` value to be set for all mappers in the inheritance hierarchy. The column specified by ``polymorphic_on`` is usually a column that resides directly within the base mapper's mapped table; alternatively, it may be a column that is only present within the <selectable> portion of the ``with_polymorphic`` argument. _polymorphic_map Used internally to propagate the full map of polymorphic identifiers to surrogate mappers. polymorphic_identity A value which will be stored in the Column denoted by polymorphic_on, corresponding to the *class identity* of this mapper. polymorphic_fetch specifies how subclasses mapped through joined-table inheritance will be fetched. options are 'union', 'select', and 'deferred'. if the 'with_polymorphic' argument is present, defaults to 'union', otherwise defaults to 'select'. properties A dictionary mapping the string names of object attributes to ``MapperProperty`` instances, which define the persistence behavior of that attribute. Note that the columns in the mapped table are automatically converted into ``ColumnProperty`` instances based on the `key` property of each ``Column`` (although they can be overridden using this dictionary). include_properties An inclusive list of properties to map. Columns present in the mapped table but not present in this list will not be automatically converted into properties. exclude_properties A list of properties not to map. Columns present in the mapped table and present in this list will not be automatically converted into properties. Note that neither this option nor include_properties will allow an end-run around Python inheritance. If mapped class ``B`` inherits from mapped class ``A``, no combination of includes or excludes will allow ``B`` to have fewer properties than its superclass, ``A``. primary_key A list of ``Column`` objects which define the *primary key* to be used against this mapper's selectable unit. This is normally simply the primary key of the `local_table`, but can be overridden here. with_polymorphic A tuple in the form ``(<classes>, <selectable>)`` indicating the default style of "polymorphic" loading, that is, which tables are queried at once. <classes> is any single or list of mappers and/or classes indicating the inherited classes that should be loaded at once. The special value ``'*'`` may be used to indicate all descending classes should be loaded immediately. The second tuple argument <selectable> indicates a selectable that will be used to query for multiple classes. Normally, it is left as None, in which case this mapper will form an outer join from the base mapper's table to that of all desired sub-mappers. When specified, it provides the selectable to be used for polymorphic loading. When with_polymorphic includes mappers which load from a "concrete" inheriting table, the <selectable> argument is required, since it usually requires more complex UNION queries. select_table Deprecated. Synonymous with ``with_polymorphic=('*', <selectable>)``. version_id_col A ``Column`` which must have an integer type that will be used to keep a running *version id* of mapped entities in the database. this is used during save operations to ensure that no other thread or process has updated the instance during the lifetime of the entity, else a ``ConcurrentModificationError`` exception is thrown. """ return Mapper(class_, local_table, *args, **params) | 8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5815,
12,
1106,
67,
16,
1191,
67,
2121,
33,
7036,
16,
380,
1968,
16,
2826,
2010,
4672,
3536,
990,
279,
394,
306,
4669,
24182,
18,
535,
7,
4597,
65,
733,
18,
225,
667,
64,
67,
1021,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5815,
12,
1106,
67,
16,
1191,
67,
2121,
33,
7036,
16,
380,
1968,
16,
2826,
2010,
4672,
3536,
990,
279,
394,
306,
4669,
24182,
18,
535,
7,
4597,
65,
733,
18,
225,
667,
64,
67,
1021,
... |
print "FAIL" | print "FAIL"; failures = failures + 1 | def __eq__(self, other): if isinstance(other, FooStruct): return self.bar == other.bar return 0 | 14105f5c7b7349c63655b5a3c3785fe12d84aa68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11935/14105f5c7b7349c63655b5a3c3785fe12d84aa68/memcache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
23077,
3823,
4672,
327,
365,
18,
3215,
422,
1308,
18,
3215,
327,
374,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
23077,
3823,
4672,
327,
365,
18,
3215,
422,
1308,
18,
3215,
327,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
or (type(uSymbol)==ClassType and issubclass(uSymbol,Widget)) | or (type(x)==ClassType and issubclass(x,Widget)) | def test(self,x): return callable(x) or isinstance(x,Marker) or isinstance(x,Flag) \ or (type(uSymbol)==ClassType and issubclass(uSymbol,Widget)) | 565e8db0942d39b3ade10fd450e16582bc3f51f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/565e8db0942d39b3ade10fd450e16582bc3f51f0/markers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
16,
92,
4672,
327,
4140,
12,
92,
13,
578,
1549,
12,
92,
16,
7078,
13,
578,
1549,
12,
92,
16,
4678,
13,
521,
578,
261,
723,
12,
89,
5335,
13,
631,
18328,
471,
14664,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
16,
92,
4672,
327,
4140,
12,
92,
13,
578,
1549,
12,
92,
16,
7078,
13,
578,
1549,
12,
92,
16,
4678,
13,
521,
578,
261,
723,
12,
89,
5335,
13,
631,
18328,
471,
14664,... |
_DATE_ADDED_FIELD = ' 961__x:' _DATE_UPDATED_FIELD = ' 961__c:' _DATE_FIELD = ' 269__c:' | _DATE_ADDED_FIELD = '961__x:' _DATE_UPDATED_FIELD = '961__c:' _DATE_FIELD = '269__c:' | def __init__(self, message): """Initialization.""" self.message = message | 855acf1f403f93dbc03543809cdbbd3d0c4c46af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/855acf1f403f93dbc03543809cdbbd3d0c4c46af/search_engine_query_parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
883,
4672,
3536,
17701,
12123,
365,
18,
2150,
273,
883,
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,
1001,
2738,
972,
12,
2890,
16,
883,
4672,
3536,
17701,
12123,
365,
18,
2150,
273,
883,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
except SkipTest as e: | except unittest.SkipTest as e: | def test_main(): tests = [ TestMiscellaneous, TestEnUSNumberFormatting, TestCNumberFormatting, TestFrFRNumberFormatting, ] # SkipTest can't be raised inside unittests, handle it manually instead try: get_enUS_locale() except SkipTest as e: if verbose: print "Some tests will be disabled: %s" % e else: tests += [TestNumberFormatting, TestStringMethods] run_unittest(*tests) | 43d460b70def7f16af8ea6b29dbccd189ec463e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/43d460b70def7f16af8ea6b29dbccd189ec463e3/test_locale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
7434,
273,
306,
7766,
11729,
3855,
15522,
16,
7766,
664,
3378,
1854,
23974,
16,
7766,
39,
1854,
23974,
16,
7766,
7167,
9981,
1854,
23974,
16,
308,
468,
6611,
4709,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5254,
13332,
7434,
273,
306,
7766,
11729,
3855,
15522,
16,
7766,
664,
3378,
1854,
23974,
16,
7766,
39,
1854,
23974,
16,
7766,
7167,
9981,
1854,
23974,
16,
308,
468,
6611,
4709,
... |
if not control.tests_running(): | if do_tests and not control.tests_running(): | def torbel_start(): log.info("TorBEL v%s starting.", __version__) # Configuration check. try: config_check() except ConfigurationError, e: log.error("Configuration error: %s", e.message) return 1 except AttributeError, e: log.error("Configuration error: missing value: %s", e.args[0]) try: control = Controller() if not "notests" in sys.argv: control.init_tests() control.start() control.run_tests() else: control.start() sighandler.controller = control signal.signal(signal.SIGUSR1, sighandler) signal.signal(signal.SIGUSR2, sighandler) except socket.error, e: if "Connection refused" in e.args: log.error("Connection refused! Is Tor control port available?") log.error("Socket error, aborting (%s).", e.args) return 1 except TorCtl.ErrorReply, e: log.error("Connection failed: %s", str(e)) return 2 control.export_csv(gzip = config.csv_gzip) # Sleep this thread (for now) while events come in on a separate # thread. Close on SIGINT. try: while True: time.sleep(10) if not control.tests_running(): log.error("Testing has failed. Aborting.") control.close() sys.exit(1) except KeyboardInterrupt: control.close() return 0 | a58c20dc87f7519ed011033c6d68780505f79e23 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/a58c20dc87f7519ed011033c6d68780505f79e23/torbel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8934,
13285,
67,
1937,
13332,
613,
18,
1376,
2932,
27266,
38,
2247,
331,
9,
87,
5023,
1199,
16,
1001,
1589,
972,
13,
225,
468,
4659,
866,
18,
775,
30,
642,
67,
1893,
1435,
1335,
27507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8934,
13285,
67,
1937,
13332,
613,
18,
1376,
2932,
27266,
38,
2247,
331,
9,
87,
5023,
1199,
16,
1001,
1589,
972,
13,
225,
468,
4659,
866,
18,
775,
30,
642,
67,
1893,
1435,
1335,
27507,... |
except KeyboardInterrupt, e: | except (KeyboardInterrupt, IOError): | def getPassword(self, prompt = None): if not prompt: prompt = "%s@%s's password: " % (self.user, self.transport.transport.getPeer().host) try: oldout, oldin = sys.stdout, sys.stdin sys.stdin = sys.stdout = open('/dev/tty','r+') p=getpass.getpass(prompt) sys.stdout,sys.stdin=oldout,oldin return defer.succeed(p) except KeyboardInterrupt, e: print return defer.fail(ConchError('PEBKAC')) | 3516b3f100dfdd1e6f30c9adbd234b19899bfb0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3516b3f100dfdd1e6f30c9adbd234b19899bfb0b/default.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17397,
12,
2890,
16,
6866,
273,
599,
4672,
309,
486,
6866,
30,
6866,
273,
2213,
87,
36,
9,
87,
1807,
2201,
30,
315,
738,
261,
2890,
18,
1355,
16,
365,
18,
13049,
18,
13049,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17397,
12,
2890,
16,
6866,
273,
599,
4672,
309,
486,
6866,
30,
6866,
273,
2213,
87,
36,
9,
87,
1807,
2201,
30,
315,
738,
261,
2890,
18,
1355,
16,
365,
18,
13049,
18,
13049,
18,
588,
... |
self.failUnless(_approx_eq(z_after, z), (z_orig, z_after, z, z_after - z)) | self.failUnless(_approx_eq(z_after, tz.value), (z_orig, z_after, z, z_after - z)) | def t(z,x,y,a=1.0, b=0.0,l='c|py',dt='float64'): z,a,x,y,b = [theano._asarray(p,dtype=dt) for p in z,a,x,y,b] z_orig = z.copy() z_after = self._gemm(z, a, x, y, b) | 3d5a37e5704efd513ce68d27b4ab0647f4c9548f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/3d5a37e5704efd513ce68d27b4ab0647f4c9548f/test_blas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
12,
94,
16,
92,
16,
93,
16,
69,
33,
21,
18,
20,
16,
324,
33,
20,
18,
20,
16,
80,
2218,
71,
96,
2074,
2187,
7510,
2218,
5659,
1105,
11,
4672,
998,
16,
69,
16,
92,
16,
93,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
12,
94,
16,
92,
16,
93,
16,
69,
33,
21,
18,
20,
16,
324,
33,
20,
18,
20,
16,
80,
2218,
71,
96,
2074,
2187,
7510,
2218,
5659,
1105,
11,
4672,
998,
16,
69,
16,
92,
16,
93,
... |
self.watcherThread.start() | self.watcherThread.CreateThread() | def __init__(self, template): self.bAutoReload = GetEditorOption("Auto Reload", 1) self.bDeclinedReload = 0 # Has the user declined to reload. self.fileStat = None self.bReportedFileNotFound = 0 | fa6cea9953bd692f4d83b7fb00bab8aabdb503fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/fa6cea9953bd692f4d83b7fb00bab8aabdb503fa/document.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1542,
4672,
365,
18,
70,
4965,
13013,
273,
968,
6946,
1895,
2932,
4965,
23086,
3113,
404,
13,
365,
18,
70,
3456,
1920,
13013,
273,
374,
468,
4393,
326,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1542,
4672,
365,
18,
70,
4965,
13013,
273,
968,
6946,
1895,
2932,
4965,
23086,
3113,
404,
13,
365,
18,
70,
3456,
1920,
13013,
273,
374,
468,
4393,
326,
7... |
cvsdir = os.path.join(path, "CVS") if os.path.isdir(cvsdir): rev = GetCVSRevision(file) root = GetCVSRoot(file) if rev is not None and root is not None: if srcdir is not None: file = os.path.normpath(file) if file.lower().startswith(srcdir.lower()): file = file[len(srcdir):] (head, tail) = os.path.split(srcdir) if tail == "": tail = os.path.basename(head) file = tail + file file = file.replace("\\", "/") return "cvs:%s:%s:%s" % (root, file, rev) file = file.replace("\\", "/") return file | fileInfo = None if file in vcsFileInfoCache: fileInfo = vcsFileInfoCache[file] else: if os.path.isdir(os.path.join(path, "CVS")): fileInfo = CVSFileInfo(file, srcdir) elif os.path.isdir(os.path.join(path, ".svn")) or \ os.path.isdir(os.path.join(path, "_svn")): fileInfo = SVNFileInfo(file); vcsFileInfoCache[file] = fileInfo if fileInfo: file = fileInfo.filename return file.replace("\\", "/") | def GetVCSFilename(file, srcdir): """Given a full path to a file, and the top source directory, look for version control information about this file, and return a specially formatted filename that contains the VCS type, VCS location, relative filename, and revision number, formatted like: vcs:vcs location:filename:revision For example: cvs:cvs.mozilla.org/cvsroot:mozilla/browser/app/nsBrowserApp.cpp:1.36""" (path, filename) = os.path.split(file) if path == '' or filename == '': return file cvsdir = os.path.join(path, "CVS") if os.path.isdir(cvsdir): rev = GetCVSRevision(file) root = GetCVSRoot(file) if rev is not None and root is not None: if srcdir is not None: # strip the base path off # but we actually want the last dir in srcdir file = os.path.normpath(file) # the lower() is to handle win32+vc8, where # the source filenames come out all lowercase, # but the srcdir can be mixed case if file.lower().startswith(srcdir.lower()): file = file[len(srcdir):] (head, tail) = os.path.split(srcdir) if tail == "": tail = os.path.basename(head) file = tail + file # we want forward slashes on win32 paths file = file.replace("\\", "/") return "cvs:%s:%s:%s" % (root, file, rev) file = file.replace("\\", "/") return file | 65c8b64deb53f31755237025916365ad86052f3d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11102/65c8b64deb53f31755237025916365ad86052f3d/symbolstore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
58,
4596,
5359,
12,
768,
16,
1705,
1214,
4672,
3536,
6083,
279,
1983,
589,
358,
279,
585,
16,
471,
326,
1760,
1084,
1867,
16,
2324,
364,
1177,
3325,
1779,
2973,
333,
585,
16,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
58,
4596,
5359,
12,
768,
16,
1705,
1214,
4672,
3536,
6083,
279,
1983,
589,
358,
279,
585,
16,
471,
326,
1760,
1084,
1867,
16,
2324,
364,
1177,
3325,
1779,
2973,
333,
585,
16,
471,... |
self.assert_(self._box.get_string(key0) == \ self._template % 'changed 0') | self.assertEqual(self._box.get_string(key0), self._template % 'changed 0') | def test_set_item(self): # Modify messages using __setitem__() key0 = self._box.add(self._template % 'original 0') self.assert_(self._box.get_string(key0) == \ self._template % 'original 0') key1 = self._box.add(self._template % 'original 1') self.assert_(self._box.get_string(key1) == \ self._template % 'original 1') self._box[key0] = self._template % 'changed 0' self.assert_(self._box.get_string(key0) == \ self._template % 'changed 0') self._box[key1] = self._template % 'changed 1' self.assert_(self._box.get_string(key1) == \ self._template % 'changed 1') self._box[key0] = _sample_message self._check_sample(self._box[key0]) self._box[key1] = self._box[key0] self._check_sample(self._box[key1]) self._box[key0] = self._template % 'original 0' self.assert_(self._box.get_string(key0) == self._template % 'original 0') self._check_sample(self._box[key1]) self.assertRaises(KeyError, lambda: self._box.__setitem__('foo', 'bar')) self.assertRaises(KeyError, lambda: self._box['foo']) self.assertEqual(len(self._box), 2) | ea8344797e1a0ebd0b419ce14e16ab25af771fcc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/ea8344797e1a0ebd0b419ce14e16ab25af771fcc/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
542,
67,
1726,
12,
2890,
4672,
468,
9518,
2743,
1450,
1001,
542,
1726,
972,
1435,
498,
20,
273,
365,
6315,
2147,
18,
1289,
12,
2890,
6315,
3202,
738,
296,
8830,
374,
6134,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
542,
67,
1726,
12,
2890,
4672,
468,
9518,
2743,
1450,
1001,
542,
1726,
972,
1435,
498,
20,
273,
365,
6315,
2147,
18,
1289,
12,
2890,
6315,
3202,
738,
296,
8830,
374,
6134,
36... |
rc_entry = [ r'\converter latex wordhtml "%%" ""' ]) | rc_entry = [ r'\converter latex wordhtml "%%" ""' ]) | def checkProg(description, progs, rc_entry = [], path = [] ): ''' This function will search a program in $PATH plus given path If found, return directory and program name (not the options). description: description of the program progs: check programs, for each prog, the first word is used for searching but the whole string is used to replace %% for a rc_entry. So, feel free to add '$$i' etc for programs. path: additional path rc_entry: entry to outfile, can be emtpy, one pattern (%% for chosen prog or 'none'), or one for each prog and 'none'. NOTE: if you do not want 'none' entry to be added to the RC file, specify an entry for each prog and use '' for 'none' entry. FIXME: under windows, we should check registry instead of $PATH ''' # one rc entry for each progs plus none entry if len(rc_entry) > 1 and len(rc_entry) != len(progs) + 1: print "rc entry should have one item or item for each prog and none." sys.exit(2) print 'checking for ' + description + '...' ## print '(' + ','.join(progs) + ')', for idx in range(len(progs)): # ac_prog may have options, ac_word is the command name ac_prog = progs[idx] ac_word = ac_prog.split(' ')[0] print '+checking for "' + ac_word + '"... ', path = os.environ["PATH"].split(os.pathsep) + path for ac_dir in path: # check both ac_word and ac_word.exe (for windows system) if os.path.isfile( os.path.join(ac_dir, ac_word) ) or \ os.path.isfile( os.path.join(ac_dir, ac_word + ".exe") ): print ' yes' # write rc entries for this command if len(rc_entry) == 1: addToRC(rc_entry[0].replace('%%', ac_prog)) elif len(rc_entry) > 1: addToRC(rc_entry[idx].replace('%%', ac_prog)) return [ac_dir, ac_word] # if not successful print ' no' # write rc entries for 'not found' if len(rc_entry) > 0: # the last one. addToRC(rc_entry[-1].replace('%%', 'none')) return ['', 'none'] | 41dd4f0be3188829e0dccd1c1ec13e281f4fc00d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/41dd4f0be3188829e0dccd1c1ec13e281f4fc00d/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
626,
75,
12,
3384,
16,
450,
564,
16,
4519,
67,
4099,
273,
5378,
16,
589,
273,
5378,
262,
30,
9163,
1220,
445,
903,
1623,
279,
5402,
316,
271,
4211,
8737,
864,
589,
971,
1392,
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,
866,
626,
75,
12,
3384,
16,
450,
564,
16,
4519,
67,
4099,
273,
5378,
16,
589,
273,
5378,
262,
30,
9163,
1220,
445,
903,
1623,
279,
5402,
316,
271,
4211,
8737,
864,
589,
971,
1392,
16... |
if request.method == 'POST': return redirect('fieldofficer') else: fieldofficers = FieldOfficer.objects.order_by("-id")[offset:limit] if(fieldofficers): json_subcat = serializers.serialize("json", fieldofficers) else: json_subcat = 'EOF' return HttpResponse(json_subcat, mimetype="application/javascript") | if request.method == 'POST': return redirect('fieldofficer') else: fieldofficers = FieldOfficer.objects.order_by("-id")[offset:limit] if(fieldofficers): json_subcat = serializers.serialize("json", fieldofficers) else: json_subcat = 'EOF' return HttpResponse(json_subcat, mimetype="application/javascript") | def get_fieldofficers_online(request, offset, limit ): if request.method == 'POST': return redirect('fieldofficer') else: fieldofficers = FieldOfficer.objects.order_by("-id")[offset:limit] if(fieldofficers): json_subcat = serializers.serialize("json", fieldofficers) else: json_subcat = 'EOF' return HttpResponse(json_subcat, mimetype="application/javascript") | 7759d6eb08a7e6568691e648ed314450c8afa48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11995/7759d6eb08a7e6568691e648ed314450c8afa48e/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1518,
3674,
335,
414,
67,
21026,
12,
2293,
16,
1384,
16,
1800,
262,
30,
309,
590,
18,
2039,
422,
296,
3798,
4278,
327,
3136,
2668,
1518,
3674,
21349,
6134,
469,
30,
652,
3674,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1518,
3674,
335,
414,
67,
21026,
12,
2293,
16,
1384,
16,
1800,
262,
30,
309,
590,
18,
2039,
422,
296,
3798,
4278,
327,
3136,
2668,
1518,
3674,
21349,
6134,
469,
30,
652,
3674,... |
return xmldoc, log_data, detectors, -1 | return xmldoc, log_data, temp_data_loc | def populate_inspiral_tables(MBTA_frame, set_keys = MBTA_set_keys, \ event_id_dict = insp_event_id_dict): """ create xml file and populate the SnglInspiral and CoincInspiral tables from a coinc .gwf file from MBTA xmldoc: xml file to append the tables to MBTA_frame: frame file to get info about triggers from set_keys: columns in the SnglInspiral Table to set process_id: process_id event_id_dict: {ifo:event_id} dictionary to assign event_id's coinc_event_id: coinc_event_id detectors: detectors participating in the coinc returns xmldoc and contents of the comment field """ #initialize xml document xmldoc = ligolw.Document() xmldoc.appendChild(ligolw.LIGO_LW()) #dictionaries to store about individual triggers end_time_s = {} end_time_ns = {} snr = {} mass1 = {} mass2 = {} Deff = {} mchirp = {} eta = {} #extract the information from the frame file events = Fr.frgetevent(MBTA_frame) #get the ifos from the event name for event in events: if 'MbtaHLV' in event['name']: detectors = H1L1V1_detlist elif 'MbtaHL' in event['name']: detectors = H1L1_detlist elif 'MbtaHV' in event['name']: detectors = H1V1_detlist elif 'MbtaH' in event['name']: detectors = H1_detlist elif 'MbtaLV' in event['name']: detectors = L1V1_detlist elif 'MbtaL' in event['name']: detectors = L1_detlist elif 'MbtaV' in event['name']: detectors = V1_detlist else: raise ValueError, "Invalid FrEvent name" log_data = event['comment'] + '\n' far = [line.split(':')[1].split()[0] for line in log_data.splitlines() if \ 'False Alarm Rate' in line][0] for ifo in detectors: end_time_s[ifo], end_time_ns[ifo] = str(event[ifo+':end_time']).split('.') snr[ifo] = float(event[ifo+':SNR']) mass1[ifo] = float(event[ifo+':mass1']) mass2[ifo] = float(event[ifo+':mass2']) mchirp[ifo], eta[ifo] = compute_mchirp_eta(mass1[ifo],mass2[ifo]) Deff[ifo] = float(event[ifo+':eff_distance']) #fill the SnglInspiralTable sin_table = lsctables.New(lsctables.SnglInspiralTable) xmldoc.childNodes[0].appendChild(sin_table) process_id = lsctables.ProcessTable.get_next_id() for ifo in detectors: row = sin_table.RowType() row.ifo = ifo row.search = 'MBTA' row.end_time = int(end_time_s[ifo]) row.end_time_ns = int(end_time_ns[ifo]) row.mass1 = mass1[ifo] row.mass2 = mass2[ifo] row.mchirp = mchirp[ifo] row.mtotal = mass1[ifo] + mass2[ifo] row.eta = eta[ifo] row.snr = snr[ifo] row.eff_distance = Deff[ifo] row.event_id = event_id_dict[ifo] row.process_id = process_id row.channel = '' #zero out the rest of the columns #should work in chi2 and chi2cut for key in sin_table.validcolumns.keys(): if key not in set_keys: setattr(row,key,None) sin_table.append(row) #CoincInspiralTable #using the conventions found in: #https://www.lsc-group.phys.uwm.edu/ligovirgo/cbcnote/S6Plan/ #090505160219S6PlanningNotebookCoinc_and_Experiment_Tables_ihope_implementation? #highlight=%28coinc%29|%28table%29 if len(detectors) < 2: return xmldoc, log_data, detectors, -1 #coinc_event_id = coinc_event_id_base + str(UID) cin_table = lsctables.New(lsctables.CoincInspiralTable) xmldoc.childNodes[0].appendChild(cin_table) row = cin_table.RowType() row.set_ifos(detectors) cid = lsctables.CoincTable.get_next_id() row.coinc_event_id = cid row.end_time = int(end_time_s['H1']) row.end_time_ns = int(end_time_ns['H1']) row.mass = (sum(mass1.values()) + sum(mass2.values()))/3 row.mchirp = sum(mchirp.values())/3 #the snr here is really the snr NOT effective snr row.snr = pow(sum([x*x for x in snr.values()]),0.5) #far is triggers/day row.false_alarm_rate = float(far) row.combined_far = 0 cin_table.append(row) xmldoc = populate_coinc_tables(xmldoc,cid,insp_event_id_dict,\ InspiralCoincDef,detectors) temp_data_loc = None return xmldoc, log_data, temp_data_loc | ddc3e4a0e5930ac72826f2f94ecdf2d23e36cfaf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/ddc3e4a0e5930ac72826f2f94ecdf2d23e36cfaf/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
267,
1752,
481,
287,
67,
9373,
12,
7969,
9833,
67,
3789,
16,
444,
67,
2452,
273,
17897,
9833,
67,
542,
67,
2452,
16,
521,
871,
67,
350,
67,
1576,
273,
316,
1752,
67,
2575,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
267,
1752,
481,
287,
67,
9373,
12,
7969,
9833,
67,
3789,
16,
444,
67,
2452,
273,
17897,
9833,
67,
542,
67,
2452,
16,
521,
871,
67,
350,
67,
1576,
273,
316,
1752,
67,
2575,
... |
if backtrack: | if bt: | def run(self): loopctrl = {} | e9831a12235fcae7ab1b6189a4d00b2b6f1634cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/e9831a12235fcae7ab1b6189a4d00b2b6f1634cf/transaction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2798,
16277,
273,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2798,
16277,
273,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
The keys stock_date_end stock_date_start in context can be used to compute stock for arbitrary interval. If with_childs, childs locations are also computed. If skip_zero, list item with quantity equal to zero are not returned. If no product_ids are given the computation is done on all products. | - The keys stock_date_end stock_date_start in context can be used to compute stock for arbitrary interval. - The key stock_assign in context can be used to compute assing move (in conjunction with stock_date_end equal to today). - If with_childs, childs locations are also computed. - If skip_zero, list item with quantity equal to zero are not returned. - If no product_ids are given the computation is done on all products. | def products_by_location(self, cursor, user, location_ids, product_ids=None, with_childs=False, skip_zero=True, context=None): """ Return a dict like : {(location, product): qty} for each location and product given as argument, the implicit uom is the default uom on the product. The keys stock_date_end stock_date_start in context can be used to compute stock for arbitrary interval. If with_childs, childs locations are also computed. If skip_zero, list item with quantity equal to zero are not returned. If no product_ids are given the computation is done on all products. """ uom_obj = self.pool.get("product.uom") product_obj = self.pool.get("product.product") rule_obj = self.pool.get('ir.rule') location_obj = self.pool.get('stock.location') date_obj = self.pool.get('ir.date') | 346cb7915b9fae7b60410c9f08365d4c4b721d58 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/346cb7915b9fae7b60410c9f08365d4c4b721d58/product.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10406,
67,
1637,
67,
3562,
12,
2890,
16,
3347,
16,
729,
16,
2117,
67,
2232,
16,
3017,
67,
2232,
33,
7036,
16,
598,
67,
3624,
87,
33,
8381,
16,
2488,
67,
7124,
33,
5510,
16,
819,
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,
10406,
67,
1637,
67,
3562,
12,
2890,
16,
3347,
16,
729,
16,
2117,
67,
2232,
16,
3017,
67,
2232,
33,
7036,
16,
598,
67,
3624,
87,
33,
8381,
16,
2488,
67,
7124,
33,
5510,
16,
819,
33... |
self.graphics = None | self.graphic = None | def __init__(self): ObjectClass.Object.__init__(self) self.damage = 5 self.damagePiercing = 2 self.damageRadius = 2 self.deathFrame = None self.graphics = None self.groundBlocked = True self.inaccuracy = 2 self.numDeathFrames = 1 self.numFrames = 1 # this is where it actually draws the graphic # cause it will draw from top left, not the middle self.offset = (8,8) self.range = 5 self.reloadTime = 50 self.speed = 9.0 | 3ce4f6c7387e8c3bdc96257538ca148a0c40410b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1596/3ce4f6c7387e8c3bdc96257538ca148a0c40410b/WeaponClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
1033,
797,
18,
921,
16186,
2738,
972,
12,
2890,
13,
365,
18,
72,
301,
410,
273,
1381,
365,
18,
72,
301,
410,
52,
2453,
2822,
273,
576,
365,
18,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
797,
18,
921,
16186,
2738,
972,
12,
2890,
13,
365,
18,
72,
301,
410,
273,
1381,
365,
18,
72,
301,
410,
52,
2453,
2822,
273,
576,
365,
18,
72,
... |
raise Exception | def endElement(self, name): if name in ('node','way') and self.valid: if self.tags.get('amenity') in AMENITIES: #print self.node_location, self.tags['amenity'] pass else: self.ignore_count += 1 return # Ignore ways that lay partly outside our bounding box if name == 'way' and not all(id in self.node_locations for id in self.nodes): return entity, created = Entity.objects.get_or_create(osm_id=self.id) if created or not entity.metadata or entity.metadata.get('attrs', {}).get('timestamp', '') < self.attrs['timestamp']: if created: self.create_count += 1 else: self.modify_count += 1 if name == 'node': entity.location = Point(self.node_location[1], self.node_location[0], srid=4326) entity.geometry = entity.location elif name == 'way': print self.nodes[0], self.nodes[-1] cls = LinearRing if self.nodes[0] == self.nodes[-1] else LineString entity.geometry = cls([self.node_locations[n] for n in self.nodes], srid=4326) min_, max_ = (float('inf'), float('inf')), (float('-inf'), float('-inf')) for lat, lon in [self.node_locations[n] for n in self.nodes]: min_ = min(min_[0], lat), min(min_[1], lon) max_ = max(max_[0], lat), max(max_[1], lon) entity.location = Point( (min_[1]+max_[1])/2 , (min_[0]+max_[0])/2 , srid=4326) else: raise AssertionError("There should be no other types of entity we're to deal with.") if name == 'way': print "Way", entity.geometry | c93ee5733a8e5b0c65963fc04da8bd3c1690ecb9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14173/c93ee5733a8e5b0c65963fc04da8bd3c1690ecb9/update_osm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
12,
2890,
16,
508,
4672,
309,
508,
316,
7707,
2159,
17023,
1888,
6134,
471,
365,
18,
877,
30,
309,
365,
18,
4156,
18,
588,
2668,
301,
275,
560,
6134,
316,
432,
16196,
25673,
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,
14840,
12,
2890,
16,
508,
4672,
309,
508,
316,
7707,
2159,
17023,
1888,
6134,
471,
365,
18,
877,
30,
309,
365,
18,
4156,
18,
588,
2668,
301,
275,
560,
6134,
316,
432,
16196,
25673,
30,... | |
member_folder.setTitle(member_folder_title) member_folder.setDescription(member_folder_description) | fullname = member_object.getProperty('fullname') member_folder.setTitle(fullname or member_id) | def createMemberarea(self, member_id=None, minimal=True): """ Create a member area for 'member_id' or the authenticated user, but don't assume that member_id is url-safe. | b06b05b86e7dce5ecdbe39b820b9cbf89d7f67a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12230/b06b05b86e7dce5ecdbe39b820b9cbf89d7f67a1/membership.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
4419,
5036,
12,
2890,
16,
3140,
67,
350,
33,
7036,
16,
16745,
33,
5510,
4672,
3536,
1788,
279,
3140,
5091,
364,
296,
5990,
67,
350,
11,
578,
326,
9370,
729,
16,
1496,
2727,
1404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
4419,
5036,
12,
2890,
16,
3140,
67,
350,
33,
7036,
16,
16745,
33,
5510,
4672,
3536,
1788,
279,
3140,
5091,
364,
296,
5990,
67,
350,
11,
578,
326,
9370,
729,
16,
1496,
2727,
1404,
... |
self.dicts[i]['distEpi']) | self.dicts[i]['distHypo']) | def calculateStationMagnitudes(self): for i in range(len(self.streams)): if (self.dicts[i].has_key('MagMin1') and self.dicts[i].has_key('MagMin2') and self.dicts[i].has_key('MagMax1') and self.dicts[i].has_key('MagMax2')): amp = self.dicts[i]['MagMax1'] - self.dicts[i]['MagMin1'] timedelta = abs(self.dicts[i]['MagMax1T'] - self.dicts[i]['MagMin1T']) timedelta /= self.streams[i][1].stats.sampling_rate #print self.dicts[i]['pazN'] mag = estimateMagnitude(self.dicts[i]['pazN'], amp, timedelta, self.dicts[i]['distEpi']) amp = self.dicts[i]['MagMax2'] - self.dicts[i]['MagMin2'] timedelta = abs(self.dicts[i]['MagMax2T'] - self.dicts[i]['MagMin2T']) timedelta /= self.streams[i][2].stats.sampling_rate mag += estimateMagnitude(self.dicts[i]['pazE'], amp, timedelta, self.dicts[i]['distEpi']) mag /= 2. self.dicts[i]['Mag'] = mag self.dicts[i]['MagChannel'] = '%s,%s' % (self.streams[i][1].stats.channel, self.streams[i][2].stats.channel) print 'calculated new magnitude for %s: %0.2f (channels: %s)' \ % (self.dicts[i]['Station'], self.dicts[i]['Mag'], self.dicts[i]['MagChannel']) elif (self.dicts[i].has_key('MagMin1') and self.dicts[i].has_key('MagMax1')): amp = self.dicts[i]['MagMax1'] - self.dicts[i]['MagMin1'] timedelta = abs(self.dicts[i]['MagMax1T'] - self.dicts[i]['MagMin1T']) timedelta /= self.streams[i][1].stats.sampling_rate #print self.dicts[i]['pazN'] mag = estimateMagnitude(self.dicts[i]['pazN'], amp, timedelta, self.dicts[i]['distEpi']) self.dicts[i]['Mag'] = mag self.dicts[i]['MagChannel'] = '%s' % self.streams[i][1].stats.channel print 'calculated new magnitude for %s: %0.2f (channels: %s)' \ % (self.dicts[i]['Station'], self.dicts[i]['Mag'], self.dicts[i]['MagChannel']) elif (self.dicts[i].has_key('MagMin2') and self.dicts[i].has_key('MagMax2')): amp = self.dicts[i]['MagMax2'] - self.dicts[i]['MagMin2'] timedelta = abs(self.dicts[i]['MagMax2T'] - self.dicts[i]['MagMin2T']) timedelta /= self.streams[i][2].stats.sampling_rate #print self.dicts[i]['pazN'] mag = estimateMagnitude(self.dicts[i]['pazE'], amp, timedelta, self.dicts[i]['distEpi']) self.dicts[i]['Mag'] = mag self.dicts[i]['MagChannel'] = '%s' % self.streams[i][2].stats.channel print 'calculated new magnitude for %s: %0.2f (channels: %s)' \ % (self.dicts[i]['Station'], self.dicts[i]['Mag'], self.dicts[i]['MagChannel']) | f46eb3773ab1df8b9332ea35469134ee517b70ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/f46eb3773ab1df8b9332ea35469134ee517b70ce/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
16672,
11372,
82,
24751,
12,
2890,
4672,
364,
277,
316,
1048,
12,
1897,
12,
2890,
18,
16320,
3719,
30,
309,
261,
2890,
18,
16287,
63,
77,
8009,
5332,
67,
856,
2668,
11372,
2930,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
16672,
11372,
82,
24751,
12,
2890,
4672,
364,
277,
316,
1048,
12,
1897,
12,
2890,
18,
16320,
3719,
30,
309,
261,
2890,
18,
16287,
63,
77,
8009,
5332,
67,
856,
2668,
11372,
2930,
... |
i = self.to_bits(i) | i = self.to_bits(i, self.m) | def interpolation_polynomial(self, k=None): r""" Return a univariate polynomial over an extension field representing this S-box. | 16527da1ddc0ac750f609cd58858c5b45d932696 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/16527da1ddc0ac750f609cd58858c5b45d932696/sbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12851,
67,
3915,
13602,
12,
2890,
16,
417,
33,
7036,
4672,
436,
8395,
2000,
279,
640,
27693,
16991,
1879,
392,
2710,
652,
5123,
333,
348,
17,
2147,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
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,
12851,
67,
3915,
13602,
12,
2890,
16,
417,
33,
7036,
4672,
436,
8395,
2000,
279,
640,
27693,
16991,
1879,
392,
2710,
652,
5123,
333,
348,
17,
2147,
18,
2,
-100,
-100,
-100,
-100,
-100,
... |
blocks=() def __init__(self,case,table,file,inode,sub_inode): self.dbh=DB.DBO(case) self.case=case self.table=table self.dbh.execute("select concat(path,name) as filename from file_%s where inode=%r",(table,inode)) zipfilename=self.dbh.fetch()['filename'] self.dbh.execute("select concat(path,name) as filename from file_%s where inode='%s|Z|%s'",(table,inode,sub_inode)) filename=self.dbh.fetch()['filename'] if not filename.startswith(zipfilename): raise FlagFramework.FlagException("Error in tables: %s does not start with %s" %(filename,zipfilename)) filename=filename[len(zipfilename)+1:] temp = inode.split('|') | specifier = 'Z' def __init__(self, case, table, fd, inode): File.__init__(self, case, table, fd, inode) | def seek(self,pos): self.pos=pos | 567960851b06277a215379097c83910f245197ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/567960851b06277a215379097c83910f245197ee/FileSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
2890,
16,
917,
4672,
365,
18,
917,
33,
917,
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,
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,
6520,
12,
2890,
16,
917,
4672,
365,
18,
917,
33,
917,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
response = conn_admin.request_post(self.url1, headers=jsonheader, body=C1_full2_wrongpowner1) self.failUnlessEqual('400', response[u'headers']['status']) | self.doTestAndCheckWrongNewPropertyOwner(conn_admin) | def test_AuthorizedAsAdminWrongNewPropertyOwner(self): response = conn_admin.request_post(self.url1, headers=jsonheader, body=C1_full2_wrongpowner1) self.failUnlessEqual('400', response[u'headers']['status']) | 091168d98667491ee6176464a27d5a3e2a269f75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6226/091168d98667491ee6176464a27d5a3e2a269f75/cftest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
15341,
1463,
4446,
13634,
1908,
1396,
5541,
12,
2890,
4672,
766,
273,
1487,
67,
3666,
18,
2293,
67,
2767,
12,
2890,
18,
718,
21,
16,
1607,
33,
1977,
3374,
16,
1417,
33,
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,
1842,
67,
15341,
1463,
4446,
13634,
1908,
1396,
5541,
12,
2890,
4672,
766,
273,
1487,
67,
3666,
18,
2293,
67,
2767,
12,
2890,
18,
718,
21,
16,
1607,
33,
1977,
3374,
16,
1417,
33,
39,
... |
source=source, | source=my_source, | def post(self): if ChromeFrameMe(self): return # Extract description + intrinsic. description = str(self.request.get('description')) m = re.match('^~~~intrinsic: ([0-9]+)~~~(.*)$', description) if m: intrinsic = int(m.group(1)) description = m.group(2) else: intrinsic = 0 # Pick out definition definition = str(self.request.get('definition')) if definition: definition = definition.split(' ') else: definition = [] # Get user agent string. user_agent = self.request.headers.get('USER_AGENT', '') # Get out icon. icon = str(self.request.get('icon', '')) # Get source for each word that goes into this one. sources = {} for w in set(w.definition): query = db.GqlQuery('SELECT * FROM WordSource WHERE ANCESTOR is :1', w) src = query.fetch(1) dsource = DecodeSource(src.source) for cw in dsource: if cw not in sources: sources[cw] = dsource[cw] my_source = EncodeSource(sources) # Compile it. my_executable = CompileSource(my_source) # Transactionally add word and icon. db.run_in_transaction(AddFullWord, description=description, definition=definition, intrinsic=intrinsic, author=self.request.remote_addr, user_agent=user_agent, keywords=FindKeywords(description), icon=icon, source=source, executable=my_executable) # Update score of each word used. for w in set(w.definition): UpdateScore(w) | 0c84d023adea3c40a625ba9babebfa0e54e91be7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3507/0c84d023adea3c40a625ba9babebfa0e54e91be7/iconforth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
12,
2890,
4672,
309,
15159,
3219,
4667,
12,
2890,
4672,
327,
468,
8152,
2477,
397,
28871,
18,
2477,
273,
609,
12,
2890,
18,
2293,
18,
588,
2668,
3384,
26112,
312,
273,
283,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
12,
2890,
4672,
309,
15159,
3219,
4667,
12,
2890,
4672,
327,
468,
8152,
2477,
397,
28871,
18,
2477,
273,
609,
12,
2890,
18,
2293,
18,
588,
2668,
3384,
26112,
312,
273,
283,
18,
1... |
oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec") | oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH) | def MakeInstallerLinux(): import compileall PYTHONV=os.path.basename(PYTHONSDK) if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz rpmarch.txt panda3d.spec") oscmd("mkdir -p linuxroot/usr/bin") oscmd("mkdir -p linuxroot/usr/include") oscmd("mkdir -p linuxroot/usr/share/panda3d") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages") oscmd("mkdir -p linuxroot/etc/ld.so.conf.d") oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > linuxroot/etc/Config.prc") oscmd("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc") oscmd("cp --recursive built/include linuxroot/usr/include/panda3d") oscmd("cp --recursive direct linuxroot/usr/share/panda3d/direct") oscmd("cp --recursive built/pandac linuxroot/usr/share/panda3d/pandac") oscmd("cp --recursive built/Pmw linuxroot/usr/share/panda3d/Pmw") oscmd("cp built/direct/__init__.py linuxroot/usr/share/panda3d/direct/__init__.py") oscmd("cp --recursive SceneEditor linuxroot/usr/share/panda3d/SceneEditor") oscmd("cp --recursive built/models linuxroot/usr/share/panda3d/models") oscmd("cp --recursive samples linuxroot/usr/share/panda3d/samples") oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE") oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE") oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes") oscmd("echo '/usr/lib/panda3d' > linuxroot/etc/ld.so.conf.d/panda3d.conf") oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth") oscmd("cp built/bin/* linuxroot/usr/bin/") for base in os.listdir("built/lib"): oscmd("ln -sf /usr/lib/"+base+" linuxroot/usr/lib/"+PYTHONV+"/lib-dynload/"+base) oscmd("cp built/lib/"+base+" linuxroot/usr/lib/"+base) for base in os.listdir("linuxroot/usr/share/panda3d/direct/src"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("linuxroot/usr/share/panda3d/direct/src/"+base) compileall.compile_dir("linuxroot/usr/share/panda3d/Pmw") compileall.compile_dir("linuxroot/usr/share/panda3d/SceneEditor") oscmd("chmod -R 555 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/dpkg-deb")): txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV) oscmd("mkdir -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_i386.deb") oscmd("chmod -R 755 linuxroot") if (os.path.exists("/usr/bin/rpmbuild")): oscmd("rpm -E '{%_arch}' > rpmarch.txt") arch=ReadFile("rpmarch.txt") oscmd("rm -rf "+arch) txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE) WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec") if (os.path.exists(arch+"/panda3d-"+VERSION+"-1."+arch+".rpm")): oscmd("mv "+arch+"/panda3d-"+VERSION+"-1."+arch+".rpm .") oscmd("rm -rf rpmarch.txt "+arch) oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec") | 9c6956b3856f36322acea26128d9cc5a7a883428 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/9c6956b3856f36322acea26128d9cc5a7a883428/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
18678,
19475,
13332,
1930,
4074,
454,
12191,
20131,
58,
33,
538,
18,
803,
18,
13909,
12,
16235,
20131,
22625,
13,
309,
261,
538,
18,
803,
18,
291,
1214,
2932,
20132,
3085,
6,
3719,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
18678,
19475,
13332,
1930,
4074,
454,
12191,
20131,
58,
33,
538,
18,
803,
18,
13909,
12,
16235,
20131,
22625,
13,
309,
261,
538,
18,
803,
18,
291,
1214,
2932,
20132,
3085,
6,
3719,... |
defaults = { "[General]": {"nLines": lines} } | defaults = { "[General]": { "nLines": lines, "bFollowPC": follow_pc } } | def load_options(self): # TODO: move config to MemoryAddress class? # (depends on how monitoring of addresses should work) lines = self.address.get_lines() miss_is_error = False # needed for adding windows defaults = { "[General]": {"nLines": lines} } userconfdir = ".hatari" config = ConfigStore(userconfdir, defaults, miss_is_error) config.load(config.get_filepath("debugui.cfg")) # set defaults self.address.set_lines(config.get("[General]", "nLines")) self.config = config | 1d157e067f3f85cf67f64ced88e42df15081a1d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2811/1d157e067f3f85cf67f64ced88e42df15081a1d9/debugui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
2116,
12,
2890,
4672,
468,
2660,
30,
3635,
642,
358,
9251,
1887,
667,
35,
468,
261,
27360,
603,
3661,
16309,
434,
6138,
1410,
1440,
13,
2362,
273,
365,
18,
2867,
18,
588,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
2116,
12,
2890,
4672,
468,
2660,
30,
3635,
642,
358,
9251,
1887,
667,
35,
468,
261,
27360,
603,
3661,
16309,
434,
6138,
1410,
1440,
13,
2362,
273,
365,
18,
2867,
18,
588,
67,... |
blacklist, recommended): | blacklist, whitelist, recommended): | def __init__(self, basepath, url, version, arches, components, groups, rawurl, blacklist, recommended): self.basepath = basepath self.version = version self.components = components self.url = url self.rawurl = rawurl self.groups = groups self.arches = arches self.deps = dict() self.provides = dict() self.blacklist = set(blacklist) self.cachefile = None self.recommended = recommended | 0e9daba224deee78a25e9ec8d2f7096d2d76c3c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/0e9daba224deee78a25e9ec8d2f7096d2d76c3c4/Packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
23853,
16,
880,
16,
1177,
16,
6637,
281,
16,
4085,
16,
3252,
16,
13954,
16,
11709,
16,
10734,
16,
14553,
4672,
365,
18,
1969,
803,
273,
23853,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
23853,
16,
880,
16,
1177,
16,
6637,
281,
16,
4085,
16,
3252,
16,
13954,
16,
11709,
16,
10734,
16,
14553,
4672,
365,
18,
1969,
803,
273,
23853,
365,
18,
... |
""" | """ | def fl_popup_set_min_width(p1, p2): """ fl_popup_set_min_width(p1, p2) -> width num. """ retval = _fl_popup_set_min_width(p1, p2) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
16086,
67,
542,
67,
1154,
67,
2819,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
16086,
67,
542,
67,
1154,
67,
2819,
12,
84,
21,
16,
293,
22,
13,
317,
1835,
818,
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,
1183,
67,
16086,
67,
542,
67,
1154,
67,
2819,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
16086,
67,
542,
67,
1154,
67,
2819,
12,
84,
21,
16,
293,
22,
13,
317,
1835,
818,
18,
... |
self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ | pass | def __init__(self, about=None, meta=None, label=None, id=None, char=None, valueOf_=None, mixedclass_=None, content_=None): super(CharSet, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) self.char = _cast(None, char) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ | 9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2973,
33,
7036,
16,
2191,
33,
7036,
16,
1433,
33,
7036,
16,
612,
33,
7036,
16,
1149,
33,
7036,
16,
4323,
67,
33,
7036,
16,
7826,
1106,
67,
33,
7036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2973,
33,
7036,
16,
2191,
33,
7036,
16,
1433,
33,
7036,
16,
612,
33,
7036,
16,
1149,
33,
7036,
16,
4323,
67,
33,
7036,
16,
7826,
1106,
67,
33,
7036,
... |
exec self.importDynamicUtil() backend_name = self.job_info.backend.__class__.__name__ util_string = "Ganga.Lib.MonitoringServices.Dashboard.%sUtil" % backend_name __import__(util_string) | def getSandboxModules(self): """Return list of module dependencies.""" import Ganga.Lib.MonitoringServices.Dashboard exec self.importDynamicUtil() backend_name = self.job_info.backend.__class__.__name__ util_string = "Ganga.Lib.MonitoringServices.Dashboard.%sUtil" % backend_name __import__(util_string) import sys return DashboardMS.getSandboxModules(self) + [ Ganga.Lib.MonitoringServices.Dashboard.CommonUtil, Ganga.Lib.MonitoringServices.Dashboard.BackendMS, sys.modules[util_string], ] | 090e1b7010e07c8fbdd32c291de66a4bdbdac62b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/090e1b7010e07c8fbdd32c291de66a4bdbdac62b/BackendMS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
9069,
7782,
12,
2890,
4672,
3536,
990,
666,
434,
1605,
5030,
12123,
1930,
611,
539,
69,
18,
5664,
18,
18410,
5676,
18,
14830,
1930,
2589,
327,
18230,
3537,
18,
588,
17881,
7782,
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,
1322,
9069,
7782,
12,
2890,
4672,
3536,
990,
666,
434,
1605,
5030,
12123,
1930,
611,
539,
69,
18,
5664,
18,
18410,
5676,
18,
14830,
1930,
2589,
327,
18230,
3537,
18,
588,
17881,
7782,
12... | |
self.theQtyValue *= 0.5 self.setValue( self.theQtyFPN, self.theQtyValue ) | self.theValue *= 0.5 self.setProperty( 'Value', self.theValue ) self.thePluginManager.updateAllPluginWindow() | def decreaseValue( self, button_object ): | 30bce103d9f34982fce5f0fc5e1245ea73d045a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/30bce103d9f34982fce5f0fc5e1245ea73d045a1/VariableWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20467,
620,
12,
365,
16,
3568,
67,
1612,
262,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20467,
620,
12,
365,
16,
3568,
67,
1612,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
text='<div tal:content="python: request.get(\'data\')" />', | text=('<div tal:content="python: ' 'request.get(\'data\')" />'), | def testISO_8859_15(self): manage_addPageTemplate(self.app, 'test', text='<div tal:content="python: request.get(\'data\')" />', encoding='ascii') zpt = self.app['test'] self.app.REQUEST.set('HTTP_ACCEPT_CHARSET', 'ISO-8859-15,utf-8') self.app.REQUEST.set('data', '') result = zpt.pt_render() self.assertEqual(result.startswith(unicode('<div></div>', 'iso-8859-15')), True) | 9ee8932389e2937ac17156196be900f498e09cdc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9658/9ee8932389e2937ac17156196be900f498e09cdc/testZopePageTemplate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12609,
67,
17258,
67,
3600,
12,
2890,
4672,
10680,
67,
1289,
1964,
2283,
12,
2890,
18,
2910,
16,
296,
3813,
2187,
977,
33,
2668,
32,
2892,
268,
287,
30,
1745,
1546,
8103,
30,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12609,
67,
17258,
67,
3600,
12,
2890,
4672,
10680,
67,
1289,
1964,
2283,
12,
2890,
18,
2910,
16,
296,
3813,
2187,
977,
33,
2668,
32,
2892,
268,
287,
30,
1745,
1546,
8103,
30,
296... |
node = pydot.Node(model.model, shape='record', label=label) | if pydot.__version__ == '1.0.2': label = '"' + label + '"' node = pydot.Node(str(model.model), shape='record', label=label) | def fill_graph(self, cursor, user, models, graph, level=1, context=None): import pydot model_obj = self.pool.get('ir.model') | 32b2f3831484c7db96bdb50b27e21d368bbd666a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/32b2f3831484c7db96bdb50b27e21d368bbd666a/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
67,
4660,
12,
2890,
16,
3347,
16,
729,
16,
3679,
16,
2667,
16,
1801,
33,
21,
16,
819,
33,
7036,
4672,
1930,
2395,
9811,
938,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3636,
67,
4660,
12,
2890,
16,
3347,
16,
729,
16,
3679,
16,
2667,
16,
1801,
33,
21,
16,
819,
33,
7036,
4672,
1930,
2395,
9811,
938,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
... |
spmatrix.__init__(self, 'csc') | spmatrix.__init__(self) | def __init__(self,s,ij=None,M=None,N=None,nzmax=100,typecode=Float,copy=0): spmatrix.__init__(self, 'csc') if isinstance(s,spmatrix): if isinstance(s, csc_matrix): # do nothing but copy information self.shape = s.shape if copy: self.data = s.data.copy() self.rowind = s.rowind.copy() self.indptr = s.indptr.copy() else: self.data = s.data self.rowind = s.rowind self.indptr = s.indptr elif isinstance(s, csr_matrix): self.shape = s.shape func = getattr(sparsetools,s.ftype+'transp') self.data, self.rowind, self.indptr = \ func(s.shape[1], s.data, s.colind, s.indptr) else: temp = s.tocsc() self.data = temp.data self.rowind = temp.rowind self.indptr = temp.indptr self.shape = temp.shape elif isinstance(s,type(3)): M=s N=ij self.data = zeros((nzmax,),typecode) self.rowind = zeros((nzmax,),'i') self.indptr = zeros((N+1,),'i') self.shape = (M,N) elif (isinstance(s,ArrayType) or \ isinstance(s,type([]))): s = asarray(s) if s.typecode() not in 'fdFD': s = s*1.0 if (rank(s) == 2): # converting from a full array M, N = s.shape typecode = s.typecode() func = getattr(sparsetools,_transtabl[typecode]+'fulltocsc') ierr = irow = jcol = 0 nnz = sum(ravel(s != 0.0)) a = zeros((nnz,),typecode) rowa = zeros((nnz,),'i') ptra = zeros((N+1,),'i') while 1: a, rowa, ptra, irow, jcol, ierr = \ func(s, a, rowa, ptra, irow, jcol, ierr) if (ierr == 0): break nnz = nnz + ALLOCSIZE a = resize1d(a, nnz) rowa = resize1d(rowa, nnz) | 2df51902e42db8054709637688b60399fcc84eff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/2df51902e42db8054709637688b60399fcc84eff/Sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
87,
16,
8302,
33,
7036,
16,
49,
33,
7036,
16,
50,
33,
7036,
16,
82,
94,
1896,
33,
6625,
16,
723,
710,
33,
4723,
16,
3530,
33,
20,
4672,
1694,
5667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
87,
16,
8302,
33,
7036,
16,
49,
33,
7036,
16,
50,
33,
7036,
16,
82,
94,
1896,
33,
6625,
16,
723,
710,
33,
4723,
16,
3530,
33,
20,
4672,
1694,
5667,
... |
aboutDialog.AboutDialog(root,'About') | aboutDialog.AboutDialog(root, 'About') | def run(): import aboutDialog aboutDialog.AboutDialog(root,'About') | 73453757718f13af156356dabdd0dea7ccc396ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/73453757718f13af156356dabdd0dea7ccc396ba/aboutDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
13332,
1930,
2973,
6353,
2973,
6353,
18,
24813,
6353,
12,
3085,
11189,
24813,
6134,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
13332,
1930,
2973,
6353,
2973,
6353,
18,
24813,
6353,
12,
3085,
11189,
24813,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
hklin_spacegroup = o.split(':')[-1].strip() | hklin_spacegroup = o.replace( 'Spacegroup from HKLIN file :', '').strip() | def decide_pointgroup(self): '''Decide on the correct pointgroup for hklin.''' | 6b9529c9f834ca180d86fc49a016081bae0d63b8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/6b9529c9f834ca180d86fc49a016081bae0d63b8/Pointless.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16288,
67,
1153,
1655,
12,
2890,
4672,
9163,
1799,
831,
603,
326,
3434,
1634,
1655,
364,
366,
79,
7511,
1093,
6309,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
16288,
67,
1153,
1655,
12,
2890,
4672,
9163,
1799,
831,
603,
326,
3434,
1634,
1655,
364,
366,
79,
7511,
1093,
6309,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
s.top.geometry("%dx%d" % (s.top.winfo_reqwidth(), s.top.winfo_reqheight())) | s.top.geometry("") | def _togglelog(s): print "togglelog" if s.textenabled: s.oldtextheight = s.text.winfo_height() s.text.pack_forget() s.textenabled = 0 s.menubar.entryconfig('Hide Log', label = 'Show Log') s.top.update() s.top.geometry("%dx%d" % (s.top.winfo_reqwidth(), s.top.winfo_reqheight())) s.top.update() s.top.resizable(width = 0, height = 0) s.top.update() else: s.text.pack(side = BOTTOM, expand = 1, fill = BOTH) s.textenabled = 1 s.top.update() s.top.geometry("%dx%d" % (s.top.winfo_reqwidth(), s.top.winfo_height() + s.oldtextheight)) s.menubar.entryconfig('Show Log', label = 'Hide Log') s._rescroll() s.top.resizable(width = 1, height = 1) | 091ec4b21e72520d3bf162c3d155800d480c7be6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5335/091ec4b21e72520d3bf162c3d155800d480c7be6/Tk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
88,
717,
7043,
12970,
12,
87,
4672,
1172,
315,
88,
717,
7043,
12970,
6,
309,
272,
18,
955,
5745,
30,
272,
18,
1673,
955,
4210,
273,
272,
18,
955,
18,
91,
1376,
67,
4210,
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,
389,
88,
717,
7043,
12970,
12,
87,
4672,
1172,
315,
88,
717,
7043,
12970,
6,
309,
272,
18,
955,
5745,
30,
272,
18,
1673,
955,
4210,
273,
272,
18,
955,
18,
91,
1376,
67,
4210,
1435,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.