rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
def t_error(t): print "Illegal character '%s'" % t.value[0] t.skip(1) lex.lex() gdl = open('parse_test.kif').read() lex.input(gdl) | yacc.yacc() file = open(sys.argv[1], 'r').read() result = yacc.parse(file) | def t_error(t): print "Illegal character '%s'" % t.value[0] t.skip(1) | 81c1347c5845cbf89926a3682e137f49b74a7fe2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7008/81c1347c5845cbf89926a3682e137f49b74a7fe2/gdllex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
67,
1636,
12,
88,
4672,
1172,
315,
12195,
3351,
1995,
87,
4970,
738,
268,
18,
1132,
63,
20,
65,
268,
18,
7457,
12,
21,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
67,
1636,
12,
88,
4672,
1172,
315,
12195,
3351,
1995,
87,
4970,
738,
268,
18,
1132,
63,
20,
65,
268,
18,
7457,
12,
21,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
i = self.to_bits(i) | i = self.to_bits(i, self.m) | def interpolation_polynomial(self, k=None): r""" Return a univariate polynomial over an extension field representing this S-box. | 722300ff09b8199db5acea36fda4b2778a4c12e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/722300ff09b8199db5acea36fda4b2778a4c12e9/sbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12851,
67,
3915,
13602,
12,
2890,
16,
417,
33,
7036,
4672,
436,
8395,
2000,
279,
640,
27693,
16991,
1879,
392,
2710,
652,
5123,
333,
348,
17,
2147,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12851,
67,
3915,
13602,
12,
2890,
16,
417,
33,
7036,
4672,
436,
8395,
2000,
279,
640,
27693,
16991,
1879,
392,
2710,
652,
5123,
333,
348,
17,
2147,
18,
2,
-100,
-100,
-100,
-100,
-100,
... |
for i in range(len(newtxt)): if newtxt[i]!=txt[i*2]: print "error at: %d (%02x != %02x)" % (i,ord(newtxt[i]),ord(txt[i])) | for i in range(len(txt)): if newtxt[i*2]!=txt[i]: print "error at: %d (%02x != %02x)" % (i,ord(newtxt[i*2]),ord(txt[i])) | def read(self,buffer): fh=buffer.getReadFileObject() txt=fh.read() print "BinaryFilter: reading %d bytes" % len(txt) | d27344360d563e40e38e6af9b7919f9504d0eb65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11522/d27344360d563e40e38e6af9b7919f9504d0eb65/buffers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
4106,
4672,
7625,
33,
4106,
18,
588,
1994,
21471,
1435,
6463,
33,
19260,
18,
896,
1435,
1172,
315,
5905,
1586,
30,
6453,
738,
72,
1731,
6,
738,
562,
12,
5830,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
12,
2890,
16,
4106,
4672,
7625,
33,
4106,
18,
588,
1994,
21471,
1435,
6463,
33,
19260,
18,
896,
1435,
1172,
315,
5905,
1586,
30,
6453,
738,
72,
1731,
6,
738,
562,
12,
5830,
13,
... |
_fl_popup_entry_get_by_value = cfuncproto(so_libforms, "fl_popup_entry_get_by_value", cty.POINTER(FL_POPUP_ENTRY), [cty.POINTER(FL_POPUP), cty.c_long], | _fl_popup_entry_get_by_value = cfuncproto(so_libforms, "fl_popup_entry_get_by_value", cty.POINTER(FL_POPUP_ENTRY), [cty.POINTER(FL_POPUP), cty.c_long], | def fl_popup_entry_get_by_position(p1, p2): """ fl_popup_entry_get_by_position(p1, p2) -> popup_entry """ retval = _fl_popup_entry_get_by_position(p1, p2) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
16086,
67,
4099,
67,
588,
67,
1637,
67,
3276,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
16086,
67,
4099,
67,
588,
67,
1637,
67,
3276,
12,
84,
21,
16,
293,
22,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
16086,
67,
4099,
67,
588,
67,
1637,
67,
3276,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
16086,
67,
4099,
67,
588,
67,
1637,
67,
3276,
12,
84,
21,
16,
293,
22,
13,
... |
return '(' + ', '.join(map(lambda t: '0x%04x' % t, t)) + ')' | return '(' + ', '.join(['0x%0*X' % (precision, item) for item in t]) + ')' | def hexrepr(t): if t is None: return 'None' try: len(t) except: return '0x%04x' % t try: return '(' + ', '.join(map(lambda t: '0x%04x' % t, t)) + ')' except TypeError, why: print '* failed to convert %r: %s' % (t, why) raise | 489293afae138cacb82b94b69bee6266f1364acd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/489293afae138cacb82b94b69bee6266f1364acd/gencodec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3827,
12715,
12,
88,
4672,
225,
309,
268,
353,
599,
30,
327,
296,
7036,
11,
775,
30,
562,
12,
88,
13,
1335,
30,
327,
296,
20,
92,
9,
3028,
92,
11,
738,
268,
775,
30,
327,
7321,
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,
3827,
12715,
12,
88,
4672,
225,
309,
268,
353,
599,
30,
327,
296,
7036,
11,
775,
30,
562,
12,
88,
13,
1335,
30,
327,
296,
20,
92,
9,
3028,
92,
11,
738,
268,
775,
30,
327,
7321,
3... |
new_sources.append(source) | target_ext = '.c' | def swig_sources (self, sources): """Walk the list of source files in 'sources', looking for SWIG interface (.i) files. Run SWIG on all that are found, and return a modified 'sources' list with SWIG source files replaced by the generated C (or C++) files. """ new_sources = [] swig_sources = [] swig_targets = {} # XXX this drops generated C/C++ files into the source tree, which # is fine for developers who want to distribute the generated # source -- but there should be an option to put SWIG output in # the temp dir. if self.swig_cpp: target_ext = '.cpp' else: target_ext = '.c' for source in sources: (base, ext) = os.path.splitext(source) if ext == ".i": # SWIG interface file new_sources.append(base + target_ext) swig_sources.append(source) swig_targets[source] = new_sources[-1] else: new_sources.append(source) if not swig_sources: return new_sources swig = self.find_swig() swig_cmd = [swig, "-python", "-ISWIG"] if self.swig_cpp: swig_cmd.append("-c++") for source in swig_sources: target = swig_targets[source] self.announce("swigging %s to %s" % (source, target)) self.spawn(swig_cmd + ["-o", target, source]) return new_sources | 792d215f022fc86e5b15c34c904b2f0ac7c51fb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/792d215f022fc86e5b15c34c904b2f0ac7c51fb7/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1352,
360,
67,
10141,
261,
2890,
16,
5550,
4672,
225,
3536,
9463,
326,
666,
434,
1084,
1390,
316,
296,
10141,
2187,
7849,
364,
16392,
3047,
1560,
261,
18,
77,
13,
1390,
18,
225,
1939,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1352,
360,
67,
10141,
261,
2890,
16,
5550,
4672,
225,
3536,
9463,
326,
666,
434,
1084,
1390,
316,
296,
10141,
2187,
7849,
364,
16392,
3047,
1560,
261,
18,
77,
13,
1390,
18,
225,
1939,
... |
self.assertEqual(len(w.warnings), 1) self.assertWarning(None, w, "Overriding __cmp__ blocks inheritance of __hash__ in 3.x") | self.assertEqual(len(w.warnings), 0) | def __cmp__(self, other): pass | 3614aa13b041d970501f928d931c71c7455b9c65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/3614aa13b041d970501f928d931c71c7455b9c65/test_py3kwarn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
1342,
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,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.logger.info("Update completed with no upstream changes") | self.update() | def update(self, single_commit, concatenate_logs): """ Update an existing tailorized project. | 9b269212ee408c540f4509c0d7f43963db083a55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/9b269212ee408c540f4509c0d7f43963db083a55/tailor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
2202,
67,
7371,
16,
11361,
67,
10011,
4672,
3536,
2315,
392,
2062,
5798,
280,
1235,
1984,
18,
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,
1089,
12,
2890,
16,
2202,
67,
7371,
16,
11361,
67,
10011,
4672,
3536,
2315,
392,
2062,
5798,
280,
1235,
1984,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
classname=classname, itemid=itemid) | classname=classname, itemid=itemid, property=property) | def hasPermission(self, permission, classname=_marker, itemid=None): """Check whether the user has 'permission' on the current class.""" if classname is self._marker: classname = self.client.classname return self.db.security.hasPermission(permission, self.client.userid, classname=classname, itemid=itemid) | e4bbfc8364f8d98d89e32237d78d5c001690c749 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1906/e4bbfc8364f8d98d89e32237d78d5c001690c749/actions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26097,
12,
2890,
16,
4132,
16,
7479,
33,
67,
11145,
16,
16862,
33,
7036,
4672,
3536,
1564,
2856,
326,
729,
711,
296,
9827,
11,
603,
326,
783,
667,
12123,
309,
7479,
353,
365,
6315,
111... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26097,
12,
2890,
16,
4132,
16,
7479,
33,
67,
11145,
16,
16862,
33,
7036,
4672,
3536,
1564,
2856,
326,
729,
711,
296,
9827,
11,
603,
326,
783,
667,
12123,
309,
7479,
353,
365,
6315,
111... |
instances = [self.cfg.GetInstanceInfo(name) for name in self.cfg.GetInstanceList()] | def Exec(self, feedback_fn): """Return cluster config. | 593224035f548b41dd048f71a126c55f76f847ed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7542/593224035f548b41dd048f71a126c55f76f847ed/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3889,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
990,
2855,
642,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3889,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
990,
2855,
642,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
""" | """ | def setControlEffect(self, animName, effect, partName = None, lodName = None): """ Sets the amount by which the named animation contributes to the overall pose. This controls blending of multiple animations; it only makes sense to call this after a previous call to enableBlend(). """ for control in self.getAnimControls(animName, partName, lodName): control.getPart().setControlEffect(control, effect) | f27cf426e1d544aac938e5bbdfe9d7f560354a86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/f27cf426e1d544aac938e5bbdfe9d7f560354a86/Actor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3367,
12477,
12,
2890,
16,
10536,
461,
16,
5426,
16,
1087,
461,
273,
599,
16,
328,
369,
461,
273,
599,
4672,
3536,
11511,
326,
3844,
635,
1492,
326,
4141,
8794,
356,
1141,
358,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3367,
12477,
12,
2890,
16,
10536,
461,
16,
5426,
16,
1087,
461,
273,
599,
16,
328,
369,
461,
273,
599,
4672,
3536,
11511,
326,
3844,
635,
1492,
326,
4141,
8794,
356,
1141,
358,
32... |
sec = time.mktime(time.strptime(accountingParams["accounting/interval-end"], "%Y-%m-%d %H:%M:%S")) - time.time() | sec = time.mktime(time.strptime(accountingParams["accounting/interval-end"], "%Y-%m-%d %H:%M:%S")) - time.time() - time.timezone | def redraw(self): """ Redraws bandwidth panel. """ # doesn't draw if headless (indicating that the instance is for a pause buffer) if self.win: if not self.lock.acquire(False): return try: self.clear() dlColor = util.getColor(BANDWIDTH_GRAPH_COLOR_DL) ulColor = util.getColor(BANDWIDTH_GRAPH_COLOR_UL) # draws label, dropping stats if there's not enough room labelContents = "Bandwidth (cap: %s, burst: %s):" % (self.bwRate, self.bwBurst) if self.maxX < len(labelContents): labelContents = "%s):" % labelContents[:labelContents.find(",")] # removes burst measure if self.maxX < len(labelContents): labelContents = "Bandwidth:" # removes both self.addstr(0, 0, labelContents, util.LABEL_ATTR) # current numeric measures self.addstr(1, 0, "Downloaded (%s/sec):" % util.getSizeLabel(self.lastDownloadRate), curses.A_BOLD | dlColor) self.addstr(1, 35, "Uploaded (%s/sec):" % util.getSizeLabel(self.lastUploadRate), curses.A_BOLD | ulColor) # graph bounds in KB (uses highest recorded value as max) self.addstr(2, 0, "%4s" % str(self.maxDownloadRate / 1024 / BANDWIDTH_GRAPH_SAMPLES), dlColor) self.addstr(7, 0, " 0", dlColor) self.addstr(2, 35, "%4s" % str(self.maxUploadRate / 1024 / BANDWIDTH_GRAPH_SAMPLES), ulColor) self.addstr(7, 35, " 0", ulColor) # creates bar graph of bandwidth usage over time for col in range(BANDWIDTH_GRAPH_COL): bytesDownloaded = self.downloadRates[col + 1] colHeight = min(5, 5 * bytesDownloaded / self.maxDownloadRate) for row in range(colHeight): self.addstr(7 - row, col + 5, " ", curses.A_STANDOUT | dlColor) for col in range(BANDWIDTH_GRAPH_COL): bytesUploaded = self.uploadRates[col + 1] colHeight = min(5, 5 * bytesUploaded / self.maxUploadRate) for row in range(colHeight): self.addstr(7 - row, col + 40, " ", curses.A_STANDOUT | ulColor) if self.isAccounting: try: accountingParams = self.conn.get_info(["accounting/hibernating", "accounting/bytes", "accounting/bytes-left", "accounting/interval-end"]) hibernateStr = accountingParams["accounting/hibernating"] hibernateColor = "green" if hibernateStr == "soft": hibernateColor = "yellow" elif hibernateStr == "hard": hibernateColor = "red" self.addstr(9, 0, "Accounting (", curses.A_BOLD) self.addstr(9, 12, hibernateStr, curses.A_BOLD | util.getColor(hibernateColor)) self.addstr(9, 12 + len(hibernateStr), "):", curses.A_BOLD) sec = time.mktime(time.strptime(accountingParams["accounting/interval-end"], "%Y-%m-%d %H:%M:%S")) - time.time() resetHours = sec / 3600 sec %= 3600 resetMin = sec / 60 sec %= 60 self.addstr(9, 35, "Time to reset: %i:%02i:%02i" % (resetHours, resetMin, sec)) read = util.getSizeLabel(int(accountingParams["accounting/bytes"].split(" ")[0])) written = util.getSizeLabel(int(accountingParams["accounting/bytes"].split(" ")[1])) limit = util.getSizeLabel(int(accountingParams["accounting/bytes"].split(" ")[0]) + int(accountingParams["accounting/bytes-left"].split(" ")[0])) self.addstr(10, 2, "%s / %s" % (read, limit), dlColor) self.addstr(10, 37, "%s / %s" % (written, limit), ulColor) except TorCtl.TorCtlClosed: self.addstr(9, 0, "Accounting:", curses.A_BOLD) self.addstr(9, 12, "Shutting Down...") self.refresh() finally: self.lock.release() | c615c5a3622fddd2019c63d7738120ba75ceb4c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13459/c615c5a3622fddd2019c63d7738120ba75ceb4c1/bandwidthPanel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16540,
12,
2890,
4672,
3536,
4621,
1899,
87,
20508,
6594,
18,
3536,
468,
3302,
1404,
3724,
309,
910,
2656,
261,
728,
335,
1776,
716,
326,
791,
353,
364,
279,
11722,
1613,
13,
309,
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,
16540,
12,
2890,
4672,
3536,
4621,
1899,
87,
20508,
6594,
18,
3536,
468,
3302,
1404,
3724,
309,
910,
2656,
261,
728,
335,
1776,
716,
326,
791,
353,
364,
279,
11722,
1613,
13,
309,
365,
... |
func.WriteDestinationInitalizationValidation(file) | def WriteGLES2CLibImplementation(self, filename): """Writes the GLES2 c lib implementation.""" file = CHeaderWriter( filename, "// These functions emluate GLES2 over command buffers.\n") | ce383f32a1bfbe4ca33b88a0cbbb79c7f077428d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/ce383f32a1bfbe4ca33b88a0cbbb79c7f077428d/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
43,
11386,
22,
5017,
495,
13621,
12,
2890,
16,
1544,
4672,
3536,
8368,
326,
611,
11386,
22,
276,
2561,
4471,
12123,
585,
273,
385,
1864,
2289,
12,
1544,
16,
16177,
8646,
4186,
801,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2598,
43,
11386,
22,
5017,
495,
13621,
12,
2890,
16,
1544,
4672,
3536,
8368,
326,
611,
11386,
22,
276,
2561,
4471,
12123,
585,
273,
385,
1864,
2289,
12,
1544,
16,
16177,
8646,
4186,
801,... | |
return TypeError | raise TypeError | def get_keyword_arguments(self, name): try: return self._server.get_keyword_arguments(name) except xmlrpclib.Error: return TypeError | c9393784c602d69f1024e1075f1f8f4f6c2608e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/c9393784c602d69f1024e1075f1f8f4f6c2608e2/Remote.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
11041,
67,
7099,
12,
2890,
16,
508,
4672,
775,
30,
327,
365,
6315,
3567,
18,
588,
67,
11041,
67,
7099,
12,
529,
13,
1335,
2025,
13832,
830,
495,
18,
668,
30,
327,
3580,
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,
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,
11041,
67,
7099,
12,
2890,
16,
508,
4672,
775,
30,
327,
365,
6315,
3567,
18,
588,
67,
11041,
67,
7099,
12,
529,
13,
1335,
2025,
13832,
830,
495,
18,
668,
30,
327,
3580,
2,
... |
self.show(name, title, text) | self.show(name, title, text, edit=0) | def do_review(self): | a0dd5c7ba1a16a3f39f963d576d3d261c2fdd34e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a0dd5c7ba1a16a3f39f963d576d3d261c2fdd34e/faqmain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
16041,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
16041,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def test_exceptionListener_is_None(self): | def test_default_exceptionListener_is_None(self): | def test_exceptionListener_is_None(self): self.assert_(self.conn.exceptionListener is None) # XXX need to sort out a few more issues with exception listeners #conn.exceptionListener = ExceptionListener() | d0da844bd6bb49779f0d603cd0f89d320f111860 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4106/d0da844bd6bb49779f0d603cd0f89d320f111860/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1886,
67,
4064,
2223,
67,
291,
67,
7036,
12,
2890,
4672,
365,
18,
11231,
67,
12,
2890,
18,
4646,
18,
4064,
2223,
353,
599,
13,
468,
11329,
1608,
358,
1524,
596,
279,
11315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1886,
67,
4064,
2223,
67,
291,
67,
7036,
12,
2890,
4672,
365,
18,
11231,
67,
12,
2890,
18,
4646,
18,
4064,
2223,
353,
599,
13,
468,
11329,
1608,
358,
1524,
596,
279,
11315,
... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 655) else quickfix.StringField.__init__(self, 655, 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,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
8982,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
972,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
8982,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
972,
1... |
context.reopen() context.stayOpen = 1 | def prepare_openid(self, req, client, requested_uri): 'Performs initialization of OpenID authentication.' | 28bb7747823c110a3a066f0e6a659974eae6f2a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10424/28bb7747823c110a3a066f0e6a659974eae6f2a5/proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
67,
20619,
12,
2890,
16,
1111,
16,
1004,
16,
3764,
67,
1650,
4672,
296,
9409,
10313,
434,
25781,
5107,
1093,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
67,
20619,
12,
2890,
16,
1111,
16,
1004,
16,
3764,
67,
1650,
4672,
296,
9409,
10313,
434,
25781,
5107,
1093,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
sStart = '%s %s' %( sStart, self.year) | sStart = '%s %s' % ( sStart, self.year ) | def getResourceUsage(self): """Returns a dictionary containing CPUConsumed, CPULimit, WallClockConsumed and WallClockLimit for current slot. All values returned in seconds. """ if not self.bin: return S_ERROR('Could not determine bin directory for LSF') | b590345882082ff68315923d410c01c4d6437735 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b590345882082ff68315923d410c01c4d6437735/LSFTimeLeft.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5070,
5357,
12,
2890,
4672,
3536,
1356,
279,
3880,
4191,
12154,
20554,
16,
5181,
1506,
1038,
16,
678,
454,
14027,
20554,
471,
678,
454,
14027,
3039,
364,
783,
4694,
18,
225,
4826,
924,
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,
5070,
5357,
12,
2890,
4672,
3536,
1356,
279,
3880,
4191,
12154,
20554,
16,
5181,
1506,
1038,
16,
678,
454,
14027,
20554,
471,
678,
454,
14027,
3039,
364,
783,
4694,
18,
225,
4826,
924,
2... |
if p2cread != -1: p2cread.Close() if c2pwrite != -1: c2pwrite.Close() if errwrite != -1: errwrite.Close() | def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session): """Execute program (MS Windows version)""" | 05e4f1845479b3c19e68b477d8c0ab6bd4d40de9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/05e4f1845479b3c19e68b477d8c0ab6bd4d40de9/subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8837,
67,
3624,
12,
2890,
16,
833,
16,
9070,
16,
675,
4177,
67,
4293,
16,
1746,
67,
74,
2377,
16,
7239,
16,
1550,
16,
26182,
67,
31276,
16,
11850,
1376,
16,
6710,
7133,
16,
5972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3624,
12,
2890,
16,
833,
16,
9070,
16,
675,
4177,
67,
4293,
16,
1746,
67,
74,
2377,
16,
7239,
16,
1550,
16,
26182,
67,
31276,
16,
11850,
1376,
16,
6710,
7133,
16,
5972... | |
setattr(opts, attr, XPath(getattr(opts, attr), | setattr(opts, attr, XPath(getattr(opts, attr), | def convert(htmlfile, opts, notification=None, create_epub=True, oeb_cover=False, extract_to=None): htmlfile = os.path.abspath(htmlfile) if opts.output is None: opts.output = os.path.splitext(os.path.basename(htmlfile))[0] + '.epub' opts.profile = PROFILES[opts.profile] opts.output = os.path.abspath(opts.output) if opts.override_css is not None: try: opts.override_css = open(opts.override_css, 'rb').read().decode(preferred_encoding, 'replace') except: opts.override_css = opts.override_css.decode(preferred_encoding, 'replace') if opts.from_opf: opts.from_opf = os.path.abspath(opts.from_opf) if opts.from_ncx: opts.from_ncx = os.path.abspath(opts.from_ncx) if htmlfile.lower().endswith('.opf'): opf = OPF(htmlfile, os.path.dirname(os.path.abspath(htmlfile))) filelist = opf_traverse(opf, verbose=opts.verbose, encoding=opts.encoding) if not filelist: # Bad OPF look for a HTML file instead htmlfile = find_html_index(walk(os.path.dirname(htmlfile)))[0] if htmlfile is None: raise ValueError('Could not find suitable file to convert.') filelist = get_filelist(htmlfile, opts)[1] mi = merge_metadata(None, opf, opts) else: opf, filelist = get_filelist(htmlfile, opts) mi = merge_metadata(htmlfile, opf, opts) opts.chapter = XPath(opts.chapter, namespaces={'re':'http://exslt.org/regular-expressions'}) for x in (1, 2, 3): attr = 'level%d_toc'%x if getattr(opts, attr): setattr(opts, attr, XPath(getattr(opts, attr), namespaces={'re':'http://exslt.org/regular-expressions'})) else: setattr(opts, attr, None) with TemporaryDirectory(suffix='_html2epub', keep=opts.keep_intermediate) as tdir: if opts.keep_intermediate: print 'Intermediate files in', tdir resource_map, htmlfile_map, generated_toc, stylesheet_map = \ parse_content(filelist, opts, tdir) logger = logging.getLogger('html2epub') resources = [os.path.join(tdir, 'content', f) for f in resource_map.values()] title_page, has_title_page = process_title_page(mi, filelist, htmlfile_map, opts, tdir) spine = [htmlfile_map[f.path] for f in filelist] if not oeb_cover and title_page is not None: spine = [title_page] + spine mi.cover = None mi.cover_data = (None, None) mi = create_metadata(tdir, mi, spine, resources) buf = cStringIO.StringIO() if mi.toc: rebase_toc(mi.toc, htmlfile_map, tdir) if opts.use_auto_toc or mi.toc is None or len(list(mi.toc.flat())) < 2: mi.toc = generated_toc if opts.from_ncx: toc = TOC() toc.read_ncx_toc(opts.from_ncx) mi.toc = toc for item in mi.manifest: if getattr(item, 'mime_type', None) == 'text/html': item.mime_type = 'application/xhtml+xml' opf_path = os.path.join(tdir, 'metadata.opf') with open(opf_path, 'wb') as f: mi.render(f, buf, 'toc.ncx') toc = buf.getvalue() if toc: with open(os.path.join(tdir, 'toc.ncx'), 'wb') as f: f.write(toc) if opts.show_ncx: print toc split(opf_path, opts, stylesheet_map) if opts.page: logger.info('\tBuilding page map...') add_page_map(opf_path, opts) check_links(opf_path, opts.pretty_print) opf = OPF(opf_path, tdir) opf.remove_guide() oeb_cover_file = None if oeb_cover and title_page is not None: oeb_cover_file = find_oeb_cover(os.path.join(tdir, 'content', title_page)) if has_title_page or (oeb_cover and oeb_cover_file): opf.create_guide_element() if has_title_page and not oeb_cover: opf.add_guide_item('cover', 'Cover', 'content/'+spine[0]) if oeb_cover and oeb_cover_file: opf.add_guide_item('cover', 'Cover', 'content/'+oeb_cover_file) cpath = os.path.join(tdir, 'content', 'resources', '_cover_.jpg') if os.path.exists(cpath): opf.add_path_to_manifest(cpath, 'image/jpeg') with open(opf_path, 'wb') as f: f.write(opf.render()) ncx_path = os.path.join(os.path.dirname(opf_path), 'toc.ncx') if os.path.exists(ncx_path) and os.stat(ncx_path).st_size > opts.profile.flow_size: logger.info('Condensing NCX from %d bytes...'%os.stat(ncx_path).st_size) condense_ncx(ncx_path) if os.stat(ncx_path).st_size > opts.profile.flow_size: logger.warn('NCX still larger than allowed size at %d bytes. Menu based Table of Contents may not work on device.'%os.stat(ncx_path).st_size) if create_epub: epub = initialize_container(opts.output) epub.add_dir(tdir) epub.close() run_plugins_on_postprocess(opts.output, 'epub') logger.info(_('Output written to ')+opts.output) if opts.show_opf: print open(opf_path, 'rb').read() if opts.extract_to is not None: if os.path.exists(opts.extract_to): shutil.rmtree(opts.extract_to) shutil.copytree(tdir, opts.extract_to) if extract_to is not None: if os.path.exists(extract_to): shutil.rmtree(extract_to) shutil.copytree(tdir, extract_to) | 62688a6822fce9a5af20458cd9e4ccc78e487fe7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/62688a6822fce9a5af20458cd9e4ccc78e487fe7/from_html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
2620,
768,
16,
1500,
16,
3851,
33,
7036,
16,
752,
67,
881,
373,
33,
5510,
16,
320,
24008,
67,
3165,
33,
8381,
16,
2608,
67,
869,
33,
7036,
4672,
1729,
768,
273,
1140,
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,
1765,
12,
2620,
768,
16,
1500,
16,
3851,
33,
7036,
16,
752,
67,
881,
373,
33,
5510,
16,
320,
24008,
67,
3165,
33,
8381,
16,
2608,
67,
869,
33,
7036,
4672,
1729,
768,
273,
1140,
18,
... |
sph_radius = ht/2. | rd_kz = [ k for k in obj.__dict__.keys() if radiusHoup_prefix in k] radii=[ obj.__dict__[k] for k in rd_kz ] sph_radius = 1.0*sum(radii)/len(radii) | def spheres( obj , **kwds ): X_attr = kwds.get('X_attr', 'X') Y_attr = kwds.get('Y_attr', 'Y') pos_dist = kwds.get('dist', 'Distance') pos_az = kwds.get('az', 'Azimuth') circ_attr = kwds.get('circ_attr', 'Circonference') height_attr = kwds.get('height_attr', 'Haut') botHoup_attr = kwds.get('botHoup', 'BaseHoup') radiusHoup = kwds.get('radiusHoup', None) wood = kwds.get( 'wood', True ) rgb = kwds.get('rgb', None) if not obj.__dict__.has_key("posX") and not obj.__dict__.has_key("posY"): try : r = obj.__dict__[pos_dist] a = obj.__dict__[pos_az] obj.posX = r*cos( radians(forest2geomAZ(a)) ) obj.posY = r*sin( radians(forest2geomAZ(a)) ) except KeyError: obj.posX = obj.__dict__[X_attr] obj.posY = obj.__dict__[Y_attr] ht = 100* (obj.__dict__[height_attr] - obj.__dict__[botHoup_attr]) if radiusHoup : sph_radius = obj.__dict__[radiusHoup] else : sph_radius = ht/2. h = pgl.Translated( pgl.Vector3(obj.posX, obj.posY, obj.__dict__[botHoup_attr]*100 + sph_radius), pgl.Sphere(sph_radius,10,5) ) tr = pgl.Translated(pgl.Vector3(obj.posX, obj.posY, 0), pgl.Cylinder( obj.__dict__[circ_attr]/(2*pi), obj.__dict__[botHoup_attr]*100 + ht*0.1) ) if rgb == None: s_h = pgl.Shape(h, houppier_material(), obj.pid) else : r,g,b = rgb s_h = pgl.Shape(h, houppier_material(r,g,b), obj.pid) s_tr = pgl.Shape(tr, trunk_material(), obj.pid+100000) if wood: return ( s_h, s_tr ) else : return ( s_h, ) | 8e57cbfdff4ebb559b6e45cdafb7b70293078052 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/799/8e57cbfdff4ebb559b6e45cdafb7b70293078052/dresser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
844,
11737,
12,
1081,
269,
2826,
25577,
262,
30,
1139,
67,
1747,
273,
17149,
18,
588,
2668,
60,
67,
1747,
2187,
296,
60,
6134,
1624,
67,
1747,
273,
17149,
18,
588,
2668,
61,
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,
272,
844,
11737,
12,
1081,
269,
2826,
25577,
262,
30,
1139,
67,
1747,
273,
17149,
18,
588,
2668,
60,
67,
1747,
2187,
296,
60,
6134,
1624,
67,
1747,
273,
17149,
18,
588,
2668,
61,
67,
... |
msg = "WARNING: header file %s is in your directory, but not in CVS"%(dir+"/"+x) print msg WARNINGS.append(msg) | if ((skip=="ALL") or (skip.count(x)==0)): msg = "WARNING: header file %s is in your directory, but not in CVS"%(dir+"/"+x) print msg WARNINGS.append(msg) | def CopyAllHeaders(dir): # get a list of headers dirlist = os.listdir(dir) dirlist.sort() files = fnmatch.filter(dirlist,"*.h")+fnmatch.filter(dirlist,"*.I")+fnmatch.filter(dirlist,"*.T") # sanity check - do headers in directory match headers in CVS? cvsentries = ReadCvsEntries(dir) if (cvsentries != 0): cvsheaders = fnmatch.filter(cvsentries,"*.h")+fnmatch.filter(cvsentries,"*.I")+fnmatch.filter(cvsentries,"*.T") for x in SetDifference(files, cvsheaders): msg = "WARNING: header file %s is in your directory, but not in CVS"%(dir+"/"+x) print msg WARNINGS.append(msg) for x in SetDifference(cvsheaders, files): msg = "WARNING: header file %s is CVS, but not in your directory"%(dir+"/"+x) print msg WARNINGS.append(msg) # actually copy the headers. copied = [] for filename in files: srcfile = dir + "/" + filename dstfile = PREFIX + "/include/" + filename if (older(dstfile,srcfile)): copied.append(filename) WriteFile(dstfile,ReadFile(srcfile)) if (len(copied)>0): print "\nCompiling in directory: %s\n\nCopied headers: %s"%(dir,copied) | f69bc407e33e89c140c06a05174d14d733231b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/f69bc407e33e89c140c06a05174d14d733231b05/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5631,
1595,
3121,
12,
1214,
4672,
468,
336,
279,
666,
434,
1607,
1577,
1098,
273,
1140,
18,
1098,
1214,
12,
1214,
13,
1577,
1098,
18,
3804,
1435,
1390,
273,
18764,
18,
2188,
12,
1214,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5631,
1595,
3121,
12,
1214,
4672,
468,
336,
279,
666,
434,
1607,
1577,
1098,
273,
1140,
18,
1098,
1214,
12,
1214,
13,
1577,
1098,
18,
3804,
1435,
1390,
273,
18764,
18,
2188,
12,
1214,
... |
file.preamble[0:0] = conv[paperpackage] | file.preamble[0:0] = [conv[paperpackage]] | def remove_paperpackage(file): i = find_token(file.header, '\\paperpackage', 0) if i == -1: return paperpackage = split(file.header[i])[1] if paperpackage in ("a4", "a4wide", "widemarginsa4"): conv = {"a4":"\\usepackage{a4}","a4wide": "\\usepackage{a4wide}", "widemarginsa4": "\\usepackage[widemargins]{a4}"} # for compatibility we ensure it is the first entry in preamble file.preamble[0:0] = conv[paperpackage] del file.header[i] i = find_token(file.header, '\\papersize', 0) if i != -1: file.header[i] = "\\papersize default" | a0c546831e16fa90305c12b484d556abfcd0cb5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/a0c546831e16fa90305c12b484d556abfcd0cb5c/lyx_1_4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
27400,
5610,
12,
768,
4672,
277,
273,
1104,
67,
2316,
12,
768,
18,
3374,
16,
3718,
27400,
5610,
2187,
374,
13,
225,
309,
277,
422,
300,
21,
30,
327,
225,
15181,
5610,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
27400,
5610,
12,
768,
4672,
277,
273,
1104,
67,
2316,
12,
768,
18,
3374,
16,
3718,
27400,
5610,
2187,
374,
13,
225,
309,
277,
422,
300,
21,
30,
327,
225,
15181,
5610,
273,
... |
def isclass(k): return isinstance(k, (types.ClassType, types.TypeType)) classes = [val for name, val in inspect.getmembers(module, isclass)] return dsu(filter(ITestCase.implementedBy, classes), self.sorter) | classes = [] for name, val in inspect.getmembers(module): try: if ITestCase.implementedBy(val): classes.append(val) except TypeError: pass return dsu(classes, self.sorter) | def isclass(k): ## XXX -- work around. remove ASAP. ## inspect.isclass checks for ClassType and then if __bases__ ## is an attribute. ## t.conch.insults.text.CharacterAttributes has a (buggy?) __getattr__ ## which returns objects for any given attribute. Hence it has ## __bases__, hence, inspect.isclass believes instances to be classes. ## Remove this workaround and replace w/ inspect.isclass if ## CharacterAttributes is fixed. return isinstance(k, (types.ClassType, types.TypeType)) | 417900bbbba09deea35e44769fc548cebf7548eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/417900bbbba09deea35e44769fc548cebf7548eb/runner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28209,
12,
79,
4672,
7541,
11329,
1493,
1440,
6740,
18,
1206,
5355,
2203,
18,
7541,
5334,
18,
291,
1106,
4271,
364,
1659,
559,
471,
1508,
309,
1001,
18602,
972,
7541,
353,
392,
1566,
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,
28209,
12,
79,
4672,
7541,
11329,
1493,
1440,
6740,
18,
1206,
5355,
2203,
18,
7541,
5334,
18,
291,
1106,
4271,
364,
1659,
559,
471,
1508,
309,
1001,
18602,
972,
7541,
353,
392,
1566,
18,... |
wxWindow.SelectItem(self.uriDictMap[uri]) | wxWindow.SelectItem(wxWindow.uriDictMap[uri]) | def SelectUri(self, uri): """ Selects the proper uri when we have navigated to a different one via some tool other than the sideBar. """ wxWindow = app.association[id(self)] self.ignoreChangeSelect = true wxWindow.SelectItem(self.uriDictMap[uri]) self.ignoreChangeSelect = false | b7ad789081f8cbbd91fe44c53bc1d1f2fbd86294 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b7ad789081f8cbbd91fe44c53bc1d1f2fbd86294/SideBar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6766,
3006,
12,
2890,
16,
2003,
4672,
3536,
6766,
87,
326,
5338,
2003,
1347,
732,
1240,
290,
4911,
690,
358,
279,
3775,
1245,
3970,
2690,
5226,
1308,
2353,
326,
4889,
5190,
18,
3536,
707... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6766,
3006,
12,
2890,
16,
2003,
4672,
3536,
6766,
87,
326,
5338,
2003,
1347,
732,
1240,
290,
4911,
690,
358,
279,
3775,
1245,
3970,
2690,
5226,
1308,
2353,
326,
4889,
5190,
18,
3536,
707... |
self.sock.send(chr(c1)) self.sock.send(chr(c2)) self.sock.send(chr(c3)) self.sock.send(chr(c4)) | s = chr(c1) + chr(c2) + chr(c3) + chr(c4) self.sock.send(s) | def sendbyte(self, byte): nbyte = socket.htonl(byte) c1 = (nbyte >> 24) & 0xFF c2 = (nbyte >> 16) & 0xFF c3 = (nbyte >> 8) & 0xFF c4 = (nbyte >> 0) & 0xFF self.sock.send(chr(c1)) self.sock.send(chr(c2)) self.sock.send(chr(c3)) self.sock.send(chr(c4)) | a558529168a21392b06fa1d97be250b116343cc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3479/a558529168a21392b06fa1d97be250b116343cc9/ggzboard_net.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
7229,
12,
2890,
16,
1160,
4672,
290,
7229,
273,
2987,
18,
647,
265,
80,
12,
7229,
13,
276,
21,
273,
261,
82,
7229,
1671,
4248,
13,
473,
374,
6356,
276,
22,
273,
261,
82,
7229,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
7229,
12,
2890,
16,
1160,
4672,
290,
7229,
273,
2987,
18,
647,
265,
80,
12,
7229,
13,
276,
21,
273,
261,
82,
7229,
1671,
4248,
13,
473,
374,
6356,
276,
22,
273,
261,
82,
7229,
... |
if(language == "all"): return "all" | def GetSubLanguages(self,language): """Return all suported subtitles languages in a dictionary If language var is set, returns SubLanguageID for it """ | 2da448c0883c320332ef464827145e157b3bee3f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/2da448c0883c320332ef464827145e157b3bee3f/OSDBServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1676,
12912,
12,
2890,
16,
4923,
4672,
3536,
990,
777,
1169,
24726,
720,
17643,
8191,
316,
279,
3880,
971,
2653,
569,
353,
444,
16,
1135,
2592,
3779,
734,
364,
518,
3536,
2,
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,
968,
1676,
12912,
12,
2890,
16,
4923,
4672,
3536,
990,
777,
1169,
24726,
720,
17643,
8191,
316,
279,
3880,
971,
2653,
569,
353,
444,
16,
1135,
2592,
3779,
734,
364,
518,
3536,
2,
-100,
... | |
piece_list[pn] = piece_list[pn].replace(source_string, translated_string.decode('utf8')) | piece_list[pn] = piece_list[pn].replace(source_string, translated_string) | def _parse_text(self, text, level=None): if not level: level=[] res = self._regex.findall(text) todo = [] # translate the text # the "split [[]] if not match [[]]" is not very nice, but I # don't see how I could do it better... # what I'd like to do is a re.sub(NOT pattern, func, string) # but I don't know how to do that... # translate the RML file if 'lang' in self.localcontext: lang = self.localcontext['lang'] if lang and text and not text.isspace(): transl_obj = self.pool.get('ir.translation') piece_list = self._transl_regex.split(text) for pn in range(len(piece_list)): if not self._transl_regex.match(piece_list[pn]): source_string = piece_list[pn].replace('\n', ' ').strip() if len(source_string): translated_string = transl_obj._get_source(self.cr, self.uid, self.name, 'rml', lang, source_string) if translated_string: piece_list[pn] = piece_list[pn].replace(source_string, translated_string.decode('utf8')) text = ''.join(piece_list) for key in res: newtext = self._eval(key) for i in range(len(level)): if isinstance(newtext, list): newtext = newtext[level[i]] if isinstance(newtext, list): todo.append((key, newtext)) else: # if there are two [[]] blocks the same, it will replace both # but it's ok because it should evaluate to the same thing # anyway newtext = tools.ustr(newtext) text = text.replace('[['+key+']]', newtext) self._node.data = text if len(todo): for key, newtext in todo: parent_node = self._find_parent(self._node, parents) assert parents.get(parent_node.localName, False), 'No parent node found !' nodes = [parent_node] for i in range(len(newtext) - 1): newnode = parent_node.cloneNode(1) if parents.get(parent_node.localName, False): n = parent_node.parentNode parent_node.parentNode.insertAfter(newnode, parent_node) nodes.append(newnode) return False return text | 2d8f1c3a562d2736770fda601b1db154fc856872 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/2d8f1c3a562d2736770fda601b1db154fc856872/report_sxw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
955,
12,
2890,
16,
977,
16,
1801,
33,
7036,
4672,
309,
486,
1801,
30,
1801,
33,
8526,
400,
273,
365,
6315,
7584,
18,
4720,
454,
12,
955,
13,
10621,
273,
5378,
468,
420... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2670,
67,
955,
12,
2890,
16,
977,
16,
1801,
33,
7036,
4672,
309,
486,
1801,
30,
1801,
33,
8526,
400,
273,
365,
6315,
7584,
18,
4720,
454,
12,
955,
13,
10621,
273,
5378,
468,
420... |
self.cookiejar.save(self.cookiejar.filename) | try: self.cookiejar.save(self.cookiejar.filename) except e: log.error("Couldn't write cookiefile %s: %s" % \ (self.cookiejar.filename,str(e)) | def request(self, host, handler, request_body, verbose=0): h = self.make_connection(host) if verbose: h.set_debuglevel(1) | 2f5579929fe21479831b378a1dc5f0b561c346c0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5050/2f5579929fe21479831b378a1dc5f0b561c346c0/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
2890,
16,
1479,
16,
1838,
16,
590,
67,
3432,
16,
3988,
33,
20,
4672,
366,
273,
365,
18,
6540,
67,
4071,
12,
2564,
13,
309,
3988,
30,
366,
18,
542,
67,
4148,
2815,
12,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
2890,
16,
1479,
16,
1838,
16,
590,
67,
3432,
16,
3988,
33,
20,
4672,
366,
273,
365,
18,
6540,
67,
4071,
12,
2564,
13,
309,
3988,
30,
366,
18,
542,
67,
4148,
2815,
12,
21,
... |
[2 3 1] | [2 2 3] | def __call__(self, A): """ Create a Hill cipher. | 51cd7d320083a73fc73557afa79953365f6da7f1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/51cd7d320083a73fc73557afa79953365f6da7f1/classical.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
432,
4672,
3536,
1788,
279,
670,
737,
5867,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
432,
4672,
3536,
1788,
279,
670,
737,
5867,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
_('Where are replies to list messages directed? <tt>Poster</tt> is <em>strongly</em> recommended for most mailing lists.'), | _('''Where are replies to list messages directed? <tt>Poster</tt> is <em>strongly</em> recommended for most mailing lists.'''), | def GetConfigInfo(self): langs = self.GetAvailableLanguages() | d4117e2559487604b13fa55121d903681fad00c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/d4117e2559487604b13fa55121d903681fad00c3/MailList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26666,
966,
12,
2890,
4672,
26467,
273,
365,
18,
967,
5268,
12912,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26666,
966,
12,
2890,
4672,
26467,
273,
365,
18,
967,
5268,
12912,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
l.grid(row=self.row, col=0, sticky="w") | l.grid(row=self.row, column=0, sticky="w") | def make_entry(self, label, var): l = Label(self.top, text=label) l.grid(row=self.row, col=0, sticky="w") e = Entry(self.top, textvariable=var, exportselection=0) e.grid(row=self.row, col=1, sticky="we") self.row = self.row + 1 return e | eb58f5d6cdc3d693eedc40229a5f161babf6920a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eb58f5d6cdc3d693eedc40229a5f161babf6920a/SearchDialogBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
4099,
12,
2890,
16,
1433,
16,
569,
4672,
328,
273,
5287,
12,
2890,
18,
3669,
16,
977,
33,
1925,
13,
328,
18,
5222,
12,
492,
33,
2890,
18,
492,
16,
1057,
33,
20,
16,
21750... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
4099,
12,
2890,
16,
1433,
16,
569,
4672,
328,
273,
5287,
12,
2890,
18,
3669,
16,
977,
33,
1925,
13,
328,
18,
5222,
12,
492,
33,
2890,
18,
492,
16,
1057,
33,
20,
16,
21750... |
proj.window = window = float(dicom.image.window) proj.level = level = float(dicom.image.level) | proj.window = window proj.level = level | def ImportDirectory(self, pubsub_evt=None, dir_=None): """ Import medical images (if any) and generate vtkImageData, saving data inside Project instance. """ | 1dfad6a762fd4fc3cef64f2679aa8af6b4291b4b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/1dfad6a762fd4fc3cef64f2679aa8af6b4291b4b/control.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
2853,
12,
2890,
16,
23288,
67,
73,
11734,
33,
7036,
16,
1577,
67,
33,
7036,
4672,
3536,
6164,
6735,
1706,
4602,
261,
430,
1281,
13,
471,
2103,
13659,
2040,
751,
16,
12392,
501,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
2853,
12,
2890,
16,
23288,
67,
73,
11734,
33,
7036,
16,
1577,
67,
33,
7036,
4672,
3536,
6164,
6735,
1706,
4602,
261,
430,
1281,
13,
471,
2103,
13659,
2040,
751,
16,
12392,
501,
4... |
f = StringIO(txt) import HyperArch h = HyperArch.HyperArchive(self) h.processUnixMailbox(f, HyperArch.Article) h.close() f.close() | private_p = self.archive_private if mm_cfg.PUBLIC_EXTERNAL_ARCHIVER and not private_p: self.ExternalArchive(mm_cfg.PUBLIC_EXTERNAL_ARCHIVER, txt) elif mm_cfg.PRIVATE_EXTERNAL_ARCHIVER and private_p: self.ExternalArchive(mm_cfg.PRIVATE_EXTERNAL_ARCHIVER, txt) else: f = StringIO(txt) import HyperArch h = HyperArch.HyperArchive(self) h.processUnixMailbox(f, HyperArch.Article) h.close() f.close() | def ArchiveMail(self, msg): """Store postings in mbox and/or pipermail archive, depending.""" | e2febc2b7abfbd1e8e62e5281f93db263feab828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/e2febc2b7abfbd1e8e62e5281f93db263feab828/Archiver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13124,
6759,
12,
2890,
16,
1234,
4672,
3536,
2257,
1603,
899,
316,
312,
2147,
471,
19,
280,
4790,
457,
4408,
5052,
16,
8353,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
13124,
6759,
12,
2890,
16,
1234,
4672,
3536,
2257,
1603,
899,
316,
312,
2147,
471,
19,
280,
4790,
457,
4408,
5052,
16,
8353,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
tzi = TimeZoneInfo( 'Mountain Standard Time' ) MissingTZPatch = datetime.datetime( 2007,11,2,tzinfo=tzi ).utctimetuple() != (2007,11,2,6,0,0,4,306,0) DynamicTZSupport = not MissingTZPatch and datetime.datetime( 2003,11,2,tzinfo=tzi).utctimetuple() == (2003,11,2,7,0,0,6,306,0) | tzi = TimeZoneInfo('Mountain Standard Time') MissingTZPatch = datetime.datetime(2007,11,2,tzinfo=tzi).utctimetuple() != (2007,11,2,6,0,0,4,306,0) DynamicTZSupport = not MissingTZPatch and datetime.datetime(2003,11,2,tzinfo=tzi).utctimetuple() == (2003,11,2,7,0,0,6,306,0) | def GetTZCapabilities(): """Run a few known tests to determine the capabilities of the time zone database on this machine. Note Dynamic Time Zone support is not available on any platform at this time; this is a limitation of this library, not the platform.""" tzi = TimeZoneInfo( 'Mountain Standard Time' ) MissingTZPatch = datetime.datetime( 2007,11,2,tzinfo=tzi ).utctimetuple() != (2007,11,2,6,0,0,4,306,0) DynamicTZSupport = not MissingTZPatch and datetime.datetime( 2003,11,2,tzinfo=tzi).utctimetuple() == (2003,11,2,7,0,0,6,306,0) del tzi return vars() | 59648a863c896e2f14363d0c28a25b3865360d9a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/992/59648a863c896e2f14363d0c28a25b3865360d9a/win32timezone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
21647,
14012,
13332,
3536,
1997,
279,
11315,
4846,
7434,
358,
4199,
326,
12359,
434,
326,
813,
4157,
2063,
603,
333,
5228,
18,
3609,
12208,
2647,
10912,
2865,
353,
486,
2319,
603,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21647,
14012,
13332,
3536,
1997,
279,
11315,
4846,
7434,
358,
4199,
326,
12359,
434,
326,
813,
4157,
2063,
603,
333,
5228,
18,
3609,
12208,
2647,
10912,
2865,
353,
486,
2319,
603,
128... |
if not self.data_matrix and self.turn_into_array: | """ 2008-06-02 correct a bug here, opposite judgement of self.data_matrix """ if self.data_matrix and self.turn_into_array: | def processRowIDColID(self): if not self.data_matrix and self.turn_into_array: self.data_matrix = num.array(self.data_matrix, num.int8) if self.row_id_ls is None and self.strain_acc_list is not None: self.row_id_ls = [] for i in range(len(self.strain_acc_list)): if self.category_list is not None: row_id = (self.strain_acc_list[i], self.category_list[i]) else: row_id = self.strain_acc_list[i] self.row_id_ls.append(row_id) if self.col_id_ls is None and self.header is not None: self.col_id_ls = [] for i in range(2,len(self.header)): col_id = self.header[i] self.col_id_ls.append(col_id) | 3137954729780f17e488e528592538abf552c064 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/3137954729780f17e488e528592538abf552c064/SNP.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1999,
734,
914,
734,
12,
2890,
4672,
3536,
4044,
28,
17,
7677,
17,
3103,
3434,
279,
7934,
2674,
16,
20759,
525,
1100,
75,
820,
434,
365,
18,
892,
67,
5667,
3536,
309,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1999,
734,
914,
734,
12,
2890,
4672,
3536,
4044,
28,
17,
7677,
17,
3103,
3434,
279,
7934,
2674,
16,
20759,
525,
1100,
75,
820,
434,
365,
18,
892,
67,
5667,
3536,
309,
365,
18,
... |
"""Returns maximum exponent (= Emin - prec + 1)""" | """Returns maximum exponent (= Emax - prec + 1)""" | def Etop(self): """Returns maximum exponent (= Emin - prec + 1)""" return int(self.Emax - self.prec + 1) | 7668379fdb08b387cb5d4fdf6978fec3901fa44a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7668379fdb08b387cb5d4fdf6978fec3901fa44a/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
512,
3669,
12,
2890,
4672,
3536,
1356,
4207,
9100,
261,
33,
512,
1896,
300,
13382,
397,
404,
15574,
327,
509,
12,
2890,
18,
1514,
651,
300,
365,
18,
4036,
397,
404,
13,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
512,
3669,
12,
2890,
4672,
3536,
1356,
4207,
9100,
261,
33,
512,
1896,
300,
13382,
397,
404,
15574,
327,
509,
12,
2890,
18,
1514,
651,
300,
365,
18,
4036,
397,
404,
13,
2,
-100,
-100,
... |
return None | return self.OnAction(cid, item, data) | def OnItem(self, action, data, match=None): #Item: 3 ut_item_helmet #Item: 0 team_CTF_redflag cid, item = string.split(data, ' ', 1) client = self.clients.getByCID(cid) if client: #correct flag/bomb-pickups if 'flag' in item or 'bomb' in item: self.OnAction(cid, item, data) self.verbose('Itempickup corrected to action: %s' %item) return None #self.verbose('OnItem: %s picked up %s' % (client.name, item) ) return b3.events.Event(b3.events.EVT_CLIENT_ITEM_PICKUP, item, client) return None | 18cfe2dbe85be73e8cc735c383a57c6e18a8a390 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12909/18cfe2dbe85be73e8cc735c383a57c6e18a8a390/iourt41.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
1180,
12,
2890,
16,
1301,
16,
501,
16,
845,
33,
7036,
4672,
468,
1180,
30,
890,
5218,
67,
1726,
67,
76,
292,
10578,
468,
1180,
30,
374,
5927,
67,
1268,
42,
67,
1118,
6420,
7504... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
1180,
12,
2890,
16,
1301,
16,
501,
16,
845,
33,
7036,
4672,
468,
1180,
30,
890,
5218,
67,
1726,
67,
76,
292,
10578,
468,
1180,
30,
374,
5927,
67,
1268,
42,
67,
1118,
6420,
7504... |
dir = makepath(dir) if dir not in L: | dir, dircase = makepath(dir) if not dirs_in_sys_path.has_key(dircase): | def makepath(*paths): dir = os.path.join(*paths) return os.path.normcase(os.path.abspath(dir)) | c4ce4db3160f9a22a1062ef98f6390b7bfe4e61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c4ce4db3160f9a22a1062ef98f6390b7bfe4e61d/site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
803,
30857,
4481,
4672,
1577,
273,
1140,
18,
803,
18,
5701,
30857,
4481,
13,
327,
1140,
18,
803,
18,
7959,
3593,
12,
538,
18,
803,
18,
5113,
803,
12,
1214,
3719,
225,
2,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
803,
30857,
4481,
4672,
1577,
273,
1140,
18,
803,
18,
5701,
30857,
4481,
13,
327,
1140,
18,
803,
18,
7959,
3593,
12,
538,
18,
803,
18,
5113,
803,
12,
1214,
3719,
225,
2,
-100,
... |
representative of an element of SL_2(Z) modulo G. This function specfically returns data needed for the first part of the reduction step (the first coordinate). | representative of an element of SL_2(Z) modulo G. This function specfically returns data needed for the first part of the reduction step (the first coordinate). | def _coset_reduction_data_first_coord(G): """ Compute data used for determining the canonical coset representative of an element of SL_2(Z) modulo G. This function specfically returns data needed for the first part of the reduction step (the first coordinate). | eb301dff111c888467560bbc7545e7b8e22d5329 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/eb301dff111c888467560bbc7545e7b8e22d5329/congroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14445,
278,
67,
1118,
4062,
67,
892,
67,
3645,
67,
5732,
12,
43,
4672,
3536,
8155,
501,
1399,
364,
23789,
326,
7378,
4987,
278,
23174,
434,
392,
930,
434,
348,
48,
67,
22,
12,
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,
389,
14445,
278,
67,
1118,
4062,
67,
892,
67,
3645,
67,
5732,
12,
43,
4672,
3536,
8155,
501,
1399,
364,
23789,
326,
7378,
4987,
278,
23174,
434,
392,
930,
434,
348,
48,
67,
22,
12,
6... |
"""equlizer settings""" if FC().is_eq_enable: pre = self.controls.eq.get_preamp() bands = self.controls.eq.get_bands() self.set_all_bands(pre, bands) | def play(self, bean): self.bean = bean if not bean: return None path = bean.path | 7d4044fa942b3eae98b34c9d771de0b8f1a4da28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/7d4044fa942b3eae98b34c9d771de0b8f1a4da28/gstreamer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
16,
3931,
4672,
365,
18,
14496,
273,
3931,
309,
486,
3931,
30,
327,
599,
589,
273,
3931,
18,
803,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
16,
3931,
4672,
365,
18,
14496,
273,
3931,
309,
486,
3931,
30,
327,
599,
589,
273,
3931,
18,
803,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
for state, mapper, connection, has_identity, instance_key in tups: | for state, mapper, connection, has_identity, \ instance_key, row_switch in tups: | def _save_obj(self, states, uowtransaction, postupdate=False, post_update_cols=None, single=False): """Issue ``INSERT`` and/or ``UPDATE`` statements for a list of objects. | dfab13e9ae147a7112a23db5abc4e4b7addc00fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/dfab13e9ae147a7112a23db5abc4e4b7addc00fa/mapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5688,
67,
2603,
12,
2890,
16,
5493,
16,
18215,
7958,
16,
1603,
2725,
33,
8381,
16,
1603,
67,
2725,
67,
6842,
33,
7036,
16,
2202,
33,
8381,
4672,
3536,
12956,
12176,
11356,
10335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5688,
67,
2603,
12,
2890,
16,
5493,
16,
18215,
7958,
16,
1603,
2725,
33,
8381,
16,
1603,
67,
2725,
67,
6842,
33,
7036,
16,
2202,
33,
8381,
4672,
3536,
12956,
12176,
11356,
10335,
... |
The least common multiple of a and b, or if a is a list and b is omitted the least common multiple of all elements of v. | The least common multiple of a and b, or, if a is a list and b is omitted, the least common multiple of all elements of a. | def lcm(a, b=None, integer=False): """ The least common multiple of a and b, or if a is a list and b is omitted the least common multiple of all elements of v. NOTE: Use integer=True to make this vastly faster if you are working with lists of integers. INPUT: a -- number b -- number (optional) integer -- (default: False); if True, do an integer LCM or v -- vector integer -- (default: False); if True, do an integer LCM NOTE -- this is *vastly* faster than doing the generic LCM EXAMPLES: sage: LCM(97,100) 9700 sage: LCM(0,2) 0 sage: LCM(-3,-5) 15 sage: LCM([1,2,3,4,5/3]) 60 sage: v = LCM(range(1,10000),integer=True) # *very* fast! sage: len(str(v)) 4349 """ if integer: if isinstance(a,(list,tuple)): return sage.rings.integer.LCM_list(a) else: return integer_ring.ZZ(a).lcm(\ integer_ring.ZZ(b)) if isinstance(a, (list,tuple)): return __LCM_list(a) if not isinstance(a, RingElement): a = integer_ring.ZZ(a) return a.lcm(b) | bdc03f71082d359479de239409797484223e36e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/bdc03f71082d359479de239409797484223e36e0/arith.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
328,
7670,
12,
69,
16,
324,
33,
7036,
16,
3571,
33,
8381,
4672,
3536,
1021,
4520,
2975,
3229,
434,
279,
471,
324,
16,
578,
16,
309,
279,
353,
279,
666,
471,
324,
353,
16195,
16,
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,
328,
7670,
12,
69,
16,
324,
33,
7036,
16,
3571,
33,
8381,
4672,
3536,
1021,
4520,
2975,
3229,
434,
279,
471,
324,
16,
578,
16,
309,
279,
353,
279,
666,
471,
324,
353,
16195,
16,
326,... |
if not res['OK']: return res return res['Value'] | end = time.time() oDataOperation.setEndTime() oDataOperation.setValueByKey('TransferTime',end-start) if not res['OK']: oDataOperation.setValueByKey('TransferOK',0) oDataOperation.setValueByKey('FinalStatus','Failed') res['AccountingOperation'] = oDataOperation return res res = res['Value'] if not res['OK']: oDataOperation.setValueByKey('TransferOK',0) oDataOperation.setValueByKey('FinalStatus','Failed') res['AccountingOperation'] = oDataOperation return res | def __gfal_operation_wrapper(self,operation,gfalDict,srmRequestID=None): | 84d28999c850ebcc648557ccda78869a09c24615 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/84d28999c850ebcc648557ccda78869a09c24615/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
75,
74,
287,
67,
7624,
67,
8376,
12,
2890,
16,
7624,
16,
75,
74,
287,
5014,
16,
87,
8864,
691,
734,
33,
7036,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
75,
74,
287,
67,
7624,
67,
8376,
12,
2890,
16,
7624,
16,
75,
74,
287,
5014,
16,
87,
8864,
691,
734,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.setWSS(value) self.setSlowBlank(value) | self.setAspectWSS(value) self.setAspectSlowBlank(value) | def setAspectRatio(self, value): eAVSwitch.getInstance().setAspectRatio(value) self.setWSS(value) self.setSlowBlank(value) | 05626c8692bb0775f993ee23494926b21c266eac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/05626c8692bb0775f993ee23494926b21c266eac/AVSwitch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
17468,
8541,
12,
2890,
16,
460,
4672,
425,
5856,
10200,
18,
588,
1442,
7675,
542,
17468,
8541,
12,
1132,
13,
365,
18,
542,
59,
1260,
12,
1132,
13,
365,
18,
542,
28733,
7796,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
17468,
8541,
12,
2890,
16,
460,
4672,
425,
5856,
10200,
18,
588,
1442,
7675,
542,
17468,
8541,
12,
1132,
13,
365,
18,
542,
59,
1260,
12,
1132,
13,
365,
18,
542,
28733,
7796,
12,
... |
if p_indices is not None: assert len(p_indices) == 1 else: p_indices = [first_idx] points.append((0,0, z)) | p_indices = (first_idx,) points.append((0,0, z)) | def gen_ring(ring_idx, r, z): p_indices = None if ring_point_indices is not None: p_indices = ring_point_indices[ring_idx] | 3ced297c55913885e4b6094b0c0e25c20e66ad10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11985/3ced297c55913885e4b6094b0c0e25c20e66ad10/tet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
8022,
12,
8022,
67,
3465,
16,
436,
16,
998,
4672,
293,
67,
6836,
273,
599,
309,
9221,
67,
1153,
67,
6836,
353,
486,
599,
30,
293,
67,
6836,
273,
9221,
67,
1153,
67,
6836,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3157,
67,
8022,
12,
8022,
67,
3465,
16,
436,
16,
998,
4672,
293,
67,
6836,
273,
599,
309,
9221,
67,
1153,
67,
6836,
353,
486,
599,
30,
293,
67,
6836,
273,
9221,
67,
1153,
67,
6836,
... |
_socket.ssl = ssl | def patch_socket(dns=True): from gevent.socket import socket, fromfd, ssl, socketpair _socket = __import__('socket') _socket.socket = socket _socket.fromfd = fromfd _socket.ssl = ssl _socket.socketpair = socketpair if dns: patch_dns() | 73b5936f3cae849d319600a0b180804a2f963f1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10423/73b5936f3cae849d319600a0b180804a2f963f1c/monkey.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
67,
7814,
12,
14926,
33,
5510,
4672,
628,
314,
2575,
18,
7814,
1930,
2987,
16,
628,
8313,
16,
5832,
16,
2987,
6017,
389,
7814,
273,
1001,
5666,
972,
2668,
7814,
6134,
389,
7814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
67,
7814,
12,
14926,
33,
5510,
4672,
628,
314,
2575,
18,
7814,
1930,
2987,
16,
628,
8313,
16,
5832,
16,
2987,
6017,
389,
7814,
273,
1001,
5666,
972,
2668,
7814,
6134,
389,
7814,
... | |
def fl_get_formbrowser_area(ob, x, y, w, h): """ fl_get_formbrowser_area(ob, x, y, w, h) -> num. """ retval = _fl_get_formbrowser_area(ob, x, y, w, h) | def fl_get_formbrowser_area(pObject, x, y, w, h): """ fl_get_formbrowser_area(pObject, x, y, w, h) -> num. """ retval = _fl_get_formbrowser_area(pObject, x, y, w, h) | def fl_get_formbrowser_area(ob, x, y, w, h): """ fl_get_formbrowser_area(ob, x, y, w, h) -> num. """ retval = _fl_get_formbrowser_area(ob, x, y, w, h) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
588,
67,
687,
11213,
67,
5036,
12,
84,
921,
16,
619,
16,
677,
16,
341,
16,
366,
4672,
3536,
1183,
67,
588,
67,
687,
11213,
67,
5036,
12,
84,
921,
16,
619,
16,
677,
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,
1183,
67,
588,
67,
687,
11213,
67,
5036,
12,
84,
921,
16,
619,
16,
677,
16,
341,
16,
366,
4672,
3536,
1183,
67,
588,
67,
687,
11213,
67,
5036,
12,
84,
921,
16,
619,
16,
677,
16,
... |
Return the residue characteristic of self, i.e. the prime p such that this is a p-adic space. | Return the residue characteristic of self, i.e. the prime `p` such that this is a `p`-adic space. | def prime(self): r""" Return the residue characteristic of self, i.e. the prime p such that this is a p-adic space. | b526c3d210b712e2659f9ba0fab589c5ff5e9564 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/b526c3d210b712e2659f9ba0fab589c5ff5e9564/genus0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17014,
12,
2890,
4672,
436,
8395,
2000,
326,
14765,
23158,
434,
365,
16,
277,
18,
73,
18,
326,
17014,
293,
4123,
716,
333,
353,
279,
293,
17,
20333,
3476,
18,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17014,
12,
2890,
4672,
436,
8395,
2000,
326,
14765,
23158,
434,
365,
16,
277,
18,
73,
18,
326,
17014,
293,
4123,
716,
333,
353,
279,
293,
17,
20333,
3476,
18,
2,
-100,
-100,
-100,
-100... |
if filename == '<string>' and mainpyfile: filename = mainpyfile | if filename == '<string>' and self.mainpyfile: filename = self.mainpyfile | def defaultFile(self): """Produce a reasonable default.""" filename = self.curframe.f_code.co_filename if filename == '<string>' and mainpyfile: filename = mainpyfile return filename | 395f3ef345f02d02734ed4aa5c409f3875cf0504 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/395f3ef345f02d02734ed4aa5c409f3875cf0504/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
812,
12,
2890,
4672,
3536,
25884,
279,
23589,
805,
12123,
1544,
273,
365,
18,
1397,
3789,
18,
74,
67,
710,
18,
2894,
67,
3459,
309,
1544,
422,
2368,
1080,
1870,
471,
365,
18,
5254... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
805,
812,
12,
2890,
4672,
3536,
25884,
279,
23589,
805,
12123,
1544,
273,
365,
18,
1397,
3789,
18,
74,
67,
710,
18,
2894,
67,
3459,
309,
1544,
422,
2368,
1080,
1870,
471,
365,
18,
5254... |
c = connection.execute("describe " + table.fullname, {}) | rp = connection.execute("describe " + self._escape_table_name(table), {}) | def reflecttable(self, connection, table): # reference: http://dev.mysql.com/doc/refman/5.0/en/name-case-sensitivity.html cs = connection.execute("show variables like 'lower_case_table_names'").fetchone()[1] if isinstance(cs, array): cs = cs.tostring() case_sensitive = int(cs) == 0 | 81f42181f431eb8ea96c94ee8a2d798f11a296e7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/81f42181f431eb8ea96c94ee8a2d798f11a296e7/mysql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3037,
2121,
12,
2890,
16,
1459,
16,
1014,
4672,
468,
2114,
30,
225,
1062,
2207,
5206,
18,
12527,
18,
832,
19,
2434,
19,
1734,
4728,
19,
25,
18,
20,
19,
275,
19,
529,
17,
3593,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3037,
2121,
12,
2890,
16,
1459,
16,
1014,
4672,
468,
2114,
30,
225,
1062,
2207,
5206,
18,
12527,
18,
832,
19,
2434,
19,
1734,
4728,
19,
25,
18,
20,
19,
275,
19,
529,
17,
3593,
17,
... |
if i.depth >= max_depth: father = i max_depth = i.depth if father: father.add_child(name) else: | i.add_child(name) if not deps: | def add_node(self, name, deps): max_depth, father = 0, None for i in [Node(x, self) for x in deps]: if i.depth >= max_depth: father = i max_depth = i.depth if father: father.add_child(name) else: Node(name, self) | 9e182ca8855d2a70434760dbccf7e601872dd1b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/9e182ca8855d2a70434760dbccf7e601872dd1b0/module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2159,
12,
2890,
16,
508,
16,
8740,
4672,
943,
67,
5979,
16,
284,
4806,
273,
374,
16,
599,
364,
277,
316,
306,
907,
12,
92,
16,
365,
13,
364,
619,
316,
8740,
14542,
277,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2159,
12,
2890,
16,
508,
16,
8740,
4672,
943,
67,
5979,
16,
284,
4806,
273,
374,
16,
599,
364,
277,
316,
306,
907,
12,
92,
16,
365,
13,
364,
619,
316,
8740,
14542,
277,
18... |
def parse(self): | def parse(self,type_regex=None): | def parse(self): """ Each line of the frame cache file is like the following: | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
723,
67,
7584,
33,
7036,
4672,
3536,
8315,
980,
434,
326,
2623,
1247,
585,
353,
3007,
326,
3751,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
723,
67,
7584,
33,
7036,
4672,
3536,
8315,
980,
434,
326,
2623,
1247,
585,
353,
3007,
326,
3751,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sage: K = Qp(13,7) sage: R.<t> = K[] sage: R([K(13), K(1)]) (1 + O(13^7))*t + (13 + O(13^8)) sage: T.<t> = ZZ[] sage: R(t + 2) (1 + O(13^7))*t + (2 + O(13^7)) | sage: K = Qp(13,7) sage: R.<t> = K[] sage: R([K(13), K(1)]) (1 + O(13^7))*t + (13 + O(13^8)) sage: T.<t> = ZZ[] sage: R(t + 2) (1 + O(13^7))*t + (2 + O(13^7)) | def __init__(self, parent, x=None, check=True, is_gen=False, construct = False, absprec = infinity, relprec = infinity): """ TESTS: sage: K = Qp(13,7) sage: R.<t> = K[] sage: R([K(13), K(1)]) (1 + O(13^7))*t + (13 + O(13^8)) sage: T.<t> = ZZ[] sage: R(t + 2) (1 + O(13^7))*t + (2 + O(13^7)) """ Polynomial.__init__(self, parent, is_gen=is_gen) if construct: (self._poly, self._valbase, self._relprecs, self._normalized, self._valaddeds, self._list) = x #the last two of these may be None return | 25e51da7a32c89efd830c94e464c8a3b58021062 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/25e51da7a32c89efd830c94e464c8a3b58021062/polynomial_padic_capped_relative_dense.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
619,
33,
7036,
16,
866,
33,
5510,
16,
353,
67,
4507,
33,
8381,
16,
4872,
273,
1083,
16,
2417,
4036,
273,
27272,
16,
1279,
4036,
273,
27272,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
619,
33,
7036,
16,
866,
33,
5510,
16,
353,
67,
4507,
33,
8381,
16,
4872,
273,
1083,
16,
2417,
4036,
273,
27272,
16,
1279,
4036,
273,
27272,
46... |
if os.sep in unicode(path): | path = unicode(path) if os.sep in path: | def open_book_path(self, path): if os.sep in unicode(path): open_local_file(path) else: format = unicode(path) path = self.view.model().db.format_abspath(self.current_row, format) if path is not None: open_local_file(path) | 233baa63c6de7f2f45ad23cd53a4e74929330e3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/233baa63c6de7f2f45ad23cd53a4e74929330e3b/book_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
3618,
67,
803,
12,
2890,
16,
589,
4672,
589,
273,
5252,
12,
803,
13,
309,
1140,
18,
10814,
316,
589,
30,
1696,
67,
3729,
67,
768,
12,
803,
13,
469,
30,
740,
273,
5252,
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,
1696,
67,
3618,
67,
803,
12,
2890,
16,
589,
4672,
589,
273,
5252,
12,
803,
13,
309,
1140,
18,
10814,
316,
589,
30,
1696,
67,
3729,
67,
768,
12,
803,
13,
469,
30,
740,
273,
5252,
12... |
(o_descr,d_descr)=hlr_utils.get_descr(obj) | o_descr = hlr_utils.get_descr(obj) | def rebin_axis_1D(obj,axis_out): """ This function rebins the primary axis for a SOM or a SO based on the given NessiList axis. Parameters: ---------- -> obj is the SOM or SO to be rebinned -> axis_out is a NessiList containing the axis to rebin the SOM or SO to Returns: ------- <- A SOM or SO that has been rebinned according to the provided axis Exceptions: ---------- <- TypeError is raised if the rebinning axis given is not a NessiList <- TypeError is raised if object being rebinned is not a SOM or a SO """ # import the helper functions import hlr_utils # set up for working through data try: axis_out.__type__ except AttributeError: raise TypeError, "Rebinning axis must be a NessiList!" (o_descr,d_descr)=hlr_utils.get_descr(obj) if o_descr == "number" or o_descr == "list": raise TypeError, "Do not know how to handle given type: %s" %\ o_descr else: pass (result,res_descr)=hlr_utils.empty_result(obj) result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) # iterate through the values import axis_manip for i in range(hlr_utils.get_length(obj)): axis_in = hlr_utils.get_value(obj,i,o_descr,"x",0) val = hlr_utils.get_value(obj,i,o_descr) err2 = hlr_utils.get_err2(obj,i,o_descr) value=axis_manip.rebin_axis_1D(axis_in, val, err2, axis_out) xvals=[] xvals.append(axis_out) map_so = hlr_utils.get_map_so(obj,None,i) hlr_utils.result_insert(result,res_descr,value,map_so,"all",0,xvals) return result | 766ac4ad90bc5477427ed44f10694c1d5e7af5bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/766ac4ad90bc5477427ed44f10694c1d5e7af5bd/hlr_rebin_axis_1D.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
4757,
67,
4890,
67,
21,
40,
12,
2603,
16,
4890,
67,
659,
4672,
3536,
1220,
445,
283,
11862,
326,
3354,
2654,
364,
279,
348,
1872,
578,
279,
7460,
2511,
603,
326,
864,
423,
403,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
4757,
67,
4890,
67,
21,
40,
12,
2603,
16,
4890,
67,
659,
4672,
3536,
1220,
445,
283,
11862,
326,
3354,
2654,
364,
279,
348,
1872,
578,
279,
7460,
2511,
603,
326,
864,
423,
403,
... |
return None | return self if not group_decl.modelGroup().isDeepResolved(): self._queueForResolution() return self | def _resolve (self): if self.isResolved(): return self node = self.__domNode context = self._context() scope = self._scope() ref_attr = NodeAttribute(node, 'ref') if xsd.nodeIsNamed(node, 'group'): # 3.9.2 says use 3.8.2, which is ModelGroup. The group # inside a particle is a groupRef. If there is no group # with that name, this throws an exception as expected. if ref_attr is None: raise pyxb.SchemaValidationError('group particle without reference') # Named groups can only appear at global scope, so no need # to use context here. (ref_ns, ref_ln) = self._namespaceContext().interpretQName(ref_attr) group_decl = ref_ns.modelGroupDefinitions().get(ref_ln) if group_decl is None: self._queueForResolution() return None | 97a23ffbe2ae0cfebd28adc717e68c09e968c8d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/97a23ffbe2ae0cfebd28adc717e68c09e968c8d8/structures.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
261,
2890,
4672,
309,
365,
18,
291,
12793,
13332,
327,
365,
756,
273,
365,
16186,
9859,
907,
819,
273,
365,
6315,
2472,
1435,
2146,
273,
365,
6315,
4887,
1435,
1278,
67,
1747... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
261,
2890,
4672,
309,
365,
18,
291,
12793,
13332,
327,
365,
756,
273,
365,
16186,
9859,
907,
819,
273,
365,
6315,
2472,
1435,
2146,
273,
365,
6315,
4887,
1435,
1278,
67,
1747... |
if mainobject is object: return main except AttributeError: pass | if mainobject is object: return main | def getmodule(object): """Try to guess which module an object was defined in.""" if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] for module in sys.modules.values(): if hasattr(module, '__file__'): modulesbyfile[getabsfile(module)] = module.__name__ if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] main = sys.modules['__main__'] try: mainobject = getattr(main, object.__name__) if mainobject is object: return main except AttributeError: pass builtin = sys.modules['__builtin__'] try: builtinobject = getattr(builtin, object.__name__) if builtinobject is object: return builtin except AttributeError: pass | 6519d6f0567d77a800a040af43cf26e8f0a25324 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6519d6f0567d77a800a040af43cf26e8f0a25324/inspect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
2978,
12,
1612,
4672,
3536,
7833,
358,
7274,
1492,
1605,
392,
733,
1703,
2553,
316,
12123,
309,
28209,
12,
1612,
4672,
327,
2589,
18,
6400,
18,
588,
12,
1612,
16186,
2978,
972,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2978,
12,
1612,
4672,
3536,
7833,
358,
7274,
1492,
1605,
392,
733,
1703,
2553,
316,
12123,
309,
28209,
12,
1612,
4672,
327,
2589,
18,
6400,
18,
588,
12,
1612,
16186,
2978,
972,
13,
... |
if flags&records: | if flags&RECORDS: | def __init__(self, stdin, environ, response, clean=0, # "static" variables that we want to be local for speed SEQUENCE=1, DEFAULT=2, RECORD=4, RECORDS=8, REC=12, # RECORD|RECORDS EMPTY=16, CONVERTED=32, hasattr=hasattr, getattr=getattr, setattr=setattr, search_type=regex.compile( ':[a-zA-Z][a-zA-Z0-9_]+$' ).search, rfind=string.rfind, ): # Avoid the overhead of scrubbing the environment in the # case of request cloning for traversal purposes. If the # clean flag is set, we know we can use the passed in # environ dict directly. | 61eaceb62f9e9cbb359b1947fb1d0a2c8c506379 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/61eaceb62f9e9cbb359b1947fb1d0a2c8c506379/HTTPRequest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
8801,
16,
5473,
16,
766,
16,
2721,
33,
20,
16,
468,
315,
3845,
6,
3152,
716,
732,
2545,
358,
506,
1191,
364,
8632,
27118,
33,
21,
16,
3331,
33,
22,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
8801,
16,
5473,
16,
766,
16,
2721,
33,
20,
16,
468,
315,
3845,
6,
3152,
716,
732,
2545,
358,
506,
1191,
364,
8632,
27118,
33,
21,
16,
3331,
33,
22,
1... |
@param where: The type of page for which a navigation bar should be generated. Possible values are C{'class'}, C{'module'}, C{'package'}, C{'tree'}, C{'index'}, and C{'help'}. @type where: C{string} | @param where: An identifier indicating what page we're creating a navigation bar for. This is either a UID (for an object documentation page); or one of the strings C{'tree'}, C{'index'}, and C{'help'}. @type where: C{UID} or C{string} @param top: Whether this is the navigation bar at the top of the page. @type top: C{boolean} | def _navbar(self, where, uid=None): """ @return: The HTML code for a navigation bar on the given type of page. The navigation bar typically looks like:: [ Package Module Class Tree Index Help ] @rtype: C{string} @param where: The type of page for which a navigation bar should be generated. Possible values are C{'class'}, C{'module'}, C{'package'}, C{'tree'}, C{'index'}, and C{'help'}. @type where: C{string} """ str = self._start_of('Navbar') str += '<table class="navbar" border="0" width="100%"' str += ' cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">\n' str += ' <tr>\n' str += ' <td width="100%">\n' str += ' <table border="0" cellpadding="0" cellspacing="0">\n' str += ' <tr valign="top">\n' | 60b4598f963657af72659f4c3492b6028c51c37e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/60b4598f963657af72659f4c3492b6028c51c37e/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11589,
3215,
12,
2890,
16,
1625,
16,
4555,
33,
7036,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
10394,
4653,
603,
326,
864,
618,
434,
1363,
18,
225,
1021,
10394,
4653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11589,
3215,
12,
2890,
16,
1625,
16,
4555,
33,
7036,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
10394,
4653,
603,
326,
864,
618,
434,
1363,
18,
225,
1021,
10394,
4653,
... |
unlink(file2) error = system(SWFRENDER + " /tmp/test.swf -o %s" % file2) | unlink(file) error = system(SWFRENDER + " /tmp/test.swf -o %s" % file) | def runtools(self, filename, page, file1, file2, file12): | a822c33ef7e2df2abe7cf982020aac1c739f8445 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5722/a822c33ef7e2df2abe7cf982020aac1c739f8445/testpdfs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
6642,
12,
2890,
16,
1544,
16,
1363,
16,
585,
21,
16,
585,
22,
16,
585,
2138,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
6642,
12,
2890,
16,
1544,
16,
1363,
16,
585,
21,
16,
585,
22,
16,
585,
2138,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
rstack.resume_point("CALL_METHOD", f, returns=w_result) | rstack.resume_point("CALL_METHOD", f, w_self, returns=w_result) | def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue(n_args + (2 * n_kwargs)) w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) n = n_args + (w_self is not None) if not n_kwargs: try: w_result = f.space.call_valuestack(w_callable, n, f) rstack.resume_point("CALL_METHOD", f, n_args, returns=w_result) finally: f.dropvalues(n_args + 2) else: keywords = [None] * n_kwargs keywords_w = [None] * n_kwargs while True: n_kwargs -= 1 if n_kwargs < 0: break w_value = f.popvalue() w_key = f.popvalue() key = f.space.str_w(w_key) keywords[n_kwargs] = key keywords_w[n_kwargs] = w_value arguments = f.popvalues(n) args = f.argument_factory(arguments, keywords, keywords_w, None, None) try: w_result = f.space.call_args(w_callable, args) rstack.resume_point("CALL_METHOD", f, returns=w_result) finally: f.dropvalues(1 + (w_self is None)) f.pushvalue(w_result) | 85251138ab46185e23ac8ddb9935ca10a1993318 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/85251138ab46185e23ac8ddb9935ca10a1993318/callmethod.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22753,
67,
5327,
12,
74,
16,
1061,
3175,
16,
380,
24055,
4672,
468,
1061,
1968,
1914,
326,
1501,
16,
471,
19554,
1056,
16,
19560,
326,
10592,
296,
2890,
11,
290,
67,
1968,
273,
1061,
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,
22753,
67,
5327,
12,
74,
16,
1061,
3175,
16,
380,
24055,
4672,
468,
1061,
1968,
1914,
326,
1501,
16,
471,
19554,
1056,
16,
19560,
326,
10592,
296,
2890,
11,
290,
67,
1968,
273,
1061,
3... |
divider = field.widget.divider if getattr(field.widget, 'timestamp', None): divider = "\n\n" + str(DateTime()) + divider | def process_form(self, instance, field, form, empty_marker=None, emptyReturnsMarker=False): """handle text formatting""" text_format = None value = None # text field with formatting value = form.get(field.getName(), empty_marker) | 376d7af40a563cfff8df4e40d7d855406b5fc939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/376d7af40a563cfff8df4e40d7d855406b5fc939/Widget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
687,
12,
2890,
16,
791,
16,
652,
16,
646,
16,
1008,
67,
11145,
33,
7036,
16,
1008,
1356,
7078,
33,
8381,
4672,
3536,
4110,
977,
10407,
8395,
977,
67,
2139,
273,
599,
460,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
687,
12,
2890,
16,
791,
16,
652,
16,
646,
16,
1008,
67,
11145,
33,
7036,
16,
1008,
1356,
7078,
33,
8381,
4672,
3536,
4110,
977,
10407,
8395,
977,
67,
2139,
273,
599,
460,
2... | |
[(u'object1', <UtiltiyTerm object1, instance of Object>), (u'object2', <UtiltiyTerm object2, instance of Object>), (u'object3', <UtiltiyTerm object3, instance of Object>)] | [(u'object1', <UtilityTerm object1, instance of Object>), (u'object2', <UtilityTerm object2, instance of Object>), (u'object3', <UtilityTerm object3, instance of Object>)] | ... def __repr__(self): | 9d3ea1c3199a9cfb3a12acbf8d1bed27165a7f87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9537/9d3ea1c3199a9cfb3a12acbf8d1bed27165a7f87/vocabulary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
1001,
12715,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
1001,
12715,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def _laplace_latex_(*args): | def _laplace_latex_(self, *args): | def _laplace_latex_(*args): r""" Return LaTeX expression for Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _laplace_latex_ sage: var('s,t') (s, t) sage: f(t) = function('f',t) sage: _laplace_latex_(f(t),t,s) '\\mathcal{L}\\left(f\\left(t\\right), t, s\\right)' AUTHORS: - Golam Mortuza Hossain (2009-06-22) """ return "\\mathcal{L}\\left(%s\\right)"%(', '.join([latex(x) for x in args])) | 9f774223e4745a0d335873c3b96c949e3be36475 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/9f774223e4745a0d335873c3b96c949e3be36475/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11821,
964,
67,
26264,
67,
12,
2890,
16,
380,
1968,
4672,
436,
8395,
2000,
21072,
21575,
60,
2652,
364,
21072,
964,
2510,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
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,
389,
11821,
964,
67,
26264,
67,
12,
2890,
16,
380,
1968,
4672,
436,
8395,
2000,
21072,
21575,
60,
2652,
364,
21072,
964,
2510,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
225... |
pyftpdlib.ftpserver.logline = line_logger | def line_logger(msg): if (msg.find("kill") >= 0): server.stop = True print 'shutting down server' sys.exit(0) | 814d8c519498ba4f6ab732363a6f66cc5da8a33c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/814d8c519498ba4f6ab732363a6f66cc5da8a33c/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
980,
67,
4901,
12,
3576,
4672,
309,
261,
3576,
18,
4720,
2932,
16418,
7923,
1545,
374,
4672,
1438,
18,
5681,
273,
1053,
1172,
296,
674,
25387,
2588,
1438,
11,
2589,
18,
8593,
12,
20,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
980,
67,
4901,
12,
3576,
4672,
309,
261,
3576,
18,
4720,
2932,
16418,
7923,
1545,
374,
4672,
1438,
18,
5681,
273,
1053,
1172,
296,
674,
25387,
2588,
1438,
11,
2589,
18,
8593,
12,
20,
1... | |
def set_password(self, value='', already_hashed=False): | def set_password(self, value = '', already_hashed = False): | def set_password(self, value='', already_hashed=False): """Set a password on this sheet.""" if not already_hashed: value = hash_password(value) self._password = value | 31f1a17022804adb2d15701d138a8345a6f685f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1351/31f1a17022804adb2d15701d138a8345a6f685f5/worksheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3664,
12,
2890,
16,
460,
273,
10226,
1818,
67,
2816,
329,
273,
1083,
4672,
3536,
694,
279,
2201,
603,
333,
6202,
12123,
309,
486,
1818,
67,
2816,
329,
30,
460,
273,
1651,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3664,
12,
2890,
16,
460,
273,
10226,
1818,
67,
2816,
329,
273,
1083,
4672,
3536,
694,
279,
2201,
603,
333,
6202,
12123,
309,
486,
1818,
67,
2816,
329,
30,
460,
273,
1651,
67,
... |
self.parse_percent_directives() | def is_html(self): """ Returns True if this is an HTML cell. An HTML cell whose system is HTML and is typically specified by '%html' at the top of the cell. | fcd2aab9896251f9fe30af9a2996d617648001f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/fcd2aab9896251f9fe30af9a2996d617648001f6/cell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2620,
12,
2890,
4672,
3536,
2860,
1053,
309,
333,
353,
392,
3982,
2484,
18,
225,
1922,
3982,
2484,
8272,
2619,
353,
3982,
471,
353,
14755,
1269,
635,
1995,
2620,
11,
622,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2620,
12,
2890,
4672,
3536,
2860,
1053,
309,
333,
353,
392,
3982,
2484,
18,
225,
1922,
3982,
2484,
8272,
2619,
353,
3982,
471,
353,
14755,
1269,
635,
1995,
2620,
11,
622,
326,
... | |
XXX When wrapping around and failing to find anything, the portion of the text after the selection is searched twice :-( | def search_text(self, text, prog=None, ok=0): """Search a text widget for the pattern. | e7199a4b7f527e211b0e10b549ecb6851bfe98d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e7199a4b7f527e211b0e10b549ecb6851bfe98d5/SearchEngine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
955,
12,
2890,
16,
977,
16,
11243,
33,
7036,
16,
1529,
33,
20,
4672,
3536,
2979,
279,
977,
3604,
364,
326,
1936,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
955,
12,
2890,
16,
977,
16,
11243,
33,
7036,
16,
1529,
33,
20,
4672,
3536,
2979,
279,
977,
3604,
364,
326,
1936,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
origbold = bold origitalic = italic | def SysFont(name, size, bold=0, italic=0): """pygame.font.SysFont(name, size, bold=0, italic=0) -> Font create a pygame Font from system font resources This will search the system fonts for the given font name. You can also enable bold or italic styles, and the appropriate system font will be selected if available. This will always return a valid Font object, and will fallback on the builtin pygame font if the given font is not found. Name can also be a comma separated list of names, in which case set of names will be searched in order. Pygame uses a small set of common font aliases, if the specific font you ask for is not available, a reasonable alternative may be used. """ import pygame.font if not Sysfonts: initsysfonts() fontname = None if name: allnames = name for name in allnames.split(','): origbold = bold origitalic = italic name = _simplename(name) styles = Sysfonts.get(name) if not styles: styles = Sysalias.get(name) if styles: while not fontname: fontname = styles.get((bold, italic)) if italic: italic = 0 elif bold: bold = 0 elif not fontname: fontname = styles.values()[0] if fontname: break font = pygame.font.Font(fontname, size) if name: if origbold and not bold: font.set_bold(1) if origitalic and not italic: font.set_italic(1) else: if bold: font.set_bold(1) elif italic: font.set_italic(1) return font | ca5d89783ff94ee98c45799f2426265c7e24f7ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1298/ca5d89783ff94ee98c45799f2426265c7e24f7ac/sysfont.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16995,
5711,
12,
529,
16,
963,
16,
13068,
33,
20,
16,
31709,
33,
20,
4672,
3536,
2074,
13957,
18,
5776,
18,
12712,
5711,
12,
529,
16,
963,
16,
13068,
33,
20,
16,
31709,
33,
20,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16995,
5711,
12,
529,
16,
963,
16,
13068,
33,
20,
16,
31709,
33,
20,
4672,
3536,
2074,
13957,
18,
5776,
18,
12712,
5711,
12,
529,
16,
963,
16,
13068,
33,
20,
16,
31709,
33,
20,
13,
... | |
self.pushOKHeaders('image/gif') | inOneHour = time.gmtime(time.time() + 3600) expiryDate = time.strftime('%a, %d %b %Y %H:%M:%S GMT', inOneHour) extraHeaders = {'Expires': expiryDate} self.pushOKHeaders('image/gif', extraHeaders) | def onRequest(self, path, params): """Handles a decoded HTTP request.""" if path == '/': path = '/Home' if path == '/helmet.gif': self.pushOKHeaders('image/gif') self.push(self.helmet) else: try: name = path[1:].capitalize() handler = getattr(self, 'on' + name) except AttributeError: self.pushError(404, "Not found: '%s'" % url) else: # This is a request for a valid page; run the handler. self.pushOKHeaders('text/html') self.pushPreamble(name) handler(params) timeString = time.asctime(time.localtime()) self.push(self.footer % timeString) | f52f2d890498484d13b002f537e7616e27a554aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/f52f2d890498484d13b002f537e7616e27a554aa/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
691,
12,
2890,
16,
589,
16,
859,
4672,
3536,
8788,
279,
6383,
2239,
590,
12123,
309,
589,
422,
2023,
30,
589,
273,
1173,
8684,
11,
225,
309,
589,
422,
1173,
76,
292,
10578,
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,
603,
691,
12,
2890,
16,
589,
16,
859,
4672,
3536,
8788,
279,
6383,
2239,
590,
12123,
309,
589,
422,
2023,
30,
589,
273,
1173,
8684,
11,
225,
309,
589,
422,
1173,
76,
292,
10578,
18,
... |
for item in self.conn.do.search('album', model.get_value(model.get_iter(path), 1), 'artist', self.view_artist_artist): | for item in self.browse_search_album_by_artist(self.view_artist_artist, model.get_value(model.get_iter(path), 1)): | def browser_get_selected_items_recursive(self, return_root): # If return_root=True, return main directories whenever possible # instead of individual songs in order to reduce the number of # mpd calls we need to make. items = [] model, selected = self.browser_selection.get_selected_rows() if self.view == self.VIEW_FILESYSTEM: if return_root and not self.search_mode_enabled() and ((self.root == "/" and len(selected) == len(self.browserdata)) or (self.root != "/" and len(selected) >= len(self.browserdata)-2)): # Everything selected, this is faster.. items.append(self.root) else: for path in selected: if model.get_value(model.get_iter(path), 2) != "/" and model.get_value(model.get_iter(path), 2) != "..": if model.get_value(model.get_iter(path), 0) == gtk.STOCK_OPEN: if return_root and not self.search_mode_enabled(): items.append(model.get_value(model.get_iter(path), 1)) else: for item in self.conn.do.listall(model.get_value(model.get_iter(path), 1)): if item.type == 'file': items.append(item.file) else: items.append(model.get_value(model.get_iter(path), 1)) elif self.view == self.VIEW_ARTIST: for path in selected: if model.get_value(model.get_iter(path), 2) != "/" and model.get_value(model.get_iter(path), 2) != "..": if self.view_artist_level == 1: for item in self.conn.do.search('artist', model.get_value(model.get_iter(path), 1)): items.append(item.file) else: if model.get_value(model.get_iter(path), 0) == 'album': for item in self.conn.do.search('album', model.get_value(model.get_iter(path), 1), 'artist', self.view_artist_artist): items.append(item.file) else: items.append(model.get_value(model.get_iter(path), 1)) elif self.view == self.VIEW_ALBUM: for path in selected: if model.get_value(model.get_iter(path), 2) != "/" and model.get_value(model.get_iter(path), 2) != "..": if self.root == "/": for item in self.conn.do.search('album', model.get_value(model.get_iter(path), 1)): items.append(item.file) else: items.append(model.get_value(model.get_iter(path), 1)) # Make sure we don't have any EXACT duplicates: items = remove_list_duplicates(items, True) return items | ef335bb5758783289bea4a5b77282ae0c87d687a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/ef335bb5758783289bea4a5b77282ae0c87d687a/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4748,
67,
588,
67,
8109,
67,
3319,
67,
10543,
12,
2890,
16,
327,
67,
3085,
4672,
468,
971,
327,
67,
3085,
33,
5510,
16,
327,
2774,
6402,
17334,
3323,
468,
3560,
434,
7327,
272,
7260,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4748,
67,
588,
67,
8109,
67,
3319,
67,
10543,
12,
2890,
16,
327,
67,
3085,
4672,
468,
971,
327,
67,
3085,
33,
5510,
16,
327,
2774,
6402,
17334,
3323,
468,
3560,
434,
7327,
272,
7260,
... |
self.libs = None | self.libraries = None | self.undef = None | cdb20ba56d1c14cdf5a90df2b0cfc94d869c2e55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdb20ba56d1c14cdf5a90df2b0cfc94d869c2e55/build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
365,
18,
318,
536,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
365,
18,
318,
536,
273,
599,
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,
... |
content.append(tag('ul')[[ tag('li')[item] for item in listItems ]]) | content = [ tag('p')[ content ], tag('ul')[[ tag('li')[item] for item in listItems ]], ] | def component_log(self, element, args): """Convert the log message to HTML. If the message seems to be preformatted (it has some lines with indentation) it is stuck into a <pre>. Otherwise it is converted to HTML by replacing newlines with <br> tags and converting bulletted lists. """ log = XML.dig(args.message.xml, "message", "body", "commit", "log") if not log: return [] content = [] lines = Util.getNormalizedLog(log) nonListItemLines = [] listItems = [] | 25fe33525db4db3aa03df90343a6b886986d898c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/25fe33525db4db3aa03df90343a6b886986d898c/Commit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1794,
67,
1330,
12,
2890,
16,
930,
16,
833,
4672,
3536,
2723,
326,
613,
883,
358,
3982,
18,
971,
326,
883,
12001,
358,
506,
675,
14897,
261,
305,
711,
2690,
2362,
598,
12018,
13,
518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1794,
67,
1330,
12,
2890,
16,
930,
16,
833,
4672,
3536,
2723,
326,
613,
883,
358,
3982,
18,
971,
326,
883,
12001,
358,
506,
675,
14897,
261,
305,
711,
2690,
2362,
598,
12018,
13,
518,
... |
res = self.make_response(raw_res) | res = self.make_response(raw_res, end_time - start_time) | def do_request(self, req, status, time_request): app = lint.middleware(self.app) old_stdout = sys.stdout out = StringIO() try: sys.stdout = out start_time = time.time() raw_res = wsgilib.raw_interactive(app, req.url, **req.environ) end_time = time.time() finally: sys.stdout = old_stdout sys.stderr.write(out.getvalue()) res = self.make_response(raw_res) res.request = req if self.namespace is not None: self.namespace['res'] = res self.check_status(status, res) self.check_errors(res) if time_request: return end_time - start_time | 90680266c6d4645d6a3382f7b4579f79f4757170 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/90680266c6d4645d6a3382f7b4579f79f4757170/fixture.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2293,
12,
2890,
16,
1111,
16,
1267,
16,
813,
67,
2293,
4672,
595,
273,
19477,
18,
17352,
12,
2890,
18,
2910,
13,
1592,
67,
10283,
273,
2589,
18,
10283,
596,
273,
15777,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2293,
12,
2890,
16,
1111,
16,
1267,
16,
813,
67,
2293,
4672,
595,
273,
19477,
18,
17352,
12,
2890,
18,
2910,
13,
1592,
67,
10283,
273,
2589,
18,
10283,
596,
273,
15777,
1435,
... |
L1, error_bound = self.Lseries_deriv_at1(10*sqrt(self.conductor()) + 10) | L1, error_bound = E.Lseries_deriv_at1(10*sqrt(E.conductor()) + 10) | def sha_an(self, use_database=False): """ Returns the Birch and Swinnerton-Dyer conjectural order of Sha, unless the analytic rank is > 1, in which case this function returns 0. | 281f4370d8301f7ec470b1771e1f9fd389a9831b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/281f4370d8301f7ec470b1771e1f9fd389a9831b/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6056,
67,
304,
12,
2890,
16,
999,
67,
6231,
33,
8381,
4672,
3536,
2860,
326,
605,
481,
343,
471,
5434,
267,
82,
1051,
265,
17,
40,
93,
264,
356,
937,
3766,
1353,
434,
2638,
69,
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,
6056,
67,
304,
12,
2890,
16,
999,
67,
6231,
33,
8381,
4672,
3536,
2860,
326,
605,
481,
343,
471,
5434,
267,
82,
1051,
265,
17,
40,
93,
264,
356,
937,
3766,
1353,
434,
2638,
69,
16,
... |
TixWidget.__init__(self,master,'tixNoteBook', ['options'], cnf, kw) self.subwidget_list['nbframe'] = TixSubWidget(self, 'nbframe', destroy_physically=0) | TixWidget.__init__(self,master,'tixNoteBook', ['options'], cnf, kw) self.subwidget_list['nbframe'] = TixSubWidget(self, 'nbframe', destroy_physically=0) | def __init__ (self,master=None,cnf={}, **kw): | 0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
7525,
33,
7036,
16,
10305,
74,
28793,
2826,
9987,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
7525,
33,
7036,
16,
10305,
74,
28793,
2826,
9987,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
x - self.panX, | x - self.panX, | def moveCursorToMouse( self, x, y): | be664b78331ccad2eb127fa6a59c36fb10a1c0b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12485/be664b78331ccad2eb127fa6a59c36fb10a1c0b2/tiledrawingarea.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
6688,
774,
9186,
12,
365,
16,
619,
16,
677,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
6688,
774,
9186,
12,
365,
16,
619,
16,
677,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if url is None: return plaintext_to_html(label) | if url is None: return label | def href(self, target, label=None, css_class=None, context=None): """ Return the HTML code for an HREF link to the given target (which can be a C{VariableDoc}, a C{ValueDoc}, or a C{DottedName}. If a C{NamespaceDoc} C{context} is specified, the target label is contextualized to it. """ assert isinstance(target, (APIDoc, DottedName)) | 780903e689c2cb7776770bdf22844a1b4f360bff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/780903e689c2cb7776770bdf22844a1b4f360bff/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3897,
12,
2890,
16,
1018,
16,
1433,
33,
7036,
16,
3747,
67,
1106,
33,
7036,
16,
819,
33,
7036,
4672,
3536,
2000,
326,
3982,
981,
364,
392,
670,
10771,
1692,
358,
326,
864,
1018,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3897,
12,
2890,
16,
1018,
16,
1433,
33,
7036,
16,
3747,
67,
1106,
33,
7036,
16,
819,
33,
7036,
4672,
3536,
2000,
326,
3982,
981,
364,
392,
670,
10771,
1692,
358,
326,
864,
1018,
261,
... |
f = file('/home/richard/foo.txt', 'a+') f.write(str(urlparts)) | def getAuthorizedURL(url, auth): # annoyingly, xmlrpclib only recognises user@pass style # authentication, so having gone to the trouble of parsing # it out, we now need to add it back in again if not auth: return url import urlparse urlparts = list(urlparse.urlparse(url)) urlparts[1] = auth+'@'+urlparts[1] f = file('/home/richard/foo.txt', 'a+') f.write(str(urlparts)) return urlparse.urlunparse(urlparts) | 30b050cbd78e047c83aba5f73d15c0e9ff30b4df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6274/30b050cbd78e047c83aba5f73d15c0e9ff30b4df/smtp2zope.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
15341,
1785,
12,
718,
16,
1357,
4672,
468,
14115,
14946,
715,
16,
2025,
13832,
830,
495,
1338,
14603,
6141,
729,
36,
5466,
2154,
468,
5107,
16,
1427,
7999,
22296,
358,
326,
23432,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15341,
1785,
12,
718,
16,
1357,
4672,
468,
14115,
14946,
715,
16,
2025,
13832,
830,
495,
1338,
14603,
6141,
729,
36,
5466,
2154,
468,
5107,
16,
1427,
7999,
22296,
358,
326,
23432,
1... | |
except IOError, msg: | except (OSError, IOError), msg: | def openpage(self, url_pair): url, fragment = url_pair try: return self.urlopener.open(url) except IOError, msg: msg = self.sanitize(msg) self.note(0, "Error %s", msg) if self.verbose > 0: self.show(" HREF ", url, " from", self.todo[url_pair]) self.setbad(url_pair, msg) return None | dc5ada59337cc2a889a11b8174f078e3f2a6135a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dc5ada59337cc2a889a11b8174f078e3f2a6135a/webchecker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
2433,
12,
2890,
16,
880,
67,
6017,
4672,
880,
16,
5481,
273,
880,
67,
6017,
775,
30,
327,
365,
18,
295,
16884,
708,
18,
3190,
12,
718,
13,
1335,
261,
4618,
668,
16,
8340,
3631,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
2433,
12,
2890,
16,
880,
67,
6017,
4672,
880,
16,
5481,
273,
880,
67,
6017,
775,
30,
327,
365,
18,
295,
16884,
708,
18,
3190,
12,
718,
13,
1335,
261,
4618,
668,
16,
8340,
3631,... |
if file is None: | if file is _file: return file elif file=='str': return _file.getvalue() else: | def debugprint(obj, depth=-1, file=None): """Print a computation graph to file :type obj: Variable, Apply, or Function instance :param obj: symbolic thing to print :type depth: integer :param depth: print graph to this depth (-1 for unlimited) :type file: None or file-like object :param file: print to this file (None means sys.stdout) :rtype: None or file-like object :returns: `file` argument Each line printed represents a Variable in the graph. The indentation of each line corresponds to its depth in the symbolic graph. The first part of the text identifies whether it is an input (if a name or type is printed) or the output of some Apply (in which case the Op is printed). The second part of the text is the memory location of the Variable. If a Variable is encountered multiple times in the depth-first search, it is only printed recursively the first time. Later, just the Variable and its memory location are printed. If an Apply has multiple outputs, then a '.N' suffix will be appended to the Apply's identifier, to indicate which output a line corresponds to. """ if file is None: _file = sys.stdout else: _file = file done = set() results_to_print = [] if isinstance(obj, gof.Variable): results_to_print.append(obj) elif isinstance(obj, gof.Apply): results_to_print.extend(obj.outputs) elif isinstance(obj, Function): results_to_print.extend(obj.maker.env.outputs) for r in results_to_print: debugmode.debugprint(r, depth=depth, done=done, file=_file) if file is None: _file.flush() return file | 7ed088781711b55663f005678762dbe4fb25ab93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/7ed088781711b55663f005678762dbe4fb25ab93/printing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
1188,
12,
2603,
16,
3598,
29711,
21,
16,
585,
33,
7036,
4672,
3536,
5108,
279,
16039,
2667,
358,
585,
225,
294,
723,
1081,
30,
7110,
16,
5534,
16,
578,
4284,
791,
294,
891,
1081,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
1188,
12,
2603,
16,
3598,
29711,
21,
16,
585,
33,
7036,
4672,
3536,
5108,
279,
16039,
2667,
358,
585,
225,
294,
723,
1081,
30,
7110,
16,
5534,
16,
578,
4284,
791,
294,
891,
1081,... |
if context is None: context = getcontext() | def to_eng_string(self, context=None): """Convert to engineering-type string. | 323d0b30a64964b89a85e1b02e8fcc4017ce9fa7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/323d0b30a64964b89a85e1b02e8fcc4017ce9fa7/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
24688,
67,
1080,
12,
2890,
16,
819,
33,
7036,
4672,
3536,
2723,
358,
4073,
264,
310,
17,
723,
533,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
24688,
67,
1080,
12,
2890,
16,
819,
33,
7036,
4672,
3536,
2723,
358,
4073,
264,
310,
17,
723,
533,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
line = fd.readline ().strip () | lines = fd.readlines () | def check_program (name, prog, ver_regex, req_version, failifnot = False): check_started ("Checking for " + name + " >= " + req_version) rc = False version = None try: fd = os.popen (prog + " 2>&1") line = fd.readline ().strip () fd.close () if VERBOSE: print "\n# '" + prog + "' returned '" + line + "'" m = re.match (ver_regex, line) if not m: raise version = m.group (1) if not compare_version (version, req_version): raise check_finished (version + ", OK") rc = True except: if version: check_finished (version + " < " + req_version + ", FAILED") else: check_finished ("FAILED") if not rc and failifnot: print "\n" + name + " version " + req_version + " and above is required to build this project" sys.exit (1) return rc | d1d05a728990bf02584bb70d0eca5637dcaae898 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2556/d1d05a728990bf02584bb70d0eca5637dcaae898/tibs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
12890,
261,
529,
16,
11243,
16,
1924,
67,
7584,
16,
1111,
67,
1589,
16,
2321,
430,
902,
273,
1083,
4672,
866,
67,
14561,
7566,
14294,
364,
315,
397,
508,
397,
315,
1545,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
12890,
261,
529,
16,
11243,
16,
1924,
67,
7584,
16,
1111,
67,
1589,
16,
2321,
430,
902,
273,
1083,
4672,
866,
67,
14561,
7566,
14294,
364,
315,
397,
508,
397,
315,
1545,
315,
... |
d = len_axis | d=0 | def run(self): db = sqlalchemy.create_engine(self.object.schema_id.database_id.connection_url,encoding='utf-8') metadata = sqlalchemy.MetaData(db) print 'Connected to database...', self.object.schema_id.database_id.connection_url | 5b70a65f158403d40ef338c3d7da76112c0a148f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/5b70a65f158403d40ef338c3d7da76112c0a148f/query.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1319,
273,
1847,
24182,
18,
2640,
67,
8944,
12,
2890,
18,
1612,
18,
4821,
67,
350,
18,
6231,
67,
350,
18,
4071,
67,
718,
16,
5999,
2218,
3158,
17,
28,
6134,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1319,
273,
1847,
24182,
18,
2640,
67,
8944,
12,
2890,
18,
1612,
18,
4821,
67,
350,
18,
6231,
67,
350,
18,
4071,
67,
718,
16,
5999,
2218,
3158,
17,
28,
6134,
198... |
yaml.add_implicit_resolver(u'!emailaddress', EMAIL_PATTERN) | yaml.add_implicit_resolver(EmailAddress.yaml_tag, EMAIL_RE) | def __ne__(self, other): if isinstance(other, EmailAddress): if (other.user != self.user and other.domain != self.domain): return True return False | a8f8aa6fd40d048d0c675438916aaef0f01cac14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3557/a8f8aa6fd40d048d0c675438916aaef0f01cac14/emailaddress.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4644,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
8166,
1887,
4672,
309,
261,
3011,
18,
1355,
480,
365,
18,
1355,
471,
1308,
18,
4308,
480,
365,
18,
4308,
4672,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
4644,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
8166,
1887,
4672,
309,
261,
3011,
18,
1355,
480,
365,
18,
1355,
471,
1308,
18,
4308,
480,
365,
18,
4308,
4672,
327,
... |
if task is None: debug('result handler ignoring extra sentinel') continue | if ready: if task is None: debug('result handler ignoring extra sentinel') continue on_state_change(task) join_exited_workers() | def run(self): get = self.get outqueue = self.outqueue cache = self.cache putlock = self.putlock | 409811c9c25cd86bffb6fbec5abbd7fce80b765f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/409811c9c25cd86bffb6fbec5abbd7fce80b765f/pool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
336,
273,
365,
18,
588,
596,
4000,
273,
365,
18,
659,
4000,
1247,
273,
365,
18,
2493,
1378,
739,
273,
365,
18,
458,
739,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
336,
273,
365,
18,
588,
596,
4000,
273,
365,
18,
659,
4000,
1247,
273,
365,
18,
2493,
1378,
739,
273,
365,
18,
458,
739,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return self._executeSingleFileCatalogFunction( lfn, 'isLink', catalogs=catalogs ) else: return self._executeFileCatalogFunction( lfn, 'isLink', catalogs=catalogs ) def getCatalogReadLink( self, lfn, singleFile=False, catalogs=[] ): | return self._executeSingleFileCatalogFunction( lfn, 'isLink', catalogs = catalogs ) else: return self._executeFileCatalogFunction( lfn, 'isLink', catalogs = catalogs ) def getCatalogReadLink( self, lfn, singleFile = False, catalogs = [] ): | def getCatalogIsLink( self, lfn, singleFile=False, catalogs=[] ): """ Determine whether the path is registered as a link in the FileCatalog 'lfn' is the paths to check (can be a single path or list of paths) """ if singleFile: return self._executeSingleFileCatalogFunction( lfn, 'isLink', catalogs=catalogs ) else: return self._executeFileCatalogFunction( lfn, 'isLink', catalogs=catalogs ) | 8cfc8d124489ba672254aee3d1fff4f748757c6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8cfc8d124489ba672254aee3d1fff4f748757c6c/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
4392,
2520,
2098,
12,
365,
16,
328,
4293,
16,
2202,
812,
33,
8381,
16,
26455,
33,
8526,
262,
30,
3536,
10229,
2856,
326,
589,
353,
4104,
487,
279,
1692,
316,
326,
1387,
9769,
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,
1927,
4392,
2520,
2098,
12,
365,
16,
328,
4293,
16,
2202,
812,
33,
8381,
16,
26455,
33,
8526,
262,
30,
3536,
10229,
2856,
326,
589,
353,
4104,
487,
279,
1692,
316,
326,
1387,
9769,
225... |
FieldStorage class with an added get function. | FieldStorage class with a get function that provides an empty string as the default value for the 'default' parameter, mimicking the CGI interface. | def end_headers(self): pass | a834c4782e0c1c35cf7f1159a7cfaa86bfd7dde0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/a834c4782e0c1c35cf7f1159a7cfaa86bfd7dde0/ModPythonHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2485,
12,
2890,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2485,
12,
2890,
4672,
1342,
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... |
self.body.append('\\hypertarget{%s}{' % node.get('refid')) | self.body.append('\n\\hypertarget{%s}{' % node.get('refid')) | def visit_target(self, node): # BUG: why not (refuri or refid or refname) means not footnote ? if not ('refuri' in node or 'refid' in node or 'refname' in node): self.body += [r'\hypertarget{%s}{' % id for id in node['ids']] self.context.append('}' * len(node['ids'])) elif node.get('refid'): self.body.append('\\hypertarget{%s}{' % node.get('refid')) self.context.append('}') else: self.context.append('') | 770acf8a2c64555461b48403404ff537a469fea4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5620/770acf8a2c64555461b48403404ff537a469fea4/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
3299,
12,
2890,
16,
756,
4672,
468,
10937,
43,
30,
11598,
486,
261,
1734,
1650,
578,
1278,
350,
578,
1278,
529,
13,
4696,
486,
14200,
7652,
692,
309,
486,
7707,
1734,
1650,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
3299,
12,
2890,
16,
756,
4672,
468,
10937,
43,
30,
11598,
486,
261,
1734,
1650,
578,
1278,
350,
578,
1278,
529,
13,
4696,
486,
14200,
7652,
692,
309,
486,
7707,
1734,
1650,
1... |
rec=(self.timer.isInTimer(eventid=eventId, begin=beginTime, duration=duration, service=self.service) > 0) | rec=(self.timer.isInTimer(eventid=eventId, begin=beginTime, duration=duration, service=self.service) > ((duration/10)*8)) | def buildSingleEntry(self, eventId, beginTime, duration, EventName): rec=(self.timer.isInTimer(eventid=eventId, begin=beginTime, duration=duration, service=self.service) > 0) r1=self.datetime_rect r2=self.descr_rect res = [ None ] # no private data needed t = localtime(beginTime) res.append((eListboxPythonMultiContent.TYPE_TEXT, r1.left(), r1.top(), r1.width(), r1.height(), 0, RT_HALIGN_LEFT, "%02d.%02d, %02d:%02d"%(t[2],t[1],t[3],t[4]))) if rec: res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, r2.left(), r2.top(), 21, 21, loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, 'epgclock-fs8.png')))) res.append((eListboxPythonMultiContent.TYPE_TEXT, r2.left() + 25, r2.top(), r2.width(), r2.height(), 0, RT_HALIGN_LEFT, EventName)) else: res.append((eListboxPythonMultiContent.TYPE_TEXT, r2.left(), r2.top(), r2.width(), r2.height(), 0, RT_HALIGN_LEFT, EventName)) return res | 36bc1fa5226f5c1942f68b0afb485441e437be8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/36bc1fa5226f5c1942f68b0afb485441e437be8a/EpgList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5281,
1622,
12,
2890,
16,
26004,
16,
2376,
950,
16,
3734,
16,
2587,
461,
4672,
1950,
28657,
2890,
18,
12542,
18,
291,
382,
6777,
12,
2575,
350,
33,
2575,
548,
16,
2376,
33,
10086... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5281,
1622,
12,
2890,
16,
26004,
16,
2376,
950,
16,
3734,
16,
2587,
461,
4672,
1950,
28657,
2890,
18,
12542,
18,
291,
382,
6777,
12,
2575,
350,
33,
2575,
548,
16,
2376,
33,
10086... |
self.valid_values.extend(["embedded/empty","embedded/rm","embedded/unmerge","embedded/runscript","embedded/mergeroot","embedded/packages","embedded/use","embedded/fs-type"]) | self.valid_values.extend(["embedded/empty","embedded/rm","embedded/unmerge","embedded/fs-prepare","embedded/fs-finish","embedded/mergeroot","embedded/packages","embedded/use","embedded/fs-type","boot/kernel"]) | def __init__(self,spec,addlargs): self.required_values=[] self.valid_values=[] self.valid_values.extend(["embedded/empty","embedded/rm","embedded/unmerge","embedded/runscript","embedded/mergeroot","embedded/packages","embedded/use","embedded/fs-type"]) | 25fc772748ff920715e7a9f0b96e9cb31d3a33f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/25fc772748ff920715e7a9f0b96e9cb31d3a33f6/embedded_target.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2793,
16,
1289,
80,
1968,
4672,
365,
18,
4718,
67,
2372,
33,
8526,
365,
18,
877,
67,
2372,
33,
8526,
365,
18,
877,
67,
2372,
18,
14313,
3816,
6,
20722,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2793,
16,
1289,
80,
1968,
4672,
365,
18,
4718,
67,
2372,
33,
8526,
365,
18,
877,
67,
2372,
33,
8526,
365,
18,
877,
67,
2372,
18,
14313,
3816,
6,
20722,... |
if not (0 <= i < self.yearlen) or wdaymask[i] == self.rr._wkst: | if (not (0 <= i < self.yearlen) or self.wdaymask[i] == self.rrule._wkst): | def wset(self, year, month, day): set = [None]*self.yearlen i = datetime.date(year, month, day).toordinal()-self.yearordinal start = i for j in range(7): set[i] = i i += 1 if not (0 <= i < self.yearlen) or wdaymask[i] == self.rr._wkst: break return set, start, i | b6d02321017f6062893e0b89e3c8b0dbc1bba103 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8441/b6d02321017f6062893e0b89e3c8b0dbc1bba103/rrule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
542,
12,
2890,
16,
3286,
16,
3138,
16,
2548,
4672,
444,
273,
306,
7036,
5772,
2890,
18,
6874,
1897,
277,
273,
3314,
18,
712,
12,
6874,
16,
3138,
16,
2548,
2934,
869,
517,
1490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
542,
12,
2890,
16,
3286,
16,
3138,
16,
2548,
4672,
444,
273,
306,
7036,
5772,
2890,
18,
6874,
1897,
277,
273,
3314,
18,
712,
12,
6874,
16,
3138,
16,
2548,
2934,
869,
517,
1490,
... |
=special_position_settings.assert_is_positive_definite) | =special_position_settings.assert_is_positive_definite()) | def get_special_position_settings(self, special_position_settings=None, crystal_symmetry=None, force_symmetry=False): assert special_position_settings is None or crystal_symmetry is None assert self.crystal_symmetry is not None or crystal_symmetry is not None or special_position_settings is not None if (crystal_symmetry is None): crystal_symmetry = special_position_settings if (self.crystal_symmetry is not None): if (crystal_symmetry is None): crystal_symmetry = self.crystal_symmetry else: crystal_symmetry = self.crystal_symmetry.join_symmetry( other_symmetry=crystal_symmetry, force=force_symmetry) assert crystal_symmetry.unit_cell() is not None assert crystal_symmetry.space_group_info() is not None if (special_position_settings is None): special_position_settings = crystal.special_position_settings( crystal_symmetry=crystal_symmetry) else: special_position_settings = crystal.special_position_settings( crystal_symmetry=crystal_symmetry, min_distance_sym_equiv =special_position_settings.min_distance_sym_equiv, u_star_tolerance =special_position_settings.u_star_tolerance, assert_is_positive_definite =special_position_settings.assert_is_positive_definite) return special_position_settings | c399cbd82107d08f753b4004b07416b016736b86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/c399cbd82107d08f753b4004b07416b016736b86/interpretation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9371,
67,
3276,
67,
4272,
12,
2890,
16,
4582,
67,
3276,
67,
4272,
33,
7036,
16,
4422,
31365,
67,
8117,
18042,
33,
7036,
16,
2944,
67,
8117,
18042,
33,
8381,
4672,
1815,
4582,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9371,
67,
3276,
67,
4272,
12,
2890,
16,
4582,
67,
3276,
67,
4272,
33,
7036,
16,
4422,
31365,
67,
8117,
18042,
33,
7036,
16,
2944,
67,
8117,
18042,
33,
8381,
4672,
1815,
4582,
... |
s = '' | s = [] | def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads. | 80ba8e85490515c293959a4196cbd99b1b3819a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80ba8e85490515c293959a4196cbd99b1b3819a2/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4626,
67,
896,
12,
2890,
16,
25123,
4672,
3536,
1994,
326,
1300,
434,
1731,
3764,
16,
1161,
773,
1776,
364,
4702,
6838,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
4626,
67,
896,
12,
2890,
16,
25123,
4672,
3536,
1994,
326,
1300,
434,
1731,
3764,
16,
1161,
773,
1776,
364,
4702,
6838,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.tooltips.set_tip(minimize, _("If enabled, closing Sonata will minimize it to the system tray. Note that it's currently impossible to detect if there actually is a system tray, so only check this if you have one.")) | minimize.set_tooltip_text(_("If enabled, closing Sonata will minimize it to the system tray. Note that it's currently impossible to detect if there actually is a system tray, so only check this if you have one.")) | def on_prefs(self, widget): prefswindow = ui.dialog(title=_("Preferences"), parent=self.window, flags=gtk.DIALOG_DESTROY_WITH_PARENT, role='preferences', resizable=False, separator=False) hbox = gtk.HBox() prefsnotebook = gtk.Notebook() # MPD tab mpdlabel = ui.label(markup='<b>' + _('MPD Connection') + '</b>', y=1) controlbox = gtk.HBox() profiles = ui.combo() add_profile = ui.button(img=ui.image(stock=gtk.STOCK_ADD)) remove_profile = ui.button(img=ui.image(stock=gtk.STOCK_REMOVE)) self.prefs_populate_profile_combo(profiles, self.profile_num, remove_profile) controlbox.pack_start(profiles, False, False, 2) controlbox.pack_start(remove_profile, False, False, 2) controlbox.pack_start(add_profile, False, False, 2) namebox = gtk.HBox() namelabel = ui.label(text=_("Name") + ":") namebox.pack_start(namelabel, False, False, 0) nameentry = ui.entry() namebox.pack_start(nameentry, True, True, 10) hostbox = gtk.HBox() hostlabel = ui.label(text=_("Host") + ":") hostbox.pack_start(hostlabel, False, False, 0) hostentry = ui.entry() hostbox.pack_start(hostentry, True, True, 10) portbox = gtk.HBox() portlabel = ui.label(text=_("Port") + ":") portbox.pack_start(portlabel, False, False, 0) portentry = ui.entry() portbox.pack_start(portentry, True, True, 10) dirbox = gtk.HBox() dirlabel = ui.label(text=_("Music dir") + ":") dirbox.pack_start(dirlabel, False, False, 0) direntry = ui.entry() direntry.connect('changed', self.prefs_direntry_changed, profiles) dirbox.pack_start(direntry, True, True, 10) passwordbox = gtk.HBox() passwordlabel = ui.label(text=_("Password") + ":") passwordbox.pack_start(passwordlabel, False, False, 0) passwordentry = ui.entry(password=True) self.tooltips.set_tip(passwordentry, _("Leave blank if no password is required.")) passwordbox.pack_start(passwordentry, True, True, 10) mpd_labels = [namelabel, hostlabel, portlabel, passwordlabel, dirlabel] ui.set_widths_equal(mpd_labels) autoconnect = gtk.CheckButton(_("Autoconnect on start")) autoconnect.set_active(self.autoconnect) # Fill in entries with current profile: self.prefs_profile_chosen(profiles, nameentry, hostentry, portentry, passwordentry, direntry) # Update display if $MPD_HOST or $MPD_PORT is set: host, port, password = self.mpd_env_vars() if host or port: using_mpd_env_vars = True if not host: host = "" if not port: port = "" if not password: password = "" hostentry.set_text(str(host)) portentry.set_text(str(port)) passwordentry.set_text(str(password)) nameentry.set_text(_("Using MPD_HOST/PORT")) for widget in [hostentry, portentry, passwordentry, nameentry, profiles, add_profile, remove_profile]: widget.set_sensitive(False) else: using_mpd_env_vars = False for widget in [hostentry, portentry, passwordentry, nameentry, profiles, add_profile, remove_profile]: widget.set_sensitive(True) nameentry.connect('changed', self.prefs_nameentry_changed, profiles, remove_profile) hostentry.connect('changed', self.prefs_hostentry_changed, profiles) portentry.connect('changed', self.prefs_portentry_changed, profiles) passwordentry.connect('changed', self.prefs_passwordentry_changed, profiles) profiles.connect('changed', self.prefs_profile_chosen, nameentry, hostentry, portentry, passwordentry, direntry) add_profile.connect('clicked', self.prefs_add_profile, nameentry, profiles, remove_profile) remove_profile.connect('clicked', self.prefs_remove_profile, profiles, remove_profile) mpd_frame = gtk.Frame() table = gtk.Table(6, 2, False) table.set_col_spacings(3) table.attach(ui.label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(namebox, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(hostbox, 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(portbox, 1, 3, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(passwordbox, 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(dirbox, 1, 3, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(ui.label(), 1, 3, 7, 8, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) mpd_frame.add(table) mpd_frame.set_label_widget(controlbox) mpd_table = gtk.Table(9, 2, False) mpd_table.set_col_spacings(3) mpd_table.attach(ui.label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) mpd_table.attach(mpdlabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) mpd_table.attach(ui.label(), 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) mpd_table.attach(mpd_frame, 1, 3, 4, 10, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) mpd_table.attach(ui.label(), 1, 3, 10, 11, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) mpd_table.attach(autoconnect, 1, 3, 11, 12, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) mpd_table.attach(ui.label(), 1, 3, 12, 13, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) mpd_table.attach(ui.label(), 1, 3, 13, 14, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) mpd_table.attach(ui.label(), 1, 3, 14, 15, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) # Extras tab if not audioscrobbler is not None: self.as_enabled = False as_label = ui.label(markup='<b>' + _('Extras') + '</b>') as_frame = gtk.Frame() as_frame.set_label_widget(as_label) as_frame.set_shadow_type(gtk.SHADOW_NONE) as_frame.set_border_width(15) as_vbox = gtk.VBox() as_vbox.set_border_width(15) as_checkbox = gtk.CheckButton(_("Enable Audioscrobbler")) as_checkbox.set_active(self.as_enabled) as_vbox.pack_start(as_checkbox, False) as_table = gtk.Table(2, 2) as_table.set_col_spacings(3) as_user_label = ui.label(text=" " + _("Username:")) as_pass_label = ui.label(text=" " + _("Password:")) as_user_entry = ui.entry(text=self.as_username, changed_cb=self.prefs_as_username_changed) if len(self.as_password_md5) > 0: as_pass_entry = ui.entry(text='1234', password=True, changed_cb=self.prefs_as_password_changed) else: as_pass_entry = ui.entry(text='', password=True, changed_cb=self.prefs_as_password_changed) displaylabel2 = ui.label(markup='<b>' + _('Notification') + '</b>', y=1) display_notification = gtk.CheckButton(_("Popup notification on song changes")) display_notification.set_active(self.show_notification) notifhbox = gtk.HBox() notif_blank = ui.label(x=1) notifhbox.pack_start(notif_blank) list = [] for i in self.popuptimes: if i != _('Entire song'): list.append(i + ' ' + gettext.ngettext('second', 'seconds', int(i))) else: list.append(i) notification_options = ui.combo(list=list, active=self.popup_option, changed_cb=self.prefs_notiftime_changed) notification_locs = ui.combo(list=self.popuplocations, active=self.traytips.notifications_location, changed_cb=self.prefs_notiflocation_changed) display_notification.connect('toggled', self.prefs_notif_toggled, notifhbox) notifhbox.pack_start(notification_options, False, False, 2) notifhbox.pack_start(notification_locs, False, False, 2) if not self.show_notification: notifhbox.set_sensitive(False) crossfadecheck = gtk.CheckButton(_("Enable Crossfade")) crossfadespin = gtk.SpinButton() crossfadespin.set_digits(0) crossfadespin.set_range(1, 30) crossfadespin.set_value(self.xfade) crossfadespin.set_numeric(True) crossfadespin.set_increments(1,5) crossfadespin.set_size_request(70,-1) crossfadelabel2 = ui.label(text=_("Fade length") + ":", x=1) crossfadelabel3 = ui.label(text=_("sec")) if not self.xfade_enabled: crossfadespin.set_sensitive(False) crossfadelabel2.set_sensitive(False) crossfadelabel3.set_sensitive(False) crossfadecheck.set_active(False) else: crossfadespin.set_sensitive(True) crossfadelabel2.set_sensitive(True) crossfadelabel3.set_sensitive(True) crossfadecheck.set_active(True) crossfadebox = gtk.HBox() crossfadebox.pack_start(crossfadelabel2) crossfadebox.pack_start(crossfadespin, False, False, 5) crossfadebox.pack_start(crossfadelabel3, False, False, 0) crossfadecheck.connect('toggled', self.prefs_crossfadecheck_toggled, crossfadespin, crossfadelabel2, crossfadelabel3) as_table.attach(as_user_label, 0, 1, 0, 1) as_table.attach(as_user_entry, 1, 2, 0, 1) as_table.attach(as_pass_label, 0, 1, 1, 2) as_table.attach(as_pass_entry, 1, 2, 1, 2) as_table.attach(ui.label(), 0, 2, 2, 3) as_table.attach(display_notification, 0, 2, 3, 4) as_table.attach(notifhbox, 0, 2, 4, 5) as_table.attach(ui.label(), 0, 2, 5, 6) as_table.attach(crossfadecheck, 0, 2, 6, 7) as_table.attach(crossfadebox, 0, 2, 7, 8) as_table.attach(ui.label(), 0, 2, 8, 9) as_vbox.pack_start(as_table, False) as_frame.add(as_vbox) as_checkbox.connect('toggled', self.prefs_as_enabled_toggled, as_user_entry, as_pass_entry, as_user_label, as_pass_label) if not self.as_enabled or audioscrobbler is None: as_user_entry.set_sensitive(False) as_pass_entry.set_sensitive(False) as_user_label.set_sensitive(False) as_pass_label.set_sensitive(False) # Display tab table2 = gtk.Table(7, 2, False) displaylabel = ui.label(markup='<b>' + _('Display') + '</b>', y=1) display_art_hbox = gtk.HBox() display_art = gtk.CheckButton(_("Enable album art")) display_art.set_active(self.show_covers) display_stylized_combo = ui.combo(list=[_("Standard"), _("Stylized")], active=self.covers_type, changed_cb=self.prefs_stylized_toggled) display_stylized_hbox = gtk.HBox() display_stylized_hbox.pack_start(ui.label(text=_("Artwork style:"), x=1)) display_stylized_hbox.pack_start(display_stylized_combo, False, False, 5) display_stylized_hbox.set_sensitive(self.show_covers) display_art_combo = ui.combo(list=[_("Local only"), _("Local, then remote")], active=self.covers_pref) orderart_label = ui.label(text=_("Search order:"), x=1) display_art_hbox.pack_start(orderart_label) display_art_hbox.pack_start(display_art_combo, False, False, 5) display_art_hbox.set_sensitive(self.show_covers) display_art_location_hbox = gtk.HBox() display_art_location_hbox.pack_start(ui.label(text=_("Save art to:"), x=1)) list = ["~/.covers/"] for item in ["/cover.jpg", "/album.jpg", "/folder.jpg", "/" + _("custom")]: list.append("../" + _("file_path") + item) display_art_location = ui.combo(list=list, active=self.art_location, changed_cb=self.prefs_art_location_changed) display_art_location_hbox.pack_start(display_art_location, False, False, 5) display_art_location_hbox.set_sensitive(self.show_covers) display_art.connect('toggled', self.prefs_art_toggled, display_art_hbox, display_art_location_hbox, display_stylized_hbox) display_playback = gtk.CheckButton(_("Enable playback/volume buttons")) display_playback.set_active(self.show_playback) display_playback.connect('toggled', self.prefs_playback_toggled) display_progress = gtk.CheckButton(_("Enable progressbar")) display_progress.set_active(self.show_progress) display_progress.connect('toggled', self.prefs_progress_toggled) display_statusbar = gtk.CheckButton(_("Enable statusbar")) display_statusbar.set_active(self.show_statusbar) display_statusbar.connect('toggled', self.prefs_statusbar_toggled) display_lyrics = gtk.CheckButton(_("Enable lyrics")) display_lyrics.set_active(self.show_lyrics) display_lyrics_location_hbox = gtk.HBox() savelyrics_label = ui.label(text=_("Save lyrics to:"), x=1) display_lyrics_location_hbox.pack_start(savelyrics_label) display_lyrics_location = ui.combo(list=["~/.lyrics/", "../" + _("file_path") + "/"], active=self.lyrics_location, changed_cb=self.prefs_lyrics_location_changed) display_lyrics_location_hbox.pack_start(display_lyrics_location, False, False, 5) display_lyrics_location_hbox.set_sensitive(self.show_lyrics) display_lyrics.connect('toggled', self.prefs_lyrics_toggled, display_lyrics_location_hbox) display_trayicon = gtk.CheckButton(_("Enable system tray icon")) display_trayicon.set_active(self.show_trayicon) if not HAVE_EGG and not HAVE_STATUS_ICON: display_trayicon.set_sensitive(False) table2.attach(ui.label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table2.attach(displaylabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table2.attach(ui.label(), 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table2.attach(display_playback, 1, 3, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_progress, 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_statusbar, 1, 3, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_trayicon, 1, 3, 7, 8, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_lyrics, 1, 3, 8, 9, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_lyrics_location_hbox, 1, 3, 9, 10, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_art, 1, 3, 10, 11, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_stylized_hbox, 1, 3, 11, 12, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_art_hbox, 1, 3, 12, 13, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_art_location_hbox, 1, 3, 13, 14, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(ui.label(), 1, 3, 14, 15, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 75, 0) # Behavior tab table3 = gtk.Table() behaviorlabel = ui.label(markup='<b>' + _('Window Behavior') + '</b>', y=1) win_sticky = gtk.CheckButton(_("Show window on all workspaces")) win_sticky.set_active(self.sticky) win_ontop = gtk.CheckButton(_("Keep window above other windows")) win_ontop.set_active(self.ontop) update_start = gtk.CheckButton(_("Update MPD library on start")) update_start.set_active(self.update_on_start) self.tooltips.set_tip(update_start, _("If enabled, Sonata will automatically update your MPD library when it starts up.")) exit_stop = gtk.CheckButton(_("Stop playback on exit")) exit_stop.set_active(self.stop_on_exit) self.tooltips.set_tip(exit_stop, _("MPD allows playback even when the client is not open. If enabled, Sonata will behave like a more conventional music player and, instead, stop playback upon exit.")) minimize = gtk.CheckButton(_("Minimize to system tray on close/escape")) minimize.set_active(self.minimize_to_systray) self.tooltips.set_tip(minimize, _("If enabled, closing Sonata will minimize it to the system tray. Note that it's currently impossible to detect if there actually is a system tray, so only check this if you have one.")) display_trayicon.connect('toggled', self.prefs_trayicon_toggled, minimize) if HAVE_STATUS_ICON and self.statusicon.is_embedded() and self.statusicon.get_visible(): minimize.set_sensitive(True) elif HAVE_EGG and self.trayicon.get_property('visible') == True: minimize.set_sensitive(True) else: minimize.set_sensitive(False) infofilebox = gtk.HBox() infofile_usage = gtk.CheckButton(_("Write status file:")) infofile_usage.set_active(self.use_infofile) self.tooltips.set_tip(infofile_usage, _("If enabled, Sonata will create a xmms-infopipe like file containing information about the current song. Many applications support the xmms-info file (Instant Messengers, IRC Clients...)")) infopath_options = ui.entry(text=self.infofile_path) self.tooltips.set_tip(infopath_options, _("If enabled, Sonata will create a xmms-infopipe like file containing information about the current song. Many applications support the xmms-info file (Instant Messengers, IRC Clients...)")) if not self.use_infofile: infopath_options.set_sensitive(False) infofile_usage.connect('toggled', self.prefs_infofile_toggled, infopath_options) infofilebox.pack_start(infofile_usage, False, False, 0) infofilebox.pack_start(infopath_options, True, True, 5) behaviorlabel2 = ui.label(markup='<b>' + _('Miscellaneous') + '</b>', y=1) table3.attach(ui.label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table3.attach(behaviorlabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table3.attach(ui.label(), 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table3.attach(win_sticky, 1, 3, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(win_ontop, 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(minimize, 1, 3, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(ui.label(), 1, 3, 7, 8, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table3.attach(behaviorlabel2, 1, 3, 8, 9, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table3.attach(ui.label(), 1, 3, 9, 10, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table3.attach(update_start, 1, 3, 10, 11, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(exit_stop, 1, 3, 11, 12, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(infofilebox, 1, 3, 12, 13, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(ui.label(), 1, 3, 13, 14, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(ui.label(), 1, 3, 14, 15, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(ui.label(), 1, 3, 15, 16, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(ui.label(), 1, 3, 16, 17, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(ui.label(), 1, 3, 17, 18, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(ui.label(), 1, 3, 18, 19, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) # Format tab table4 = gtk.Table(9, 2, False) table4.set_col_spacings(3) formatlabel = ui.label(markup='<b>' + _('Song Formatting') + '</b>', y=1) currentformatbox = gtk.HBox() currentlabel = ui.label(text=_("Current playlist:")) currentoptions = ui.entry(text=self.currentformat) currentformatbox.pack_start(currentlabel, False, False, 0) currentformatbox.pack_start(currentoptions, False, False, 10) libraryformatbox = gtk.HBox() librarylabel = ui.label(text=_("Library:")) libraryoptions = ui.entry(text=self.libraryformat) libraryformatbox.pack_start(librarylabel, False, False, 0) libraryformatbox.pack_start(libraryoptions, False, False, 10) titleformatbox = gtk.HBox() titlelabel = ui.label(text=_("Window title:")) titleoptions = ui.entry(text=self.titleformat) titleoptions.set_text(self.titleformat) titleformatbox.pack_start(titlelabel, False, False, 0) titleformatbox.pack_start(titleoptions, False, False, 10) currsongformatbox1 = gtk.HBox() currsonglabel1 = ui.label(text=_("Current song line 1:")) currsongoptions1 = ui.entry(text=self.currsongformat1) currsongformatbox1.pack_start(currsonglabel1, False, False, 0) currsongformatbox1.pack_start(currsongoptions1, False, False, 10) currsongformatbox2 = gtk.HBox() currsonglabel2 = ui.label(text=_("Current song line 2:")) currsongoptions2 = ui.entry(text=self.currsongformat2) currsongformatbox2.pack_start(currsonglabel2, False, False, 0) currsongformatbox2.pack_start(currsongoptions2, False, False, 10) formatlabels = [currentlabel, librarylabel, titlelabel, currsonglabel1, currsonglabel2] for label in formatlabels: label.set_alignment(0, 0.5) ui.set_widths_equal(formatlabels) availableheading = ui.label(markup='<small>' + _('Available options') + ':</small>', y=0) availablevbox = gtk.VBox() availableformatbox = gtk.HBox() availableformatting = ui.label(markup='<small><span font_family="Monospace">%A</span> - ' + _('Artist name') + '\n<span font_family="Monospace">%B</span> - ' + _('Album name') + '\n<span font_family="Monospace">%T</span> - ' + _('Track name') + '\n<span font_family="Monospace">%N</span> - ' + _('Track number') + '\n<span font_family="Monospace">%D</span> - ' + _('Disc Number') + '\n<span font_family="Monospace">%Y</span> - ' + _('Year') + '</small>', y=0) availableformatting2 = ui.label(markup='<small><span font_family="Monospace">%G</span> - ' + _('Genre') + '\n<span font_family="Monospace">%F</span> - ' + _('File name') + '\n<span font_family="Monospace">%S</span> - ' + _('Stream name') + '\n<span font_family="Monospace">%L</span> - ' + _('Song length') + '\n<span font_family="Monospace">%E</span> - ' + _('Elapsed time (title only)') + '</small>', y=0) availableformatbox.pack_start(availableformatting) availableformatbox.pack_start(availableformatting2) availablevbox.pack_start(availableformatbox, False, False, 0) additionalinfo = ui.label(markup='<small>{ } - ' + _('Info displayed only if all enclosed tags are defined') + '\n' + '| - ' + _('Creates columns in the current playlist') + '</small>', y=0) availablevbox.pack_start(additionalinfo, False, False, 4) table4.attach(ui.label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table4.attach(formatlabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table4.attach(ui.label(), 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table4.attach(currentformatbox, 1, 3, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table4.attach(libraryformatbox, 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table4.attach(titleformatbox, 1, 3, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table4.attach(currsongformatbox1, 1, 3, 7, 8, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table4.attach(currsongformatbox2, 1, 3, 8, 9, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table4.attach(ui.label(), 1, 3, 9, 10, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table4.attach(availableheading, 1, 3, 10, 11, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table4.attach(availablevbox, 1, 3, 11, 12, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 45, 0) table4.attach(ui.label(), 1, 3, 12, 13, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table_names = [[_("_MPD"), mpd_table], [_("_Display"), table2], [_("_Behavior"), table3], [_("_Format"), table4], [_("_Extras"), as_frame]] for table_name in table_names: tmplabel = ui.label(textmn=table_name[0]) prefsnotebook.append_page(table_name[1], tmplabel) hbox.pack_start(prefsnotebook, False, False, 10) prefswindow.vbox.pack_start(hbox, False, False, 10) close_button = prefswindow.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) prefswindow.show_all() close_button.grab_focus() prefswindow.connect('response', self.prefs_window_response, prefsnotebook, exit_stop, win_ontop, display_art_combo, win_sticky, direntry, minimize, update_start, autoconnect, currentoptions, libraryoptions, titleoptions, currsongoptions1, currsongoptions2, crossfadecheck, crossfadespin, infopath_options, hostentry, portentry, passwordentry, using_mpd_env_vars) # Save previous connection properties to determine if we should try to # connect to MPD after prefs are closed: self.prev_host = self.host[self.profile_num] self.prev_port = self.port[self.profile_num] self.prev_password = self.password[self.profile_num] response = prefswindow.show() | 5178d7eb73657d7ee78706340fbf0fc5d779c7ee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/5178d7eb73657d7ee78706340fbf0fc5d779c7ee/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1484,
2556,
12,
2890,
16,
3604,
4672,
15503,
5668,
273,
5915,
18,
12730,
12,
2649,
33,
67,
2932,
12377,
6,
3631,
982,
33,
2890,
18,
5668,
16,
2943,
33,
4521,
79,
18,
2565,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1484,
2556,
12,
2890,
16,
3604,
4672,
15503,
5668,
273,
5915,
18,
12730,
12,
2649,
33,
67,
2932,
12377,
6,
3631,
982,
33,
2890,
18,
5668,
16,
2943,
33,
4521,
79,
18,
2565,
1... |
params.append(positon) | params.append(position) | def get_col_pbx(colID=-1, ln='', position = ''): """Returns either all portalboxes associated with a collection, or based on either colID or language or both. colID - collection id ln - language id""" sql = "SELECT id_portalbox, id_collection, ln, score, position, title, body FROM collection_portalbox, portalbox WHERE id_portalbox = portalbox.id" params = [] try: if colID > -1: sql += " AND id_collection=%s" params.append(colID) if ln: sql += " AND ln=%s" params.append(ln) if position: sql += " AND position=%s" params.append(positon) sql += " ORDER BY position, ln, score desc" res = run_sql(sql, tuple(params)) return res except StandardError, e: return "" | 03cf020f955d18ec92c945843c45bb029934bacb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2139/03cf020f955d18ec92c945843c45bb029934bacb/websearchadminlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1293,
67,
5733,
92,
12,
1293,
734,
29711,
21,
16,
7211,
2218,
2187,
1754,
273,
875,
4672,
3536,
1356,
3344,
777,
11899,
15918,
3627,
598,
279,
1849,
16,
578,
2511,
603,
3344,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1293,
67,
5733,
92,
12,
1293,
734,
29711,
21,
16,
7211,
2218,
2187,
1754,
273,
875,
4672,
3536,
1356,
3344,
777,
11899,
15918,
3627,
598,
279,
1849,
16,
578,
2511,
603,
3344,
... |
gLogger.error(errStr,res['Message']) | gLogger.error( errStr, res['Message'] ) | def removeReplica(self,storageElementName,lfn): """ Remove replica at the supplied Storage Element from Storage Element then file catalogue 'storageElementName' is the storage where the file is to be removed 'lfn' is the file to be removed """ if type(lfn) == types.ListType: lfns = lfn elif type(lfn) == types.StringType: lfns = [lfn] else: errStr = "ReplicaManager.removeReplica: Supplied lfns must be string or list of strings." gLogger.error(errStr) return S_ERROR(errStr) gLogger.verbose("ReplicaManager.removeReplica: Attempting to remove catalogue entry for %s lfns at %s." % (len(lfns),storageElementName)) res = self.fileCatalogue.getReplicas(lfns,True) if not res['OK']: errStr = "ReplicaManager.removeReplica: Completely failed to get replicas for lfns." gLogger.error(errStr,res['Message']) return res failed = res['Value']['Failed'] successful = {} replicaTuples = [] for lfn,repDict in res['Value']['Successful'].items(): if not repDict.has_key(storageElementName): # The file doesn't exist at the storage element so don't have to remove it successful[lfn] = True elif len(repDict.keys()) == 1: # The file has only a single replica so don't remove gLogger.error("The replica you are trying to remove is the only one.","%s @ %s" % (lfn,storageElementName)) failed[lfn] = "Failed to remove sole replica" else: sePfn = repDict[storageElementName] replicaTuple = (lfn,sePfn) replicaTuples.append(replicaTuple) res = self.__removeReplica(storageElementName,replicaTuples) if not res['OK']: return res failed.update(res['Value']['Failed']) successful.update(res['Value']['Successful']) resDict = {'Successful':successful,'Failed':failed} gDataStoreClient.commit() return S_OK(resDict) | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
14222,
12,
2890,
16,
5697,
30584,
16,
80,
4293,
4672,
3536,
3581,
12335,
622,
326,
4580,
5235,
3010,
628,
5235,
3010,
1508,
585,
20833,
225,
296,
5697,
30584,
11,
353,
326,
2502,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
14222,
12,
2890,
16,
5697,
30584,
16,
80,
4293,
4672,
3536,
3581,
12335,
622,
326,
4580,
5235,
3010,
628,
5235,
3010,
1508,
585,
20833,
225,
296,
5697,
30584,
11,
353,
326,
2502,
1... |
if (sld.lower() in ( "co", "ac", "com", "edu", "org", "net", "gov", "mil", "int") and len(tld) == 2): | if sld.lower() in ("co", "ac", "com", "edu", "org", "net", "gov", "mil", "int", "aero", "biz", "cat", "coop", "info", "jobs", "mobi", "museum", "name", "pro", "travel", "eu") and len(tld) == 2: | def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request_host(request) domain = cookie.domain if self.strict_domain and (domain.count(".") >= 2): i = domain.rfind(".") j = domain.rfind(".", 0, i) if j == 0: # domain like .foo.bar tld = domain[i+1:] sld = domain[j+1:i] if (sld.lower() in ( "co", "ac", "com", "edu", "org", "net", "gov", "mil", "int") and len(tld) == 2): # domain like .co.uk debug(" country-code second level domain %s", domain) return False if domain.startswith("."): undotted_domain = domain[1:] else: undotted_domain = domain embedded_dots = (undotted_domain.find(".") >= 0) if not embedded_dots and domain != ".local": debug(" non-local domain %s contains no embedded dot", domain) return False if cookie.version == 0: if (not erhn.endswith(domain) and (not erhn.startswith(".") and not ("."+erhn).endswith(domain))): debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainRFC2965Match)): if not domain_match(erhn, domain): debug(" effective request-host %s does not domain-match " "%s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainStrictNoDots)): host_prefix = req_host[:-len(domain)] if (host_prefix.find(".") >= 0 and not IPV4_RE.search(req_host)): debug(" host prefix %s for domain %s contains a dot", host_prefix, domain) return False return True | 788bbe0990f652227ea8b9f197c52ec55259b2cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/788bbe0990f652227ea8b9f197c52ec55259b2cf/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
601,
67,
4308,
12,
2890,
16,
3878,
16,
590,
4672,
309,
365,
18,
291,
67,
23156,
12,
8417,
18,
4308,
4672,
1198,
2932,
282,
2461,
738,
87,
353,
316,
729,
1203,
17,
1098,
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,
444,
67,
601,
67,
4308,
12,
2890,
16,
3878,
16,
590,
4672,
309,
365,
18,
291,
67,
23156,
12,
8417,
18,
4308,
4672,
1198,
2932,
282,
2461,
738,
87,
353,
316,
729,
1203,
17,
1098,
3113... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.