rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
while 1: | buf = in_file.read(IMAGE_IO_CHUNK) while buf: sha_image.update(buf) | def check_image(self, image_file, path): print 'Checking image' if not os.path.exists(path): os.makedirs(path) image_size = os.path.getsize(image_file) if self.debug: print 'Image Size:', image_size, 'bytes' in_file = open(image_file, 'rb') sha_image = sha() while 1: buf = in_file.read(IMAGE_IO_CHUNK) if not buf: break sha_image.update(buf) return (image_size, hexlify(sha_image.digest())) | 094c65f29d0ea2c435de5d40e3dfdf3aad6f3bfe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12707/094c65f29d0ea2c435de5d40e3dfdf3aad6f3bfe/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2730,
12,
2890,
16,
1316,
67,
768,
16,
589,
4672,
1172,
296,
14294,
1316,
11,
309,
486,
1140,
18,
803,
18,
1808,
12,
803,
4672,
1140,
18,
81,
9477,
10539,
12,
803,
13,
1316,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2730,
12,
2890,
16,
1316,
67,
768,
16,
589,
4672,
1172,
296,
14294,
1316,
11,
309,
486,
1140,
18,
803,
18,
1808,
12,
803,
4672,
1140,
18,
81,
9477,
10539,
12,
803,
13,
1316,... |
self.m_f_pull_builtins_hack = f_pull_builtins_hack | self.m_builtins_hack = builtins_hack | def settrace(self, f = None, f_break_on_init = True, timeout = None, f_pull_builtins_hack = False): """ Start tracing mechanism for thread. """ if not self.m_ftrace: return tid = thread.get_ident() if tid in self.m_threads: return | 691ce9ecd8713cae38e843db3324ec1689560d28 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9402/691ce9ecd8713cae38e843db3324ec1689560d28/rpdb2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
5129,
12,
2890,
16,
284,
273,
599,
16,
284,
67,
8820,
67,
265,
67,
2738,
273,
1053,
16,
2021,
273,
599,
16,
284,
67,
13469,
67,
12406,
2679,
67,
76,
484,
273,
1083,
4672,
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,
444,
5129,
12,
2890,
16,
284,
273,
599,
16,
284,
67,
8820,
67,
265,
67,
2738,
273,
1053,
16,
2021,
273,
599,
16,
284,
67,
13469,
67,
12406,
2679,
67,
76,
484,
273,
1083,
4672,
3536,
... |
type = Composable.TitledURILink | type = Grimoire.Types.Composable.TitledURILink | def getList(cls, composer, obj): return [HtmlParagraph(paragraph=paragraph) for paragraph in Grimoire.Types.TextComposer.ComposeBlock.getList(composer, obj)] | c9e4cb943bad0df7b1a94b5fc34eec17f41a7c34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9377/c9e4cb943bad0df7b1a94b5fc34eec17f41a7c34/Composer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10033,
12,
6429,
16,
8561,
16,
1081,
4672,
327,
306,
4353,
17719,
12,
22445,
33,
22445,
13,
364,
10190,
316,
611,
86,
381,
19847,
18,
2016,
18,
1528,
14404,
18,
22375,
1768,
18,
588,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10033,
12,
6429,
16,
8561,
16,
1081,
4672,
327,
306,
4353,
17719,
12,
22445,
33,
22445,
13,
364,
10190,
316,
611,
86,
381,
19847,
18,
2016,
18,
1528,
14404,
18,
22375,
1768,
18,
588,
6... |
d |= self.to_segmentlistdict() | d |= entry.to_segmentlistdict() | def to_segmentlistdict(self): """ Return a segmentlistdict object describing the instruments and times spanned by the entries in this Cache. The return value is coalesced. """ d = segments.segmentlistdict() for entry in self: d |= self.to_segmentlistdict() return d | 078bd3cbb2fb71f825e2788f3373a4c6a737baa9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/078bd3cbb2fb71f825e2788f3373a4c6a737baa9/lal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
9273,
1098,
1576,
12,
2890,
4672,
3536,
2000,
279,
3267,
1098,
1576,
733,
16868,
326,
29555,
471,
4124,
1694,
10041,
635,
326,
3222,
316,
333,
4379,
18,
225,
1021,
327,
460,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9273,
1098,
1576,
12,
2890,
4672,
3536,
2000,
279,
3267,
1098,
1576,
733,
16868,
326,
29555,
471,
4124,
1694,
10041,
635,
326,
3222,
316,
333,
4379,
18,
225,
1021,
327,
460,
353... |
def usingDeps(logConf, dset): logformat = logConf.get('format', None) | def usingDeps(depsLogConf, dset): logformat = depsLogConf.get('format', None) | def usingDeps(logConf, dset): | c18752e3a6a20f73f8cace28d0b3ee01558d13f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/c18752e3a6a20f73f8cace28d0b3ee01558d13f0/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1450,
14430,
12,
1330,
3976,
16,
23626,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1450,
14430,
12,
1330,
3976,
16,
23626,
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,
-... |
def debugLog(msg, level): if level >= DEBUG_LEVEL: print "debug: " + msg | def debugLog(msg, level=1): if level <= DEBUG_LEVEL: print "debug: " + msg | def debugLog(msg, level): if level >= DEBUG_LEVEL: print "debug: " + msg | 0917c882d4bc694d161a7b6362de42549a407546 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4583/0917c882d4bc694d161a7b6362de42549a407546/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
1343,
12,
3576,
16,
1801,
33,
21,
4672,
309,
1801,
1648,
6369,
67,
10398,
30,
1172,
315,
4148,
30,
315,
397,
1234,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
1343,
12,
3576,
16,
1801,
33,
21,
4672,
309,
1801,
1648,
6369,
67,
10398,
30,
1172,
315,
4148,
30,
315,
397,
1234,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if SCons.Util.is_List(d) or isinstance(d, tuple): | if d is None: continue elif SCons.Util.is_List(d) or isinstance(d, tuple): | def processDefines(defs): """process defines, resolving strings, lists, dictionaries, into a list of strings """ if SCons.Util.is_List(defs): l = [] for d in defs: if SCons.Util.is_List(d) or isinstance(d, tuple): if len(d) >= 2: l.append(str(d[0]) + '=' + str(d[1])) else: l.append(str(d[0])) elif SCons.Util.is_Dict(d): for macro,value in d.iteritems(): if value is not None: l.append(str(macro) + '=' + str(value)) else: l.append(str(macro)) elif SCons.Util.is_String(d): l.append(str(d)) else: raise elif SCons.Util.is_Dict(defs): # The items in a dictionary are stored in random order, but # if the order of the command-line options changes from # invocation to invocation, then the signature of the command # line will change and we'll get random unnecessary rebuilds. # Consequently, we have to sort the keys to ensure a # consistent order... l = [] for k,v in sorted(defs.items()): if v is None: l.append(str(k)) else: l.append(str(k) + '=' + str(v)) else: l = [str(defs)] return l | e1bc8408f4f207419b967d0e45b810945ceb6f5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12817/e1bc8408f4f207419b967d0e45b810945ceb6f5c/Defaults.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
15109,
12,
12537,
4672,
3536,
2567,
11164,
16,
17188,
2064,
16,
6035,
16,
16176,
16,
1368,
279,
666,
434,
2064,
3536,
309,
20487,
18,
1304,
18,
291,
67,
682,
12,
12537,
4672,
328,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
15109,
12,
12537,
4672,
3536,
2567,
11164,
16,
17188,
2064,
16,
6035,
16,
16176,
16,
1368,
279,
666,
434,
2064,
3536,
309,
20487,
18,
1304,
18,
291,
67,
682,
12,
12537,
4672,
328,
... |
if key == 'File': | if key == 'file': | def _read_songs(self): obj = {} for key, value in self._read_pairs(): if key == 'File': if obj: yield obj obj = {} key = 'file' obj[key] = value if obj: yield obj raise StopIteration | f07c6536304d53fff973f84baf890f3aecb29c35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4699/f07c6536304d53fff973f84baf890f3aecb29c35/mpd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
67,
816,
564,
12,
2890,
4672,
1081,
273,
2618,
364,
498,
16,
460,
316,
365,
6315,
896,
67,
11545,
13332,
309,
498,
422,
296,
768,
4278,
309,
1081,
30,
2824,
1081,
1081,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
67,
816,
564,
12,
2890,
4672,
1081,
273,
2618,
364,
498,
16,
460,
316,
365,
6315,
896,
67,
11545,
13332,
309,
498,
422,
296,
768,
4278,
309,
1081,
30,
2824,
1081,
1081,
273,
... |
except (httplib.HTTPException), msg: | except httplib.HTTPException, msg: | def request(self, name, *args): proxy = self._getProxy() method = getattr(proxy, name) | ed3a4dbad96aa703938ca590853760d07215e656 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/ed3a4dbad96aa703938ca590853760d07215e656/wiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
2890,
16,
508,
16,
380,
1968,
4672,
2889,
273,
365,
6315,
588,
3886,
1435,
707,
273,
3869,
12,
5656,
16,
508,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
2890,
16,
508,
16,
380,
1968,
4672,
2889,
273,
365,
6315,
588,
3886,
1435,
707,
273,
3869,
12,
5656,
16,
508,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
conflict1 = [ x for x in \ myTrove.getNewFileList() if x[0] == pathId] | files = (myTrove.getNewFileList() + myTrove.getChangedFileList()) conflict1 = [ x for x in files if x[0] == pathId] | def merge(self, otherCs): self.files.update(otherCs.files) | d21e30ea1c8ab0bf7c0468473633e966b49d9cbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/d21e30ea1c8ab0bf7c0468473633e966b49d9cbc/changeset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
12,
2890,
16,
1308,
14272,
4672,
365,
18,
2354,
18,
2725,
12,
3011,
14272,
18,
2354,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
12,
2890,
16,
1308,
14272,
4672,
365,
18,
2354,
18,
2725,
12,
3011,
14272,
18,
2354,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Undefined(obj=42, name='upper') | Undefined(obj=42, name='upper')() | def test_object_repr(self): try: Undefined(obj=42, name='upper') except UndefinedError, e: assert e.message == "'int' object has no attribute 'upper'" else: assert False, 'expected exception' | 82a2225ac939318e7d812cb4ae537be9fb6362cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14446/82a2225ac939318e7d812cb4ae537be9fb6362cf/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1612,
67,
12715,
12,
2890,
4672,
775,
30,
22243,
12,
2603,
33,
9452,
16,
508,
2218,
5797,
6134,
1435,
1335,
22243,
668,
16,
425,
30,
1815,
425,
18,
2150,
422,
2491,
474,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1612,
67,
12715,
12,
2890,
4672,
775,
30,
22243,
12,
2603,
33,
9452,
16,
508,
2218,
5797,
6134,
1435,
1335,
22243,
668,
16,
425,
30,
1815,
425,
18,
2150,
422,
2491,
474,
11,
... |
def flushCaches(self, reason): | def flushCaches(self, reason, recursive=True): | def flushCaches(self, reason): """ Flush the caches setup on this Kind and its subKinds. """ | 011942d25d6b620be02f6c501b288ced124c4eea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/011942d25d6b620be02f6c501b288ced124c4eea/Kind.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
18755,
12,
2890,
16,
3971,
16,
5904,
33,
5510,
4672,
3536,
11624,
326,
12535,
3875,
603,
333,
5851,
471,
2097,
720,
5677,
87,
18,
3536,
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,
0,
0,
0,
0,
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,
3663,
18755,
12,
2890,
16,
3971,
16,
5904,
33,
5510,
4672,
3536,
11624,
326,
12535,
3875,
603,
333,
5851,
471,
2097,
720,
5677,
87,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
'unicode': r""" | 'no unicode': r""" | def __unicode__(self): """Returns the XML that this `Meld` represents. Don't call this directly - instead convert a `Meld` to unicode using `unicode(object)`.""" return unicode(self._tree.toText()) | 95117ab14b92f368778b02fa24ac3de99678e63d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/95117ab14b92f368778b02fa24ac3de99678e63d/PyMeldLite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9124,
972,
12,
2890,
4672,
3536,
1356,
326,
3167,
716,
333,
1375,
49,
488,
68,
8686,
18,
225,
7615,
1404,
745,
333,
5122,
300,
3560,
1765,
279,
1375,
49,
488,
68,
358,
5252,
1450... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9124,
972,
12,
2890,
4672,
3536,
1356,
326,
3167,
716,
333,
1375,
49,
488,
68,
8686,
18,
225,
7615,
1404,
745,
333,
5122,
300,
3560,
1765,
279,
1375,
49,
488,
68,
358,
5252,
1450... |
str = str + c | token.append(c) | def parseaddr(address): import string str = '' email = '' comment = '' backslash = 0 dquote = 0 space = 0 paren = 0 bracket = 0 seen_bracket = 0 for c in address: if backslash: str = str + c backslash = 0 continue if c == '\\': backslash = 1 continue if dquote: if c == '"': dquote = 0 else: str = str + c continue if c == '"': dquote = 1 continue if c in string.whitespace: space = 1 continue if space: str = str + ' ' space = 0 if paren: if c == '(': paren = paren + 1 str = str + c continue if c == ')': paren = paren - 1 if paren == 0: comment = comment + str str = '' continue if c == '(': paren = paren + 1 if bracket: email = email + str str = '' elif not seen_bracket: email = email + str str = '' continue if bracket: if c == '>': bracket = 0 email = email + str str = '' continue if c == '<': bracket = 1 seen_bracket = 1 comment = comment + str str = '' email = '' continue if c == '#' and not bracket and not paren: # rest is comment break str = str + c if str: if seen_bracket: if bracket: email = str else: comment = comment + str else: if paren: comment = comment + str else: email = email + str return string.strip(comment), string.strip(email) | a27c46cb14f5161823e8286256b61e46ad0634c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a27c46cb14f5161823e8286256b61e46ad0634c5/rfc822.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4793,
12,
2867,
4672,
1930,
533,
609,
273,
875,
2699,
273,
875,
2879,
273,
875,
23253,
273,
374,
302,
6889,
273,
374,
3476,
273,
374,
22146,
273,
374,
9843,
273,
374,
5881,
67,
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,
1109,
4793,
12,
2867,
4672,
1930,
533,
609,
273,
875,
2699,
273,
875,
2879,
273,
875,
23253,
273,
374,
302,
6889,
273,
374,
3476,
273,
374,
22146,
273,
374,
9843,
273,
374,
5881,
67,
2... |
if bgcolor: fill_color = self.pdf.fill_color self.pdf.set_fill_color(*bgcolor) self.pdf.rect(self.pdf.x, self.pdf.y, w, h, 'F') self.pdf.fill_color = fill_color | def handle_data(self, txt): if self.href: self.put_link(self.href,txt) elif self.td is not None: if 'width' not in self.td and 'colspan' not in self.td: l = [self.table_col_width[self.table_col_index]] elif 'colspan' in self.td: i = self.table_col_index colspan = int(self.td['colspan']) l = self.table_col_width[i:i+colspan] else: l = [self.td.get('width','240')] w = sum([self.width2mm(lenght) for lenght in l]) h = int(self.td.get('height', 0)) / 4 or self.h*1.30 print "h", h self.table_h = h border = int(self.table.get('border', 0)) if not self.th: align = self.td.get('align', 'L')[0].upper() border = border and 'LR' else: self.set_style('B',True) align = 'C' bgcolor = hex2dec(self.td.get('bgcolor', self.tr.get('bgcolor', ''))) if bgcolor: fill_color = self.pdf.fill_color self.pdf.set_fill_color(*bgcolor) self.pdf.rect(self.pdf.x, self.pdf.y, w, h, 'F') self.pdf.fill_color = fill_color if self.thead is not None: self.theader.append((w,h,txt,border,0,align, bgcolor and 1)) if self.tfoot is not None: self.tfooter.append((w,h,txt,border,0,align, bgcolor and 1)) # check if reached end of page, add table footer and header: height = h + (self.tfooter and self.tfooter[0][1] or 0) if self.pdf.y+height>self.pdf.page_break_trigger and not self.th: self.output_table_footer() self.pdf.add_page() self.theader_out = self.tfooter_out = False if self.tfoot is None and self.thead is None: if not self.theader_out: self.output_table_header() self.pdf.cell(w,h,txt,border,0,align, bgcolor) | cf4301d023fcfeb9e417d3e2e63a7f0eea4515c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8794/cf4301d023fcfeb9e417d3e2e63a7f0eea4515c9/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
892,
12,
2890,
16,
6463,
4672,
309,
365,
18,
7547,
30,
365,
18,
458,
67,
1232,
12,
2890,
18,
7547,
16,
5830,
13,
1327,
365,
18,
4465,
353,
486,
599,
30,
309,
296,
2819,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
892,
12,
2890,
16,
6463,
4672,
309,
365,
18,
7547,
30,
365,
18,
458,
67,
1232,
12,
2890,
18,
7547,
16,
5830,
13,
1327,
365,
18,
4465,
353,
486,
599,
30,
309,
296,
2819,
1... | |
(int(time.gmtime()), user_id) | (int(time.time()), user_id) | def update_last_seen(dbcon, cur, user_id): """Updates the record for when a given user was last seen. Returns the previous time recorded for the user's last visit, or 0 if no previous visit is recorded. """ # Is there already a last_seen record for this user. res = cur.execute( """ SELECT seen_on FROM last_seens WHERE wikiusers_id = ? """, (user_id,) ) res = list(res) assert len(res) == 0 or len(res) == 1 if len(res) == 0: # Create a new last_seen record. res2 = cur.execute( """ INSERT INTO last_seens (wikiusers_id, seen_on) VALUES (?, ?) """, (user_id, int(time.gmtime())) ) return res[0][0] else: # Update the existing record. res = cur.execute( """ UPDATE last_seens SET seen_on = ? WHERE wikiusers_id = ? """, (int(time.gmtime()), user_id) ) return 0 | a479402aa1c7ac2e5daa8c8a5ea279dd433d516d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8158/a479402aa1c7ac2e5daa8c8a5ea279dd433d516d/gliki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2722,
67,
15156,
12,
1966,
591,
16,
662,
16,
729,
67,
350,
4672,
3536,
5121,
326,
1409,
364,
1347,
279,
864,
729,
1703,
1142,
5881,
18,
2860,
326,
2416,
813,
16421,
364,
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,
1089,
67,
2722,
67,
15156,
12,
1966,
591,
16,
662,
16,
729,
67,
350,
4672,
3536,
5121,
326,
1409,
364,
1347,
279,
864,
729,
1703,
1142,
5881,
18,
2860,
326,
2416,
813,
16421,
364,
326,... |
Node.debug=open( "debug4.out", "w" ) | Node.debug=StringIO() | def __init__( self ): self.childNodes=[] if Node._debug: index=repr( id( self ))+repr( self.__class__ ) Node.allnodes[index]=repr( self.__dict__ ) if Node.debug==None: Node.debug=open( "debug4.out", "w" ) Node.debug.write( "create %s\n"%index ) | 1e68827c8fa95d10df3c805e5dd8383b19048b18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1e68827c8fa95d10df3c805e5dd8383b19048b18/minidom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
262,
30,
365,
18,
3624,
3205,
33,
8526,
309,
2029,
6315,
4148,
30,
770,
33,
12715,
12,
612,
12,
365,
8623,
15,
12715,
12,
365,
16186,
1106,
972,
262,
2029,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
262,
30,
365,
18,
3624,
3205,
33,
8526,
309,
2029,
6315,
4148,
30,
770,
33,
12715,
12,
612,
12,
365,
8623,
15,
12715,
12,
365,
16186,
1106,
972,
262,
2029,
... |
raise AssertError(""" | raise AssertionError(""" | def assert_equal_spec(x, y): # Handles nan and inf if np.isnan(x) and np.isnan(y): pass elif np.isinf(x) and np.isinf(y): if x * y > 0: pass else: raise AssertError(""" | c60575349b5810b393eb3092a591ac429325074c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/c60575349b5810b393eb3092a591ac429325074c/test_umath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1815,
67,
9729,
67,
2793,
12,
92,
16,
677,
4672,
468,
27020,
6468,
471,
8286,
309,
1130,
18,
291,
13569,
12,
92,
13,
471,
1130,
18,
291,
13569,
12,
93,
4672,
1342,
1327,
1130,
18,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1815,
67,
9729,
67,
2793,
12,
92,
16,
677,
4672,
468,
27020,
6468,
471,
8286,
309,
1130,
18,
291,
13569,
12,
92,
13,
471,
1130,
18,
291,
13569,
12,
93,
4672,
1342,
1327,
1130,
18,
29... |
if secondTargetPage.sectionFreeTitle() == secondRedir.sectionFreeTitle() \ or secondTargetPage.sectionFreeTitle() == redir.sectionFreeTitle(): continue oldText = redir.get(get_redirect=True) text = mysite.redirectRegex().sub( ' (mysite.redirect( True ), secondTargetPage.title()), oldText) wikipedia.showDiff(oldText, text) if self.prompt(u'Do you want to accept the changes?'): try: redir.put(text) except wikipedia.LockedPage: wikipedia.output(u'%s is locked.' % redir.title()) except wikipedia.SpamfilterError, error: wikipedia.output( | if redirList.count((u'%s:%s' % (targetPage.site().lang, targetPage.sectionFreeTitle()))) > 0: wikipedia.output( u'Warning: Redirect target %s forms a redirect loop.' % targetPage.aslink()) break else: newRedir = targetPage continue oldText = redir.get(get_redirect=True) text = mysite.redirectRegex().sub( ' (mysite.redirect( True ), targetPage.aslink()), oldText) if text == oldText: break wikipedia.showDiff(oldText, text) if self.prompt(u'Do you want to accept the changes?'): try: redir.put(text) except wikipedia.LockedPage: wikipedia.output(u'%s is locked.' % redir.title()) except wikipedia.SpamfilterError, error: wikipedia.output( | def fix_double_redirects(self): mysite = wikipedia.getSite() for redir_name in self.generator.retrieve_double_redirects(): redir = wikipedia.Page(mysite, redir_name) # Show the title of the page we're working on. # Highlight the title in purple. wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % redir.title()) try: secondRedir = redir.getRedirectTarget() except wikipedia.IsNotRedirectPage: wikipedia.output(u'%s is not a redirect.' % redir.aslink()) except wikipedia.NoPage: wikipedia.output(u'%s doesn\'t exist.' % redir.aslink()) else: if secondRedir.site() != redir.site(): wikipedia.output( u'Skipping %s; redirect target (%s) is on a different site.' % (redir.aslink(), secondRedir.aslink())) continue try: secondTargetPage = secondRedir.getRedirectTarget() except wikipedia.SectionError: wikipedia.output( u'Warning: Redirect target section %s doesn\'t exist.' % secondRedir.aslink()) except wikipedia.IsNotRedirectPage: wikipedia.output( u'Redirect target %s is not a redirect.' % secondRedir.aslink()) except wikipedia.BadTitle, e: # str(e) is in the format 'BadTitle: [[Foo]]' wikipedia.output( u'Redirect target %s is not a valid page title.' % str(e)[10:]) except wikipedia.NoPage: wikipedia.output( u'Redirect target %s doesn\'t exist.' % secondRedir.aslink()) else: if secondTargetPage.site() != secondRedir.site(): wikipedia.output( u"Page %s is a redirect to a different site (%s)" % (secondRedir.aslink(), secondTargetPage.aslink())) continue # watch out for redirect loops if secondTargetPage.sectionFreeTitle() == secondRedir.sectionFreeTitle() \ or secondTargetPage.sectionFreeTitle() == redir.sectionFreeTitle(): continue oldText = redir.get(get_redirect=True) text = mysite.redirectRegex().sub( '#%s [[%s]]' % (mysite.redirect( True ), secondTargetPage.title()), oldText) wikipedia.showDiff(oldText, text) if self.prompt(u'Do you want to accept the changes?'): try: redir.put(text) except wikipedia.LockedPage: wikipedia.output(u'%s is locked.' % redir.title()) except wikipedia.SpamfilterError, error: wikipedia.output( | d2d98f84ef9413d7b3493a0e70b4c847de1f57ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/d2d98f84ef9413d7b3493a0e70b4c847de1f57ad/redirect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
9056,
67,
22715,
12,
2890,
4672,
312,
1900,
1137,
273,
21137,
18,
588,
4956,
1435,
364,
283,
1214,
67,
529,
316,
365,
18,
8812,
18,
17466,
67,
9056,
67,
22715,
13332,
283,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
9056,
67,
22715,
12,
2890,
4672,
312,
1900,
1137,
273,
21137,
18,
588,
4956,
1435,
364,
283,
1214,
67,
529,
316,
365,
18,
8812,
18,
17466,
67,
9056,
67,
22715,
13332,
283,
12... |
for signalName in SUPPORTED_SIGNALS: | for signalName in session.SUPPORTED_SIGNALS: | def test_getSignalName(self): """ _getSignalName should return the name of a signal when given the signal number. """ for signalName in SUPPORTED_SIGNALS: signalName = 'SIG' + signalName signalValue = getattr(signal, signalName) sshName = self.pp._getSignalName(signalValue) self.assertEquals(sshName, signalName, "%i: %s != %s" % (signalValue, sshName, signalName)) | fa6ef877e1ef071131e883c35e9d22708847e951 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12595/fa6ef877e1ef071131e883c35e9d22708847e951/test_session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
11208,
461,
12,
2890,
4672,
3536,
389,
588,
11208,
461,
1410,
327,
326,
508,
434,
279,
4277,
1347,
864,
326,
4277,
1300,
18,
3536,
364,
4277,
461,
316,
1339,
18,
21134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
588,
11208,
461,
12,
2890,
4672,
3536,
389,
588,
11208,
461,
1410,
327,
326,
508,
434,
279,
4277,
1347,
864,
326,
4277,
1300,
18,
3536,
364,
4277,
461,
316,
1339,
18,
21134,
... |
def index_html(self, id, REQUEST, RESPONSE=None): | def createInObjectManager(self, id, REQUEST, RESPONSE=None): | def index_html(self, id, REQUEST, RESPONSE=None): """ Create Z instance. If called with a RESPONSE, the RESPONSE will be redirected to the management screen of the new instance's parent Folder. Otherwise, the instance will be returned. """ i=mapply(self._zclass_, (), REQUEST) if not hasattr(i, 'id') or not i.id: i.id=id | f2a7d6642189f74e03b5151d84d89803fbb949bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f2a7d6642189f74e03b5151d84d89803fbb949bb/ZClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
382,
921,
1318,
12,
2890,
16,
612,
16,
12492,
16,
20645,
33,
7036,
4672,
3536,
1788,
2285,
791,
18,
971,
2566,
598,
279,
20645,
16,
326,
20645,
903,
506,
21808,
358,
326,
11803,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
382,
921,
1318,
12,
2890,
16,
612,
16,
12492,
16,
20645,
33,
7036,
4672,
3536,
1788,
2285,
791,
18,
971,
2566,
598,
279,
20645,
16,
326,
20645,
903,
506,
21808,
358,
326,
11803,
5... |
raise TypeError, "The node can only be appended to a Virtual\ System Section. The given node is not a Virtual System Section" | raise TypeError,("The node can only be appended to a Virtual"+ "System Section. The given node is not a Virtual System Section") | def createInstallSection(self, node, info, infoID=None, initBoot=None, bootStopDelay=None, ident=None): """ This method creates the install section used to describe a virtual system collection. | 1e366dda56653bbe1874c94abe9d80a9b34ba33a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9789/1e366dda56653bbe1874c94abe9d80a9b34ba33a/OvfFile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
6410,
5285,
12,
2890,
16,
756,
16,
1123,
16,
1123,
734,
33,
7036,
16,
1208,
15817,
33,
7036,
16,
4835,
4947,
6763,
33,
7036,
16,
3390,
33,
7036,
4672,
3536,
1220,
707,
3414,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
6410,
5285,
12,
2890,
16,
756,
16,
1123,
16,
1123,
734,
33,
7036,
16,
1208,
15817,
33,
7036,
16,
4835,
4947,
6763,
33,
7036,
16,
3390,
33,
7036,
4672,
3536,
1220,
707,
3414,
326,
... |
print("-", line, end=' ') | print("-", line, end='') | def pair(x0, x1): # x0:x1 are 0-based slice indices; convert to 1-based line indices. x0 += 1 if x0 >= x1: return "line " + str(x0) else: return "lines %d-%d" % (x0, x1) | c060d42b1158b8f320e0abc4fd5fec135a5d2ea0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/c060d42b1158b8f320e0abc4fd5fec135a5d2ea0/regrtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3082,
12,
92,
20,
16,
619,
21,
4672,
468,
619,
20,
30,
92,
21,
854,
374,
17,
12261,
2788,
4295,
31,
1765,
358,
404,
17,
12261,
980,
4295,
18,
619,
20,
1011,
404,
309,
619,
20,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3082,
12,
92,
20,
16,
619,
21,
4672,
468,
619,
20,
30,
92,
21,
854,
374,
17,
12261,
2788,
4295,
31,
1765,
358,
404,
17,
12261,
980,
4295,
18,
619,
20,
1011,
404,
309,
619,
20,
1545... |
w = self._element_class(self, x, coerce, copy) | def __call__(self, x, coerce=True, copy=True, check=True): """ Create an element of this free module. | c6a1c4c7b2f8a0295d2ac3fd2bd0c078c94ad60d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/c6a1c4c7b2f8a0295d2ac3fd2bd0c078c94ad60d/free_module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
12270,
33,
5510,
16,
1610,
33,
5510,
16,
866,
33,
5510,
4672,
3536,
1788,
392,
930,
434,
333,
4843,
1605,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
12270,
33,
5510,
16,
1610,
33,
5510,
16,
866,
33,
5510,
4672,
3536,
1788,
392,
930,
434,
333,
4843,
1605,
18,
2,
-100,
-100,
-100,
-100,
-100,
... | |
print 12345, tags, categories | def _remember_category(category, element): term = element.attrib['term'] if term not in self._categories_by_term: self._categories_by_term[term] = category | 3971ab248c9675fd10b8e78a70a73a9f06d0bdb4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5796/3971ab248c9675fd10b8e78a70a73a9f06d0bdb4/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
28155,
67,
4743,
12,
4743,
16,
930,
4672,
2481,
273,
930,
18,
14588,
3292,
6408,
3546,
309,
2481,
486,
316,
365,
6315,
8995,
67,
1637,
67,
6408,
30,
365,
6315,
8995,
67,
1637,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
28155,
67,
4743,
12,
4743,
16,
930,
4672,
2481,
273,
930,
18,
14588,
3292,
6408,
3546,
309,
2481,
486,
316,
365,
6315,
8995,
67,
1637,
67,
6408,
30,
365,
6315,
8995,
67,
1637,
67,... | |
"snRNA", "PROTEIN"] | "snRNA", "snoRNA", "PROTEIN"] | def do_nothing(martel_info): return martel_info | 0d04579912bc3b4f1cdba84c2f2f26d4cbba48dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/0d04579912bc3b4f1cdba84c2f2f26d4cbba48dd/genbank_format.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
30874,
12,
81,
485,
292,
67,
1376,
4672,
327,
312,
485,
292,
67,
1376,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
30874,
12,
81,
485,
292,
67,
1376,
4672,
327,
312,
485,
292,
67,
1376,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
stdout = """cat SConstruct > foo.out\n""") | stdout = """%s SConstruct > foo.out\n"""%cat_cmd) | def TOOL_FOO(env): env['FOO'] = 'cat' bld = Builder(action = '$FOO ${SOURCE} > ${TARGET}', suffix = '.tgt') env.Append(BUILDERS = {'Foo' : bld}) | 7c953255c1c3192b4bdfa8ec08350a6c819f3935 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/7c953255c1c3192b4bdfa8ec08350a6c819f3935/site_init.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8493,
1741,
67,
3313,
51,
12,
3074,
4672,
1550,
3292,
3313,
51,
3546,
273,
296,
2574,
11,
324,
1236,
273,
5008,
12,
1128,
273,
3365,
3313,
51,
3531,
6537,
97,
405,
3531,
16374,
24259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8493,
1741,
67,
3313,
51,
12,
3074,
4672,
1550,
3292,
3313,
51,
3546,
273,
296,
2574,
11,
324,
1236,
273,
5008,
12,
1128,
273,
3365,
3313,
51,
3531,
6537,
97,
405,
3531,
16374,
24259,
... |
rev_options = self.check_rev_options(rev, dest) | rev_options = self.check_rev_options(rev, dest, rev_options) | def obtain(self, dest): url, rev = self.get_url_rev() if rev: rev_options = [rev] rev_display = ' (to revision %s)' % rev else: rev_options = ['origin/master'] rev_display = '' clone = True if os.path.exists(os.path.join(dest, self.dirname)): existing_url = self.get_url(dest) rev_options = self.check_rev_options(rev, dest) clone = False if existing_url == url: logger.info('Clone in %s exists, and has correct URL (%s)' % (display_path(dest), url)) logger.notify('Updating clone %s%s' % (display_path(dest), rev_display)) call_subprocess([GIT_CMD, 'fetch', '-q'], cwd=dest) call_subprocess( [GIT_CMD, 'checkout', '-q', '-f'] + rev_options, cwd=dest) else: logger.warn('Git clone in %s exists with URL %s' % (display_path(dest), existing_url)) logger.warn('The plan is to install the Git repository %s' % url) response = ask('What to do? (s)witch, (i)gnore, (w)ipe, (b)ackup ', ('s', 'i', 'w', 'b')) if response == 's': logger.notify('Switching clone %s to %s%s' % (display_path(dest), url, rev_display)) call_subprocess( [GIT_CMD, 'config', 'remote.origin.url', url], cwd=dest) call_subprocess( [GIT_CMD, 'checkout', '-q'] + rev_options, cwd=dest) elif response == 'i': # do nothing pass elif response == 'w': logger.warn('Deleting %s' % display_path(dest)) shutil.rmtree(dest) clone = True elif response == 'b': dest_dir = backup_dir(dest) logger.warn('Backing up %s to %s' % (display_path(dest), dest_dir)) shutil.move(dest, dest_dir) clone = True if clone: logger.notify('Cloning %s%s to %s' % (url, rev_display, display_path(dest))) call_subprocess( [GIT_CMD, 'clone', '-q', url, dest]) rev_options = self.check_rev_options(rev, dest) call_subprocess( [GIT_CMD, 'checkout', '-q'] + rev_options, cwd=dest) | 7bb857aa487aef72245a17b5eaed0b3792eff17f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12982/7bb857aa487aef72245a17b5eaed0b3792eff17f/pip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7161,
12,
2890,
16,
1570,
4672,
880,
16,
5588,
273,
365,
18,
588,
67,
718,
67,
9083,
1435,
309,
5588,
30,
5588,
67,
2116,
273,
306,
9083,
65,
5588,
67,
5417,
273,
296,
261,
869,
6350... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7161,
12,
2890,
16,
1570,
4672,
880,
16,
5588,
273,
365,
18,
588,
67,
718,
67,
9083,
1435,
309,
5588,
30,
5588,
67,
2116,
273,
306,
9083,
65,
5588,
67,
5417,
273,
296,
261,
869,
6350... |
pattern_file_path = ('..', '..', '..', 'data', 'MIT', 'device_user_agent_patterns.json') | pattern_file_paths = [ '../../../data/MIT/device_user_agent_patterns.json', '../../../data/Infrae/device_user_agent_patterns.json', ] | def __call__(self): try: logger.debug("Lookup the user agent against wurfl db.") wurfl_device = \ devices.select_ua(self.user_agent, search=JaroWinkler(accuracy=0.85)) return WDevice(wurfl_device) # this is bad but a weird but makes DeviceNotFound not catched if # except DeviceNotFound is used except Exception as e: logger.debug("Error during wurfl lookup :%s" % str(e)) return None | 2848a2b772b5aa1c3d177c1ad9a91e2ad50cd133 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14931/2848a2b772b5aa1c3d177c1ad9a91e2ad50cd133/classifiers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
775,
30,
1194,
18,
4148,
2932,
6609,
326,
729,
4040,
5314,
341,
295,
2242,
1319,
1199,
13,
341,
295,
2242,
67,
5964,
273,
521,
7166,
18,
4025,
67,
1188... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
775,
30,
1194,
18,
4148,
2932,
6609,
326,
729,
4040,
5314,
341,
295,
2242,
1319,
1199,
13,
341,
295,
2242,
67,
5964,
273,
521,
7166,
18,
4025,
67,
1188... |
"""add item and return message | """imports csv and returns message | def _addItem(self, data): """add item and return message | 14fa936a04a33d6cf73063d205bf79238a87a0c4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9843/14fa936a04a33d6cf73063d205bf79238a87a0c4/channel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
1180,
12,
2890,
16,
501,
4672,
3536,
1289,
761,
471,
327,
883,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
1180,
12,
2890,
16,
501,
4672,
3536,
1289,
761,
471,
327,
883,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
class TRSelTag(SelectionTag): def setPos(self, position): grp = self.group oldPos = grp.position oldSize = grp.size | class TRSelTag(CornerSelTag): name = 'top right' toggleAnchors = (0, 1, 1, 0) def setPos(self, position): grp = self.group oldPos = grp.position oldSize = grp.size | def setPos(self, position): grp = self.group | 2dfc26470222dc7c48c18810d65dc6cd09f6688b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2dfc26470222dc7c48c18810d65dc6cd09f6688b/SelectionTags.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
1616,
12,
2890,
16,
1754,
4672,
14295,
273,
365,
18,
1655,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
1616,
12,
2890,
16,
1754,
4672,
14295,
273,
365,
18,
1655,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
RFC-822 in front of you. | RFC 2822 in front of you. http://www.faqs.org/rfcs/rfc2822.html | def parseaddr(address): """Parse an address into a (realname, mailaddr) tuple.""" a = AddrlistClass(address) list = a.getaddrlist() if not list: return (None, None) else: return list[0] | b6f6fad5b96d38181611f28a27ba278b112ea9c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b6f6fad5b96d38181611f28a27ba278b112ea9c9/rfc822.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4793,
12,
2867,
4672,
3536,
3201,
392,
1758,
1368,
279,
261,
7688,
529,
16,
4791,
4793,
13,
3193,
12123,
279,
273,
10216,
1098,
797,
12,
2867,
13,
666,
273,
279,
18,
588,
4793,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4793,
12,
2867,
4672,
3536,
3201,
392,
1758,
1368,
279,
261,
7688,
529,
16,
4791,
4793,
13,
3193,
12123,
279,
273,
10216,
1098,
797,
12,
2867,
13,
666,
273,
279,
18,
588,
4793,
1... |
if isinstance(x, float): return math.floor(x) | if isinstance(x, (float, int, long, complex)): return int(math.floor(x)) | def __call__(self, x): try: return x.floor() except AttributeError: if isinstance(x, float): return math.floor(x) return SymbolicComposition(self, SR(x)) | e37a65e21be98cc6d899b8c5ab6b6b5ceeb0189c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e37a65e21be98cc6d899b8c5ab6b6b5ceeb0189c/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
4672,
775,
30,
327,
619,
18,
74,
5807,
1435,
1335,
6394,
30,
309,
1549,
12,
92,
16,
261,
5659,
16,
509,
16,
1525,
16,
7233,
3719,
30,
327,
509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
619,
4672,
775,
30,
327,
619,
18,
74,
5807,
1435,
1335,
6394,
30,
309,
1549,
12,
92,
16,
261,
5659,
16,
509,
16,
1525,
16,
7233,
3719,
30,
327,
509,
... |
if not _globalvar and self.dtype.char not in 'SU': | if not _globalvar and self.dtype.char not in 'SUb': | def __array_finalize__(self, obj): if not _globalvar and self.dtype.char not in 'SU': raise ValueError, "Can only create a chararray from string data." | d618770c32987d4148a94e6e14c14b9de72e3763 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/d618770c32987d4148a94e6e14c14b9de72e3763/defchararray.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1126,
67,
30343,
972,
12,
2890,
16,
1081,
4672,
225,
309,
486,
389,
6347,
1401,
471,
365,
18,
8972,
18,
3001,
486,
316,
296,
6639,
70,
4278,
1002,
2068,
16,
315,
2568,
1338,
752,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1126,
67,
30343,
972,
12,
2890,
16,
1081,
4672,
225,
309,
486,
389,
6347,
1401,
471,
365,
18,
8972,
18,
3001,
486,
316,
296,
6639,
70,
4278,
1002,
2068,
16,
315,
2568,
1338,
752,... |
self.imageDraw.thick_rectangle(m.box(), outline=self.fill, fill=node.color) | self.imageDraw.thick_rectangle(m.box(), outline=self.fill, fill=node.color) | def screennode(self, node, **kwargs): ttfont = kwargs.get('font') | cec09d547ee78029d166de62894b95068dd6ada6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/81/cec09d547ee78029d166de62894b95068dd6ada6/DiagramDraw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5518,
2159,
12,
2890,
16,
756,
16,
2826,
4333,
4672,
3574,
5776,
273,
1205,
18,
588,
2668,
5776,
6134,
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,
5518,
2159,
12,
2890,
16,
756,
16,
2826,
4333,
4672,
3574,
5776,
273,
1205,
18,
588,
2668,
5776,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
sys.exit(0) | def _help(arg): """ Display a speficied help message, and exit. @param arg: The name of the help message to display. Currently, only C{"css"} and C{"usage"} are recognized. @type arg: C{string} @rtype: C{None} """ arg = arg.strip().lower() if arg == 'css': from epydoc.css import STYLESHEETS print '\nThe following built-in CSS stylesheets are available:' names = STYLESHEETS.keys() names.sort() maxlen = max(*[len(name) for name in names]) format = ' %'+`-maxlen-1`+'s %s' for name in names: print format % (name, STYLESHEETS[name][1]) print sys.exit(0) elif arg == 'version': _version() elif arg in ('docformat', 'doc_format', 'doc-format'): print '\n__docformat__ is a module variable that specifies the markup' print 'language for the docstrings in a module. Its value is a ' print 'string, consisting the name of a markup language, optionally ' print 'followed by a language code (such as "en" for English). Epydoc' print 'currently recognizes the following markup language names:' import objdoc for format in objdoc.KNOWN_DOCFORMATS: print ' - %s' % format print sys.exit(0) else: _usage(0) | 55668059b93c1d811a0940669739c36e1bda8a13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/55668059b93c1d811a0940669739c36e1bda8a13/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5201,
12,
3175,
4672,
3536,
9311,
279,
17785,
74,
335,
2092,
2809,
883,
16,
471,
2427,
18,
225,
632,
891,
1501,
30,
1021,
508,
434,
326,
2809,
883,
358,
2562,
18,
225,
15212,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5201,
12,
3175,
4672,
3536,
9311,
279,
17785,
74,
335,
2092,
2809,
883,
16,
471,
2427,
18,
225,
632,
891,
1501,
30,
1021,
508,
434,
326,
2809,
883,
358,
2562,
18,
225,
15212,
16,
... | |
inodestr = "%s|D%d" % (ios, inode) | if inode.alloc == 2: return inodestr = "%s|D%s" % (ios, inode) | def insert_inode(inode): inodestr = "%s|D%d" % (ios, inode) if inode.alloc: status = 'a' else: status = 'f' try: s = fs.stat(inode=str(inode)) print "INSERT INTO inode (`inode`,`status`,`uid`, `gid`,`mtime`,`atime`, `ctime`,`dtime`,`mode`, `links`,`link`,`size`) VALUES(%r,%r,'%r','%r',from_unixtime(%d), from_unixtime(%d),from_unixtime(%d), from_unixtime(%d),'%r','%r',%r,'%r');" % (inodestr, status, s.st_uid, s.st_gid, s.st_mtime, s.st_atime, s.st_ctime, 0, s.st_mode, s.st_nlink, "", s.st_size) except IOError: pass | ab0581dd8b0678dd7456a37fda5c8a1031b1d3d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/ab0581dd8b0678dd7456a37fda5c8a1031b1d3d1/dbtool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
267,
390,
12,
267,
390,
4672,
225,
309,
17870,
18,
9853,
422,
576,
30,
327,
225,
316,
1145,
313,
273,
2213,
87,
96,
40,
9,
87,
6,
738,
261,
7441,
16,
17870,
13,
225,
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,
2243,
67,
267,
390,
12,
267,
390,
4672,
225,
309,
17870,
18,
9853,
422,
576,
30,
327,
225,
316,
1145,
313,
273,
2213,
87,
96,
40,
9,
87,
6,
738,
261,
7441,
16,
17870,
13,
225,
309,... |
tocentries = _entries_from_toctree(toctree, separate=True) | tocentries = _entries_from_toctree(toctree, separate=False) | def _entries_from_toctree(toctreenode, separate=False): """Return TOC entries for a toctree node.""" includefiles = map(str, toctreenode['includefiles']) | d88b45d0e6a6198941f2372888db38c899c7fc63 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7032/d88b45d0e6a6198941f2372888db38c899c7fc63/environment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8219,
67,
2080,
67,
869,
299,
992,
12,
869,
299,
2842,
390,
16,
9004,
33,
8381,
4672,
3536,
990,
8493,
39,
3222,
364,
279,
358,
299,
992,
756,
12123,
2823,
89,
536,
1449,
273,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8219,
67,
2080,
67,
869,
299,
992,
12,
869,
299,
2842,
390,
16,
9004,
33,
8381,
4672,
3536,
990,
8493,
39,
3222,
364,
279,
358,
299,
992,
756,
12123,
2823,
89,
536,
1449,
273,
8... |
def endElement(self, tag): if tag == "herd": self._inside_herd="No" if tag == "name" and self._inside_maintainer == "No": self._inside_herd_name="No" if tag == "email" and self._inside_maintainer == "No": self._inside_herd_email="No" if tag == "description" and self._inside_maintainer == "No": self._inside_herd_desc="No" if tag == "maintainer": self._inside_maintainer="No" if tag == "email" and self._inside_maintainer == "Yes": self._inside_maintainer_email="No" if tag == "name" and self._inside_maintainer == "Yes": self._inside_maintainer_name="No" if tag == "role": self._inside_maintainer_role="No" def characters(self, contents): if self._inside_herd_name == "Yes": self._current_herd = contents self._herds[contents] = {} if self._inside_herd_desc == "Yes": self._descs[self._current_herd] = contents if self._inside_maintainer_email == "Yes": self._current_dev = contents self._herds[self._current_herd][contents]=[] if self._inside_maintainer_name == "Yes": self._herds[self._current_herd][self._current_dev].append(contents) if self._inside_maintainer_role == "Yes": self._herds[self._current_herd][self._current_dev].append(contents) | if package: display_pkg_data(herd, handler) else: display_dev_data(herd, handler) return 0 def herdstat(herds): """display statistics about given herd(s)/dev(s)""" if os.environ.has_key('HERDS'): herds_xml = get_herds_xml(os.environ['HERDS']) else: print "HERDS environment variable is not set." print "Attempting to retrieve herds.xml from http://www.gentoo.org/." herds_xml = get_herds_xml(herds_url) if herds_xml == None: return 1 handler = parse_xml(Herds_XML(), herds_xml) if handler == None: return 1 herds_xml.close() for herd in herds: if display_herd_data(herd, handler) != 0: return 1 if herd != herds[-1]: print '\n' return 0 if __name__ == '__main__': from getopt import gnu_getopt,GetoptError if len(sys.argv) == 1: print_usage() sys.exit(1) try: opts,args = gnu_getopt(sys.argv[1:], "hvp", ["help","verbose","package"]) except GetoptError: print_usage() sys.exit(1) verbose = False package = False for o, a in opts: if o in ("-v", "--verbose"): verbose = True if o in ("-h", "--help"): print_usage() sys.exit(0) if o in ("-p", "--package"): package = True sys.exit(herdstat(args)) | def endElement(self, tag): | 6d68d2335059c26e89762b526fb296b777d762eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2297/6d68d2335059c26e89762b526fb296b777d762eb/herdstat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
12,
2890,
16,
1047,
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,
14840,
12,
2890,
16,
1047,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if name in broken: continue | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: if type(pkg_from) == list: system[pkg][1].extend(pkg_from) else: system[pkg][1].append(pkg_from) system[pkg] = (system[pkg][1], filter(lambda x: x in pkg_alt, system[pkg][0])) return True binary_u = binaries[0][pkg] else: binary_u = None | fd15f44b0cbebd0ae34b33e45f638bb313401f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/fd15f44b0cbebd0ae34b33e45f638bb313401f5f/britney.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18866,
12,
10657,
16,
3475,
67,
2390,
33,
7036,
16,
3475,
67,
2080,
33,
7036,
16,
2619,
33,
4299,
16,
14450,
33,
20340,
87,
16,
8845,
33,
8526,
4672,
468,
309,
518,
353,
2863,
2181,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18866,
12,
10657,
16,
3475,
67,
2390,
33,
7036,
16,
3475,
67,
2080,
33,
7036,
16,
2619,
33,
4299,
16,
14450,
33,
20340,
87,
16,
8845,
33,
8526,
4672,
468,
309,
518,
353,
2863,
2181,
... | |
info = self.client.getGroupInfo(group_id) | info = self.client.getGroupInfo(group_href) | def DoSelectGroup(self, event): """Update member and relationship lists for the selected group. | 7a970a1ab85c914789914ae7bec4734ebf27787f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/7a970a1ab85c914789914ae7bec4734ebf27787f/wxclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2256,
3391,
1114,
12,
2890,
16,
871,
4672,
3536,
1891,
3140,
471,
5232,
6035,
364,
326,
3170,
1041,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2256,
3391,
1114,
12,
2890,
16,
871,
4672,
3536,
1891,
3140,
471,
5232,
6035,
364,
326,
3170,
1041,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
s += '<span%s%s>' % (tooltip_html, css_class_html) | s += '<tt%s%s>' % (tooltip_html, css_class_html) | # function def block, then self.def_name will be its name; | 5bc1065ae92ac1cb6e043d081151eb3bcfca80a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5bc1065ae92ac1cb6e043d081151eb3bcfca80a3/html_colorize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
445,
1652,
1203,
16,
1508,
365,
18,
536,
67,
529,
903,
506,
2097,
508,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
445,
1652,
1203,
16,
1508,
365,
18,
536,
67,
529,
903,
506,
2097,
508,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
shutil.copy(source, destination) | shutil.copy(source, dest) return source, dest | def _copy_file(self, source, destination): if not os.path.exists(source): raise DataError("Source file '%s' does not exist" % source) if not os.path.isfile(source): raise DataError("Source file '%s' is not a regular file" % source) if not os.path.exists(destination): if destination.endswith(os.sep): parent = destination else: parent = os.path.dirname(os.path.normpath(destination)) if not os.path.exists(parent): os.makedirs(parent) shutil.copy(source, destination) | 4e92df2860c270b97129fb5577b1caec2faab8a2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/4e92df2860c270b97129fb5577b1caec2faab8a2/OperatingSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3530,
67,
768,
12,
2890,
16,
1084,
16,
2929,
4672,
309,
486,
1140,
18,
803,
18,
1808,
12,
3168,
4672,
1002,
1910,
668,
2932,
1830,
585,
1995,
87,
11,
1552,
486,
1005,
6,
738,
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,
389,
3530,
67,
768,
12,
2890,
16,
1084,
16,
2929,
4672,
309,
486,
1140,
18,
803,
18,
1808,
12,
3168,
4672,
1002,
1910,
668,
2932,
1830,
585,
1995,
87,
11,
1552,
486,
1005,
6,
738,
10... |
command.extend(['--revision', str(revision)]) | command.extend(['--revision', str(revision).strip()]) | def update(self, options, args, file_list): """Runs svn to update or transparently checkout the working copy. | 45a4c657a0b5079bb7a2472f40d8daf3dd483fe9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/45a4c657a0b5079bb7a2472f40d8daf3dd483fe9/gclient_scm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
702,
16,
833,
16,
585,
67,
1098,
4672,
3536,
9361,
5893,
82,
358,
1089,
578,
17270,
715,
13926,
326,
5960,
1610,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
702,
16,
833,
16,
585,
67,
1098,
4672,
3536,
9361,
5893,
82,
358,
1089,
578,
17270,
715,
13926,
326,
5960,
1610,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
while name: i = name.find('.') if i >= 0: name, tail = name[:i], name[i+1:] else: tail = '' w = w.children[name] name = tail | for n in name: if not n: break w = w.children[n] | def nametowidget(self, name): """Return the Tkinter instance of a widget identified by its Tcl name NAME.""" w = self if name[0] == '.': w = w._root() name = name[1:] while name: i = name.find('.') if i >= 0: name, tail = name[:i], name[i+1:] else: tail = '' w = w.children[name] name = tail return w | e4d923e373a36422fba22bad58c92a82777f074d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/e4d923e373a36422fba22bad58c92a82777f074d/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15135,
278,
543,
2208,
12,
2890,
16,
508,
4672,
3536,
990,
326,
399,
79,
2761,
791,
434,
279,
3604,
9283,
635,
2097,
399,
830,
508,
6048,
12123,
341,
273,
365,
309,
508,
63,
20,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15135,
278,
543,
2208,
12,
2890,
16,
508,
4672,
3536,
990,
326,
399,
79,
2761,
791,
434,
279,
3604,
9283,
635,
2097,
399,
830,
508,
6048,
12123,
341,
273,
365,
309,
508,
63,
20,
65,
... |
log.warning('simplejson or babel is not available; not writing ' 'JavaScript translation files.') | log.warn('simplejson/json or babel is not available; not writing ' 'JavaScript translation files.') | def run(self): compile_catalog.run(self) log.warning('simplejson or babel is not available; not writing ' 'JavaScript translation files.') | 52a3b148a8a1bd829d77d8f7bc81f10a2ac4fabc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7032/52a3b148a8a1bd829d77d8f7bc81f10a2ac4fabc/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
4074,
67,
7199,
18,
2681,
12,
2890,
13,
613,
18,
8551,
2668,
9647,
1977,
578,
26592,
353,
486,
2319,
31,
486,
7410,
296,
296,
16634,
4794,
1390,
1093,
13,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
4074,
67,
7199,
18,
2681,
12,
2890,
13,
613,
18,
8551,
2668,
9647,
1977,
578,
26592,
353,
486,
2319,
31,
486,
7410,
296,
296,
16634,
4794,
1390,
1093,
13,
2,
-100... |
hints.append(_("The owner will change from %(current_owner)s", | hints.append(_("The owner will be changed from " "%(current_owner)s", | def render_ticket_action_control(self, req, ticket, action): | c7222a9b69cf1449e0c0f1882e3a41ede83b68a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/c7222a9b69cf1449e0c0f1882e3a41ede83b68a7/default_workflow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
16282,
67,
1128,
67,
7098,
12,
2890,
16,
1111,
16,
9322,
16,
1301,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
16282,
67,
1128,
67,
7098,
12,
2890,
16,
1111,
16,
9322,
16,
1301,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
'Freevo.\n\nLogfile: %s') % \ (event, sysconfig.syslogfile) | 'Freevo.') % event | def handle(self, event): """ event handling function """ log.debug('handling event %s' % str(event)) | ea3eb2cf1510eba7ebe64ce344daeb7ddbfc8ab7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/ea3eb2cf1510eba7ebe64ce344daeb7ddbfc8ab7/eventhandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
16,
871,
4672,
3536,
871,
5057,
445,
3536,
613,
18,
4148,
2668,
26822,
871,
738,
87,
11,
738,
609,
12,
2575,
3719,
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,
1640,
12,
2890,
16,
871,
4672,
3536,
871,
5057,
445,
3536,
613,
18,
4148,
2668,
26822,
871,
738,
87,
11,
738,
609,
12,
2575,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
[403, [convert_flexnames]] | [403, [convert_flexnames]], [404, [convert_prettyref]] | def convert_bibtexClearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " while True: i = find_token(document.header, '\\papersides', 0) if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") return else: sides = int(document.header[i][12]) # only act of there is the option "bibtotoc" j = find_token(document.body, 'options "bibtotoc', 0) if j == -1: return subst1 = '\\begin_layout Standard\n' \ + '\\begin_inset Newpage clearpage\n' \ + '\end_inset\n\n\n' \ + '\end_layout\n' subst2 = '\\begin_layout Standard\n' \ + '\\begin_inset Newpage cleardoublepage\n' \ + '\end_inset\n\n\n' \ + '\end_layout\n' if sides == 1: document.body.insert(j -5, subst1) else: document.body.insert(j -5, subst2) return | 01013c078556843961d843a3ca13314777ec7b41 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/01013c078556843961d843a3ca13314777ec7b41/lyx_2_0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
70,
495,
21763,
9094,
2433,
12,
5457,
4672,
315,
2243,
279,
2424,
12,
9056,
13,
2433,
25581,
549,
8829,
1094,
1362,
309,
25581,
3307,
504,
1456,
353,
1399,
315,
1323,
1053,
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,
1765,
67,
70,
495,
21763,
9094,
2433,
12,
5457,
4672,
315,
2243,
279,
2424,
12,
9056,
13,
2433,
25581,
549,
8829,
1094,
1362,
309,
25581,
3307,
504,
1456,
353,
1399,
315,
1323,
1053,
30,... |
email = email.lower() if self.bounce_info.has_key(email): del self.bounce_info[email] | email = email.lower() if self.bounce_info.has_key(email): del self.bounce_info[email] | def ClearBounceInfo(self, email): | 7f16355cd6d7956dd6f7423c1138cae49b9e93d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/7f16355cd6d7956dd6f7423c1138cae49b9e93d5/Bouncer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10121,
38,
8386,
966,
12,
2890,
16,
2699,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10121,
38,
8386,
966,
12,
2890,
16,
2699,
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,... |
commaSeparatedList = delimitedList( Optional( quotedString | _commasepitem, default="") ).setName("commaSeparatedList") | commaSeparatedList = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("commaSeparatedList") | def checkUnindent(s,l,t): if l >= len(s): return curCol = col(l,s) if not(indentStack and curCol < indentStack[-1] and curCol <= indentStack[-2]): raise ParseException(s,l,"not an unindent") indentStack.pop() | d1ec87c1df9a5193847e95a264ad8fd0bde150ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3693/d1ec87c1df9a5193847e95a264ad8fd0bde150ce/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
984,
9355,
12,
87,
16,
80,
16,
88,
4672,
309,
328,
1545,
562,
12,
87,
4672,
327,
662,
914,
273,
645,
12,
80,
16,
87,
13,
309,
486,
12,
9355,
2624,
471,
662,
914,
411,
3504,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
984,
9355,
12,
87,
16,
80,
16,
88,
4672,
309,
328,
1545,
562,
12,
87,
4672,
327,
662,
914,
273,
645,
12,
80,
16,
87,
13,
309,
486,
12,
9355,
2624,
471,
662,
914,
411,
3504,
... |
fontinfo["FamilyName"] = family fontinfo['FullName'] = '%s %s %s designed at %spt' % (family, shape, weight, design_size) | fontinfo['FamilyName'] = family fontinfo['FullName'] = '%s %s %s designed at %spt' \ % (family, shape, weight, design_size) | def cm_guess_font_info (filename): """this function fills in sensible values for fontinfo. | d96cc8339091f674ea0fc313632dcc5c333eeb78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11856/d96cc8339091f674ea0fc313632dcc5c333eeb78/mftrace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5003,
67,
20885,
67,
5776,
67,
1376,
261,
3459,
4672,
3536,
2211,
445,
21652,
316,
15390,
1523,
924,
364,
3512,
1376,
18,
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,
5003,
67,
20885,
67,
5776,
67,
1376,
261,
3459,
4672,
3536,
2211,
445,
21652,
316,
15390,
1523,
924,
364,
3512,
1376,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
att_id = att_obj.create(cr, uid, vals) if model_field: obj.write(cr, uid, res_obj.id, {model_field: [(4, att_id)]}) | def do_invite(self, cr, uid, ids, context={}): datas = self.read(cr, uid, ids)[0] model = False model_field = False if not context or not context.get('model'): return {} else: model = context.get('model') model_field = context.get('attendee_field', False) obj = self.pool.get(model) res_obj = obj.browse(cr, uid, context['active_id']) type = datas.get('type') att_obj = self.pool.get('calendar.attendee') vals = {} mail_to = [] if not model == 'calendar.attendee': vals = {'ref': '%s,%s' % (model, base_calendar_id2real_id(context['active_id']))} | e5f3ead146ae9fd9acbfacb79d41010b3ab19718 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e5f3ead146ae9fd9acbfacb79d41010b3ab19718/base_calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
27154,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
5386,
273,
365,
18,
896,
12,
3353,
16,
4555,
16,
3258,
25146,
20,
65,
938,
273,
1083,
938,
67,
1518,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
27154,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
5386,
273,
365,
18,
896,
12,
3353,
16,
4555,
16,
3258,
25146,
20,
65,
938,
273,
1083,
938,
67,
1518,
273... | |
_setup_state(x) | def saveall( me, session, *args): ''' usages: saveall( session, obj1,...) saveall( session, somedict) #or_namespace saveall( session, *iterable) do session.save over all proper objects in args/namespace_or_iterable, i.e. those which are mapped and has_instances. calls obj.pre_save() if available (just before session.save) ''' if not args: return itervalues = args if len(args)==1: try: itervalues = args[0].itervalues() #if dict-like except AttributeError: pass #itervalues = namespace_or_iterable #or iterable mapcontext = me.mapcontext base_klas = mapcontext.base_klas for x in itervalues: if isinstance( x, base_klas) and mapcontext.has_instances( x.__class__): pre = getattr( x, 'pre_save', None) if pre: _setup_state(x) pre() | acbc696ebfe7a7050ba59684de66084b365ba2a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10808/acbc696ebfe7a7050ba59684de66084b365ba2a3/samanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
454,
12,
1791,
16,
1339,
16,
380,
1968,
4672,
9163,
584,
1023,
30,
1923,
454,
12,
1339,
16,
1081,
21,
16,
21846,
1923,
454,
12,
1339,
16,
4737,
329,
933,
13,
468,
280,
67,
4937... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
454,
12,
1791,
16,
1339,
16,
380,
1968,
4672,
9163,
584,
1023,
30,
1923,
454,
12,
1339,
16,
1081,
21,
16,
21846,
1923,
454,
12,
1339,
16,
4737,
329,
933,
13,
468,
280,
67,
4937... | |
for idx in range(len(data)/2): | for idx in xrange(len(data)/2): | def parse_relocations(self, data_rva, rva, size): """""" data = self.get_data(data_rva, size) entries = [] for idx in range(len(data)/2): word = struct.unpack('<H', data[idx*2:(idx+1)*2])[0] reloc_type = (word>>12) reloc_offset = (word&0x0fff) entries.append( RelocationData( type = reloc_type, rva = reloc_offset+rva)) return entries | 89f19a90b425f0951e2a3860a3f90834315ae393 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4177/89f19a90b425f0951e2a3860a3f90834315ae393/pefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
266,
12352,
12,
2890,
16,
501,
67,
4962,
69,
16,
5633,
69,
16,
963,
4672,
3536,
8395,
225,
501,
273,
365,
18,
588,
67,
892,
12,
892,
67,
4962,
69,
16,
963,
13,
225,
3222,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
266,
12352,
12,
2890,
16,
501,
67,
4962,
69,
16,
5633,
69,
16,
963,
4672,
3536,
8395,
225,
501,
273,
365,
18,
588,
67,
892,
12,
892,
67,
4962,
69,
16,
963,
13,
225,
3222,... |
raise pexExcept.LsstException, '%s : %s not implemented' % (stageName, overscanFitType) stageSummary = 'using overscan section %s' % (overscan)) | raise pexExcept.LsstException, '%s : %s an invalid overscan type' % (stageName, overscanFitType) stageSummary = 'using overscan section %s' % (overscan) | def OverscanCorrection(exposure, policy, stageSig = ipIsr.ISR_OSCAN, stageName = 'lsst.ip.isr.overscancorrection'): """ This returns a new Exposure that is a subsection of the input exposure. NOTE : do we need to deal with the WCS in any way, shape, or form? """ # common input test metadata = exposure.getMetadata() if chunkMetadata.exists(stageSig): pexLog.Trace(stageName, 4, '%s has already been run' % (stageSig)) return mi = exposure.getMaskedImage() overscanKeyword = policy.getString('overscanKeyword') overscan = metadata.getString(overscanKeyword) overscanBbox = BboxFromDatasec(overscan) # if "True", do a deep copy overscanData = afwImage.MaskedImage(exposure.getMaskedImage(), overscanBbox, False) # what type of overscan modeling? overscanFitType = policy.getString('overscanFitType') if overscanFitType == 'MEAN': mean = afwMath.makeStatistics(overscanData, afwMath.MEAN).getValue(afwMath.MEAN) mi -= mean elif overscanFitType == 'MEDIAN': median = afwMath.makeStatistics(overscanData, afwMath.MEDIAN).getValue(afwMath.MEDIAN) mi -= median else: raise pexExcept.LsstException, '%s : %s not implemented' % (stageName, overscanFitType) # common outputs stageSummary = 'using overscan section %s' % (overscan)) pexLog.Trace(stageName, 4, '%s %s' % (stageSig, stageSummary)) metadata.setString(stageSig, '%s; %s' % (stageSummary, time.asctime())) | 9178ba52aa57399136f285c8a065b1707c990801 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6526/9178ba52aa57399136f285c8a065b1707c990801/IsrStages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
531,
2496,
4169,
20884,
12,
22739,
16,
3329,
16,
6009,
8267,
225,
273,
2359,
2520,
86,
18,
5127,
54,
67,
51,
2312,
1258,
16,
6009,
461,
273,
296,
3251,
334,
18,
625,
18,
291,
86,
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,
531,
2496,
4169,
20884,
12,
22739,
16,
3329,
16,
6009,
8267,
225,
273,
2359,
2520,
86,
18,
5127,
54,
67,
51,
2312,
1258,
16,
6009,
461,
273,
296,
3251,
334,
18,
625,
18,
291,
86,
18,... |
self.window.set_title(filename) | self.window.set_title(filename) | def set_frame(self, frame=None, focus=False, init=False): if frame is None: frame = self.frame | d94ac8ed683b01b204ce45acfd96e570357e11bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/d94ac8ed683b01b204ce45acfd96e570357e11bb/view.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3789,
12,
2890,
16,
2623,
33,
7036,
16,
7155,
33,
8381,
16,
1208,
33,
8381,
4672,
309,
2623,
353,
599,
30,
2623,
273,
365,
18,
3789,
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,
444,
67,
3789,
12,
2890,
16,
2623,
33,
7036,
16,
7155,
33,
8381,
16,
1208,
33,
8381,
4672,
309,
2623,
353,
599,
30,
2623,
273,
365,
18,
3789,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
on_date=self.last_compliant_date) | on_date=self._get_noncompliant_date()) | def _display_uncompliant(self): sorter = CertSorter(self.product_dir, self.entitlement_dir, on_date=self.last_compliant_date) | f08e541d30878653004e155da3bda0f919872850 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/f08e541d30878653004e155da3bda0f919872850/compliance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5417,
67,
551,
362,
18515,
12,
2890,
4672,
19867,
273,
11921,
24952,
12,
2890,
18,
5896,
67,
1214,
16,
365,
18,
319,
19025,
67,
1214,
16,
603,
67,
712,
33,
2890,
18,
2722,
67,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5417,
67,
551,
362,
18515,
12,
2890,
4672,
19867,
273,
11921,
24952,
12,
2890,
18,
5896,
67,
1214,
16,
365,
18,
319,
19025,
67,
1214,
16,
603,
67,
712,
33,
2890,
18,
2722,
67,
8... |
try: self.CreateContact(contact_entry) except self.request_error, err: LOG.error(err) | if contact_entry: try: self.CreateContact(contact_entry) except self.request_error, err: LOG.error(err) | def add_contact_string(self, string_or_csv_file): """Add contact(s). | 221d2243de583d743b097d6a6608ed067f720926 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/221d2243de583d743b097d6a6608ed067f720926/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
8994,
67,
1080,
12,
2890,
16,
533,
67,
280,
67,
6715,
67,
768,
4672,
3536,
986,
5388,
12,
87,
2934,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
67,
8994,
67,
1080,
12,
2890,
16,
533,
67,
280,
67,
6715,
67,
768,
4672,
3536,
986,
5388,
12,
87,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
keys = fields.keys() for x in keys: query.append(x+'=%d') | keys = [] for x in fields.keys(): query.append('"'+x+'"=%d') | def perm_write(self, cr, user, ids, fields, context=None): if not context: context={} if not ids: return True if isinstance(ids, (int, long)): ids = [ids] query = [] vals = [] keys = fields.keys() for x in keys: query.append(x+'=%d') vals.append(fields[x]) cr.execute('select id from perm where ' + ' and '.join(query) + ' limit 1', vals) res = cr.fetchone() if res: id = res[0] else: cr.execute("select nextval('perm_id_seq')") id = cr.fetchone()[0] cr.execute('insert into perm (id,' + ','.join(keys) + ') values (' + str(id) + ',' + ('%d,'*(len(keys)-1)+'%d')+')', vals) ids_str = ','.join(map(str, ids)) cr.execute('update '+self._table+' set perm_id=%d where id in ('+ids_str+')', (id,)) return True | 21e2436edcfd48b26e17230380299a3196aac8b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/21e2436edcfd48b26e17230380299a3196aac8b0/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4641,
67,
2626,
12,
2890,
16,
4422,
16,
729,
16,
3258,
16,
1466,
16,
819,
33,
7036,
4672,
309,
486,
819,
30,
819,
12938,
309,
486,
3258,
30,
327,
1053,
309,
1549,
12,
2232,
16,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4641,
67,
2626,
12,
2890,
16,
4422,
16,
729,
16,
3258,
16,
1466,
16,
819,
33,
7036,
4672,
309,
486,
819,
30,
819,
12938,
309,
486,
3258,
30,
327,
1053,
309,
1549,
12,
2232,
16,
261,
... |
room_jid = unicode(room.room_jid) | rjid = unicode(room.room_jid) | def command_parser(inner, self, room): while True: elements = yield inner | 038e1b0b2392f4dabf5872a68236405188062906 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14361/038e1b0b2392f4dabf5872a68236405188062906/historian.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
67,
4288,
12,
7872,
16,
365,
16,
7725,
4672,
1323,
1053,
30,
2186,
273,
2824,
3443,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
67,
4288,
12,
7872,
16,
365,
16,
7725,
4672,
1323,
1053,
30,
2186,
273,
2824,
3443,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
files = [ line.strip() for line in out ] | files = [ file for file in out[0].split('\0') if file ] | def index_files(self): """List files in the index""" out, ret = self.__git_getoutput('ls-files') if ret: raise GitRepositoryError, "Error listing files %d" % ret files = [ line.strip() for line in out ] return files | c3d1f05c1ee4a6113cf842f80389f0809cdd4949 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14166/c3d1f05c1ee4a6113cf842f80389f0809cdd4949/git_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
67,
2354,
12,
2890,
4672,
3536,
682,
1390,
316,
326,
770,
8395,
596,
16,
325,
273,
365,
16186,
6845,
67,
588,
2844,
2668,
3251,
17,
2354,
6134,
309,
325,
30,
1002,
6646,
3305,
668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
67,
2354,
12,
2890,
4672,
3536,
682,
1390,
316,
326,
770,
8395,
596,
16,
325,
273,
365,
16186,
6845,
67,
588,
2844,
2668,
3251,
17,
2354,
6134,
309,
325,
30,
1002,
6646,
3305,
668... |
if with_lot: | if with_lot: | def action_split(self, cr, uid, ids, quantity, split_by_qty=1, prefix=False, with_lot=True, context=None): ''' Split Stock Move lines into production lot which specified split by quantity. @ param cr: the database cursor @ param uid: the user id @ param ids: ids of stock move object to be splited @ param split_by_qty : specify split by qty @ param prefix : specify prefix of production lot @ param with_lot : if true, prodcution lot will assign for split line otherwise not. @ param context: context arguments | 18be8e52469417aa8e0ec02e033c0942d0ad805f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/18be8e52469417aa8e0ec02e033c0942d0ad805f/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
4939,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10457,
16,
1416,
67,
1637,
67,
85,
4098,
33,
21,
16,
1633,
33,
8381,
16,
598,
67,
23372,
33,
5510,
16,
819,
33,
7036,
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,
1301,
67,
4939,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10457,
16,
1416,
67,
1637,
67,
85,
4098,
33,
21,
16,
1633,
33,
8381,
16,
598,
67,
23372,
33,
5510,
16,
819,
33,
7036,
46... |
version = "$Id: cwm.py,v 1.125 2003-02-14 17:21:54 sandro Exp $" | version = "$Id: cwm.py,v 1.126 2003-02-14 17:48:08 sandro Exp $" | def doCommand(): """Command line RDF/N3 tool <command> <options> <inputURIs> | 00e7354fee0bec9d34fa7141949c54a9dc340f6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/00e7354fee0bec9d34fa7141949c54a9dc340f6b/cwm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
2189,
13332,
3536,
2189,
980,
13539,
19,
50,
23,
5226,
225,
411,
3076,
34,
411,
2116,
34,
411,
2630,
1099,
2520,
34,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
2189,
13332,
3536,
2189,
980,
13539,
19,
50,
23,
5226,
225,
411,
3076,
34,
411,
2116,
34,
411,
2630,
1099,
2520,
34,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def _amount_tax(self, cr, uid, ids, field_name, arg, context): res = {} cur_obj=self.pool.get('res.currency') for order in self.browse(cr, uid, ids): val = 0.0 cur=order.pricelist_id.currency_id for line in order.order_line: for c in self.pool.get('account.tax').compute(cr, uid, line.taxes_id, line.price_unit * (1-(line.discount or 0.0)/100.0), line.product_qty, order.partner_address_id.id, line.product_id): val+= cur_obj.round(cr, uid, cur, c['amount']) res[order.id]=cur_obj.round(cr, uid, cur, val) return res _columns = { 'amount_untaxed': fields.function(_amount_untaxed, method=True, string='Untaxed Amount'), 'amount_tax': fields.function(_amount_tax, method=True, string='Taxes'), } | def _amount_untaxed(self, cr, uid, ids, field_name, arg, context): id_set = ",".join(map(str, ids)) sql_req="SELECT s.id,COALESCE(SUM(l.price_unit*l.product_qty*(100.0-l.discount))/100.0,0) AS amount FROM purchase_order s LEFT OUTER JOIN purchase_order_line l ON (s.id=l.order_id) WHERE s.id IN ("+id_set+") GROUP BY s.id" cr.execute(sql_req) res = dict(cr.fetchall()) | bcfe23d1ead5d385d0d6e3ea4e34f6467fea3e2b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/bcfe23d1ead5d385d0d6e3ea4e34f6467fea3e2b/purchase_discount.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
67,
318,
8066,
329,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
612,
67,
542,
273,
5753,
18,
5701,
12,
1458,
12,
701,
16,
3258,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8949,
67,
318,
8066,
329,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
612,
67,
542,
273,
5753,
18,
5701,
12,
1458,
12,
701,
16,
3258,
37... | |
print repr(default) | def _installDefaultFeeds(self): initialFeeds = resources.path("initial-feeds.democracy") if os.path.exists(initialFeeds): urls = subscription.parseFile(initialFeeds) if urls is not None: for url in urls: feed.Feed(url, initiallyAutoDownloadable=False) dialog = dialogs.MessageBoxDialog(_("Custom Channels"), Template(_("You are running a version of $longAppName with a custom set of channels.")).substitute(longAppName=config.get(prefs.LONG_APP_NAME))) dialog.run() app.controller.initial_feeds = True else: logging.info("Adding default feeds") if platform.system() == 'Darwin': defaultFeedURLs = [u'http://www.getmiro.com/screencasts/mac/mac.feed.rss'] elif platform.system() == 'Windows': defaultFeedURLs = [u'http://www.getmiro.com/screencasts/windows/win.feed.rss'] else: defaultFeedURLs = [u'http://www.getmiro.com/screencasts/windows/win.feed.rss'] defaultFeedURLs.extend([ (_('Starter Channels'), [u'http://richie-b.blip.tv/posts/?skin=rss', u'http://feeds.pbs.org/pbs/kcet/wiredscience-video', u'http://www.jpl.nasa.gov/multimedia/rss/podfeed-hd.xml', u'http://www.linktv.org/rss/hq/mosaic.xml']), ]) | 67ff5593848959e82358c233d9dd2de48ed6c265 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/67ff5593848959e82358c233d9dd2de48ed6c265/theme.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5425,
1868,
8141,
87,
12,
2890,
4672,
2172,
8141,
87,
273,
2703,
18,
803,
2932,
6769,
17,
7848,
87,
18,
19117,
504,
354,
2431,
7923,
309,
1140,
18,
803,
18,
1808,
12,
6769,
8141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5425,
1868,
8141,
87,
12,
2890,
4672,
2172,
8141,
87,
273,
2703,
18,
803,
2932,
6769,
17,
7848,
87,
18,
19117,
504,
354,
2431,
7923,
309,
1140,
18,
803,
18,
1808,
12,
6769,
8141,
... | |
current_period = self.pool.get('account.period').find(cr, uid)[0] | current_period = period_obj.find(cr, uid)[0] | def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): for arg in args: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = self.pool.get('account.period').find(cr, uid)[0] args.append(['period_id','in',[current_period]]) break elif arg[0] == 'period_id' and arg[2] == 'current_year': current_year = self.pool.get('account.fiscalyear').find(cr, uid) ids = self.pool.get('account.fiscalyear').read(cr, uid, [current_year], ['period_ids'])[0]['period_ids'] args.append(['period_id','in',ids]) for a in [['period_id','in','current_year'], ['period_id','in','current_period']]: if a in args: args.remove(a) return super(account_entries_report, self).search(cr, uid, args=args, offset=offset, limit=limit, order=order, context=context, count=count) | cfac8a4d9dffdd6591b868464063b68e7ca4a1cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cfac8a4d9dffdd6591b868464063b68e7ca4a1cb/account_entries_report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
4555,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
364,
1501,
316,
833,
30,
309,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
4555,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
364,
1501,
316,
833,
30,
309,
15... |
elif eText.startswith(u'Running Time: '): videoDuration = eText.replace(u'Running Time: ', u'').strip().split(u':') if not len(videoDuration): continue videoSeconds = False try: if len(videoDuration) == 1: videoSeconds = int(videoDuration[0]) elif len(videoDuration) == 2: videoSeconds = int(videoDuration[0])*60+int(videoDuration[1]) elif len(videoDuration) == 3: videoSeconds = int(videoDuration[0])*3600+int(videoDuration[1])*60+int(videoDuration[2]) if videoSeconds: self.itemDwnLink(newItem)[0].attrib['duration'] = unicode(videoSeconds) except: pass | def createItems(self, showItems, result, urlName, showName, urlMax=None): '''Create a dictionary of MNV compliant RSS items from the results of a RSS feed show search. Also merge with any items that were found by using the Web search. Identical items use the RSS feed item data over the search item as RSS provides better results. return nothing as the show item dictionary will have all the results ''' # Initalize show if it has not already had a search result if not urlName in showItems.keys(): showItems[urlName] = [{}, None, showName] | 6f6daa366b2cfd2b5bb891ffe90ce1e7c399c2ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/6f6daa366b2cfd2b5bb891ffe90ce1e7c399c2ad/thewb_api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
3126,
12,
2890,
16,
2405,
3126,
16,
563,
16,
880,
461,
16,
2405,
461,
16,
880,
2747,
33,
7036,
4672,
9163,
1684,
279,
3880,
434,
490,
11679,
24820,
31481,
1516,
628,
326,
1686,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3126,
12,
2890,
16,
2405,
3126,
16,
563,
16,
880,
461,
16,
2405,
461,
16,
880,
2747,
33,
7036,
4672,
9163,
1684,
279,
3880,
434,
490,
11679,
24820,
31481,
1516,
628,
326,
1686,
43... | |
self.tk.call(self._w, 'enable', name) | self.tk.call(self._w, 'enable', name) | def enable(self, name): | 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,
4237,
12,
2890,
16,
508,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4237,
12,
2890,
16,
508,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
for j in songs[:3]: if i == 2: | for song in slice: if self.highlight + 2 == i: | def draw_jump(self,string): '''This Draws Jump.... But also returns next Songs Matching Query''' self.jump.clear() self.jump.insstr(1,2,"Search: %s" % string) songs = self.songs_that_match(string) i = 2 for j in songs[:3]: if i == 2: style = curses.A_STANDOUT else: style = curses.A_NORMAL self.jump.insstr(i,2,xmms.get_playlist_title(j)[:42],style) i = i + 1 self.jump.border() try: return songs[0] except: return -1 | bcf87a597a1e0835f1fe615deb65b579c04c8456 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2622/bcf87a597a1e0835f1fe615deb65b579c04c8456/cxmms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
24574,
12,
2890,
16,
1080,
4672,
9163,
2503,
10184,
87,
804,
2801,
6265,
12484,
2546,
1135,
1024,
348,
7260,
29349,
2770,
26418,
365,
18,
24574,
18,
8507,
1435,
365,
18,
24574,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
24574,
12,
2890,
16,
1080,
4672,
9163,
2503,
10184,
87,
804,
2801,
6265,
12484,
2546,
1135,
1024,
348,
7260,
29349,
2770,
26418,
365,
18,
24574,
18,
8507,
1435,
365,
18,
24574,
... |
if data['form']['result_selection']=='customer': | if data['form']['result_selection'] == 'customer': | def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return '' | fbadca8d34f0137a629f314b5e51a2ecd4c769b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fbadca8d34f0137a629f314b5e51a2ecd4c769b8/third_party_ledger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2680,
9646,
12,
2890,
16,
501,
4672,
309,
501,
3292,
687,
21712,
2088,
67,
10705,
3546,
422,
296,
10061,
4278,
327,
296,
4779,
427,
429,
30849,
11,
1327,
501,
3292,
687,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2680,
9646,
12,
2890,
16,
501,
4672,
309,
501,
3292,
687,
21712,
2088,
67,
10705,
3546,
422,
296,
10061,
4278,
327,
296,
4779,
427,
429,
30849,
11,
1327,
501,
3292,
687,
... |
value = plotDict[ 'key' ] | value = plotDict[ key ] | def __deleteGraph( self, plotDict ): try: for key in plotDict: value = plotDict[ 'key' ] if value and os.path.isfile( value ): os.unlink( value ) except: pass | ee63f10bc0c7502b975b56259b8a6c2206b0a0be /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/ee63f10bc0c7502b975b56259b8a6c2206b0a0be/DataCache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
4137,
12,
365,
16,
3207,
5014,
262,
30,
775,
30,
364,
498,
316,
3207,
5014,
30,
460,
273,
3207,
5014,
63,
498,
308,
309,
460,
471,
1140,
18,
803,
18,
291,
768,
12,
460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
4137,
12,
365,
16,
3207,
5014,
262,
30,
775,
30,
364,
498,
316,
3207,
5014,
30,
460,
273,
3207,
5014,
63,
498,
308,
309,
460,
471,
1140,
18,
803,
18,
291,
768,
12,
460,
... |
windowAtPoint=ctypes.windll.user32.WindowFromPoint(x,y) if JABHandler.isRunning and JABHandler.isJavaWindow(windowAtPoint): | oldMouseWindow=currentMouseWindow currentMouseWindow=ctypes.windll.user32.WindowFromPoint(x,y) if JABHandler.isRunning and JABHandler.isJavaWindow(currentMouseWindow): | def executeMouseMoveEvent(x,y): oldMouseObject=api.getMouseObject() try: (oldLeft,oldTop,oldWidth,oldHeight)=oldMouseObject.location except: oldLeft=oldTop=oldWidth=oldHeight=0 mouseObject=oldMouseObject windowAtPoint=ctypes.windll.user32.WindowFromPoint(x,y) if JABHandler.isRunning and JABHandler.isJavaWindow(windowAtPoint): if not isinstance(oldMouseObject,NVDAObjects.JAB.JAB) or x<oldLeft or x>(oldLeft+oldWidth) or y<oldTop or y>(oldTop+oldHeight): oldJabContext=JABHandler.JABContext(hwnd=windowAtPoint) else: oldJabContext=oldMouseObject.jabContext res=oldJabContext.getAccessibleContextAt(x,y) if res: mouseObject=NVDAObjects.JAB.JAB(jabContext=res) else: #not a java window if not isinstance(oldMouseObject,NVDAObjects.IAccessible.IAccessible) or x<oldLeft or x>(oldLeft+oldWidth) or y<oldTop or y>(oldTop+oldHeight): mouseObject=NVDAObjects.IAccessible.getNVDAObjectFromPoint(x,y) else: res=IAccessibleHandler.accHitTest(oldMouseObject.IAccessibleObject,oldMouseObject.IAccessibleChildID,x,y) if res: mouseObject=NVDAObjects.IAccessible.IAccessible(IAccessibleObject=res[0],IAccessibleChildID=res[1]) if not mouseObject: return try: (left,top,width,height)=mouseObject.location except: left=top=width=height=0 if x<left or x>(left+width) or y<top or y>(top+height): return api.setMouseObject(mouseObject) try: mouseObject.event_mouseMove(x,y) oldMouseObject=mouseObject except: log.error("api.notifyMouseMoved", exc_info=True) | 45f56524c6938af0c61fe19ec25a19d3c9c22eb8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/45f56524c6938af0c61fe19ec25a19d3c9c22eb8/mouseHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
9186,
7607,
1133,
12,
92,
16,
93,
4672,
1592,
9186,
921,
33,
2425,
18,
588,
9186,
921,
1435,
775,
30,
261,
1673,
3910,
16,
1673,
3401,
16,
1673,
2384,
16,
1673,
2686,
13,
33,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
9186,
7607,
1133,
12,
92,
16,
93,
4672,
1592,
9186,
921,
33,
2425,
18,
588,
9186,
921,
1435,
775,
30,
261,
1673,
3910,
16,
1673,
3401,
16,
1673,
2384,
16,
1673,
2686,
13,
33,
1... |
'nowiki' : r'<nowiki>.*?</nowiki>', 'comments' : r'<!--.*?-->', 'includeonly' : r'<includeonly>.*?</includeonly>', | 'comments' : r'<!--.*?-->', 'includeonly': r'<includeonly>.*?</includeonly>', 'nowiki': r'<nowiki>.*?</nowiki>', 'pre': r'<pre>.*?</pre>', | def removeDisabledParts(text, parts=['*']): """ Removes those parts of a wiki text where wiki markup is disabled, i.e. * HTML comments * nowiki tags * includeonly tags The exact set of parts which are removed is passed as the 'parts' parameter and defaults to all. """ regexes = { 'nowiki' : r'<nowiki>.*?</nowiki>', 'comments' : r'<!--.*?-->', 'includeonly' : r'<includeonly>.*?</includeonly>', } if '*' in parts: parts = regexes.keys() toRemoveR = re.compile('|'.join([regexes[p] for p in parts]), re.IGNORECASE | re.DOTALL) return toRemoveR.sub('', text) | 35d4a31176798aa2adffc48aff8e9ed9686b7146 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/35d4a31176798aa2adffc48aff8e9ed9686b7146/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
8853,
4305,
12,
955,
16,
2140,
33,
3292,
14,
3546,
4672,
3536,
20284,
5348,
2140,
434,
279,
9050,
977,
1625,
9050,
9813,
353,
5673,
16,
277,
18,
73,
18,
380,
3982,
5678,
380,
203... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
8853,
4305,
12,
955,
16,
2140,
33,
3292,
14,
3546,
4672,
3536,
20284,
5348,
2140,
434,
279,
9050,
977,
1625,
9050,
9813,
353,
5673,
16,
277,
18,
73,
18,
380,
3982,
5678,
380,
203... |
if furthestBlock.parent: furthestBlock.parent.removeChild(furthestBlock) | def endTagFormatting(self, token): """The much-feared adoption agency algorithm""" # http://www.whatwg.org/specs/web-apps/current-work/#adoptionAgency # XXX Better parseError messages appreciated. name = token["name"] while True: # Step 1 paragraph 1 afeElement = self.tree.elementInActiveFormattingElements( token["name"]) if not afeElement or (afeElement in self.tree.openElements and not self.tree.elementInScope(afeElement.name)): self.parser.parseError("adoption-agency-1.1", {"name": token["name"]}) return | b77205d5a194b35f9e0d33752c3f0c063ccde4a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10463/b77205d5a194b35f9e0d33752c3f0c063ccde4a3/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
23974,
12,
2890,
16,
1147,
4672,
3536,
1986,
9816,
17,
3030,
2258,
1261,
3482,
1737,
2075,
4886,
8395,
468,
1062,
2207,
5591,
18,
23770,
18197,
18,
3341,
19,
15115,
19,
4875,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
23974,
12,
2890,
16,
1147,
4672,
3536,
1986,
9816,
17,
3030,
2258,
1261,
3482,
1737,
2075,
4886,
8395,
468,
1062,
2207,
5591,
18,
23770,
18197,
18,
3341,
19,
15115,
19,
4875,
17,
... | |
testformat(formatstr, *args) testformat(unicode(formatstr), *args) | testformat(formatstr, *args) testformat(unicode(formatstr), *args) | def testboth(formatstr, *args): testformat(formatstr, *args) testformat(unicode(formatstr), *args) | 32273275ba076f4d34c70af13d6871c203056195 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/32273275ba076f4d34c70af13d6871c203056195/test_format.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
18237,
12,
2139,
701,
16,
380,
1968,
4672,
1842,
2139,
12,
2139,
701,
16,
380,
1968,
13,
1842,
2139,
12,
9124,
12,
2139,
701,
3631,
380,
1968,
13,
282,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
18237,
12,
2139,
701,
16,
380,
1968,
4672,
1842,
2139,
12,
2139,
701,
16,
380,
1968,
13,
1842,
2139,
12,
9124,
12,
2139,
701,
3631,
380,
1968,
13,
282,
2,
-100,
-100,
-100,
-100,... |
d_obs = miller.array(miller_set = self.f_calc, | d_obs = miller.array(miller_set = f_model, | def map_coefficients(self, map_type = "k*Fobs-n*Fmodel", k = 1, n = 1, w1 = None, w2 = None): assert map_type in ("k*Fobs-n*Fmodel", "2m*Fobs-D*Fmodel", "m*Fobs-D*Fmodel", "k*w1*Fobs-n*w2*Fmodel") if(map_type == "k*Fobs-n*Fmodel"): d_obs = miller.array(miller_set = self.f_calc, data = self.f_obs.data()*k ).phase_transfer(phase_source = self.f_calc) d_model = self.f_model_scaled_with_k1().data()*n return miller.array(miller_set = self.f_calc, data = d_obs.data() - d_model) if(map_type == "2m*Fobs-D*Fmodel"): alpha, beta = self.alpha_beta() d_obs = miller.array(miller_set = self.f_calc, data = self.f_obs.data()*2.*self.figures_of_merit() ).phase_transfer(phase_source = self.f_calc) d_model = self.f_model().data()*alpha.data() return miller.array(miller_set = self.f_calc, data = d_obs.data() - d_model) if(map_type == "m*Fobs-D*Fmodel"): alpha, beta = self.alpha_beta() d_obs = miller.array(miller_set = self.f_calc, data = self.f_obs.data()*self.figures_of_merit() ).phase_transfer(phase_source = self.f_calc) d_model = self.f_model().data()*alpha.data() #### #result = miller.array(miller_set = self.f_calc, # data = d_obs.data() - d_model) #centrics = result.select_centric() #acentrics = result.select_acentric() #acentrics_data = acentrics.data() * 2.0 #centrics_data = centrics.data() #new = acentrics.customized_copy( # indices = acentrics.indices().concatenate(centrics.indices()), # data = acentrics_data.concatenate(centrics_data) ) #### #return new #f = open("qq","w") #fom = self.figures_of_merit() #for i, a, b in zip(self.f_calc.indices(), fom, alpha.data()): # print >> f, "%5d%5d%5d %10.3f %10.3f" % (i[0], i[1], i[2], a, b) return miller.array(miller_set = self.f_calc, data = d_obs.data() - d_model) if(map_type == "k*w1*Fobs-n*w2*Fmodel"): raise RuntimeError("Not implemented.") | 52c022dc19102e4acb945f01bec1e932efdbab08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/52c022dc19102e4acb945f01bec1e932efdbab08/f_model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
8075,
12344,
12,
2890,
16,
852,
67,
723,
1850,
273,
315,
79,
14,
42,
10992,
17,
82,
14,
42,
2284,
3113,
417,
1171,
273,
404,
16,
290,
1171,
273,
404,
16,
341,
21,
7734,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
8075,
12344,
12,
2890,
16,
852,
67,
723,
1850,
273,
315,
79,
14,
42,
10992,
17,
82,
14,
42,
2284,
3113,
417,
1171,
273,
404,
16,
290,
1171,
273,
404,
16,
341,
21,
7734,
27... |
integer values or do not fulfil the triangle relation:: | integer values or do not fulfill the triangle relation:: | def wigner_6j(j_1, j_2, j_3, j_4, j_5, j_6, prec=None): r""" Calculate the Wigner 6j symbol `Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6)`. INPUT: - ``j_1``, ..., ``j_6`` - integer or half integer - ``prec`` - precision, default: None. Providing a precision can drastically speed up the calculation. OUTPUT: rational number times the square root of a rational number (if prec=None), or real number if a precision is given EXAMPLES:: sage: wigner_6j(3,3,3,3,3,3) -1/14 sage: wigner_6j(5,5,5,5,5,5) 1/52 sage: wigner_6j(6,6,6,6,6,6) 309/10868 sage: wigner_6j(8,8,8,8,8,8) -12219/965770 sage: wigner_6j(30,30,30,30,30,30) 36082186869033479581/87954851694828981714124 sage: wigner_6j(0.5,0.5,1,0.5,0.5,1) 1/6 sage: wigner_6j(200,200,200,200,200,200, prec=1000)*1.0 0.000155903212413242 It is an error to have arguments that are not integer or half integer values or do not fulfil the triangle relation:: sage: wigner_6j(2.5,2.5,2.5,2.5,2.5,2.5) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation sage: wigner_6j(0.5,0.5,1.1,0.5,0.5,1.1) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation NOTES: The Wigner 6j symbol is related to the Racah symbol but exhibits more symmetries as detailed below. .. math:: Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) =(-1)^{j_1+j_2+j_4+j_5} W(j_1,j_2,j_5,j_4,j_3,j_6) The Wigner 6j symbol obeys the following symmetry rules: - Wigner $6j$ symbols are left invariant under any permutation of the columns: .. math:: Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) =Wigner6j(j_3,j_1,j_2,j_6,j_4,j_5) =Wigner6j(j_2,j_3,j_1,j_5,j_6,j_4) =Wigner6j(j_3,j_2,j_1,j_6,j_5,j_4) =Wigner6j(j_1,j_3,j_2,j_4,j_6,j_5) =Wigner6j(j_2,j_1,j_3,j_5,j_4,j_6) - They are invariant under the exchange of the upper and lower arguments in each of any two columns, i. e. .. math:: Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) =Wigner6j(j_1,j_5,j_6,j_4,j_2,j_3) =Wigner6j(j_4,j_2,j_6,j_1,j_5,j_3) =Wigner6j(j_4,j_5,j_3,j_1,j_2,j_6) - additional 6 symmetries [Regge59] giving rise to 144 symmetries in total - only non-zero if any triple of `j`'s fulfil a triangle relation ALGORITHM: This function uses the algorithm of [Edmonds74] to calculate the value of the 6j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03]. REFERENCES: - [Regge59] 'Symmetry Properties of Racah Coefficients', T. Regge, Nuovo Cimento, Volume 11, pp. 116 (1959) - [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) """ res = (-1) ** (int(j_1 + j_2 + j_4 + j_5)) * \ racah(j_1, j_2, j_5, j_4, j_3, j_6, prec) return res | 7df69c5c6f107763eb9f25a2174930b0961c0f48 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/7df69c5c6f107763eb9f25a2174930b0961c0f48/wigner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
724,
264,
67,
26,
78,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
525,
67,
24,
16,
525,
67,
25,
16,
525,
67,
26,
16,
13382,
33,
7036,
4672,
436,
8395,
9029,
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,
341,
724,
264,
67,
26,
78,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
525,
67,
24,
16,
525,
67,
25,
16,
525,
67,
26,
16,
13382,
33,
7036,
4672,
436,
8395,
9029,
326,... |
p = subprocess.Popen(["/usr/sbin/getenforce"], shell=True, stdout=subprocess.PIPE, close_fds=True) p.wait() if p.stdout.read().strip() == "Disabled": return False return True | """Check if SELinux is enabled (enforcing or permissive).""" try: if open("/selinux/enforce").read().strip() in ("1", "0"): return True except: pass return False | def selinuxEnabled(): p = subprocess.Popen(["/usr/sbin/getenforce"], shell=True, stdout=subprocess.PIPE, close_fds=True) p.wait() if p.stdout.read().strip() == "Disabled": return False return True | c1d13d46cb396bc0b1ae2dd20d0b076a0ff95e30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7328/c1d13d46cb396bc0b1ae2dd20d0b076a0ff95e30/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
357,
9534,
1526,
13332,
3536,
1564,
309,
20853,
9534,
353,
3696,
261,
275,
29036,
578,
293,
1840,
688,
13,
12123,
775,
30,
309,
1696,
2932,
19,
1786,
9534,
19,
275,
5734,
20387,
896,
767... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
357,
9534,
1526,
13332,
3536,
1564,
309,
20853,
9534,
353,
3696,
261,
275,
29036,
578,
293,
1840,
688,
13,
12123,
775,
30,
309,
1696,
2932,
19,
1786,
9534,
19,
275,
5734,
20387,
896,
767... |
data=data.tostring() | def setValue( self, valname, data, regtype=None ): "Set a data value's data (and optionally type)" if regtype: typeint=regtype.intval else: if type( data )==StringType: typeint=_winreg.REG_SZ elif type( data )==IntType: typeint=_winreg.REG_DWORD elif type( data )==array.ArrayType: typeint=_winreg.REG_BINARY data=data.tostring() _winreg.SetValueEx( self.handle, valname, 0, typeint, data ) | 23ed7649e16ef0e78397157dcd5302e56e58baf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23ed7649e16ef0e78397157dcd5302e56e58baf0/winreg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5524,
12,
365,
16,
1244,
529,
16,
501,
16,
960,
723,
33,
7036,
262,
30,
315,
694,
279,
501,
460,
1807,
501,
261,
464,
8771,
618,
2225,
309,
960,
723,
30,
618,
474,
33,
1574,
723,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5524,
12,
365,
16,
1244,
529,
16,
501,
16,
960,
723,
33,
7036,
262,
30,
315,
694,
279,
501,
460,
1807,
501,
261,
464,
8771,
618,
2225,
309,
960,
723,
30,
618,
474,
33,
1574,
723,
1... | |
if t in _SeqTypes: | if t in _SeqTypes or isinstance(v,Flowable): if not t in _SeqTypes: v = (v,) | def _calc(self): if hasattr(self,'_width'): return | 9f5a788184a7139b9b717f8b6082af233464645d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/9f5a788184a7139b9b717f8b6082af233464645d/tables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12448,
12,
2890,
4672,
309,
3859,
12,
2890,
11189,
67,
2819,
11,
4672,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
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,
389,
12448,
12,
2890,
4672,
309,
3859,
12,
2890,
11189,
67,
2819,
11,
4672,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
buildmode_dashboard_height = self.w.depositAtomDashboard.frameGeometry().height() status_bar_height = self.w.statusBar().frameGeometry().height() | buildmode_dashboard_height = self.w.depositAtomDashboard.frameGeometry().height() status_bar_height = self.w.statusBar().frameGeometry().height() | def get_location(self, firstShow): '''Returns the best x, y screen coordinate for positioning the MMKit. If <firstShow> is True, the Model Tree width is set to 200 pixels. Should only be called MMKit has been created. ''' | e6314dcf7c52b3ddda308f2a5ab9dc62b7f3918c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/e6314dcf7c52b3ddda308f2a5ab9dc62b7f3918c/MMKit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3562,
12,
2890,
16,
1122,
5706,
4672,
9163,
1356,
326,
3796,
619,
16,
677,
5518,
7799,
364,
1754,
310,
326,
18295,
14102,
18,
971,
411,
3645,
5706,
34,
353,
1053,
16,
326,
316... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3562,
12,
2890,
16,
1122,
5706,
4672,
9163,
1356,
326,
3796,
619,
16,
677,
5518,
7799,
364,
1754,
310,
326,
18295,
14102,
18,
971,
411,
3645,
5706,
34,
353,
1053,
16,
326,
316... |
pass | pass | def reportDownloadSize(self, packages): """Report the total download size for a set of packages""" totsize = 0 locsize = 0 error = False for pkg in packages: # Just to be on the safe side, if for some reason getting # the package size fails, log the error and don't report download # size try: size = int(pkg.size) totsize += size try: if pkg.verifyLocalPkg(): locsize += size except: pass except: error = True self.logger.error(_('There was an error calculating total download size')) break | 02d4762454f628bfddfabbc399272191e282c839 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/02d4762454f628bfddfabbc399272191e282c839/output.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
7109,
1225,
12,
2890,
16,
5907,
4672,
3536,
4820,
326,
2078,
4224,
963,
364,
279,
444,
434,
5907,
8395,
9997,
1467,
273,
374,
1515,
1467,
273,
374,
555,
273,
1083,
364,
3475,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
7109,
1225,
12,
2890,
16,
5907,
4672,
3536,
4820,
326,
2078,
4224,
963,
364,
279,
444,
434,
5907,
8395,
9997,
1467,
273,
374,
1515,
1467,
273,
374,
555,
273,
1083,
364,
3475,
316,
... |
return json.loads(value) | return value and json.loads(value) or {} | def process_result_value(self, value, dialect): return json.loads(value) | 452eb1900084b88e8341405f190ee0a2e9e74d52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12761/452eb1900084b88e8341405f190ee0a2e9e74d52/expando_mixin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2088,
67,
1132,
12,
2890,
16,
460,
16,
10864,
4672,
327,
1163,
18,
17135,
12,
1132,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2088,
67,
1132,
12,
2890,
16,
460,
16,
10864,
4672,
327,
1163,
18,
17135,
12,
1132,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
isp_keeper = ns if not isp_keeper: for ns in self.SortByFastest(): if not ns.is_hidden and not ns.is_disabled: if 'network' in ns.tags: isp_keeper = ns return isp_keeper | return ns for ns in self.SortByFastest(): if not ns.is_hidden and not ns.is_disabled: if 'network' in ns.tags: return ns | def _FastestByLocalProvider(self): """Find the fastest DNS server by the client provider.""" isp_keeper = None | 2a925e0942b861772d3c3410779d4ff2ba40edbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3412/2a925e0942b861772d3c3410779d4ff2ba40edbf/nameserver_list.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12305,
395,
858,
2042,
2249,
12,
2890,
4672,
3536,
3125,
326,
4797,
395,
8858,
1438,
635,
326,
1004,
2893,
12123,
353,
84,
67,
79,
9868,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12305,
395,
858,
2042,
2249,
12,
2890,
4672,
3536,
3125,
326,
4797,
395,
8858,
1438,
635,
326,
1004,
2893,
12123,
353,
84,
67,
79,
9868,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
... |
sqlORList.append( "`%s`.`value` = %s" % ( self.__getTableName( "key", typeName, keyName ), keyValue ) ) | sqlORList.append( "`%s`.`value` = %s" % ( _getTableName( "key", typeName, keyName ), keyValue ) ) | def __queryType( self, typeName, startTime, endTime, selectFields, condDict, groupFields, orderFields, tableType, connObj = False ): """ Execute a query over a main table """ tableName = self.__getTableName( tableType, typeName ) cmd = "SELECT" sqlLinkList = [] #Check if groupFields and orderFields are in ( "%s", ( field1, ) ) form if groupFields: try: groupFields[0] % tuple( groupFields[1] ) except Exception, e: return S_ERROR( "Cannot format properly group string: %s" % str( e ) ) if orderFields: try: orderFields[0] % tuple( orderFields[1] ) except Exception, e: return S_ERROR( "Cannot format properly order string: %s" % str( e ) ) #Calculate fields to retrieve realFieldList = [] for rawFieldName in selectFields[1]: keyTable = self.__getTableName( "key", typeName, rawFieldName ) if rawFieldName in self.dbCatalog[ typeName ][ 'keys' ]: realFieldList.append( "`%s`.`value`" % keyTable ) List.appendUnique( sqlLinkList, "`%s`.`%s` = `%s`.`id`" % ( tableName, rawFieldName, keyTable ) ) else: realFieldList.append( "`%s`.`%s`" % ( tableName, rawFieldName ) ) try: cmd += " %s" % selectFields[0] % tuple( realFieldList ) except Exception, e: return S_ERROR( "Error generating select fields string: %s" % str( e ) ) #Calculate tables needed sqlFromList = [ "`%s`" % tableName ] for key in self.dbCatalog[ typeName ][ 'keys' ]: if key in condDict or key in selectFields[1] \ or ( groupFields and key in groupFields[1] ) \ or ( orderFields and key in orderFields[1] ): sqlFromList.append( "`%s`" % self.__getTableName( "key", typeName, key ) ) cmd += " FROM %s" % ", ".join( sqlFromList ) #Calculate time conditions sqlTimeCond = [] if startTime: sqlTimeCond.append( "`%s`.`startTime` >= %s" % ( tableName, startTime ) ) if endTime: if tableType == "bucket": endTimeSQLVar = "startTime" else: endTimeSQLVar = "endTime" sqlTimeCond.append( "`%s`.`%s` <= %s" % ( tableName, endTimeSQLVar, endTime ) ) cmd += " WHERE %s" % " AND ".join( sqlTimeCond ) #Calculate conditions sqlCondList = [] for keyName in condDict: sqlORList = [] if keyName in self.dbCatalog[ typeName ][ 'keys' ]: List.appendUnique( sqlLinkList, "`%s`.`%s` = `%s`.`id`" % ( tableName, keyName, self.__getTableName( "key", typeName, keyName ) ) ) if type( condDict[ keyName ] ) not in ( types.ListType, types.TupleType ): condDict[ keyName ] = [ condDict[ keyName ] ] for keyValue in condDict[ keyName ]: retVal = self._escapeString( keyValue ) if not retVal[ 'OK' ]: return retVal keyValue = retVal[ 'Value' ] if keyName in self.dbCatalog[ typeName ][ 'keys' ]: sqlORList.append( "`%s`.`value` = %s" % ( self.__getTableName( "key", typeName, keyName ), keyValue ) ) else: sqlORList.append( "`%s`.`%s` = %s" % ( tableName, keyName, keyValue ) ) sqlCondList.append( "( %s )" % " OR ".join( sqlORList ) ) if sqlCondList: cmd += " AND %s" % " AND ".join( sqlCondList ) #Calculate grouping and sorting for preGenFields in ( groupFields, orderFields ): if preGenFields: for i in range( len( preGenFields[1] ) ): field = preGenFields[1][i] if field in self.dbCatalog[ typeName ][ 'keys' ]: List.appendUnique( sqlLinkList, "`%s`.`%s` = `%s`.`id`" % ( tableName, field, self.__getTableName( "key", typeName, field ) ) ) preGenFields[1][i] = "`%s`.Value" % self.__getTableName( "key", typeName, field ) else: preGenFields[1][i] = "`%s`.`%s`" % ( tableName, field ) if sqlLinkList: cmd += " AND %s" % " AND ".join( sqlLinkList ) if groupFields: cmd += " GROUP BY %s" % ( groupFields[0] % tuple( groupFields[1] ) ) if orderFields: cmd += " ORDER BY %s" % ( orderFields[0] % tuple( orderFields[1] ) ) self.log.verbose( cmd ) return self._query( cmd, conn = connObj ) | 5644734dd5f9b2176cf1b7afc4f6ab55941c88f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/5644734dd5f9b2176cf1b7afc4f6ab55941c88f0/AccountingDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2271,
559,
12,
365,
16,
8173,
16,
8657,
16,
13859,
16,
2027,
2314,
16,
6941,
5014,
16,
1041,
2314,
16,
1353,
2314,
16,
1014,
559,
16,
1487,
2675,
273,
1083,
262,
30,
3536,
7903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2271,
559,
12,
365,
16,
8173,
16,
8657,
16,
13859,
16,
2027,
2314,
16,
6941,
5014,
16,
1041,
2314,
16,
1353,
2314,
16,
1014,
559,
16,
1487,
2675,
273,
1083,
262,
30,
3536,
7903,
... |
iopt_table=gtk.Table(3,3,False) | iopt_table = gtk.Table(3,3) | def init_dialog(self): self.dialog = gtk.Window() self.dialog.set_title('GDAL Export Tool') self.dialog.set_border_width(10) self.tips=gtk.Tooltips() #self.dialog.set_default_size(500,400) self.dialog.set_resizable(True) | 18bebfddf000a5af98d1ab83e4246e700756e2a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11090/18bebfddf000a5af98d1ab83e4246e700756e2a4/Tool_Export.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
12730,
12,
2890,
4672,
365,
18,
12730,
273,
22718,
18,
3829,
1435,
365,
18,
12730,
18,
542,
67,
2649,
2668,
27338,
1013,
11054,
13288,
6134,
365,
18,
12730,
18,
542,
67,
8815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
12730,
12,
2890,
4672,
365,
18,
12730,
273,
22718,
18,
3829,
1435,
365,
18,
12730,
18,
542,
67,
2649,
2668,
27338,
1013,
11054,
13288,
6134,
365,
18,
12730,
18,
542,
67,
8815,
... |
self.missed_injections = {self.instruments[0]: [simulation_id for (simulation_id,) in self.sim_burst_table.cursor.execute("SELECT simulation_id FROM sim_burst")]} | self.missed_injections = {self.instruments[0]: [str(lsctables.ILWD("sim_burst", "simulation_id", id)) for (id,) in self.sim_burst_table.cursor.execute("SELECT simulation_id FROM sim_burst")]} | def summarize(self, xmldoc, live_time_program, verbose = False): """ Compute and record some summary information about the database. Call this after all the data has been inserted, and before you want any of this information. """ self.connection.commit() self.connection.execute("CREATE INDEX time_slide_id_index ON time_slide (time_slide_id)") self.connection.execute("CREATE INDEX coinc_event_id_index ON coinc_event_map (table_name, coinc_event_id)") | c885fe584f38bc7dc722ca6981bb825cfd72aeea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/c885fe584f38bc7dc722ca6981bb825cfd72aeea/SnglBurstUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28712,
12,
2890,
16,
2025,
2434,
16,
8429,
67,
957,
67,
12890,
16,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
18,
225,
3049,
333,
1839,
777,
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,
28712,
12,
2890,
16,
2025,
2434,
16,
8429,
67,
957,
67,
12890,
16,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
18,
225,
3049,
333,
1839,
777,
326,
... |
getattr(self, cls.parent_id_attr), | getattr(cls, cls.parent_id_attr), | def all(cls, client): """Retrives all of the available objects""" if cls.parent_class and not getattr(self, cls.parent_id_attr, None): raise MissingParentDetails() endpoint = cls.endpoint if cls.parent_class: endpoint = "%s/%s/%s" % (cls.parent_class.endpoint, getattr(self, cls.parent_id_attr), cls.endpoint) data = client.get(endpoint) return [cls(**clean_obj_keys(i)) for i in data[0]] | 6bc29a603051889bb6fd2ae7df6f0728e66c47b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10415/6bc29a603051889bb6fd2ae7df6f0728e66c47b5/resource.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
777,
12,
6429,
16,
1004,
4672,
3536,
7055,
86,
3606,
777,
434,
326,
2319,
2184,
8395,
309,
2028,
18,
2938,
67,
1106,
471,
486,
3869,
12,
2890,
16,
2028,
18,
2938,
67,
350,
67,
1747,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
777,
12,
6429,
16,
1004,
4672,
3536,
7055,
86,
3606,
777,
434,
326,
2319,
2184,
8395,
309,
2028,
18,
2938,
67,
1106,
471,
486,
3869,
12,
2890,
16,
2028,
18,
2938,
67,
350,
67,
1747,
... |
return (self.name == other.name and self.uri == other.uri and self.group == other.group and self.attributes == other.attributes and self.presence_policies == other.presence_policies and self.dialoginfo_policies == other.dialoginfo_policies and self.subscribe_to_presence == other.subscribe_to_presence and self.subscribe_to_dialoginfo == other.subscribe_to_dialoginfo) | if isinstance(other, Contact): return (self.name == other.name and self.uri == other.uri and self.group == other.group and self.attributes == other.attributes and self.presence_policies == other.presence_policies and self.dialoginfo_policies == other.dialoginfo_policies and self.subscribe_to_presence == other.subscribe_to_presence and self.subscribe_to_dialoginfo == other.subscribe_to_dialoginfo) return False | def __eq__(self, other): return (self.name == other.name and self.uri == other.uri and self.group == other.group and self.attributes == other.attributes and self.presence_policies == other.presence_policies and self.dialoginfo_policies == other.dialoginfo_policies and self.subscribe_to_presence == other.subscribe_to_presence and self.subscribe_to_dialoginfo == other.subscribe_to_dialoginfo) | 9c21c2edd99372f5e19d02f24a28a58b1c75efe2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/9c21c2edd99372f5e19d02f24a28a58b1c75efe2/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
1308,
4672,
327,
261,
2890,
18,
529,
422,
1308,
18,
529,
471,
365,
18,
1650,
422,
1308,
18,
1650,
471,
365,
18,
1655,
422,
1308,
18,
1655,
471,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
1308,
4672,
327,
261,
2890,
18,
529,
422,
1308,
18,
529,
471,
365,
18,
1650,
422,
1308,
18,
1650,
471,
365,
18,
1655,
422,
1308,
18,
1655,
471,
365,
1... |
editRestriction = page.editRestriction moveRestriction = page.moveRestriction | editRestriction = getRestrictions(page) | def main(): """ Main Function """ # Loading the comments global templateToRemove; global categoryToCheck; global comment; global project_inserted if config.mylang not in project_inserted: wikipedia.output(u"Your project is not supported by this script. You have to edit the script and add it!") wikipedia.stopme() # always, define a generator to understand if the user sets one, defining what's genFactory always = False; generator = False; debug = False moveBlockCheck = False; genFactory = pagegenerators.GeneratorFactory() # To prevent Infinite loops errorCount = 0 # Loading the default options. for arg in wikipedia.handleArgs(): if arg == '-always': always = True elif arg == '-move': moveBlockCheck = True elif arg == '-debug': debug = True elif arg == '-protectedpages': generator = ProtectedPages() elif arg.startswith('-page'): if len(arg) == 5: generator = [wikipedia.Page(wikipedia.getSite(), wikipedia.input(u'What page do you want to use?'))] else: generator = [wikipedia.Page(wikipedia.getSite(), arg[6:])] else: generator = genFactory.handleArg(arg) # Load the right site site = wikipedia.getSite() # Take the right templates to use, the category and the comment TTR = wikipedia.translate(site, templateToRemove) TSP = wikipedia.translate(site, templateSemiProtection) TTP = wikipedia.translate(site, templateTotalProtection) TSMP = wikipedia.translate(site, templateSemiMoveProtection) TTMP = wikipedia.translate(site, templateTotalMoveProtection) TNR = wikipedia.translate(site, templateNoRegex) category = wikipedia.translate(site, categoryToCheck) commentUsed = wikipedia.translate(site, comment) if not generator: generator = list() wikipedia.output(u'Loading categories...') # Define the category if no other generator has been setted for CAT in category: cat = catlib.Category(site, CAT) # Define the generator gen = pagegenerators.CategorizedPageGenerator(cat) for pageCat in gen: generator.append(pageCat) wikipedia.output(u'Categories loaded, start!') # Main Loop for page in generator: pagename = page.title() wikipedia.output('Loading %s...' % pagename) try: text = page.get() editRestriction = page.editRestriction moveRestriction = page.moveRestriction except wikipedia.NoPage: wikipedia.output("%s doesn't exist! Skipping..." % pagename) continue except wikipedia.IsRedirectPage: wikipedia.output("%s is a redirect! Skipping..." % pagename) continue # Understand, according to the template in the page, what should be the protection # and compare it with what there really is. TemplateInThePage = understandBlock(text, TTP, TSP, TSMP, TTMP) # Only to see if the text is the same or not... oldtext = text if editRestriction == 'sysop': if TemplateInThePage[0] == 'sysop-total' and TTP != None: wikipedia.output(u'The page is protected to the sysop, skipping...') continue else: wikipedia.output(u'The page is protected to the sysop, but the template seems not correct. Fixing...') text = re.sub(TemplateInThePage[1], TNR[1], text) elif moveBlockCheck and moveRestriction == 'sysop': if TemplateInThePage[0] == 'sysop-move' and TTMP != None: wikipedia.output(u'The page is protected from moving to the sysop, skipping...') continue else: wikipedia.output(u'The page is protected from moving to the sysop, but the template seems not correct. Fixing...') text = re.sub(TemplateInThePage[1], TNR[3], text) elif editRestriction == 'autoconfirmed' and TSP != None: if TemplateInThePage[0] == 'autoconfirmed-total': wikipedia.output(u'The page is editable only for the autoconfirmed users, skipping...') continue else: wikipedia.output(u'The page is editable only for the autoconfirmed users, but the template seems not correct. Fixing...') text = re.sub(TemplateInThePage[1], TNR[0], text) elif moveBlockCheck == True and moveRestriction == 'autoconfirmed' and TSMP != None: if TemplateInThePage[0] == 'autoconfirmed-move': wikipedia.output(u'The page is movable only for the autoconfirmed users, skipping...') continue else: wikipedia.output(u'The page is movable only for the autoconfirmed users, but the template seems not correct. Fixing...') text = re.sub(TemplateInThePage[1], TNR[2], text) else: wikipedia.output(u'The page is editable for all, deleting the template...') # Deleting the template because the page doesn't need it. for replaceToPerform in TTR: text = re.sub('(?:<noinclude>|)%s(?:</noinclude>|)' % replaceToPerform, '', text) if oldtext != text: # Ok, asking if the change has to be performed and do it if yes. wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title()) wikipedia.showDiff(oldtext, text) choice = '' while 1: if not always: choice = wikipedia.inputChoice(u'Do you want to accept these changes?', ['Yes', 'No', 'All'], ['y', 'N', 'a'], 'N') if choice.lower() in ['a', 'all']: always = True if choice.lower() in ['n', 'no']: break if choice.lower() in ['y', 'yes'] or always: try: page.put(text, commentUsed, force=True) except wikipedia.EditConflict: wikipedia.output(u'Edit conflict! skip!') break except wikipedia.ServerError: # Sometimes there is this error that's quite annoying because # can block the whole process for nothing. errorCount += 1 if errorCount < 5: wikipedia.output(u'Server Error! Wait..') time.sleep(3) continue else: # Prevent Infinite Loops raise wikipedia.ServerError(u'Fifth Server Error!') except wikipedia.SpamfilterError, e: wikipedia.output(u'Cannot change %s because of blacklist entry %s' % (page.title(), e.url)) break except wikipedia.PageNotSaved, error: wikipedia.output(u'Error putting page: %s' % (error.args,)) break except wikipedia.LockedPage: wikipedia.output(u'The page is still protected. Skipping...') break else: # Break only if the errors are one after the other errorCount = 0 break else: wikipedia.output(u'No changes! Strange! Check the regex!') if debug == True: quest = wikipedia.input(u'Do you want to open the page on your [b]rowser, [g]ui or [n]othing?') pathWiki = site.family.nicepath(site.lang) url = 'http://%s%s%s' % (wikipedia.getSite().hostname(), pathWiki, page.urlname()) while 1: if quest.lower() in ['b', 'B']: webbrowser.open(url) break elif quest.lower() in ['g', 'G']: import editarticle editor = editarticle.TextEditor() text = editor.edit(page.get()) break elif quest.lower() in ['n', 'N']: break else: wikipedia.output(u'wrong entry, type "b", "g" or "n"') continue | 3efbe15587462936c7a1303666c9434c92ceed00 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/3efbe15587462936c7a1303666c9434c92ceed00/blockpageschecker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
12740,
4284,
3536,
468,
4444,
310,
326,
5678,
2552,
1542,
12765,
31,
2552,
3150,
18126,
31,
2552,
2879,
31,
2552,
1984,
67,
6387,
329,
309,
642,
18,
4811,
4936,
486,
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,
2774,
13332,
3536,
12740,
4284,
3536,
468,
4444,
310,
326,
5678,
2552,
1542,
12765,
31,
2552,
3150,
18126,
31,
2552,
2879,
31,
2552,
1984,
67,
6387,
329,
309,
642,
18,
4811,
4936,
486,
3... |
regprop = Paths.get_path('browser', loc, 'chrome/browser-region/region.properties') p = Parser.getParser(regprop) p.read(regprop) | p = getRegionProperties(loc) | def run(self): '''Collect the data from browsers region.properties for all locales | 5e222bdfd33e0a9d8b1f3b7e5797d47e76d95014 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6206/5e222bdfd33e0a9d8b1f3b7e5797d47e76d95014/Tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
9163,
10808,
326,
501,
628,
14993,
3020,
18,
4738,
364,
777,
6922,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
9163,
10808,
326,
501,
628,
14993,
3020,
18,
4738,
364,
777,
6922,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise TracError, 'Invalid email encoding setting: %s' % pref | raise TracError(_('Invalid email encoding setting: %s' % pref)) | def _init_pref_encoding(self): from email.Charset import Charset, QP, BASE64 self._charset = Charset() self._charset.input_charset = 'utf-8' pref = self.env.config.get('notification', 'mime_encoding').lower() if pref == 'base64': self._charset.header_encoding = BASE64 self._charset.body_encoding = BASE64 self._charset.output_charset = 'utf-8' self._charset.input_codec = 'utf-8' self._charset.output_codec = 'utf-8' elif pref in ['qp', 'quoted-printable']: self._charset.header_encoding = QP self._charset.body_encoding = QP self._charset.output_charset = 'utf-8' self._charset.input_codec = 'utf-8' self._charset.output_codec = 'utf-8' elif pref == 'none': self._charset.header_encoding = None self._charset.body_encoding = None self._charset.input_codec = None self._charset.output_charset = 'ascii' else: raise TracError, 'Invalid email encoding setting: %s' % pref | ec926990989e9b3b351aee0ef5901aa83d3f24f4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/ec926990989e9b3b351aee0ef5901aa83d3f24f4/notification.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
25724,
67,
5999,
12,
2890,
4672,
628,
2699,
18,
9652,
1930,
12080,
16,
2238,
52,
16,
10250,
1105,
365,
6315,
9999,
273,
12080,
1435,
365,
6315,
9999,
18,
2630,
67,
9999,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
67,
25724,
67,
5999,
12,
2890,
4672,
628,
2699,
18,
9652,
1930,
12080,
16,
2238,
52,
16,
10250,
1105,
365,
6315,
9999,
273,
12080,
1435,
365,
6315,
9999,
18,
2630,
67,
9999,
... |
idstring = "$Id: notation3.py,v 1.166 2004-10-28 17:41:59 timbl Exp $" | idstring = "$Id: notation3.py,v 1.167 2004-11-23 18:51:32 syosi Exp $" | def startDoc(self): | ad6be7620c1508b5db4baf88ec255a3b5863c3b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/ad6be7620c1508b5db4baf88ec255a3b5863c3b2/notation3.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1759,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1759,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if look=='amd64': | if look == 'amd64': | def get_platform (): """Return a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; eg. for IRIX the architecture isn't particularly important (IRIX only runs on SGI hardware), but for Linux the kernel version isn't particularly important. Examples of returned values: linux-i586 linux-alpha (?) solaris-2.6-sun4u irix-5.3 irix64-6.2 Windows will return one of: win-x86_64 (64bit Windows on x86_64 (AMD64)) win-ia64 (64bit Windows on Itanium) win32 (all others - specifically, sys.platform is returned) For other non-POSIX platforms, currently just returns 'sys.platform'. """ if os.name == 'nt': # sniff sys.version for architecture. prefix = " bit (" i = string.find(sys.version, prefix) if i == -1: return sys.platform j = string.find(sys.version, ")", i) look = sys.version[i+len(prefix):j].lower() if look=='amd64': return 'win-x86_64' if look=='itanium': return 'win-ia64' return sys.platform if os.name != "posix" or not hasattr(os, 'uname'): # XXX what about the architecture? NT is Intel or Alpha, # Mac OS is M68k or PPC, etc. return sys.platform # Try to distinguish various flavours of Unix (osname, host, release, version, machine) = os.uname() # Convert the OS name to lowercase, remove '/' characters # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") osname = osname.lower().replace('/', '') machine = machine.replace(' ', '_') machine = machine.replace('/', '-') if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- # i386, etc. # XXX what about Alpha, SPARC, etc? return "%s-%s" % (osname, machine) elif osname[:5] == "sunos": if release[0] >= "5": # SunOS 5 == Solaris 2 osname = "solaris" release = "%d.%s" % (int(release[0]) - 3, release[2:]) # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) elif osname[:3] == "aix": return "%s-%s.%s" % (osname, version, release) elif osname[:6] == "cygwin": osname = "cygwin" rel_re = re.compile (r'[\d.]+') m = rel_re.match(release) if m: release = m.group() elif osname[:6] == "darwin": # # For our purposes, we'll assume that the system version from # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set # to. This makes the compatibility story a bit more sane because the # machine is going to compile and link as if it were # MACOSX_DEPLOYMENT_TARGET. from distutils.sysconfig import get_config_vars cfgvars = get_config_vars() macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') if not macver: macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') if not macver: # Get the system version. Reading this plist is a documented # way to get the system version (see the documentation for # the Gestalt Manager) try: f = open('/System/Library/CoreServices/SystemVersion.plist') except IOError: # We're on a plain darwin box, fall back to the default # behaviour. pass else: m = re.search( r'<key>ProductUserVisibleVersion</key>\s*' + r'<string>(.*?)</string>', f.read()) f.close() if m is not None: macver = '.'.join(m.group(1).split('.')[:2]) # else: fall back to the default behaviour if macver: from distutils.sysconfig import get_config_vars release = macver osname = "macosx" if (release + '.') < '10.4.' and \ get_config_vars().get('UNIVERSALSDK', '').strip(): # The universal build will build fat binaries, but not on # systems before 10.4 machine = 'fat' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. machine = 'ppc' return "%s-%s-%s" % (osname, release, machine) | cabac0ac3accbdfab390896aa77e3d8766ec947f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/cabac0ac3accbdfab390896aa77e3d8766ec947f/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9898,
1832,
30,
3536,
990,
279,
533,
716,
25283,
326,
783,
4072,
18,
225,
1220,
353,
1399,
31457,
358,
23926,
4072,
17,
12524,
1361,
6402,
471,
4072,
17,
12524,
6650,
23296,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9898,
1832,
30,
3536,
990,
279,
533,
716,
25283,
326,
783,
4072,
18,
225,
1220,
353,
1399,
31457,
358,
23926,
4072,
17,
12524,
1361,
6402,
471,
4072,
17,
12524,
6650,
23296,
18,... |
self.sock = socket.socket( familly, socket.SOCK_STREAM) | if self.sock is None: self.sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) | def reconnect(self): if self.host and self.port: self.disconnect() familly = socket.AF_INET if socket.has_ipv6: try: socket.getaddrinfo(self.host, int(self.port), socket.AF_INET6) familly = socket.AF_INET6 except: pass self.sock = socket.socket( familly, socket.SOCK_STREAM) self.sock.settimeout(120) self.sock.connect((self.host, int(self.port))) if self.ssl: self.ssl_sock = socket.ssl(self.sock) | d12fe4d9d7c1b39a9e3977debdafd41181c317af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/d12fe4d9d7c1b39a9e3977debdafd41181c317af/pysocket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11812,
12,
2890,
4672,
309,
365,
18,
2564,
471,
365,
18,
655,
30,
365,
18,
20177,
1435,
284,
11580,
715,
273,
2987,
18,
6799,
67,
18819,
309,
2987,
18,
5332,
67,
10834,
26,
30,
775,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11812,
12,
2890,
4672,
309,
365,
18,
2564,
471,
365,
18,
655,
30,
365,
18,
20177,
1435,
284,
11580,
715,
273,
2987,
18,
6799,
67,
18819,
309,
2987,
18,
5332,
67,
10834,
26,
30,
775,
... |
if peerChain.isProxy()['Value']: | isProxyChain = peerChain.isProxy()['Value'] isLimitedProxyChain = peerChain.isLimitedProxy()['Value'] if isProxyChain: | def gatherPeerCredentials( self ): certList = self.sslSocket.get_peer_certificate_chain() #Servers don't receive the whole chain, the last cert comes alone if not self.infoDict[ 'clientMode' ]: certList.insert( 0, self.sslSocket.get_peer_certificate() ) peerChain = X509Chain( certList = certList ) if peerChain.isProxy()['Value']: identitySubject = peerChain.getIssuerCert()['Value'].getSubjectNameObject()[ 'Value' ] else: identitySubject = peerChain.getCertInChain( 0 )['Value'].getSubjectNameObject()[ 'Value' ] credDict = { 'DN' : identitySubject.one_line(), 'CN' : identitySubject.commonName, 'x509Chain' : peerChain } diracGroup = peerChain.getDIRACGroup() if diracGroup[ 'OK' ] and diracGroup[ 'Value' ]: credDict[ 'group' ] = diracGroup[ 'Value' ] self.infoDict[ 'peerCredentials' ] = credDict return credDict | d3ff2b8da7451c9aa9758f02fed250c5c1a62bbf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/d3ff2b8da7451c9aa9758f02fed250c5c1a62bbf/SocketInfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11090,
6813,
6163,
12,
365,
262,
30,
3320,
682,
273,
365,
18,
8157,
4534,
18,
588,
67,
12210,
67,
14108,
67,
5639,
1435,
468,
11913,
2727,
1404,
6798,
326,
7339,
2687,
16,
326,
1142,
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,
11090,
6813,
6163,
12,
365,
262,
30,
3320,
682,
273,
365,
18,
8157,
4534,
18,
588,
67,
12210,
67,
14108,
67,
5639,
1435,
468,
11913,
2727,
1404,
6798,
326,
7339,
2687,
16,
326,
1142,
3... |
self.buffer = self.buffer + data | self.buffer += data | def collect_incoming_data(self, data): self.buffer = self.buffer + data | 9ca2d22ba40d5e7580cdc9ea44c9c91d4c1aff1a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/9ca2d22ba40d5e7580cdc9ea44c9c91d4c1aff1a/test_asynchat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3274,
67,
31033,
67,
892,
12,
2890,
16,
501,
4672,
365,
18,
4106,
273,
365,
18,
4106,
397,
501,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3274,
67,
31033,
67,
892,
12,
2890,
16,
501,
4672,
365,
18,
4106,
273,
365,
18,
4106,
397,
501,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
jobpack['input'] = ' '.join('\n'.join(reversed(list(util.iterify(url)))) for url in self['input']) | jobpack['input'] = ' '.join( '\n'.join(reversed(list(util.iterify(url)))) for url in self['input']) | def pack(self): """Pack up the :class:`JobDict` for sending over the wire.""" jobpack = {} | bf8ab511bd5776f671b904b9cb5d93a7f6982749 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/bf8ab511bd5776f671b904b9cb5d93a7f6982749/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
12,
2890,
4672,
3536,
4420,
731,
326,
294,
1106,
28288,
2278,
5014,
68,
364,
5431,
1879,
326,
6636,
12123,
1719,
2920,
273,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
2298,
12,
2890,
4672,
3536,
4420,
731,
326,
294,
1106,
28288,
2278,
5014,
68,
364,
5431,
1879,
326,
6636,
12123,
1719,
2920,
273,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
c = query.pop(0).upper() | c = q.upper() | def singleSearchStep(self, query, id, msg): q = query.pop(0) if isinstance(q, list): if not self.searchFilter(q, id, msg): return False else: c = query.pop(0).upper() f = getattr(self, 'search_' + c) if f: if not f(query, id, msg): return False else: # IMAP goes *out of its way* to be complex # Sequence sets to search should be specified # with a command, like EVERYTHING ELSE. try: m = parseIdList(c) except: log.err('Unknown search term: ' + c) else: if id not in m: return False return True | eb8d902d2b64789da87345b7689551f2803c111a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eb8d902d2b64789da87345b7689551f2803c111a/imap4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2202,
2979,
4160,
12,
2890,
16,
843,
16,
612,
16,
1234,
4672,
1043,
273,
843,
18,
5120,
12,
20,
13,
309,
1549,
12,
85,
16,
666,
4672,
309,
486,
365,
18,
3072,
1586,
12,
85,
16,
612... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2202,
2979,
4160,
12,
2890,
16,
843,
16,
612,
16,
1234,
4672,
1043,
273,
843,
18,
5120,
12,
20,
13,
309,
1549,
12,
85,
16,
666,
4672,
309,
486,
365,
18,
3072,
1586,
12,
85,
16,
612... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.