rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
if rtime == None: | if rtime == None and datetuple_msg == None: | def savemessage(self, uid, content, flags, rtime): imapobj = self.imapserver.acquireconnection() ui = UIBase.getglobalui() ui.debug('imap', 'savemessage: called') try: try: imapobj.select(self.getfullname()) # Needed for search except imapobj.readonly: ui.msgtoreadonly(self, uid, content, flags) # Return indicating message taken, but no UID assigned. # Fudge it. return 0 # This backend always assigns a new uid, so the uid arg is ignored. # In order to get the new uid, we need to save off the message ID. | 9d7df0e21acd88fdf66a6744fac0760d72bb7294 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5335/9d7df0e21acd88fdf66a6744fac0760d72bb7294/IMAP.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4087,
351,
615,
12,
2890,
16,
4555,
16,
913,
16,
2943,
16,
436,
957,
4672,
20226,
2603,
273,
365,
18,
12161,
3567,
18,
1077,
1039,
4071,
1435,
5915,
273,
6484,
2171,
18,
588,
10581,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4087,
351,
615,
12,
2890,
16,
4555,
16,
913,
16,
2943,
16,
436,
957,
4672,
20226,
2603,
273,
365,
18,
12161,
3567,
18,
1077,
1039,
4071,
1435,
5915,
273,
6484,
2171,
18,
588,
10581,
70... |
""" TODO unit tests """ | def pop(self, index=-1): """ | 0479d0e6e0fff5104b463a62dcd9d0f78ec3e2cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5397/0479d0e6e0fff5104b463a62dcd9d0f78ec3e2cb/collections_.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1843,
12,
2890,
16,
770,
29711,
21,
4672,
3536,
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,
1843,
12,
2890,
16,
770,
29711,
21,
4672,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
return | j.showState() while True: try: (cline,outname) = j.fetchAndLockNextCmd(row) except TypeError: print ":::no more lines to run!" break print ":::pretending to run %s" % (cline) j.showState() print ":::fake produce %s" % (outname) affected = j.cmdsWithInput(outname) j.setFileStateByName(outname, 3) j.makeReady(affected) j.close() j.showState() if buildOnly: return | def selfTest(): print "doing basic internal build/delete/build/delete test." j = JobPersistence("sometest_db") j.buildTables() j.close() print " build and close" row = j.insertTask("AABBCCDD") # a command with no input and one independent output (ready to go) j.insertCmd(row, 2, "ncap", "ncap -o %outf_indep.nc%") j.insertInout(row, 2, "%outf_indep.nc%", "/tmp/temp1111outf_indep.nc", True, 1, False) # a command with one input(orig) and one output(temp) (ready to go) j.insertCmd(row, 5, "ncwa", "ncwa in.nc %tempf_other.nc%") j.insertInout(row, 5, "in.nc", "in.nc", False, 1, False) j.insertInout(row, 5, "%tempf_other.nc%", "/tmp/temp0000tempf_other.nc", True, 1, True) # a command with two inputs (orig+depend) and one output j.insertCmd(row, 10, "ncwa", "ncwa in.nc %tempf_other.nc% %outf_out.nc%") j.insertInout(row, 10, "in.nc", "in.nc", False, 1, False) j.insertInout(row, 10, "%tempf_other.nc%", "/tmp/temp0000tempf_other.nc", False, 1, True) j.insertInout(row, 10, "%outf_out.nc%", "/tmp/temp1111outf_out.nc", True, 1, False) # a command with two inputs (orig+depend) and one output j.insertCmd(row, 12, "ncap", "ncwa in.nc %outf_out.nc% %outf_out2.nc%") j.insertInout(row, 12, "in.nc", "in.nc", False, 1, False) j.insertInout(row, 12, "%outf_out.nc%", "/tmp/temp1111outf_out.nc", False, 1, False) j.insertInout(row, 12, "%outf_out2.nc%", "/tmp/temp2222outf_out2.nc", True, 1, False) j.commit() j.showState() j.initMakeReady(row) # clist = j.cmdsWithInput("/tmp/temp1111tempf_other.nc") #j.makeReady(clist) j.close() return j.deleteTables() j.close() print " delete and closed" j.buildTables() j.close() print " build and closed" j.deleteTables() j.close() print " delete and closed" pass | 5b6a02c82a858db1229fd5d4d621cd3d16fd2060 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5203/5b6a02c82a858db1229fd5d4d621cd3d16fd2060/ssdap_dbutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
365,
4709,
13332,
1172,
315,
2896,
310,
5337,
2713,
1361,
19,
3733,
19,
3510,
19,
3733,
1842,
1199,
525,
273,
3956,
13182,
2932,
87,
362,
278,
395,
67,
1966,
7923,
525,
18,
3510,
6905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
365,
4709,
13332,
1172,
315,
2896,
310,
5337,
2713,
1361,
19,
3733,
19,
3510,
19,
3733,
1842,
1199,
525,
273,
3956,
13182,
2932,
87,
362,
278,
395,
67,
1966,
7923,
525,
18,
3510,
6905,
... |
outfile = open(os.path.join(outdir, 'RobotFrameworkUserGuide.html'), 'wb') | outfile = open(os.path.join(outdir, 'RobotFrameworkUserGuide-%s.html' % version), 'wb') | def copy_tool_images(path): indir = os.path.dirname(path) for line in open(os.path.splitext(path)[0]+'.txt').readlines(): if line.startswith('.. figure::'): copy(os.path.join(indir, line.strip().split()[-1]), toolsdir) | 04108bbf6e7d85036b6b13924a14a5be8e76df7b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/04108bbf6e7d85036b6b13924a14a5be8e76df7b/ug2html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
6738,
67,
7369,
12,
803,
4672,
316,
1214,
273,
1140,
18,
803,
18,
12287,
12,
803,
13,
364,
980,
316,
1696,
12,
538,
18,
803,
18,
4939,
408,
12,
803,
25146,
20,
3737,
10332,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
6738,
67,
7369,
12,
803,
4672,
316,
1214,
273,
1140,
18,
803,
18,
12287,
12,
803,
13,
364,
980,
316,
1696,
12,
538,
18,
803,
18,
4939,
408,
12,
803,
25146,
20,
3737,
10332,... |
assert_almost_equal(x**14, [-76443+16124j, 23161315+58317492j, 5583548873 + 2465133864j]) | norm = 1./((x**14)[0]) assert_almost_equal(x**14 * norm, [i * norm for i in [-76443+16124j, 23161315+58317492j, 5583548873 + 2465133864j]]) | def test_power_complex(self): x = np.array([1+2j, 2+3j, 3+4j]) assert_equal(x**0, [1., 1., 1.]) assert_equal(x**1, x) assert_equal(x**2, [-3+4j, -5+12j, -7+24j]) assert_equal(x**3, [(1+2j)**3, (2+3j)**3, (3+4j)**3]) assert_equal(x**4, [(1+2j)**4, (2+3j)**4, (3+4j)**4]) assert_almost_equal(x**(-1), [1/(1+2j), 1/(2+3j), 1/(3+4j)]) assert_almost_equal(x**(-2), [1/(1+2j)**2, 1/(2+3j)**2, 1/(3+4j)**2]) assert_almost_equal(x**(-3), [(-11+2j)/125, (-46-9j)/2197, (-117-44j)/15625]) assert_almost_equal(x**(0.5), [ncu.sqrt(1+2j), ncu.sqrt(2+3j), ncu.sqrt(3+4j)]) assert_almost_equal(x**14, [-76443+16124j, 23161315+58317492j, 5583548873 + 2465133864j]) | 1dec6da92fa355620acfccd8e18a6fe80e06054e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/1dec6da92fa355620acfccd8e18a6fe80e06054e/test_umath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12238,
67,
14259,
12,
2890,
4672,
619,
273,
1130,
18,
1126,
3816,
21,
15,
22,
78,
16,
576,
15,
23,
78,
16,
890,
15,
24,
78,
5717,
1815,
67,
9729,
12,
92,
636,
20,
16,
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,
1842,
67,
12238,
67,
14259,
12,
2890,
4672,
619,
273,
1130,
18,
1126,
3816,
21,
15,
22,
78,
16,
576,
15,
23,
78,
16,
890,
15,
24,
78,
5717,
1815,
67,
9729,
12,
92,
636,
20,
16,
3... |
while remaining and remaining[0] != 'Got:': | while remaining and remaining[0] not in ('Got:', 'Got nothing'): | def colorize_zope_doctest_output(lines): """Colorize output formatted by the doctest engine included with Zope 3. Returns a new sequence of colored strings. `lines` is a sequence of strings. The typical structure of the doctest output looks either like this: File "...", line 123, in foo.bar.baz.doctest_quux Failed example: f(2, 3) Expected: 6 Got: 5 Or, if an exception has occured, like this: File "...", line 123, in foo.bar.baz.doctest_quux Failed example: f(2, 3) Exception raised: Traceback (most recent call last): File "...", line 123, in __init__ self.do_something(a, b, c) File "...", line ... ... FooError: something bad happened If some assumption made by this function is not met, the original sequence is returned without any modifications. """ header = lines[0] if not header.startswith('File "'): return lines # not a doctest failure report? # Dissect the header in a rather nasty way. header = header[len('File "'):] fn_end = header.find('"') if fn_end == -1: return lines filename = header[:fn_end] header = header[fn_end+len('", line '):] parts = header.split(', in ') if len(parts) != 2: return lines lineno, testname = parts filename = colorize('filename', filename) lineno = colorize('lineno', lineno) testname = colorize('testname', testname) result = ['File "%s", line %s, in %s' % (filename, lineno, testname)] # Colorize the 'Failed example:' section. if lines[1] != 'Failed example:': return lines result.append(colorize('doctest_title', lines[1])) remaining = lines[2:] # XXX It can say 'Expected nothing' too. while remaining and remaining[0] not in ('Expected:', 'Exception raised:'): line = remaining.pop(0) result.append(colorize('doctest_code', line)) if not remaining: return lines if remaining[0] == 'Expected:': result.append(colorize('doctest_title', remaining.pop(0))) # Expected: while remaining and remaining[0] != 'Got:': line = remaining.pop(0) result.append(colorize('doctest_expected', line)) if not remaining or remaining[0] != 'Got:': return lines result.append(colorize('doctest_title', remaining.pop(0))) # Got: while remaining: line = remaining.pop(0) result.append(colorize('doctest_got', line)) elif remaining[0] == 'Exception raised:': result.append(colorize('doctest_title', remaining.pop(0))) # E. raised: while remaining: line = remaining.pop(0) # TODO: Scrape and colorize the traceback. result.append(colorize('doctest_got', line)) else: return lines return result | bac1bef133ecddf6647cd477c316f13d402f89b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/bac1bef133ecddf6647cd477c316f13d402f89b4/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21077,
67,
94,
1306,
67,
2896,
299,
395,
67,
2844,
12,
3548,
4672,
3536,
2957,
554,
876,
4955,
635,
326,
31263,
395,
4073,
5849,
598,
2285,
1306,
890,
18,
225,
2860,
279,
394,
3102,
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,
21077,
67,
94,
1306,
67,
2896,
299,
395,
67,
2844,
12,
3548,
4672,
3536,
2957,
554,
876,
4955,
635,
326,
31263,
395,
4073,
5849,
598,
2285,
1306,
890,
18,
225,
2860,
279,
394,
3102,
43... |
print "],\nu'x%s':["%code[0], | if firsttime: firsttime = False print "CODEPOINTS = { \nu'x%s':["%code[0], else: print "],\nu'x%s':["%code[0], | def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0].capitalize() if oucode != ucode: print "],\nu'x%s':["%code[0], oucode = ucode olcode = -1 if (lcode - olcode) > 1: for i in range(lcode-olcode-1): print '"[?]",', olcode = lcode print '"'+pron+'",', except: continue | bf2a87a44b2d474baa7044c77e6ae38d4822dc2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10700/bf2a87a44b2d474baa7044c77e6ae38d4822dc2a/unihan_kconv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
896,
899,
13332,
16694,
710,
273,
374,
8793,
710,
225,
273,
374,
364,
980,
316,
1696,
12,
3168,
11189,
86,
11,
4672,
1516,
273,
980,
10531,
17,
21,
8009,
4939,
2668,
64,
88,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
896,
899,
13332,
16694,
710,
273,
374,
8793,
710,
225,
273,
374,
364,
980,
316,
1696,
12,
3168,
11189,
86,
11,
4672,
1516,
273,
980,
10531,
17,
21,
8009,
4939,
2668,
64,
88,
... |
x = cx + dist * math.cos(angle) y = cy + dist * math.sin(angle) | x = self.normalize(cx + dist * math.cos(angle)) y = self.normalize(cy + dist * math.sin(angle)) | def SuggestPosition(self, distance): """ Suggest a random position within a given distance. """ cx, cy = self.origin angle = random.uniform(0.0, 2.0 * math.pi) dist = random.uniform(0.0, distance) x = cx + dist * math.cos(angle) y = cy + dist * math.sin(angle) return x, y | 36e750b62332b9c980f3e9625638be7145750092 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2522/36e750b62332b9c980f3e9625638be7145750092/topology.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
348,
8679,
2555,
12,
2890,
16,
3888,
4672,
3536,
348,
8679,
279,
2744,
1754,
3470,
279,
864,
3888,
18,
3536,
9494,
16,
6143,
273,
365,
18,
10012,
5291,
273,
2744,
18,
24120,
12,
20,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
348,
8679,
2555,
12,
2890,
16,
3888,
4672,
3536,
348,
8679,
279,
2744,
1754,
3470,
279,
864,
3888,
18,
3536,
9494,
16,
6143,
273,
365,
18,
10012,
5291,
273,
2744,
18,
24120,
12,
20,
18... |
if padding is None: padding = 'X' * self.__padding | if padding is None: padding = u'\xa0' * self.__padding | def ngramify(self, haystack, ic = None, only_alnum = None, padding = None, noise = None): """ Takes list of strings and puts them into an index of ngrams. KEY is a ngram, VALUE a list of strings containing that ngram. VALUE has two KEYS: grams: count of ngram occurring in string len: length of string with padding (if ignoring non alphanumerics, this gets determined after those characters have been removed) | 24bba282fb5583348dc65021ea3127639cdefbc7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12095/24bba282fb5583348dc65021ea3127639cdefbc7/ngram.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20368,
1164,
12,
2890,
16,
13764,
16,
13579,
273,
599,
16,
1338,
67,
287,
2107,
273,
599,
16,
4992,
273,
599,
16,
10825,
273,
599,
4672,
3536,
23004,
666,
434,
2064,
471,
8200,
2182,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20368,
1164,
12,
2890,
16,
13764,
16,
13579,
273,
599,
16,
1338,
67,
287,
2107,
273,
599,
16,
4992,
273,
599,
16,
10825,
273,
599,
4672,
3536,
23004,
666,
434,
2064,
471,
8200,
2182,
1... |
+ If you continue a line via backslashing in an interactive session, or for any other reason use a backslash, you need to double the backslash in the docstring version. This is simply because you're in a string, and so the backslash must be escaped for it to survive intact. Like: >>> if "yes" == \\ ... "y" + \\ ... "es": ... print 'yes' yes | + If you continue a line via backslashing in an interactive session, or for any other reason use a backslash, you should use a raw docstring, which will preserve your backslahses exactly as you type them: >>> def f(x): ... r'''Backslashes in a raw docstring: m\n''' >>> print f.__doc__ Backslashes in a raw docstring: m\n Otherwise, the backslash will be interpreted as part of the string. E.g., the "\n" above would be interpreted as a newline character. Alternatively, you can double each backslash in the doctest version (and not use a raw string): >>> def f(x): ... '''Backslashes in a raw docstring: m\\n''' >>> print f.__doc__ Backslashes in a raw docstring: m\n | def _test(): import doctest import sys verbose = "-v" in sys.argv for mod in modules: doctest.testmod(mod, verbose=verbose, report=0) doctest.master.summarize() | acd646bd79de21f80bf1aaf41c55fe5dbd93e8dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/acd646bd79de21f80bf1aaf41c55fe5dbd93e8dd/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
13332,
1930,
31263,
395,
1930,
2589,
3988,
273,
3701,
90,
6,
316,
2589,
18,
19485,
364,
681,
316,
4381,
30,
31263,
395,
18,
3813,
1711,
12,
1711,
16,
3988,
33,
11369,
16,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
13332,
1930,
31263,
395,
1930,
2589,
3988,
273,
3701,
90,
6,
316,
2589,
18,
19485,
364,
681,
316,
4381,
30,
31263,
395,
18,
3813,
1711,
12,
1711,
16,
3988,
33,
11369,
16,
26... |
self._clean = False | def __init__(self, cmd, expect=EXPECT_EXIT_OK, drain=True): """Run cmd (should be a list of arguments) expect - if set verify expectation at end of test. drain - if true (default) drain stdout/stderr to files. """ assert find_exe(cmd[0]), "executable not found: "+cmd[0] if type(cmd) is type(""): cmd = [cmd] # Make it a list. self.cmd = [ str(x) for x in cmd ] self.returncode = None popen2.Popen3.__init__(self, self.cmd, True) self.expect = expect self.pname = "%s-%d" % (os.path.split(self.cmd[0])[1], self.pid) msg = "Process %s" % self.pname self.stdin = ExceptionWrapper(self.tochild, msg) self.stdout = Popen.OutStream(self.fromchild, self.outfile("out"), msg) self.stderr = Popen.OutStream(self.childerr, self.outfile("err"), msg) f = open(self.outfile("cmd"), "w") try: f.write(self.cmd_str()) finally: f.close() log.debug("Started process %s: %s" % (self.pname, " ".join(self.cmd))) if drain: self.drain() self._clean = False | ddebcf45131d521f720ee55efd081724f177bd2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/197/ddebcf45131d521f720ee55efd081724f177bd2d/brokertest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1797,
16,
4489,
33,
2294,
1423,
1268,
67,
28682,
67,
3141,
16,
15427,
33,
5510,
4672,
3536,
1997,
1797,
261,
13139,
506,
279,
666,
434,
1775,
13,
4489,
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,
1001,
2738,
972,
12,
2890,
16,
1797,
16,
4489,
33,
2294,
1423,
1268,
67,
28682,
67,
3141,
16,
15427,
33,
5510,
4672,
3536,
1997,
1797,
261,
13139,
506,
279,
666,
434,
1775,
13,
4489,
3... | |
this = apply(_quickfix.new_PartySubIDType, args) | this = _quickfix.new_PartySubIDType(*args) | def __init__(self, *args): this = apply(_quickfix.new_PartySubIDType, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
17619,
1676,
734,
559,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
17619,
1676,
734,
559,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
... |
if start is None: start = 0 if step is None: step = 1 | if start is None: start=0 if step is None: step=1 | def __getitem__(self,key): try: size = [] typecode = Numeric.Int for k in range(len(key)): step = key[k].step start = key[k].start if start is None: start = 0 if step is None: step = 1 if type(step) is type(1j): size.append(int(abs(step))) typecode = Numeric.Float else: size.append(int((key[k].stop - start)/(step*1.0))) if isinstance(step,types.FloatType) or \ isinstance(start, types.FloatType) or \ isinstance(key[k].stop, types.FloatType): typecode = Numeric.Float if self.sparse: nn = map(lambda x,t: Numeric.arange(x,typecode=t),size,(typecode,)*len(size)) else: nn = Numeric.indices(size,typecode) for k in range(len(size)): step = key[k].step if step is None: step = 1 if type(step) is type(1j): step = int(abs(step)) step = (key[k].stop - key[k].start)/float(step-1) nn[k] = (nn[k]*step+key[k].start) if self.sparse: slobj = [Numeric.NewAxis]*len(size) for k in range(len(size)): slobj[k] = slice(None,None) nn[k] = nn[k][slobj] slobj[k] = Numeric.NewAxis return nn except (IndexError, TypeError): step = key.step stop = key.stop start = key.start if start is None: start = 0 if type(step) is type(1j): step = abs(step) length = int(step) step = (key.stop-start)/float(step-1) stop = key.stop+step return Numeric.arange(0,length,1,Numeric.Float)*step + start else: return Numeric.arange(start, stop, step) | 965e6c6979cf1a73c5667a9595f0c19a28abbb9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/965e6c6979cf1a73c5667a9595f0c19a28abbb9a/index_tricks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
856,
4672,
775,
30,
963,
273,
5378,
618,
710,
273,
16980,
18,
1702,
364,
417,
316,
1048,
12,
1897,
12,
856,
3719,
30,
2235,
273,
498,
63,
79,
8009,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
856,
4672,
775,
30,
963,
273,
5378,
618,
710,
273,
16980,
18,
1702,
364,
417,
316,
1048,
12,
1897,
12,
856,
3719,
30,
2235,
273,
498,
63,
79,
8009,
41... |
self.CharClass.setCurrentItem(ClassList[self.realm].index(self.charclass)) | self.CharClass.setCurrentIndex(ClassList[self.realm].index(self.charclass)) | def RealmChanged(self,a0): self.realm = str(self.Realm.currentText()) self.CharClass.clear() self.CharClass.insertItems(0, list(ClassList[self.realm])) if self.charclass in ClassList[self.realm]: self.CharClass.setCurrentItem(ClassList[self.realm].index(self.charclass)) self.CharClassChanged('') | e63677827cbb3d774ac3357eb42eaf8e69ff805d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/e63677827cbb3d774ac3357eb42eaf8e69ff805d/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15987,
81,
5033,
12,
2890,
16,
69,
20,
4672,
365,
18,
24056,
273,
609,
12,
2890,
18,
22545,
18,
2972,
1528,
10756,
365,
18,
2156,
797,
18,
8507,
1435,
365,
18,
2156,
797,
18,
6387,
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,
15987,
81,
5033,
12,
2890,
16,
69,
20,
4672,
365,
18,
24056,
273,
609,
12,
2890,
18,
22545,
18,
2972,
1528,
10756,
365,
18,
2156,
797,
18,
8507,
1435,
365,
18,
2156,
797,
18,
6387,
3... |
" (%d selection had no hydrogens)" \ | " (%d selected chunk(s) had no hydrogens)" \ | def modifyDehydrogenate(self): # Moved to MWsemantics. Mark 050116 | 17ad7959a2f117ea2bb3905d8a13cd769fe81051 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/17ad7959a2f117ea2bb3905d8a13cd769fe81051/modes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5612,
758,
18112,
24096,
340,
12,
2890,
4672,
468,
490,
9952,
358,
16948,
18756,
18,
225,
6622,
374,
9172,
2313,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
5612,
758,
18112,
24096,
340,
12,
2890,
4672,
468,
490,
9952,
358,
16948,
18756,
18,
225,
6622,
374,
9172,
2313,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 682) else quickfix.StringField.__init__(self, 682, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1666,
11149,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1666,
11149,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
273... |
"""Connects to the database to load myself""" | """Connect to the database to load myself""" | def _loadDB(self): """Connects to the database to load myself""" if not self._validID(): raise NotFound, self._getID() (sql, fields) = self._prepareSQL("SELECT") curs = self.cursor() curs.execute(sql, self._getID()) result = curs.fetchone() if not result: curs.close() raise NotFound, self._getID() self._loadFromRow(result, fields, curs) curs.close() self._updated = time.time() | 6f065d7f40e2cd8ad1cba00bf68d639f5bb58726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1051/6f065d7f40e2cd8ad1cba00bf68d639f5bb58726/forgetSQL.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
2290,
12,
2890,
4672,
3536,
5215,
358,
326,
2063,
358,
1262,
3399,
2890,
8395,
309,
486,
365,
6315,
877,
734,
13332,
1002,
7054,
16,
365,
6315,
588,
734,
1435,
261,
4669,
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,
945,
2290,
12,
2890,
4672,
3536,
5215,
358,
326,
2063,
358,
1262,
3399,
2890,
8395,
309,
486,
365,
6315,
877,
734,
13332,
1002,
7054,
16,
365,
6315,
588,
734,
1435,
261,
4669,
16,
... |
dest = self.findFileInDir(u"%s.%s" % (available_metadata['title'], ext), graphicsdirs, suffix=self.graphic_suffix[graphic_type]) | dest = self.findFileInDir(u"%s.%s" % (available_metadata['title'], ext), graphicsdirs, suffix=self.graphic_suffix[graphic_type], fuzzy_match=True) | def processMythTvMetaData(self): '''Check each video file in the mythvideo directories download graphics files and meta data then update MythTV data base meta data with any new information. ''' # If there were directories specified move them and update the MythTV db meta data accordingly if self.config['video_dir']: if len(self.config['video_dir']) % 2 == 0: validFiles = self._moveVideoFiles(self.config['video_dir']) else: sys.stderr.write(u"\n! Error: When specifying target (file or directory) to move to a destination (directory) they must always be in pairs (target and destination directory).\nYou specified an uneven number of variables (%d) for target and destination pairs.\nVariable count (%s)\n" % (len(self.config['video_dir']), self.config['video_dir'])) sys.exit(False) | 881a9111c0613ff73ff321ac94e0e0ed204b9de1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/881a9111c0613ff73ff321ac94e0e0ed204b9de1/jamu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12062,
451,
56,
90,
6998,
12,
2890,
4672,
9163,
1564,
1517,
6191,
585,
316,
326,
3399,
451,
9115,
6402,
4224,
17313,
1390,
471,
2191,
501,
1508,
1089,
8005,
451,
15579,
501,
1026,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12062,
451,
56,
90,
6998,
12,
2890,
4672,
9163,
1564,
1517,
6191,
585,
316,
326,
3399,
451,
9115,
6402,
4224,
17313,
1390,
471,
2191,
501,
1508,
1089,
8005,
451,
15579,
501,
1026,
... |
super(EfoldModel, self).plotresults(self, fig=f, show=False, varindex=[2], saveplot=False) | super(EfoldModel, self).plotresults(fig=f, show=False, varindex=2, saveplot=False) | def plotbgresults(self, saveplot = False): """Plot results of simulation run on a graph.""" if self.runcount == 0: raise ModelError("Model has not been run yet, cannot plot results!", self.tresult, self.yresult) f = P.figure() #First plot of phi and phi^dot P.subplot(121) super(EfoldModel, self).plotresults(self, fig=f, show=False, varindex=[0,1], saveplot=False) #Second plot of H P.subplot(122) super(EfoldModel, self).plotresults(self, fig=f, show=False, varindex=[2], saveplot=False) P.show() return | 33d0a722fa4391d9e185f42e779ca432f17dd143 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/33d0a722fa4391d9e185f42e779ca432f17dd143/cosmomodels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
12370,
4717,
12,
2890,
16,
1923,
4032,
273,
1083,
4672,
3536,
11532,
1686,
434,
14754,
1086,
603,
279,
2667,
12123,
225,
309,
365,
18,
86,
551,
592,
422,
374,
30,
1002,
3164,
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,
3207,
12370,
4717,
12,
2890,
16,
1923,
4032,
273,
1083,
4672,
3536,
11532,
1686,
434,
14754,
1086,
603,
279,
2667,
12123,
225,
309,
365,
18,
86,
551,
592,
422,
374,
30,
1002,
3164,
668,
... |
parser.add_option("-u", "--username", dest="username", default=username, help="The username to be used when connecting.", metavar="<username>") | parser.add_option("-u", "--username", dest="username", default=os.getlogin(), help="The username to be used when connecting. Defaults to the currently logged-in user.", metavar="<username>") | def main(): """Main program function: Grabs command-line arguments, starts up threads, and runs the program.""" try: # Set the default username to the current user username = os.getlogin() except: username = None # Grab command line arguments and the command to run (if any) usage = 'usage: %prog [options] "[command1]" "[command2]" ...' parser = OptionParser(usage=usage, version=__version__) parser.disable_interspersed_args() parser.add_option("-f", "--file", dest="hostfile", default=None, help="Location of the file containing the host list.", metavar="<file>") parser.add_option("-o", "--outfile", dest="outfile", default=None, help="Location of the file where the results will be saved.", metavar="<file>") parser.add_option("-a", "--authfile", dest="authfile", default=None, help="Location of the file containing the credentials to be used for connections (format is \"username:password\").", metavar="<file>") parser.add_option("-t", "--threads", dest="max_threads", default=10, type="int", help="Number of threads to spawn for simultaneous connection attempts [default: 10].", metavar="<int>") parser.add_option("-u", "--username", dest="username", default=username, help="The username to be used when connecting.", metavar="<username>") parser.add_option("-P", "--password", dest="password", default=None, help="The password to be used when connecting (not recommended--use an authfile unless the username and password are transient", metavar="<password>") parser.add_option("-q", "--quiet", action="store_false", dest="verbose", default=True, help="Don't print status messages to stdout (only print errors).") parser.add_option("-c", "--copy-file", dest="copy_file", default=None, help="Location of the file to copy to and optionally execute (-x) on hosts.", metavar="<file>") parser.add_option("-D", "--dest", dest="destination", default="/tmp/", help="Path where the file should be copied on the remote host (default: /tmp/).", metavar="<path>") parser.add_option("-x", "--execute", action="store_true", dest="execute", default=False, help="Execute the copied file (just like executing a given command).") parser.add_option("-r", "--remove", action="store_true", dest="remove", default=False, help="Remove (clean up) the SFTP'd file after execution.") parser.add_option("-T", "--timeout", dest="timeout", default=30, help="Timeout (in seconds) before giving up on an SSH connection (default: 30)", metavar="<seconds>") parser.add_option("-s", "--sudo", action="store_true", dest="sudo", default=False, help="Use sudo to execute the command (default: as root).") parser.add_option("-U", "--sudouser", dest="run_as", default="root", help="Run the command (via sudo) as this user.", metavar="<username>") (options, args) = parser.parse_args() # Check to make sure we were passed at least one command line argument try: sys.argv[1] except: print "\nError: At a minimum you must supply an input hostfile (-f)" parser.print_help() sys.exit(2) commands = False return_code = 0 ## Assume anything passed to us beyond the command line switches are commands to be executed if len(args) > 0: commands = args # Assign the options to more readable variables password = options.password local_filepath = options.copy_file remote_filepath = options.destination execute = options.execute remove = options.remove sudo = options.sudo max_threads = options.max_threads timeout = options.timeout run_as = options.run_as verbose = options.verbose outfile = options.outfile if options.hostfile == None: print "Error: You must supply a file (-f <file>) containing the host list to check." print "Use the -h option to see usage information." sys.exit(2) if options.outfile is None and options.verbose is False: print "Error: You have not specified any mechanism to output results." print "Please don't use quite mode (-q) without an output file (-o <file>)." sys.exit(2) if local_filepath is not None and commands is not False: print "Error: You can either run commands or execute a file. Not both." sys.exit(2) # Read in the host list to check hostlist = open(options.hostfile).read() if options.authfile is not None: credentials = open(options['authfile']).readline() username, password = credentials.split(":") # Get the username and password to use when checking hosts if options.username == None: username = raw_input('Username: ') if options.password == None: password = getpass.getpass('Password: ') hostlist_list = [] try: # This wierd little sequence of loops allows us to hit control-C in the middle of program execution and get immediate results for host in hostlist.split("\n"): # Turn the hostlist into an actual list if host != "": hostlist_list.append(host) output_queue = sshpt(hostlist_list, username, password, max_threads, timeout, commands, local_filepath, remote_filepath, execute, remove, sudo, run_as, verbose, outfile) output_queue.join() # Just to be safe we wait for the OutputThread to finish before moving on except KeyboardInterrupt: print 'caught KeyboardInterrupt, exiting...' return_code = 1 # Return code should be 1 if the user issues a SIGINT (control-C) # Clean up stopSSHQueue() stopOutputThread() sys.exit(return_code) except Exception, detail: print 'caught Exception...' print detail return_code = 2 # Clean up stopSSHQueue() stopOutputThread() sys.exit(return_code) | 1459466ffc2512b812bc80c26d85eadf669894b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11566/1459466ffc2512b812bc80c26d85eadf669894b9/sshpt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6376,
5402,
445,
30,
225,
10812,
2038,
1296,
17,
1369,
1775,
16,
2542,
731,
7403,
16,
471,
7597,
326,
5402,
12123,
225,
775,
30,
468,
1000,
326,
805,
2718,
358,
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,
2774,
13332,
3536,
6376,
5402,
445,
30,
225,
10812,
2038,
1296,
17,
1369,
1775,
16,
2542,
731,
7403,
16,
471,
7597,
326,
5402,
12123,
225,
775,
30,
468,
1000,
326,
805,
2718,
358,
326,
... |
else: if (sys.platform == "darwin"): cmd = 'g++ -undefined dynamic_lookup -dynamic -dynamiclib -o ' + dll + ' -install_name built/lib/' + os.path.basename(dll) + ' -Lbuilt/lib -L/usr/X11R6/lib' else: cmd = 'g++ -shared -o ' + dll + ' -Lbuilt/lib -L/usr/X11R6/lib' | else: cmd = 'g++ -shared -o ' + dll + ' -Lbuilt/lib -L/usr/X11R6/lib' | def CompileLink(dll, obj, opts): if (COMPILER=="MSVC"): cmd = 'link /nologo /NOD:MFC80.LIB /NOD:LIBCI.LIB /NOD:MSVCRTD.LIB /DEBUG ' cmd = cmd + " /nod:libc /nod:libcmtd /nod:atlthunk" if (GetOrigExt(dll) != ".exe"): cmd = cmd + " /DLL" optlevel = GetOptimizeOption(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + " /MAP /MAPINFO:EXPORTS" if (optlevel==2): cmd = cmd + " /MAP:NUL " if (optlevel==3): cmd = cmd + " /MAP:NUL " if (optlevel==4): cmd = cmd + " /MAP:NUL /LTCG " cmd = cmd + " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO " cmd = cmd + ' /OUT:' + dll if (dll.endswith(".dll")): cmd = cmd + ' /IMPLIB:built/lib/'+dll[10:-4]+".lib" for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' /LIBPATH:"' + dir + '"' for x in obj: if (x.endswith(".dll")): cmd = cmd + ' built/lib/' + x[10:-4] + ".lib" elif (x.endswith(".lib")): dname = x[:-4]+".dll" if (os.path.exists("built/bin/" + x[10:-4] + ".dll")): exit("Error: in makepanda, specify "+dname+", not "+x) cmd = cmd + ' ' + x elif (x.endswith(".def")): cmd = cmd + ' /DEF:"' + x + '"' elif (x.endswith(".dat")): pass else: cmd = cmd + ' ' + x if (GetOrigExt(dll)==".exe"): cmd = cmd + ' panda/src/configfiles/pandaIcon.obj' for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' ' + name oscmd(cmd) SetVC80CRTVersion(dll+".manifest", VC80CRTVERSION) mtcmd = 'mt -manifest ' + dll + '.manifest -outputresource:' + dll if (dll.endswith(".exe")==0): mtcmd = mtcmd + ';2' else: mtcmd = mtcmd + ';1' oscmd(mtcmd) if (COMPILER=="LINUX"): if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -Lbuilt/lib -L/usr/X11R6/lib' else: if (sys.platform == "darwin"): cmd = 'g++ -undefined dynamic_lookup -dynamic -dynamiclib -o ' + dll + ' -install_name built/lib/' + os.path.basename(dll) + ' -Lbuilt/lib -L/usr/X11R6/lib' else: cmd = 'g++ -shared -o ' + dll + ' -Lbuilt/lib -L/usr/X11R6/lib' for x in obj: if (GetOrigExt(x) != ".dat"): base = os.path.basename(x) if (base[-3:]==".so") and (base[:3]=="lib"): cmd = cmd + ' -l' + base[3:-3] else: cmd = cmd + ' ' + x for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' -L"' + dir + '"' for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' ' + name cmd = cmd + " -lpthread -ldl" if (sys.platform == "darwin"): if (PkgSkip("PYTHON")==0): cmd = cmd + " -framework Python" cmd = cmd + " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"] + " -arch ppc -arch i386" oscmd(cmd) | f7a6726c5099ebae926d5d09ee18a7f322e81784 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8543/f7a6726c5099ebae926d5d09ee18a7f322e81784/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16143,
2098,
12,
27670,
16,
1081,
16,
1500,
4672,
309,
261,
31075,
14668,
31713,
3537,
13464,
6,
4672,
1797,
273,
296,
1232,
342,
82,
3966,
83,
342,
50,
1212,
30,
49,
4488,
3672,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16143,
2098,
12,
27670,
16,
1081,
16,
1500,
4672,
309,
261,
31075,
14668,
31713,
3537,
13464,
6,
4672,
1797,
273,
296,
1232,
342,
82,
3966,
83,
342,
50,
1212,
30,
49,
4488,
3672,
18,
1... |
classexpr = '^([ \t]*class +[a-zA-Z0-9_]+) *\( *\) *((=.*)?):' findclass = regexp.compile(classexpr).match baseexpr = '^ *(.*) *\( *\) *$' findbase = regexp.compile(baseexpr).match | def recursedown(dirname): dbg('recursedown(' + `dirname` + ')\n') bad = 0 try: names = posix.listdir(dirname) except posix.error, msg: err(dirname + ': cannot list directory: ' + `msg` + '\n') return 1 for name in names: if name in ('.', '..'): continue fullname = path.join(dirname, name) if path.islink(fullname): pass elif path.isdir(fullname): if recursedown(fullname): bad = 1 elif ispython(name): if fix(fullname): bad = 1 return bad | 11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8112,
730,
995,
12,
12287,
4672,
28966,
2668,
266,
1397,
730,
995,
2668,
397,
1375,
12287,
68,
397,
296,
5153,
82,
6134,
5570,
273,
374,
775,
30,
1257,
273,
16366,
18,
1098,
1214,
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,
8112,
730,
995,
12,
12287,
4672,
28966,
2668,
266,
1397,
730,
995,
2668,
397,
1375,
12287,
68,
397,
296,
5153,
82,
6134,
5570,
273,
374,
775,
30,
1257,
273,
16366,
18,
1098,
1214,
12,
... | |
item.set("identifier", stream.currSource()) | childitem = createItemNode("definition", stream) childitem.set("identifier", stream.currSource()) | def readStatement (stream, expressionMode = False, overrunSemicolon = True): item = None if currIsIdentifier(stream, True): # statement starts with an identifier variable = readVariable(stream, True) variable = readObjectOperation(stream, variable) if stream.currIsType("token", ASSIGN_OPERATORS): # This is an assignment item = createItemNode("assignment", stream) item.set("operator", stream.currDetail()) stream.next() item.addListChild("left", variable) item.addListChild("right", readExpression(stream)) else: # Something else comes after the variable -> It's a sole variable item = variable # Any comments found for the variable belong to the extracted item commentsChild = variable.getChild("commentsBefore", False) if item and commentsChild != None: variable.removeChild(commentsChild) item.addChild(commentsChild, 0) elif stream.currIsType("protected", "FUNCTION"): stream.next() item = createItemNode("function", stream) # Read optional function name if not expressionMode and stream.currIsType("name"): item.set("name", stream.currSource()) stream.next() readParamList(item, stream) item.addListChild("body", readBlock(stream)) # Check for direct execution: function() {}() if stream.currIsType("token", "LP"): # The function is executed directly functionItem = item item = createItemNode("call", stream) item.addListChild("operand", functionItem) readParamList(item, stream) item = readObjectOperation(stream, item) elif stream.currIsType("token", "LP"): stream.next() item = createItemNode("group", stream) if expressionMode: item.addChild(readExpression(stream)) else: item.addChild(readStatement(stream)) stream.expectCurrType("token", "RP") stream.next() item = readObjectOperation(stream, item) elif expressionMode and stream.currIsType("string"): item = createItemNode("constant", stream) item.set("constantType", "string") item.set("value", stream.currSource()) item.set("detail", stream.currDetail()) stream.next() # Allow function calls for strings. E.g.: "a string".match(...) item = readObjectOperation(stream, item, True) elif expressionMode and stream.currIsType("number"): item = createItemNode("constant", stream) item.set("constantType", "number") item.set("value", stream.currSource()) stream.next() elif expressionMode and stream.currIsType("regexp"): item = createItemNode("constant", stream) item.set("constantType", "regexp") item.set("value", stream.currSource()) stream.next() item = readObjectOperation(stream, item) elif expressionMode and (stream.currIsType("protected", "TRUE") or stream.currIsType("protected", "FALSE")): item = createItemNode("constant", stream) item.set("constantType", "boolean") item.set("value", stream.currSource()) stream.next() elif expressionMode and stream.currIsType("protected", "NULL"): item = createItemNode("constant", stream) item.set("constantType", "null") item.set("value", stream.currSource()) stream.next() elif expressionMode and stream.currIsType("token", "LC"): item = readMap(stream) elif expressionMode and stream.currIsType("token", "LB"): item = readArray(stream) elif stream.currIsType("token", SINGLE_LEFT_OPERATORS): item = createItemNode("operation", stream) item.set("operator", stream.currDetail()) item.set("left", "true") stream.next() item.addListChild("first", readExpression(stream)) elif stream.currIsType("protected", "TYPEOF"): item = createItemNode("operation", stream) item.set("operator", "TYPEOF") item.set("left", "true") stream.next() item.addListChild("first", readExpression(stream)) elif stream.currIsType("protected", "NEW"): item = readInstantiation(stream) item = readObjectOperation(stream, item) elif not expressionMode and stream.currIsType("protected", "VAR"): item = createItemNode("definition", stream) stream.next() finished = False while not finished: if not currIsIdentifier(stream, False): raiseSyntaxException(stream.curr(), "identifier") item.set("identifier", stream.currSource()) stream.next() if stream.currIsType("token", "ASSIGN"): stream.next() item.addListChild("assignment", readExpression(stream)) # Check whether anothe definition follows, e.g. "var a, b=1, c=4" if stream.currIsType("token", "COMMA"): stream.next() else: finished = True elif not expressionMode and stream.currIsType("protected", LOOP_KEYWORDS): item = readLoop(stream) elif not expressionMode and stream.currIsType("protected", "DO"): item = readDoWhile(stream) elif not expressionMode and stream.currIsType("protected", "SWITCH"): item = readSwitch(stream) elif not expressionMode and stream.currIsType("protected", "TRY"): item = readTryCatch(stream) elif not expressionMode and stream.currIsType("token", "LC"): item = readBlock(stream) elif not expressionMode and stream.currIsType("protected", "RETURN"): item = createItemNode("return", stream) stream.next() # NOTE: The expression after the return keyword is optional if not stream.currIsType("token", "SEMICOLON") and not stream.currIsType("token", "RC"): item.addListChild("expression", readExpression(stream)) elif not expressionMode and stream.currIsType("protected", "THROW"): item = createItemNode("throw", stream) stream.next() item.addListChild("expression", readExpression(stream)) elif not expressionMode and stream.currIsType("protected", "DELETE"): item = createItemNode("delete", stream) stream.next() item.addListChild("expression", readExpression(stream)) elif not expressionMode and stream.currIsType("protected", "BREAK"): item = createItemNode("break", stream) stream.next() elif not expressionMode and stream.currIsType("protected", "CONTINUE"): item = createItemNode("continue", stream) stream.next() if not item: if stream.currIsType("token", "SEMICOLON") and not expressionMode: # This is an empty statement item = createItemNode("emptyStatement", stream) stream.next() else: if expressionMode: expectedDesc = "expression" else: expectedDesc = "statement" raiseSyntaxException(stream.curr(), expectedDesc) # check whether this is an operation if stream.currIsType("token", MULTI_TOKEN_OPERATORS) or stream.currIsType("protected", MULTI_PROTECTED_OPERATORS) or stream.currIsType("token", SINGLE_RIGHT_OPERATORS): # its an operation -> We've already parsed the first operand (in item) parsedItem = item operator = stream.currDetail() item = createItemNode("operation", stream) item.addListChild("first", parsedItem) item.set("operator", operator) stream.next() if operator in MULTI_TOKEN_OPERATORS or operator in MULTI_PROTECTED_OPERATORS: # It's a multi operator -> There must be a second argument item.addListChild("second", readExpression(stream)) if operator == "HOOK": # It's a "? :" operation -> There must be a third argument stream.expectCurrType("token", "COLON") stream.next() item.addListChild("third", readExpression(stream)) # check whether this is a combined statement, e.g. "bla(), i++" if not expressionMode and stream.currIsType("token", "COMMA"): statementList = createItemNode("statementList", stream) statementList.addChild(item) while stream.currIsType("token", "COMMA"): stream.next() statementList.addChild(readStatement(stream, False, False)) item = statementList # go over the optional semicolon if not expressionMode and overrunSemicolon and stream.currIsType("token", "SEMICOLON"): stream.next() return item | 6b4eff8ad3cbb92b51a4215d5398e6982f74e074 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/6b4eff8ad3cbb92b51a4215d5398e6982f74e074/treegenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
3406,
261,
3256,
16,
2652,
2309,
273,
1083,
16,
5713,
318,
13185,
17280,
273,
1053,
4672,
761,
273,
599,
225,
309,
4306,
2520,
3004,
12,
3256,
16,
1053,
4672,
468,
3021,
2542,
598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
3406,
261,
3256,
16,
2652,
2309,
273,
1083,
16,
5713,
318,
13185,
17280,
273,
1053,
4672,
761,
273,
599,
225,
309,
4306,
2520,
3004,
12,
3256,
16,
1053,
4672,
468,
3021,
2542,
598,
... |
elif self.forceZero: | if self.forceZero: | def _setRange(self, dataSeries): """Set minimum and maximum axis values. | ee1f9e68639c0f3eb1bc50ae7e30f314b7cc42fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/ee1f9e68639c0f3eb1bc50ae7e30f314b7cc42fa/axes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
2655,
12,
2890,
16,
501,
6485,
4672,
3536,
694,
5224,
471,
4207,
2654,
924,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
2655,
12,
2890,
16,
501,
6485,
4672,
3536,
694,
5224,
471,
4207,
2654,
924,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
'bug_status': ['ASSIGNED', 'NEW', 'NEEDINFO', 'MODIFIED'] } | 'bug_status': ['ASSIGNED', 'NEW', 'NEEDINFO', 'MODIFIED', 'ON_DEV', 'ON_QA', 'VERIFIED', 'FAILS_QA', 'RELEASE_PENDING', 'POST'] } | def default(self, package_name, *args, **kwargs): '''Display a list of Fedora bugs against a given package.''' # Nasty, nasty hack. The packagedb, via bugz.fp.o is getting sent # requests to download files. These refused to go away even when # we fixed up the apache redirects. Send them to download.fp.o # manually. if args or kwargs: if args: url = 'http://download.fedoraproject.org/' \ + quote(package_name) \ + '/' + '/'.join([quote(a) for a in args]) elif kwargs: url = 'http://mirrors.fedoraproject.org/' \ + quote(package_name) \ + '?' + '&'.join([quote(q) + '=' + quote(v) for (q, v) in kwargs.items()]) LOG.warning('Invalid URL: redirecting: %s' % url) raise redirect(url) | c911e2ee5da4aaa888158fa3b55a62ec6a8d8384 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/c911e2ee5da4aaa888158fa3b55a62ec6a8d8384/bugs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
12,
2890,
16,
2181,
67,
529,
16,
380,
1968,
16,
2826,
4333,
4672,
9163,
4236,
279,
666,
434,
27278,
22398,
5314,
279,
864,
2181,
1093,
6309,
468,
423,
689,
93,
16,
290,
689,
93,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
12,
2890,
16,
2181,
67,
529,
16,
380,
1968,
16,
2826,
4333,
4672,
9163,
4236,
279,
666,
434,
27278,
22398,
5314,
279,
864,
2181,
1093,
6309,
468,
423,
689,
93,
16,
290,
689,
93,
... |
a1 = numpy.matrixmultiply(numpy.transpose(a),a) b1 = numpy.matrixmultiply(numpy.transpose(a),b) | a1 = numpy.dot(numpy.transpose(a),a) b1 = numpy.dot(numpy.transpose(a),b) | def direct_lstsq(a,b): a1 = numpy.matrixmultiply(numpy.transpose(a),a) b1 = numpy.matrixmultiply(numpy.transpose(a),b) return solve(a1,b1) | 9bd2ebf847b7c0e4bdf3e5d49ab67f415145df68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9bd2ebf847b7c0e4bdf3e5d49ab67f415145df68/test_basic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2657,
67,
16923,
11410,
12,
69,
16,
70,
4672,
279,
21,
273,
3972,
18,
9811,
12,
15974,
18,
2338,
4150,
12,
69,
3631,
69,
13,
324,
21,
273,
3972,
18,
9811,
12,
15974,
18,
2338,
4150,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2657,
67,
16923,
11410,
12,
69,
16,
70,
4672,
279,
21,
273,
3972,
18,
9811,
12,
15974,
18,
2338,
4150,
12,
69,
3631,
69,
13,
324,
21,
273,
3972,
18,
9811,
12,
15974,
18,
2338,
4150,
... |
self.category = None | self.name = None | def start_feature(self, tag, attrs): self.category = None self.description = [] self.location = None self.qualifiers = [] | 5fbf0c4c601b9d19c7f3735a1213ad9d9d9a2582 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/5fbf0c4c601b9d19c7f3735a1213ad9d9d9a2582/StdHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
7238,
12,
2890,
16,
1047,
16,
3422,
4672,
365,
18,
529,
273,
599,
365,
18,
3384,
273,
5378,
365,
18,
3562,
273,
599,
365,
18,
3369,
3383,
273,
5378,
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,
1,
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,
67,
7238,
12,
2890,
16,
1047,
16,
3422,
4672,
365,
18,
529,
273,
599,
365,
18,
3384,
273,
5378,
365,
18,
3562,
273,
599,
365,
18,
3369,
3383,
273,
5378,
2,
-100,
-100,
-100,
-10... |
"""Wrapper around any file that immediately flushes after write(). | '''Wrapper around any file that immediately flushes after write(). | def run(self): while True: self.finished.wait(self.interval) if self.finished.isSet(): break self.function(*self.args, **self.kwargs) | 9309008f769451c24a2114d1b377a0ccf8828835 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9837/9309008f769451c24a2114d1b377a0ccf8828835/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1323,
1053,
30,
365,
18,
13527,
18,
7048,
12,
2890,
18,
6624,
13,
309,
365,
18,
13527,
18,
291,
694,
13332,
898,
365,
18,
915,
30857,
2890,
18,
1968,
16,
2826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1323,
1053,
30,
365,
18,
13527,
18,
7048,
12,
2890,
18,
6624,
13,
309,
365,
18,
13527,
18,
291,
694,
13332,
898,
365,
18,
915,
30857,
2890,
18,
1968,
16,
2826,
... |
def install(self, tag='autotest'): | def install(self, dir = '/', tag='autotest'): | def install(self, tag='autotest'): """make install in the kernel tree""" os.chdir(self.build_dir) arch = get_file_arch('vmlinux') image = os.path.join('arch', arch, 'boot', self.build_target) force_copy(image, '/boot/vmlinuz-' + tag) force_copy('vmlinux', '/boot/vmlinux-' + tag) force_copy('System.map', '/boot/System.map-' + tag) force_copy('.config', '/boot/config-' + tag) if kernel_config.modules_needed('.config'): system('make modules_install') | 81e4661d28c8eda73a424c3a37fe6dbc6c2a2220 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/81e4661d28c8eda73a424c3a37fe6dbc6c2a2220/kernel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
2890,
16,
1577,
273,
2023,
16,
1047,
2218,
5854,
352,
395,
11,
4672,
3536,
6540,
3799,
316,
326,
5536,
2151,
8395,
1140,
18,
343,
1214,
12,
2890,
18,
3510,
67,
1214,
13,
6637... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
2890,
16,
1577,
273,
2023,
16,
1047,
2218,
5854,
352,
395,
11,
4672,
3536,
6540,
3799,
316,
326,
5536,
2151,
8395,
1140,
18,
343,
1214,
12,
2890,
18,
3510,
67,
1214,
13,
6637... |
on_failure=on_failure, sreg_request=None) | on_failure=on_failure) | def associate(request, template_name='authopenid/associate.html', openid_form=AssociateOpenID, redirect_field_name=REDIRECT_FIELD_NAME, on_failure=associate_failure, extra_context=None): """View that allow a user to associate a new openid to its account. :attr request: request object :attr template_name: string, name of template to use, 'authopenid/associate.html' by default :attr openid_form: form use enter openid url. By default ``django_authopenid.forms.AssociateOpenID`` :attr redirect_field_name: string, field name used for redirect. by default 'next' :attr on_success: callbale, function used when openid auth success :attr on_failure: callable, function used when openid auth failed. by default ``django_authopenid.views.associate_failure` :attr extra_context: A dictionary of variables to add to the template context. A callable object in this dictionary will be called to produce the end result which appears in the context. """ redirect_to = request.REQUEST.get(redirect_field_name, '') if request.POST: form = openid_form(request.user, data=request.POST) if form.is_valid(): if not redirect_to or '//' in redirect_to or ' ' in redirect_to: redirect_to = settings.LOGIN_REDIRECT_URL redirect_url = "%s%s?%s" % ( get_url_host(request), reverse('user_complete_associate'), urllib.urlencode({ redirect_field_name: redirect_to }) ) return ask_openid(request, form.cleaned_data['openid_url'], redirect_url, on_failure=on_failure, sreg_request=None) else: form = openid_form(request.user) return render(template_name, { 'form': form, redirect_field_name: redirect_to }, context_instance=_build_context(request, extra_context=extra_context)) | f63de74d31aff09ab72cd77325fdcd75548304a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5675/f63de74d31aff09ab72cd77325fdcd75548304a1/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13251,
12,
2293,
16,
1542,
67,
529,
2218,
1944,
20619,
19,
11577,
18,
2620,
2187,
21629,
67,
687,
33,
23880,
22414,
16,
3136,
67,
1518,
67,
529,
33,
25103,
67,
6776,
67,
1985,
16,
603,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13251,
12,
2293,
16,
1542,
67,
529,
2218,
1944,
20619,
19,
11577,
18,
2620,
2187,
21629,
67,
687,
33,
23880,
22414,
16,
3136,
67,
1518,
67,
529,
33,
25103,
67,
6776,
67,
1985,
16,
603,... |
if ch in u' | if ch in u' | def analyze_scalar(self, scalar): | 2e6c774c921c4f37569d6996e4a7a85f2783ae08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12018/2e6c774c921c4f37569d6996e4a7a85f2783ae08/emitter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
67,
8748,
12,
2890,
16,
4981,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
67,
8748,
12,
2890,
16,
4981,
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... |
doDelay() | doDelay(config.actionDelay) | def do (self): """ Performs the given tree.Action, with appropriate delays and logging. """ logger.log("%s on %s"%(self.name, self.node.getLogString())) if not self.node.sensitive: if config.ensureSensitivity: raise NotSensitiveError, self else: nSE = NotSensitiveError(self) logger.log("Warning: " + str(nSE)) if config.blinkOnActions: self.node.blink() result = self.__action.doAction (self.__index) doDelay() return result | 71fae84afd662de129daa7afc7d548aa91e5c63c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10139/71fae84afd662de129daa7afc7d548aa91e5c63c/tree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
261,
2890,
4672,
3536,
27391,
326,
864,
2151,
18,
1803,
16,
598,
5505,
4624,
87,
471,
2907,
18,
3536,
1194,
18,
1330,
27188,
87,
603,
738,
87,
6,
17105,
2890,
18,
529,
16,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
261,
2890,
4672,
3536,
27391,
326,
864,
2151,
18,
1803,
16,
598,
5505,
4624,
87,
471,
2907,
18,
3536,
1194,
18,
1330,
27188,
87,
603,
738,
87,
6,
17105,
2890,
18,
529,
16,
365,
... |
self.assertEqual(alt_titles[0].name, 'Fake uncontrolled non-analytic title') | self.assertEqual(alt_titles[0].name, 'Fake uncontrolled non-analytic title') | def test_alt_titles(self): t = Title.objects.get(lccn='sn83030846') alt_titles = list(t.alt_titles.all()) self.assertEqual(len(alt_titles), 2) self.assertEqual(alt_titles[0].name, 'Fake uncontrolled non-analytic title') self.assertEqual(alt_titles[1].name, 'Living issue. Prohibition') self.assertEqual(alt_titles[1].date, '1873') | bb2c83ef5cc2925ce3849d72f57aae1d9c3470d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6299/bb2c83ef5cc2925ce3849d72f57aae1d9c3470d6/title_loader_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2390,
67,
17643,
12,
2890,
4672,
268,
273,
10984,
18,
6911,
18,
588,
12,
80,
952,
82,
2218,
8134,
10261,
4630,
20,
5193,
26,
6134,
3770,
67,
17643,
273,
666,
12,
88,
18,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2390,
67,
17643,
12,
2890,
4672,
268,
273,
10984,
18,
6911,
18,
588,
12,
80,
952,
82,
2218,
8134,
10261,
4630,
20,
5193,
26,
6134,
3770,
67,
17643,
273,
666,
12,
88,
18,
23... |
self.env.log.debug("Using default plain text mimeviewer") content = content_to_unicode(self.env, content, mimetype) for line in content.splitlines(True): yield TEXT, line, (None, -1, -1) | self.log.debug("Using default plain text mimeviewer") return content_to_unicode(self.env, content, mimetype) | def render(self, context, mimetype, content, filename=None, url=None): if is_binary(content): self.env.log.debug("Binary data; no preview available") return | 91913831afa16ca7a3de2f008a07dfbd8e3b1a31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/91913831afa16ca7a3de2f008a07dfbd8e3b1a31/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
819,
16,
12595,
16,
913,
16,
1544,
33,
7036,
16,
880,
33,
7036,
4672,
309,
353,
67,
8578,
12,
1745,
4672,
365,
18,
3074,
18,
1330,
18,
4148,
2932,
5905,
501,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
819,
16,
12595,
16,
913,
16,
1544,
33,
7036,
16,
880,
33,
7036,
4672,
309,
353,
67,
8578,
12,
1745,
4672,
365,
18,
3074,
18,
1330,
18,
4148,
2932,
5905,
501,
31,
... |
str = 'ISA*00* *00* *ZZ*ZZ000 *ZZ*ZZ001 *030828*1128*U*00401*000010121*0*T*:~\n' str += 'GS*HC*ZZ000*ZZ001*20030828*1128*17*X*004010X098~\n' str += 'GE*0*555~\n' str += 'IEA*1*000010121~\n' (err_cde, err_str) = self._get_first_error(str) | str1 = 'ISA*00* *00* *ZZ*ZZ000 *ZZ*ZZ001 *030828*1128*U*00401*000010121*0*T*:~\n' str1 += 'GS*HC*ZZ000*ZZ001*20030828*1128*17*X*004010X098~\n' str1 += 'GE*0*555~\n' str1 += 'IEA*1*000010121~\n' (err_cde, err_str) = self._get_first_error(str1) | def test_GE_id_match_GS_id(self): seg = None str = 'ISA*00* *00* *ZZ*ZZ000 *ZZ*ZZ001 *030828*1128*U*00401*000010121*0*T*:~\n' str += 'GS*HC*ZZ000*ZZ001*20030828*1128*17*X*004010X098~\n' str += 'GE*0*555~\n' str += 'IEA*1*000010121~\n' (err_cde, err_str) = self._get_first_error(str) self.assertEqual(err_cde, '4', err_str) | 1433c380fc3bf2e7c5ac05b385e1b69e19134b72 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11528/1433c380fc3bf2e7c5ac05b385e1b69e19134b72/x12file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7113,
67,
350,
67,
1916,
67,
16113,
67,
350,
12,
2890,
4672,
2291,
273,
599,
609,
21,
273,
296,
5127,
37,
14,
713,
14,
1850,
380,
713,
14,
1850,
380,
27096,
14,
27096,
3784... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7113,
67,
350,
67,
1916,
67,
16113,
67,
350,
12,
2890,
4672,
2291,
273,
599,
609,
21,
273,
296,
5127,
37,
14,
713,
14,
1850,
380,
713,
14,
1850,
380,
27096,
14,
27096,
3784... |
TEST_F(GLES2DecoderTest, %(name)sValidArgs) { | TEST_F(%(test_name)s, %(name)sValidArgs) { | def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """ | 0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
1179,
2802,
4709,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
8368,
326,
1156,
2836,
1842,
364,
279,
1296,
12123,
309,
1326,
18,
967,
966,
2668,
4873,
67,
3813,
6134,
422,
1083,
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,
2598,
1179,
2802,
4709,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
8368,
326,
1156,
2836,
1842,
364,
279,
1296,
12123,
309,
1326,
18,
967,
966,
2668,
4873,
67,
3813,
6134,
422,
1083,
30,
... |
accept = accept + string.split(line[7:]) | accept = accept + string.split(line[7:], ',') | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scriptname) if not os.path.exists(scriptfile): self.send_error(404, "No such CGI script (%s)" % `scriptname`) return if not os.path.isfile(scriptfile): self.send_error(403, "CGI script is not a plain file (%s)" % `scriptname`) return if not executable(scriptfile): self.send_error(403, "CGI script is not executable (%s)" % `scriptname`) return nobody = nobody_uid() self.send_response(200, "Script output follows") self.wfile.flush() # Always flush before forking pid = os.fork() if pid != 0: # Parent pid, sts = os.waitpid(pid, 0) if sts: self.log_error("CGI script exit status x%x" % sts) return # Child try: # Reference: http://hoohoo.ncsa.uiuc.edu/cgi/env.html # XXX Much of the following could be prepared ahead of time! env = {} env['SERVER_SOFTWARE'] = self.version_string() env['SERVER_NAME'] = self.server.server_name env['GATEWAY_INTERFACE'] = 'CGI/1.1' env['SERVER_PROTOCOL'] = self.protocol_version env['SERVER_PORT'] = str(self.server.server_port) env['REQUEST_METHOD'] = self.command uqrest = urllib.unquote(rest) env['PATH_INFO'] = uqrest env['PATH_TRANSLATED'] = self.translate_path(uqrest) env['SCRIPT_NAME'] = scriptname if query: env['QUERY_STRING'] = query host = self.address_string() if host != self.client_address[0]: env['REMOTE_HOST'] = host env['REMOTE_ADDR'] = self.client_address[0] # AUTH_TYPE # REMOTE_USER # REMOTE_IDENT if self.headers.typeheader is None: env['CONTENT_TYPE'] = self.headers.type else: env['CONTENT_TYPE'] = self.headers.typeheader length = self.headers.getheader('content-length') if length: env['CONTENT_LENGTH'] = length accept = [] for line in self.headers.getallmatchingheaders('accept'): if line[:1] in string.whitespace: accept.append(string.strip(line)) else: accept = accept + string.split(line[7:]) env['HTTP_ACCEPT'] = string.joinfields(accept, ',') ua = self.headers.getheader('user-agent') if ua: env['HTTP_USER_AGENT'] = ua # XXX Other HTTP_* headers decoded_query = string.replace(query, '+', ' ') try: os.setuid(nobody) except os.error: pass os.dup2(self.rfile.fileno(), 0) os.dup2(self.wfile.fileno(), 1) print scriptfile, script, decoded_query os.execve(scriptfile, [script, decoded_query], env) except: self.server.handle_error(self.request, self.client_address) os._exit(127) | 440e6454a43fd55e1a96d5bbd5fe150383de6e94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/440e6454a43fd55e1a96d5bbd5fe150383de6e94/CGIHTTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
277,
273,
533,
18,
86,
4720,
12,
8792,
16,
6787,
13,
309,
277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
277,
273,
533,
18,
86,
4720,
12,
8792,
16,
6787,
13,
309,
277,... |
log.info2("%s: Less than 30MB of diskspace left on %s", | log.debug1("%s: Less than 30MB of diskspace left on %s", | def getFreeDiskspace(config, operations): """Check there is enough disk space for operations, a list of (operation, RpmPackage). Use RpmConfig config. Return 1 if there is enough space (with 30 MB slack), 0 otherwise (after warning the user).""" if config.ignoresize: return 1 freehash = {} # device number => [currently counted free bytes, block size] # device number => [minimal encountered free bytes, block size] minfreehash = {} dirhash = {} # directory name => device number mountpoint = { } # device number => mount point path ret = 1 if config.buildroot: br = config.buildroot else: br = "/" for (op, pkg) in operations: if op == OP_UPDATE or op == OP_INSTALL or op == OP_FRESHEN: try: pkg.reread(config.diskspacetags) except Exception, e: log.error("Error rereading package: %s: %s", pkg.source, e) return 0 dirnames = pkg["dirnames"] if dirnames == None: continue for dirname in dirnames: while dirname[-1:] == "/" and len(dirname) > 1: dirname = dirname[:-1] if dirname in dirhash: continue dnames = [] devname = br + dirname while 1: dnames.append(dirname) try: dev = os.stat(devname).st_dev break except OSError: dirname = os.path.dirname(dirname) devname = os.path.dirname(devname) if dirname in dirhash: dev = dirhash[dirname] break for d in dnames: dirhash[d] = dev if dev not in freehash: statvfs = os.statvfs(devname) freehash[dev] = [statvfs[0] * statvfs[4], statvfs[0]] minfreehash[dev] = [statvfs[0] * statvfs[4], statvfs[0]] if dev not in mountpoint: fulldir = os.path.normpath(br+"/"+dirname) while len(fulldir) > 0: if os.path.ismount(fulldir): mountpoint[dev] = dirname break dirname = os.path.dirname(dirname) fulldir = os.path.dirname(fulldir) dirindexes = pkg["dirindexes"] filesizes = pkg["filesizes"] filemodes = pkg["filemodes"] if not dirindexes or not filesizes or not filemodes: continue for i in xrange(len(dirindexes)): if not S_ISREG(filemodes[i]): continue dirname = dirnames[dirindexes[i]] while dirname[-1:] == "/" and len(dirname) > 1: dirname = dirname[:-1] dev = freehash[dirhash[dirname]] mdev = minfreehash[dirhash[dirname]] filesize = ((filesizes[i] / dev[1]) + 1) * dev[1] if op == OP_ERASE: dev[0] += filesize else: dev[0] -= filesize if mdev[0] > dev[0]: mdev[0] = dev[0] for (dev, val) in minfreehash.iteritems(): # Less than 30MB space left on device? if val[0] < 31457280: log.info2("%s: Less than 30MB of diskspace left on %s", pkg.getNEVRA(), mountpoint[dev]) pkg.close() pkg.clear(ntags=config.nevratags) for (dev, val) in minfreehash.iteritems(): if val[0] < 31457280: log.error("%sMB more diskspace required on %s for operation", 30 - val[0]/1024/1024, mountpoint[dev]) ret = 0 return ret | 3466842c6f6257837e4d27e9d3e4856c60e2a84d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/3466842c6f6257837e4d27e9d3e4856c60e2a84d/functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2812,
992,
6247,
2981,
12,
1425,
16,
5295,
4672,
3536,
1564,
1915,
353,
7304,
4234,
3476,
364,
5295,
16,
279,
666,
434,
261,
7624,
16,
534,
7755,
2261,
2934,
225,
2672,
534,
7755,
809,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2812,
992,
6247,
2981,
12,
1425,
16,
5295,
4672,
3536,
1564,
1915,
353,
7304,
4234,
3476,
364,
5295,
16,
279,
666,
434,
261,
7624,
16,
534,
7755,
2261,
2934,
225,
2672,
534,
7755,
809,
... |
if (len(sys.argv)==2): | if (len(sys.argv)>=2): | def printUsage(): sys.exit("usage: maketarball [version]") | fd27c182496512e2723009a43ea48e782fcad597 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/fd27c182496512e2723009a43ea48e782fcad597/maketarball.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
5357,
13332,
2589,
18,
8593,
2932,
9167,
30,
29796,
278,
23846,
306,
1589,
4279,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1172,
5357,
13332,
2589,
18,
8593,
2932,
9167,
30,
29796,
278,
23846,
306,
1589,
4279,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
shutil.rmtree(basedir) | _rmtree(basedir) | def _execute_build(self, build_url, fileobj): build_id = build_url and int(build_url.split('/')[-1]) or 0 xml = xmlio.parse(fileobj) try: recipe = Recipe(xml, os.path.join(self.work_dir, self.build_dir), self.config) basedir = recipe.ctxt.basedir log.debug('Running build in directory %s' % basedir) if not os.path.exists(basedir): os.mkdir(basedir) | 562e22242a2832cb4958ab3d6d3a5e81ee09460c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4547/562e22242a2832cb4958ab3d6d3a5e81ee09460c/slave.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8837,
67,
3510,
12,
2890,
16,
1361,
67,
718,
16,
17041,
4672,
1361,
67,
350,
273,
1361,
67,
718,
471,
509,
12,
3510,
67,
718,
18,
4939,
2668,
2473,
13,
18919,
21,
5717,
578,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8837,
67,
3510,
12,
2890,
16,
1361,
67,
718,
16,
17041,
4672,
1361,
67,
350,
273,
1361,
67,
718,
471,
509,
12,
3510,
67,
718,
18,
4939,
2668,
2473,
13,
18919,
21,
5717,
578,
374... |
domain=["('id', '=', context.get('company', 0))"]) | domain=["('id', 'company' in context and '=' or '!=', " \ "context.get('company', 0))"]) | def get_preferences_fields_view(self, cursor, user_id, context=None): company_obj = self.pool.get('company.company') | 114ae1744236b0f65159229feda258fed9bdb1b5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9291/114ae1744236b0f65159229feda258fed9bdb1b5/company.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
23219,
67,
2821,
67,
1945,
12,
2890,
16,
3347,
16,
729,
67,
350,
16,
819,
33,
7036,
4672,
9395,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
16840,
18,
16840,
6134,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
23219,
67,
2821,
67,
1945,
12,
2890,
16,
3347,
16,
729,
67,
350,
16,
819,
33,
7036,
4672,
9395,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
16840,
18,
16840,
6134,
2,
-100,... |
print "TCL error encountered, not pushing update to UI:" traceback.print_exc() | try: backup_notifier(-1) THREAD_UNSAFE_TK = 1 except: print "TCL error encountered, not pushing update to UI:" traceback.print_exc() | def AddMsg(message, master=None, **kwargs): """Add a message to the global queue for output.""" global global_message_queue global global_last_message new_message = Message(message, **kwargs) if new_message != global_last_message: global_message_queue.put(new_message) if master: try: master.event_generate('<<msg>>', when='tail') global_last_message = new_message except TclError: print "TCL error encountered, not pushing update to UI:" traceback.print_exc() | b43d28f4ddbd1751ad78d1fadb0ca296138f3085 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4170/b43d28f4ddbd1751ad78d1fadb0ca296138f3085/tk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
3332,
12,
2150,
16,
4171,
33,
7036,
16,
2826,
4333,
4672,
3536,
986,
279,
883,
358,
326,
2552,
2389,
364,
876,
12123,
2552,
2552,
67,
2150,
67,
4000,
2552,
2552,
67,
2722,
67,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
3332,
12,
2150,
16,
4171,
33,
7036,
16,
2826,
4333,
4672,
3536,
986,
279,
883,
358,
326,
2552,
2389,
364,
876,
12123,
2552,
2552,
67,
2150,
67,
4000,
2552,
2552,
67,
2722,
67,
21... |
self._schema = reader.readFromUrl(url) | self._schema = reader.loadFromURL(url) | def getSchema(self): """if schema is not defined, first look for a Schema class instance in parent Schema. Else if not defined resolve schemaLocation and create a new Schema class instance, and keep a hard reference. """ if not self._schema: ns = self.attributes['namespace'] schema = self._parent().getImportSchemas().get(ns) if not schema and self._parent()._parent: schema = self._parent()._parent().getImportSchemas().get(ns) if not schema: if not self.attributes.has_key('schemaLocation'): raise SchemaError, 'namespace(%s) is unknown' %ns | 1cd5c28cd8be85c8bc8e60e9d61f5b98f1008955 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/1cd5c28cd8be85c8bc8e60e9d61f5b98f1008955/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11088,
12,
2890,
4672,
3536,
430,
1963,
353,
486,
2553,
16,
1122,
2324,
364,
279,
4611,
667,
791,
316,
982,
4611,
18,
225,
16289,
309,
486,
2553,
2245,
1963,
2735,
471,
752,
279,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11088,
12,
2890,
4672,
3536,
430,
1963,
353,
486,
2553,
16,
1122,
2324,
364,
279,
4611,
667,
791,
316,
982,
4611,
18,
225,
16289,
309,
486,
2553,
2245,
1963,
2735,
471,
752,
279,
394,
... |
path = self.__resolveFileID(dir_path) | path = self.__resolveFileID( dir_path ) | def export_createDirectory( self, dir_path ): """ Creates the directory on the storage """ path = self.__resolveFileID(dir_path) gLogger.info( "StorageElementHandler.createDirectory: Attempting to create %s." % path ) if os.path.exists( path ): if os.path.isfile( path ): errStr = "Supplied path exists and is a file" gLogger.error( "StorageElementHandler.createDirectory: %s." % errStr, path ) return S_ERROR( errStr ) else: gLogger.info( "StorageElementHandler.createDirectory: %s already exists." % path ) return S_OK() # Need to think about permissions. try: os.makedirs( path ) return S_OK() except Exception, x: errStr = "Exception creating directory." gLogger.error( "StorageElementHandler.createDirectory: %s" % errStr, str( x ) ) return S_ERROR( errStr ) | 9f0650a3e23eb441883664794fa6606e35b7f93c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9f0650a3e23eb441883664794fa6606e35b7f93c/StorageElementHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
2640,
2853,
12,
365,
16,
1577,
67,
803,
262,
30,
3536,
10210,
326,
1867,
603,
326,
2502,
3536,
589,
273,
365,
16186,
10828,
812,
734,
12,
1577,
67,
803,
262,
314,
3328,
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,
3359,
67,
2640,
2853,
12,
365,
16,
1577,
67,
803,
262,
30,
3536,
10210,
326,
1867,
603,
326,
2502,
3536,
589,
273,
365,
16186,
10828,
812,
734,
12,
1577,
67,
803,
262,
314,
3328,
18,
... |
seps = _get_bothseps(p) | seps = _get_bothseps(path) | def ismount(path): """Test whether a path is a mount point (defined as root of drive)""" unc, rest = splitunc(path) seps = _get_bothseps(p) if unc: return rest in p[:0] + seps p = splitdrive(path)[1] return len(p) == 1 and p[0] in seps | 48e2478329b6be67d7858174d146d65f6ccfe728 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/48e2478329b6be67d7858174d146d65f6ccfe728/ntpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
4778,
12,
803,
4672,
3536,
4709,
2856,
279,
589,
353,
279,
5344,
1634,
261,
2178,
487,
1365,
434,
14316,
15574,
6301,
16,
3127,
273,
1416,
551,
12,
803,
13,
695,
1121,
273,
389,
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,
353,
4778,
12,
803,
4672,
3536,
4709,
2856,
279,
589,
353,
279,
5344,
1634,
261,
2178,
487,
1365,
434,
14316,
15574,
6301,
16,
3127,
273,
1416,
551,
12,
803,
13,
695,
1121,
273,
389,
5... |
container = OverlayPlotContainer(resizable='hv', bounds=[30,30]) | container = OverlayPlotContainer(fit_components='hv', bounds=[30,30]) | def test_multiple_min_size(self): comp1 = StaticPlotComponent([200, 50]) comp2 = StaticPlotComponent([60, 300]) container = OverlayPlotContainer(resizable='hv', bounds=[30,30]) container.add(comp1, comp2) container.do_layout() self.assert_tuple(container.get_preferred_size(), (200,300)) self.assert_tuple(comp1.bounds, (200,50)) self.assert_tuple(comp2.bounds, (60,300)) return | d9ae7f5b7343fdfd8fd61b2022e98f1c34fdde11 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13167/d9ae7f5b7343fdfd8fd61b2022e98f1c34fdde11/plotcontainer_test_case.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9622,
67,
1154,
67,
1467,
12,
2890,
4672,
1161,
21,
273,
10901,
11532,
1841,
3816,
6976,
16,
6437,
5717,
1161,
22,
273,
10901,
11532,
1841,
3816,
4848,
16,
11631,
5717,
1478,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9622,
67,
1154,
67,
1467,
12,
2890,
4672,
1161,
21,
273,
10901,
11532,
1841,
3816,
6976,
16,
6437,
5717,
1161,
22,
273,
10901,
11532,
1841,
3816,
4848,
16,
11631,
5717,
1478,
2... |
return t.Load( self.local( existing=1 ) ) | return T.Load( self.local( existing=1 ) ) | def load( self ): """ Try to unpickle an object from the currently valid path. @return: unpickled object @rtype: any @raise IOError: if file can not be found """ try: return t.Load( self.local( existing=1 ) ) except LocalPathError, why: raise IOError, "Cannot find file %s (constructed from %s)" %\ self.local(), str( self ) | 3c3e49363a7a3c916b648c6154d8aef255c31d3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/482/3c3e49363a7a3c916b648c6154d8aef255c31d3e/LocalPath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
365,
262,
30,
3536,
6161,
358,
640,
20847,
392,
733,
628,
326,
4551,
923,
589,
18,
225,
632,
2463,
30,
640,
11503,
1259,
733,
632,
86,
723,
30,
1281,
225,
632,
11628,
8340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
365,
262,
30,
3536,
6161,
358,
640,
20847,
392,
733,
628,
326,
4551,
923,
589,
18,
225,
632,
2463,
30,
640,
11503,
1259,
733,
632,
86,
723,
30,
1281,
225,
632,
11628,
8340,
... |
a = asarray(a) | a = asanyarray(a) | def repmat(a, m, n): """Repeat a 0-d to 2-d array mxn times """ a = asarray(a) ndim = a.ndim if ndim == 0: origrows, origcols = (1,1) elif ndim == 1: origrows, origcols = (1, a.shape[0]) else: origrows, origcols = a.shape rows = origrows * m cols = origcols * n c = a.reshape(1,a.size).repeat(m, 0).reshape(rows, origcols).repeat(n,0) return c.reshape(rows, cols) | 6d9195dfd53fc827171f2de571c2d4049c36c610 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/6d9195dfd53fc827171f2de571c2d4049c36c610/shape_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2071,
7373,
12,
69,
16,
312,
16,
290,
4672,
3536,
16750,
279,
374,
17,
72,
358,
576,
17,
72,
526,
7938,
82,
4124,
3536,
279,
273,
487,
2273,
1126,
12,
69,
13,
9209,
273,
279,
18,
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,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2071,
7373,
12,
69,
16,
312,
16,
290,
4672,
3536,
16750,
279,
374,
17,
72,
358,
576,
17,
72,
526,
7938,
82,
4124,
3536,
279,
273,
487,
2273,
1126,
12,
69,
13,
9209,
273,
279,
18,
8... |
return "lib%s%s" % (libname, self._shared_lib_ext ) | return "lib%s%s" % (libname, self._shared_lib_ext) def library_dir_option (self, dir): return "-L" + dir def library_option (self, lib): return "-l" + lib def find_library_file (self, dirs, lib): for dir in dirs: shared = os.path.join (dir, self.shared_library_filename (lib)) static = os.path.join (dir, self.library_filename (lib)) if os.path.exists (shared): return shared elif os.path.exists (static): return static else: return None | def shared_library_filename (self, libname): return "lib%s%s" % (libname, self._shared_lib_ext ) | 4fecfce4d09eca422af8ad60363bc83005b7c032 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4fecfce4d09eca422af8ad60363bc83005b7c032/unixccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5116,
67,
12083,
67,
3459,
261,
2890,
16,
2561,
529,
4672,
327,
315,
2941,
9,
87,
9,
87,
6,
738,
261,
2941,
529,
16,
365,
6315,
11574,
67,
2941,
67,
408,
262,
2,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5116,
67,
12083,
67,
3459,
261,
2890,
16,
2561,
529,
4672,
327,
315,
2941,
9,
87,
9,
87,
6,
738,
261,
2941,
529,
16,
365,
6315,
11574,
67,
2941,
67,
408,
262,
2,
-100,
-100,
-100,
... |
data=str(attr[0]) + '\n' else: for i in attr: | data=str(attr_num[0]) + '\n' elif len(attr.shape)==2: for i in attr_num: | def _print_data(self, attr): """Return a string of data | cf7384197e5f6f81fbccf787ed8a8ba4e761f074 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12567/cf7384197e5f6f81fbccf787ed8a8ba4e761f074/h5_octave.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1188,
67,
892,
12,
2890,
16,
1604,
4672,
3536,
990,
279,
533,
434,
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,
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,
1188,
67,
892,
12,
2890,
16,
1604,
4672,
3536,
990,
279,
533,
434,
501,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
print " -v Verbose" print " -f Force installation" | print " -v Verbose" print " -f Force installation" print " -D dir Set destination directory (default: site-packages)" | def _help(): print "Usage: pimp [-v] -s [package ...] List installed status" print " pimp [-v] -l [package ...] Show package information" print " pimp [-vf] -i package ... Install packages" print " pimp -d Dump database to stdout" print "Options:" print " -v Verbose" print " -f Force installation" sys.exit(1) | febcb863ca7d0946923a410edd2f9082b0ce60b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/febcb863ca7d0946923a410edd2f9082b0ce60b8/pimp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5201,
13332,
1172,
315,
5357,
30,
293,
14532,
23059,
90,
65,
300,
87,
306,
5610,
1372,
65,
225,
987,
5876,
1267,
6,
1172,
315,
4202,
293,
14532,
23059,
90,
65,
300,
80,
306,
5610,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13332,
1172,
315,
5357,
30,
293,
14532,
23059,
90,
65,
300,
87,
306,
5610,
1372,
65,
225,
987,
5876,
1267,
6,
1172,
315,
4202,
293,
14532,
23059,
90,
65,
300,
80,
306,
5610,... |
'domain':action_open.domain | 'domain': action_open.domain | def button_next(self,cr,uid,ids,context=None): user_action=self.pool.get('res.users').browse(cr,uid,uid) act_obj=self.pool.get(user_action.menu_id.type) action_ids=act_obj.search(cr,uid,[('name','=',user_action.menu_id.name)]) action_open=act_obj.browse(cr,uid,action_ids)[0] if context.get('menu',False): return{ 'view_type': action_open.view_type, 'view_id':action_open.view_id and [action_open.view_id.id] or False, 'res_model': action_open.res_model, 'type': action_open.type, 'domain':action_open.domain } return {'type':'ir.actions.act_window_close'} | 5a75ea9c7c984bc42528ae56976c533a6d679191 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/5a75ea9c7c984bc42528ae56976c533a6d679191/ir_actions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3568,
67,
4285,
12,
2890,
16,
3353,
16,
1911,
16,
2232,
16,
2472,
33,
7036,
4672,
729,
67,
1128,
33,
2890,
18,
6011,
18,
588,
2668,
455,
18,
5577,
16063,
25731,
12,
3353,
16,
1911,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3568,
67,
4285,
12,
2890,
16,
3353,
16,
1911,
16,
2232,
16,
2472,
33,
7036,
4672,
729,
67,
1128,
33,
2890,
18,
6011,
18,
588,
2668,
455,
18,
5577,
16063,
25731,
12,
3353,
16,
1911,
1... |
"""truncate(size: int = None) -> int. Truncate file to size bytes. Size defaults to the current IO position as reported by tell(). | """truncate(pos: int = None) -> int. Truncate file to pos bytes. Pos defaults to the current IO position as reported by tell(). | def truncate(self, pos: int = None) -> int: """truncate(size: int = None) -> int. Truncate file to size bytes. | d2c20fba522b910bfe0a162ea7fa01a8cfa72f66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/d2c20fba522b910bfe0a162ea7fa01a8cfa72f66/io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10310,
12,
2890,
16,
949,
30,
509,
273,
599,
13,
317,
509,
30,
3536,
27201,
12,
1467,
30,
509,
273,
599,
13,
317,
509,
18,
25869,
585,
358,
963,
1731,
18,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10310,
12,
2890,
16,
949,
30,
509,
273,
599,
13,
317,
509,
30,
3536,
27201,
12,
1467,
30,
509,
273,
599,
13,
317,
509,
18,
25869,
585,
358,
963,
1731,
18,
2,
-100,
-100,
-100,
-100,
... |
Returns the identity projection. | Returns the identity projection of the polyhedron. | def identity(self): """ Returns the identity projection. | 58a962fefc201dcfd3e2e47df0f7b0e2cedced92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/58a962fefc201dcfd3e2e47df0f7b0e2cedced92/polyhedra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4215,
12,
2890,
4672,
3536,
2860,
326,
4215,
8106,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4215,
12,
2890,
4672,
3536,
2860,
326,
4215,
8106,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
RCS-ID $Id: ArchGenXML.py,v 1.142 2004/04/21 22:14:41 yenzenz Exp $ | RCS-ID $Id: ArchGenXML.py,v 1.143 2004/04/22 00:35:45 xiru Exp $ | def generateInterface(self, outfile, element, delayed): wrt = outfile.write | 11e561caa7b3e53c1b47009a79ae485f4fdb94d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/11e561caa7b3e53c1b47009a79ae485f4fdb94d8/ArchGenXML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
1358,
12,
2890,
16,
8756,
16,
930,
16,
15278,
4672,
31565,
273,
8756,
18,
2626,
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,
2103,
1358,
12,
2890,
16,
8756,
16,
930,
16,
15278,
4672,
31565,
273,
8756,
18,
2626,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
vartypes.append(bestConstantType(val)) | vartypes.append(getType(val)) | def _getConditionKeyXXX(self, condition, condvars): """ Get the condition cache key for `condition` with `condvars`. | d1204099b3c09430a4cc096c46ac31fcce734b41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12687/d1204099b3c09430a4cc096c46ac31fcce734b41/Table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
3418,
653,
15639,
12,
2890,
16,
2269,
16,
6941,
4699,
4672,
3536,
968,
326,
2269,
1247,
498,
364,
1375,
4175,
68,
598,
1375,
10013,
4699,
8338,
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,
588,
3418,
653,
15639,
12,
2890,
16,
2269,
16,
6941,
4699,
4672,
3536,
968,
326,
2269,
1247,
498,
364,
1375,
4175,
68,
598,
1375,
10013,
4699,
8338,
2,
-100,
-100,
-100,
-100,
-100,... |
if (sys.version[:3] == '2.2' and sys.version_info[2] > 1) or (sys.version[:3] == '2.3'): | if sys.version_info[:3] > (2, 2, 1): | def close(self): # This kludges around line 545 of httplib.py, # which closes the connection in this object; # the connection remains open in the response # object. # # M2Crypto doesn't close-here-keep-open-there, # so, in effect, we don't close until the whole # business is over and gc kicks in. # # Long-running callers beware leakage. # # 05-Jan-2002: This module works with Python 2.2, # but I've not investigated if the above conditions # remain. pass | 482e6f0a4241a343d231b9c744963a648f9a9ab2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/482e6f0a4241a343d231b9c744963a648f9a9ab2/httpslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
468,
1220,
15290,
1100,
2852,
6740,
980,
1381,
7950,
434,
15851,
6673,
18,
2074,
16,
468,
1492,
13445,
326,
1459,
316,
333,
733,
31,
468,
326,
1459,
22632,
1696,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
468,
1220,
15290,
1100,
2852,
6740,
980,
1381,
7950,
434,
15851,
6673,
18,
2074,
16,
468,
1492,
13445,
326,
1459,
316,
333,
733,
31,
468,
326,
1459,
22632,
1696,
31... |
results = self.get_move_value_base(game, configuration, '--GetMoveValue') move_value = self.parse_move_value(results) if move_value is None: raise TException('failed to get move value for %s %s' % \ (game, configuration)) return GetMoveResponse(status='ok', response=move_value) | try: results = self.get_move_value_base(game, configuration, '--GetMoveValue') match = re.search(self.TUPLE_PATTERN, results) if match is None: raise GameException('failed to get move value for %s %s' % \ (game, configuration)) move_value = self.parse_move_value(match.group()) return GetMoveResponse(status='ok', response=move_value) except GameException as e: return GetMoveResponse(status='error', message=e.args[0]) | def getMoveValue(self, game, configuration): results = self.get_move_value_base(game, configuration, '--GetMoveValue') move_value = self.parse_move_value(results) if move_value is None: raise TException('failed to get move value for %s %s' % \ (game, configuration)) return GetMoveResponse(status='ok', response=move_value) | 24f22f8f8a90b473c46ce64c6ca88256701b71aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11237/24f22f8f8a90b473c46ce64c6ca88256701b71aa/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
841,
620,
12,
2890,
16,
7920,
16,
1664,
4672,
775,
30,
1686,
273,
365,
18,
588,
67,
8501,
67,
1132,
67,
1969,
12,
13957,
16,
1664,
16,
3534,
967,
7607,
620,
6134,
845,
273,
283... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
841,
620,
12,
2890,
16,
7920,
16,
1664,
4672,
775,
30,
1686,
273,
365,
18,
588,
67,
8501,
67,
1132,
67,
1969,
12,
13957,
16,
1664,
16,
3534,
967,
7607,
620,
6134,
845,
273,
283... |
xml.dom.ext.PrettyPrint(doc, file) | xml.dom.minidom.Document.toprettyxml(doc, file) | def write(self, file): """ Serialize into KML 2.0 format @param file: file object """ #root nodes doc = getDOMImplementation().createDocument(None, "kml", None) root = doc.documentElement root.setAttribute('xmlns', self.ns) #and placesmarks for place in self.places: placemark = doc.createElement('Placemark') root.appendChild(placemark) #information nodes name_text = place.getName() if (name_text != None): name = doc.createElement('name') name.appendChild(doc.createTextNode(name_text)) placemark.appendChild(name) pic = place.getDescription() if (pic != None): description = doc.createElement('description') desc = '<img src="'+pic+'" />' description.appendChild(doc.createTextNode(desc)) placemark.appendChild(description) #look at node lookAt = doc.createElement('LookAt') placemark.appendChild(lookAt) #coordinates latitude, longitude = place.getCoordinates() lat = doc.createElement('latitude') lat.appendChild(doc.createTextNode(str(latitude))) lookAt.appendChild(lat) lon = doc.createElement('longitude') lon.appendChild(doc.createTextNode(str(longitude))) lookAt.appendChild(lon) #other vars #range = doc.createElement('range') #range.appendChild(doc.createTextNode('0')) #lookAt.appendChild(range) #tilt = doc.createElement('tilt') #tilt.appendChild(doc.createTextNode('0')) #lookAt.appendChild(tilt) #heading = doc.createElement('heading') #heading.appendChild(doc.createTextNode('0')) #lookAt.appendChild(heading) #TODO: read KML specification to learn what are #point point = doc.createElement('Point') coordinates = doc.createElement('coordinates') coordinates.appendChild(doc.createTextNode(str(longitude) + ',' + str(latitude) + ',0')) point.appendChild(coordinates) placemark.appendChild(point) #and dump it in pretty xml format xml.dom.ext.PrettyPrint(doc, file) | 9e30f0b28c6d4496853ef54a9232a2a8fbb88745 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5712/9e30f0b28c6d4496853ef54a9232a2a8fbb88745/kml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
585,
4672,
3536,
14293,
1368,
1475,
1495,
576,
18,
20,
740,
225,
632,
891,
585,
30,
585,
733,
3536,
225,
468,
3085,
2199,
997,
273,
2343,
1872,
13621,
7675,
2640,
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,
1045,
12,
2890,
16,
585,
4672,
3536,
14293,
1368,
1475,
1495,
576,
18,
20,
740,
225,
632,
891,
585,
30,
585,
733,
3536,
225,
468,
3085,
2199,
997,
273,
2343,
1872,
13621,
7675,
2640,
2... |
@param id: structure ID | @param sid: structure ID | def GetStrucIdx(id): """ Get structure index by structure ID @param id: structure ID @return: -1 if bad structure ID is passed otherwise returns structure index. See GetFirstStrucIdx() for the explanation of structure indices and IDs. """ return idaapi.get_struc_idx(id) | 4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1585,
5286,
4223,
12,
350,
4672,
3536,
968,
3695,
770,
635,
3695,
1599,
225,
632,
891,
7348,
30,
3695,
1599,
225,
632,
2463,
30,
565,
300,
21,
309,
5570,
3695,
1599,
353,
2275,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1585,
5286,
4223,
12,
350,
4672,
3536,
968,
3695,
770,
635,
3695,
1599,
225,
632,
891,
7348,
30,
3695,
1599,
225,
632,
2463,
30,
565,
300,
21,
309,
5570,
3695,
1599,
353,
2275,
35... |
self.assertEqual(psutil.Process(self.proc.pid).path, sys.executable) | self.assertEqual(psutil.Process(self.proc.pid).path, PYTHON) | def test_path(self): devnull = open(os.devnull, 'r+') self.proc = subprocess.Popen(sys.executable, stdout=devnull, stderr=devnull) time.sleep(0.1) # XXX: provisional, fix needed self.assertEqual(psutil.Process(self.proc.pid).path, sys.executable) | 847d3cb18d5e0c74ad4f89a7562596550b05165c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7296/847d3cb18d5e0c74ad4f89a7562596550b05165c/test_psutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
803,
12,
2890,
4672,
4461,
2011,
273,
1696,
12,
538,
18,
5206,
2011,
16,
296,
86,
15,
6134,
365,
18,
9381,
273,
6652,
18,
52,
3190,
12,
9499,
18,
17751,
16,
3909,
33,
5206,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
803,
12,
2890,
4672,
4461,
2011,
273,
1696,
12,
538,
18,
5206,
2011,
16,
296,
86,
15,
6134,
365,
18,
9381,
273,
6652,
18,
52,
3190,
12,
9499,
18,
17751,
16,
3909,
33,
5206,... |
self.assertTrue(fnmatch(filename, pattern), | self.assertTrue(fn(filename, pattern), | def check_match(self, filename, pattern, should_match=1): if should_match: self.assertTrue(fnmatch(filename, pattern), "expected %r to match pattern %r" % (filename, pattern)) else: self.assertTrue(not fnmatch(filename, pattern), "expected %r not to match pattern %r" % (filename, pattern)) | b3375def553bbd39f1213970915bfe12e0c3aaf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/b3375def553bbd39f1213970915bfe12e0c3aaf0/test_fnmatch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1916,
12,
2890,
16,
1544,
16,
1936,
16,
1410,
67,
1916,
33,
21,
4672,
309,
1410,
67,
1916,
30,
365,
18,
11231,
5510,
12,
4293,
12,
3459,
16,
1936,
3631,
315,
3825,
738,
86,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1916,
12,
2890,
16,
1544,
16,
1936,
16,
1410,
67,
1916,
33,
21,
4672,
309,
1410,
67,
1916,
30,
365,
18,
11231,
5510,
12,
4293,
12,
3459,
16,
1936,
3631,
315,
3825,
738,
86,
... |
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND, qualname) | raise CIMError(CIM_ERR_NOT_FOUND, qualname) | def GetQualifier(self, *args, **kwargs): qualname = len(args) > 0 and args[0] or kwargs['QualifierName'] try: qual = self.qualifiers[self.default_namespace][qualname] except KeyError: if self.conn is None: raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND, qualname) qual = self.conn.GetQualifier(*args, **kwargs) return qual | d1a547f385819908b15c26774bc5fc75671b5883 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10648/d1a547f385819908b15c26774bc5fc75671b5883/mof_compiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
16185,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
4544,
529,
273,
562,
12,
1968,
13,
405,
374,
471,
833,
63,
20,
65,
578,
1205,
3292,
16185,
461,
3546,
775,
30,
4544,
273,
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,
968,
16185,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
4544,
529,
273,
562,
12,
1968,
13,
405,
374,
471,
833,
63,
20,
65,
578,
1205,
3292,
16185,
461,
3546,
775,
30,
4544,
273,
3... |
print self.test(key, capability), capability | def faultIfMissing(self, key, *capabilities): """Raise a fault if the given key doesn't match any of the given capabilities""" for capability in capabilities: print self.test(key, capability), capability if self.test(key, capability): return import xmlrpclib raise xmlrpclib.Fault("SecurityException", "One of the following capabilities are required: " + repr(capabilities)[1:-1]) | 91e97887794f336c4ca0980d8a5d3efdf30818aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/91e97887794f336c4ca0980d8a5d3efdf30818aa/Security.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12530,
2047,
4841,
12,
2890,
16,
498,
16,
380,
22140,
4672,
3536,
30570,
279,
12530,
309,
326,
864,
498,
3302,
1404,
845,
1281,
434,
326,
864,
12359,
8395,
364,
12593,
316,
12359,
30,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12530,
2047,
4841,
12,
2890,
16,
498,
16,
380,
22140,
4672,
3536,
30570,
279,
12530,
309,
326,
864,
498,
3302,
1404,
845,
1281,
434,
326,
864,
12359,
8395,
364,
12593,
316,
12359,
30,
30... | |
new_entry.category.append( gdata.atom.Category(scheme=gdata.docs.service.DATA_KIND_SCHEME, term=gdata.docs.service.DOCUMENT_KIND_TERM, label='document')) self.created_entry = self.doclist.Post(new_entry, '/feeds/documents/private/full') | new_entry.category.append(self.DOCUMENT_CATEGORY) self.created_entry = self.client.Post(new_entry, '/feeds/documents/private/full') | def setUp(self): client_login() self.doclist = client self.TITLE = 'CreatedTestDoc' new_entry = gdata.docs.DocumentListEntry() new_entry.title = gdata.atom.Title(text=self.TITLE) new_entry.category.append( gdata.atom.Category(scheme=gdata.docs.service.DATA_KIND_SCHEME, term=gdata.docs.service.DOCUMENT_KIND_TERM, label='document')) self.created_entry = self.doclist.Post(new_entry, '/feeds/documents/private/full') | dcc46816af19bac967f4b588353a3ee4514dd5d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6580/dcc46816af19bac967f4b588353a3ee4514dd5d2/service_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
1004,
67,
5819,
1435,
365,
18,
2434,
1098,
273,
1004,
365,
18,
14123,
273,
296,
6119,
4709,
1759,
11,
394,
67,
4099,
273,
314,
892,
18,
8532,
18,
2519,
27899,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
1004,
67,
5819,
1435,
365,
18,
2434,
1098,
273,
1004,
365,
18,
14123,
273,
296,
6119,
4709,
1759,
11,
394,
67,
4099,
273,
314,
892,
18,
8532,
18,
2519,
27899,
14... |
self["title"] = unicode(self["title"].strip()) self["author"] = unicode(self["author"]) | self["title"] = self["title"].strip() self["author"] = self["author"] | def __init__(self, src): dict.__init__(self, src) if not self.has_key("author") or len(self["author"].rstrip()) == 0: self["author"] = u"Unknown" self["title"] = unicode(self["title"].strip()) self["author"] = unicode(self["author"]) | 00ae3e2193e6f30bd360a67471d4019580cfe35f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9125/00ae3e2193e6f30bd360a67471d4019580cfe35f/communicate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1705,
4672,
2065,
16186,
2738,
972,
12,
2890,
16,
1705,
13,
309,
486,
365,
18,
5332,
67,
856,
2932,
4161,
7923,
578,
562,
12,
2890,
9614,
4161,
6,
8009,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1705,
4672,
2065,
16186,
2738,
972,
12,
2890,
16,
1705,
13,
309,
486,
365,
18,
5332,
67,
856,
2932,
4161,
7923,
578,
562,
12,
2890,
9614,
4161,
6,
8009,
... |
if version != "$Id: bwmon.py,v 1.8 2007/02/14 19:49:03 faiyaza Exp $": | if version != "$Id: bwmon.py,v 1.9 2007/02/26 17:52:08 faiyaza Exp $": | def GetSlivers(data): # Defaults global datafile, \ period, \ default_MaxRate, \ default_Maxi2Rate, \ default_MinRate, \ default_MaxKByte,\ default_ThreshKByte,\ default_Maxi2KByte,\ default_Threshi2KByte,\ default_Share,\ verbose verbose = True # All slices names = [] try: f = open(datafile, "r+") if verbose: logger.log("bwmon: Loading %s" % datafile) (version, slices) = pickle.load(f) f.close() # Check version of data file if version != "$Id: bwmon.py,v 1.8 2007/02/14 19:49:03 faiyaza Exp $": logger.log("bwmon: Not using old version '%s' data file %s" % (version, datafile)) raise Exception except Exception: version = "$Id: bwmon.py,v 1.8 2007/02/14 19:49:03 faiyaza Exp $" slices = {} # Get/set special slice IDs root_xid = bwlimit.get_xid("root") default_xid = bwlimit.get_xid("default") if root_xid not in slices.keys(): slices[root_xid] = Slice(root_xid, "root", data) slices[root_xid].reset(0, 0, 0, 0, data) if default_xid not in slices.keys(): slices[default_xid] = Slice(default_xid, "default", data) slices[default_xid].reset(0, 0, 0, 0, data) live = {} # Get running slivers. {xid: name} for sliver in data['slivers']: live[bwlimit.get_xid(sliver['name'])] = sliver['name'] # Setup new slices. # live.xids - runing.xids = new.xids newslicesxids = Set(live.keys()) - Set(slices.keys()) for newslicexid in newslicesxids: if newslicexid != None: logger.log("bwmon: New Slice %s" % live[newslicexid]) slices[newslicexid] = Slice(newslicexid, live[newslicexid], data) slices[newslicexid].reset(0, 0, 0, 0, data) else: logger.log("bwmon Slice %s doesn't have xid. Must be delegated. Skipping." % live[newslicexid]) # Get actual running values from tc. # Update slice totals and bandwidth. for params in bwlimit.get(): (xid, share, minrate, maxrate, minexemptrate, maxexemptrate, usedbytes, usedi2bytes) = params # Ignore root and default buckets if xid == root_xid or xid == default_xid: continue name = bwlimit.get_slice(xid) if name is None: # Orphaned (not associated with a slice) class name = "%d?" % xid bwlimit.off(xid) # Monitor only the specified slices if names and name not in names: continue #slices is populated from the pickle file #xid is populated from bwlimit (read from /etc/passwd) if slices.has_key(xid): slice = slices[xid] if time.time() >= (slice.time + period) or \ usedbytes < slice.bytes or usedi2bytes < slice.i2bytes: # Reset to defaults every 24 hours or if it appears # that the byte counters have overflowed (or, more # likely, the node was restarted or the HTB buckets # were re-initialized). slice.reset(maxrate, maxexemptrate, usedbytes, usedi2bytes, data) else: # Update byte counts slice.update(maxrate, maxexemptrate, usedbytes, usedi2bytes, data) else: # Just in case. Probably (hopefully) this will never happen. # New slice, initialize state if verbose: logger.log("bwmon: New Slice %s" % name) slice = slices[xid] = Slice(xid, name, data) slice.reset(maxrate, maxexemptrate, usedbytes, usedi2bytes, data) # Delete dead slices dead = Set(slices.keys()) - Set(live.keys()) for xid in dead: if xid == root_xid or xid == default_xid: continue del slices[xid] bwlimit.off(xid) logger.log("bwmon: Saving %s" % datafile) f = open(datafile, "w") pickle.dump((version, slices), f) f.close() | c643a25334b931223c7695f3d49a5d8444c972a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6995/c643a25334b931223c7695f3d49a5d8444c972a3/bwmon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3738,
6760,
12,
892,
4672,
468,
14159,
2552,
30682,
16,
521,
3879,
16,
521,
805,
67,
2747,
4727,
16,
521,
805,
67,
2747,
77,
22,
4727,
16,
521,
805,
67,
2930,
4727,
16,
521,
805... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3738,
6760,
12,
892,
4672,
468,
14159,
2552,
30682,
16,
521,
3879,
16,
521,
805,
67,
2747,
4727,
16,
521,
805,
67,
2747,
77,
22,
4727,
16,
521,
805,
67,
2930,
4727,
16,
521,
805... |
for i in os.listdir("/proc/acpi/fan"): file = open("/proc/acpi/fan/"+i+"/state") line = file.readline() while len(line) != 0: if line.find("status") == 0: if line.split(":")[1].strip() == 'on': self.fans[i] = FAN_ON else: self.fans[i] = FAN_OFF | try: for i in os.listdir("/proc/acpi/fan"): file = open("/proc/acpi/fan/"+i+"/state") | def update_fans(self): """Read current state of fans""" for i in os.listdir("/proc/acpi/fan"): file = open("/proc/acpi/fan/"+i+"/state") line = file.readline() while len(line) != 0: if line.find("status") == 0: if line.split(":")[1].strip() == 'on': self.fans[i] = FAN_ON else: self.fans[i] = FAN_OFF line = file.readline() file.close() | a5f2d35e0da5172061e926554430e102d2600a96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2969/a5f2d35e0da5172061e926554430e102d2600a96/acpi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
74,
634,
12,
2890,
4672,
3536,
1994,
783,
919,
434,
284,
634,
8395,
225,
775,
30,
364,
277,
316,
1140,
18,
1098,
1214,
2932,
19,
9381,
19,
1077,
7259,
19,
74,
304,
6,
4672,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
74,
634,
12,
2890,
4672,
3536,
1994,
783,
919,
434,
284,
634,
8395,
225,
775,
30,
364,
277,
316,
1140,
18,
1098,
1214,
2932,
19,
9381,
19,
1077,
7259,
19,
74,
304,
6,
4672,... |
(user_id, int(time.gmtime())) | (user_id, int(time.time())) | 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,... |
id = int(wsgilib.path_info_pop(environ)) | id = int(request.path_info_pop(environ)) if id not in self.debug_infos: start_response( '500 Server Error', [('Content-type', 'text/html')]) return [ "Traceback by id %s does not exist (maybe " "the server has been restarted?)" % id] | def view(self, environ, start_response): id = int(wsgilib.path_info_pop(environ)) debug_info = self.debug_infos[id] return debug_info.wsgi_application(environ, start_response) | 716647d2cc92a0a6ec1b13946df1d45df584289a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/716647d2cc92a0a6ec1b13946df1d45df584289a/middleware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1476,
12,
2890,
16,
5473,
16,
787,
67,
2740,
4672,
612,
273,
509,
12,
2293,
18,
803,
67,
1376,
67,
5120,
12,
28684,
3719,
309,
612,
486,
316,
365,
18,
4148,
67,
18227,
30,
787,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1476,
12,
2890,
16,
5473,
16,
787,
67,
2740,
4672,
612,
273,
509,
12,
2293,
18,
803,
67,
1376,
67,
5120,
12,
28684,
3719,
309,
612,
486,
316,
365,
18,
4148,
67,
18227,
30,
787,
67,
... |
This function was giving by Magnus Lie Hetland. It calculates the gap (mathematical distance) between two strings with the cost of word's translation inside the string. | second_text = """ toto is here Monsieur | def gap(self, a, b): """ This function was giving by Magnus Lie Hetland. It calculates the gap (mathematical distance) between two strings with the cost of word's translation inside the string. """ c = {} n = len(a); m = len(b) for i in range(0,n+1): c[i,0] = i for j in range(0,m+1): c[0,j] = j for i in range(1,n+1): for j in range(1,m+1): x = c[i-1,j] + 1 y = c[i,j-1] + 1 if a[i-1] == b[j-1]: z = c[i-1,j-1] else: z = c[i-1,j-1] + 1 c[i,j] = min(x,y,z) return c[n,m] | dfb1988a57a8adf0d004b7d809532c37a030fb65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/dfb1988a57a8adf0d004b7d809532c37a030fb65/test_fuzzy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9300,
12,
2890,
16,
279,
16,
324,
4672,
3536,
2205,
67,
955,
273,
3536,
268,
6302,
353,
2674,
490,
7008,
1385,
295,
3536,
276,
273,
2618,
290,
273,
562,
12,
69,
1769,
312,
273,
562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9300,
12,
2890,
16,
279,
16,
324,
4672,
3536,
2205,
67,
955,
273,
3536,
268,
6302,
353,
2674,
490,
7008,
1385,
295,
3536,
276,
273,
2618,
290,
273,
562,
12,
69,
1769,
312,
273,
562,
... |
todo("I'm pretty sure os.linesep is not used correctly here") | todo("I'm not sure os.linesep is used correctly here") | def readstring(self, lines): todo("I'm pretty sure os.linesep is not used correctly here") lines = lines.split(os.linesep) numAtoms = string.atoi(lines[0]) lines = lines[2:] for i in range(numAtoms): a = Atom() element, x, y, z = lines[i].split() a.elem = _PeriodicTable.index(element) a.x, a.y, a.z = map(string.atof, (x, y, z)) self.atoms.append(a) | d8253a5fb8c033f5e20918f247c4cc6ff8a2deb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/d8253a5fb8c033f5e20918f247c4cc6ff8a2deb6/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
1080,
12,
2890,
16,
2362,
4672,
10621,
2932,
45,
17784,
486,
3071,
1140,
18,
3548,
881,
353,
1399,
8783,
2674,
7923,
2362,
273,
2362,
18,
4939,
12,
538,
18,
3548,
881,
13,
818,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
1080,
12,
2890,
16,
2362,
4672,
10621,
2932,
45,
17784,
486,
3071,
1140,
18,
3548,
881,
353,
1399,
8783,
2674,
7923,
2362,
273,
2362,
18,
4939,
12,
538,
18,
3548,
881,
13,
818,
14... |
or publicId.startswith( | or startswithany(publicId, | def processDoctype(self, token): name = token["name"] publicId = token["publicId"] systemId = token["systemId"] correct = token["correct"] | f03b9349aa9f0e3c2fe9368e44e2c7cafc144896 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4487/f03b9349aa9f0e3c2fe9368e44e2c7cafc144896/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
3244,
12387,
12,
2890,
16,
1147,
4672,
508,
273,
1147,
9614,
529,
11929,
1071,
548,
273,
1147,
9614,
482,
548,
11929,
30083,
273,
1147,
9614,
4299,
548,
11929,
3434,
273,
1147,
9614,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
3244,
12387,
12,
2890,
16,
1147,
4672,
508,
273,
1147,
9614,
529,
11929,
1071,
548,
273,
1147,
9614,
482,
548,
11929,
30083,
273,
1147,
9614,
4299,
548,
11929,
3434,
273,
1147,
9614,... |
return names def _filter_suite_name(self, name): tokens = name.split('.') | def _filter_suite_name(self, long, short): tokens = short.split('.') | def _filter_suite_names(self, names): names = [ self._filter_suite_name(name) for name in names ] if names.count(True) > 0: return [] return names | ec4e173743785708e87eff7e6a2e244a52e0b07b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/ec4e173743785708e87eff7e6a2e244a52e0b07b/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2188,
67,
30676,
67,
1973,
12,
2890,
16,
1257,
4672,
1257,
273,
306,
365,
6315,
2188,
67,
30676,
67,
529,
12,
529,
13,
364,
508,
316,
1257,
308,
309,
1257,
18,
1883,
12,
5510,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2188,
67,
30676,
67,
1973,
12,
2890,
16,
1257,
4672,
1257,
273,
306,
365,
6315,
2188,
67,
30676,
67,
529,
12,
529,
13,
364,
508,
316,
1257,
308,
309,
1257,
18,
1883,
12,
5510,
1... |
"performer", "discnumber"] else: self.limit = True can = can_change | "performer", "discnumber"] else: can = can_change | def __init__(self, parent, can_change): if can_change == True: self.limit = False can = ["title", "version", "artist", "album", "performer", "discnumber"] else: self.limit = True can = can_change can.sort() | 44deb3636adb3eb180d1cc44ce811a1cb782bb80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/44deb3636adb3eb180d1cc44ce811a1cb782bb80/widgets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
848,
67,
3427,
4672,
309,
848,
67,
3427,
422,
1053,
30,
365,
18,
3595,
273,
1083,
848,
273,
8247,
2649,
3113,
315,
1589,
3113,
315,
25737,
3113,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
848,
67,
3427,
4672,
309,
848,
67,
3427,
422,
1053,
30,
365,
18,
3595,
273,
1083,
848,
273,
8247,
2649,
3113,
315,
1589,
3113,
315,
25737,
3113,... |
res = self.__setTaskParameterValue(transID, taskID, 'ExternalStatus', status, connection=connection) | res = self.__setTaskParameterValue( transID, taskID, 'ExternalStatus', status, connection = connection ) | def setTaskStatus(self,transName,taskID,status,connection=False): """ Set status for job with taskID in production with transformationID """ res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] if type(taskID) != ListType: taskIDList = [taskID] else: taskIDList = list(taskID) for taskID in taskIDList: res = self.__setTaskParameterValue(transID, taskID, 'ExternalStatus', status, connection=connection) if not res['OK']: return res return S_OK() | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2174,
1482,
12,
2890,
16,
2338,
461,
16,
4146,
734,
16,
2327,
16,
4071,
33,
8381,
4672,
3536,
1000,
1267,
364,
1719,
598,
29772,
316,
12449,
598,
8620,
734,
3536,
400,
273,
365,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2174,
1482,
12,
2890,
16,
2338,
461,
16,
4146,
734,
16,
2327,
16,
4071,
33,
8381,
4672,
3536,
1000,
1267,
364,
1719,
598,
29772,
316,
12449,
598,
8620,
734,
3536,
400,
273,
365,
6... |
props, dummy = parsePropsFromForm(self.db, cl, self.form) | props = parsePropsFromForm(self.db, cl, self.form) | def newuser_action(self, message=None): '''Attempt to create a new user based on the contents of the form and then set the cookie. | 3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
1355,
67,
1128,
12,
2890,
16,
883,
33,
7036,
4672,
9163,
7744,
358,
752,
279,
394,
729,
2511,
603,
326,
2939,
434,
326,
646,
471,
1508,
444,
326,
3878,
18,
2,
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,
1,
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,
394,
1355,
67,
1128,
12,
2890,
16,
883,
33,
7036,
4672,
9163,
7744,
358,
752,
279,
394,
729,
2511,
603,
326,
2939,
434,
326,
646,
471,
1508,
444,
326,
3878,
18,
2,
-100,
-100,
-100,
... |
RemoveFile(filename) | DebugPrint(1, 'Bundle response indicates success, ' + filename + ' will be deleted') RemoveRecordFile(filename) | def ProcessBundle(bundle): global failedSendCount global suppressedCount global successfulSendCount global successfulReprocessCount global successfulHandshakes global failedHandshakes global failedReprocessCount global successfulBundleCount global failedBundleCount global BundleSize responseString = "" # Loop through and try to send any outstanding records bundleData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \ "<RecordEnvelope>\n" for item in bundle.content: if __connectionError: # Fail record without attempting to send. failedBundleCount += 1 continue xmlData = None filename = item[0] xmlData = item[1] DebugPrint(1, 'Processing bundle file: ' + filename) if ( xmlData == ''): # Read the contents of the file into a string of xml try: in_file = open(filename,"r") xmlData = in_file.read() in_file.close() except: DebugPrint(1, 'Processing bundle failure: unable to read file' + filename) responseString = responseString + '\nUnable to read from ' + filename failedBundleCount += 1 continue if not xmlData: DebugPrint(1, 'Processing bundle failure: ' + filename + ' was empty: skip send') responseString = responseString + '\nEmpty file ' + filename + ': XML not sent' failedBundleCount += 1 continue xmlData = __xmlintroRemove.sub('',xmlData) bundleData = bundleData + xmlData + "\n"; #if (len(bundleData)==0): # bundleData = xmlData #else: # bundleData = bundleData + '|' + xmlData bundleData = bundleData + "</RecordEnvelope>" # Send the xml to the collector for processing response = __sendUsageXML(Config.get_ProbeName(), bundleData, "multiupdate") DebugPrint(1, 'Processing bundle Response: ' + response.get_message()) if (response.get_message() == "Error: Unknown Command: multiupdate or Invalid Arg Count: 1"): DebugPrint(0, "Collector is too old to handle 'bundles', reverting to sending individual records.") BundleSize = 0 bundle.clear() if (bundle.nHandshakes > 0): Handshake() else: SearchOutstandingRecord() Reprocess() return "Bundling has been canceled." responseString = 'Processed bundle with ' + str(bundle.nItems) + ' records: ' + response.get_message() # Determine if the call succeeded, and remove the file if it did if response.get_code() == 0: successfulSendCount += bundle.nRecords successfulHandshakes += bundle.nHandshakes successfulReprocessCount += bundle.nReprocessed successfulBundleCount += 1 for item in bundle.content: filename = item[0] if (filename != ''): RemoveFile(filename) responseString = 'OK - ' + responseString else: DebugPrint(1, 'Response indicates failure, the following files will not be deleted:') for item in bundle.content: filename = item[0] if (filename != ''): DebugPrint(1, ' ' + filename) failedSendCount += bundle.nRecords failedHandshakes += bundle.nHandshakes failedReprocessCount += bundle.nReprocessed failedBundleCount += 1 bundle.clear() #if responseString != "": # DebugPrint(0, responseString) return (responseString,response) | afa5b9e606e09a707c71dbf4e8fb865d25aa5dd9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/afa5b9e606e09a707c71dbf4e8fb865d25aa5dd9/Gratia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
3405,
12,
9991,
4672,
2552,
2535,
3826,
1380,
2552,
24448,
1380,
2552,
6873,
3826,
1380,
2552,
6873,
426,
2567,
1380,
2552,
6873,
1144,
674,
3223,
2552,
2535,
1144,
674,
3223,
2552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
3405,
12,
9991,
4672,
2552,
2535,
3826,
1380,
2552,
24448,
1380,
2552,
6873,
3826,
1380,
2552,
6873,
426,
2567,
1380,
2552,
6873,
1144,
674,
3223,
2552,
2535,
1144,
674,
3223,
2552,
... |
Retrun the version of the current state of the repository -- a tagged version, if present, or the next version based on prior tagged releases. """ return str(self.get_tagged_version()) or self.get_next_version(increment) | Return as a string the version of the current state of the repository -- a tagged version, if present, or the next version based on prior tagged releases. """ ver = self.get_tagged_version() or self.get_next_version(increment) return str(ver) | def get_current_version(self, increment=None): """ Retrun the version of the current state of the repository -- a tagged version, if present, or the next version based on prior tagged releases. """ return str(self.get_tagged_version()) or self.get_next_version(increment) | e305d484aa2294b4f486a574edcd9ecbe9dea495 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/833/e305d484aa2294b4f486a574edcd9ecbe9dea495/hgtools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2972,
67,
1589,
12,
2890,
16,
5504,
33,
7036,
4672,
3536,
17100,
2681,
326,
1177,
434,
326,
783,
919,
434,
326,
3352,
1493,
279,
12503,
1177,
16,
309,
3430,
16,
578,
326,
1024... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2972,
67,
1589,
12,
2890,
16,
5504,
33,
7036,
4672,
3536,
17100,
2681,
326,
1177,
434,
326,
783,
919,
434,
326,
3352,
1493,
279,
12503,
1177,
16,
309,
3430,
16,
578,
326,
1024... |
cChannel(14,'Eurosport',dagen).xml() | def main(): try: opts, args = getopt.getopt(sys.argv[1:], "hd:", ["help", "days="]) except getopt.GetoptError: # print help information and exit: usage() sys.exit(2) dagen = 2 for o, a in opts: if o in ("-h", "--help"): print "help" usage() sys.exit() if o in ("-d", "--days"): dagen = int(a) print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" print "<tv generator-info-name=\"Script by Bart Heremans, fixes,testing and debuging by den_RDC\">" cChannel(1,'TV1',dagen).xml() cChannel(2,'Ketnet',dagen).xml() cChannel(3,'Canvas',dagen).xml() cChannel(4,'VTM',dagen).xml() cChannel(5,'Kanaal2',dagen).xml() cChannel(6,'VT4',dagen).xml() cChannel(7,'Vitaya',dagen).xml() #cChannel(8,'EventTV',dagen).xml() #LibertyTV #cChannel(9,'KanaalZ',dagen).xml() #cChannel(10,'NBC',dagen).xml() cChannel(11,'Ned1',dagen).xml() cChannel(12,'Ned2',dagen).xml() cChannel(13,'Ned3',dagen).xml() cChannel(14,'Eurosport',dagen).xml() #cChannel(15,'Canal+',dagen).xml() #cChannel(16,'Canal+Blauw',dagen).xml() cChannel(17,'RTBF1',dagen).xml() cChannel(18,'RTBF2',dagen).xml() print "</tv>" | 9392fbfdf763574a03e1401669d97418d30dd72e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/9392fbfdf763574a03e1401669d97418d30dd72e/xml_tv_be.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
22057,
2773,
16,
8247,
5201,
3113,
315,
9810,
1546,
5717,
1335,
336... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
22057,
2773,
16,
8247,
5201,
3113,
315,
9810,
1546,
5717,
1335,
336... | |
locals = codeBlock.localnames() if name in locals: | if name in codeBlock.locals: | def getNameSig(self, name, method, module, codeBlock=None): if codeBlock: locals = codeBlock.localnames() if name in locals: objType = codeBlock.locals[name].objtype res = self.getTypeSig(objType, method, module) if res is not None: return res if name in module.globals: objType = module.globals[name].signature res = self.getTypeSig(objType, method, module) if res is not None: return res return None | 0df8901faaa945bd36510b4a339f64decaa407d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/0df8901faaa945bd36510b4a339f64decaa407d8/PySourceView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1723,
8267,
12,
2890,
16,
508,
16,
707,
16,
1605,
16,
981,
1768,
33,
7036,
4672,
309,
981,
1768,
30,
309,
508,
316,
981,
1768,
18,
17977,
30,
30078,
273,
981,
1768,
18,
17977,
63,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1723,
8267,
12,
2890,
16,
508,
16,
707,
16,
1605,
16,
981,
1768,
33,
7036,
4672,
309,
981,
1768,
30,
309,
508,
316,
981,
1768,
18,
17977,
30,
30078,
273,
981,
1768,
18,
17977,
63,
52... |
log.debug("Got %i peaks" % len(peakvalues)) | def updateLevels(self): #log.debug("CrossbarRouter.updateLevels()") peakvalues = self.interface.getPeakValues() log.debug("Got %i peaks" % len(peakvalues)) for peak in peakvalues: #log.debug("peak = [%s,%s]" % (str(peak[0]),str(peak[1]))) if peak[0] >= 0: self.switchers[peak[0]].peakValue(peak[1]) | a834ac8f78498fcf90df29f1292bb2a69310cc01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11526/a834ac8f78498fcf90df29f1292bb2a69310cc01/crossbarrouter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12240,
12,
2890,
4672,
468,
1330,
18,
4148,
2932,
13941,
3215,
8259,
18,
2725,
12240,
1435,
7923,
11148,
2372,
273,
365,
18,
5831,
18,
588,
11227,
581,
1972,
1435,
225,
364,
11148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12240,
12,
2890,
4672,
468,
1330,
18,
4148,
2932,
13941,
3215,
8259,
18,
2725,
12240,
1435,
7923,
11148,
2372,
273,
365,
18,
5831,
18,
588,
11227,
581,
1972,
1435,
225,
364,
11148,
... | |
return offset.resolve(uri.path) | value = offset.resolve(uri.path) return str(value) | def resolve_pointer(uri, offset): if not uri.scheme and not uri.authority: if uri.path.is_relative(): if uri.path or str(uri) == '.': # XXX Here we loss the query and fragment. return offset.resolve(uri.path) return URI.encode(uri) | 1fcd13d9c1448035bfc6c24984c75c59aa03620b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/1fcd13d9c1448035bfc6c24984c75c59aa03620b/XHTML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
67,
10437,
12,
1650,
16,
1384,
4672,
309,
486,
2003,
18,
9068,
471,
486,
2003,
18,
24763,
30,
309,
2003,
18,
803,
18,
291,
67,
11626,
13332,
309,
2003,
18,
803,
578,
609,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
67,
10437,
12,
1650,
16,
1384,
4672,
309,
486,
2003,
18,
9068,
471,
486,
2003,
18,
24763,
30,
309,
2003,
18,
803,
18,
291,
67,
11626,
13332,
309,
2003,
18,
803,
578,
609,
12,
1... |
self.conn = self.connect() cursor = self.conn.cursor() except MySQLdb.Error: self.conn = self.connect(invalidate = True) | cursor = self.conn.cursor() except MySQLdb.Error: self.conn = self.connect() self.redo() | def getJobList(self, datasetName): """ __getJobList__ Get the list of merge jobs started on a dataset Arguments: datasetName -- the name of the dataset Return: the list of merge jobs | f6d38da4b0910650112bd5df8a6e148fb35b760b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/f6d38da4b0910650112bd5df8a6e148fb35b760b/MergeSensorDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13024,
682,
12,
2890,
16,
3709,
461,
4672,
3536,
1001,
588,
2278,
682,
972,
225,
968,
326,
666,
434,
2691,
6550,
5746,
603,
279,
3709,
225,
13599,
30,
225,
3709,
461,
1493,
326,
508,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13024,
682,
12,
2890,
16,
3709,
461,
4672,
3536,
1001,
588,
2278,
682,
972,
225,
968,
326,
666,
434,
2691,
6550,
5746,
603,
279,
3709,
225,
13599,
30,
225,
3709,
461,
1493,
326,
508,
4... |
elif mediawiki_messages.has('nocreatetitle', self.site() and text.find(mediawiki_messages.get('nocreatetitle', self.site())) != -1: | elif mediawiki_messages.has('nocreatetitle', self.site()) and text.find(mediawiki_messages.get('nocreatetitle', self.site())) != -1: | def getEditPage(self, get_redirect=False, throttle = True, sysop = False, oldid = None, nofollow_redirects = False): """ Get the contents of the Page via the edit page. Do not use this directly, use get() instead. | 62f7b07f97668b8f0aa6492e3a5f0c354242e544 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/62f7b07f97668b8f0aa6492e3a5f0c354242e544/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21221,
1964,
12,
2890,
16,
336,
67,
7590,
33,
8381,
16,
18304,
273,
1053,
16,
2589,
556,
273,
1083,
16,
1592,
350,
273,
599,
16,
290,
792,
2392,
67,
22715,
273,
1083,
4672,
3536,
968,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21221,
1964,
12,
2890,
16,
336,
67,
7590,
33,
8381,
16,
18304,
273,
1053,
16,
2589,
556,
273,
1083,
16,
1592,
350,
273,
599,
16,
290,
792,
2392,
67,
22715,
273,
1083,
4672,
3536,
968,
... |
if limit > config.special_page_limit: | if tllimit > config.special_page_limit: | def getTemplates(self, tllimit = 5000): #action=query&prop=templates&titles=Main Page """ Returns the templates that are used in the page given by API. | 5b4eba27ca9896e541a10413df7bc89db4c600e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/5b4eba27ca9896e541a10413df7bc89db4c600e3/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
8218,
12,
2890,
16,
268,
2906,
1038,
273,
20190,
4672,
468,
1128,
33,
2271,
10,
5986,
33,
8502,
10,
17643,
33,
6376,
3460,
3536,
2860,
326,
5539,
716,
854,
1399,
316,
326,
1363,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
8218,
12,
2890,
16,
268,
2906,
1038,
273,
20190,
4672,
468,
1128,
33,
2271,
10,
5986,
33,
8502,
10,
17643,
33,
6376,
3460,
3536,
2860,
326,
5539,
716,
854,
1399,
316,
326,
1363,
8... |
"""Write data to the RLE-coder in suitably large chunks""" def __init__(self, ofp): | """Write data to the RLE-coder in suitably large chunks""" def __init__(self, ofp): | def close(self): | a220e67a9ed94d66b81e393a3bb9e6acd10068c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a220e67a9ed94d66b81e393a3bb9e6acd10068c1/binhex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
T11, T22, T33, T12, T13, T23, L11, L22, L33, L12, L13, L23, S1133, S2211, S12, S13, S23, S21, S31, S32 = ( j,1+j,2+j,3+j,4+j,5+j,6+j,7+j,8+j,9+j,10+j,11+j,12+j,13+j,14+j,15+j,16+j,17+j,18+j,19+j) | T11, T22, T33, T12, T13, T23, L11, L22, L33, L12, L13, L23, \ S1133, S2211, S12, S13, S23, S21, S31, S32 = ( j,1+j,2+j,3+j,4+j,5+j,6+j,7+j,8+j,9+j,10+j,11+j,12+j,13+j,14+j,15+j, 16+j,17+j,18+j,19+j) | def set_TLS_A(A, i, j, x, y, z, w): """Sets the six rows of matrix A starting at A[i,j] with the TLS coefficents for an atom located at position x,y,z with least-squares weight w. Matrix A is filled to row i+6 and column j+20. """ ## use label indexing to avoid confusion! T11, T22, T33, T12, T13, T23, L11, L22, L33, L12, L13, L23, S1133, S2211, S12, S13, S23, S21, S31, S32 = ( j,1+j,2+j,3+j,4+j,5+j,6+j,7+j,8+j,9+j,10+j,11+j,12+j,13+j,14+j,15+j,16+j,17+j,18+j,19+j) ## indices of the components of U U11 = i U22 = U11 + 1 U33 = U11 + 2 U12 = U11 + 3 U13 = U11 + 4 U23 = U11 + 5 ## C Matrix xx = x*x yy = y*y zz = z*z xy = x*y xz = x*z yz = y*z A[U11, T11] = w * 1.0 A[U11, L22] = w * zz A[U11, L33] = w * yy A[U11, L23] = w * -2.0 * yz A[U11, S31] = w * -2.0 * y A[U11, S21] = w * 2.0 * z A[U22, T22] = w * 1.0 A[U22, L11] = w * zz A[U22, L33] = w * xx A[U22, L13] = w * -2.0 * xz A[U22, S12] = w * -2.0 * z A[U22, S32] = w * 2.0 * x A[U33, T33] = w * 1.0 A[U33, L11] = w * yy A[U33, L22] = w * xx A[U33, L12] = w * -2.0 * xy A[U33, S23] = w * -2.0 * x A[U33, S13] = w * 2.0 * y A[U12, T12] = w * 1.0 A[U12, L33] = w * -xy A[U12, L23] = w * xz A[U12, L13] = w * yz A[U12, L12] = w * -zz A[U12, S2211] = w * z A[U12, S31] = w * x A[U12, S32] = w * -y A[U13, T13] = w * 1.0 A[U13, L22] = w * -xz A[U13, L23] = w * xy A[U13, L13] = w * -yy A[U13, L12] = w * yz A[U13, S1133] = w * y A[U13, S23] = w * z A[U13, S21] = w * -x A[U23, T23] = w * 1.0 A[U23, L11] = w * -yz A[U23, L23] = w * -xx A[U23, L13] = w * xy A[U23, L12] = w * xz A[U23, S2211] = w * -x A[U23, S1133] = w * -x A[U23, S12] = w * y A[U23, S13] = w * -z | 4293dee160eba41d42fb83ab7a7352ba89fb81ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/4293dee160eba41d42fb83ab7a7352ba89fb81ad/TLS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
9905,
67,
37,
12,
37,
16,
277,
16,
525,
16,
619,
16,
677,
16,
998,
16,
341,
4672,
3536,
2785,
326,
5050,
2595,
434,
3148,
432,
5023,
622,
432,
63,
77,
16,
78,
65,
598,
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,
444,
67,
9905,
67,
37,
12,
37,
16,
277,
16,
525,
16,
619,
16,
677,
16,
998,
16,
341,
4672,
3536,
2785,
326,
5050,
2595,
434,
3148,
432,
5023,
622,
432,
63,
77,
16,
78,
65,
598,
3... |
return str(tax.amount*100) | return str(tax.amount*100).replace('.',',') | def _get_alicuota(self, tnom=None): if not tnom: return [] | dd508c6ae98f5b0c1560c97980f2c15165747a7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7359/dd508c6ae98f5b0c1560c97980f2c15165747a7e/invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
21466,
89,
25441,
12,
2890,
16,
268,
12306,
33,
7036,
4672,
309,
486,
268,
12306,
30,
327,
5378,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
588,
67,
21466,
89,
25441,
12,
2890,
16,
268,
12306,
33,
7036,
4672,
309,
486,
268,
12306,
30,
327,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
author_email = 'ngps@netmemetic.com', | author_email = 'ngps at sandbox rulemaker net', | def swig_sources (self, sources): | f688b68aa174b1af3f9b9b6172785dbc4cdf41d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10522/f688b68aa174b1af3f9b9b6172785dbc4cdf41d5/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1352,
360,
67,
10141,
261,
2890,
16,
5550,
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,
... | [
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,
1352,
360,
67,
10141,
261,
2890,
16,
5550,
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... |
s = '' for idx in range(max_length): | s = u'' for idx in xrange(max_length): | def get_string_u_at_rva(self, rva, max_length = 2**16): """Get an Unicode string located at the given address.""" try: # If the RVA is invalid all would blow up. Some EXEs seem to be # specially nasty and have an invalid RVA. data = self.get_data(rva, 2) except PEFormatError, e: return None | 21cbdaf9ea57ad8ceb3b39cbd606211597c127d9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/213/21cbdaf9ea57ad8ceb3b39cbd606211597c127d9/pefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1080,
67,
89,
67,
270,
67,
4962,
69,
12,
2890,
16,
5633,
69,
16,
943,
67,
2469,
273,
576,
636,
2313,
4672,
3536,
967,
392,
9633,
533,
13801,
622,
326,
864,
1758,
12123,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1080,
67,
89,
67,
270,
67,
4962,
69,
12,
2890,
16,
5633,
69,
16,
943,
67,
2469,
273,
576,
636,
2313,
4672,
3536,
967,
392,
9633,
533,
13801,
622,
326,
864,
1758,
12123,
225,... |
childmenuItem_.connect('button-press-event', self.show_add_watch, child[2]) | childmenuItem_.connect('activate', self.show_add_watch, child[2]) | def generate_add_menu(self): """ Creates two "Add watch" submenus for the toplevel menu and the toolbar """ menu_dict = self.specto.watch_db.plugin_menu self.add_menu = gtk.Menu() self.add_menu_ = gtk.Menu() | ae7907319e66e05b65e8dd740976cce91fc72688 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10818/ae7907319e66e05b65e8dd740976cce91fc72688/notifier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
1289,
67,
5414,
12,
2890,
4672,
3536,
10210,
2795,
315,
986,
4267,
6,
720,
26065,
364,
326,
28999,
3824,
471,
326,
12748,
3536,
3824,
67,
1576,
273,
365,
18,
13234,
83,
18,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
1289,
67,
5414,
12,
2890,
4672,
3536,
10210,
2795,
315,
986,
4267,
6,
720,
26065,
364,
326,
28999,
3824,
471,
326,
12748,
3536,
3824,
67,
1576,
273,
365,
18,
13234,
83,
18,
7... |
raise error_perm, resp | raise NNTPPermanentError(resp) | def __init__(self, host, port = NNTP_PORT, user=None, password=None): """Initialize an instance. Arguments: - host: hostname to connect to - port: port to connect to (default the standard NNTP port)""" | 6e5a5b653cf6d01e04eb75ed5d23ba576162ee46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6e5a5b653cf6d01e04eb75ed5d23ba576162ee46/nntplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
16,
1756,
273,
423,
1784,
52,
67,
6354,
16,
729,
33,
7036,
16,
2201,
33,
7036,
4672,
3536,
7520,
392,
791,
18,
225,
13599,
30,
300,
1479,
30,
519... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
16,
1756,
273,
423,
1784,
52,
67,
6354,
16,
729,
33,
7036,
16,
2201,
33,
7036,
4672,
3536,
7520,
392,
791,
18,
225,
13599,
30,
300,
1479,
30,
519... |
>>> Label.from_string('package:busybox') Traceback (most recent call last): ... muddled.utils.Failure: Label string 'package:busybox' is not a valid Label | def from_string(label_string): """ Construct a Label from its string representation. | 81be0c8520a788305fa28235ccddf4d25cef43e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4427/81be0c8520a788305fa28235ccddf4d25cef43e5/depend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
1080,
12,
1925,
67,
1080,
4672,
3536,
14291,
279,
5287,
628,
2097,
533,
4335,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
1080,
12,
1925,
67,
1080,
4672,
3536,
14291,
279,
5287,
628,
2097,
533,
4335,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
ignores = anything("Separate types by spaces or commas:", default=', '.join(Bantracker.ignore._default)) | ignores = anything("Separate types by spaces or commas:", default=', '.join(Bantracker.request.ignore._default)) | def getReviewTime(): output("How many days should the bot wait before requesting a ban/quiet review?") review = something("Can be an integer or decimal value. Zero disables reviews.", default=str(Bantracker.review._default)) | 5e4cd4efc7e0b9287648ba0ba010e20a8486cc0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3106/5e4cd4efc7e0b9287648ba0ba010e20a8486cc0a/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
1945,
950,
13332,
876,
2932,
44,
543,
4906,
4681,
1410,
326,
2512,
2529,
1865,
18709,
279,
25732,
19,
20380,
10725,
7225,
13,
10725,
273,
5943,
2932,
2568,
506,
392,
3571,
578,
6970,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
1945,
950,
13332,
876,
2932,
44,
543,
4906,
4681,
1410,
326,
2512,
2529,
1865,
18709,
279,
25732,
19,
20380,
10725,
7225,
13,
10725,
273,
5943,
2932,
2568,
506,
392,
3571,
578,
6970,... |
data = [(pkg.arch, '-'.join((pkg.version, pkg.release)))] | data = [(pkg.arch, (pkg.epoch, pkg.version, pkg.release))] | def __init__(self, logger, setup, config): Bcfg2.Client.Tools.RPMng.RPMng.__init__(self, logger, setup, config) self.yum_avail = dict() self.yum_installed = dict() self.yb = yum.YumBase() yup = self.yb.doPackageLists(pkgnarrow='updates') for dest, source in [(self.yum_avail, yup.updates), (self.yum_installed, self.yb.rpmdb)]: for pkg in source: data = [(pkg.arch, '-'.join((pkg.version, pkg.release)))] if pkg.name in dest: dest[pkg.name].update(data) else: dest[pkg.name] = dict(data) | 80b7f00b3c64bc59eb9be530486dd153ea5f8db7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/80b7f00b3c64bc59eb9be530486dd153ea5f8db7/YUMng.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1194,
16,
3875,
16,
642,
4672,
605,
7066,
22,
18,
1227,
18,
10348,
18,
54,
12728,
3368,
18,
54,
12728,
3368,
16186,
2738,
972,
12,
2890,
16,
1194,
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,
1001,
2738,
972,
12,
2890,
16,
1194,
16,
3875,
16,
642,
4672,
605,
7066,
22,
18,
1227,
18,
10348,
18,
54,
12728,
3368,
18,
54,
12728,
3368,
16186,
2738,
972,
12,
2890,
16,
1194,
16,
... |
length = 0 | prev = curr = "" while prev != '\r' and curr != '\n': prev = curr try: curr = self.socket.recv(1) except socket.error: break | def waitHandshake(self): shake = '' print 'Waiting for Crossfire handshake...' try: shake = self.socket.recv(len(HANDSHAKE_STRING)) print shake except socket.error, msg: print msg if shake == HANDSHAKE_STRING: print 'Received Crossfire handshake.' | 5363eba09bc8d40f3f21ed752e71f96fe5c99e01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11436/5363eba09bc8d40f3f21ed752e71f96fe5c99e01/crossfire_test_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2529,
14545,
12,
2890,
4672,
699,
911,
273,
875,
1172,
296,
15946,
364,
19742,
12179,
11942,
7821,
775,
30,
699,
911,
273,
365,
18,
7814,
18,
18334,
12,
1897,
12,
12346,
8325,
6859,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2529,
14545,
12,
2890,
4672,
699,
911,
273,
875,
1172,
296,
15946,
364,
19742,
12179,
11942,
7821,
775,
30,
699,
911,
273,
365,
18,
7814,
18,
18334,
12,
1897,
12,
12346,
8325,
6859,
67,
... |
""" | @cvar _COLLECT_PARAM_MISMATCHES: If true, then collect all parameter mismatch errors, and print them at the end; otherwise, print them as they are encountered. @cvar _param_mismatches: A dictionary whose keys are pairs (uid, base_uid), where uid is a method whose parameters do not match the parameters of its base class base_uid. """ _COLLECT_PARAM_MISMATCHES = 1 _param_mismatches = [] | def _add_inheritance_groups(self): for (groupname, groupmembers) in self._groups: if groupname.startswith('Inherited'): estr = '"Inherited..." is a reserved group name.' self._field_warnings.append(estr) | d0164ceec6b7c656820c9cc53370c59eb64d4605 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/d0164ceec6b7c656820c9cc53370c59eb64d4605/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
6018,
1359,
67,
4650,
12,
2890,
4672,
364,
261,
1655,
529,
16,
1041,
7640,
13,
316,
365,
6315,
4650,
30,
309,
25329,
18,
17514,
1918,
2668,
29078,
11,
4672,
5001,
313,
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,
389,
1289,
67,
6018,
1359,
67,
4650,
12,
2890,
4672,
364,
261,
1655,
529,
16,
1041,
7640,
13,
316,
365,
6315,
4650,
30,
309,
25329,
18,
17514,
1918,
2668,
29078,
11,
4672,
5001,
313,
2... |
if lev == 0: | if lev == 0 or title != 'Functions': | def afterFlowable(self, flowable): "Takes care of header line, TOC and outline entries." if flowable.__class__.__name__ == 'Paragraph': f = flowable | f760f58369f882d86b9c4f874a0989b83e418f95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/f760f58369f882d86b9c4f874a0989b83e418f95/graphdocpy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1839,
5249,
429,
12,
2890,
16,
4693,
429,
4672,
315,
11524,
7671,
434,
1446,
980,
16,
8493,
39,
471,
16363,
3222,
1199,
225,
309,
4693,
429,
16186,
1106,
972,
16186,
529,
972,
422,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1839,
5249,
429,
12,
2890,
16,
4693,
429,
4672,
315,
11524,
7671,
434,
1446,
980,
16,
8493,
39,
471,
16363,
3222,
1199,
225,
309,
4693,
429,
16186,
1106,
972,
16186,
529,
972,
422,
296,
... |
"CVSRevision":"$Revision: 1.102 $", | "CVSRevision":"$Revision: 1.103 $", | def callingparams(self): """Returns list of parameters to save with results.""" #Test whether k has been set try: self.k except (NameError, AttributeError): self.k=None try: self.mass except (NameError, AttributeError): self.mass=None #Form dictionary of inputs params = {"ystart":self.ystart, "tstart":self.tstart, "tend":self.tend, "tstep_wanted":self.tstep_wanted, "tstep_min":self.tstep_min, "k":self.k, #model dependent params "mass":self.mass, "eps":self.eps, "dxsav":self.dxsav, "solver":self.solver, "classname":self.__class__.__name__, "CVSRevision":"$Revision: 1.102 $", "datetime":datetime.datetime.now() } return params | ca17172d92c4324f9a926be66d6f3d796980810a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/ca17172d92c4324f9a926be66d6f3d796980810a/cosmomodels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4440,
2010,
12,
2890,
4672,
3536,
1356,
666,
434,
1472,
358,
1923,
598,
1686,
12123,
468,
4709,
2856,
417,
711,
2118,
444,
775,
30,
365,
18,
79,
1335,
261,
461,
668,
16,
6394,
4672,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4440,
2010,
12,
2890,
4672,
3536,
1356,
666,
434,
1472,
358,
1923,
598,
1686,
12123,
468,
4709,
2856,
417,
711,
2118,
444,
775,
30,
365,
18,
79,
1335,
261,
461,
668,
16,
6394,
4672,
36... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.