rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
system(umount_cmd) | try: system(umount_cmd) except: self.job.record("FAIL " + umount_cmd) raise else: self.job.record("GOOD " + umount_cmd) | def unmount(self, handle=None): if not handle: handle = self.device umount_cmd = "umount " + handle print umount_cmd sys.stdout.flush() system(umount_cmd) | a168ce4e28cfb393c80d80ff163588fed869284f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12268/a168ce4e28cfb393c80d80ff163588fed869284f/filesystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25670,
12,
2890,
16,
1640,
33,
7036,
4672,
309,
486,
1640,
30,
1640,
273,
365,
18,
5964,
9570,
592,
67,
4172,
273,
315,
379,
592,
315,
397,
1640,
1172,
9570,
592,
67,
4172,
2589,
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,
25670,
12,
2890,
16,
1640,
33,
7036,
4672,
309,
486,
1640,
30,
1640,
273,
365,
18,
5964,
9570,
592,
67,
4172,
273,
315,
379,
592,
315,
397,
1640,
1172,
9570,
592,
67,
4172,
2589,
18,
... |
os.environ["DYLD_LIBRARY_PATH"]) | os.environ["LD_LIBRARY_PATH"]) | def IsGcc(context): context.Message("Checking if CC is really gcc...") result = context.TryAction(["%s --help | grep gcc" % env['CC']])[0] context.Result(result) return result | 4b396090e22fe45a28591363c8e5fb78fdef4928 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6561/4b396090e22fe45a28591363c8e5fb78fdef4928/SConsUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2585,
43,
952,
12,
2472,
4672,
819,
18,
1079,
2932,
14294,
309,
225,
16525,
353,
8654,
314,
952,
7070,
13,
563,
273,
819,
18,
7833,
1803,
3816,
28385,
87,
1493,
5201,
571,
23366,
314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2585,
43,
952,
12,
2472,
4672,
819,
18,
1079,
2932,
14294,
309,
225,
16525,
353,
8654,
314,
952,
7070,
13,
563,
273,
819,
18,
7833,
1803,
3816,
28385,
87,
1493,
5201,
571,
23366,
314,
... |
def prepare_nsis_script(bootstrap, pyver, numver): | def prepare_nsis_script(bdir, pyver, numver): | def prepare_nsis_script(bootstrap, pyver, numver): tpl = pjoin('nsis_scripts', 'scipy-superinstaller.nsi.in') source = open(tpl, 'r') target = open(pjoin(bootstrap, 'scipy-superinstaller.nsi'), 'w') installer_name = 'scipy-%s-win32-superpack-python%s.exe' % (numver, pyver) cnt = "".join(source.readlines()) cnt = cnt.replace('@SCIPY_INSTALLER_NAME@', installer_name) for arch in ['nosse', 'sse2', 'sse3']: cnt = cnt.replace('@%s_BINARY@' % arch.upper(), get_binary_name(arch)) target.write(cnt) | 0821fab4f2f3e41a68d02ca966970e58fd62fff2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/0821fab4f2f3e41a68d02ca966970e58fd62fff2/pavement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
67,
2387,
291,
67,
4263,
12,
70,
1214,
16,
2395,
502,
16,
818,
502,
4672,
6940,
273,
293,
5701,
2668,
2387,
291,
67,
12827,
2187,
296,
1017,
9126,
17,
9565,
20163,
18,
2387,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
67,
2387,
291,
67,
4263,
12,
70,
1214,
16,
2395,
502,
16,
818,
502,
4672,
6940,
273,
293,
5701,
2668,
2387,
291,
67,
12827,
2187,
296,
1017,
9126,
17,
9565,
20163,
18,
2387,
77,
... |
>>> for s in sets: s.close() | ... def __str__(self): | 82675db194a0b6021e6c2528f6442b5fafe69951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/82675db194a0b6021e6c2528f6442b5fafe69951/test_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
1001,
701,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
1001,
701,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
sage: p.coeffs(x) | sage: p.coefficients(x) | def coeffs(self, x=None): r""" Coefficients of \code{self} as a polynomial in x. | 2e32b7247af3731db881ec5bd651880a8fc8c790 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2e32b7247af3731db881ec5bd651880a8fc8c790/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16530,
12,
2890,
16,
619,
33,
7036,
4672,
436,
8395,
7695,
73,
12344,
434,
521,
710,
95,
2890,
97,
487,
279,
16991,
316,
619,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16530,
12,
2890,
16,
619,
33,
7036,
4672,
436,
8395,
7695,
73,
12344,
434,
521,
710,
95,
2890,
97,
487,
279,
16991,
316,
619,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
ds = pi*sqrt(2.0)*resolution/180.0 | ds = pi*resolution/180.0 | def gridsky(resolution): """ grid the sky up into roughly square regions resolution is the length of a side the points get placed at the center of the squares and to first order each square has an area of resolution^2 """ latitude = 0.0 longitude = pi ds = pi*sqrt(2.0)*resolution/180.0 points = [(latitude-0.5*pi, longitude)] while latitude <= pi: latitude += ds longitude = 0.0 points.append((latitude-0.5*pi, longitude)) while longitude <= 2.0*pi: longitude += ds / abs(sin(latitude)) points.append((latitude-0.5*pi, longitude)) #there's some slop so get rid of it and only focus on points on the sphere sphpts = [] for pt in points: if pt[0] > pi/2 or pt[0] < -pi/2 \ or pt[1] > 2*pi or pt[1] < 0: pass else: sphpts.append(pt) return sphpts | 92cbddf405d13484ba64bef9acff8c41d7ebb714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/92cbddf405d13484ba64bef9acff8c41d7ebb714/skylocutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3068,
22921,
12,
19182,
4672,
3536,
3068,
326,
15513,
731,
1368,
23909,
715,
8576,
10085,
7861,
353,
326,
769,
434,
279,
4889,
326,
3143,
336,
15235,
622,
326,
4617,
434,
326,
31206,
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,
3068,
22921,
12,
19182,
4672,
3536,
3068,
326,
15513,
731,
1368,
23909,
715,
8576,
10085,
7861,
353,
326,
769,
434,
279,
4889,
326,
3143,
336,
15235,
622,
326,
4617,
434,
326,
31206,
471,
... |
if getattr(record, 'dbname', False): record.at_dbname = '@%s' % record.dbname else: record.at_dbname = '' return logging.Formatter.format(self, record) | return DBFormatter.format(self, record) | def format(self, record): fg_color, bg_color = LEVEL_COLOR_MAPPING[record.levelno] record.levelname = COLOR_PATTERN % (30 + fg_color, 40 + bg_color, record.levelname) if getattr(record, 'dbname', False): record.at_dbname = '@%s' % record.dbname else: record.at_dbname = '' return logging.Formatter.format(self, record) | 00da01bbd7e7fee55ff7285ee43e61f955559e74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/00da01bbd7e7fee55ff7285ee43e61f955559e74/netsvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
1409,
4672,
10186,
67,
3266,
16,
7611,
67,
3266,
273,
15080,
67,
10989,
67,
20450,
63,
3366,
18,
2815,
2135,
65,
1409,
18,
31994,
273,
15590,
67,
10831,
738,
261,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
1409,
4672,
10186,
67,
3266,
16,
7611,
67,
3266,
273,
15080,
67,
10989,
67,
20450,
63,
3366,
18,
2815,
2135,
65,
1409,
18,
31994,
273,
15590,
67,
10831,
738,
261,
50... |
for param in doc.parameters()+extra_p: | for param in doc.parameter_list()+extra_p: | def _extract_index(self): """ @return: A dictionary mapping from terms to lists of source documents. """ index = {} for (uid, doc) in self._docmap.items(): if uid.is_function(): link = Link(`uid`, uid.module()) elif uid.is_method(): link = Link(`uid`, uid.cls()) else: link = Link(`uid`, uid) | 8f4cabb5daccea22a8dd3fb5290003f0c18c9276 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/8f4cabb5daccea22a8dd3fb5290003f0c18c9276/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8004,
67,
1615,
12,
2890,
4672,
3536,
632,
2463,
30,
432,
3880,
2874,
628,
6548,
358,
6035,
434,
1084,
7429,
18,
3536,
770,
273,
2618,
364,
261,
1911,
16,
997,
13,
316,
365,
6315,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8004,
67,
1615,
12,
2890,
4672,
3536,
632,
2463,
30,
432,
3880,
2874,
628,
6548,
358,
6035,
434,
1084,
7429,
18,
3536,
770,
273,
2618,
364,
261,
1911,
16,
997,
13,
316,
365,
6315,... |
EXAMPLES:: | EXAMPLES: | def abstract_method(f = None, optional = False): r""" Abstract methods INPUT:: - ``f``: a function - ``optional``: a boolean; defaults to False The decorator :obj:`abstract_method` can be used to declare methods that should be implemented by all concrete derived classes. This declaration should typically include documentation for the specification for this method. The purpose is to enforce a consistent and visual syntax for such declarations. It is used by the Sage categories for automated tests (see ``Sets.Parent.test_not_implemented``). EXAMPLES:: We create a class with an abstract method:: sage: class A(object): ... ... @abstract_method ... def my_method(self): ... ''' ... The method :meth:`my_method` computes my_method ... ... EXAMPLES:: ... ... ''' ... pass ... sage: A.my_method <abstract method my_method at ...> The current policy is that a ``NotImplementedError`` is raised when accessing the method through an instance, even before the method is called:: sage: x = A() sage: x.my_method Traceback (most recent call last): ... NotImplementedError: <abstract method my_method at ...> It is also possible to mark abstract methods as optional:: sage: class A(object): ... ... @abstract_method(optional = True) ... def my_method(self): ... ''' ... The method :meth:`my_method` computes my_method ... ... EXAMPLES:: ... ... ''' ... pass ... sage: A.my_method <optional abstract method my_method at ...> sage: x = A() sage: x.my_method NotImplemented The official mantra for testing whether an optional abstract method is implemented is:: # Fixme: sage -t complains about indentation below # sage: if x.my_method is not NotImplemented: # ... x.my_method() # ... else: # ... print "x.my_method not available. Let's use some other trick." # ... # x.my_method not available. Let's use some other trick. ..topic: Discussion The policy details are not yet fixed. The purpose of this fist implementation is to let developpers experiment with it and give feedback on what's most practical. The advantage of the current policy is that attempts at using a non implemented methods are caught as early as possible. On the other hand, one cannot use introspection directly to fetch the documentation:: sage: x.my_method? # todo: not implemented Instead one needs to do:: sage: A._my_method? # todo: not implemented This could probably be fixed in :mod:`sage.misc.sageinspect`. TODO: what should be the recommended mantra for existence testing from the class? TODO: should extra information appear in the output? The name of the class? That of the super class where the abstract method is defined? TODO: look for similar decorators on the web, and merge ..topic: Implementation details Technically, an abstract_method is a non-data descriptor (see Invoking Descriptors in the Python reference manual). The syntax ``@abstract_method`` w.r.t. @abstract_method(optional = True) is achieved by a little trick which we test here:: sage: abstract_method(optional = True) <function <lambda> at ...> sage: abstract_method(optional = True)(banner) <optional abstract method banner at ...> sage: abstract_method(banner, optional = True) <optional abstract method banner at ...> """ if f is None: return lambda f: AbstractMethod(f, optional = optional) else: return AbstractMethod(f, optional) | 33e5416d1721f37dec79f92cf64680630e84c1c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/33e5416d1721f37dec79f92cf64680630e84c1c1/abstract_method.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8770,
67,
2039,
12,
74,
273,
599,
16,
3129,
273,
1083,
4672,
436,
8395,
4115,
2590,
225,
12943,
2866,
225,
300,
12176,
74,
10335,
30,
279,
445,
300,
12176,
10444,
10335,
30,
279,
1250,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8770,
67,
2039,
12,
74,
273,
599,
16,
3129,
273,
1083,
4672,
436,
8395,
4115,
2590,
225,
12943,
2866,
225,
300,
12176,
74,
10335,
30,
279,
445,
300,
12176,
10444,
10335,
30,
279,
1250,
... |
'form':lambda: self._parent.parent().getAttributeFormDefault(), | 'form':lambda self: GetSchema(self).getAttributeFormDefault(), | def fromDom(self, node): """ No list or union support """ self.setAttributes(node) contents = self.getContents(node) | 7e1f86e3e32f88ea95d3dcaa301a21593e338485 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/7e1f86e3e32f88ea95d3dcaa301a21593e338485/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
8832,
12,
2890,
16,
756,
4672,
3536,
2631,
666,
578,
7812,
2865,
3536,
365,
18,
542,
2498,
12,
2159,
13,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
628,
8832,
12,
2890,
16,
756,
4672,
3536,
2631,
666,
578,
7812,
2865,
3536,
365,
18,
542,
2498,
12,
2159,
13,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
2,
-100,
-100,
-100,
-100,
... |
sage: R.random_element(5,20) 1/15 + 19/17*t + 10/3*t^2 + 5/2*t^3 + 1/2*t^4 + O(t^5) """ return self(self.__poly_ring.random_element(prec, bound), prec) | sage: R.random_element(10) -1/2 + 2*t - 2/7*t^2 - 25*t^3 - t^4 + 2*t^5 - 4*t^7 - 1/3*t^8 - t^9 + O(t^10) If given no argument, random_element uses default precision of self:: sage: T = PowerSeriesRing(ZZ,'t') sage: T.default_prec() 20 sage: T.random_element() 4 + 2*t - t^2 - t^3 + 2*t^4 + t^5 + t^6 - 2*t^7 - t^8 - t^9 + t^11 - 6*t^12 + 2*t^14 + 2*t^16 - t^17 - 3*t^18 + O(t^20) sage: S = PowerSeriesRing(ZZ,'t', default_prec=4) sage: S.random_element() 2 - t - 5*t^2 + t^3 + O(t^4) Further arguments are passed to the underlying base ring (ticket sage: SZ = PowerSeriesRing(ZZ,'v') sage: SQ = PowerSeriesRing(QQ,'v') sage: SR = PowerSeriesRing(RR,'v') sage: SZ.random_element(x=4, y=6) 4 + 5*v + 5*v^2 + 5*v^3 + 4*v^4 + 5*v^5 + 5*v^6 + 5*v^7 + 4*v^8 + 5*v^9 + 4*v^10 + 4*v^11 + 5*v^12 + 5*v^13 + 5*v^14 + 5*v^15 + 5*v^16 + 5*v^17 + 4*v^18 + 5*v^19 + O(v^20) sage: SZ.random_element(3, x=4, y=6) 5 + 4*v + 5*v^2 + O(v^3) sage: SQ.random_element(3, num_bound=3, den_bound=100) 1/87 - 3/70*v - 3/44*v^2 + O(v^3) sage: SR.random_element(3, max=10, min=-10) 2.85948321262904 - 9.73071330911226*v - 6.60414378519265*v^2 + O(v^3) """ if prec is None: prec = self.default_prec() return self(self.__poly_ring.random_element(prec-1, *args, **kwds), prec) | def random_element(self, prec, bound=None): r""" Return a random power series. | b3346f6cfd70e8266493803a83efcc8a55613862 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/b3346f6cfd70e8266493803a83efcc8a55613862/power_series_ring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2744,
67,
2956,
12,
2890,
16,
13382,
16,
2489,
33,
7036,
4672,
436,
8395,
2000,
279,
2744,
7212,
4166,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2744,
67,
2956,
12,
2890,
16,
13382,
16,
2489,
33,
7036,
4672,
436,
8395,
2000,
279,
2744,
7212,
4166,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
itemtypes = itemtypes + (item.TYPE,) | itemtypes = itemtypes + [item.TYPE,] | def itemRealmChanged(self, a0=None, item=None): if item is None: if self.nocalc: return item = self.itemattrlist[self.currentTabLabel] item.Realm = unicode(self.ItemRealm.currentText()) self.modified = True itemtypes = ItemTypes[self.currentTabLabel] if isinstance(itemtypes, dict): itemtypes = itemtypes[item.Realm] if a0 is not None: if self.ItemType.currentIndex() < len(itemtypes): item.TYPE = itemtypes[self.ItemType.currentIndex()] else: item.TYPE = itemtypes[0] elif item.TYPE not in itemtypes and len(item.TYPE) > 0: itemtypes = itemtypes + (item.TYPE,) self.ItemType.clear() self.ItemType.insertItems(0, itemtypes) if len(item.TYPE) > 0: self.ItemType.setCurrentIndex(itemtypes.index(item.TYPE)) else: item.TYPE = itemtypes[0] self.itemTypeChanged(item=item) | 649e592ca2c76af22f190e4fd1bccceff5b416c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6671/649e592ca2c76af22f190e4fd1bccceff5b416c0/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
22545,
5033,
12,
2890,
16,
279,
20,
33,
7036,
16,
761,
33,
7036,
4672,
309,
761,
353,
599,
30,
309,
365,
18,
82,
23735,
71,
30,
327,
761,
273,
365,
18,
1726,
1747,
1098,
63,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
22545,
5033,
12,
2890,
16,
279,
20,
33,
7036,
16,
761,
33,
7036,
4672,
309,
761,
353,
599,
30,
309,
365,
18,
82,
23735,
71,
30,
327,
761,
273,
365,
18,
1726,
1747,
1098,
63,
2... |
whole filed; for that it is better to use | whole field; for that it is better to use | def subfield(self, alpha, name=None): r""" Return an absolute number field K isomorphic to QQ(alpha) and a map from K to self that sends the generator of K to alpha. | 67af4aea4fb0b7d933ac522219039be3cb30ac4b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/67af4aea4fb0b7d933ac522219039be3cb30ac4b/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29616,
12,
2890,
16,
4190,
16,
508,
33,
7036,
4672,
436,
8395,
2000,
392,
4967,
1300,
652,
1475,
353,
362,
18435,
358,
2238,
53,
12,
5429,
13,
471,
279,
852,
628,
1475,
358,
365,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29616,
12,
2890,
16,
4190,
16,
508,
33,
7036,
4672,
436,
8395,
2000,
392,
4967,
1300,
652,
1475,
353,
362,
18435,
358,
2238,
53,
12,
5429,
13,
471,
279,
852,
628,
1475,
358,
365,
716,
... |
self.__left, self__operator, self.__right = 1, '=', 1 | self.__left, self.__operator, self.__right = 1, '=', 1 | def _rec_get(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids + _rec_get(ids2, table, parent) | 4c2a727132ddc99e1794d594a46d73cfc8ead353 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/4c2a727132ddc99e1794d594a46d73cfc8ead353/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
... |
cert_files[key] = fname | cert_files[key] = str(fname) | def _write_certs_to_disk(self, repoid, cert_data): CONTENT_CERTS_PATH = config.config.get("repos", "content_cert_location") cert_dir = os.path.join(CONTENT_CERTS_PATH, repoid) | b428ab8d14a6e1831427c6d6907ac50abf312d91 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/b428ab8d14a6e1831427c6d6907ac50abf312d91/repo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
24596,
67,
869,
67,
10863,
12,
2890,
16,
2071,
839,
16,
3320,
67,
892,
4672,
12577,
67,
39,
654,
8047,
67,
4211,
273,
642,
18,
1425,
18,
588,
2932,
15564,
3113,
315,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2626,
67,
24596,
67,
869,
67,
10863,
12,
2890,
16,
2071,
839,
16,
3320,
67,
892,
4672,
12577,
67,
39,
654,
8047,
67,
4211,
273,
642,
18,
1425,
18,
588,
2932,
15564,
3113,
315,
1... |
opts, args = getopt.getopt(sys.argv[1:], "", ["help", "file=", "output=", "parentId=", "jobId="]) | opts, args = getopt.getopt(sys.argv[1:], "", ["help", "file=", "output=", "parentId=", "jobId="]) | def main(): """ __main__ """ # parse options try: opts, args = getopt.getopt(sys.argv[1:], "", ["help", "file=", "output=", "parentId=", "jobId="]) except getopt.GetoptError, err: print json.dumps( {'statusQuery': [], 'errors' : [ str(err)+" "+usage() ]} ) sys.exit(2) inputFile = None outputFile = None parent = "" jobList = [] for o, a in opts: if o in ("-h", "--help"): print json.dumps( {'statusQuery': [], 'errors' : [ usage() ]} ) sys.exit() elif o in ("-f", "--file"): inputFile = a elif o in ("-o", "--output"): outputFile = a elif o in ("-p", "--parentId"): parent = a elif o in ("-j", "--jobId"): jobList = a.split(',') else: print json.dumps( {'statusQuery': [], 'errors' : [ "Unknown parameter.\n"+usage() ]} ) sys.exit(2) if inputFile: try: fp = open(inputFile, "r") inputDict = json.load(fp) parent = inputDict['parentId'] jobList = inputDict['jobIdList'] fp.close() except Exception, ex: print json.dumps( {'statusQuery': [], 'errors' : [ "inputFile in unexpected format. "+str(ex) ]} ) sys.exit(2) elif len(parent)==0: print json.dumps( {'statusQuery': [], 'errors' : [ "Missing parentId.\n"+usage() ]} ) sys.exit(2) elif len(jobList)==0: print json.dumps( {'statusQuery': [], 'errors' : [ "At least one jobId is needed.\n"+usage() ]} ) sys.exit(2) # LB data strucutures template = { 'id' : None, 'jobId' : None, 'taskId' : None, 'schedulerId' : None, 'schedulerParentId' : None, 'statusScheduler' : None, 'status' : None, 'statusReason' : None, 'destination' : None, 'lbTimestamp' : None, 'scheduledAtSite' : None, 'startTime' : None, 'stopTime' : None } # jobId for remapping jobIds = {} # parent Ids for status query parentIds = [] # errors list errors = [] # loop! for job in jobList : rJob = deepcopy(template) rJob['schedulerId'] = job rJob['schedulerParentId'] = parent # append in joblist jobIds[ job ] = rJob # update unique parent ids list if rJob['schedulerParentId'] \ not in parentIds: parentIds.append( str(rJob['schedulerParentId'] ) ) lbInstance = GLiteStatusQuery(parentIds[0]) lbInstance.checkJobsBulk( jobIds, parentIds, errors ) # printout json formatted list of status records with errors out_dict = { 'statusQuery': jobIds.values(), 'errors' : errors, } if outputFile: try: fp = open(outputFile, 'w') json.dump(out_dict, fp) fp.close() except Exception, ex: print json.dumps( {'statusQuery': [], 'errors' : [ str(ex) ]} ) sys.exit(2) else: print json.dumps(out_dict) | 8b8690f3af9759a52defc322ed8290d54b4d1240 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/8b8690f3af9759a52defc322ed8290d54b4d1240/GLiteStatusQuery.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
1001,
5254,
972,
3536,
225,
468,
1109,
702,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
23453,
8247,
5201,
3113,
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,
2774,
13332,
3536,
1001,
5254,
972,
3536,
225,
468,
1109,
702,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
23453,
8247,
5201,
3113,
31... |
f.write("%s\n"%pl) | f.write("%s {%s}\n"%(pl,reason)) | def autonomous_problem(pl): if autonomous: f=open('autonomous_problem.dat','a') f.write("%s\n"%pl) f.close() sys.exit(1) | d8f56370c4f35c3f51c6cb6ecbfd0478052c8c10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/d8f56370c4f35c3f51c6cb6ecbfd0478052c8c10/treelang.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2059,
4708,
1481,
67,
18968,
12,
412,
4672,
309,
2059,
4708,
1481,
30,
284,
33,
3190,
2668,
5854,
4708,
1481,
67,
18968,
18,
3404,
17023,
69,
6134,
284,
18,
2626,
27188,
87,
288,
9,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2059,
4708,
1481,
67,
18968,
12,
412,
4672,
309,
2059,
4708,
1481,
30,
284,
33,
3190,
2668,
5854,
4708,
1481,
67,
18968,
18,
3404,
17023,
69,
6134,
284,
18,
2626,
27188,
87,
288,
9,
87... |
print ' '+c+' \\' | sys.stderr.write(' '+c+' \\\n') | def MakeCommand(executable, conf_file, image_file, cat_file=None, stars_file=None, psf_file=None, fitpsf_file=None, shear_file=None): #root, input_prefix = MakeRoot(image_file) root = MakeRoot(image_file) command = \ [executable, conf_file, 'root='+root] #if input_prefix != '': # command.append('input_prefix='+input_prefix) if cat_file is not None: command.append('cat_file='+cat_file) if stars_file is not None: command.append('stars_file='+stars_file) if psf_file is not None: command.append('psf_file='+psf_file) if fitpsf_file is not None: command.append('fitpsf_file='+fitpsf_file) if shear_file is not None: command.append('shear_file='+shear_file) return command | f2cd5c779583c2f63b6d536dbfab856040b9817b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6617/f2cd5c779583c2f63b6d536dbfab856040b9817b/wl-run.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
2189,
12,
17751,
16,
2195,
67,
768,
16,
1316,
67,
768,
16,
6573,
67,
768,
33,
7036,
16,
24084,
67,
768,
33,
7036,
16,
28687,
67,
768,
33,
7036,
16,
4845,
1121,
74,
67,
768,
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,
4344,
2189,
12,
17751,
16,
2195,
67,
768,
16,
1316,
67,
768,
16,
6573,
67,
768,
33,
7036,
16,
24084,
67,
768,
33,
7036,
16,
28687,
67,
768,
33,
7036,
16,
4845,
1121,
74,
67,
768,
3... |
class PyFilterTests(FilterTests): | class PyFilterTests(BaseTest, FilterTests): | def test_filterwarnings(self): # Test filterwarnings(). # Implicitly also tests resetwarnings(). with test_support.catch_warning(self.module) as w: self.module.filterwarnings("error", "", Warning, "", 0) self.assertRaises(UserWarning, self.module.warn, 'convert to error') | 270c8f6e48b1d2abc6701cad20b23c6ecc1876d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/270c8f6e48b1d2abc6701cad20b23c6ecc1876d9/test_warnings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2188,
12103,
12,
2890,
4672,
468,
7766,
1034,
12103,
7675,
468,
26142,
715,
2546,
7434,
2715,
12103,
7675,
598,
1842,
67,
13261,
18,
14683,
67,
8551,
12,
2890,
18,
2978,
13,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2188,
12103,
12,
2890,
4672,
468,
7766,
1034,
12103,
7675,
468,
26142,
715,
2546,
7434,
2715,
12103,
7675,
598,
1842,
67,
13261,
18,
14683,
67,
8551,
12,
2890,
18,
2978,
13,
48... |
MIN_ERR = R('1e-6') | MIN_ERR = R('1e-6') | def heegner_point_height(self, D, prec=2): """ Use the Gross-Zagier formula to compute the Neron-Tate canonical height over K of the Heegner point corresponding to D, as an Interval (since it's computed to some precision using L-functions). | d044a5648ebd5e6728541f0dd4633acd2064b2f4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d044a5648ebd5e6728541f0dd4633acd2064b2f4/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3904,
1332,
1224,
67,
1153,
67,
4210,
12,
2890,
16,
463,
16,
13382,
33,
22,
4672,
3536,
2672,
326,
611,
3984,
17,
62,
346,
2453,
8013,
358,
3671,
326,
423,
264,
265,
17,
56,
340,
737... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3904,
1332,
1224,
67,
1153,
67,
4210,
12,
2890,
16,
463,
16,
13382,
33,
22,
4672,
3536,
2672,
326,
611,
3984,
17,
62,
346,
2453,
8013,
358,
3671,
326,
423,
264,
265,
17,
56,
340,
737... |
linenos='inline', encoding=encoding) | linenos='inline', encoding=util._encoding) | def pygments_format(filename, rawtext, forcetext, encoding, stripecount, style): etext = util.tolocal(rawtext) if not forcetext: try: lexer = guess_lexer_for_filename(filename, etext, encoding=util._encoding) except ClassNotFound: lexer = TextLexer(encoding=util._encoding) else: lexer = TextLexer(encoding=util._encoding) formatter = StripedHtmlFormatter(stripecount, style=style, linenos='inline', encoding=encoding) return highlight(etext, lexer, formatter) | 3982db5dadb5e9e0bf31d23cff046ab3c76dc232 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/3982db5dadb5e9e0bf31d23cff046ab3c76dc232/highlight.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2395,
75,
1346,
67,
2139,
12,
3459,
16,
1831,
955,
16,
364,
71,
27830,
16,
2688,
16,
609,
77,
705,
592,
16,
2154,
4672,
3393,
408,
273,
1709,
18,
3490,
23735,
12,
1899,
955,
13,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2395,
75,
1346,
67,
2139,
12,
3459,
16,
1831,
955,
16,
364,
71,
27830,
16,
2688,
16,
609,
77,
705,
592,
16,
2154,
4672,
3393,
408,
273,
1709,
18,
3490,
23735,
12,
1899,
955,
13,
309,... |
tn.append(parser.Text(source)) | tn.children.append(parser.Text(source)) | def __call__(self, source, attributes): from mwlib import parser tn = parser.TagNode("hiero") tn.append(parser.Text(source)) return tn | b0cdc50b990c5b4ad2713c63fa1aeac2622ff46b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/b0cdc50b990c5b4ad2713c63fa1aeac2622ff46b/tagext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1084,
16,
1677,
4672,
628,
14721,
2941,
1930,
2082,
16002,
273,
2082,
18,
1805,
907,
2932,
12266,
2439,
7923,
16002,
18,
5906,
18,
6923,
12,
4288,
18,
1528... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
1991,
972,
12,
2890,
16,
1084,
16,
1677,
4672,
628,
14721,
2941,
1930,
2082,
16002,
273,
2082,
18,
1805,
907,
2932,
12266,
2439,
7923,
16002,
18,
5906,
18,
6923,
12,
4288,
18,
1528... |
logger.warning("can't open file : %s, path: %s, mod: %s", ex, path, f, mod) | logger.warning("can't open file : %s, path: %s, mod: %s", ex, path, mod) | def _open(self, mod='r'): path = os.path.join(self.base_path, self.path) dir = os.path.dirname(path) if not os.path.exists(dir): os.makedirs(dir) | 3a8cd2048e14da8895747e861d79fa24dc1a70dd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/3a8cd2048e14da8895747e861d79fa24dc1a70dd/persistance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
12,
2890,
16,
681,
2218,
86,
11,
4672,
589,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
1969,
67,
803,
16,
365,
18,
803,
13,
1577,
273,
1140,
18,
803,
18,
12287,
12,
803... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3190,
12,
2890,
16,
681,
2218,
86,
11,
4672,
589,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
1969,
67,
803,
16,
365,
18,
803,
13,
1577,
273,
1140,
18,
803,
18,
12287,
12,
803... |
integer representing the index of the matching parenthesis. If no parenthesis matches nothing is returned | Integer representing the index of the matching parenthesis. If no parenthesis matches, return ``None``. | def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | 3579103c46561a615ff8c5756615eee430a5519f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3579103c46561a615ff8c5756615eee430a5519f/dyck_word.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3627,
67,
30628,
12,
2890,
16,
949,
4672,
436,
8395,
2605,
326,
1754,
364,
326,
22311,
716,
1885,
326,
1245,
622,
1754,
12176,
917,
10335,
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,
0,
0,
0,
0,
0,
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,
3627,
67,
30628,
12,
2890,
16,
949,
4672,
436,
8395,
2605,
326,
1754,
364,
326,
22311,
716,
1885,
326,
1245,
622,
1754,
12176,
917,
10335,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
pnode = data['pnode'] | kernelpath = data['kernelpath'] rootpath = data['rootpath'] serialconsole = data['serialconsole'] bootorder = data['bootorder'] imagepath = data['imagepath'] | def create(request, cluster_slug=None): """ Create a new instance Store in DB and Create on given cluster """ user = request.user if not(user.is_superuser or user.perms_on_any(Cluster, ['admin', 'create_vm'])): return HttpResponseForbidden() if cluster_slug is not None: cluster = get_object_or_404(Cluster, slug=cluster_slug) else: cluster = None if request.method == 'POST': form = NewVirtualMachineForm(user, None, request.POST) if form.is_valid(): data = form.cleaned_data cluster = data['cluster'] hostname = data['hostname'] owner = data['owner'] vcpus = data['vcpus'] disk_size = data['disk_size'] ram = data['ram'] disk_template = data['disk_template'] os = data['os'] nictype = data['nictype'] nicmode = data['nic'] pnode = data['pnode'] if disk_template == 'drdb': snode = data['snode'] else: snode = None try: jobid = cluster.rapi.CreateInstance('create', hostname, disk_template, [{"size": disk_size, }],[{nictype: nicmode, }], memory=ram, os=os, vcpus=2, pnode=pnode, snode=snode) vm = VirtualMachine(cluster=cluster, owner=owner, hostname=hostname, disk_size=disk_size, ram=ram, virtual_cpus=vcpus) vm.save() # grant admin permissions to the owner data['grantee'].grant('admin', vm) return HttpResponseRedirect( \ reverse('instance-detail', args=[cluster.slug, vm.hostname])) except GanetiApiError as e: msg = 'Error creating virtual machine on this cluster: %s' % e form._errors["cluster"] = form.error_class([msg]) elif request.method == 'GET': form = NewVirtualMachineForm(user, cluster) return render_to_response('virtual_machine/create.html', { 'form': form, 'user': request.user, }, context_instance=RequestContext(request), ) | 583702ea10c147ed8b5c6e709e75e2e42d0275ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10509/583702ea10c147ed8b5c6e709e75e2e42d0275ee/virtual_machine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2293,
16,
2855,
67,
6436,
33,
7036,
4672,
3536,
1788,
279,
394,
791,
4994,
316,
2383,
471,
1788,
603,
864,
2855,
3536,
729,
273,
590,
18,
1355,
309,
486,
12,
1355,
18,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2293,
16,
2855,
67,
6436,
33,
7036,
4672,
3536,
1788,
279,
394,
791,
4994,
316,
2383,
471,
1788,
603,
864,
2855,
3536,
729,
273,
590,
18,
1355,
309,
486,
12,
1355,
18,
291,
... |
self.nuninst_orig = nuninst_end (nuninst_end, extra) = self.iter_packages(upgrade_me, selected) | else: nuninst_end = None (nuninst_end, extra) = self.iter_packages(upgrade_me, selected, nuninst=nuninst_end) | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | ab0576817151497fdda52a6927ea2e47cb997bd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/ab0576817151497fdda52a6927ea2e47cb997bd6/britney.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
454,
12,
2890,
16,
943,
5979,
33,
20,
16,
1208,
33,
7036,
16,
4209,
33,
7036,
4672,
3536,
22218,
1089,
8419,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
454,
12,
2890,
16,
943,
5979,
33,
20,
16,
1208,
33,
7036,
16,
4209,
33,
7036,
4672,
3536,
22218,
1089,
8419,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def __init__(self, blocks): | def __init__(self, loc, blocks): self.loc = loc | def __init__(self, blocks): self.blocks = blocks | 94506ad601e8639d16184a6d5789d5fc03754d55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10962/94506ad601e8639d16184a6d5789d5fc03754d55/atl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1515,
16,
4398,
4672,
365,
18,
1829,
273,
1515,
365,
18,
7996,
273,
4398,
2,
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,
1001,
2738,
972,
12,
2890,
16,
1515,
16,
4398,
4672,
365,
18,
1829,
273,
1515,
365,
18,
7996,
273,
4398,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
simu.evolve( preOps = [], gen = 1 ) | simu.evolve( gen = 1) | def checkSexMode(ms): '''Check the assignment of sex to offspring''' simu = simulator( population(size=[40]), matingScheme=ms) simu.evolve(initOps = initSex(), gen=1) # return individual sex as a string return ''.join([ind.sexChar() for ind in simu.population(0).individuals()]) | 505ded08bbab01d6828bb201d31e079f6d9e3b55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/401/505ded08bbab01d6828bb201d31e079f6d9e3b55/userGuide.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
55,
338,
2309,
12,
959,
4672,
9163,
1564,
326,
6661,
434,
19631,
358,
21174,
11638,
26418,
3142,
89,
273,
3142,
11775,
12,
11209,
12,
1467,
22850,
7132,
65,
3631,
312,
1776,
9321,
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,
866,
55,
338,
2309,
12,
959,
4672,
9163,
1564,
326,
6661,
434,
19631,
358,
21174,
11638,
26418,
3142,
89,
273,
3142,
11775,
12,
11209,
12,
1467,
22850,
7132,
65,
3631,
312,
1776,
9321,
3... |
def testresults(self, results=None): """ Return a generator to get the test result for each test item. If not None, the argument results must be a list which will receive the result objects for later usage. """ | def testresults(self): """Return a generator to get the test result for each test item.""" | def testresults(self, results=None): """ Return a generator to get the test result for each test item. | 9eda75a437b832ee36f3b060a0b5c04e98a8ebb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/9eda75a437b832ee36f3b060a0b5c04e98a8ebb8/newtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
4717,
12,
2890,
16,
1686,
33,
7036,
4672,
3536,
2000,
279,
4456,
358,
336,
326,
1842,
563,
364,
1517,
1842,
761,
18,
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,
1842,
4717,
12,
2890,
16,
1686,
33,
7036,
4672,
3536,
2000,
279,
4456,
358,
336,
326,
1842,
563,
364,
1517,
1842,
761,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
author = document.header[i].split(' ') name = '\"\"' if len(author) >= 2: name = author[1] email = '' if len(author) == 3: email = author[2] document.header[i] = "\\author %i %s %s" % (j, name, email) | r = re.compile(r'(\\author) (\".*\")\s?(.*)$') m = r.match(document.header[i]) if m != None: name = m.group(2) email = '' if m.lastindex == 3: email = m.group(3) document.header[i] = "\\author %i %s %s" % (j, name, email) | def convert_author_id(document): " Add the author_id to the \\author definition and make sure 0 is not used" i = 0 j = 1 while True: i = find_token(document.header, "\\author", i) if i == -1: break author = document.header[i].split(' ') name = '\"\"' if len(author) >= 2: name = author[1] email = '' if len(author) == 3: email = author[2] document.header[i] = "\\author %i %s %s" % (j, name, email) j = j + 1 i = i + 1 k = 0 while True: k = find_token(document.body, "\\change_", k) if k == -1: break change = document.body[k].split(' '); if len(change) == 3: type = change[0] author_id = int(change[1]) time = change[2] document.body[k] = "%s %i %s" % (type, author_id + 1, time) k = k + 1 | 716143d3d47769c2fe92adcf58e034c4a7857135 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/716143d3d47769c2fe92adcf58e034c4a7857135/lyx_2_0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
4161,
67,
350,
12,
5457,
4672,
315,
1436,
326,
2869,
67,
350,
358,
326,
1736,
4161,
2379,
471,
1221,
3071,
374,
353,
486,
1399,
6,
277,
273,
374,
525,
273,
404,
1323,
1053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
4161,
67,
350,
12,
5457,
4672,
315,
1436,
326,
2869,
67,
350,
358,
326,
1736,
4161,
2379,
471,
1221,
3071,
374,
353,
486,
1399,
6,
277,
273,
374,
525,
273,
404,
1323,
1053,
... |
answer = wikipedia.input(u"What should be done [(a)ccept, (r)eject, (g)ive up, accept a(l)l] :") | answer = wikipedia.inputChoice(u'What should be done?', ['accept', 'reject', 'give up', 'accept all'], ['a', 'r', 'G', 'l'], 'G') | def assemble(self): # No errors have been seen so far nerr = 0 # Build up a dictionary of all links found, with the site as key. # Each value will be a list. mysite = wikipedia.getSite() new = {} for pl in self.done.keys(): site = pl.site() if site == mysite and pl.exists() and not pl.isRedirectPage(): if pl != self.inpl: self.problem("Found link to %s" % pl.aslink() ) self.whereReport(pl) nerr += 1 elif pl.exists() and not pl.isRedirectPage(): if site in new: new[site].append(pl) else: new[site] = [pl] # See if new{} contains any problematic values result = {} for k, v in new.items(): if len(v) > 1: nerr += 1 self.problem("Found more than one link for %s"%k) if nerr == 0 and len( self.foundin[self.inpl] ) == 0 and len(new) != 0: self.problem(u'None of %i other languages refers back to %s' % (len(new), self.inpl.aslink())) # If there are any errors, we need to go through all # items manually. if nerr > 0: | 6b8ea9c735b1ac81d36c149cb1ad028fdb959a3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/6b8ea9c735b1ac81d36c149cb1ad028fdb959a3b/interwiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19540,
12,
2890,
4672,
468,
2631,
1334,
1240,
2118,
5881,
1427,
10247,
290,
370,
273,
374,
468,
3998,
731,
279,
3880,
434,
777,
4716,
1392,
16,
598,
326,
2834,
487,
498,
18,
468,
8315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19540,
12,
2890,
4672,
468,
2631,
1334,
1240,
2118,
5881,
1427,
10247,
290,
370,
273,
374,
468,
3998,
731,
279,
3880,
434,
777,
4716,
1392,
16,
598,
326,
2834,
487,
498,
18,
468,
8315,
... |
endtime = time(None) | endtime = time(0) | def measuretime(space, repetitions, w_callable): if repetitions <= 0: w_DemoError = get(space, 'DemoError') msg = "repetition count must be > 0" raise OperationError(w_DemoError, space.wrap(msg)) starttime = time(None) for i in range(repetitions): space.call_function(w_callable) endtime = time(None) return space.wrap(endtime - starttime) | aa237d44811b09853f92a655efefe94861f6ffec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/aa237d44811b09853f92a655efefe94861f6ffec/demo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6649,
957,
12,
2981,
16,
22265,
5029,
16,
341,
67,
7293,
4672,
309,
22265,
5029,
1648,
374,
30,
341,
67,
27126,
668,
273,
336,
12,
2981,
16,
296,
27126,
668,
6134,
1234,
273,
315,
266,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6649,
957,
12,
2981,
16,
22265,
5029,
16,
341,
67,
7293,
4672,
309,
22265,
5029,
1648,
374,
30,
341,
67,
27126,
668,
273,
336,
12,
2981,
16,
296,
27126,
668,
6134,
1234,
273,
315,
266,... |
self.assertRaises(Queue.Empty, self.done.get, True, 0.2) | self.assertRaises(Queue.Empty, self.done.get_nowait) | def testExclusiveBlocksExclusive(self): _decoratorlock.acquire() Thread(target=self._doItExclusive).start() # give it a bit of time to check that it's not actually doing anything self.assertRaises(Queue.Empty, self.done.get, True, 0.2) _decoratorlock.release() self.assert_(self.done.get(True, 1)) | 4607c978b8f973b63c49547f1b8d6061fdbd78d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/4607c978b8f973b63c49547f1b8d6061fdbd78d3/ganeti.locking_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
17075,
6450,
17075,
12,
2890,
4672,
389,
19142,
739,
18,
1077,
1039,
1435,
4884,
12,
3299,
33,
2890,
6315,
2896,
7193,
17075,
2934,
1937,
1435,
468,
8492,
518,
279,
2831,
434,
813,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17075,
6450,
17075,
12,
2890,
4672,
389,
19142,
739,
18,
1077,
1039,
1435,
4884,
12,
3299,
33,
2890,
6315,
2896,
7193,
17075,
2934,
1937,
1435,
468,
8492,
518,
279,
2831,
434,
813,
... |
include_dirs = spec.get('include_dirs') | include_dirs = config.get('include_dirs') | def GenerateSConscript(output_filename, build_file, spec): print 'Generating %s' % output_filename fp = open(output_filename, 'w') fp.write(header) # fp.write('\n' + 'env = env.Clone(\n') defines = spec.get('defines') if defines: WriteList(fp, map(repr, defines), prefix=' ', preamble=' CPPDEFINES = [\n ', postamble='\n ],\n') include_dirs = spec.get('include_dirs') if include_dirs: WriteList(fp, map(repr, include_dirs), prefix=' ', preamble=' CPPPATH = [\n ', postamble='\n ],\n') libraries = spec.get('libraries') if libraries: WriteList(fp, map(repr, libraries), prefix=' ', preamble=' LIBS = [\n ', postamble='\n ],\n') fp.write(')\n') sources = spec['sources'] if sources: pre = '\ninput_files = ChromeFileList([\n ' WriteList(fp, map(repr, sources), preamble=pre, postamble=',\n])\n') t = spec.get('type') if not t in (None, 'none'): builder = { 'executable' : 'ChromeProgram', 'static_library' : 'ChromeStaticLibrary', }[t] fmt = 'env.%s(\'%s\', input_files)\n' fp.write('\n') fp.write(fmt % (builder, spec['target_name'])) fp.close() | 15476c30f57cd50b05ba9a75f70f3cfc8ba23e1e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/15476c30f57cd50b05ba9a75f70f3cfc8ba23e1e/scons.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6654,
55,
442,
4263,
12,
2844,
67,
3459,
16,
1361,
67,
768,
16,
857,
4672,
1172,
296,
21755,
738,
87,
11,
738,
876,
67,
3459,
225,
4253,
273,
1696,
12,
2844,
67,
3459,
16,
296,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6654,
55,
442,
4263,
12,
2844,
67,
3459,
16,
1361,
67,
768,
16,
857,
4672,
1172,
296,
21755,
738,
87,
11,
738,
876,
67,
3459,
225,
4253,
273,
1696,
12,
2844,
67,
3459,
16,
296,
91,
... |
self.body.append ('\\end{enumerate}\n' ) def astext (self): if self.pdfinfo is not None and self.pdfauthor: self.pdfinfo.append ('pdfauthor={%s}' % self.pdfauthor) if self.pdfinfo: pdfinfo = '\\hypersetup{\n' + ',\n'.join (self.pdfinfo) + '\n}\n' else: pdfinfo = '' head = '\\title{%s}\n' % self.title if self.auth_stack: auth_head = '\\author{%s}\n' % ' \\and\n'.join (\ ['~\\\\\n'.join (auth_lines) for auth_lines in self.auth_stack]) head += auth_head if self.date: date_head = '\\date{%s}\n' % self.date head += date_head return ''.join (self.head_prefix + [head] + self.head + [pdfinfo] + self.body_prefix + self.body + self.body_suffix) | self.out.append ('\\end{enumerate}\n' ) | def depart_enumerated_list (self, node): if ('contents' in getattr (self, 'topic_classes', [])): self.body.append ('\\end{list}\n') else: self.body.append ('\\end{enumerate}\n' ) | 37db8ffa549b63ebad9bbc3310aeafe2a276f03b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5620/37db8ffa549b63ebad9bbc3310aeafe2a276f03b/rst2beamer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26000,
67,
7924,
19007,
67,
1098,
261,
2890,
16,
756,
4672,
309,
7707,
3980,
11,
316,
3869,
261,
2890,
16,
296,
10476,
67,
4701,
2187,
5378,
3719,
30,
365,
18,
3432,
18,
6923,
7707,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26000,
67,
7924,
19007,
67,
1098,
261,
2890,
16,
756,
4672,
309,
7707,
3980,
11,
316,
3869,
261,
2890,
16,
296,
10476,
67,
4701,
2187,
5378,
3719,
30,
365,
18,
3432,
18,
6923,
7707,
16... |
InstallService(serviceClassString, serviceName, serviceDisplayName, serviceDeps = serviceDeps, startType=startup, userName=userName,password=password, exeName=exeName, perfMonIni=perfMonIni,perfMonDll=perfMonDll) | InstallService(serviceClassString, serviceName, serviceDisplayName, serviceDeps = serviceDeps, startType=startup, bRunInteractive=interactive, userName=userName,password=password, exeName=exeName, perfMonIni=perfMonIni,perfMonDll=perfMonDll) | def HandleCommandLine(cls, serviceClassString = None, argv = None, customInstallOptions = "", customOptionHandler = None): """Utility function allowing services to process the command line. Allows standard commands such as 'start', 'stop', 'debug', 'install' etc. Install supports 'standard' command line options prefixed with '--', such as --username, --password, etc. In addition, the function allows custom command line options to be handled by the calling function. """ err = 0 if argv is None: argv = sys.argv if len(argv)<=1: usage() serviceName = cls._svc_name_ serviceDisplayName = cls._svc_display_name_ if serviceClassString is None: serviceClassString = GetServiceClassString(cls) # First we process all arguments which require access to the # arg list directly if argv[1]=="start": print "Starting service %s" % (serviceName) try: StartService(serviceName, argv[2:]) except win32service.error, (hr, fn, msg): print "Error starting service: %s" % msg elif argv[1]=="restart": print "Restarting service %s" % (serviceName) RestartService(serviceName, argv[2:]) elif argv[1]=="debug": svcArgs = string.join(sys.argv[2:]) exeName = LocateSpecificServiceExe(serviceName) try: os.system("%s -debug %s %s" % (exeName, serviceName, svcArgs)) # ^C is used to kill the debug service. Sometimes Python also gets # interrupted - ignore it... except KeyboardInterrupt: pass else: # Pull apart the command line import getopt try: opts, args = getopt.getopt(argv[1:], customInstallOptions,["password=","username=","startup=","perfmonini=", "perfmondll="]) except getopt.error, details: print details usage() userName = None password = None perfMonIni = perfMonDll = None startup = None for opt, val in opts: if opt=='--username': userName = val elif opt=='--password': password = val elif opt=='--perfmonini': perfMonIni = val elif opt=='--perfmondll': perfMonDll = val elif opt=='--startup': map = {"manual": win32service.SERVICE_DEMAND_START, "auto" : win32service.SERVICE_AUTO_START, "disabled": win32service.SERVICE_DISABLED} try: startup = map[string.lower(val)] except KeyError: print "'%s' is not a valid startup option" % val if len(args)<>1: usage() arg=args[0] knownArg = 0 if arg=="install": knownArg = 1 try: serviceDeps = cls._svc_deps_ except AttributeError: serviceDeps = None try: exeName = cls._exe_name_ except AttributeError: exeName = None # Default to PythonService.exe print "Installing service %s to Python class %s" % (serviceName,serviceClassString) # Note that we install the service before calling the custom option # handler, so if the custom handler fails, we have an installed service (from NT's POV) # but is unlikely to work, as the Python code controlling it failed. Therefore # we remove the service if the first bit works, but the second doesnt! try: InstallService(serviceClassString, serviceName, serviceDisplayName, serviceDeps = serviceDeps, startType=startup, userName=userName,password=password, exeName=exeName, perfMonIni=perfMonIni,perfMonDll=perfMonDll) if customOptionHandler: apply( customOptionHandler, (opts,) ) print "Service installed" except win32service.error, (hr, fn, msg): if hr==winerror.ERROR_SERVICE_EXISTS: arg = "update" # Fall through to the "update" param! else: print "Error installing service: %s (%d)" % (msg, hr) err = hr except ValueError, msg: # Can be raised by custom option handler. print "Error installing service: %s" % str(msg) err = -1 # xxx - maybe I should remove after _any_ failed install - however, # xxx - it may be useful to help debug to leave the service as it failed. # xxx - We really _must_ remove as per the comments above... # As we failed here, remove the service, so the next installation # attempt works. try: RemoveService(serviceName) except win32api.error: print "Warning - could not remove the partially installed service." if arg == "update": knownArg = 1 try: serviceDeps = cls._svc_deps_ except AttributeError: serviceDeps = None try: exeName = cls._exe_name_ except AttributeError: exeName = None # Default to PythonService.exe print "Changing service configuration" try: ChangeServiceConfig(serviceClassString, serviceName, serviceDeps = serviceDeps, startType=startup, userName=userName,password=password, exeName=exeName, displayName = serviceDisplayName, perfMonIni=perfMonIni,perfMonDll=perfMonDll) print "Service updated" except win32service.error, (hr, fn, msg): print "Error changing service configuration: %s (%d)" % (msg,hr) err = hr elif arg=="remove": knownArg = 1 print "Removing service %s" % (serviceName) try: RemoveService(serviceName) print "Service removed" except win32service.error, (hr, fn, msg): print "Error removing service: %s (%d)" % (msg,hr) err = hr elif arg=="stop": knownArg = 1 print "Stopping service %s" % (serviceName) try: StopService(serviceName) except win32service.error, (hr, fn, msg): print "Error stopping service: %s (%d)" % (msg,hr) err = hr if not knownArg: err = -1 print "Unknown command - '%s'" % arg usage() return err | 3dd7eeb388ec6de4c9af6c4191561ef1ccbe50cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/3dd7eeb388ec6de4c9af6c4191561ef1ccbe50cb/win32serviceutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
21391,
12,
6429,
16,
1156,
797,
780,
273,
599,
16,
5261,
273,
599,
16,
1679,
6410,
1320,
273,
23453,
1679,
1895,
1503,
273,
599,
4672,
3536,
6497,
445,
15632,
4028,
358,
1207,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
21391,
12,
6429,
16,
1156,
797,
780,
273,
599,
16,
5261,
273,
599,
16,
1679,
6410,
1320,
273,
23453,
1679,
1895,
1503,
273,
599,
4672,
3536,
6497,
445,
15632,
4028,
358,
1207,
326,... |
return ExtensionFactory(modulus, prec, print_mode, halt, names, check = True) | return ExtensionFactory(self, modulus, prec, print_mode, halt, names, check = True) | def extension(self, modulus, prec = None, names = None, print_mode = None, halt = None): """ Create an extension of this p-adic ring. | adf23321ab0d8113b262a7379774d8ec4086f577 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/adf23321ab0d8113b262a7379774d8ec4086f577/padic_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2710,
12,
2890,
16,
24770,
16,
13382,
273,
599,
16,
1257,
273,
599,
16,
1172,
67,
3188,
273,
599,
16,
18389,
273,
599,
4672,
3536,
1788,
392,
2710,
434,
333,
293,
17,
20333,
9221,
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,
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,
2710,
12,
2890,
16,
24770,
16,
13382,
273,
599,
16,
1257,
273,
599,
16,
1172,
67,
3188,
273,
599,
16,
18389,
273,
599,
4672,
3536,
1788,
392,
2710,
434,
333,
293,
17,
20333,
9221,
18,
... |
if type(baseDir) not in SeqTypes | if type(baseDir) not in SeqTypes: | def recursiveImport(modulename, baseDir=None, noCWD=0, debug=0): """Dynamically imports possible packagized module, or raises ImportError""" import imp parts = string.split(modulename, '.') name = parts[0] if baseDir is None: path = sys.path[:] else: if type(baseDir) not in SeqTypes path = [baseDir] else: path = list(baseDir) path = filter(None,basDir) if noCWD: if '.' in path: path.remove('.') abspath = os.path.abspath('.') if abspath in path: path.remove(abspath) else: if '.' not in path: path.insert(0,'.') if debug: import pprint pp = pprint.pprint print 'path=',pp(path) #make import errors a bit more informative fullName = name try: (file, pathname, description) = imp.find_module(name, path) childModule = parentModule = imp.load_module(name, file, pathname, description) if debug: print 'imported module = %s' % parentModule for name in parts[1:]: fullName = fullName + '.' + name if debug: print 'trying part %s' % name (file, pathname, description) = imp.find_module(name, [os.path.dirname(parentModule.__file__)]) childModule = imp.load_module(fullName, file, pathname, description) if debug: print 'imported module = %s' % childModule setattr(parentModule, name, childModule) parentModule = childModule except ImportError: msg = "cannot import '%s' while attempting recursive import of '%s'" % (fullName, modulename) if baseDir: msg = msg + " under paths '%s'" % `path` raise ImportError, msg return childModule | eecd24f7b9ee5610492e4a85ab2a74294420343e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/eecd24f7b9ee5610492e4a85ab2a74294420343e/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5904,
5010,
12,
1711,
332,
1069,
16,
14078,
33,
7036,
16,
1158,
12844,
40,
33,
20,
16,
1198,
33,
20,
4672,
3536,
9791,
1230,
10095,
3323,
2298,
346,
1235,
1605,
16,
578,
14183,
11308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5904,
5010,
12,
1711,
332,
1069,
16,
14078,
33,
7036,
16,
1158,
12844,
40,
33,
20,
16,
1198,
33,
20,
4672,
3536,
9791,
1230,
10095,
3323,
2298,
346,
1235,
1605,
16,
578,
14183,
11308,
... |
for i in range(2,8): | for i in range(10): | def ajax_getcredits(request): ret = [] if request.method == u'POST': for i in range(2,8): ret.append({'username' : "user" + str(i+1), 'percent' : i+i / 2}) print "returning ret: ", str(ret) json = simplejson.dumps(ret) print "json object is ", str(json) return HttpResponse(json, mimetype='application/json') | 4d046e401ed03bbc6a8fa19f32e1c0d87af7cbc3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/4d046e401ed03bbc6a8fa19f32e1c0d87af7cbc3/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10733,
67,
588,
20610,
1282,
12,
2293,
4672,
325,
273,
5378,
309,
590,
18,
2039,
422,
582,
11,
3798,
4278,
364,
277,
316,
1048,
12,
2163,
4672,
325,
18,
6923,
12590,
11,
5053,
11,
294,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10733,
67,
588,
20610,
1282,
12,
2293,
4672,
325,
273,
5378,
309,
590,
18,
2039,
422,
582,
11,
3798,
4278,
364,
277,
316,
1048,
12,
2163,
4672,
325,
18,
6923,
12590,
11,
5053,
11,
294,... |
SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[24]>, line 8) | SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[24]>, line 10) | ... def f(i): | ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b/test_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
540,
1652,
284,
12,
77,
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,
1372,
540,
1652,
284,
12,
77,
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,... |
elif "icmp" in self: text.append(self["icmp"].description) | def createDescription(self): t0 = self["/packet[0]"].getTimestamp() | 8f3c3b24bb107ec49d9c0cd7887b46115da4de59 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/8f3c3b24bb107ec49d9c0cd7887b46115da4de59/tcpdump.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
3291,
12,
2890,
4672,
268,
20,
273,
365,
9614,
19,
11482,
63,
20,
4279,
8009,
588,
4921,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
3291,
12,
2890,
4672,
268,
20,
273,
365,
9614,
19,
11482,
63,
20,
4279,
8009,
588,
4921,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
if platform.system() == "FreeBSD": cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else ' \ + 'tempcrontab=`mktemp -t tempcrontab` && crontab -l | sed ' \ + '\'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep else: cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else tempcrontab=`mktemp` && ' \ + 'crontab -l | sed \'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep | cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else ' \ + 'modifiedCrontab=`mktemp -t tempcrontab.XXXXX` && crontab -l | ' \ + 'sed \'/start_seattle.sh/d\' > ${modifiedCrontab} && ' \ + 'crontab ${modifiedCrontab} && rm -rf ${modifiedCrontab}; fi' \ + os.linesep | def add_seattle_to_crontab(): """ <Purpose> Adds an entry to the crontab to run seattle automatically at boot. <Arguments> None. <Exceptions> OSError if cron is not installed on this system. <Side Effects> Adds an entry to the crontab. <Returns> True if an entry for seattle was successfully added to the crontab, False otherwise. """ # Check to see if the crontab has already been modified to run seattle. crontab_contents_stdout,crontab_contents_stderr = \ subprocess.Popen(["crontab", "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() if get_starter_file_name() in crontab_contents_stdout: raise AlreadyInstalledError("An entry for seattle was already detected " \ + "in the crontab.") # Since seattle is not already installed, modify crontab to run seattle at # boot. # Get the service vessel where standard error produced from cron will be # written. service_vessel = servicelogger.get_servicevessel() # The crontab entry is different if running on FreeBSD because the mktemp # command works differently on this system. if platform.system() == "FreeBSD": cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else ' \ + 'tempcrontab=`mktemp -t tempcrontab` && crontab -l | sed ' \ + '\'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep else: cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else tempcrontab=`mktemp` && ' \ + 'crontab -l | sed \'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep # Generate a temp file with the user's crontab plus our task. temp_crontab_file = tempfile.NamedTemporaryFile() temp_crontab_file.write(crontab_contents_stdout) temp_crontab_file.write(cron_line_entry) temp_crontab_file.flush() # Now, replace the crontab with that temp file and remove(close) the # tempfile. replace_crontab = subprocess.Popen(["crontab",temp_crontab_file.name], stdout=subprocess.PIPE, stderr=subprocess.PIPE) replace_crontab.wait() temp_crontab_file.close() # Finally, confirm that seattle was successfully added to the crontab and note # the result in the configuration file ('nodeman.cfg'). config = persist.restore_object('nodeman.cfg') crontab_contents_stdout,crontab_contents_stderr = \ subprocess.Popen(["crontab", "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() if get_starter_file_name() in crontab_contents_stdout: config['crontab_updated_for_2009_installer'] = True persist.commit_object(config,'nodeman.cfg') return True else: # Although the default setting for # config['crontab_updated_for_2009_installer'] = False, it should still be # set in the event that there was a previous installer which set this value # to True, but now for whatever reason, installation in the crontab failed. config['crontab_updated_for_2009_installer'] = False persist.commit_object(config,'nodeman.cfg') return False | 3b9f9b5f24eaa242690e70099768c54c417399d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/3b9f9b5f24eaa242690e70099768c54c417399d9/seattleinstaller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
307,
4558,
298,
67,
869,
67,
3353,
30335,
13332,
3536,
411,
10262,
4150,
34,
15605,
392,
1241,
358,
326,
4422,
30335,
358,
1086,
695,
4558,
298,
6635,
622,
4835,
18,
225,
411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
307,
4558,
298,
67,
869,
67,
3353,
30335,
13332,
3536,
411,
10262,
4150,
34,
15605,
392,
1241,
358,
326,
4422,
30335,
358,
1086,
695,
4558,
298,
6635,
622,
4835,
18,
225,
411,
... |
return pywbem.CIMClass(cname, properties=props, methods=methods, | cc = pywbem.CIMClass(cname, properties=props, methods=methods, | def _assoc_or_indic_decl(quals, p): """(refer to grammer rules on p_assocDeclaration and p_indicDeclaration)""" superclass = None alias = None cname = p[6] if p[7] == '{': cfl = p[8] elif p[7][0] == '$': # alias alias = p[7][1:] if p[8] == '{': cfl = p[9] else: superclass = p[8] cfl = p[10] else: superclass = p[7] cfl = p[9] props = {} methods = {} for item in cfl: item.class_origin = came if isinstance(item, pywbem.CIMMethod): methods[item.name] = item else: props[item.name] = item quals = dict([(x.name, x) for x in quals]) return pywbem.CIMClass(cname, properties=props, methods=methods, superclass=superclass, qualifiers=quals) | b57e4134d5c4d753ca79d65a4ed90aec65ad0ee7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10648/b57e4134d5c4d753ca79d65a4ed90aec65ad0ee7/mof_compiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14578,
67,
280,
67,
728,
335,
67,
8840,
12,
6360,
16,
293,
4672,
3536,
12,
266,
586,
358,
24663,
6592,
2931,
603,
293,
67,
14578,
6094,
471,
293,
67,
728,
335,
6094,
15574,
12098,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14578,
67,
280,
67,
728,
335,
67,
8840,
12,
6360,
16,
293,
4672,
3536,
12,
266,
586,
358,
24663,
6592,
2931,
603,
293,
67,
14578,
6094,
471,
293,
67,
728,
335,
6094,
15574,
12098,... |
selectedBox.Draw(dc, self) | selectedBox.Draw(dc, boundingRect, self) def CheckConflicts(self): for itemIndex, canvasItem in enumerate(self.canvasItemList): for innerItem in self.canvasItemList[itemIndex+1:]: if innerItem.GetItem().startTime >= canvasItem.GetItem().endTime: break canvasItem.AddConflict(innerItem) canvasItem.CalculateConflictDepth() | def DrawCells(self, dc): self._doDrawingCalculations() self.canvasItemList = [] | 40c8f7512b75feb030955e81ea86b74863b4ac0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/40c8f7512b75feb030955e81ea86b74863b4ac0c/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
10505,
12,
2890,
16,
6744,
4672,
365,
6315,
2896,
26885,
4844,
1012,
1435,
365,
18,
15424,
1180,
682,
273,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
10184,
10505,
12,
2890,
16,
6744,
4672,
365,
6315,
2896,
26885,
4844,
1012,
1435,
365,
18,
15424,
1180,
682,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
sage: contour_plot(f, (-2, 2), (-2, 2), contours=(1.0,), fill=False) | sage: contour_plot(f, (-2, 2), (-2, 2), contours=(1.0,), fill=False, aspect_ratio=1) We can change the style of the lines:: sage: contour_plot(f, (-2,2), (-2,2), fill=False, linewidths=10) sage: contour_plot(f, (-2,2), (-2,2), fill=False, linestyles='dashdot') We can add labels and play with them:: sage: contour_plot(y^2 + 1 - x^3 - x, (x,-pi,pi), (y,-pi,pi), fill=False, cmap='hsv', labels=True) sage: contour_plot(y^2 + 1 - x^3 - x, (x,-pi,pi), (y,-pi,pi), fill=False, cmap='hsv', labels=True, label_fmt="%1.0f", label_colors='black') sage: contour_plot(y^2 + 1 - x^3 - x, (x,-pi,pi), (y,-pi,pi), fill=False, cmap='hsv', labels=True, label_fontsize=18) If we do not specify fill=False, then the label and line options are ignored:: sage: contour_plot(f, (-2,2), (-2,2), labels=True, linestyles='dashed') | def contour_plot(f, xrange, yrange, **options): r""" ``contour_plot`` takes a function of two variables, `f(x,y)` and plots contour lines of the function over the specified ``xrange`` and ``yrange`` as demonstrated below. ``contour_plot(f, (xmin, xmax), (ymin, ymax), ...)`` INPUT: - ``f`` -- a function of two variables - ``(xmin, xmax)`` -- 2-tuple, the range of ``x`` values OR 3-tuple ``(x,xmin,xmax)`` - ``(ymin, ymax)`` -- 2-tuple, the range of ``y`` values OR 3-tuple ``(y,ymin,ymax)`` The following inputs must all be passed in as named parameters: - ``plot_points`` -- integer (default: 100); number of points to plot in each direction of the grid. For old computers, 25 is fine, but should not be used to verify specific intersection points. - ``fill`` -- bool (default: ``True``), whether to color in the area between contour lines - ``cmap`` -- a colormap (default: ``'gray'``), the name of a predefined colormap, a list of colors or an instance of a matplotlib Colormap. Type: ``import matplotlib.cm; matplotlib.cm.datad.keys()`` for available colormap names. - ``contours`` -- integer or list of numbers (default: ``None``): If a list of numbers is given, then this specifies the contour levels to use. If an integer is given, then this many contour lines are used, but the exact levels are determined automatically. If ``None`` is passed (or the option is not given), then the number of contour lines is determined automatically, and is usually about 5. EXAMPLES: Here we plot a simple function of two variables. Note that since the input function is an expression, we need to explicitly declare the variables in 3-tuples for the range:: sage: x,y = var('x,y') sage: contour_plot(cos(x^2+y^2), (x, -4, 4), (y, -4, 4)) Here we change the ranges and add some options:: sage: x,y = var('x,y') sage: contour_plot((x^2)*cos(x*y), (x, -10, 5), (y, -5, 5), fill=False, plot_points=150) An even more complicated plot:: sage: x,y = var('x,y') sage: contour_plot(sin(x^2 + y^2)*cos(x)*sin(y), (x, -4, 4), (y, -4, 4),plot_points=150) Some elliptic curves, but with symbolic endpoints. In the first example, the plot is rotated 90 degrees because we switch the variables x,y:: sage: x,y = var('x,y') sage: contour_plot(y^2 + 1 - x^3 - x, (y,-pi,pi), (x,-pi,pi)) sage: contour_plot(y^2 + 1 - x^3 - x, (x,-pi,pi), (y,-pi,pi)) We can play with the contour levels:: sage: x,y = var('x,y') sage: f(x,y) = x^2 + y^2 sage: contour_plot(f, (-2, 2), (-2, 2)) sage: contour_plot(f, (-2, 2), (-2, 2), contours=2, cmap=[(1,0,0), (0,1,0), (0,0,1)]) sage: contour_plot(f, (-2, 2), (-2, 2), contours=(0.1, 1.0, 1.2, 1.4), cmap='hsv') sage: contour_plot(f, (-2, 2), (-2, 2), contours=(1.0,), fill=False) This should plot concentric circles centered at the origin:: sage: x,y = var('x,y') sage: contour_plot(x^2+y^2-2,(x,-1,1), (y,-1,1)).show(aspect_ratio=1) Extra options will get passed on to show(), as long as they are valid:: sage: f(x, y) = cos(x) + sin(y) sage: contour_plot(f, (0, pi), (0, pi), axes=True) sage: contour_plot(f, (0, pi), (0, pi)).show(axes=True) # These are equivalent Note that with ``fill=False`` and grayscale contours, there is the possibility of confusion between the contours and the axes, so use ``fill=False`` together with ``axes=True`` with caution:: sage: contour_plot(f, (-pi, pi), (-pi, pi), fill=False, axes=True) TESTS: To check that ticket 5221 is fixed, note that this has three curves, not two:: sage: x,y = var('x,y') sage: contour_plot(x-y^2,(x,-5,5),(y,-3,3),contours=[-4,-2,0], fill=False) """ from sage.plot.plot import Graphics from sage.plot.misc import setup_for_eval_on_grid g, ranges = setup_for_eval_on_grid([f], [xrange, yrange], options['plot_points']) g = g[0] xrange,yrange=[r[:2] for r in ranges] xy_data_array = [[g(x, y) for x in xsrange(*ranges[0], include_endpoint=True)] for y in xsrange(*ranges[1], include_endpoint=True)] g = Graphics() g._set_extra_kwds(Graphics._extract_kwds_for_show(options, ignore=['xmin', 'xmax'])) g.add_primitive(ContourPlot(xy_data_array, xrange, yrange, options)) return g | c8fbc541f4470707607df5346671b7bd37a4fa08 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/c8fbc541f4470707607df5346671b7bd37a4fa08/contour_plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15332,
67,
4032,
12,
74,
16,
12314,
16,
677,
3676,
16,
2826,
2116,
4672,
436,
8395,
12176,
1213,
477,
67,
4032,
10335,
5530,
279,
445,
434,
2795,
3152,
16,
1375,
74,
12,
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,
15332,
67,
4032,
12,
74,
16,
12314,
16,
677,
3676,
16,
2826,
2116,
4672,
436,
8395,
12176,
1213,
477,
67,
4032,
10335,
5530,
279,
445,
434,
2795,
3152,
16,
1375,
74,
12,
92,
16,
93,
... |
seattlegeni_vessel_list = _call_seattlegeni_func(client.acquire_specific_vessels, type, vesselhandle_list) | seattlegeni_vessel_list = _call_seattlegeni_func(client.acquire_specific_vessels, vesselhandle_list) | def seattlegeni_acquire_specific_vessels(identity, vesselhandle_list): """ <Purpose> Acquire specific vessels from SeattleGENI. This is not an all-or-nothing request. <Arguments> identity The identity to use for communicating with SeattleGENI. vesselhandle_list A list of vesselhandles. Even though the request may be only partially fulfilled, the size of this list must not be greater than the number of vessels the account has available to acquire. <Exceptions> The common SeattleGENI exceptions described in the module comments, as well as: SeattleGENINotEnoughCreditsError If the account does not have enough available vessel credits to fulfill the request. <Side Effects> If successful, zero or more vessels from handlelist have been acquired. <Returns> A list of vesselhandles of the acquired vessels. """ client = _get_seattlegeni_client(identity) seattlegeni_vessel_list = _call_seattlegeni_func(client.acquire_specific_vessels, type, vesselhandle_list) _seattlegeni_cache_node_locations(seattlegeni_vessel_list) return _create_list_from_key_in_dictlist(seattlegeni_vessel_list, "handle") | 323b384c1f1ad03c6d9f5d971a9423ed5e9a268c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7276/323b384c1f1ad03c6d9f5d971a9423ed5e9a268c/experimentlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
695,
4558,
1935,
275,
77,
67,
1077,
1039,
67,
12524,
67,
90,
403,
10558,
12,
10781,
16,
331,
403,
292,
4110,
67,
1098,
4672,
3536,
411,
10262,
4150,
34,
28822,
2923,
331,
403,
10558,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
695,
4558,
1935,
275,
77,
67,
1077,
1039,
67,
12524,
67,
90,
403,
10558,
12,
10781,
16,
331,
403,
292,
4110,
67,
1098,
4672,
3536,
411,
10262,
4150,
34,
28822,
2923,
331,
403,
10558,
6... |
if self._isnan(): context = getcontext() return context._raise_error(InvalidContext) elif self._isinfinity(): raise OverflowError, "Cannot convert infinity to long" | if self._is_special: if self._isnan(): context = getcontext() return context._raise_error(InvalidContext) elif self._isinfinity(): raise OverflowError, "Cannot convert infinity to long" | def __int__(self): """Converts self to a int, truncating if necessary.""" if self._isnan(): context = getcontext() return context._raise_error(InvalidContext) elif self._isinfinity(): raise OverflowError, "Cannot convert infinity to long" if not self: return 0 sign = '-'*self._sign if self._exp >= 0: s = sign + ''.join(map(str, self._int)) + '0'*self._exp return int(s) s = sign + ''.join(map(str, self._int))[:self._exp] return int(s) tmp = list(self._int) tmp.reverse() val = 0 while tmp: val *= 10 val += tmp.pop() return int(((-1) ** self._sign) * val * 10.**int(self._exp)) | 636a6b100fe6083388bc5315758326078abe65b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/636a6b100fe6083388bc5315758326078abe65b4/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
474,
972,
12,
2890,
4672,
3536,
5692,
365,
358,
279,
509,
16,
6956,
1776,
309,
4573,
12123,
309,
365,
6315,
291,
67,
9371,
30,
309,
365,
6315,
291,
13569,
13332,
819,
273,
336,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
474,
972,
12,
2890,
4672,
3536,
5692,
365,
358,
279,
509,
16,
6956,
1776,
309,
4573,
12123,
309,
365,
6315,
291,
67,
9371,
30,
309,
365,
6315,
291,
13569,
13332,
819,
273,
336,
2... |
'articles': [], 'title': 'Helper Functions', 'url': 'helperfunctions' }, { | def docs(): c.loop.articles = [ { 'articles': [ { 'title': 'Getting Started', 'url': 'gettingstarted' }, { 'title': 'Comparison of SUIT to its Alternatives', 'url': 'comparison' }, { 'title': 'Features', 'url': 'features' }, { 'title': 'Reading Docs', 'url': 'readingdocs' }, { 'title': 'Rules', 'url': 'rules' }, { 'title': 'Rules Vs. Functions', 'url': 'rulesvsfunctions' }, { 'title': 'Attributes', 'url': 'attributes' }, { 'title': 'Escaping', 'url': 'escaping' }, { 'title': 'FAQ', 'url': 'faq' }, { 'title': 'History', 'url': 'history' }, { 'title': 'Changelog', 'url': 'changelog' }, { 'title': 'Credits', 'url': 'credits' } ], 'title': 'General', 'url': 'general' }, { 'articles': [ { 'title': 'execute', 'url': 'execute' }, { 'title': 'tokens', 'url': 'tokens' }, { 'title': 'parse', 'url': 'parse' }, { 'title': 'walk', 'url': 'walk' } ], 'title': 'SUIT Functions', 'url': 'suitfunctions' }, { 'articles': [ { 'title': 'SUIT Construct', 'url': 'suitconstruct' }, { 'title': 'Templating Construct', 'url': 'templatingconstruct' }, { 'title': 'BBCode Construct', 'url': 'bbcodeconstruct' } ], 'title': 'Constructs', 'url': 'constructs' }, { 'articles': [ { 'title': 'defaultconfig', 'url': 'defaultconfig' } ], 'title': 'Helper Functions', 'url': 'helperfunctions' }, { 'articles': [ { 'title': 'var', 'url': 'var' }, { 'title': 'if', 'url': 'if' }, { 'title': 'loop', 'url': 'loop' }, { 'title': 'comment', 'url': 'comment' }, { 'title': 'template', 'url': 'template' }, { 'title': 'execute (Templating Rule)', 'url': 'executetemplatingrule' }, { 'title': 'assign', 'url': 'assign' }, { 'title': 'entities', 'url': 'entities' }, { 'title': 'skip', 'url': 'skip' }, { 'title': 'call', 'url': 'call' }, { 'title': 'transform', 'url': 'transform' }, { 'title': 'local', 'url': 'local' }, { 'title': 'try', 'url': 'try' }, { 'title': 'return', 'url': 'return' }, { 'title': 'trim', 'url': 'trim' }, { 'title': 'bracket', 'url': 'bracket' } ], 'title': 'Templating Rules', 'url': 'templatingrules' }, { 'articles': [ { 'title': 'c', 'url': 'c' }, { 'title': 'template (SUITlons Rule)', 'url': 'templatesuitlonsrule' }, { 'title': 'gettext', 'url': 'gettext' }, { 'title': 'url', 'url': 'url' } ], 'title': 'SUITlons Rules', 'url': 'suitlonsrules' }, { 'articles': [], 'title': 'BBCode Rules', 'url': 'bbcoderules' }, { 'articles': [], 'title': 'Helper Functions', 'url': 'helperfunctions' }, { 'articles': [ { 'title': 'SLACKS', 'url': 'slacks' } ], 'title': 'Subprojects', 'url': 'subprojects' } ] c.condition.notfound = False c.condition.article = False c.condition.index = False c.condition.matches = False if not c.parameter1: c.condition.index = True elif os.path.isfile( os.path.join( config['pylons.paths']['templates'], 'docs', os.path.normpath(c.parameter1.lower()) + '.tpl' ) ): for category in c.loop.articles: for article in category['articles']: if c.parameter1 == article['url']: c.article = article['title'] c.condition.article = True break if c.parameter1 and not c.condition.article: c.loop.search = [] for category in c.loop.articles: for article in category['articles']: if article['title'].lower().find(c.parameter1.lower()) != -1: c.loop.search.append(article) c.condition.notfound = True c.condition.matches = (c.loop.search) return '' | 5210c7fde85c51fd0c8c8142cd3dd35de7c9f48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/858/5210c7fde85c51fd0c8c8142cd3dd35de7c9f48e/helpers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3270,
13332,
276,
18,
6498,
18,
16462,
273,
306,
288,
296,
16462,
4278,
306,
288,
296,
2649,
4278,
296,
19213,
29386,
2187,
296,
718,
4278,
296,
588,
1787,
14561,
11,
19879,
288,
296,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3270,
13332,
276,
18,
6498,
18,
16462,
273,
306,
288,
296,
16462,
4278,
306,
288,
296,
2649,
4278,
296,
19213,
29386,
2187,
296,
718,
4278,
296,
588,
1787,
14561,
11,
19879,
288,
296,
26... | |
_cfunc_refs[tmpval1] = c_filter | def fl_set_slider_filter(ob, py_filter): """ fl_set_slider_filter(ob, py_filter) """ c_filter = FL_VAL_FILTER(py_filter) _fl_set_slider_filter(ob, c_filter) _cfunc_refs[tmpval1] = c_filter | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
28372,
67,
2188,
12,
947,
16,
2395,
67,
2188,
4672,
3536,
1183,
67,
542,
67,
28372,
67,
2188,
12,
947,
16,
2395,
67,
2188,
13,
3536,
225,
276,
67,
2188,
273,
31358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
542,
67,
28372,
67,
2188,
12,
947,
16,
2395,
67,
2188,
4672,
3536,
1183,
67,
542,
67,
28372,
67,
2188,
12,
947,
16,
2395,
67,
2188,
13,
3536,
225,
276,
67,
2188,
273,
31358... | |
mod.dir = rootpath | mod.dir = relname | def parse_module(name, ast=None, parent=None, node=None): # --- valid name? for c in name: if not c in string.letters+string.digits+'_.': print ("*ERROR*:%s.py: module names should consist of letters, digits and underscores" % name) sys.exit() # --- parse ident = name.split('.')[-1] mod = module(ident, node) mod.builtin = False if ast: # XXX mod.ast = ast mod.filename = name+'.py' mod.dir = '' mod.mod_path = [name] mod.mod_dir = [] else: # --- locate module relname = name.replace('.', '/') relpath = name.split('.') if parent: path = connect_paths(parent.dir, relname) else: path = name libpath = connect_paths(getgx().libdir, relname) rootpath = connect_paths(os.getcwd(), relname) if os.path.isfile(path+'.py'): # local module mod.filename = path+'.py' if parent: mod.mod_path = parent.mod_dir + relpath else: mod.mod_path = relpath split = path.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1] mod.builtin = not parent or parent.builtin elif os.path.isfile(connect_paths(path, '__init__.py')): mod.filename = connect_paths(path, '__init__.py') if parent: mod.mod_path = parent.mod_dir + relpath else: mod.mod_path = relpath mod.dir = path mod.mod_dir = mod.mod_path mod.builtin = not parent or parent.builtin elif os.path.isfile(rootpath+'.py'): # root module mod.filename = rootpath+'.py' mod.mod_path = relpath split = rootpath.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1] elif os.path.isfile(connect_paths(rootpath, '__init__.py')): mod.filename = connect_paths(rootpath, '__init__.py') mod.mod_path = relpath mod.dir = rootpath mod.mod_dir = mod.mod_path elif os.path.isfile(libpath+'.py'): # library module mod.filename = libpath+'.py' mod.mod_path = relpath split = libpath.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1] mod.builtin = True elif os.path.isfile(connect_paths(libpath, '__init__.py')): mod.filename = connect_paths(libpath, '__init__.py') mod.mod_path = relpath mod.dir = libpath mod.mod_dir = mod.mod_path mod.builtin = True else: error('cannot locate module: '+name, node) modpath = '.'.join(mod.mod_path) if modpath in getgx().modules: # cached? return getgx().modules[modpath] #print 'not cached', modpath getgx().modules[modpath] = mod mod.ast = parsefile(mod.filename) old_mv = getmv() mod.mv = mv = moduleVisitor(mod) setmv(mv) mv.visit = mv.dispatch mv.visitor = mv mv.dispatch(mod.ast) mv = old_mv setmv(mv) mod.funcs = mod.mv.funcs mod.classes = mod.mv.classes return mod | 051eacf40bd512b7594e2d783b5a679691c17bf6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6661/051eacf40bd512b7594e2d783b5a679691c17bf6/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2978,
12,
529,
16,
3364,
33,
7036,
16,
982,
33,
7036,
16,
756,
33,
7036,
4672,
468,
9948,
923,
508,
35,
364,
276,
316,
508,
30,
309,
486,
276,
316,
533,
18,
26054,
15,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2978,
12,
529,
16,
3364,
33,
7036,
16,
982,
33,
7036,
16,
756,
33,
7036,
4672,
468,
9948,
923,
508,
35,
364,
276,
316,
508,
30,
309,
486,
276,
316,
533,
18,
26054,
15,
10... |
env['FORTRAN'] = fcomp env['SHFORTRAN'] = fcomp | env['FORTRAN'] = fc env['SHFORTRAN'] = fc | def generate(env): add_all_to_env(env) add_f90_to_env(env) fc = env.Detect(compilers) or 'f90' env['F90'] = fcomp env['SHF90'] = fcomp env['FORTRAN'] = fcomp env['SHFORTRAN'] = fcomp | c1aa13708c6e634c414c0d6634393ff3a1fd4af8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12817/c1aa13708c6e634c414c0d6634393ff3a1fd4af8/f90.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
3074,
4672,
527,
67,
454,
67,
869,
67,
3074,
12,
3074,
13,
527,
67,
74,
9349,
67,
869,
67,
3074,
12,
3074,
13,
225,
8036,
273,
1550,
18,
12081,
12,
2919,
330,
414,
13,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
3074,
4672,
527,
67,
454,
67,
869,
67,
3074,
12,
3074,
13,
527,
67,
74,
9349,
67,
869,
67,
3074,
12,
3074,
13,
225,
8036,
273,
1550,
18,
12081,
12,
2919,
330,
414,
13,
57... |
l = len(l) [self.posititonsOfUnmatchedPlus(i, dual=True, reverse=True)[l-1-j] | l = len(self) [self.positionsOfUnmatchedPlus(i, dual=True, reverse=True)[l-1-j] | def positionsOfUnmatchedMinus(self, i): | 86f8b046baa1b812c5700aa92e7e982a05a6888a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/86f8b046baa1b812c5700aa92e7e982a05a6888a/crystals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6865,
951,
984,
11073,
18434,
12,
2890,
16,
277,
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,... | [
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,
6865,
951,
984,
11073,
18434,
12,
2890,
16,
277,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
data = compress(self.TEXT) | if self.skip_decompress_tests: return data = bz2.compress(self.TEXT) | def testCompress(self): # "Test compress() function" data = compress(self.TEXT) self.assertEqual(self.decompress(data), self.TEXT) | df273a376d6adfdd8eb639f3c53f0e2adedd2363 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/df273a376d6adfdd8eb639f3c53f0e2adedd2363/test_bz2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
16552,
12,
2890,
4672,
468,
315,
4709,
8099,
1435,
445,
6,
309,
365,
18,
7457,
67,
323,
14706,
67,
16341,
30,
327,
501,
273,
24788,
22,
18,
14706,
12,
2890,
18,
5151,
13,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
16552,
12,
2890,
4672,
468,
315,
4709,
8099,
1435,
445,
6,
309,
365,
18,
7457,
67,
323,
14706,
67,
16341,
30,
327,
501,
273,
24788,
22,
18,
14706,
12,
2890,
18,
5151,
13,
365,
... |
except (IOError, RuntimeError): | except (IOError, OSError, RuntimeError): | def _registerorupdatesong(self, path, force): """ register or update song in database and return it | b3f6fa988df37a409160875d0041c73a56734e9c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/348/b3f6fa988df37a409160875d0041c73a56734e9c/sqlite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4861,
280,
14703,
932,
12,
2890,
16,
589,
16,
2944,
4672,
3536,
1744,
578,
1089,
17180,
316,
2063,
471,
327,
518,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4861,
280,
14703,
932,
12,
2890,
16,
589,
16,
2944,
4672,
3536,
1744,
578,
1089,
17180,
316,
2063,
471,
327,
518,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
request = Request(env) | response = self.dispatch(request) if not isinstance(response, Response): log.ERROR('invalid result from dispatch(): %r' % response) response = self.http500() | def __call__(self, env, start_response): start_time = time.time() try: try: request = Request(env) except Exception, exc: log.ERROR('invalid request: %s' % exc) traceback.print_exc() response = self.http500() else: try: response = self.dispatch(request) if not isinstance(response, Response): log.ERROR('invalid result from dispatch(): %r' % response) response = self.http500() except Exception, exc: response = self.http500(exc) response.finish() start_response( '%d %s' % (response.status_code, response.status_text), response.headers.items() ) if isinstance(response.content, str): yield response.content else: while True: d = response.content.read(0x20000) if not d: break yield d finally: log.info('request took %f s' % (time.time() - start_time)) | 213b0a1e0501fdab00e9d30a53c4b2a22a36f2a0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/213b0a1e0501fdab00e9d30a53c4b2a22a36f2a0/wsgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1550,
16,
787,
67,
2740,
4672,
787,
67,
957,
273,
813,
18,
957,
1435,
775,
30,
775,
30,
766,
273,
365,
18,
10739,
12,
2293,
13,
309,
486,
1549,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1550,
16,
787,
67,
2740,
4672,
787,
67,
957,
273,
813,
18,
957,
1435,
775,
30,
775,
30,
766,
273,
365,
18,
10739,
12,
2293,
13,
309,
486,
1549,
12,
2... |
size_a = len(a.digits) * 2 size_b = len(b.digits) * 2 z = W_LongObject(a.space, [r_uint(0)] * ((size_a + size_b) // 2), 1) | size_a = len(a.digits) size_b = len(b.digits) z = W_LongObject(a.space, [Digit(0)] * (size_a + size_b), 1) | def _x_mul(a, b): size_a = len(a.digits) * 2 size_b = len(b.digits) * 2 z = W_LongObject(a.space, [r_uint(0)] * ((size_a + size_b) // 2), 1) i = 0 while i < size_a: carry = r_uint(0) f = a._getshort(i) j = 0 while j < size_b: carry += z._getshort(i + j) + b._getshort(j) * f z._setshort(i + j, carry & MASK) carry = carry >> SHIFT j += 1 while carry != 0: assert i + j < size_a + size_b carry += z._getshort(i + j) z._setshort(i + j, carry & MASK) carry = carry >> SHIFT j += 1 i += 1 z._normalize() return z | ad929a678777d2ef2df66adef7cd3564d723bca6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ad929a678777d2ef2df66adef7cd3564d723bca6/longobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
92,
67,
16411,
12,
69,
16,
324,
4672,
963,
67,
69,
273,
562,
12,
69,
18,
16649,
13,
963,
67,
70,
273,
562,
12,
70,
18,
16649,
13,
998,
273,
678,
67,
3708,
921,
12,
69,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
92,
67,
16411,
12,
69,
16,
324,
4672,
963,
67,
69,
273,
562,
12,
69,
18,
16649,
13,
963,
67,
70,
273,
562,
12,
70,
18,
16649,
13,
998,
273,
678,
67,
3708,
921,
12,
69,
18,
... |
]), | ] + LINK_OPT_STRIP), | def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, extensions return [], [] | 38fa157a1ca0584accf42fee7a9a750fc973a15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/38fa157a1ca0584accf42fee7a9a750fc973a15a/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
971,
3219,
2421,
12,
529,
16,
5907,
16,
4418,
4672,
3536,
2000,
326,
5907,
471,
4418,
309,
326,
8257,
1704,
16,
578,
2795,
1008,
6035,
309,
486,
18,
3536,
309,
1140,
18,
803,
18,
1808,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
971,
3219,
2421,
12,
529,
16,
5907,
16,
4418,
4672,
3536,
2000,
326,
5907,
471,
4418,
309,
326,
8257,
1704,
16,
578,
2795,
1008,
6035,
309,
486,
18,
3536,
309,
1140,
18,
803,
18,
1808,... |
"YASARA.org YOB (*.yob)") | "YASARA YOB (*.yob);;") | def fileOpenBabelImport(self): # Code copied from fileInsert() slot method. Mark 060731. """ Slot method for 'File > Import'. """ cmd = greenmsg("Import File: ") # This format list generated from the Open Babel wiki page: # http://openbabel.sourceforge.net/wiki/Babel#File_Formats formats = _convertFiletypesForMacFileDialog(\ "All Files (*.*);;"\ "Molecular Machine Part (*.mmp);;"\ "Accelrys/MSI Biosym/Insight II CAR (*.car);;"\ "Alchemy (*.alc);;"\ "Amber Prep (*.prep);;"\ "Ball and Stick (*.bs);;"\ "Cacao Cartesian (*.caccrt);;"\ "CCC (*.ccc);;"\ "Chem3D Cartesian 1 (*.c3d1);;"\ "Chem3D Cartesian 2 (*.c3d2);;"\ "ChemDraw Connection Table (*.ct);;"\ "Chemical Markup Language (*.cml);;"\ "Chemical Resource Kit 2D diagram (*.crk2d);;"\ "Chemical Resource Kit 3D (*.crk3d);;"\ "CML Reaction (*.cmlr);;"\ "DMol3 coordinates (*.dmol);;"\ "Dock 3.5 Box (*.box);;"\ "FastSearching Index (*.fs);;"\ "Feature (*.feat);;"\ "Free Form Fractional (*.fract);;"\ "GAMESS Output (*.gam);;"\ "GAMESS Output (*.gamout);;"\ "Gaussian98/03 Output (*.g03);;"\ "Gaussian98/03 Output (*.g98);;"\ "General XML (*.xml);;"\ "Ghemical (*.gpr);;"\ "HyperChem HIN (*.hin);;"\ "Jaguar output (*.jout);;"\ "MacroModel (*.mmd);;"\ "MacroModel (*.mmod);;"\ "MDL MOL (*.mdl);;"\ "MDL MOL (*.mol);;"\ "MDL MOL (*.sd);;"\ "MDL MOL (*.sdf);;"\ "MDL RXN (*.rxn);;"\ "MOPAC Cartesian (*.mopcrt);;"\ "MOPAC Output (*.mopout);;"\ "MPQC output (*.mpqc);;"\ "MSI BGF (*.bgf);;"\ "NWChem output (*.nwo);;"\ "Parallel Quantum Solutions (*.pqs);;"\ "PCModel (*.pcm);;"\ "Protein Data Bank (*.ent);;"\ "Protein Data Bank (*.pdb);;"\ "PubChem (*.pc);;"\ "Q-Chem output (*.qcout);;"\ "ShelX (*.ins);;"\ "ShelX (*.res);;"\ "SMILES (*.smi);;"\ "Sybyl Mol2 (*.mol2);;"\ "TurboMole Coordinate (*.tmol);;"\ "UniChem XYZ (*.unixyz);;"\ "ViewMol (*.vmol);;"\ "XYZ cartesian coordinates (*.xyz);;"\ "YASARA.org YOB (*.yob)") import_filename = QFileDialog.getOpenFileName(self, "Open Babel Import", self.currentWorkingDirectory, formats ) if not import_filename: env.history.message(cmd + "Cancelled") return if import_filename: import_filename = str(import_filename) if not os.path.exists(import_filename): #bruce 050415: I think this should never happen; # in case it does, I added a history message (to existing if/return code). env.history.message( cmd + redmsg( "File not found: [ " + import_filename + " ]") ) return | b821126ee3c4890d96b31301ec246e3e5249fd88 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/b821126ee3c4890d96b31301ec246e3e5249fd88/ops_files.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
3678,
38,
873,
5010,
12,
2890,
4672,
468,
3356,
9268,
628,
585,
4600,
1435,
4694,
707,
18,
6622,
374,
4848,
27,
6938,
18,
3536,
23195,
707,
364,
296,
812,
405,
6164,
10332,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3678,
38,
873,
5010,
12,
2890,
4672,
468,
3356,
9268,
628,
585,
4600,
1435,
4694,
707,
18,
6622,
374,
4848,
27,
6938,
18,
3536,
23195,
707,
364,
296,
812,
405,
6164,
10332,
3536,
... |
moves.append([row, col, row - 1, col, row - 2, col]) | moves.append((row, col, row - 1, col, row - 2, col)) | def generate_moves(self): moves = [] for row in range(len(self.board)): for col in range(len(self.board[row])): | 3a3991804fa82cdaedfc119c394eac8ebdbdf688 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11237/3a3991804fa82cdaedfc119c394eac8ebdbdf688/PegSolitaire.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
81,
10829,
12,
2890,
4672,
13934,
273,
5378,
364,
1027,
316,
1048,
12,
1897,
12,
2890,
18,
3752,
3719,
30,
364,
645,
316,
1048,
12,
1897,
12,
2890,
18,
3752,
63,
492,
22643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
81,
10829,
12,
2890,
4672,
13934,
273,
5378,
364,
1027,
316,
1048,
12,
1897,
12,
2890,
18,
3752,
3719,
30,
364,
645,
316,
1048,
12,
1897,
12,
2890,
18,
3752,
63,
492,
22643,
... |
if type=="complexity": | if dtype=="complexity": | def __call__(self, data, weight=0): import orngWrap type=getattr(self, "type", "auto") | d9070630f95cd1bf8f5ad1ea8eb6f15097493d46 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/d9070630f95cd1bf8f5ad1ea8eb6f15097493d46/orngCI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
501,
16,
3119,
33,
20,
4672,
1930,
578,
3368,
2964,
225,
618,
33,
588,
1747,
12,
2890,
16,
315,
723,
3113,
315,
6079,
7923,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
1991,
972,
12,
2890,
16,
501,
16,
3119,
33,
20,
4672,
1930,
578,
3368,
2964,
225,
618,
33,
588,
1747,
12,
2890,
16,
315,
723,
3113,
315,
6079,
7923,
2,
-100,
-100,
-100,
-100,
... |
return SymbolicConstant( operator.add(self._obj, right._obj) ) | constants = isinstance(self._obj, sage.functions.constants.Constant) or isinstance(right._obj, sage.functions.constants.Constant) if not constants: return SymbolicConstant( operator.add(self._obj, right._obj) ) | def _add_(self, right): """ EXAMPLES: sage: SR = SymbolicExpressionRing() sage: a = SR(2) sage: b = a+2; b 4 sage: type(b) <class 'sage.calculus.calculus.SymbolicConstant'> sage: b = sum([a for i in range(1000)]); b 2000 sage: type(_) <class 'sage.calculus.calculus.SymbolicConstant'> """ if isinstance(right, SymbolicConstant): try: self_parent = self._obj.parent() right_parent = right._obj.parent() if self_parent != SR and right_parent != SR and ( self_parent.has_coerce_map_from(right_parent) or right_parent.has_coerce_map_from(self_parent) ): return SymbolicConstant( operator.add(self._obj, right._obj) ) except AttributeError: #Either self._obj or right._obj doesn't have a #parent method (like 'int' or 'float') return SymbolicConstant( operator.add(self._obj, right._obj) ) | 031b4938e7082373ee1fc34420207edc62b35fc2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/031b4938e7082373ee1fc34420207edc62b35fc2/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
12,
2890,
16,
2145,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
19145,
273,
16455,
12164,
2300,
10369,
1435,
272,
410,
30,
279,
273,
19145,
12,
22,
13,
272,
410,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
12,
2890,
16,
2145,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
19145,
273,
16455,
12164,
2300,
10369,
1435,
272,
410,
30,
279,
273,
19145,
12,
22,
13,
272,
410,
30... |
print _(" Sync task %s cancelled") % self.options.taskid | print _(" Sync task %s canceled") % self.options.taskid | def _cancel_sync(self): if not self.options.id: print("repo id required. Try --help") sys.exit(0) if not self.options.taskid: print("task id required. Try --help") sys.exit(0) try: repos = self.pconn.cancel_sync(self.options.id, self.options.taskid) print _(" Sync task %s cancelled") % self.options.taskid except RestlibException, re: log.error("Error: %s" % re) systemExit(re.code, re.msg) except Exception, e: log.error("Error: %s" % e) raise | 3031d7f1572d6916f4f024e22264c3de668d641f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/3031d7f1572d6916f4f024e22264c3de668d641f/core_repo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10996,
67,
8389,
12,
2890,
4672,
309,
486,
365,
18,
2116,
18,
350,
30,
1172,
2932,
7422,
612,
1931,
18,
6161,
1493,
5201,
7923,
2589,
18,
8593,
12,
20,
13,
309,
486,
365,
18,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10996,
67,
8389,
12,
2890,
4672,
309,
486,
365,
18,
2116,
18,
350,
30,
1172,
2932,
7422,
612,
1931,
18,
6161,
1493,
5201,
7923,
2589,
18,
8593,
12,
20,
13,
309,
486,
365,
18,
21... |
assert_array_almost_equal(f([1,2,3],[2,-1,3]),[7,9,18],a=5) | assert_array_almost_equal(f([1,2,3],[2,-1,3],a=5),[7,9,18]) | def check_axpy(self): for p in 'sd': f = getattr(cblas,p+'axpy') assert_array_almost_equal(f(5,[1,2,3],[2,-1,3]),[7,9,18]) f = getattr(fblas,p+'axpy') assert_array_almost_equal(f([1,2,3],[2,-1,3]),[7,9,18],a=5) for p in 'cz': f = getattr(cblas,p+'axpy') assert_array_almost_equal(f(5,[1,2j,3],[2,-1,3]),[7,10j-1,18]) f = getattr(fblas,p+'axpy') assert_array_almost_equal(f([1,2j,3],[2,-1,3]),[7,10j-1,18],a=5) | 505cd178c9b9716b98cc80cd8d0ba74717b417c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/505cd178c9b9716b98cc80cd8d0ba74717b417c0/test_blas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
651,
2074,
12,
2890,
4672,
364,
293,
316,
296,
6427,
4278,
284,
273,
3869,
12,
71,
3083,
345,
16,
84,
6797,
651,
2074,
6134,
1815,
67,
1126,
67,
287,
10329,
67,
9729,
12,
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,
866,
67,
651,
2074,
12,
2890,
4672,
364,
293,
316,
296,
6427,
4278,
284,
273,
3869,
12,
71,
3083,
345,
16,
84,
6797,
651,
2074,
6134,
1815,
67,
1126,
67,
287,
10329,
67,
9729,
12,
74... |
@echo | def label_np_structure(node): node[0].category = node.category / node.category node.kids[0] = label(node[0]) if node.count() > 1: node[1].category = node.category node.kids[1] = label(node[1]) return node | ba3220a2c6b52f045b539ed94d094a73aa2cc2b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8383/ba3220a2c6b52f045b539ed94d094a73aa2cc2b9/catlab.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1433,
67,
6782,
67,
7627,
12,
2159,
4672,
756,
63,
20,
8009,
4743,
273,
756,
18,
4743,
342,
756,
18,
4743,
756,
18,
79,
2232,
63,
20,
65,
273,
1433,
12,
2159,
63,
20,
5717,
309,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1433,
67,
6782,
67,
7627,
12,
2159,
4672,
756,
63,
20,
8009,
4743,
273,
756,
18,
4743,
342,
756,
18,
4743,
756,
18,
79,
2232,
63,
20,
65,
273,
1433,
12,
2159,
63,
20,
5717,
309,
75... | |
elif not chndescr: | elif (not chndescr or newdescr == chndescr or newdescr == olddescr): | def syncChannels(channelsdir=CHANNELSDIR, force=None): if force is None: force = sysconf.get("force-channelsync", False) if os.path.isdir(channelsdir): seenalias = {} for entry in os.listdir(channelsdir): if not entry.endswith(".channel"): continue filepath = os.path.join(channelsdir, entry) if not os.path.isfile(filepath): continue file = open(filepath) data = file.read() file.close() try: descriptions = parseChannelsDescription(data) except Error, e: iface.error(_("While using %s: %s") % (filepath, e)) continue for alias in descriptions: if alias in seenalias: continue seenalias[alias] = True olddescr = sysconf.get(("channelsync", alias)) newdescr = descriptions[alias] chndescr = sysconf.get(("channels", alias)) if not olddescr and chndescr: olddescr = chndescr if chndescr: name = chndescr.get("name") else: name = None if not name: name = newdescr.get("name") if not name: name = alias else: name += " (%s)" % alias else: name += " (%s)" % alias if not olddescr: if (force or iface.askYesNo(_("New channel '%s' detected.\n" "Include it?") % name, True)): try: createChannel(alias, newdescr) except Error, e: iface.error(_("While using %s: %s") % (filepath, e)) else: sysconf.set(("channels", alias), newdescr) sysconf.set(("channelsync", alias), newdescr) else: sysconf.set(("channelsync", alias), newdescr) elif not chndescr: continue elif not newdescr.get("type"): iface.error(_("Channel in %s has no type.") % fielpath) elif newdescr.get("type") != chndescr.get("type"): if (force or iface.askYesNo(_("Change in channel '%s' detected.\n" "Do you want to replace it?") % name, True)): try: createChannel(alias, newdescr) except Error, e: iface.error(_("While using %s: %s") % (filepath, e)) else: sysconf.set(("channels", alias), newdescr) sysconf.set(("channelsync", alias), newdescr) else: sysconf.set(("channelsync", alias), newdescr) elif newdescr != olddescr: info = getChannelInfo(chndescr["type"]) def getLabel(key, info=info): for _key, label, ftype, default, descr in info.fields: if _key == key: return label return key def toStr(value): if type(value) is bool: return value and _("Yes") or _("No") elif value is None: return _("None") return str(value) try: pardescr = parseChannelData(newdescr) except Error, e: iface.error(_("While using %s: %s") % (filepath, e)) continue changed = False for key in newdescr: oldvalue = olddescr.get(key) newvalue = newdescr.get(key) parvalue = pardescr.get(key) chnvalue = chndescr.get(key) if newvalue == oldvalue or parvalue == chnvalue: continue if (force or iface.askYesNo(_("Change in field '%(label)s' of " "channel '%(name)s' detected.\n" "Old value: %(curvalue)s\n" "New value: %(newvalue)s\n" "Replace current value?") % {"label": getLabel(key), "name": name, "curvalue": toStr(chnvalue), "newvalue": toStr(parvalue)}, True)): chndescr[key] = parvalue changed = True if changed: try: createChannel(alias, chndescr) except Error, e: iface.error(unicode(e)) else: sysconf.set(("channels", alias), chndescr) sysconf.set(("channelsync", alias), newdescr) if not sysconf.has("channelsync"): return for alias in sysconf.keys("channelsync"): if alias not in seenalias: sysconf.remove(("channelsync", alias)) if not sysconf.has(("channels", alias)): continue name = sysconf.get(("channels", alias, "name")) if not name: name = alias else: name += " (%s)" % alias if (force or iface.askYesNo(_("Removing channel '%s' was suggested.\n" "Do you want to remove it?") % name, True)): sysconf.remove(("channels", alias)) | 5262d4c91065ccd506df99a81a4fd8f0517e11d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/5262d4c91065ccd506df99a81a4fd8f0517e11d7/channelsync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3792,
10585,
12,
9114,
1214,
33,
15814,
55,
4537,
16,
2944,
33,
7036,
4672,
225,
309,
2944,
353,
599,
30,
2944,
273,
2589,
3923,
18,
588,
2932,
5734,
17,
4327,
8389,
3113,
1083,
13,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3792,
10585,
12,
9114,
1214,
33,
15814,
55,
4537,
16,
2944,
33,
7036,
4672,
225,
309,
2944,
353,
599,
30,
2944,
273,
2589,
3923,
18,
588,
2932,
5734,
17,
4327,
8389,
3113,
1083,
13,
22... |
self.widgets.insert(self.widgets.index(widgetFrom)+1, widgetTo) | self.widgets.append(widgetTo) self.fixPositionOfDescendants(widgetTo) | def addLink(self, widgetFrom, widgetTo, signalNameFrom, signalNameTo, enabled): self.addEvent("add link from " + widgetFrom.title + " to " + widgetTo.title) if not self.canConnect(widgetFrom, widgetTo): return 0 # check if signal names still exist found = 0 for o in widgetFrom.outputs: output = OutputSignal(*o) if output.name == signalNameFrom: found=1 if not found: print "Error. Widget %s changed its output signals. It does not have signal %s anymore." % (str(getattr(widgetFrom, "captionTitle", ""), signalNameFrom)) return 0 | a5e916dd00f1cb9502a205aed42f7fac807dd48a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/a5e916dd00f1cb9502a205aed42f7fac807dd48a/orngSignalManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2098,
12,
2890,
16,
3604,
1265,
16,
3604,
774,
16,
4277,
461,
1265,
16,
4277,
28455,
16,
3696,
4672,
365,
18,
1289,
1133,
2932,
1289,
1692,
628,
315,
397,
3604,
1265,
18,
2649,
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,
527,
2098,
12,
2890,
16,
3604,
1265,
16,
3604,
774,
16,
4277,
461,
1265,
16,
4277,
28455,
16,
3696,
4672,
365,
18,
1289,
1133,
2932,
1289,
1692,
628,
315,
397,
3604,
1265,
18,
2649,
39... |
this = apply(_quickfix.new_RawDataLength, args) | this = _quickfix.new_RawDataLength(*args) | def __init__(self, *args): this = apply(_quickfix.new_RawDataLength, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
31733,
1782,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
31733,
1782,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365,
... |
patches_dir = self.cfg.setdefault('patches_dir', 'eggs-patches') patches_dir = os.path.join( self.root or os.curdir, patches_dir, ) if not os.path.isdir(patches_dir): os.mkdir(patches_dir) | self.cfg.setdefault('patches_dir', 'eggs-patches') | def _initialize(self): # read a list of available patches patches_dir = self.cfg.setdefault('patches_dir', 'eggs-patches') patches_dir = os.path.join( self.root or os.curdir, patches_dir, ) if not os.path.isdir(patches_dir): os.mkdir(patches_dir) | 3ca6542562023ec3ef0019aeb55f887f7c10e766 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14549/3ca6542562023ec3ef0019aeb55f887f7c10e766/distributions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11160,
12,
2890,
4672,
468,
855,
279,
666,
434,
2319,
16482,
16482,
67,
1214,
273,
365,
18,
7066,
18,
542,
1886,
2668,
30278,
67,
1214,
2187,
296,
1332,
564,
17,
30278,
6134,
16482,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11160,
12,
2890,
4672,
468,
855,
279,
666,
434,
2319,
16482,
16482,
67,
1214,
273,
365,
18,
7066,
18,
542,
1886,
2668,
30278,
67,
1214,
2187,
296,
1332,
564,
17,
30278,
6134,
16482,... |
if dleft < -1: | elif dleft < -1: | def on_get_value(self, rowref, column): node = self.tree.get_node_for_rowref(rowref) if not node: return None else: task = node.get_obj() if column == COL_TID: return task.get_id() elif column == COL_OBJ: return task elif column == COL_TITLE: return saxutils.escape(task.get_title()) elif column == COL_SDATE: return str(task.get_start_date()) elif column == COL_DDATE: return str(task.get_due_date()) elif column == COL_DUE: dleft = task.get_days_left() if not dleft: return str(task.get_due_date()) if dleft == 1: return _("Tomorrow") if dleft == 0: return _("Today") if dleft == -1: return _("Yesterday") if dleft < -1: return _("%s days ago") % str(abs(dleft)) if dleft > 1 and dleft <= 15: return _("In %s days") % str(dleft) else: return str(task.get_due_date()) | 53eda69a273ff961302db254e02309f04cc11291 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/53eda69a273ff961302db254e02309f04cc11291/tasktree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
588,
67,
1132,
12,
2890,
16,
1027,
1734,
16,
1057,
4672,
756,
273,
365,
18,
3413,
18,
588,
67,
2159,
67,
1884,
67,
492,
1734,
12,
492,
1734,
13,
309,
486,
756,
30,
327,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
588,
67,
1132,
12,
2890,
16,
1027,
1734,
16,
1057,
4672,
756,
273,
365,
18,
3413,
18,
588,
67,
2159,
67,
1884,
67,
492,
1734,
12,
492,
1734,
13,
309,
486,
756,
30,
327,
59... |
'''Pop up a javascript window with class help | """Pop up a javascript window with class help | def classhelp(self, properties=None, label=''"(list)", width='500', height='400', property='', form='itemSynopsis', pagesize=50, inputtype="checkbox", sort=None, filter=None): '''Pop up a javascript window with class help | 16a3ebf380b95607b344181655488d818a27791f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/16a3ebf380b95607b344181655488d818a27791f/templating.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
667,
5201,
12,
2890,
16,
1790,
33,
7036,
16,
1433,
2218,
4970,
12,
1098,
2225,
16,
1835,
2218,
12483,
2187,
2072,
2218,
16010,
2187,
1272,
2218,
2187,
646,
2218,
1726,
10503,
29522,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
667,
5201,
12,
2890,
16,
1790,
33,
7036,
16,
1433,
2218,
4970,
12,
1098,
2225,
16,
1835,
2218,
12483,
2187,
2072,
2218,
16010,
2187,
1272,
2218,
2187,
646,
2218,
1726,
10503,
29522,
2187,
... |
self.outfileName=kwargs['outfilename'] if self.outfileName[-1] in ('/','\\'): self.outfileName=self.outfileName[:-1] path=os.path.split(self.outfileName) self.targetRoot=path[0] | log.debug("We're being passed a file '%s' and keyword " "arguments %r.", xschemaFileName, kwargs) | def __init__(self, xschemaFileName, **kwargs): self.outfileName=kwargs['outfilename'] | 6b7f3cabb82196cafdc67e109e1e8d5fb43665bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/6b7f3cabb82196cafdc67e109e1e8d5fb43665bf/ArchetypesGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
619,
4821,
4771,
16,
2826,
4333,
4672,
365,
18,
659,
17812,
33,
4333,
3292,
659,
3459,
3546,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
619,
4821,
4771,
16,
2826,
4333,
4672,
365,
18,
659,
17812,
33,
4333,
3292,
659,
3459,
3546,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
while i < len(words): | while i < len(words) and max_words > 3: while nb_words_around * 2 + 1 > max_words: nb_words_around -= 1 if nb_words_around == 0: break | def matches_any(w1): if compiled_pattern.search(' ' + w1 + ' '): return True else: return False | 46ff8aedd0010a41316b8cbe48c87eb00cb24d5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/46ff8aedd0010a41316b8cbe48c87eb00cb24d5a/bibformat_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1885,
67,
2273,
12,
91,
21,
4672,
309,
7743,
67,
4951,
18,
3072,
2668,
296,
397,
341,
21,
397,
296,
296,
4672,
327,
1053,
469,
30,
327,
1083,
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,
1885,
67,
2273,
12,
91,
21,
4672,
309,
7743,
67,
4951,
18,
3072,
2668,
296,
397,
341,
21,
397,
296,
296,
4672,
327,
1053,
469,
30,
327,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
raise sqlerrorrs.CursorError(e.args[1], ("ProgrammingError",) + tuple(e.args)) | raise sqlerrors.CursorError(e.args[1], ("ProgrammingError",) + tuple(e.args)) | def execute(self, sql, *params, **kw): if kw.has_key("start_transaction"): del kw["start_transaction"] try: BindlessCursor.execute(self, sql, *params, **kw) except mysql.IntegrityError, e: if e[0] in (1062,): raise sqlerrors.ColumnNotUnique(e) raise errors.CursorError(e.args[1], ("IntegrityError",) + tuple(e.args)) except mysql.OperationalError, e: if e[0] in (1216, 1217, 1451, 1452): raise sqlerrors.ConstraintViolation(e.args[1], e.args) raise sqlerrors.DatabaseError(e.args[1], ("OperationalError",) + tuple(e.args)) except mysql.ProgrammingError, e: if e[0] == 1146: raise sqlerrors.InvalidTable(e) raise sqlerrorrs.CursorError(e.args[1], ("ProgrammingError",) + tuple(e.args)) except mysql.MySQLError, e: raise sqlerrors.DatabaseError(e.args[1], ("MySQLError",) + tuple(e.args)) return self | 9424f7e877ef8fc7c42f9ecefc2163ac7070ef99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/9424f7e877ef8fc7c42f9ecefc2163ac7070ef99/mysql_drv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1847,
16,
380,
2010,
16,
2826,
9987,
4672,
309,
5323,
18,
5332,
67,
856,
2932,
1937,
67,
7958,
6,
4672,
1464,
5323,
9614,
1937,
67,
7958,
11929,
775,
30,
6936,
2656... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1847,
16,
380,
2010,
16,
2826,
9987,
4672,
309,
5323,
18,
5332,
67,
856,
2932,
1937,
67,
7958,
6,
4672,
1464,
5323,
9614,
1937,
67,
7958,
11929,
775,
30,
6936,
2656... |
__slots__ = ("value",) | __slots__ = ("_value",) | def operands(self): return tuple() | b6bc55326d79b64f2048b486159e78b329f2b9ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/624/b6bc55326d79b64f2048b486159e78b329f2b9ca/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14883,
12,
2890,
4672,
327,
3193,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14883,
12,
2890,
4672,
327,
3193,
1435,
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,
-... |
self.l = {"blast.bin":settings.blast_bin, "m":method, "db":db, "s":seqFile, "e":e, "k":kw} | if self.verbose: self.log.add('running blast...') | def localBlast( self, seqFile, db, method='blastp', resultOut=None, e=0.01, **kw ): """ Performa a local blast search (requires that the blast binaries and databases are installed localy). Uses Bio.Blast.NCBIStandalone.blastall (Biopython) for the search. @param seqFile: file name with search sequence in FASTA format @type seqFile: str @param db: database(s) to search, e.g. ['swissprot', 'pdb'] @type db: [str] @param method: search program to use, e.g. 'blastp', 'fasta' (default: blastp) @type method: str @param e: expectation value cutoff @type e: float @param resultOut: save blast output to this new file @type resultOut: str @param kw: optional keywords:: --- Scoring --- matrix Matrix to use (default BLOSUM62). gap_open Gap open penalty (default 0). gap_extend Gap extension penalty (default 0). | ac3cf0bdca86ff1a95d9adc87b65595c562e4d2b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/ac3cf0bdca86ff1a95d9adc87b65595c562e4d2b/SequenceSearcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
38,
2722,
12,
365,
16,
3833,
812,
16,
1319,
16,
707,
2218,
30901,
84,
2187,
563,
1182,
33,
7036,
16,
425,
33,
20,
18,
1611,
16,
2826,
9987,
262,
30,
3536,
11217,
69,
279,
1191,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
38,
2722,
12,
365,
16,
3833,
812,
16,
1319,
16,
707,
2218,
30901,
84,
2187,
563,
1182,
33,
7036,
16,
425,
33,
20,
18,
1611,
16,
2826,
9987,
262,
30,
3536,
11217,
69,
279,
1191,... |
return basejoin(DESK_URL, '/access/remote/?' + urlencode({ | return basejoin('https://%s.zendesk.com' % os.getenv('ZENDESK_DOMAIN'), '/access/remote/?' + urlencode({ | def sign_link(name, email, timestamp): """Sign remote auth link""" token = name + email + os.environ.get('ZENDESK_REMOTE_AUTH_TOKEN', '') + str(timestamp) return basejoin(DESK_URL, '/access/remote/?' + urlencode({ 'name': name, 'email': email, 'timestamp': timestamp, 'hash': md5(token).digest().encode('hex')})) | c8b4d30ce455b8c65ba690a6f4f4e9f9caea5f31 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13522/c8b4d30ce455b8c65ba690a6f4f4e9f9caea5f31/zendesk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1573,
67,
1232,
12,
529,
16,
2699,
16,
2858,
4672,
3536,
2766,
2632,
1357,
1692,
8395,
225,
1147,
273,
508,
397,
2699,
397,
1140,
18,
28684,
18,
588,
2668,
62,
1157,
1639,
11129,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1573,
67,
1232,
12,
529,
16,
2699,
16,
2858,
4672,
3536,
2766,
2632,
1357,
1692,
8395,
225,
1147,
273,
508,
397,
2699,
397,
1140,
18,
28684,
18,
588,
2668,
62,
1157,
1639,
11129,
67,
1... |
self.addr = port | def __init__(self, host, port, protocol): """Initialize the client, setting up its socket, and request to connect. """ if host == 'unix': # we are using unix sockets skt = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) # "port" in this case is really a filename self.addr = port else: skt = self.createInternetSocket() self.addr = (host, port) self.host = host self.port = port Connection.__init__(self, skt, protocol) | d1a8ab80a43e219665b56f58cabfb23e37a69094 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d1a8ab80a43e219665b56f58cabfb23e37a69094/tcp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
16,
1756,
16,
1771,
4672,
3536,
7520,
326,
1004,
16,
3637,
731,
2097,
2987,
16,
471,
590,
358,
3077,
18,
3536,
309,
1479,
422,
296,
21136,
4278,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1479,
16,
1756,
16,
1771,
4672,
3536,
7520,
326,
1004,
16,
3637,
731,
2097,
2987,
16,
471,
590,
358,
3077,
18,
3536,
309,
1479,
422,
296,
21136,
4278,
46... | |
u['Address'] = user[1] | def createUser (u,currentDomains,currentZones): if u['Zone'] not in currentZones: return 0 if u['Domain'] in ignoreDomains: return 0 if u['Domain'] not in currentDomains: res = createDomain(u['Domain']) if res != 0: sys.stderr.write('Error creating Domain %s.'%(u['Domain'])) sys.exit(-1) if u['Type'] == 'group': return 0 else: print("Singestuser %s %s %s %s '' '' '' ENCRPYT1 '' %s"%(u['Name'], random.randrange(1,1000000000), u['Domain'], u['Type'], u['Zone'])) res = os.system("Singestuser %s %s %s %s '' '' '' ENCRPYT1 '' %s"%(u['Name'], random.randrange(1,1000000000), u['Domain'], u['Type'], u['Zone'])) return res | 16baca4a4abcb814c097a6b731ff56af1132d477 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1913/16baca4a4abcb814c097a6b731ff56af1132d477/ZoneUserSync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22992,
261,
89,
16,
2972,
15531,
16,
2972,
13600,
4672,
309,
582,
3292,
4226,
3546,
486,
316,
783,
13600,
30,
327,
374,
309,
582,
3292,
3748,
3546,
316,
2305,
15531,
30,
327,
374,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22992,
261,
89,
16,
2972,
15531,
16,
2972,
13600,
4672,
309,
582,
3292,
4226,
3546,
486,
316,
783,
13600,
30,
327,
374,
309,
582,
3292,
3748,
3546,
316,
2305,
15531,
30,
327,
374,
309,
... | |
return self.tk.call(self._w, 'info', 'size') | return self.tk.call(self._w, 'info', 'size') | def info_size(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,
1123,
67,
1467,
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,
1123,
67,
1467,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.socket.send("X") while self.running: time.sleep(1) | def run(self): try: while self.running: while self.running: try: self.socket.connect((self.host, self.port)) #print "thread", self.id, "connected" break except Exception, e: if e.args[0] == 106 or e.args[0] == 60: break #print "Couldn't connect:", e.args, self.host, self.port time.sleep(1) continue break | ddd2a16aebaf9560ddedd64f1f285dfa1a5a94ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13624/ddd2a16aebaf9560ddedd64f1f285dfa1a5a94ad/HTTPWorkerThread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
775,
30,
1323,
365,
18,
8704,
30,
1323,
365,
18,
8704,
30,
775,
30,
365,
18,
7814,
18,
3612,
12443,
2890,
18,
2564,
16,
365,
18,
655,
3719,
468,
1188,
315,
5930... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
775,
30,
1323,
365,
18,
8704,
30,
1323,
365,
18,
8704,
30,
775,
30,
365,
18,
7814,
18,
3612,
12443,
2890,
18,
2564,
16,
365,
18,
655,
3719,
468,
1188,
315,
5930... | |
return rs.imageId | image_id = None if rs: image_id = rs.imageId return image_id | def register_image(self, image_location): """ Register an image. | d470722f130136f4a723a25556c6b45992945c7c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/d470722f130136f4a723a25556c6b45992945c7c/connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
67,
2730,
12,
2890,
16,
1316,
67,
3562,
4672,
3536,
5433,
392,
1316,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
1744,
67,
2730,
12,
2890,
16,
1316,
67,
3562,
4672,
3536,
5433,
392,
1316,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
do_exec('%s czvf %s %s' % (tar, tarfile, projdir), 'tar creation') | do_exec('%s czvf %s %s' % (tar, tarfile, pdir), 'tar creation') | def do_zip(d): 'create .tgz and .zip file archives of d/reportlab' os.chdir(d) if release: b = tagname else: b = py2pdf and "py2pdf" or "current" tarfile = '%s/%s.tgz' % (groupdir,b) zipfile = '%s/%s.zip' % (groupdir,b) if py2pdf: projdir = py2pdf_dir cvsdir = os.path.join(groupdir,projdir) tar = find_exe('tar') if tar is not None: safe_remove(tarfile) do_exec('%s czvf %s %s' % (tar, tarfile, projdir), 'tar creation') zip = find_exe('zip') if zip is not None: safe_remove(zipfile) do_exec('%s -ur %s %s' % (zip, zipfile, projdir), 'zip creation') recursive_rmdir(cvsdir) if release: # make links to the latest outcome for b in ['reportlab','current']: ltarfile = '%s/%s.tgz' % (groupdir,b) lzipfile = '%s/%s.zip' % (groupdir,b) safe_remove(lzipfile) safe_remove(ltarfile) os.symlink(zipfile,lzipfile) os.symlink(tarfile,ltarfile) | dedbd3429429e4460c3ac865b8f11523aca13408 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/dedbd3429429e4460c3ac865b8f11523aca13408/daily.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
4450,
12,
72,
4672,
296,
2640,
263,
88,
9764,
471,
263,
4450,
585,
21997,
434,
302,
19,
6006,
7411,
11,
225,
1140,
18,
343,
1214,
12,
72,
13,
309,
3992,
30,
324,
273,
25586,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
4450,
12,
72,
4672,
296,
2640,
263,
88,
9764,
471,
263,
4450,
585,
21997,
434,
302,
19,
6006,
7411,
11,
225,
1140,
18,
343,
1214,
12,
72,
13,
309,
3992,
30,
324,
273,
25586,... |
def recv (self, buflen=1024, flags=0): | def recv(self, buflen=1024, flags=0): | def recv (self, buflen=1024, flags=0): self._checkClosed() if self._sslobj: if flags != 0: raise ValueError( "non-zero flags not allowed in calls to recv_into() on %s" % self.__class__) while True: try: return self.read(buflen) except SSLError as x: if x.args[0] == SSL_ERROR_WANT_READ: continue else: raise x else: return socket.recv(self, buflen, flags) | e1cac0e547ba90a51eefe78efa72af8e4ccaaaf8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/e1cac0e547ba90a51eefe78efa72af8e4ccaaaf8/ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
16,
1681,
1897,
33,
2163,
3247,
16,
2943,
33,
20,
4672,
365,
6315,
1893,
7395,
1435,
309,
365,
6315,
1049,
383,
441,
30,
309,
2943,
480,
374,
30,
1002,
2068,
12,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
16,
1681,
1897,
33,
2163,
3247,
16,
2943,
33,
20,
4672,
365,
6315,
1893,
7395,
1435,
309,
365,
6315,
1049,
383,
441,
30,
309,
2943,
480,
374,
30,
1002,
2068,
12,
315,
... |
del values_to_documents[value] self.wordCount.change(-1) | try: del values_to_documents[value] self.wordCount.change(-1) except KeyError: pass | def value_unindex_doc(self, doc_id): documents_to_values = self.documents_to_values value = documents_to_values.get(doc_id) if value is not None: values_to_documents = self.values_to_documents self.documentCount.change(-1) del documents_to_values[doc_id] docs = values_to_documents.get(value) # Patch begins here try: docs.remove(doc_id) except (AttributeError, KeyError): new_values_to_documents = self.family.OO.BTree() new_values_to_documents.update(values_to_documents) self.values_to_documents = new_values_to_documents values_to_documents = self.values_to_documents docs = values_to_documents.get(value) try: docs.remove(doc_id) except AttributeError: docs = True # Patch ends here if not docs: del values_to_documents[value] self.wordCount.change(-1) | 5d29c879cb61cab29f284d12b25d7661ffc99ea6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12540/5d29c879cb61cab29f284d12b25d7661ffc99ea6/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
460,
67,
318,
1615,
67,
2434,
12,
2890,
16,
997,
67,
350,
4672,
7429,
67,
869,
67,
2372,
273,
365,
18,
24795,
67,
869,
67,
2372,
460,
273,
7429,
67,
869,
67,
2372,
18,
588,
12,
243... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
460,
67,
318,
1615,
67,
2434,
12,
2890,
16,
997,
67,
350,
4672,
7429,
67,
869,
67,
2372,
273,
365,
18,
24795,
67,
869,
67,
2372,
460,
273,
7429,
67,
869,
67,
2372,
18,
588,
12,
243... |
if cookie_string == None: | if cookie_string is None: | def setCookie(request, u, cookie_name='MOIN_ID', cookie_string=None): """ Set cookie for the user obj u cfg.cookie_lifetime and the user 'remember_me' setting set the lifetime of the cookie. lifetime in int hours, see table: value cookie lifetime ---------------------------------------------------------------- = 0 forever, ignoring user 'remember_me' setting > 0 n hours, or forever if user checked 'remember_me' < 0 -n hours, ignoring user 'remember_me' setting """ if cookie_string == None: # For moin_cookie cookie_string = u.id # Calculate cookie maxage and expires lifetime = int(request.cfg.cookie_lifetime) * 3600 forever = 10*365*24*3600 # 10 years now = time.time() if not lifetime: maxage = forever elif lifetime > 0: if u.remember_me: maxage = forever else: maxage = lifetime elif lifetime < 0: maxage = (-lifetime) expires = now + maxage cookie = makeCookie(request, cookie_name, cookie_string, maxage, expires) # Set cookie request.setHttpHeader(cookie) # IMPORTANT: Prevent caching of current page and cookie request.disableHttpCaching() | ef1096937fe84fb3d22b2765bd2a87780d73b2fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/ef1096937fe84fb3d22b2765bd2a87780d73b2fa/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26793,
12,
2293,
16,
582,
16,
3878,
67,
529,
2218,
5980,
706,
67,
734,
2187,
3878,
67,
1080,
33,
7036,
4672,
3536,
1000,
3878,
364,
326,
729,
1081,
582,
225,
2776,
18,
8417,
67,
17155,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26793,
12,
2293,
16,
582,
16,
3878,
67,
529,
2218,
5980,
706,
67,
734,
2187,
3878,
67,
1080,
33,
7036,
4672,
3536,
1000,
3878,
364,
326,
729,
1081,
582,
225,
2776,
18,
8417,
67,
17155,... |
if (cell_is_not_an_interact_update) { | if (stat == 'd' && cell_is_not_an_interact_update) { | def notebook_lib(): s= r""" | b88b15a5f5f928283841d61259a154a5bd5340b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b88b15a5f5f928283841d61259a154a5bd5340b3/js.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14718,
67,
2941,
13332,
272,
33,
436,
8395,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
14718,
67,
2941,
13332,
272,
33,
436,
8395,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if (DIRECTXSDK.has_key("DX"+ver)==0) and (OMIT.count("DX"+ver)==0): WARNINGS.append("I cannot locate SDK for DX"+ver) WARNINGS.append("I have automatically added this command-line option: --no-dx"+ver) OMIT.append("DX"+ver) else: WARNINGS.append("Using DX"+ver+" sdk: "+DIRECTXSDK["DX"+ver]) | if (OMIT.count("DX"+ver)==0): if (DIRECTXSDK.has_key("DX"+ver)==0): WARNINGS.append("I cannot locate SDK for DX"+ver) WARNINGS.append("I have automatically added this command-line option: --no-dx"+ver) OMIT.append("DX"+ver) else: WARNINGS.append("Using DX"+ver+" sdk: "+DIRECTXSDK["DX"+ver]) | def parseopts(args): global COMPILER,OPTIMIZE,OMIT,INSTALLER,GENMAN,SLAVEBUILD global VERSION,COMPRESSOR,VERBOSE,SLAVEFILE,THREADCOUNT longopts = [ "help","package-info","compiler=","directx-sdk=","slavebuild=", "optimize=","everything","nothing","installer","quiet","verbose", "version=","lzma","no-python","slaves=","threads="] anything = 0 for pkg in PACKAGES: longopts.append("no-"+pkg.lower()) for pkg in PACKAGES: longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--package-info"): raise "package-info" elif (option=="--compiler"): COMPILER=value elif (option=="--optimize"): OPTIMIZE=value elif (option=="--quiet"): VERBOSE-=1 elif (option=="--verbose"): VERBOSE+=1 elif (option=="--installer"): INSTALLER=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): OMIT=[] elif (option=="--nothing"): OMIT=PACKAGES[:] elif (option=="--slaves"): SLAVEFILE=value elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--slavebuild"): SLAVEBUILD=value elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" else: for pkg in PACKAGES: if (option=="--use-"+pkg.lower()): if (OMIT.count(pkg)): OMIT.remove(pkg) break for pkg in PACKAGES: if (option=="--no-"+pkg.lower()): if (OMIT.count(pkg)==0): OMIT.append(pkg) break anything = 1 except "package-info": packageInfo() except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE") if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER) | 08239df6ab5dea0e51011fabfbc3989ad48c8d55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/08239df6ab5dea0e51011fabfbc3989ad48c8d55/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
5423,
1102,
14668,
16,
15620,
3445,
15641,
16,
1872,
1285,
16,
28865,
654,
16,
16652,
9560,
16,
55,
2534,
3412,
20215,
2552,
8456,
16,
4208,
22526,
916,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
5423,
1102,
14668,
16,
15620,
3445,
15641,
16,
1872,
1285,
16,
28865,
654,
16,
16652,
9560,
16,
55,
2534,
3412,
20215,
2552,
8456,
16,
4208,
22526,
916,
... |
def EQUAL(a, b): return a.lower() == b.lower() def main(args = None, progress_func = gdal.TermProgress_nocb, progress_data = None): | def main(args = None, progress_func = TermProgress, progress_data = None): | def ScaledProgressFunc(pct, msg, data): if data.cbk is None: return True return data.cbk(data.min + pct * (data.max - data.min), msg, data.cbk_data) | c2fc9d237e540b57cc18cdde853a15bc6453e2ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10289/c2fc9d237e540b57cc18cdde853a15bc6453e2ac/ogr2ogr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
348,
12825,
5491,
2622,
12,
23989,
16,
1234,
16,
501,
4672,
309,
501,
18,
7358,
79,
353,
599,
30,
327,
1053,
327,
501,
18,
7358,
79,
12,
892,
18,
1154,
397,
19857,
380,
261,
892,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
348,
12825,
5491,
2622,
12,
23989,
16,
1234,
16,
501,
4672,
309,
501,
18,
7358,
79,
353,
599,
30,
327,
1053,
327,
501,
18,
7358,
79,
12,
892,
18,
1154,
397,
19857,
380,
261,
892,
18,... |
choices=["ALL", "undefined_variables", "unused_variables", "maps", "blocks"], action="append", default=[], | choices=["ALL", "undefined_variables", "unused_variables", "maps", "blocks", "fields"], action="append", default=[], | def main(argv=None): if argv is None: argv = sys.argv parser = OptionParser(description="Checks ECMAScript/JavaScript files for common errors.") parser.add_option( "--action", "-a", dest="actions", metavar="ACTION", choices=["ALL", "undefined_variables", "unused_variables", "maps", "blocks"], action="append", default=[], help="""Performs the given checks on the input files. This parameter may be supplied multiple times. | 58d0e35ec63c27e33a21c1b6607b0128e1812372 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/58d0e35ec63c27e33a21c1b6607b0128e1812372/ecmalint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
33,
7036,
4672,
225,
309,
5261,
353,
599,
30,
5261,
273,
2589,
18,
19485,
225,
2082,
273,
18862,
12,
3384,
1546,
4081,
7773,
5535,
3651,
19,
16634,
1390,
364,
2975,
1334... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
33,
7036,
4672,
225,
309,
5261,
353,
599,
30,
5261,
273,
2589,
18,
19485,
225,
2082,
273,
18862,
12,
3384,
1546,
4081,
7773,
5535,
3651,
19,
16634,
1390,
364,
2975,
1334... |
def VarChanged_tabCols(self,*params): value=self.tabCols.get() self.AddChangedItem('main','Indent','tab-cols',value) | def VarChanged_tabCols(self,*params): value=self.tabCols.get() self.AddChangedItem('main','Indent','tab-cols',value) | 9d142adfce027096a5c80dcaf7193b510cf7f984 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9d142adfce027096a5c80dcaf7193b510cf7f984/configDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4562,
5033,
67,
7032,
8011,
12,
2890,
16,
14,
2010,
4672,
460,
33,
2890,
18,
7032,
8011,
18,
588,
1435,
365,
18,
986,
5033,
1180,
2668,
5254,
17023,
7790,
17023,
7032,
17,
6842,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4562,
5033,
67,
7032,
8011,
12,
2890,
16,
14,
2010,
4672,
460,
33,
2890,
18,
7032,
8011,
18,
588,
1435,
365,
18,
986,
5033,
1180,
2668,
5254,
17023,
7790,
17023,
7032,
17,
6842,
2187,
... | |
self.application.mode = "simul" | def setup(self): super(SimulTransform,self).setup() self.application.mode = "simul" self.file_type = "simul.RDO" | 21849801569195c3fc689f74482570d1ac50dacb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/21849801569195c3fc689f74482570d1ac50dacb/MCTransforms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
4672,
2240,
12,
7993,
332,
4059,
16,
2890,
2934,
8401,
1435,
365,
18,
768,
67,
723,
273,
315,
9812,
332,
18,
54,
3191,
6,
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,
3875,
12,
2890,
4672,
2240,
12,
7993,
332,
4059,
16,
2890,
2934,
8401,
1435,
365,
18,
768,
67,
723,
273,
315,
9812,
332,
18,
54,
3191,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
date = "" | date = "" | def normalize_date(date, dtime="T00:00:00Z"): """ Normalize the given date to the "Complete date plus hours, minutes and seconds" format defined in ISO8601 (If "hours, minutes and seconds" part is missing, append 'dtime' to date). 'date' must be checked before with check_date(..). Returns empty string if cannot be normalized """ if len(date) == 10: date = date + dtime elif len(date) != 20: date = "" return date | 4801840da61b61e80e83beb772c85d3df51aafbd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/4801840da61b61e80e83beb772c85d3df51aafbd/oai_repository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3883,
67,
712,
12,
712,
16,
302,
957,
1546,
56,
713,
30,
713,
30,
713,
62,
6,
4672,
3536,
14282,
326,
864,
1509,
358,
326,
315,
6322,
1509,
8737,
7507,
16,
6824,
471,
3974,
6,
740,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3883,
67,
712,
12,
712,
16,
302,
957,
1546,
56,
713,
30,
713,
30,
713,
62,
6,
4672,
3536,
14282,
326,
864,
1509,
358,
326,
315,
6322,
1509,
8737,
7507,
16,
6824,
471,
3974,
6,
740,
... |
overflowok = 0 | def test_format(self): global overflowok | 8bc84cab1dc56227d94a4cc48e5447af29f8a9e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/8bc84cab1dc56227d94a4cc48e5447af29f8a9e2/test_format.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2139,
12,
2890,
4672,
2552,
9391,
601,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
67,
2139,
12,
2890,
4672,
2552,
9391,
601,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
""" """ | def delRequestRoleSession(self): """ """ self.delUserSession() self.__delSession('user_organisation') self.__delSession('user_comments') self.__delSession('user_location') | 5e2c32dd33871476397a4f10e62760ac351975c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3287/5e2c32dd33871476397a4f10e62760ac351975c5/session_manager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
691,
2996,
2157,
12,
2890,
4672,
365,
18,
3771,
1299,
2157,
1435,
365,
16186,
3771,
2157,
2668,
1355,
67,
22543,
10742,
6134,
365,
16186,
3771,
2157,
2668,
1355,
67,
9231,
6134,
365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
691,
2996,
2157,
12,
2890,
4672,
365,
18,
3771,
1299,
2157,
1435,
365,
16186,
3771,
2157,
2668,
1355,
67,
22543,
10742,
6134,
365,
16186,
3771,
2157,
2668,
1355,
67,
9231,
6134,
365,... | |
return excmem.GetSymbolAddress(sys.executable,funcName) | return excmem.GetSymbolAddress(funcName) | def runtimeResolve(funcName): return excmem.GetSymbolAddress(sys.executable,funcName) | 646948357f6c59935597c3b57d9ddca7f0fa5ecd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11637/646948357f6c59935597c3b57d9ddca7f0fa5ecd/x86cpToMemory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3099,
8460,
12,
644,
461,
4672,
327,
3533,
3917,
18,
967,
5335,
1887,
12,
9499,
18,
17751,
16,
644,
461,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3099,
8460,
12,
644,
461,
4672,
327,
3533,
3917,
18,
967,
5335,
1887,
12,
9499,
18,
17751,
16,
644,
461,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for i in CouchObject._to_copy: | for i in self._to_copy: | def to_couch(self): ht = dict() for i in CouchObject._to_copy: if i in self.__dict__: ht[i] = self.__dict__[i] for i in CouchObject._to_copy_id_array: if i in self.__dict__: ht[i] = [j.get_couch_id() for j in self.__dict__[i]] db = Utils.get_couchdb_database() self.couch_id = db.create(ht) return self.couch_id | cfef4f0818fa3989e3694aae47cb243238af3c01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9479/cfef4f0818fa3989e3694aae47cb243238af3c01/CouchObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
71,
7309,
12,
2890,
4672,
14049,
273,
2065,
1435,
364,
277,
316,
365,
6315,
869,
67,
3530,
30,
309,
277,
316,
365,
16186,
1576,
972,
30,
14049,
63,
77,
65,
273,
365,
16186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
71,
7309,
12,
2890,
4672,
14049,
273,
2065,
1435,
364,
277,
316,
365,
6315,
869,
67,
3530,
30,
309,
277,
316,
365,
16186,
1576,
972,
30,
14049,
63,
77,
65,
273,
365,
16186,
... |
else | else: | def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 756) else quickfix.IntField.__init__(self, 756, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
2371,
4313,
13,
469,
30,
9549,
904,
18,
1702,
974,
16186,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
2371,
4313,
13,
469,
30,
9549,
904,
18,
1702,
974,
16186,
27... |
path = os.path.join(os.path.dirname(__file__), '..', 'views', 'index.html') | path = os.path.join(os.path.dirname(__file__), '..', 'views', 'home', 'index.html') | def get(self): try: (user, volunteer) = Authorize.login(self, requireUser=True, requireVolunteer=True, redirectTo='settings') except: return events="" byinterest = [] home_neighborhood = None if not volunteer: message = "Welcome volunteer" settings_text = "Create an account" events_text= "" events = { 'All Upcoming events' : Event.all() } followers = {} following = {} else: message = "Welcome back old volunteer " + volunteer.get_name() settings_text = "Account Settings" events_text="create_an event!" events = { 'Your events' : volunteer.events() } if volunteer.home_neighborhood: message += " from " + volunteer.home_neighborhood.name events['Neighborhood events'] = volunteer.home_neighborhood.events home_neighborhood = volunteer.home_neighborhood for ic in volunteer.interestcategories(): if ic.events(): byinterest.append(ic) followers = volunteer.followers() following = volunteer.following() logout_url = users.create_logout_url(self.request.uri) template_values = { 'logout_url': logout_url, 'message': message, 'events_text': events_text, 'settings_text': settings_text, 'byinterest' : byinterest, 'events' : events, 'followers' : followers, 'following' : following, 'volunteer' : volunteer, 'neighborhoods': NeighborhoodHelper().selected(home_neighborhood), } path = os.path.join(os.path.dirname(__file__), '..', 'views', 'index.html') self.response.out.write(template.render(path, template_values)) | 1d34e5284bddd8504c95cf80235de7f8cc0a37bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5139/1d34e5284bddd8504c95cf80235de7f8cc0a37bd/home.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
775,
30,
261,
1355,
16,
6626,
318,
736,
264,
13,
273,
23859,
18,
5819,
12,
2890,
16,
2583,
1299,
33,
5510,
16,
2583,
17431,
318,
736,
264,
33,
5510,
16,
19200,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
775,
30,
261,
1355,
16,
6626,
318,
736,
264,
13,
273,
23859,
18,
5819,
12,
2890,
16,
2583,
1299,
33,
5510,
16,
2583,
17431,
318,
736,
264,
33,
5510,
16,
19200,
2... |
osd_fb_quiet = ('osd_fb', '/bin/sh', ['-c', './osd_server/osd_fb/osd_fb > /dev/null']) | osd_fb_quiet = ('osd_fb', 'sh', ['-c', './osd_server/osd_fb/osd_fb > /dev/null']) | def __init__(self, app_name, exec_name, exec_args = [], exec_args_dict = {}): self.app_name = app_name self.exec_name = exec_name for i in range(len(exec_args)): processed_arg = exec_args[i] % exec_args_dict exec_args[i] = processed_arg self.exec_args = exec_args | e2bbd12d6ae3fc61acf4686069d7782f5912f2c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e2bbd12d6ae3fc61acf4686069d7782f5912f2c3/startup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
595,
67,
529,
16,
1196,
67,
529,
16,
1196,
67,
1968,
273,
5378,
16,
1196,
67,
1968,
67,
1576,
273,
2618,
4672,
365,
18,
2910,
67,
529,
273,
595,
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,
595,
67,
529,
16,
1196,
67,
529,
16,
1196,
67,
1968,
273,
5378,
16,
1196,
67,
1968,
67,
1576,
273,
2618,
4672,
365,
18,
2910,
67,
529,
273,
595,
67,
... |
return len(self._elements) - len(other._elements) | return False | def __cmp__(self, other): r""" Define comparison for finite posets. | 1ad49a5fca760a553f7c332939f6399dee5514ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1ad49a5fca760a553f7c332939f6399dee5514ff/posets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
436,
8395,
13184,
5826,
364,
25922,
949,
2413,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
436,
8395,
13184,
5826,
364,
25922,
949,
2413,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.