rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
finame = os.path.join(test_home_dir, "cluster-config.txt") ftname = os.path.join(test_home_dir, "cluster-config.txt.tmp") hostname = socket.gethostname() fi = open(finame) ft = open(ftname, 'w') for s in fi.readlines(): ft.write(s.replace('machine-1',hostname)) | try: finame = os.path.join(test_home_dir, "cluster-config.txt") ftname = os.path.join(test_home_dir, "cluster-config.txt.tmp") hostname = socket.gethostname() fi = open(finame) ft = open(ftname, 'w') for s in fi.readlines(): ft.write(s.replace('machine-1',hostname)) fi.close() ft.close() shutil.copy(ftname,finame) os.unlink(ftname) except: errmes = sys.exc_info()[0] result['RunStrcTest.cluster-config'] = 'Error: %s' % errmes result.Fail("Error in editing cluster-config") | def Run(self, context, result): """Actually run the StreamIt compiler.""" | b743e4b88b01a9a1e4c96481ee8739b465c0f5f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12935/b743e4b88b01a9a1e4c96481ee8739b465c0f5f9/streamit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
12,
2890,
16,
819,
16,
563,
4672,
3536,
2459,
3452,
1086,
326,
3961,
7193,
5274,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
12,
2890,
16,
819,
16,
563,
4672,
3536,
2459,
3452,
1086,
326,
3961,
7193,
5274,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sage: Mod(2,5) >= x | sage: Mod(2,5) >= x | def __le__(self, right): r""" Construct the symbolic inequality \code{self <= right}. | 2b6ad56bcf2516ea032c64349bb279c9ac313cda /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2b6ad56bcf2516ea032c64349bb279c9ac313cda/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
298,
972,
12,
2890,
16,
2145,
4672,
436,
8395,
14291,
326,
16754,
316,
9729,
560,
521,
710,
95,
2890,
1648,
2145,
5496,
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,
0,
0,
0,
0,
0,
0,
0,
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,
298,
972,
12,
2890,
16,
2145,
4672,
436,
8395,
14291,
326,
16754,
316,
9729,
560,
521,
710,
95,
2890,
1648,
2145,
5496,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if type == 'plot': | if type == "plot" or type == "notrig": | def __init__(self, inspJob, procParams, ifo, trig, cp,opts,dag, datafindCache, d_node, datafindCommand, type='plot',sngl_table = None): | 0e8f6b7cd053a463158947b05c188cee7a4dd02d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/0e8f6b7cd053a463158947b05c188cee7a4dd02d/fu_Condor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
316,
1752,
2278,
16,
5418,
1370,
16,
21479,
16,
23142,
16,
3283,
16,
4952,
16,
30204,
16,
501,
4720,
1649,
16,
302,
67,
2159,
16,
501,
4720,
2189,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
316,
1752,
2278,
16,
5418,
1370,
16,
21479,
16,
23142,
16,
3283,
16,
4952,
16,
30204,
16,
501,
4720,
1649,
16,
302,
67,
2159,
16,
501,
4720,
2189,
16,
... |
muleh rsi, flags=(OF,CF) | muleh ah, flags=(OF,CF) | def macroop IMUL_B_P | abe8fb38446c64d40266dfe5aa49e124e2bd5cb3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6787/abe8fb38446c64d40266dfe5aa49e124e2bd5cb3/multiply_and_divide.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
6246,
1506,
67,
38,
67,
52,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
6246,
1506,
67,
38,
67,
52,
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,
... |
n = ((n+3)/4)*4 | n = ((n+3)//4)*4 | def pack_fstring(self, n, s): if n < 0: raise ValueError, 'fstring size must be nonnegative' data = s[:n] n = ((n+3)/4)*4 data = data + (n - len(data)) * '\0' self.__buf.write(data) | a4c2bc2b2e573c1a9f2ac6485026251cc956c5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a4c2bc2b2e573c1a9f2ac6485026251cc956c5e1/xdrlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
67,
74,
1080,
12,
2890,
16,
290,
16,
272,
4672,
309,
290,
411,
374,
30,
1002,
2068,
16,
296,
74,
1080,
963,
1297,
506,
1661,
13258,
11,
501,
273,
272,
10531,
82,
65,
290,
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,
2298,
67,
74,
1080,
12,
2890,
16,
290,
16,
272,
4672,
309,
290,
411,
374,
30,
1002,
2068,
16,
296,
74,
1080,
963,
1297,
506,
1661,
13258,
11,
501,
273,
272,
10531,
82,
65,
290,
273,
... |
insert2_params.append(ReturningParam(12)) | insert2_params += (ReturningParam(12),) | def assert_stmts(expected, received): for stmt, params, posn in expected: if not received: assert False while received: teststmt, testparams, testmultiparams = received.pop(0) teststmt = re.compile(r'[\n\t ]+', re.M).sub(' ', teststmt).strip() if teststmt.startswith(stmt) and (testparams==params or testparams==posn): break | 0b78ef9e7a0292f78ef06ff36202e78e4a3f5981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/0b78ef9e7a0292f78ef06ff36202e78e4a3f5981/test_execute.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1815,
67,
25659,
12,
3825,
16,
5079,
4672,
364,
3480,
16,
859,
16,
949,
82,
316,
2665,
30,
309,
486,
5079,
30,
1815,
1083,
1323,
5079,
30,
1842,
10589,
16,
1842,
2010,
16,
1842,
5421,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1815,
67,
25659,
12,
3825,
16,
5079,
4672,
364,
3480,
16,
859,
16,
949,
82,
316,
2665,
30,
309,
486,
5079,
30,
1815,
1083,
1323,
5079,
30,
1842,
10589,
16,
1842,
2010,
16,
1842,
5421,
... |
self._templates[k] = v | self.bindTemplate(k, v) | def manage_templates(self, REQUEST=None): """set all the template/type mappings""" prefix = 'template_names_' for key in REQUEST.form.keys(): if key.startswith(prefix): k = key[len(prefix):] v = REQUEST.form.get(key) self._templates[k] = v | fddba000165158aa0c6df6b9e406843fecae48f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/fddba000165158aa0c6df6b9e406843fecae48f2/ArchetypeTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
8502,
12,
2890,
16,
12492,
33,
7036,
4672,
3536,
542,
777,
326,
1542,
19,
723,
7990,
8395,
1633,
273,
296,
3202,
67,
1973,
4623,
364,
498,
316,
12492,
18,
687,
18,
2452,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
8502,
12,
2890,
16,
12492,
33,
7036,
4672,
3536,
542,
777,
326,
1542,
19,
723,
7990,
8395,
1633,
273,
296,
3202,
67,
1973,
4623,
364,
498,
316,
12492,
18,
687,
18,
2452,
133... |
"H2'": atom_info("H", 0, "H'"), | "H2'": atom_info("H", 0, "H"), | def keys(self): return ("element_symbol", "ionic_state", "scattering_label") | 46b20303e8ed53745807da84c39cb29f25aa3911 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/46b20303e8ed53745807da84c39cb29f25aa3911/residue_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
7566,
2956,
67,
7175,
3113,
315,
285,
335,
67,
2019,
3113,
315,
31320,
310,
67,
1925,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
7566,
2956,
67,
7175,
3113,
315,
285,
335,
67,
2019,
3113,
315,
31320,
310,
67,
1925,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
start, end = r.span(1) | start, end = r.span(2) | def doc_literal( self, s, expr = re.compile(r"'([%s%s%s\s]+)'[%s]+" % (letters, digits, literal_punc, phrase_delimiters)).search): | e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b/DocumentClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
67,
13107,
12,
365,
16,
272,
16,
3065,
273,
283,
18,
11100,
12,
86,
5187,
3816,
9,
87,
9,
87,
9,
87,
64,
87,
3737,
2506,
14451,
87,
3737,
6,
738,
261,
26054,
16,
6815,
16,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
67,
13107,
12,
365,
16,
272,
16,
3065,
273,
283,
18,
11100,
12,
86,
5187,
3816,
9,
87,
9,
87,
9,
87,
64,
87,
3737,
2506,
14451,
87,
3737,
6,
738,
261,
26054,
16,
6815,
16,
7... |
for y_el in row: | for y_el in y_vec: | def update_equality_graph(eq_graph_edges, s, t, mat) # update the equality graph based on the new labelings # only edges that contain the vertices in s and t need to be # checked. # add equality edges from s for x_el in s: row = y_vec[x_el.index] x_w = x_el.label_weight weight_row = mat[x_el.index] for y_el in row: y_w = y_el.label_weight w = weight_row[y_el.index] if (x_w + y_w) == w: eq_graph.add(x_el, y_el) else: eq_graph.remove(x_el, y_el) # add equality edges from t for y_el in t: offset = y_el.index y_w = y_el.label_weight for x_el, row in itertools.izip(x_vec, mat): x_w = x_el.label_weight w = mat[x_el.index][offset] if (x_w + y_w) == w: eq_graph.add(x_el, y_el) else: eq_graph.remove(x_el, y_el) | a2ad0dee0947cbc68b1113dad3dc27777f909fdb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11717/a2ad0dee0947cbc68b1113dad3dc27777f909fdb/partition_dist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
9729,
560,
67,
4660,
12,
11253,
67,
4660,
67,
8746,
16,
272,
16,
268,
16,
4834,
13,
468,
1089,
326,
14958,
2667,
2511,
603,
326,
394,
1433,
899,
468,
282,
1338,
5231,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
9729,
560,
67,
4660,
12,
11253,
67,
4660,
67,
8746,
16,
272,
16,
268,
16,
4834,
13,
468,
1089,
326,
14958,
2667,
2511,
603,
326,
394,
1433,
899,
468,
282,
1338,
5231,
716,
... |
if not profilers.only(): for i in range(iterations): utils.system(self.srcdir + '/run_test ' + args) if profilers.present(): profilers.start(self) utils.system(self.srcdir + '/run_test ' + args) profilers.stop(self) profilers.report(self) | utils.system(self.srcdir + '/run_test ' + args) | def execute(self, iterations = 1, fstype = 'iso9660'): profilers = self.job.profilers args = fstype + ' 1' if not profilers.only(): for i in range(iterations): utils.system(self.srcdir + '/run_test ' + args) | 74b85f885034a163e9a64a3041aa9894f7f02fee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/74b85f885034a163e9a64a3041aa9894f7f02fee/fsfuzzer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
11316,
273,
404,
16,
20223,
388,
273,
296,
9699,
10525,
4848,
11,
4672,
450,
7540,
414,
273,
365,
18,
4688,
18,
685,
7540,
414,
833,
273,
20223,
388,
397,
296,
404,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
11316,
273,
404,
16,
20223,
388,
273,
296,
9699,
10525,
4848,
11,
4672,
450,
7540,
414,
273,
365,
18,
4688,
18,
685,
7540,
414,
833,
273,
20223,
388,
397,
296,
404,... |
msg.set_boundary('%s %s attachment' % ('-'*20, msg.get_type('text/plain'))) sfp = StringIO() g = ScrubberGenerator(sfp, mangle_from_=0, skipheaders=0) g(msg) sfp.seek(0) msg = HeaderParser(Message.Message).parse(sfp) | if charset is None: charset = Utils.GetCharSet(mlist.preferred_language) text = [] for part in msg.get_payload(): partctype = part.get_content_type() if partctype <> 'text/plain': text.append(_('Skipped content of type %(partctype)s')) continue try: t = part.get_payload(decode=1) except binascii.Error: t = part.get_payload() partcharset = part.get_charset() if partcharset and partcharset <> charset: try: t = unicode(t, partcharset, 'replace') t = t.encode(charset, 'replace') except UnicodeError: t = unicode(t, 'ascii', 'replace').encode('ascii') text.append(t) sep = _('-------------- next part --------------\n') msg.set_payload(sep.join(text), charset) msg.set_type('text/plain') | # can't handle messages with list payloads. This is a kludge (def (n) | 49db7e5222f8ad2e2590c0e9dc3fb2bb98bed6c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/49db7e5222f8ad2e2590c0e9dc3fb2bb98bed6c8/Scrubber.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
848,
1404,
1640,
2743,
598,
666,
22790,
18,
225,
1220,
353,
279,
15290,
27110,
261,
536,
261,
82,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
848,
1404,
1640,
2743,
598,
666,
22790,
18,
225,
1220,
353,
279,
15290,
27110,
261,
536,
261,
82,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
'File' : default, | 'File' : (), | def test_wfmapping(self): default = ('plone_workflow',) folder = ('folder_workflow',) mapping = { 'Document' : default, 'Event' : default, 'Favorite' : default, 'File' : default, 'Folder' : folder, 'Large Plone Folder' : folder, 'Image' : default, 'Link' : default, 'News Item' : default, 'Topic' : folder, } for pt, wf in mapping.items(): pwf = self.wf.getChainFor(pt) self.failUnlessEqual(pwf, wf, (pt, pwf, wf)) | b7b777358b86cbfd1df7d3e8aa6bd1e7416c7d0b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11956/b7b777358b86cbfd1df7d3e8aa6bd1e7416c7d0b/test_bugs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
15581,
6770,
12,
2890,
4672,
805,
273,
7707,
412,
476,
67,
13815,
2187,
13,
3009,
273,
7707,
5609,
67,
13815,
2187,
13,
225,
2874,
273,
288,
296,
2519,
11,
294,
805,
16,
296,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
15581,
6770,
12,
2890,
4672,
805,
273,
7707,
412,
476,
67,
13815,
2187,
13,
3009,
273,
7707,
5609,
67,
13815,
2187,
13,
225,
2874,
273,
288,
296,
2519,
11,
294,
805,
16,
296,... |
p = pool.SingletonThreadPool(creator=mock_dbapi.connect, | dbapi = MockDBAPI() p = pool.SingletonThreadPool(creator=dbapi.connect, | def test_cleanup(self): """test that the pool's connections are OK after cleanup() has been called.""" | 7513b46730d1b57a6b8addde8dfb4f83ee1e6cb4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/7513b46730d1b57a6b8addde8dfb4f83ee1e6cb4/test_pool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
16732,
12,
2890,
4672,
3536,
3813,
716,
326,
2845,
1807,
5921,
854,
7791,
1839,
6686,
1435,
711,
2118,
2566,
12123,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
16732,
12,
2890,
4672,
3536,
3813,
716,
326,
2845,
1807,
5921,
854,
7791,
1839,
6686,
1435,
711,
2118,
2566,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if i == 1 : i-=1 | def update(self, data, ed,tweak=''): # supply n as a raw string # tweak = data sequence number """Perform a XTS encrypt/decrypt operation. | b07a409d3af733ac5af03a05699e288dff3f28b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8009/b07a409d3af733ac5af03a05699e288dff3f28b9/blockcipher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
501,
16,
1675,
16,
88,
26008,
2218,
11,
4672,
468,
14467,
290,
487,
279,
1831,
533,
468,
21279,
273,
501,
3102,
1300,
3536,
4990,
279,
1139,
8047,
7347,
19,
19790,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
501,
16,
1675,
16,
88,
26008,
2218,
11,
4672,
468,
14467,
290,
487,
279,
1831,
533,
468,
21279,
273,
501,
3102,
1300,
3536,
4990,
279,
1139,
8047,
7347,
19,
19790,
... | |
sage: G<K False sage: G>K False | sage: G<K False sage: G>K False | def __cmp__(self, other): r""" Compare self and other. If self and other are in a common ambient group, then self = other precisely if self is contained in other. EXAMPLES:: sage: G = CyclicPermutationGroup(4) sage: gens = G.gens() sage: H = DihedralGroup(4) sage: PermutationGroup_subgroup(H,list(gens)) Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)] sage: K=PermutationGroup_subgroup(H,list(gens)) sage: G<K False sage: G>K False """ if self is other: return 0 if not isinstance(other, PermutationGroup_generic): return -1 c = cmp(self.ambient_group(), other.ambient_group()) if c: return c if self.is_subgroup(other): return -1 else: return 1 | 6c30e34ec3d82b902bad1cdb9e9cacf73b956af3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6c30e34ec3d82b902bad1cdb9e9cacf73b956af3/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
436,
8395,
11051,
365,
471,
1308,
18,
971,
365,
471,
1308,
854,
316,
279,
2975,
13232,
1979,
1041,
16,
1508,
365,
273,
1308,
13382,
291,
2357,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9625,
972,
12,
2890,
16,
1308,
4672,
436,
8395,
11051,
365,
471,
1308,
18,
971,
365,
471,
1308,
854,
316,
279,
2975,
13232,
1979,
1041,
16,
1508,
365,
273,
1308,
13382,
291,
2357,
... |
if n == 1: retval = (retval[0][0],) + retval[1:] | def leastsq(func, x0, args=(), Dfun=None, full_output=0, col_deriv=0, ftol=1.49012e-8, xtol=1.49012e-8, gtol=0.0, maxfev=0, epsfcn=0.0, factor=100, diag=None): """Minimize the sum of squares of a set of equations. :: x = arg min(sum(func(y)**2,axis=0)) y Parameters ---------- func : callable should take at least one (possibly length N vector) argument and returns M floating point numbers. x0 : ndarray The starting estimate for the minimization. args : tuple Any extra arguments to func are placed in this tuple. Dfun : callable A function or method to compute the Jacobian of func with derivatives across the rows. If this is None, the Jacobian will be estimated. full_output : bool non-zero to return all optional outputs. col_deriv : bool non-zero to specify that the Jacobian function computes derivatives down the columns (faster, because there is no transpose operation). ftol : float Relative error desired in the sum of squares. xtol : float Relative error desired in the approximate solution. gtol : float Orthogonality desired between the function vector and the columns of the Jacobian. maxfev : int The maximum number of calls to the function. If zero, then 100*(N+1) is the maximum where N is the number of elements in x0. epsfcn : float A suitable step length for the forward-difference approximation of the Jacobian (for Dfun=None). If epsfcn is less than the machine precision, it is assumed that the relative errors in the functions are of the order of the machine precision. factor : float A parameter determining the initial step bound (``factor * || diag * x||``). Should be in interval ``(0.1, 100)``. diag : sequence N positive entries that serve as a scale factors for the variables. Returns ------- x : ndarray The solution (or the result of the last iteration for an unsuccessful call). cov_x : ndarray Uses the fjac and ipvt optional outputs to construct an estimate of the jacobian around the solution. ``None`` if a singular matrix encountered (indicates very flat curvature in some direction). This matrix must be multiplied by the residual standard deviation to get the covariance of the parameter estimates -- see curve_fit. infodict : dict a dictionary of optional outputs with the keys:: - 'nfev' : the number of function calls - 'fvec' : the function evaluated at the output - 'fjac' : A permutation of the R matrix of a QR factorization of the final approximate Jacobian matrix, stored column wise. Together with ipvt, the covariance of the estimate can be approximated. - 'ipvt' : an integer array of length N which defines a permutation matrix, p, such that fjac*p = q*r, where r is upper triangular with diagonal elements of nonincreasing magnitude. Column j of p is column ipvt(j) of the identity matrix. - 'qtf' : the vector (transpose(q) * fvec). mesg : str A string message giving information about the cause of failure. ier : int An integer flag. If it is equal to 1, 2, 3 or 4, the solution was found. Otherwise, the solution was not found. In either case, the optional output variable 'mesg' gives more information. Notes ----- "leastsq" is a wrapper around MINPACK's lmdif and lmder algorithms. """ x0 = array(x0, ndmin=1) n = len(x0) if type(args) != type(()): args = (args,) m = check_func(func, x0, args, n)[0] if n > m: raise TypeError('Improper input: N=%s must not exceed M=%s' % (n,m)) if Dfun is None: if (maxfev == 0): maxfev = 200*(n + 1) retval = _minpack._lmdif(func, x0, args, full_output, ftol, xtol, gtol, maxfev, epsfcn, factor, diag) else: if col_deriv: check_func(Dfun, x0, args, n, (n,m)) else: check_func(Dfun, x0, args, n, (m,n)) if (maxfev == 0): maxfev = 100*(n + 1) retval = _minpack._lmder(func, Dfun, x0, args, full_output, col_deriv, ftol, xtol, gtol, maxfev, factor, diag) errors = {0:["Improper input parameters.", TypeError], 1:["Both actual and predicted relative reductions " "in the sum of squares\n are at most %f" % ftol, None], 2:["The relative error between two consecutive " "iterates is at most %f" % xtol, None], 3:["Both actual and predicted relative reductions in " "the sum of squares\n are at most %f and the " "relative error between two consecutive " "iterates is at \n most %f" % (ftol,xtol), None], 4:["The cosine of the angle between func(x) and any " "column of the\n Jacobian is at most %f in " "absolute value" % gtol, None], 5:["Number of calls to function has reached " "maxfev = %d." % maxfev, ValueError], 6:["ftol=%f is too small, no further reduction " "in the sum of squares\n is possible.""" % ftol, ValueError], 7:["xtol=%f is too small, no further improvement in " "the approximate\n solution is possible." % xtol, ValueError], 8:["gtol=%f is too small, func(x) is orthogonal to the " "columns of\n the Jacobian to machine " "precision." % gtol, ValueError], 'unknown':["Unknown error.", TypeError]} info = retval[-1] # The FORTRAN return value if (info not in [1,2,3,4] and not full_output): if info in [5,6,7,8]: warnings.warn(errors[info][0], RuntimeWarning) else: try: raise errors[info][1](errors[info][0]) except KeyError: raise errors['unknown'][1](errors['unknown'][0]) if n == 1: retval = (retval[0][0],) + retval[1:] mesg = errors[info][0] if full_output: cov_x = None if info in [1,2,3,4]: from numpy.dual import inv from numpy.linalg import LinAlgError perm = take(eye(n),retval[1]['ipvt']-1,0) r = triu(transpose(retval[1]['fjac'])[:n,:]) R = dot(r, perm) try: cov_x = inv(dot(transpose(R),R)) except LinAlgError: pass return (retval[0], cov_x) + retval[1:-1] + (mesg, info) else: return (retval[0], info) | 93345f6cdb0600915212ea5c97acb154419d39ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/93345f6cdb0600915212ea5c97acb154419d39ae/minpack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4520,
11410,
12,
644,
16,
619,
20,
16,
833,
33,
9334,
463,
12125,
33,
7036,
16,
1983,
67,
2844,
33,
20,
16,
645,
67,
20615,
33,
20,
16,
284,
3490,
33,
21,
18,
7616,
1611,
22,
73,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4520,
11410,
12,
644,
16,
619,
20,
16,
833,
33,
9334,
463,
12125,
33,
7036,
16,
1983,
67,
2844,
33,
20,
16,
645,
67,
20615,
33,
20,
16,
284,
3490,
33,
21,
18,
7616,
1611,
22,
73,
... | |
Window.__init__(self, player_ui, navigator) self.body = appuifw.Listbox([u"empty"], self.go_to) | Window.__init__(self, quit_handler, navigator) self.body = self.create_listbox([u"empty"], self.go_to) | def __init__(self, player_ui, navigator, title=""): if title: Window.__init__(self, player_ui, navigator, title) else: Window.__init__(self, player_ui, navigator) self.body = appuifw.Listbox([u"empty"], self.go_to) self.menu = self.get_menu_items() self.musics = [] | 43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5169/43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd/aspyplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
7291,
67,
4881,
16,
19796,
16,
2077,
1546,
6,
4672,
309,
2077,
30,
6076,
16186,
2738,
972,
12,
2890,
16,
7291,
67,
4881,
16,
19796,
16,
2077,
13,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7291,
67,
4881,
16,
19796,
16,
2077,
1546,
6,
4672,
309,
2077,
30,
6076,
16186,
2738,
972,
12,
2890,
16,
7291,
67,
4881,
16,
19796,
16,
2077,
13,
469,
... |
""" S = self.star_involution().matrix() - sign | EXAMPLES: sage: ModularSymbols(1,12,0,GF(5)).minus_submodule() Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Finite Field of size 5 """ S = self.star_involution().matrix() - self.base_ring()(sign) | def _compute_sign_submodule(self, sign, compute_dual=True): """ Return the subspace of self that is fixed under the star involution. | 437a88c484a4b197d6404a1018d9b02cffb17dfb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/437a88c484a4b197d6404a1018d9b02cffb17dfb/ambient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
2977,
67,
1717,
2978,
12,
2890,
16,
1573,
16,
3671,
67,
72,
1462,
33,
5510,
4672,
3536,
2000,
326,
720,
2981,
434,
365,
716,
353,
5499,
3613,
326,
10443,
2198,
5889,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
2977,
67,
1717,
2978,
12,
2890,
16,
1573,
16,
3671,
67,
72,
1462,
33,
5510,
4672,
3536,
2000,
326,
720,
2981,
434,
365,
716,
353,
5499,
3613,
326,
10443,
2198,
5889,
18,... |
Defn: a |--> 1.41421356237309 | Defn: a |--> 1.414213562373... | def period_lattice(self, real_embedding): r""" Returns the period lattice of the elliptic curve for the given real embedding of its base field. | 95ca5a5760135b2b01413df3731d77fec39518c7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/95ca5a5760135b2b01413df3731d77fec39518c7/ell_number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3879,
67,
80,
24966,
12,
2890,
16,
2863,
67,
23744,
4672,
436,
8395,
2860,
326,
3879,
16690,
434,
326,
415,
549,
21507,
8882,
364,
326,
864,
2863,
15853,
434,
2097,
1026,
652,
18,
2,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3879,
67,
80,
24966,
12,
2890,
16,
2863,
67,
23744,
4672,
436,
8395,
2860,
326,
3879,
16690,
434,
326,
415,
549,
21507,
8882,
364,
326,
864,
2863,
15853,
434,
2097,
1026,
652,
18,
2,
-... |
try: return run_sql("""SELECT id FROM user WHERE email = '%s' """ % (email, ))[0][0] | try: return run_sql("""SELECT id FROM user WHERE email = %s """, (email, ))[0][0] | def acc_getUserId(email=''): """get id of user, email given.""" try: return run_sql("""SELECT id FROM user WHERE email = '%s' """ % (email, ))[0][0] except IndexError: return 0 | 26e50a54ed5eb379037d5a141a2bb8b9d14b42b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1931/26e50a54ed5eb379037d5a141a2bb8b9d14b42b7/access_control_admin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4078,
67,
588,
10502,
12,
3652,
2218,
11,
4672,
3536,
588,
612,
434,
729,
16,
2699,
864,
12123,
225,
775,
30,
327,
1086,
67,
4669,
2932,
3660,
4803,
612,
4571,
729,
4852,
2699,
273,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4078,
67,
588,
10502,
12,
3652,
2218,
11,
4672,
3536,
588,
612,
434,
729,
16,
2699,
864,
12123,
225,
775,
30,
327,
1086,
67,
4669,
2932,
3660,
4803,
612,
4571,
729,
4852,
2699,
273,
73... |
['sage/gsl/callback.pyx'], libraries = ['gsl', BLAS, BLAS2] ,define_macros=[('GSL_DISABLE_DEPRECATED','1')]) | ['sage/gsl/callback.pyx'], libraries = ['gsl', BLAS, BLAS2], define_macros=[('GSL_DISABLE_DEPRECATED','1')]) | def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False | 1566a0251d3192d0d1c090cbeb6e117ad663da4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1566a0251d3192d0d1c090cbeb6e117ad663da4f/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2704,
264,
12,
768,
21,
16,
585,
22,
4672,
3536,
2000,
1053,
309,
3344,
585,
22,
1552,
486,
1005,
578,
353,
12156,
2353,
585,
21,
18,
225,
971,
585,
21,
1552,
486,
1005,
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,
353,
67,
2704,
264,
12,
768,
21,
16,
585,
22,
4672,
3536,
2000,
1053,
309,
3344,
585,
22,
1552,
486,
1005,
578,
353,
12156,
2353,
585,
21,
18,
225,
971,
585,
21,
1552,
486,
1005,
16,... |
if self.settings.has_key("SEEDCACHE") and os.path.isdir(self.settings["source_path"]): unpack_cmd="rsync -a --delete "+self.settings["source_path"]+" "+self.settings["chroot_path"] display_msg="\nStarting rsync from "+self.settings["source_path"]+"\nto "+\ self.settings["chroot_path"]+" (This may take some time) ...\n" error_msg="Rsync of "+self.settings["source_path"]+" to "+self.settings["chroot_path"]+" failed." else: | if self.settings.has_key("SEEDCACHE"): if os.path.isdir(self.settings["source_path"]): unpack_cmd="rsync -a --delete "+self.settings["source_path"]+" "+self.settings["chroot_path"] display_msg="\nStarting rsync from "+self.settings["source_path"]+"\nto "+\ self.settings["chroot_path"]+" (This may take some time) ...\n" error_msg="Rsync of "+self.settings["source_path"]+" to "+self.settings["chroot_path"]+" failed." else: print "Referenced SEEDCACHE does not appear to be a directory, trying to untar..." display_msg="\nStarting tar extract from "+self.settings["source_path"]+"\nto "+\ self.settings["chroot_path"]+" (This may take some time) ...\n" unpack_cmd="tar xjpf "+self.settings["source_path"]+" -C "+self.settings["chroot_path"] error_msg="Tarball extraction of "+self.settings["source_path"]+" to "+self.settings["chroot_path"]+" failed." else: | def unpack(self): unpack=True | 782b0a5212453f19f7c90a2ee8652e3b23c9145e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/782b0a5212453f19f7c90a2ee8652e3b23c9145e/generic_stage_target.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6167,
12,
2890,
4672,
6167,
33,
5510,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6167,
12,
2890,
4672,
6167,
33,
5510,
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,
-10... |
except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError), e: | except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError, BadStatusLine), e: | def follow_link(self, *args, **kwargs): try: self._change_location(mechanize.Browser.follow_link(self, *args, **kwargs)) except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError), e: self.page = None raise BrowserHTTPError('%s (url="%s")' % (e, args and args[0] or 'None')) except (mechanize.BrowserStateError, BrowserRetry), e: self.home() raise BrowserUnavailable(e) | 73d33c059727fedd975afa0f1a0aa7f2def36805 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/73d33c059727fedd975afa0f1a0aa7f2def36805/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2805,
67,
1232,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
775,
30,
365,
6315,
3427,
67,
3562,
12,
3501,
7472,
554,
18,
9132,
18,
14641,
67,
1232,
12,
2890,
16,
380,
1968,
16,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2805,
67,
1232,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
775,
30,
365,
6315,
3427,
67,
3562,
12,
3501,
7472,
554,
18,
9132,
18,
14641,
67,
1232,
12,
2890,
16,
380,
1968,
16,
28... |
sage: octave.set('x', '2') | sage: octave.set('x', '2') | def clear(self, var): """ Clear the variable named var. | 67fcf14ace2310913398ab7b1cbe1716952119e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/67fcf14ace2310913398ab7b1cbe1716952119e0/octave.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
12,
2890,
16,
569,
4672,
3536,
10121,
326,
2190,
4141,
569,
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,
2424,
12,
2890,
16,
569,
4672,
3536,
10121,
326,
2190,
4141,
569,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for prot in self.protocols: | for prot in self.relays.itervalues(): | def shutdown(self): if self.shutting_down: return self.shutting_down = True for timer in self.cleanup_timers.itervalues(): timer.cancel() if len(self.protocols) == 0: return succeed(None) else: for prot in self.protocols: prot.transport.loseConnection() self.defer = Deferred() return self.defer | 884867b604330ad8461c612a16f98b830b99ec9c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3445/884867b604330ad8461c612a16f98b830b99ec9c/dispatcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5731,
12,
2890,
4672,
309,
365,
18,
674,
25387,
67,
2378,
30,
327,
365,
18,
674,
25387,
67,
2378,
273,
1053,
364,
5441,
316,
365,
18,
16732,
67,
8584,
414,
18,
2165,
2372,
13332,
5441,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5731,
12,
2890,
4672,
309,
365,
18,
674,
25387,
67,
2378,
30,
327,
365,
18,
674,
25387,
67,
2378,
273,
1053,
364,
5441,
316,
365,
18,
16732,
67,
8584,
414,
18,
2165,
2372,
13332,
5441,... |
if container_class or self._create_mount_points: | if container_class and self._create_mount_points: | def _traverseToMountedRoot(self, root, mount_parent): """Hook for getting the object to be mounted. """ params = self._v_mount_params if params is None: params = self._loadMountParams() real_root, real_path, container_class = params if real_root is None: real_root = 'Application' try: obj = root[real_root] except KeyError: if container_class or self._create_mount_points: # Create a database automatically. from OFS.Application import Application obj = Application() root[real_root] = obj # Get it into the database transaction.commit(1) else: raise | d9739be023a194e84ac5e2c4bbc1f6729e95d918 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d9739be023a194e84ac5e2c4bbc1f6729e95d918/MountedObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2033,
2476,
774,
8725,
329,
2375,
12,
2890,
16,
1365,
16,
5344,
67,
2938,
4672,
3536,
5394,
364,
8742,
326,
733,
358,
506,
20919,
18,
3536,
859,
273,
365,
6315,
90,
67,
4778,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2033,
2476,
774,
8725,
329,
2375,
12,
2890,
16,
1365,
16,
5344,
67,
2938,
4672,
3536,
5394,
364,
8742,
326,
733,
358,
506,
20919,
18,
3536,
859,
273,
365,
6315,
90,
67,
4778,
67,
... |
break def endTagFormatting(self, token): """The much-feared adoption agency algorithm""" name = token["name"] while True: formattingElement = self.tree.elementInActiveFormattingElements( token["name"]) if (not formattingElement or (formattingElement in self.tree.openElements and not self.tree.elementInScope(formattingElement.name))): self.parser.parseError("adoption-agency-1.1", {"name": token["name"]}) return elif formattingElement not in self.tree.openElements: self.parser.parseError("adoption-agency-1.2", {"name": token["name"]}) self.tree.activeFormattingElements.remove(formattingElement) return if formattingElement != self.tree.openElements[-1]: self.parser.parseError("adoption-agency-1.3", {"name": token["name"]}) afeIndex = self.tree.openElements.index(formattingElement) furthestBlock = None for element in self.tree.openElements[afeIndex:]: if (element.nameTuple in specialElements | scopingElements): furthestBlock = element | while item.name not in headingElements: item = self.tree.openElements.pop() | def endTagHeading(self, token): for item in headingElements: if self.tree.elementInScope(item): self.tree.generateImpliedEndTags() break if self.tree.openElements[-1].name != token["name"]: self.parser.parseError("end-tag-too-early", {"name": token["name"]}) | 5cc56a5db432ce478d90ee0dd744811935854947 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10463/5cc56a5db432ce478d90ee0dd744811935854947/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
21867,
12,
2890,
16,
1147,
4672,
364,
761,
316,
11053,
3471,
30,
309,
365,
18,
3413,
18,
2956,
382,
3876,
12,
1726,
4672,
365,
18,
3413,
18,
7163,
2828,
2092,
1638,
3453,
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,
29765,
21867,
12,
2890,
16,
1147,
4672,
364,
761,
316,
11053,
3471,
30,
309,
365,
18,
3413,
18,
2956,
382,
3876,
12,
1726,
4672,
365,
18,
3413,
18,
7163,
2828,
2092,
1638,
3453,
1435,
... |
print "Going to previous stream" | msg = "Going to previous stream" appendTextview(self.textviewStdOut, msg) | def switchStream(self, event): if event.key==self.dictKeybindings['prevStream']: self.stPt=(self.stPt-1)%self.stNum xmin, xmax = self.axs[0].get_xlim() self.delAxes() self.drawAxes() self.drawSavedPicks() self.delSliders() self.addSliders() self.multicursorReinit() self.axs[0].set_xlim(xmin, xmax) self.updatePlot() print "Going to previous stream" if event.key==self.dictKeybindings['nextStream']: self.stPt=(self.stPt+1)%self.stNum xmin, xmax = self.axs[0].get_xlim() self.delAxes() self.drawAxes() self.drawSavedPicks() self.delSliders() self.addSliders() self.multicursorReinit() self.axs[0].set_xlim(xmin, xmax) self.updatePlot() print "Going to next stream" | b822b77814749ba0fa0b0a638d2c2e8ccf514f6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/b822b77814749ba0fa0b0a638d2c2e8ccf514f6c/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1620,
1228,
12,
2890,
16,
871,
4672,
309,
871,
18,
856,
631,
2890,
18,
1576,
653,
15863,
3292,
10001,
1228,
3546,
30,
365,
18,
334,
16484,
28657,
2890,
18,
334,
16484,
17,
21,
13,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1620,
1228,
12,
2890,
16,
871,
4672,
309,
871,
18,
856,
631,
2890,
18,
1576,
653,
15863,
3292,
10001,
1228,
3546,
30,
365,
18,
334,
16484,
28657,
2890,
18,
334,
16484,
17,
21,
13,
9,
... |
import lldb | import lldb, atexit | def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. if not sys.path.count(dir): sys.path.append(dir) base = os.path.splitext(name)[0] suite.addTests(unittest2.defaultTestLoader.loadTestsFromName(base)) | 16c3b5a972d9c46556154ab3f2f5dc5886cf386b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/16c3b5a972d9c46556154ab3f2f5dc5886cf386b/dotest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
12,
3239,
16,
1577,
16,
1257,
4672,
3536,
7413,
445,
364,
1140,
18,
803,
18,
11348,
12,
803,
16,
3757,
16,
1501,
13,
12123,
225,
2552,
11371,
225,
364,
508,
316,
1257,
30,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
12,
3239,
16,
1577,
16,
1257,
4672,
3536,
7413,
445,
364,
1140,
18,
803,
18,
11348,
12,
803,
16,
3757,
16,
1501,
13,
12123,
225,
2552,
11371,
225,
364,
508,
316,
1257,
30,
309,
... |
try: signal.getsignal(4242) raise TestFailed('expected ValueError for invalid signal 'getsignal()') except ValueError: pass | if test_support.verbose: verboseflag = '-x' else: verboseflag = '+x' | def force_test_exit(): # Sigh, both imports seem necessary to avoid errors. import os fork_pid = os.fork() if fork_pid: # In parent. return fork_pid # In child. import os, time try: # Wait 5 seconds longer than the expected alarm to give enough # time for the normal sequence of events to occur. This is # just a stop-gap to try to prevent the test from hanging. time.sleep(MAX_DURATION + 5) print >> sys.__stdout__, ' child should not have to kill parent' for signame in "SIGHUP", "SIGUSR1", "SIGUSR2", "SIGALRM": os.kill(pid, getattr(signal, signame)) print >> sys.__stdout__, " child sent", signame, "to", pid time.sleep(1) finally: os._exit(0) | 0069567647481eda3a28530b4cd8342690dda319 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/0069567647481eda3a28530b4cd8342690dda319/test_signal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2944,
67,
3813,
67,
8593,
13332,
468,
348,
2031,
16,
3937,
10095,
19264,
4573,
358,
4543,
1334,
18,
1930,
1140,
12515,
67,
6610,
273,
1140,
18,
23335,
1435,
309,
12515,
67,
6610,
30,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2944,
67,
3813,
67,
8593,
13332,
468,
348,
2031,
16,
3937,
10095,
19264,
4573,
358,
4543,
1334,
18,
1930,
1140,
12515,
67,
6610,
273,
1140,
18,
23335,
1435,
309,
12515,
67,
6610,
30,
468... |
if __variantMatchKey(variantValue, variantMap, variantGroup): | if __variantMatchKey(variantValue, variantMap, variantKey): | def processVariantIsSet(callNode, variantMap): ''' processes qx.core.Variant.isSet() calls; destructive! re-writes the AST tree passed in [callNode] by replacing choices with the suitable branch ''' if callNode.type != "call": return False params = callNode.getChild("params") if len(params.children) != 2: log("Warning", "Expecting exactly two arguments for qx.core.Variant.isSet. Ignoring this occurrence.", params) return False firstParam = params.getChildByPosition(0) if not isStringLiteral(firstParam): log("Warning", "First argument must be a string literal! Ignoring this occurrence.", firstParam) return False variantGroup = firstParam.get("value"); if not variantGroup in variantMap.keys(): return False secondParam = params.getChildByPosition(1) if isStringLiteral(secondParam): ifcondition = secondParam.parent.parent.parent # normal if then else if ifcondition.type == "expression" and ifcondition.getChildrenLength(True) == 1 and ifcondition.parent.type == "loop": loop = ifcondition.parent variantValue = secondParam.get("value") inlineIfStatement(loop, __variantMatchKey(variantValue, variantMap, variantGroup)) # ternery operator .. ? .. : .. elif ( ifcondition.type == "first" and ifcondition.getChildrenLength(True) == 1 and ifcondition.parent.type == "operation" and ifcondition.parent.get("operator") == "HOOK" ): variantValue = secondParam.get("value") if __variantMatchKey(variantValue, variantMap, variantGroup): repleacement = selectNode(ifcondition, "../second") else: repleacement = selectNode(ifcondition, "../third") replaceChildWithNodes(ifcondition.parent.parent, ifcondition.parent, repleacement.children) else: variantValue = secondParam.get("value") constantNode = tree.Node("constant") constantNode.set("value", str(__variantMatchKey(variantValue, variantMap, variantGroup)).lower()) constantNode.set("constantType", "boolean") constantNode.set("line", callNode.get("line")) callNode.parent.replaceChild(callNode, constantNode) #log("Warning", "Only processing qx.core.Variant.isSet directly inside of an if condition. Ignoring this occurrence.", secondParam) return True log("Warning", "The second parameter of qx.core.Variant.isSet must be a string literal. Ignoring this occurrence.", secondParam) return False | 4e5d66c6835d4497943956c0991b922d8fcff73a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/4e5d66c6835d4497943956c0991b922d8fcff73a/variantoptimizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
9356,
15737,
12,
1991,
907,
16,
5437,
863,
4672,
9163,
8488,
1043,
92,
18,
3644,
18,
9356,
18,
291,
694,
1435,
4097,
31,
23819,
688,
5,
283,
17,
13284,
326,
9183,
2151,
2275,
316... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
9356,
15737,
12,
1991,
907,
16,
5437,
863,
4672,
9163,
8488,
1043,
92,
18,
3644,
18,
9356,
18,
291,
694,
1435,
4097,
31,
23819,
688,
5,
283,
17,
13284,
326,
9183,
2151,
2275,
316... |
_xml_tag = _resource_lists_prefix + 'resource-lists' | _xml_tag = 'resource-lists' | def toxml(self, *args, **kwargs): """Shortcut that generates Element and calls etree.tostring. | 3834032d2d87a0912632956c383f2c7357109944 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3449/3834032d2d87a0912632956c383f2c7357109944/resourcelists.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
2902,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
15576,
716,
6026,
3010,
471,
4097,
12031,
18,
14627,
371,
18,
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,
0,
0,
0,
0,
0,
0,
0,
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,
2902,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
15576,
716,
6026,
3010,
471,
4097,
12031,
18,
14627,
371,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if serverUrl == DEFAULT_SERVER_URL: serverUrl = None | def setCredentials(self, username, password, serverUrl=DEFAULT_SERVER_URL): # do test log in first to confirm valid credentials # (will raise exception that can be handled by our caller, if invalid) testClient = SalesforceClient(serverUrl = serverUrl) testClient.login(username, password) if serverUrl == DEFAULT_SERVER_URL: serverUrl = None self.serverUrl = serverUrl self._username = username self._password = password # Disconnect from any previously connected Salesforce instance self._resetClient() return True | 7e4c9b93e65e9cdbde274cccc57265eaa39540c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9110/7e4c9b93e65e9cdbde274cccc57265eaa39540c3/salesforcebaseconnector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
6163,
12,
2890,
16,
2718,
16,
2201,
16,
1438,
1489,
33,
5280,
67,
4370,
67,
1785,
4672,
468,
741,
1842,
613,
316,
1122,
358,
6932,
923,
4448,
468,
261,
20194,
1002,
1520,
716,
848... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6163,
12,
2890,
16,
2718,
16,
2201,
16,
1438,
1489,
33,
5280,
67,
4370,
67,
1785,
4672,
468,
741,
1842,
613,
316,
1122,
358,
6932,
923,
4448,
468,
261,
20194,
1002,
1520,
716,
848... | |
self.userinfoBuffer.insert(s, str(self.config["userinfo"]["text"])) | if "text" in config["userinfo"].keys(): self.userinfoBuffer.insert(s, str(self.config["userinfo"]["text"])) | def populate_dialogs(self): self.parents= {} # Server if self.config == {}: self.ClearSettings() return #try: if 1: self.MuseekSettingsSensitive(True) self.app.Muscan.GetConfig() self.CONFIG_PATH = self.app.Muscan.configfile config = self.config self.EntryServerHost.set_text(self.config["server"]["host"]) self.ServerPort.set_value(int(self.config["server"]["port"])) self.EntryServerPassword.set_text(self.config["server"]["password"]) self.EntryServerUsername.set_text(self.config["server"]["username"]) if "filesystem" in self.config["encoding"]: self.filesystemEncoding.child.set_text(self.config["encoding"]["filesystem"]) if "network" in self.config["encoding"]: self.networkEncoding.child.set_text(self.config["encoding"]["network"]) self.LastPort.set_value(int(self.config["clients.bind"]["last"])) self.FirstPort.set_value(int(self.config["clients.bind"]["first"])) self.LogMethod.set_active(int(self.config["logging"]["output"])) # Museek Clients self.interfacePassword.set_text(str(self.config["interfaces"]["password"])) self.createTreeFor( self.interfacesTreestore, self.interfacesTreeview, "interfaces.bind") | 7f91669dcaa7418f5173782a4b701923fb8a2034 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8737/7f91669dcaa7418f5173782a4b701923fb8a2034/settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
25909,
14072,
12,
2890,
4672,
365,
18,
12606,
33,
2618,
468,
3224,
309,
365,
18,
1425,
422,
16648,
365,
18,
9094,
2628,
1435,
327,
468,
698,
30,
309,
404,
30,
365,
18,
49,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
25909,
14072,
12,
2890,
4672,
365,
18,
12606,
33,
2618,
468,
3224,
309,
365,
18,
1425,
422,
16648,
365,
18,
9094,
2628,
1435,
327,
468,
698,
30,
309,
404,
30,
365,
18,
49,
... |
if numBytesNeeded > 1: | if numBytesNeeded > 255: | def _PackLong(term): if -long(0x7fffffff) - 1 <= term <= long(0x7fffffff): return _PackInt(term) else: numBytesNeeded = int(math.log(term) / math.log(256)) + 1 if numBytesNeeded > 1: return _PackInt1(MAGIC_LARGE_BIG) + \ _PackInt4(numBytesNeeded) + \ _PackLongBytes(term, numBytesNeeded) else: return _PackInt1(MAGIC_SMALL_BIG) + \ _PackInt1(numBytesNeeded) + \ _PackLongBytes(term, numBytesNeeded) | a3bdf68b0dd0a8fe258354b35efca1d05a1c51fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7565/a3bdf68b0dd0a8fe258354b35efca1d05a1c51fd/erl_term.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4420,
3708,
12,
6408,
4672,
309,
300,
5748,
12,
20,
92,
27,
18217,
74,
13,
300,
404,
1648,
2481,
1648,
1525,
12,
20,
92,
27,
18217,
74,
4672,
327,
389,
4420,
1702,
12,
6408,
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,
389,
4420,
3708,
12,
6408,
4672,
309,
300,
5748,
12,
20,
92,
27,
18217,
74,
13,
300,
404,
1648,
2481,
1648,
1525,
12,
20,
92,
27,
18217,
74,
4672,
327,
389,
4420,
1702,
12,
6408,
13,... |
"""Returns a NodeList that contains all children of this node. If there are no children, this is a empty NodeList""" | """The first child of this node. If there is no such node this returns None.""" | def getFirstChild(self): """Returns a NodeList that contains all children of this node. If there are no children, this is a empty NodeList""" return None | 92d9f9e74555de20766dc34c52e48dbeb52376d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/92d9f9e74555de20766dc34c52e48dbeb52376d2/ZDOM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17315,
12,
2890,
4672,
3536,
1986,
1122,
1151,
434,
333,
756,
18,
971,
1915,
353,
1158,
4123,
756,
333,
1135,
599,
12123,
327,
599,
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,
17315,
12,
2890,
4672,
3536,
1986,
1122,
1151,
434,
333,
756,
18,
971,
1915,
353,
1158,
4123,
756,
333,
1135,
599,
12123,
327,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
while i < len(self.start) and i < len(newstart) and \ self.start[i] == newstart[i]: | while i < min_len and self.start[i] == newstart[i]: | def _change_start(self, newstart): i = 0 while i < len(self.start) and i < len(newstart) and \ self.start[i] == newstart[i]: i += 1 if i < len(self.start): self.widget.delete("%s+%dc" % (self.startindex, i), "%s+%dc" % (self.startindex, len(self.start))) if i < len(newstart): self.widget.insert("%s+%dc" % (self.startindex, i), newstart[i:]) self.start = newstart | f0b5981d99adbad0cd267ea3b66261015300b327 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/f0b5981d99adbad0cd267ea3b66261015300b327/AutoCompleteWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3427,
67,
1937,
12,
2890,
16,
394,
1937,
4672,
277,
273,
374,
1323,
277,
411,
1131,
67,
1897,
471,
365,
18,
1937,
63,
77,
65,
422,
394,
1937,
63,
77,
14542,
277,
1011,
404,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3427,
67,
1937,
12,
2890,
16,
394,
1937,
4672,
277,
273,
374,
1323,
277,
411,
1131,
67,
1897,
471,
365,
18,
1937,
63,
77,
65,
422,
394,
1937,
63,
77,
14542,
277,
1011,
404,
309,... |
'name' : task.name, 'description' : task.description, 'user_id': uid, | 'name' : task.name, 'description' : task.description, 'user_id': uid, | def create(self, cr, uid, values, context={}): res = super(project_task, self).create(cr, uid, values, context=context) cr.commit() task = self.browse(cr, uid, res, context=context) if task.project_id: self.pool.get('project.project')._log_event(cr, uid, task.project_id.id, { 'res_id' : task.id, 'name' : task.name, 'description' : task.description, 'user_id': uid, 'action' : 'create', 'type' : 'task'}) return res | 0944b6859f82afb44e3d9bec8c41e264c9e0a66e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/0944b6859f82afb44e3d9bec8c41e264c9e0a66e/project_event.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
924,
16,
819,
12938,
4672,
400,
273,
2240,
12,
4406,
67,
4146,
16,
365,
2934,
2640,
12,
3353,
16,
4555,
16,
924,
16,
819,
33,
2472,
13,
4422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
924,
16,
819,
12938,
4672,
400,
273,
2240,
12,
4406,
67,
4146,
16,
365,
2934,
2640,
12,
3353,
16,
4555,
16,
924,
16,
819,
33,
2472,
13,
4422,
... |
else: up = self._path[len(target):] down = [] | else: up = self._path[len(target):] down = [] | def _openpath(self, path, opendata=True): """helper function: open relative path and maybe data""" # Determine target node as sequence of group names if path == '/': target = [] elif path.startswith('/'): target = path[1:].split('/') else: target = self._path + path.split('/') | d07a0ac8b3d9aa1d31f002a7752f72f321deb305 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7515/d07a0ac8b3d9aa1d31f002a7752f72f321deb305/napi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
803,
12,
2890,
16,
589,
16,
1061,
409,
396,
33,
5510,
4672,
3536,
4759,
445,
30,
1696,
3632,
589,
471,
6944,
501,
8395,
468,
10229,
1018,
756,
487,
3102,
434,
1041,
1257,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
803,
12,
2890,
16,
589,
16,
1061,
409,
396,
33,
5510,
4672,
3536,
4759,
445,
30,
1696,
3632,
589,
471,
6944,
501,
8395,
468,
10229,
1018,
756,
487,
3102,
434,
1041,
1257,
30... |
"%s cannot be child of %s" % (repr(node), repr(self) ) | "%s cannot be child of %s" % (repr(node), repr(self)) | def appendChild(self, node): if node.nodeType not in self.childNodeTypes: raise HierarchyRequestErr, \ "%s cannot be child of %s" % (repr(node), repr(self) ) if node.parentNode is not None: node.parentNode.removeChild(node) if self.childNodes: last = self.lastChild node.previousSibling = last last.nextSibling = node else: node.previousSibling = None node.nextSibling = None self.childNodes.append(node) if self._makeParentNodes: node.parentNode = self return node | 08d73fb34139f70ceab853967e2cc2161783f491 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/08d73fb34139f70ceab853967e2cc2161783f491/minidom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5833,
12,
2890,
16,
756,
4672,
309,
756,
18,
2159,
559,
486,
316,
365,
18,
3624,
907,
2016,
30,
1002,
670,
6000,
691,
2524,
16,
521,
2213,
87,
2780,
506,
1151,
434,
738,
87,
6,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5833,
12,
2890,
16,
756,
4672,
309,
756,
18,
2159,
559,
486,
316,
365,
18,
3624,
907,
2016,
30,
1002,
670,
6000,
691,
2524,
16,
521,
2213,
87,
2780,
506,
1151,
434,
738,
87,
6,
738,
... |
return '"' + system.visTrailsRootDirectory() + '\graphviz\dot" -Tplain -o' | return 'dot -Tplain -o' | def graphVizDotCommandLine(): return '"' + system.visTrailsRootDirectory() + '\graphviz\dot" -Tplain -o' | c010428f107370265199e674282e9f15fdf2644d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6341/c010428f107370265199e674282e9f15fdf2644d/windows.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2667,
58,
452,
10412,
21391,
13332,
327,
296,
9811,
300,
56,
7446,
300,
83,
11,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
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,
2667,
58,
452,
10412,
21391,
13332,
327,
296,
9811,
300,
56,
7446,
300,
83,
11,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
raise e | raise | def _s3bukt(self): try: return self._tlocal.s3bukt except AttributeError: try: b = self._s3conn.get_bucket(self._bucket_name) except S3ResponseError, e: if "404 Not Found" not in str(e): raise e b = self._s3conn.create_bucket(self._bucket_name) self._tlocal.s3bukt = b return b | 31f4bb16317ced0f4173d23a40c64f59c72f1f72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5579/31f4bb16317ced0f4173d23a40c64f59c72f1f72/s3fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
87,
23,
70,
31699,
12,
2890,
4672,
775,
30,
327,
365,
6315,
88,
3729,
18,
87,
23,
70,
31699,
1335,
6394,
30,
775,
30,
324,
273,
365,
6315,
87,
23,
4646,
18,
588,
67,
7242,
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,
389,
87,
23,
70,
31699,
12,
2890,
4672,
775,
30,
327,
365,
6315,
88,
3729,
18,
87,
23,
70,
31699,
1335,
6394,
30,
775,
30,
324,
273,
365,
6315,
87,
23,
4646,
18,
588,
67,
7242,
12,... |
delete(filename) | delete(filename, shred) | def test_delete(self): """Unit test for method delete()""" | f86ebc9118002a2f56265ad60a2ebf3913d809aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/f86ebc9118002a2f56265ad60a2ebf3913d809aa/FileUtilities.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3733,
12,
2890,
4672,
3536,
2802,
1842,
364,
707,
1430,
1435,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3733,
12,
2890,
4672,
3536,
2802,
1842,
364,
707,
1430,
1435,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.parser.readfp(fp, cfgfile) | self.parser.readfp(fp, cfgfile) | def __init__(self, configFile = None): global conf conf = self if not configFile: configFile = os.path.join(scripting.get_config_dir(), "BioImageXD.ini") self.configItems = {} self.installPath = os.getcwd() self.parser = FlexConfigParser() cfgfile = self.getPath(configFile) fp = codecs.open(cfgfile, "r","utf-8") self.configFile = cfgfile self.parser.readfp(fp, cfgfile) # Set the initial values | 51eb7efbd47abaa0e8a0282a154f6aa787052985 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/51eb7efbd47abaa0e8a0282a154f6aa787052985/Configuration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
12247,
273,
599,
4672,
2552,
2195,
2195,
273,
365,
309,
486,
12247,
30,
12247,
273,
1140,
18,
803,
18,
5701,
12,
4263,
310,
18,
588,
67,
1425,
67,
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,
1001,
2738,
972,
12,
2890,
16,
12247,
273,
599,
4672,
2552,
2195,
2195,
273,
365,
309,
486,
12247,
30,
12247,
273,
1140,
18,
803,
18,
5701,
12,
4263,
310,
18,
588,
67,
1425,
67,
1214,
... |
if not isinstance(f, MPolynomial) and self.parent() is f.parent(): raise TypeError, "self and f must have the same parent" | if type(self) is not type(f) or self.parent() is not f.parent(): self, f = canonical_coercion(self, f) return self.gcd(f) | def gcd(self, f): """ Compute the greatest common divisor of this polynomial and f. | 14c957361c4404f0b75a7dde70bc2b13aab73df4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/14c957361c4404f0b75a7dde70bc2b13aab73df4/multi_polynomial_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14876,
12,
2890,
16,
284,
4672,
3536,
8155,
326,
18825,
395,
2975,
15013,
434,
333,
16991,
471,
284,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14876,
12,
2890,
16,
284,
4672,
3536,
8155,
326,
18825,
395,
2975,
15013,
434,
333,
16991,
471,
284,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
-1, "&Rate", self._rateMenu) | -1, "&Rate", self._rightClickRateMenu) | def _initCreateTrackRightClickMenu(self): self._logger.debug("Creating track right click menu.") self._trackRightClickMenu = wx.Menu() menuTrackRightClickRateUp = self._trackRightClickMenu.Append( -1, "Rate &Up", " Increase the score of the current track by one") menuTrackRightClickRateDown = self._trackRightClickMenu.Append( -1, "Rate &Down", " Decrease the score of the current track by one") rateRightClickMenu = self._trackRightClickMenu.AppendMenu( -1, "&Rate", self._rateMenu) self._trackRightClickMenu.AppendSeparator() menuTrackRightClickRequeue = self._trackRightClickMenu.Append( -1, "Re&queue Track", " Add the selected track to the playlist") self._trackRightClickMenu.AppendSeparator() menuTrackRightClickResetScore = self._trackRightClickMenu.Append( -1, "Reset Sc&ore", " Reset the score of the current track") | 5e66b52cd2ef201110705f27521b7e238c8b729f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8545/5e66b52cd2ef201110705f27521b7e238c8b729f/GUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
1684,
4402,
4726,
6563,
4599,
12,
2890,
4672,
365,
6315,
4901,
18,
4148,
2932,
11092,
3298,
2145,
4682,
3824,
1199,
13,
365,
6315,
4101,
4726,
6563,
4599,
273,
7075,
18,
4599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
1684,
4402,
4726,
6563,
4599,
12,
2890,
4672,
365,
6315,
4901,
18,
4148,
2932,
11092,
3298,
2145,
4682,
3824,
1199,
13,
365,
6315,
4101,
4726,
6563,
4599,
273,
7075,
18,
4599,
... |
if hasattr(self, 'forceGroupDict') and hasattr(self, 'particlesGroupDict'): | if hasattr(self, 'forceGroupDict') and hasattr(self, 'particlesDict'): | def enable(self): """enable()""" # band-aid added for client crash - grw if hasattr(self, 'forceGroupDict') and hasattr(self, 'particlesGroupDict'): if (self.renderParent != None): for p in self.particlesDict.values(): p.setRenderParent(self.renderParent.node()) for f in self.forceGroupDict.values(): f.enable() for p in self.particlesDict.values(): p.enable() self.fEnabled = 1 | 0fa44b405ccc3ac1e3ec356b2989ead974b1dc89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/0fa44b405ccc3ac1e3ec356b2989ead974b1dc89/ParticleEffect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4237,
12,
2890,
4672,
3536,
7589,
1435,
8395,
468,
8937,
17,
20736,
3096,
364,
1004,
17053,
300,
3821,
91,
309,
3859,
12,
2890,
16,
296,
5734,
1114,
5014,
6134,
471,
3859,
12,
2890,
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,
4237,
12,
2890,
4672,
3536,
7589,
1435,
8395,
468,
8937,
17,
20736,
3096,
364,
1004,
17053,
300,
3821,
91,
309,
3859,
12,
2890,
16,
296,
5734,
1114,
5014,
6134,
471,
3859,
12,
2890,
16,
... |
menu_bar = self._vbox.child_get_at(etk.VBox.START, 1) | menu_bar = self._vbox.child_get_at(etk.VBox.START, 0) | def setMenu(self, menu): if menu is None: if self._has_menu: #Remove the menubar menu_bar = self._vbox.child_get_at(etk.VBox.START, 1) menu_bar.parent = None else: if self._has_menu: menu_bar = self._vbox.child_get_at(etk.VBox.START, 1) #Clear the menubar: for menu_item in menu_bar.items_get: menu_bar.remove(menu_item) else: menu_bar = etk.MenuBar() self._vbox.prepend(menu_bar, etk.VBox.START, etk.VBox.FILL, 0) createEtkMenuFromMenuView(menu.items, menu_bar) | 24151c2dd1c0d56d9a135ea4d859d73c49b6e825 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/206/24151c2dd1c0d56d9a135ea4d859d73c49b6e825/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
4599,
12,
2890,
16,
3824,
4672,
309,
3824,
353,
599,
30,
309,
365,
6315,
5332,
67,
5414,
30,
468,
3288,
326,
21247,
373,
297,
3824,
67,
3215,
273,
365,
6315,
90,
2147,
18,
3624,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4599,
12,
2890,
16,
3824,
4672,
309,
3824,
353,
599,
30,
309,
365,
6315,
5332,
67,
5414,
30,
468,
3288,
326,
21247,
373,
297,
3824,
67,
3215,
273,
365,
6315,
90,
2147,
18,
3624,
... |
self.client = gdata.client.GDClient() | def setUp(self): if conf.settings.RUN_LIVE_TESTS: self.client = gdata.client.GDClient() conf.configure_client(self.client, conf.settings.ContactsConfig, 'ContactsTest') | d5f865c30aabc27750aae2f11dd7db0e5f690ef3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10620/d5f865c30aabc27750aae2f11dd7db0e5f690ef3/live_client_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
309,
2195,
18,
4272,
18,
15238,
67,
2053,
3412,
67,
16961,
55,
30,
2195,
18,
14895,
67,
2625,
12,
2890,
18,
2625,
16,
2195,
18,
4272,
18,
20017,
809,
16,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24292,
12,
2890,
4672,
309,
2195,
18,
4272,
18,
15238,
67,
2053,
3412,
67,
16961,
55,
30,
2195,
18,
14895,
67,
2625,
12,
2890,
18,
2625,
16,
2195,
18,
4272,
18,
20017,
809,
16,
296,
... | |
return http.Response(stream = encode_list([v, W.name()])) | return HTMLResponse(stream = encode_list([v, W.name()])) | def render(self, ctx): name = ctx.args['name'][0] W = notebook.create_new_worksheet(name) v = notebook.worksheet_list_html(W.name()) return http.Response(stream = encode_list([v, W.name()])) | 2c1a5997a8830efcfb475993e5f1efb45ed121ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2c1a5997a8830efcfb475993e5f1efb45ed121ea/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
508,
273,
1103,
18,
1968,
3292,
529,
3546,
63,
20,
65,
678,
273,
14718,
18,
2640,
67,
2704,
67,
1252,
8118,
12,
529,
13,
331,
273,
14718,
18,
1252,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
508,
273,
1103,
18,
1968,
3292,
529,
3546,
63,
20,
65,
678,
273,
14718,
18,
2640,
67,
2704,
67,
1252,
8118,
12,
529,
13,
331,
273,
14718,
18,
1252,
81... |
return | from time import sleep sleep(3) java.lang.Runtime.getRuntime().exec(["c:\Program Files\eSpeak\command_line\eSpeak.exe", announce]) return | def notify(self, board, section, state) : # invoked when a change is seen, this does any # desired announcing if (state) : status = "shorted" else : status = "OK" announce = "PM4 board "+str(board)+" section "+str(section)+" is "+status print announce # You can also speak the message by un-commenting the next line #java.lang.Runtime.getRuntime().exec(["speak", announce]) # For more info on the speak command, see http://espeak.sf.net/ return | 158fbe973373247d4150da46ac854826d8159051 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1660/158fbe973373247d4150da46ac854826d8159051/PM4Announce.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
12,
2890,
16,
11094,
16,
2442,
16,
919,
13,
294,
468,
8187,
1347,
279,
2549,
353,
5881,
16,
333,
1552,
1281,
468,
6049,
8226,
465,
2822,
309,
261,
2019,
13,
294,
1267,
273,
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,
5066,
12,
2890,
16,
11094,
16,
2442,
16,
919,
13,
294,
468,
8187,
1347,
279,
2549,
353,
5881,
16,
333,
1552,
1281,
468,
6049,
8226,
465,
2822,
309,
261,
2019,
13,
294,
1267,
273,
315,
... |
follower.update(0) | follower.update() | def onCollide(player, item): if item.hastag('playersonly') and player.npc: return False if not item.hastag('target'): if player.socket: player.socket.sysmessage( tr('This gate leads nowhere...') ) else: console.log(LOG_ERROR, tr("NPC [%x] using gate [%x] without target.\n") % (player.serial, item.serial)) return False target = item.gettag('target').split(',') # Convert the target of the gate. try: target = map(int, target) except: player.socket.sysmessage( tr('This gate leads nowhere...') ) return False # Move the player pos = player.pos pos.x = target[0] pos.y = target[1] pos.z = target[2] if len(target) > 3: pos.map = target[3] if not utilities.isMapAvailableTo(player, pos.map): return False # Move his pets if he has any if player.player: for follower in player.followers: if follower.wandertype == 4 and follower.distanceto(player) < 5: follower.removefromview() follower.moveto(pos) follower.update(0) player.removefromview() player.moveto(pos) player.update(0) if player.socket: player.socket.resendworld() # show some nice effects if not item.hastag('silent'): item.soundeffect(0x1fe) utilities.smokepuff(player, pos) utilities.smokepuff(player, item.pos) return True | f44c4416a5cc204dd710bc9f14fc052f542b73fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f44c4416a5cc204dd710bc9f14fc052f542b73fc/gate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
914,
8130,
12,
14872,
16,
761,
4672,
309,
761,
18,
76,
689,
346,
2668,
1601,
3565,
715,
6134,
471,
7291,
18,
82,
2436,
30,
327,
1083,
225,
309,
486,
761,
18,
76,
689,
346,
2668,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
914,
8130,
12,
14872,
16,
761,
4672,
309,
761,
18,
76,
689,
346,
2668,
1601,
3565,
715,
6134,
471,
7291,
18,
82,
2436,
30,
327,
1083,
225,
309,
486,
761,
18,
76,
689,
346,
2668,... |
if len(args) and args[0] in ['/nodde','/newinstance']: del args[0] | if len(args) and args[0] in ['/nodde','/new']: del args[0] | def ProcessArgs(self, args, dde = None): # If we are going to talk to a remote app via DDE, then # activate it! if dde is not None: dde.Exec("self.Activate()") if len(args) and args[0] in ['/nodde','/newinstance']: del args[0] # already handled. if len(args)<1 or not args[0]: # argv[0]=='' when started without args, just like Python.exe! return try: if args[0] and args[0][0]!='/': argStart = 0 argType = win32ui.GetProfileVal("Python","Default Arg Type","/edit").lower() else: argStart = 1 argType = args[0] if argStart >= len(args): raise TypeError("The command line requires an additional arg.") if argType=="/edit": # Load up the default application. if dde: fname = win32api.GetFullPathName(args[argStart]) dde.Exec("win32ui.GetApp().OpenDocumentFile(%s)" % (repr(fname))) else: win32ui.GetApp().OpenDocumentFile(args[argStart]) elif argType=="/rundlg": if dde: dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils scriptutils.RunScript(args[argStart], ' '.join(args[argStart+1:])) elif argType=="/run": if dde: dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils scriptutils.RunScript(args[argStart], ' '.join(args[argStart+1:]), 0) elif argType=="/app": raise RuntimeError("/app only supported for new instances of Pythonwin.exe") elif argType=='/new': # Allow a new instance of Pythonwin return 1 elif argType=='/dde': # Send arbitary command if dde is not None: dde.Exec(args[argStart]) else: win32ui.MessageBox("The /dde command can only be used\r\nwhen Pythonwin is already running") else: raise TypeError("Command line arguments not recognised") except: # too early for print anything. win32ui.DisplayTraceback(sys.exc_info(), " - error processing command line args") | 0e39d88f5d70d5139b8c6f91e44f7c56bfbd252f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/677/0e39d88f5d70d5139b8c6f91e44f7c56bfbd252f/intpyapp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
2615,
12,
2890,
16,
833,
16,
302,
323,
273,
599,
4672,
468,
971,
732,
854,
8554,
358,
26591,
358,
279,
2632,
595,
3970,
463,
1639,
16,
1508,
468,
10235,
518,
5,
309,
302,
323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
2615,
12,
2890,
16,
833,
16,
302,
323,
273,
599,
4672,
468,
971,
732,
854,
8554,
358,
26591,
358,
279,
2632,
595,
3970,
463,
1639,
16,
1508,
468,
10235,
518,
5,
309,
302,
323,
... |
D = Drawing(450,650) for row in range(5): y = 530 - row*120 | D = Drawing(450, 650) d = 80 s = 60 for row in range(10): y = 530 - row*d | def test(): D = Drawing(450,650) for row in range(5): y = 530 - row*120 if row == 0: for col in range(3): x = 20 + col*120 g = Grid0() g.x = x g.y = y g.useRects = 0 g.useLines = 1 if col == 0: pass elif col == 1: g.delta0 = 10 elif col == 2: g.orientation = 'horizontal' g.demo() D.add(g) elif row == 1: for col in range(3): x = 20 + col*120 g = Grid0() g.y = y g.x = x if col == 0: pass elif col == 1: g.delta0 = 10 elif col == 2: g.orientation = 'horizontal' g.demo() D.add(g) elif row == 2: for col in range(3): x = 20 + col*120 g = Grid0() g.x = x g.y = y g.useLines = 1 g.useRects = 1 if col == 0: pass elif col == 1: g.delta0 = 10 elif col == 2: g.orientation = 'horizontal' g.demo() D.add(g) elif row == 3: for col in range(3): x = 20 + col*120 sr = ShadedRect0() sr.x = x sr.y = y sr.fillColorStart = colors.Color(0, 0, 0) sr.fillColorEnd = colors.Color(1, 1, 1) if col == 0: sr.numShades = 5 elif col == 1: sr.numShades = 2 elif col == 2: sr.numShades = 1 sr.demo() D.add(sr) elif row == 4: for col in range(3): x = 20 + col*120 sr = ShadedRect0() sr.x = x sr.y = y sr.fillColorStart = colors.red sr.fillColorEnd = colors.blue sr.orientation = 'horizontal' if col == 0: sr.numShades = 10 elif col == 1: sr.numShades = 20 elif col == 2: sr.numShades = 50 sr.demo() D.add(sr) renderPDF.drawToFile(D, 'grids.pdf', 'grids.py') print 'wrote file: grids.pdf' | 2153c6f9f7afc55d87d741aa392569b7c2232d19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/2153c6f9f7afc55d87d741aa392569b7c2232d19/grids.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
13332,
463,
273,
10184,
310,
12,
24,
3361,
16,
1666,
3361,
13,
225,
302,
273,
8958,
272,
273,
4752,
225,
364,
1027,
316,
1048,
12,
2163,
4672,
677,
273,
1381,
5082,
300,
1027,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
13332,
463,
273,
10184,
310,
12,
24,
3361,
16,
1666,
3361,
13,
225,
302,
273,
8958,
272,
273,
4752,
225,
364,
1027,
316,
1048,
12,
2163,
4672,
677,
273,
1381,
5082,
300,
1027,
14... |
image_list = page.image_glob(base_name+'*_playground_rho_*.png') | image_list = page.image_glob(base_name+'_playground_rho_*.png') | def parse_command_line(): parser = OptionParser(version = "%prog CVS $Id$", usage = "%prog [options] [file ...]", description = "%prog computes mass/mass upperlimit") parser.add_option("--webserver", help = "Set the webserver path. Required. Example https://ldas-jobs.ligo.caltech.edu/~channa/highmass_months_23-24_summary_page") parser.add_option("--open-box", action = "store_true", help = "Produce open box page") parser.add_option("--output-name-tag", default = "", metavar = "name", help = "Set the basename for image search") opts, filenames = parser.parse_args() if opts.instruments: opts.instruments = lsctables.instrument_set_from_ifos(opts.instruments) if not opts.webserver: print >>sys.stderr, "must specify a webserver" sys.exit(1) return opts, filenames | 40b28754ab291edb3c64dfe0c60823f7bd0fb6c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/40b28754ab291edb3c64dfe0c60823f7bd0fb6c5/make_summary_page.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3076,
67,
1369,
13332,
2082,
273,
18862,
12,
1589,
273,
2213,
14654,
385,
14640,
271,
548,
8,
3113,
4084,
273,
2213,
14654,
306,
2116,
65,
306,
768,
1372,
65,
3113,
2477,
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,
1109,
67,
3076,
67,
1369,
13332,
2082,
273,
18862,
12,
1589,
273,
2213,
14654,
385,
14640,
271,
548,
8,
3113,
4084,
273,
2213,
14654,
306,
2116,
65,
306,
768,
1372,
65,
3113,
2477,
273,
... |
sage: E.tamagawa_product() | sage: E.tamagawa_product_bsd() | def tamagawa_product(self): r""" Given an elliptic curve `E` over a number field `K`, this function returns the integer `C(E/K)` that appears in the Birch and Swinnerton-Dyer conjecture accounting for the local information at finite places. If the model is a global minimal model then `C(E/K)` is simply the product of the Tamagawa numbers `c_v` where `v` runs over all prime ideals of `K`. Otherwise, if the model has to be changed at a place `v` a correction factor appears. The definition is such that `C(E/K)` times the periods at the infinite places is invariant under change of the Weierstrass model. See [Ta2] and [Do] for details. .. note:: This definition is slightly different from the definition of ``tamagawa_product`` for curves defined over `\QQ`. Over the rational number it is always defined to be the product of the Tamagawa numbers, so the two definitions only agree when the model is global minimal. OUTPUT: A rational number EXAMPLES:: sage: K.<i> = NumberField(x^2+1) sage: E = EllipticCurve([0,2+i]) sage: E.tamagawa_product() 1 sage: E = EllipticCurve([(2*i+1)^2,i*(2*i+1)^7]) sage: E.tamagawa_product() 4 An example where the Neron model changes over K:: sage: K.<t> = NumberField(x^5-10*x^3+5*x^2+10*x+1) sage: E = EllipticCurve(K,'75a1') sage: E.tamagawa_product() 5 sage: da = E.local_data() sage: [dav.tamagawa_number() for dav in da] [1, 1] REFERENCES: - [Ta2] Tate, John, On the conjectures of Birch and Swinnerton-Dyer and a geometric analog. Seminaire Bourbaki, Vol. 9, Exp. No. 306. - [Do] Dokchitser, Tim and Vladimir, On the Birch-Swinnerton-Dyer quotients modulo squares, Annals of Math., 2010. """ da = self.local_data() pr = 1 for dav in da: pp = dav.prime() cv = dav.tamagawa_number() # uu is the quotient of the Neron differential at pp divided by # the differential associated to this particular equation E uu = self.isomorphism_to(dav.minimal_model()).u uu_abs_val = pp.smallest_integer()**(pp.residue_class_degree()*valuation(uu,pp)) pr *= cv * uu_abs_val return pr | 73136fe88017b1ada2ab43235edd1ad9bf1f056d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/73136fe88017b1ada2ab43235edd1ad9bf1f056d/ell_number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
301,
346,
2219,
69,
67,
5896,
12,
2890,
4672,
436,
8395,
16803,
392,
415,
549,
21507,
8882,
1375,
41,
68,
1879,
279,
1300,
652,
1375,
47,
9191,
333,
445,
1135,
326,
3571,
1375,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
301,
346,
2219,
69,
67,
5896,
12,
2890,
4672,
436,
8395,
16803,
392,
415,
549,
21507,
8882,
1375,
41,
68,
1879,
279,
1300,
652,
1375,
47,
9191,
333,
445,
1135,
326,
3571,
1375,
39... |
def create_nearest_terms_box(urlargs, p, f, t='w', n=5, ln=cdslang): | def create_nearest_terms_box(urlargs, p, f, t='w', n=5, ln=cdslang, intro_text_p=1): | def create_nearest_terms_box(urlargs, p, f, t='w', n=5, ln=cdslang): """Return text box containing list of 'n' nearest terms above/below 'p' for the field 'f' for matching type 't' (words/phrases) in language 'ln'. Propose new searches according to `urlargs' with the new words. """ out = "" nearest_terms = [] if not p: # sanity check p = "." # look for nearest terms: if t == 'w': nearest_terms = get_nearest_terms_in_bibwords(p, f, n, n) if not nearest_terms: return "%s%s%s.%s" % (prologue, msg_no_words_index_available[ln], f, epilogue) else: nearest_terms = get_nearest_terms_in_bibxxx(p, f, n, n) if not nearest_terms: return "%s%s %s.%s" % (prologue, msg_no_phrase_index_available[ln], f, epilogue) # display them: out += """<table class="nearesttermsbox" cellpadding="0" cellspacing="0" border="0">""" for term in nearest_terms: if t == 'w': term_nbhits = get_nbhits_in_bibwords(term, f) else: term_nbhits = get_nbhits_in_bibxxx(term, f) if term == p: # print search word for orientation: if term_nbhits > 0: out += """<tr> <td class="nearesttermsboxbodyselected" align="right">%d</td> <td class="nearesttermsboxbodyselected" width="15"> </td> <td class="nearesttermsboxbodyselected" align="left"> <a class="nearesttermsselected" href="%s/search.py?%s">%s</a> </td> </tr>""" % \ (term_nbhits, weburl, urlargs_replace_text_in_arg(urlargs, r'^p\d?$', p, term), term) else: out += """<tr> <td class="nearesttermsboxbodyselected" align="right">-</td> <td class="nearesttermsboxbodyselected" width="15"> </td> <td class="nearesttermsboxbodyselected" align="left">%s</td> </tr>""" % term else: out += """<tr> <td class="nearesttermsboxbody" align="right">%s</td> <td class="nearesttermsboxbody" width="15"> </td> <td class="nearesttermsboxbody" align="left"> <a class="nearestterms" href="%s/search.py?%s">%s</a> </td> </tr>""" % \ (term_nbhits, weburl, urlargs_replace_text_in_arg(urlargs, r'^p\d?$', p, term), term) out += "</table>" # add leading introductory text and return: intro = msg_search_term[ln] % p if f: intro += " " + msg_inside_index[ln] % f intro += " " + msg_did_not_match[ln] return intro + "<blockquote>" + out + "</blockquote>" | e8b1e9b2ab1373aaf347dae509db85203ee55aa0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/e8b1e9b2ab1373aaf347dae509db85203ee55aa0/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
25785,
67,
10112,
67,
2147,
12,
718,
1968,
16,
293,
16,
284,
16,
268,
2218,
91,
2187,
290,
33,
25,
16,
7211,
33,
4315,
2069,
539,
16,
13079,
67,
955,
67,
84,
33,
21,
4672,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
25785,
67,
10112,
67,
2147,
12,
718,
1968,
16,
293,
16,
284,
16,
268,
2218,
91,
2187,
290,
33,
25,
16,
7211,
33,
4315,
2069,
539,
16,
13079,
67,
955,
67,
84,
33,
21,
4672,... |
else: | def __call__(self): if self.plugin.waitFlag.isSet(): self.plugin.waitFlag.clear() self.plugin.Push('get_time' + "\r\n") self.plugin.waitFlag.wait(0.05) self.plugin.lastMessage = [] self.plugin.waitFlag.clear() self.plugin.Push('get_time' + "\r\n") self.plugin.Push('get_length' + "\r\n") self.plugin.waitFlag.wait(0.1) self.plugin.waitFlag.set() res = self.plugin.lastMessage if len(res) == 2: elaps = timedelta(seconds=int(res[0])) rem = timedelta(seconds=int(res[1])-int(res[0])) return [str(elaps), str(rem)] else: return None | 2b94128ca2c1542f57b8dd9b7102f8064633c9c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8076/2b94128ca2c1542f57b8dd9b7102f8064633c9c7/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
309,
365,
18,
4094,
18,
7048,
4678,
18,
291,
694,
13332,
365,
18,
4094,
18,
7048,
4678,
18,
8507,
1435,
365,
18,
4094,
18,
7621,
2668,
588,
67,
957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
309,
365,
18,
4094,
18,
7048,
4678,
18,
291,
694,
13332,
365,
18,
4094,
18,
7048,
4678,
18,
8507,
1435,
365,
18,
4094,
18,
7621,
2668,
588,
67,
957,
... | |
except AssertionError, msg2: raise ValueError(msg + str(msg2)) | except AssertionError: raise ValueError(msg) | def __init__(self, data=None, pos=None, loops=None, format=None, boundary=[], weighted=None, implementation='networkx', sparse=True, vertex_labels=True, **kwds): """ TESTS:: sage: G = Graph() sage: loads(dumps(G)) == G True sage: a = matrix(2,2,[1,0,0,1]) sage: Graph(a).adjacency_matrix() == a True | 92cfa867f1cbb10c7d92af95e4ae2da4c6928875 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/92cfa867f1cbb10c7d92af95e4ae2da4c6928875/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
501,
33,
7036,
16,
949,
33,
7036,
16,
14075,
33,
7036,
16,
740,
33,
7036,
16,
7679,
22850,
6487,
13747,
33,
7036,
16,
4471,
2218,
5185,
92,
2187,
9387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
501,
33,
7036,
16,
949,
33,
7036,
16,
14075,
33,
7036,
16,
740,
33,
7036,
16,
7679,
22850,
6487,
13747,
33,
7036,
16,
4471,
2218,
5185,
92,
2187,
9387,
... |
security.declareProtected('query', search_zcatalog) | security.declareProtected(search_zcatalog, 'query') | def getLexicon(self): """Get the lexicon for this index """ if hasattr(aq_base(self), 'lexicon'): # Fix up old ZCTextIndexes by removing direct lexicon ref # and changing it to an ID lexicon = getattr(aq_parent(aq_inner(self)), self.lexicon.getId()) self.lexicon_id = lexicon.getId() del self.lexicon | fb6ede6bf7a66c5e2840b99a25f0b13b96b3ef80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb6ede6bf7a66c5e2840b99a25f0b13b96b3ef80/ZCTextIndex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9014,
338,
3950,
12,
2890,
4672,
3536,
967,
326,
31681,
364,
333,
770,
3536,
309,
3859,
12,
69,
85,
67,
1969,
12,
2890,
3631,
296,
4149,
3950,
11,
4672,
468,
12139,
731,
1592,
2285,
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,
9014,
338,
3950,
12,
2890,
4672,
3536,
967,
326,
31681,
364,
333,
770,
3536,
309,
3859,
12,
69,
85,
67,
1969,
12,
2890,
3631,
296,
4149,
3950,
11,
4672,
468,
12139,
731,
1592,
2285,
12... |
xmpp_connection = self._xmpp_socket_map.get(fd) RunDispatcherHandler(xmpp_connection, asyncore.dispatcher.handle_write_event) | HandleXmppSocket(fd, self._xmpp_socket_map, asyncore.dispatcher.handle_write_event) | def RunDispatcherHandler(dispatcher, handler): """Handles a single event for an asyncore.dispatcher. | 5b1bf077a7b9ec15911dce368946ffaee00746a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5b1bf077a7b9ec15911dce368946ffaee00746a3/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
6681,
1503,
12,
18495,
16,
1838,
4672,
3536,
8788,
279,
2202,
871,
364,
392,
4326,
479,
18,
18495,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
6681,
1503,
12,
18495,
16,
1838,
4672,
3536,
8788,
279,
2202,
871,
364,
392,
4326,
479,
18,
18495,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
raise TypeError("unsuported type: %s" % type(value)) | raise TypeError("unsupported type: %s" % type(value)) | def writeValue(self, value): if isinstance(value, str): self.simpleElement("string", value) elif isinstance(value, bool): # must switch for bool before int, as bool is a # subclass of int... if value: self.simpleElement("true") else: self.simpleElement("false") elif isinstance(value, int): self.simpleElement("integer", "%d" % value) elif isinstance(value, float): self.simpleElement("real", repr(value)) elif isinstance(value, dict): self.writeDict(value) elif isinstance(value, Data): self.writeData(value) elif isinstance(value, datetime.datetime): self.simpleElement("date", _dateToString(value)) elif isinstance(value, (tuple, list)): self.writeArray(value) else: raise TypeError("unsuported type: %s" % type(value)) | 26fae049442dc60d489188999732fdd3c775ded4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/26fae049442dc60d489188999732fdd3c775ded4/plistlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26727,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
609,
4672,
365,
18,
9647,
1046,
2932,
1080,
3113,
460,
13,
1327,
1549,
12,
1132,
16,
1426,
4672,
468,
1297,
1620,
364,
1426,
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,
26727,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
609,
4672,
365,
18,
9647,
1046,
2932,
1080,
3113,
460,
13,
1327,
1549,
12,
1132,
16,
1426,
4672,
468,
1297,
1620,
364,
1426,
18... |
logging.debug("Contents of environment: %s" % str(env)) env.sync() env.close() | logging.debug("Contents of environment: %s", str(env)) dump_env(env, env_filename) | def run_once(self, params): import logging import kvm_utils import kvm_preprocessing | 75e32d7c7b2c9f50657b38dbf3a2e4b4c1ed15c4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10349/75e32d7c7b2c9f50657b38dbf3a2e4b4c1ed15c4/kvm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
8243,
12,
2890,
16,
859,
4672,
1930,
2907,
1930,
417,
3489,
67,
5471,
1930,
417,
3489,
67,
1484,
10632,
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,
1086,
67,
8243,
12,
2890,
16,
859,
4672,
1930,
2907,
1930,
417,
3489,
67,
5471,
1930,
417,
3489,
67,
1484,
10632,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
el2 = etree.SubElement(self.current_element, 'table:table', attrib={ | el2 = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.A1' % table_name, 'style:family': 'table-cell', }) line_style1 = '0.%03dcm solid el2_1 = etree.SubElement(el2, 'style:table-cell-properties', attrib={ 'fo:padding': '0.049cm', 'fo:border-left': line_style1, 'fo:border-right': line_style1, 'fo:border-top': line_style1, 'fo:border-bottom': line_style1, }) el3 = etree.SubElement(self.current_element, 'table:table', attrib={ | def visit_table(self, node): #self.trace_visit_node(node) #ipshell('At visit_table') self.table_count += 1 table_name = 'Table%d' % self.table_count el1 = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s' % table_name, 'style:family': 'table', }) el1_1 = etree.SubElement(el1, 'style:table-properties', attrib={ #'style:width': '17.59cm', 'table:align': 'margins', }) el2 = etree.SubElement(self.current_element, 'table:table', attrib={ 'table:name': '%s' % table_name, 'table:style-name': '%s' % table_name, }) self.set_current_element(el2) self.current_table_style = el1 self.table_width = 0 | d8b6d322f3002654ec1b2fae8db0c143d53ae12e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/d8b6d322f3002654ec1b2fae8db0c143d53ae12e/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2121,
12,
2890,
16,
756,
4672,
468,
2890,
18,
5129,
67,
11658,
67,
2159,
12,
2159,
13,
468,
625,
10304,
2668,
861,
3757,
67,
2121,
6134,
365,
18,
2121,
67,
1883,
1011,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2121,
12,
2890,
16,
756,
4672,
468,
2890,
18,
5129,
67,
11658,
67,
2159,
12,
2159,
13,
468,
625,
10304,
2668,
861,
3757,
67,
2121,
6134,
365,
18,
2121,
67,
1883,
1011,
404,
... |
res = self.ReplicaManager.getCatalogFileMetadata(selectedLfns) | res = self.ReplicaManager.getCatalogFileMetadata( selectedLfns ) | def execute(self): | 00d8a55a0d409a04efa1a3f677ff9c2bc47dd619 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/00d8a55a0d409a04efa1a3f677ff9c2bc47dd619/SEvsLFCAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
urllib.urlretrieve(string.join([rdatapath,folder,file],'/'), | urllib.urlretrieve(string.join([dataserver,folder,file],'/'), | def retrieve(target=None,source=None,env=None): "Fetch data from the web" global rdatapath folder = env['dir'] private = env.get('private') if private: login = private['login'] password = private['password'] server = private['server'] session = ftplib.FTP(server,login,password) session.cwd(folder) for file in map(str,target): try: download = open(file,'wb') session.retrbinary('RETR '+file,lambda x: download.write(x)) download.close() except: print 'Could not download file "%s" ' % file return 1 session.quit() else: for file in map(str,target): urllib.urlretrieve(string.join([rdatapath,folder,file],'/'), file) if os.stat(file)[6]: return 0 else: print 'Could not download file "%s" ' % file os.unlink(file) return 2 | 5dbd2e2766199cd68e79a1a28d4ee37b8057160b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3143/5dbd2e2766199cd68e79a1a28d4ee37b8057160b/rsfproj.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4614,
12,
3299,
33,
7036,
16,
3168,
33,
7036,
16,
3074,
33,
7036,
4672,
315,
5005,
501,
628,
326,
3311,
6,
2552,
24291,
803,
3009,
273,
1550,
3292,
1214,
3546,
3238,
273,
1550,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4614,
12,
3299,
33,
7036,
16,
3168,
33,
7036,
16,
3074,
33,
7036,
4672,
315,
5005,
501,
628,
326,
3311,
6,
2552,
24291,
803,
3009,
273,
1550,
3292,
1214,
3546,
3238,
273,
1550,
18,
588... |
data = band.ReadAsArray( srcwin[0], y, srcwin[2], 1 ) data = Numeric.reshape( data, (srcwin[2],) ) | data = [] for band in bands: band_data = band.ReadAsArray( srcwin[0], y, srcwin[2], 1 ) band_data = Numeric.reshape( band_data, (srcwin[2],) ) data.append(band_data) | def Usage(): print 'Usage: gdal2xyz.py [-skip factor] [-srcwin xoff yoff width height]' print ' [-band b] srcfile [dstfile]' print sys.exit( 1 ) | 9da36a6240b4f1a8ee8152ff40385317d387516f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10289/9da36a6240b4f1a8ee8152ff40385317d387516f/gdal2xyz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10858,
13332,
1172,
296,
5357,
30,
15551,
287,
22,
17177,
18,
2074,
23059,
7457,
5578,
65,
23059,
4816,
8082,
619,
3674,
677,
3674,
1835,
2072,
3864,
1172,
296,
10402,
23059,
12752,
324,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10858,
13332,
1172,
296,
5357,
30,
15551,
287,
22,
17177,
18,
2074,
23059,
7457,
5578,
65,
23059,
4816,
8082,
619,
3674,
677,
3674,
1835,
2072,
3864,
1172,
296,
10402,
23059,
12752,
324,
6... |
for time,id,field,oldvalue,newvalue,author in cursor: | for time,id,field,oldvalue,newvalue,author,summary in cursor: this_summary = summary | def get_timeline_events(self, req, start, stop, filters): if 'ticket_details' in filters: db = self.env.get_db_cnx() cursor = db.cursor() cursor.execute("SELECT tc.time, tc.ticket, " " tc.field, tc.oldvalue, tc.newvalue, tc.author " "FROM ticket_change tc" " LEFT JOIN ticket t ON t.id = tc.ticket " "AND tc.time>=%s AND tc.time<=%s ORDER BY tc.time" % (start, stop)) previous_update = None updates = [] for time,id,field,oldvalue,newvalue,author in cursor: if (time,id,author) != previous_update: if previous_update: updates.append((previous_update,field_changes,comment)) field_changes = [] comment = '' previous_update = (time,id,author) if field == 'comment': comment = newvalue else: field_changes.append(field) if previous_update: updates.append((previous_update,field_changes,comment)) | 3f8ebe11ae78c26fccce599155ca7391f969fb44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/3f8ebe11ae78c26fccce599155ca7391f969fb44/Ticket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
26237,
67,
5989,
12,
2890,
16,
1111,
16,
787,
16,
2132,
16,
3415,
4672,
309,
296,
16282,
67,
6395,
11,
316,
3415,
30,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26237,
67,
5989,
12,
2890,
16,
1111,
16,
787,
16,
2132,
16,
3415,
4672,
309,
296,
16282,
67,
6395,
11,
316,
3415,
30,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,... |
for item in nodes: | for item in nodearg: | def asList(nodes): l = [] for item in nodes: if hasattr(item, "asList"): l.append(item.asList()) else: t = type(item) if t is TupleType or t is ListType: l.append(tuple(asList(item))) else: l.append(item) return l | 0ac16ec1493e76721d37d537a132195fdb2cbe4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0ac16ec1493e76721d37d537a132195fdb2cbe4f/ast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8528,
12,
4690,
4672,
328,
273,
5378,
364,
761,
316,
756,
3175,
30,
309,
3859,
12,
1726,
16,
315,
345,
682,
6,
4672,
328,
18,
6923,
12,
1726,
18,
345,
682,
10756,
469,
30,
268,
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,
8528,
12,
4690,
4672,
328,
273,
5378,
364,
761,
316,
756,
3175,
30,
309,
3859,
12,
1726,
16,
315,
345,
682,
6,
4672,
328,
18,
6923,
12,
1726,
18,
345,
682,
10756,
469,
30,
268,
273,
... |
params, method = xmlrpclib.loads(data) | def _marshaled_dispatch(self, data, dispatch_method = None): """Dispatches an XML-RPC method from marshalled (XML) data. | b9120e772be65492e02beced8b344e98cf5f85d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b9120e772be65492e02beced8b344e98cf5f85d2/SimpleXMLRPCServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3108,
329,
67,
10739,
12,
2890,
16,
501,
16,
3435,
67,
2039,
273,
599,
4672,
3536,
5325,
281,
392,
3167,
17,
8087,
707,
628,
10893,
1259,
261,
4201,
13,
501,
18,
2,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3108,
329,
67,
10739,
12,
2890,
16,
501,
16,
3435,
67,
2039,
273,
599,
4672,
3536,
5325,
281,
392,
3167,
17,
8087,
707,
628,
10893,
1259,
261,
4201,
13,
501,
18,
2,
-100,
-100,
... | |
self.session.openWithCallback(self.closed, EPGSelection, services, self.zapToService) | if withCallback: self.session.openWithCallback(self.closed, EPGSelection, services, self.zapToService) else: self.session.open(EPGSelection, services, self.zapToService) | def openBouquetEPG(self, bouquet): ptr=eEPGCache.getInstance() services = [ ] servicelist = eServiceCenter.getInstance().list(bouquet) if not servicelist is None: while True: service = servicelist.getNext() if not service.valid(): #check if end of list break if service.flags: #ignore non playable services continue services.append(ServiceReference(service)) if len(services): self.epg_bouquet = bouquet self.session.openWithCallback(self.closed, EPGSelection, services, self.zapToService) | 2828914fb949a9f120285e7473512937ea184694 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/2828914fb949a9f120285e7473512937ea184694/InfoBarGenerics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
38,
1395,
28357,
10541,
43,
12,
2890,
16,
800,
89,
28357,
4672,
6571,
33,
73,
10541,
43,
1649,
18,
588,
1442,
1435,
4028,
273,
306,
308,
24658,
5449,
273,
425,
1179,
8449,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
38,
1395,
28357,
10541,
43,
12,
2890,
16,
800,
89,
28357,
4672,
6571,
33,
73,
10541,
43,
1649,
18,
588,
1442,
1435,
4028,
273,
306,
308,
24658,
5449,
273,
425,
1179,
8449,
18,
58... |
self.add_option("--tiles", help="What tiles to use, a list of indexes in the form n,n,...,n", dest="tiles") | self.add_option("--tiles", type="int", dest="tiles", default=None, help="What tiles to use, a list of indexes in the form n,n,...,n") | def __init__(self, *args, **kwargs): SurfaceOptionParser.__init__(self, *args, **kwargs) self.add_option("--shp", help="SHP", dest="shpfile") self.add_option("-i", "--index", type="int", dest="index", help="get surface at INDEX") self.add_option("--size", help="Size in format pictures WxH", dest="shpsize") self.add_option("--tiles", help="What tiles to use, a list of indexes in the form n,n,...,n", dest="tiles") self.add_option("-n", action="store_true", default=False, dest="size", help="get number of pictures") | d0df967262cdf61148f58cab63abeeb972e0947c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6099/d0df967262cdf61148f58cab63abeeb972e0947c/eastwood.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
24354,
1895,
2678,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
365,
18,
1289,
67,
3482,
2932,
413,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
24354,
1895,
2678,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
365,
18,
1289,
67,
3482,
2932,
413,
67... |
_create_remote_product(proxy_common.session, attr_set_id, sku, product_data, uid, proxy_common.server, stock_data, proxy_common.logger) | _create_remote_product(proxy_common.session, attr_set_id, sku, product_data, uid, proxy_common.server, stock_data, proxy_common.logger, proxy_common.pool) | def _update_remote_product(session, attr_set_id, sku, product_data, uid, server, stock_data, logger): server.call(session, 'product.update', [sku, product_data]) server.call(session, 'product_stock.update', [sku, stock_data]) logger.notifyChannel("Magento Export", netsvc.LOG_INFO, " Successfully updated product with OpenERP id %s and Magento id %s" % (product.id, product.magento_id)) | 5fd1c31613bc9e426eec5b293a202a94f395affd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/5fd1c31613bc9e426eec5b293a202a94f395affd/magento_product_synchronize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
67,
7222,
67,
5896,
12,
3184,
16,
1604,
67,
542,
67,
350,
16,
16731,
16,
3017,
67,
892,
16,
4555,
16,
1438,
16,
12480,
67,
892,
16,
1194,
4672,
1438,
18,
1991,
12,
3184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2725,
67,
7222,
67,
5896,
12,
3184,
16,
1604,
67,
542,
67,
350,
16,
16731,
16,
3017,
67,
892,
16,
4555,
16,
1438,
16,
12480,
67,
892,
16,
1194,
4672,
1438,
18,
1991,
12,
3184,
... |
self.taskList.remove(task) | try: self.taskList.remove(task) except ValueError: pass | def remove(self, task): self.taskList.remove(task) | 9e5e3edc5b9ba9cda1bd7952e2493b9e0214cff3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/9e5e3edc5b9ba9cda1bd7952e2493b9e0214cff3/MiniTask.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
12,
2890,
16,
1562,
4672,
365,
18,
4146,
682,
18,
4479,
12,
4146,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1206,
12,
2890,
16,
1562,
4672,
365,
18,
4146,
682,
18,
4479,
12,
4146,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
camera.eye.t[:2] -= vector[:2] | new_eye_t = camera.eye.t.copy() new_eye_t[:2] -= vector[:2] | def do_translation(self, vector, drawing_area): camera = context.application.camera tmp = vector.copy() tmp[2] = 0 transformed_vector = numpy.dot(self.eye_rotation, tmp) camera.eye.t[:2] -= vector[:2] camera.rotation_center = Translation(camera.rotation_center.t + transformed_vector) if (camera.opening_angle > 0): camera.eye.t[2] -= vector[2] else: window_size = camera.window_size*(1 + 0.01*vector[-1]) if window_size < 0.001: window_size = 0.001 elif window_size > 1000: window_size = 1000 camera.window_size = window_size drawing_area.queue_draw() | 46021c2f72c9fc7458127f1abc6906a7ecd6981a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11052/46021c2f72c9fc7458127f1abc6906a7ecd6981a/transform.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
10173,
12,
2890,
16,
3806,
16,
16327,
67,
5036,
4672,
10836,
273,
819,
18,
3685,
18,
26426,
1853,
273,
3806,
18,
3530,
1435,
1853,
63,
22,
65,
273,
374,
10220,
67,
7737,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
10173,
12,
2890,
16,
3806,
16,
16327,
67,
5036,
4672,
10836,
273,
819,
18,
3685,
18,
26426,
1853,
273,
3806,
18,
3530,
1435,
1853,
63,
22,
65,
273,
374,
10220,
67,
7737,
273,
... |
data = self.do_query(query, self.auth_header + add_headers) | data = self.do_query(query, add_headers) | def query(self, query, add_headers = ""): | d475266fd699e8fa6e1b079cb13cef751fd95b8c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/d475266fd699e8fa6e1b079cb13cef751fd95b8c/livestatus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
12,
2890,
16,
843,
16,
527,
67,
2485,
273,
1408,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
12,
2890,
16,
843,
16,
527,
67,
2485,
273,
1408,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
mixer.setmute(1) | mixer.setmute(1, channel) | def set_mixer(name, args, idx=0): # Demonstrates how to set mixer settings try: mixer = alsaaudio.Mixer(name, cardindex=idx) except alsaaudio.ALSAAudioError: sys.stderr.write("No such mixer") sys.exit(1) if args in ['mute','unmute']: # Mute/unmute the mixer if args == 'mute': mixer.setmute(1) else: mixer.setmute(0) sys.exit(0) if args in ['rec','unrec']: # Enable/disable recording if args == 'rec': mixer.setrec(1) else: mixer.setrec(0) sys.exit(0) if args.find(',') != -1: channel,volume = map(int,args.split(',')) else: channel = alsaaudio.MIXER_CHANNEL_ALL volume = int(args) # Set volume for specified channel. MIXER_CHANNEL_ALL means set # volume for all channels mixer.setvolume(volume, channel) | cf41942ed57983a3a124937fc348323d231386b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4473/cf41942ed57983a3a124937fc348323d231386b3/mixertest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
14860,
264,
12,
529,
16,
833,
16,
2067,
33,
20,
4672,
468,
463,
4758,
701,
815,
3661,
358,
444,
6843,
264,
1947,
775,
30,
6843,
264,
273,
524,
87,
7598,
4484,
18,
21294,
264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14860,
264,
12,
529,
16,
833,
16,
2067,
33,
20,
4672,
468,
463,
4758,
701,
815,
3661,
358,
444,
6843,
264,
1947,
775,
30,
6843,
264,
273,
524,
87,
7598,
4484,
18,
21294,
264... |
return self.__queryUsersFilter(ctx, session.query(CommandsOnHost, Commands, Target)) | join = self.commands_on_host.join(self.commands).join(self.target) q = session.query(CommandsOnHost, Commands, Target) q = q.select_from(join) q = self.__queryUsersFilter(ctx, q) return q | def __queryAllCommandsonhostBy(self, session, ctx): """ Built a part of the query for the *AllCommandsonhost* methods """ | d9a2e2da626b372817e250882167cc34ff64583d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/d9a2e2da626b372817e250882167cc34ff64583d/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2271,
1595,
2189,
816,
2564,
858,
12,
2890,
16,
1339,
16,
1103,
4672,
3536,
27376,
279,
1087,
434,
326,
843,
364,
326,
380,
1595,
2189,
816,
2564,
14,
2590,
3536,
2,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2271,
1595,
2189,
816,
2564,
858,
12,
2890,
16,
1339,
16,
1103,
4672,
3536,
27376,
279,
1087,
434,
326,
843,
364,
326,
380,
1595,
2189,
816,
2564,
14,
2590,
3536,
2,
-100,
-100,
... |
icon + | def _macro_MailTo(self, args): from MoinMoin.util.mail import decodeSpamSafeEmail | b4c4a09c402c319fa7cd80b4c3d52616d44eab7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/b4c4a09c402c319fa7cd80b4c3d52616d44eab7c/wikimacro.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26448,
67,
6759,
774,
12,
2890,
16,
833,
4672,
628,
490,
885,
49,
885,
18,
1367,
18,
4408,
1930,
2495,
3389,
301,
9890,
4134,
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,
389,
26448,
67,
6759,
774,
12,
2890,
16,
833,
4672,
628,
490,
885,
49,
885,
18,
1367,
18,
4408,
1930,
2495,
3389,
301,
9890,
4134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
fn=ForceNode("viscosity") fnp=NodePath(fn) fnp.reparentTo(render) self.avatarViscosity=LinearFrictionForce(0.0, 1.0, 0) fn.addForce(self.avatarViscosity) self.phys.addLinearForce(self.avatarViscosity) | if 0: fn=ForceNode("viscosity") fnp=NodePath(fn) fnp.reparentTo(render) self.avatarViscosity=LinearFrictionForce(0.0, 1.0, 0) fn.addForce(self.avatarViscosity) self.phys.addLinearForce(self.avatarViscosity) | def setupPhysics(self, avatarNodePath): assert(self.debugPrint("setupPhysics()")) # Connect to Physics Manager: self.actorNode=ActorNode("physicsActor") self.actorNode.getPhysicsObject().setOriented(1) self.actorNode.getPhysical(0).setViscosity(0.1) physicsActor=NodePath(self.actorNode) avatarNodePath.reparentTo(physicsActor) avatarNodePath.assign(physicsActor) self.phys=PhysicsManager.PhysicsManager() | 6bf0ce7b64dbc472e517058dc6c231bb0d06d617 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/6bf0ce7b64dbc472e517058dc6c231bb0d06d617/ShipPilot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
3731,
1900,
2102,
12,
2890,
16,
16910,
907,
743,
4672,
1815,
12,
2890,
18,
4148,
5108,
2932,
8401,
3731,
1900,
2102,
10031,
3719,
468,
8289,
358,
4360,
1900,
2102,
8558,
30,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
3731,
1900,
2102,
12,
2890,
16,
16910,
907,
743,
4672,
1815,
12,
2890,
18,
4148,
5108,
2932,
8401,
3731,
1900,
2102,
10031,
3719,
468,
8289,
358,
4360,
1900,
2102,
8558,
30,
365,
1... |
do_char(c, event) | do_char(c, event) | def do_key(self, event): (what, message, when, where, modifiers) = event c = chr(message & charCodeMask) if modifiers & cmdKey: if c == '.': raise self else: result = MenuKey(ord(c)) id = (result>>16) & 0xffff # Hi word item = result & 0xffff # Lo word if id: self.do_rawmenu(id, item, None, event) | 6f47bf44caae86045c784477f77a7b11cbad9aed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6f47bf44caae86045c784477f77a7b11cbad9aed/FrameWork.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
856,
12,
2890,
16,
871,
4672,
261,
23770,
16,
883,
16,
1347,
16,
1625,
16,
10429,
13,
273,
871,
276,
273,
4513,
12,
2150,
473,
13096,
5796,
13,
309,
10429,
473,
1797,
653,
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,
741,
67,
856,
12,
2890,
16,
871,
4672,
261,
23770,
16,
883,
16,
1347,
16,
1625,
16,
10429,
13,
273,
871,
276,
273,
4513,
12,
2150,
473,
13096,
5796,
13,
309,
10429,
473,
1797,
653,
3... |
print "resolving", path try: return REQUEST.resolve_url(path) except: print "not found" return None | def resolve_url(self, path, REQUEST): """ Attempt to resolve a url into an object in the Zope namespace. The url may be absolute or a catalog path style url. If no object is found, None is returned. No exceptions are raised. """ script=REQUEST.script if string.find(path, script) != 0: path='%s/%s' % (script, path) print "resolving", path try: return REQUEST.resolve_url(path) except: print "not found" return None | 8d2817c7510574c144e733630f85598482f5ed02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8d2817c7510574c144e733630f85598482f5ed02/ZCatalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
67,
718,
12,
2890,
16,
589,
16,
12492,
4672,
3536,
12864,
358,
2245,
279,
880,
1368,
392,
733,
316,
326,
2285,
1306,
1981,
18,
1021,
880,
2026,
506,
4967,
578,
279,
6222,
589,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
67,
718,
12,
2890,
16,
589,
16,
12492,
4672,
3536,
12864,
358,
2245,
279,
880,
1368,
392,
733,
316,
326,
2285,
1306,
1981,
18,
1021,
880,
2026,
506,
4967,
578,
279,
6222,
589,
21... | |
feed_item = shortmem['feed_item'] if feed_item.has_key('blip_thumbnail_src'): | if _fp_get(shortmem, 'thumbnail_src'): | def get_thumbnail_url(url, shortmem=None): feed_item = shortmem['feed_item'] if feed_item.has_key('blip_thumbnail_src'): return 'http://a.images.blip.tv/%s' % ( shortmem['feed_item']['blip_thumbnail_src']) elif feed_item.has_key('blip_smallthumbnail'): return feed_item['blip_smallthumbnail'] else: return feed_item.get('blip_picture') | c2641ad3d0c90762965fdef928704cb09207b2d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12246/c2641ad3d0c90762965fdef928704cb09207b2d0/blip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14904,
67,
718,
12,
718,
16,
3025,
3917,
33,
7036,
4672,
309,
389,
7944,
67,
588,
12,
6620,
3917,
16,
296,
14904,
67,
4816,
11,
4672,
327,
296,
2505,
2207,
69,
18,
7369,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14904,
67,
718,
12,
718,
16,
3025,
3917,
33,
7036,
4672,
309,
389,
7944,
67,
588,
12,
6620,
3917,
16,
296,
14904,
67,
4816,
11,
4672,
327,
296,
2505,
2207,
69,
18,
7369,
18,... |
], CONTEXT) | ], 0, None, None, CONTEXT) | def test0060text(self): ''' Test Text. ''' text1_id = self.text.create({ 'text': 'Test', }, CONTEXT) self.assert_(text1_id) | 52062c763bf1737b3f2071e48338f60845edc54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/52062c763bf1737b3f2071e48338f60845edc54d/test_tryton.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
713,
4848,
955,
12,
2890,
4672,
9163,
7766,
3867,
18,
9163,
977,
21,
67,
350,
273,
365,
18,
955,
18,
2640,
12590,
296,
955,
4278,
296,
4709,
2187,
19879,
13862,
13,
365,
18,
1123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
713,
4848,
955,
12,
2890,
4672,
9163,
7766,
3867,
18,
9163,
977,
21,
67,
350,
273,
365,
18,
955,
18,
2640,
12590,
296,
955,
4278,
296,
4709,
2187,
19879,
13862,
13,
365,
18,
1123... |
factor = round(1/values['rate'], 6) | factor = round(1.0/values['rate'], 6) | def check_factor_and_rate(values): factor = None rate = None | 1c3eb8968b62e8d0dd32434c2ed5ad19c170cb2e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9285/1c3eb8968b62e8d0dd32434c2ed5ad19c170cb2e/uom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
6812,
67,
464,
67,
5141,
12,
2372,
4672,
5578,
273,
599,
4993,
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,
... | [
1,
1,
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,
866,
67,
6812,
67,
464,
67,
5141,
12,
2372,
4672,
5578,
273,
599,
4993,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
time.sleep(1.1) | sleep(1.1) | def initReconnect(self): """initialise a reonnect""" if not self.parent.config['reconnect']['activated'] or self.reconnecting or not self.parent.server_methods.is_time_reconnect(): return False | 2bced4f3d36304a614392dc703d32eb372e73e68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/2bced4f3d36304a614392dc703d32eb372e73e68/ThreadManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
20427,
12,
2890,
4672,
3536,
6769,
784,
279,
283,
265,
2517,
8395,
309,
486,
365,
18,
2938,
18,
1425,
3292,
25913,
21712,
18836,
3546,
578,
365,
18,
25913,
310,
578,
486,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
20427,
12,
2890,
4672,
3536,
6769,
784,
279,
283,
265,
2517,
8395,
309,
486,
365,
18,
2938,
18,
1425,
3292,
25913,
21712,
18836,
3546,
578,
365,
18,
25913,
310,
578,
486,
365,
18,
... |
context = Context(prec=3, rounding=ROUND_FLOOR) | context = Context(rounding=ROUND_FLOOR) | def apply_even_split(cls, discounted, amount): lastct = -1 ct = len(discounted) work = {} context = Context(prec=3, rounding=ROUND_FLOOR) if ct > 0: split_discount = context.divide(amount, Decimal(ct)) remainder = amount - context.multiply(split_discount, Decimal(ct)) else: split_discount = remainder = Decimal("0.00") | 2891c25073f6905dc26f0d175cfd3d8b31978f23 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/171/2891c25073f6905dc26f0d175cfd3d8b31978f23/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
16728,
67,
4939,
12,
6429,
16,
12137,
329,
16,
3844,
4672,
1142,
299,
273,
300,
21,
5691,
273,
562,
12,
23650,
329,
13,
1440,
273,
2618,
819,
273,
1772,
12,
17376,
33,
15092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
16728,
67,
4939,
12,
6429,
16,
12137,
329,
16,
3844,
4672,
1142,
299,
273,
300,
21,
5691,
273,
562,
12,
23650,
329,
13,
1440,
273,
2618,
819,
273,
1772,
12,
17376,
33,
15092,... |
self.client.rm(plname) | try: self.client.rm(plname) except: pass | def on_playlist_rename(self, action): plname = self.prompt_for_playlist_name(_("Rename Playlist"), 'renamePlaylist') if plname: model, selected = self.playlists_selection.get_selected_rows() oldname = misc.unescape_html(model.get_value(model.get_iter(selected[0]), 1)) if self.playlist_name_exists(_("Rename Playlist"), 'renamePlaylistError', plname, oldname): return self.client.rm(plname) self.client.rename(oldname, plname) self.playlists_populate() self.iterate_now() # Re-select item: row = 0 for pl in self.playlistsdata: if pl[1] == plname: self.playlists_selection.select_path((row,)) return row = row + 1 | 62a3ce0dfadbacd0bbd946fb6aa106f810db596a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/62a3ce0dfadbacd0bbd946fb6aa106f810db596a/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1601,
1098,
67,
18539,
12,
2890,
16,
1301,
4672,
886,
529,
273,
365,
18,
13325,
67,
1884,
67,
1601,
1098,
67,
529,
24899,
2932,
16019,
19592,
1098,
6,
3631,
296,
18539,
30194,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1601,
1098,
67,
18539,
12,
2890,
16,
1301,
4672,
886,
529,
273,
365,
18,
13325,
67,
1884,
67,
1601,
1098,
67,
529,
24899,
2932,
16019,
19592,
1098,
6,
3631,
296,
18539,
30194,
... |
layout2.addWidget(self.plotCB,1,0) | layout2.addWidget(self.plot_combox,1,0) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | a923b9f742fd26e7a67c9c55bf165b929ea95c50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/a923b9f742fd26e7a67c9c55bf165b929ea95c50/PlotToolDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
17638,
273,
374,
16,
2242,
273,
374,
4672,
2238,
6353,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
17638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
17638,
273,
374,
16,
2242,
273,
374,
4672,
2238,
6353,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
17638,
... |
if type(data['query']['pages'][pageid].values()[0]) == list(): | if type(data['query']['pages'][pageid].values()[0]) == type(list()): | def getTemplates(self, tllimit = 5000): #action=query&prop=templates&titles=Main Page """ Returns the templates that are used in the page given by API. | 02005d823e604c2ff62af67002d2350206017c70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/02005d823e604c2ff62af67002d2350206017c70/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
8218,
12,
2890,
16,
268,
2906,
1038,
273,
20190,
4672,
468,
1128,
33,
2271,
10,
5986,
33,
8502,
10,
17643,
33,
6376,
3460,
3536,
2860,
326,
5539,
716,
854,
1399,
316,
326,
1363,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
8218,
12,
2890,
16,
268,
2906,
1038,
273,
20190,
4672,
468,
1128,
33,
2271,
10,
5986,
33,
8502,
10,
17643,
33,
6376,
3460,
3536,
2860,
326,
5539,
716,
854,
1399,
316,
326,
1363,
8... |
instance home is the directory that was identified when you did | tracker home is the directory that was identified when you did | def usage(message=''): if message: message = _('Error: %(error)s\n\n')%{'error': message} print _('''%(message)sUsage: | e18361038688011601501a65fdc81b5cb7e88e34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e18361038688011601501a65fdc81b5cb7e88e34/roundup_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
12,
2150,
2218,
11,
4672,
309,
883,
30,
883,
273,
389,
2668,
668,
30,
8975,
1636,
13,
87,
64,
82,
64,
82,
6134,
9,
27828,
1636,
4278,
883,
97,
1172,
389,
2668,
6309,
17105,
215... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
12,
2150,
2218,
11,
4672,
309,
883,
30,
883,
273,
389,
2668,
668,
30,
8975,
1636,
13,
87,
64,
82,
64,
82,
6134,
9,
27828,
1636,
4278,
883,
97,
1172,
389,
2668,
6309,
17105,
215... |
engine_files = [] if which == 'KAI-0.2': engine_files += get_source(env, 'rts/System/creg') + ['rts/System/float3.cpp'] return get_AI_source(env, 'AI/Global', which) + engine_files | return get_AI_source(env, 'AI/Global', which) | def get_globalAI_source(env, which): engine_files = [] if which == 'KAI-0.2': engine_files += get_source(env, 'rts/System/creg') + ['rts/System/float3.cpp'] return get_AI_source(env, 'AI/Global', which) + engine_files | 84c7c34a54d765eb296d9bcbf12f4abc6172430f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1030/84c7c34a54d765eb296d9bcbf12f4abc6172430f/filelist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
6347,
18194,
67,
3168,
12,
3074,
16,
1492,
4672,
327,
336,
67,
18194,
67,
3168,
12,
3074,
16,
296,
18194,
19,
5160,
2187,
1492,
13,
282,
2,
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,
336,
67,
6347,
18194,
67,
3168,
12,
3074,
16,
1492,
4672,
327,
336,
67,
18194,
67,
3168,
12,
3074,
16,
296,
18194,
19,
5160,
2187,
1492,
13,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
sage: a(1) 1 sage: a(2007) 1 sage: a.list(12) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] AUTHOR: -- Jaap Spies (2007-01-12) """ def __init__(self): | INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000012; a The all 1's sequence. sage: a(1) 1 sage: a(2007) 1 sage: a.list(12) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] AUTHOR: -- Jaap Spies (2007-01-12) """ | def _eval(self, n): return Integer(2*n+1) | 8b300fed02e947af57b58146f62dccfc715cf0b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8b300fed02e947af57b58146f62dccfc715cf0b9/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
22,
14,
82,
15,
21,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
22,
14,
82,
15,
21,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if BUGS['no-attachments']['status'] == True: q_wave.root_blip.append('\n\n' + BUGS['no-attachments']['message']) | q_wave.root_blip.append('\n\nIf you would like to include screenshots/attachments, go into \'edit\' mode (click the "edit" button on the toolbar), then attach the file/screenshot that you would like to use.\n\n') import random x = random.choice((1,2,3)) rand_texts = {1:('You might want to check our list of all previous questions: ', 'Helpdesk Index', ('link/wave', INDEX_WAVE.wave_id)), 2:('Think you make good helpdesk material? Ask to join ', 'our group.', ('link/manual', 'http://hgroups.google.com/group/wave-helpdesk')), 3:('You can install some searches that will let you find all the helpdesk questions, discussions and main waves ', 'here.', ('link/wave', ROOT_WAVE.wave_id)), } q_wave.root_blip.append(rand_texts[x][0]) q_wave.root_blip.append(rand_texts[x][1], (rand_texts[x][2])) q_wave.root_blip.append(' ', (('link/wave', None))) | def create_question_wave(q_wave): '''Appends the required elements & text to make the question wave.''' # Sets the title q_wave.title = 'New Helpdesk Question' # Adds a "Heading 3" element q_wave.root_blip.append(element.Line(line_type = 'h3')) # Adds some instructions q_wave.root_blip.append('Type a summary of ' + 'your question in ' + 'the box below.\n') # Adds an Input element, for people to type # their question summary into. q_wave.root_blip.append(element.Input('wave-helpdesk:InsertQuestion', '')) # Adds another Heading element q_wave.root_blip.append(element.Line(line_type = 'h3')) # Adds some more instructions q_wave.root_blip.append('If you have more detail to add, add it here:\n') # Adds a TextArea element, for question detail. TextArea # elements expand when more text than fits the box is #entered. This behavior does not appear in the Input element. q_wave.root_blip.append(element.TextArea('helpdesk/detail', '')) # Adds another heading element. q_wave.root_blip.append(element.Line(line_type = 'h3')) # Adds some more instructions q_wave.root_blip.append('Once you are done, click this button:\n') # Adds the submit button. q_wave.root_blip.append(element.Button('helpdesk-submitquestion', 'Submit Question')) # Adds a warning message, if a particular bug hasn't yet been fixed. if BUGS['no-attachments']['status'] == True: q_wave.root_blip.append('\n\n' + BUGS['no-attachments']['message']) return q_wave | 08f71e7780f463f0c91db94bc34c01d8d26623b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4190/08f71e7780f463f0c91db94bc34c01d8d26623b0/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4173,
67,
17838,
12,
85,
67,
17838,
4672,
9163,
15049,
326,
1931,
2186,
473,
977,
358,
1221,
326,
5073,
10794,
1093,
6309,
468,
11511,
326,
2077,
1043,
67,
17838,
18,
2649,
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,
752,
67,
4173,
67,
17838,
12,
85,
67,
17838,
4672,
9163,
15049,
326,
1931,
2186,
473,
977,
358,
1221,
326,
5073,
10794,
1093,
6309,
468,
11511,
326,
2077,
1043,
67,
17838,
18,
2649,
273,... |
args=[] | args = [] | def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80): if not args: args=[] if not context: context={} ids = self.search(cr, user, [('serial','=',name)]+ args, limit=limit, context=context) ids += self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context) return self.name_get(cr, user, ids, context) | 369221b47101072e094ad2d02fe2edd2b47690aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/369221b47101072e094ad2d02fe2edd2b47690aa/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
3072,
12,
2890,
16,
4422,
16,
729,
16,
508,
16,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
33,
7036,
16,
1800,
33,
3672,
4672,
309,
486,
833,
30,
833,
273,
5378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
3072,
12,
2890,
16,
4422,
16,
729,
16,
508,
16,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
33,
7036,
16,
1800,
33,
3672,
4672,
309,
486,
833,
30,
833,
273,
5378,
... |
"remove the dispatcher from cache and increment dispatched" | "remove the dispatcher from cache and meter dispatched" del self.client_managed[dispatcher.client_key] | def client_close (self, dispatcher): "remove the dispatcher from cache and increment dispatched" self.client_meter (dispatcher) del self.client_managed[dispatcher.client_key] dispatcher.async_client = None | e1ab414a383f5283cf8d221e97d306e04d6e4044 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/e1ab414a383f5283cf8d221e97d306e04d6e4044/async_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1004,
67,
4412,
261,
2890,
16,
7393,
4672,
315,
4479,
326,
7393,
628,
1247,
471,
16565,
25513,
6,
1464,
365,
18,
2625,
67,
19360,
63,
18495,
18,
2625,
67,
856,
65,
365,
18,
2625,
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,
1004,
67,
4412,
261,
2890,
16,
7393,
4672,
315,
4479,
326,
7393,
628,
1247,
471,
16565,
25513,
6,
1464,
365,
18,
2625,
67,
19360,
63,
18495,
18,
2625,
67,
856,
65,
365,
18,
2625,
67,
... |
rcl t1, t1, imm | rcli t1, t1, imm st t1, ds, [0, t0, t7], disp }; def macroop RCL_R_R { rcli reg, reg, regm }; def macroop RCL_M_R { ld t1, ds, [scale, index, base], disp rcli t1, t1, reg st t1, ds, [scale, index, base], disp }; def macroop RCL_P_R { rdip t7 ld t1, ds, [0, t0, t7], disp rcli t1, t1, reg | def macroop RCL_P_I | 66911a1fab9900768db67610346585245a484ef4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6787/66911a1fab9900768db67610346585245a484ef4/rotate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
534,
5017,
67,
52,
67,
45,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
534,
5017,
67,
52,
67,
45,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sage: minimum = min([l for u,v,l in tree.edge_iterator()]) sage: [value, [(u,v,l)]] = tree.edge_connectivity(value_only=False, use_edge_labels=True) sage: l == minimum | sage: minimum = min([l for u,v,l in tree.edge_iterator()]) sage: [value, [(u,v,l)]] = tree.edge_connectivity(value_only=False, use_edge_labels=True) sage: l == minimum | def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 1b1e9fa38a9074f82933aa4bcd32aa9ddb2cd120 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1b1e9fa38a9074f82933aa4bcd32aa9ddb2cd120/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3591,
67,
3612,
2818,
12,
2890,
16,
460,
67,
3700,
33,
5510,
16,
999,
67,
7126,
67,
5336,
33,
8381,
16,
6928,
33,
8381,
16,
12776,
33,
7036,
16,
3988,
33,
20,
4672,
436,
8395,
2860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3591,
67,
3612,
2818,
12,
2890,
16,
460,
67,
3700,
33,
5510,
16,
999,
67,
7126,
67,
5336,
33,
8381,
16,
6928,
33,
8381,
16,
12776,
33,
7036,
16,
3988,
33,
20,
4672,
436,
8395,
2860,
... |
raise TracError, "Header length is too short" | raise TracError(_("Header length is too short")) | def format_header(self, key, name, email=None): from email.Header import Header maxlength = MAXHEADERLEN-(len(key)+2) # Do not sent ridiculous short headers if maxlength < 10: raise TracError, "Header length is too short" try: tmp = name.encode('ascii') header = Header(tmp, 'ascii', maxlinelen=maxlength) except UnicodeEncodeError: header = Header(name, self._charset, maxlinelen=maxlength) if not email: return header else: return '"%s" <%s>' % (header, email) | 12836e4c24e5f660d2f4c0eec98580e809e9a4c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/12836e4c24e5f660d2f4c0eec98580e809e9a4c3/notification.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
3374,
12,
2890,
16,
498,
16,
508,
16,
2699,
33,
7036,
4672,
628,
2699,
18,
1864,
1930,
4304,
943,
2469,
273,
4552,
7557,
13017,
17,
12,
1897,
12,
856,
27921,
22,
13,
468,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
3374,
12,
2890,
16,
498,
16,
508,
16,
2699,
33,
7036,
4672,
628,
2699,
18,
1864,
1930,
4304,
943,
2469,
273,
4552,
7557,
13017,
17,
12,
1897,
12,
856,
27921,
22,
13,
468,
22... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.