rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
self.f_partial = None | self.f_partial_array = None | def __init__(self, f_obs_array = None, free_array = None, xray_structure = None, scaling_parameters = None, mask_params = None, out = None, twin_law = None, start_fraction = 0.1, n_refl_bin = 2000, max_bins = 20, sf_algorithm = "fft", sf_cos_sin_table = True, perform_local_scaling = False): self.out = out if self.out is None: self.out = sys.stdout self.twin_fraction_object = twin_fraction_object(twin_fraction=start_fraction) self.twin_law=twin_law self.twin_fraction=start_fraction | 97587dac2238019ad20934209e113db575aba440 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/97587dac2238019ad20934209e113db575aba440/twin_f_model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
284,
67,
10992,
67,
1126,
3639,
273,
599,
16,
4843,
67,
1126,
540,
273,
599,
16,
619,
435,
67,
7627,
377,
273,
599,
16,
10612,
67,
3977,
273,
599,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
284,
67,
10992,
67,
1126,
3639,
273,
599,
16,
4843,
67,
1126,
540,
273,
599,
16,
619,
435,
67,
7627,
377,
273,
599,
16,
10612,
67,
3977,
273,
599,
16,
... |
return _strjoin('\n', ret) | return _strjoin(ret, '\n') | def __str__(self): """String representation of the file.""" ret = [] entries = [self.metadata_as_entry()] + \ [e for e in self if not e.obsolete] for entry in entries: _listappend(ret, entry.__str__(self.wrapwidth)) for entry in self.obsolete_entries(): _listappend(ret, entry.__str__(self.wrapwidth)) return _strjoin('\n', ret) | 07a4cb8a83c09e047deff4f5200ca5b150ca7505 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/07a4cb8a83c09e047deff4f5200ca5b150ca7505/polib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
3536,
780,
4335,
434,
326,
585,
12123,
325,
273,
5378,
3222,
273,
306,
2890,
18,
4165,
67,
345,
67,
4099,
1435,
65,
397,
521,
306,
73,
364,
425,
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,
1001,
701,
972,
12,
2890,
4672,
3536,
780,
4335,
434,
326,
585,
12123,
325,
273,
5378,
3222,
273,
306,
2890,
18,
4165,
67,
345,
67,
4099,
1435,
65,
397,
521,
306,
73,
364,
425,
316,
... |
cond1.notify() cond1.release() cond1.acquire() cond2.acquire() | cond.acquire() | def notlambda1(this): cond1.acquire() cond2.acquire() plog("INFO", "Committing jobs...") this.run_all_jobs = True self.schedule_low_prio(notlambda2) cond1.notify() cond1.release() | 04282d1d6496f2be8e8fa3e21f7ef8bdc957fbe1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3762/04282d1d6496f2be8e8fa3e21f7ef8bdc957fbe1/bwauthority.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
486,
14661,
21,
12,
2211,
4672,
6941,
21,
18,
1077,
1039,
1435,
6941,
22,
18,
1077,
1039,
1435,
293,
1330,
2932,
5923,
3113,
315,
5580,
1787,
6550,
7070,
13,
333,
18,
2681,
67,
454,
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,
486,
14661,
21,
12,
2211,
4672,
6941,
21,
18,
1077,
1039,
1435,
6941,
22,
18,
1077,
1039,
1435,
293,
1330,
2932,
5923,
3113,
315,
5580,
1787,
6550,
7070,
13,
333,
18,
2681,
67,
454,
67... |
return CRT_list(vec,mod) | return tuple(CRT_vectors(vec,mod)) | def basiclemmavec(self,M): """ Finds a vector where the value of the quadratic form is coprime to M. EXAMPLES: sage: Q = QuadraticForm(ZZ, 2, [2, 1, 5]) sage: Q.basiclemmavec(10) (6, 5) sage: Q(_) 227 """ V=FreeModule(self.base_ring(),self.dim()) mat = self.matrix() vec = [] mod = [] M0 = abs(M) if M0 == 1: return V(0) for i in range(self.dim()): M1 = prime_to_m_part(M0, self[i,i]) if M1 != 1: vec.append(V.gen(i)) mod.append(M1) M0 = M0/M1 if M0 == 1: return CRT_list(vec,mod) for i in range(self.dim()): for j in range(i): M1 = prime_to_m_part(M0, self[i,j]) if M1 != 1: vec.append(V.i + V.j) mod.append(M1) M0 = M0/M1 if M0 == 1: return __crt_list(vec,mod) raise ValueError, "not primitive form" | 623f2ae815a5db6b6de66a39b86071b8fa662f9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/623f2ae815a5db6b6de66a39b86071b8fa662f9a/quadratic_form__ternary_Tornaria.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5337,
3269,
81,
836,
71,
12,
2890,
16,
49,
4672,
3536,
4163,
87,
279,
3806,
1625,
326,
460,
434,
326,
26146,
646,
353,
6529,
86,
494,
358,
490,
18,
225,
5675,
8900,
11386,
30,
225,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5337,
3269,
81,
836,
71,
12,
2890,
16,
49,
4672,
3536,
4163,
87,
279,
3806,
1625,
326,
460,
434,
326,
26146,
646,
353,
6529,
86,
494,
358,
490,
18,
225,
5675,
8900,
11386,
30,
225,
2... |
unacceptable_elements_with_end_tag = ['script', 'applet'] | unacceptable_elements_with_end_tag = ['script', 'applet', 'style'] | def _resolveRelativeURIs(htmlSource, baseURI, encoding, type): if _debug: sys.stderr.write('entering _resolveRelativeURIs\n') p = _RelativeURIResolver(baseURI, encoding, type) p.feed(htmlSource) return p.output() | 517c9a962a4474d2ac229ab2902a7d7faaf406f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/517c9a962a4474d2ac229ab2902a7d7faaf406f4/feedparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
8574,
1099,
2520,
12,
2620,
1830,
16,
1026,
3098,
16,
2688,
16,
618,
4672,
309,
389,
4148,
30,
2589,
18,
11241,
18,
2626,
2668,
2328,
310,
389,
10828,
8574,
1099,
2520,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
8574,
1099,
2520,
12,
2620,
1830,
16,
1026,
3098,
16,
2688,
16,
618,
4672,
309,
389,
4148,
30,
2589,
18,
11241,
18,
2626,
2668,
2328,
310,
389,
10828,
8574,
1099,
2520,
64,
... |
foundRefNames = [] | foundRefNames = {} | def process(self, text): # keys are ref groups # values are a dict where : # keys are ref content # values are [name, [list of full ref matches]] foundRefs = {} foundRefNames = [] # Replace key by value namedRepl = {} | cf52d53ad4531135e73ebcbe3e028663a00bb7b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/cf52d53ad4531135e73ebcbe3e028663a00bb7b1/reflinks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
16,
977,
4672,
468,
1311,
854,
1278,
3252,
468,
924,
854,
279,
2065,
1625,
294,
468,
282,
1311,
854,
1278,
913,
468,
282,
924,
854,
306,
529,
16,
306,
1098,
434,
1983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
977,
4672,
468,
1311,
854,
1278,
3252,
468,
924,
854,
279,
2065,
1625,
294,
468,
282,
1311,
854,
1278,
913,
468,
282,
924,
854,
306,
529,
16,
306,
1098,
434,
1983,
... |
r""" Least common multiple (or lcm) of $\{1, 2, \cdots, n\}$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A003418;a Least common multiple (or lcm) of {1, 2, ..., n}. sage: a(0) 1 sage: a(1) 1 sage: a(13) 360360 sage: a.list(14) [1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 27720, 27720, 360360] sage: a(20.0) Traceback (most recent call last): ... TypeError: input must be an int, long, or Integer AUTHOR: -- Jaap Spies (2007-01-31) """ def __init__(self): | def __init__(self): r""" Least common multiple (or lcm) of $\{1, 2, \cdots, n\}$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A003418;a Least common multiple (or lcm) of {1, 2, ..., n}. sage: a(0) 1 sage: a(1) 1 sage: a(13) 360360 sage: a.list(14) [1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 27720, 27720, 360360] sage: a(20.0) Traceback (most recent call last): ... TypeError: input must be an int, long, or Integer AUTHOR: -- Jaap Spies (2007-01-31) """ | def list(self, n): self._eval(n) # force computation return self._b[:n] | d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
290,
4672,
365,
6315,
8622,
12,
82,
13,
282,
468,
2944,
16039,
327,
365,
6315,
70,
10531,
82,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
290,
4672,
365,
6315,
8622,
12,
82,
13,
282,
468,
2944,
16039,
327,
365,
6315,
70,
10531,
82,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
def export_data(self, cr, uid, ids, fields_to_export, context=None, imp_comp= False): | def export_data(self, cr, uid, ids, fields_to_export, context=None): | def export_data(self, cr, uid, ids, fields_to_export, context=None, imp_comp= False): if not context: context = {} cols = self._columns.copy() for f in self._inherit_fields: cols.update({f: self._inherit_fields[f][2]}) fields_to_export = map(lambda x: x.split('/'), fields_to_export) fields_export = fields_to_export+[] warning = '' warning_fields = [] for field in fields_export: if imp_comp and len(field)>1: warning_fields.append('/'.join(map(lambda x:x in cols and cols[x].string or x,field))) elif len (field) <=1: if imp_comp and cols.get(field and field[0],False): if ((isinstance(cols[field[0]], fields.function) and not cols[field[0]].store) \ or isinstance(cols[field[0]], fields.related)\ or isinstance(cols[field[0]], fields.one2many)): warning_fields.append('/'.join(map(lambda x:x in cols and cols[x].string or x,field))) datas = [] if imp_comp and len(warning_fields): warning = 'Following columns cannot be exported since you select to be import compatible.\n%s' %('\n'.join(warning_fields)) cr.rollback() return {'warning' : warning} for row in self.browse(cr, uid, ids, context): datas += self.__export_row(cr, uid, row, fields_to_export, context) return {'datas':datas} | 0a6517a8d20ec7978c7b60dc4720e6fc04b81f83 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/0a6517a8d20ec7978c7b60dc4720e6fc04b81f83/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
892,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
1466,
67,
869,
67,
6530,
16,
819,
33,
7036,
4672,
309,
486,
819,
30,
819,
273,
2618,
5347,
273,
365,
6315,
5112,
18,
3530,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
892,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
1466,
67,
869,
67,
6530,
16,
819,
33,
7036,
4672,
309,
486,
819,
30,
819,
273,
2618,
5347,
273,
365,
6315,
5112,
18,
3530,
... |
for mypkg in os.listdir(os.getcwd()+"/"+x+"/"+y): if mypkg[-7:] != ".ebuild": continue mypkg=mypkg[:-7] mykey=x+"/"+y fullpkg=x+"/"+mypkg if not portagedict.has_key(mykey): portagedict[mykey]=[] portagedict[mykey].append([fullpkg,catpkgsplit(fullpkg)]) | for mypkg in os.listdir(os.getcwd()+"/"+x+"/"+y): if mypkg[-7:] != ".ebuild": continue mypkg=mypkg[:-7] mykey=x+"/"+y fullpkg=x+"/"+mypkg if not portagedict.has_key(mykey): portagedict[mykey]=[] portagedict[mykey].append([fullpkg,catpkgsplit(fullpkg)]) | def port_porttree(): """ This function builds a dictionary of available ebuilds in the portage tree. Dictionary format is: mydict["cat/pkg"]=[ ["cat/fullpkgname",["cat","pkg","ver","rev"] ["cat/fullpkgname",["cat","pkg","ver2","rev2"] ] """ portagedict={} mydir=getsetting("PORTDIR") if not os.path.isdir(mydir): return origdir=os.getcwd() os.chdir(mydir) for x in categories: for y in os.listdir(os.getcwd()+"/"+x): if not os.path.isdir(os.getcwd()+"/"+x+"/"+y): continue if y=="CVS": continue for mypkg in os.listdir(os.getcwd()+"/"+x+"/"+y): if mypkg[-7:] != ".ebuild": continue mypkg=mypkg[:-7] mykey=x+"/"+y fullpkg=x+"/"+mypkg if not portagedict.has_key(mykey): portagedict[mykey]=[] portagedict[mykey].append([fullpkg,catpkgsplit(fullpkg)]) os.chdir(origdir) return portagedict | 5e72627e293494998021a0d1a249017225393c4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9957/5e72627e293494998021a0d1a249017225393c4b/portage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1756,
67,
655,
3413,
13332,
3536,
1220,
445,
10736,
279,
3880,
434,
2319,
425,
27324,
316,
326,
1756,
410,
2151,
18,
16447,
740,
353,
30,
3399,
1576,
9614,
2574,
19,
10657,
11929,
22850,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1756,
67,
655,
3413,
13332,
3536,
1220,
445,
10736,
279,
3880,
434,
2319,
425,
27324,
316,
326,
1756,
410,
2151,
18,
16447,
740,
353,
30,
3399,
1576,
9614,
2574,
19,
10657,
11929,
22850,
... |
Abelian variety factor of dimension 3 of J0(42) | Abelian subvariety of dimension 2 of J0(42) | def __add__(self, other): """ Add two modular abelian variety factors. EXAMPLES: sage: A = J0(42); D = A.decomposition(); D [ Abelian variety factor of dimension 1 of J0(42), Abelian variety factor of dimension 2 of J0(42), Abelian variety factor of dimension 2 of J0(42) ] sage: D[0] + D[1] Abelian variety factor of dimension 3 of J0(42) sage: D[1].is_subvariety(D[0] + D[1]) True sage: D[0] + D[1] + D[2] Abelian variety J0(42) sage: D[0] + D[0] Abelian variety factor of dimension 1 of J0(42) sage: D[0] + D[0] == D[0] True sage: sum(D, D[0]) == A True """ if not is_ModularAbelianVariety(other): if other == 0: return self raise TypeError, "sum not defined" if not isinstance(other, ModularAbelianVariety_modsym_abstract): return ModularAbelianVariety_abstract.__add__(self, other) if self.groups() != other.groups(): raise TypeError, "sum not defined since ambient spaces different" M = self.modular_symbols() + other.modular_symbols() return ModularAbelianVariety_modsym(M) | 62147d82541f9aed0900f78cd10df5f262f228f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62147d82541f9aed0900f78cd10df5f262f228f5/abvar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
1308,
4672,
3536,
1436,
2795,
681,
2490,
1223,
292,
2779,
1394,
14369,
14490,
18,
225,
5675,
8900,
11386,
30,
272,
410,
30,
432,
273,
804,
20,
12,
9452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1289,
972,
12,
2890,
16,
1308,
4672,
3536,
1436,
2795,
681,
2490,
1223,
292,
2779,
1394,
14369,
14490,
18,
225,
5675,
8900,
11386,
30,
272,
410,
30,
432,
273,
804,
20,
12,
9452,
... |
if self.fd: | if self.fd is not None: | def close(self): """Close port""" if self._isOpen: if self.fd: os.close(self.fd) self.fd = None self._isOpen = False | fd7c07e9f423edd1bed54933682990c10370ddc6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/fd7c07e9f423edd1bed54933682990c10370ddc6/serialposix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
3536,
4605,
1756,
8395,
309,
365,
6315,
291,
3678,
30,
309,
365,
18,
8313,
353,
486,
599,
30,
1140,
18,
4412,
12,
2890,
18,
8313,
13,
365,
18,
8313,
273,
599,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
3536,
4605,
1756,
8395,
309,
365,
6315,
291,
3678,
30,
309,
365,
18,
8313,
353,
486,
599,
30,
1140,
18,
4412,
12,
2890,
18,
8313,
13,
365,
18,
8313,
273,
599,
3... |
'company_id': line.company_id and line.company_id.id or False, | 'company_id': res_user.company_id and res_user.company_id.id or False, | def action_move_create(self, cr, uid, ids,context=None): proc_obj = self.pool.get('procurement.order') move_obj = self.pool.get('stock.move') location_obj = self.pool.get('stock.location') wf_service = netsvc.LocalService("workflow") | cae8860346af6b4598b807f36782ed61c41ffbaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cae8860346af6b4598b807f36782ed61c41ffbaf/mrp_pull.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
8501,
67,
2640,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
2472,
33,
7036,
4672,
5418,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
9381,
594,
475,
18,
1019,
6134,
3635,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
8501,
67,
2640,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
2472,
33,
7036,
4672,
5418,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
9381,
594,
475,
18,
1019,
6134,
3635,
6... |
y = _reconstruct(x, reductor(), 1, memo) else: y = copier(memo) | y = copier(memo) | def deepcopy(x, memo = None): """Deep copy operation on arbitrary Python objects. See the module's __doc__ string for more info. """ if memo is None: memo = {} d = id(x) if d in memo: return memo[d] try: copierfunction = _deepcopy_dispatch[type(x)] except KeyError: try: copier = x.__deepcopy__ except AttributeError: try: reductor = x.__reduce__ except AttributeError: raise error, \ "un-deep-copyable object of type %s" % type(x) else: y = _reconstruct(x, reductor(), 1, memo) else: y = copier(memo) else: y = copierfunction(x, memo) memo[d] = y return y | 9a66d46f026c9e6a2278551c925defe7d0f21db4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9a66d46f026c9e6a2278551c925defe7d0f21db4/copy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7217,
12,
92,
16,
11063,
273,
599,
4672,
3536,
13980,
1610,
1674,
603,
11078,
6600,
2184,
18,
225,
2164,
326,
1605,
1807,
1001,
2434,
972,
533,
364,
1898,
1123,
18,
3536,
225,
309,
11063... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7217,
12,
92,
16,
11063,
273,
599,
4672,
3536,
13980,
1610,
1674,
603,
11078,
6600,
2184,
18,
225,
2164,
326,
1605,
1807,
1001,
2434,
972,
533,
364,
1898,
1123,
18,
3536,
225,
309,
11063... |
def __init__(self, host, port=None, key_file=None, cert_file=None): HTTPConnection.__init__(self, host, port) | def __init__(self, host, port=None, key_file=None, cert_file=None, strict=None): HTTPConnection.__init__(self, host, port, strict) | def __init__(self, host, port=None, key_file=None, cert_file=None): HTTPConnection.__init__(self, host, port) self.key_file = key_file self.cert_file = cert_file | 6d636f9fc61e4b385bf7a786538edd4605353b13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6d636f9fc61e4b385bf7a786538edd4605353b13/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
16,
1756,
33,
7036,
16,
498,
67,
768,
33,
7036,
16,
3320,
67,
768,
33,
7036,
16,
5490,
33,
7036,
4672,
2239,
1952,
16186,
2738,
972,
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,
1001,
2738,
972,
12,
2890,
16,
1479,
16,
1756,
33,
7036,
16,
498,
67,
768,
33,
7036,
16,
3320,
67,
768,
33,
7036,
16,
5490,
33,
7036,
4672,
2239,
1952,
16186,
2738,
972,
12,
2890,
16... |
for path_renamed in files_renamed: ref_stat_info = ref_dir_snapshot.stat_info(path_renamed) try: path = new_dir_snapshot.path_for_inode(ref_stat_info.st_ino) event = FileMovedEvent(src_path=path_renamed, dest_path=path) q.put((self.path, event)) self.unregister_path(path_renamed) self.register_path(path, is_directory=False) except KeyError: event = FileDeletedEvent(src_path=path_renamed) q.put((self.path, event)) self.unregister_path(path_renamed) for path_renamed in dirs_renamed: ref_stat_info = ref_dir_snapshot.stat_info(path_renamed) try: path = new_dir_snapshot.path_for_inode(ref_stat_info.st_ino) path = path.rstrip(os.path.sep) if self.is_recursive: dir_path_renamed = path_renamed.rstrip(os.path.sep) for root, directories, filenames in os.walk(path): for directory_path in directories: full_path = path_join(root, directory_path) renamed_path = full_path.replace(path, dir_path_renamed) q.put((self.path, DirMovedEvent(src_path=renamed_path, dest_path=full_path))) for filename in filenames: full_path = path_join(root, filename) renamed_path = full_path.replace(path, dir_path_renamed) q.put((self.path, FileMovedEvent(src_path=renamed_path, dest_path=full_path))) event = DirMovedEvent(src_path=path_renamed, dest_path=path) q.put((self.path, event)) self.unregister_path(path_renamed) self.register_path(path, is_directory=True) except KeyError: event = DirDeletedEvent(src_path=path_renamed) q.put((self.path, event)) self.unregister_path(path) | self.__process_kevent_file_renames(out_event_queue, ref_dir_snapshot, new_dir_snapshot, files_renamed) self.__process_kevent_dir_renames(out_event_queue, ref_dir_snapshot, new_dir_snapshot, dirs_renamed) | def process_events(self): event_list = self.kq.control(list(self.kevent_list), MAX_EVENTS) | 09ecd9924d39b4cf792a21ecb88668e201f538fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14346/09ecd9924d39b4cf792a21ecb88668e201f538fd/kqueue_observer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
5989,
12,
2890,
4672,
871,
67,
1098,
273,
365,
18,
79,
85,
18,
7098,
12,
1098,
12,
2890,
18,
79,
2575,
67,
1098,
3631,
4552,
67,
29221,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
5989,
12,
2890,
4672,
871,
67,
1098,
273,
365,
18,
79,
85,
18,
7098,
12,
1098,
12,
2890,
18,
79,
2575,
67,
1098,
3631,
4552,
67,
29221,
13,
2,
-100,
-100,
-100,
-100,
-100,... |
v=defineArray(2, [(0, 0), (0, 0), (0, 0)])) | v=defineArray(Array_f, 2)) | def Zeroes(): return buildGeometry( GL_TRIANGLES, v=defineArray(2, [(0, 0), (0, 0), (0, 0)])) | 4be9a58b1a5296c33737a502136ae4bd09bd64ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2798/4be9a58b1a5296c33737a502136ae4bd09bd64ed/glscry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12744,
281,
13332,
327,
1361,
9823,
12,
10252,
67,
6566,
3388,
11386,
16,
331,
33,
11255,
1076,
12,
1076,
67,
74,
16,
576,
3719,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12744,
281,
13332,
327,
1361,
9823,
12,
10252,
67,
6566,
3388,
11386,
16,
331,
33,
11255,
1076,
12,
1076,
67,
74,
16,
576,
3719,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for xpl in linked: if not xpl in shouldlink: | for xpage in linked: if not xpage in shouldlink: | def reportBacklinks(self, new): """Report missing back links. This will be called from finish() if needed.""" try: for site in new.keys(): pl = new[site] if not pl.section(): shouldlink = new.values() + [self.inpl] linked = pl.interwiki() for xpl in shouldlink: if xpl != pl and not xpl in linked: for l in linked: if l.site() == xpl.site(): wikipedia.output(u"WARNING: %s: %s does not link to %s but to %s" % (pl.site().family.name, pl.aslink(forceInterwiki = True), xpl.aslink(forceInterwiki = True), l.aslink(forceInterwiki = True))) break else: wikipedia.output(u"WARNING: %s: %s does not link to %s" % (pl.site().family.name, pl.aslink(forceInterwiki = True), xpl.aslink(forceInterwiki = True))) # Check for superfluous links for xpl in linked: if not xpl in shouldlink: # Check whether there is an alternative page on that language. for l in shouldlink: if l.site() == xpl.site(): # Already reported above. break else: # New warning wikipedia.output(u"WARNING: %s: %s links to incorrect %s" % (pl.site().family.name, pl.aslink(forceInterwiki = True), xpl.aslink(forceInterwiki = True))) except (socket.error, IOError): wikipedia.output(u'ERROR: could not report backlinks') | 02fc12a4124b63d8e2a4be36fe82132950863eae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/02fc12a4124b63d8e2a4be36fe82132950863eae/interwiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
2711,
7135,
12,
2890,
16,
394,
4672,
3536,
4820,
3315,
1473,
4716,
18,
1220,
903,
506,
2566,
628,
4076,
1435,
309,
3577,
12123,
775,
30,
364,
2834,
316,
394,
18,
2452,
13332,
886,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
2711,
7135,
12,
2890,
16,
394,
4672,
3536,
4820,
3315,
1473,
4716,
18,
1220,
903,
506,
2566,
628,
4076,
1435,
309,
3577,
12123,
775,
30,
364,
2834,
316,
394,
18,
2452,
13332,
886,
... |
overflowok = 0 | def test_format(self): global overflowok | cadd4ddd62fd6f836f102414630263c6215e0578 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/cadd4ddd62fd6f836f102414630263c6215e0578/test_format.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2139,
12,
2890,
4672,
2552,
9391,
601,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2139,
12,
2890,
4672,
2552,
9391,
601,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
sage: J = JonesDatabase() sage: J.ramified_at([101,109]) | sage: J = JonesDatabase() sage: J.ramified_at([101,109]) | def ramified_at(self, S, d=None, var='a'): """ Return all fields in the database of degree d ramified exactly at the primes in S. The fields are ordered by degree and discriminant. | d765f046189a16dc0c94d0140cdb8ac8b1cc0a94 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d765f046189a16dc0c94d0140cdb8ac8b1cc0a94/jones.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24975,
939,
67,
270,
12,
2890,
16,
348,
16,
302,
33,
7036,
16,
569,
2218,
69,
11,
4672,
3536,
2000,
777,
1466,
316,
326,
2063,
434,
10782,
302,
24975,
939,
8950,
622,
326,
846,
4485,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24975,
939,
67,
270,
12,
2890,
16,
348,
16,
302,
33,
7036,
16,
569,
2218,
69,
11,
4672,
3536,
2000,
777,
1466,
316,
326,
2063,
434,
10782,
302,
24975,
939,
8950,
622,
326,
846,
4485,
... |
return tot_time, outcome, reached, pl | return tot_time, outcome, reached | def run_single(benchmark, config, time_limit, mem_limit): """\ Runs a single benchmark instance with the given configuration, time limit and memory limit. The output is saved in a file $benchmark.$config.log. Returns a pair (time, outcome) """ pl = 0 cn = configname(config) if "s3_srvr_10_BUG.cil.c" in benchmark: pl = 200 elif "s3_srvr_11_BUG.cil.c" in benchmark: pl = 700 elif "s3_srvr_12_BUG.cil.c" in benchmark: pl = 1200 elif "s3_srvr_13_BUG.cil.c" in benchmark: pl = 1500 elif "s3_srvr_14_BUG.cil.c" in benchmark: pl = 300 cmdline = Template('ulimit -t $time_limit -v $mem_limit; ' '(scripts/cpa.sh -setprop trackabstractioncomputation.pathlengthlimit=$pl -setprop output.disable=true -config $config $benchmark > ' '$benchmark.$cn.log 2>&1)').substitute(locals()) p = subprocess.Popen(['/bin/bash', '-c', cmdline], shell=False) retval = p.wait() tot_time, outcome, reached = None, None, None if retval == 0: outcome = None elif retval == 134: outcome = 'ABORTED (probably by Mathsat)' elif retval == 137: outcome = 'KILLED BY SIGNAL 9 (probably ulimit)' elif retval == 143: outcome = 'KILLED' else: outcome = 'ERROR (%d)' % retval with open('%s.%s.log' % (benchmark, configname(config))) as f: for line in f: if tot_time is None and line.startswith( 'Total time for CPAchecker:'): tot_time = line[line.find(':')+1:].strip() elif reached is None and line.startswith('Size of reached set:'): reached = (line[line.find(':')+1:line.find('(')-1].strip()) if (line.find('java.lang.OutOfMemoryError') != -1) or line.startswith('out of memory'): outcome = 'OUT OF MEMORY' elif line.find('SIGSEGV') != -1: outcome = 'SEGMENTATION FAULT' elif (outcome is None or outcome == "ERROR (1)") and (line.find('Exception') != -1): outcome = 'EXCEPTION' elif outcome is None and line.startswith('Error location(s) reached?'): line = line[26:].strip() if line.startswith('NO'): outcome = 'SAFE' elif line.startswith('YES'): outcome = 'UNSAFE' else: outcome = 'UNKNOWN' if outcome is None and line.startswith( '#Test cases computed:'): outcome = 'OK' if tot_time is None: tot_time = -1 if outcome is None: outcome = 'UNKNOWN' return tot_time, outcome, reached, pl | faa631eb53c3fc32a442f061db2b984c6dd06210 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1073/faa631eb53c3fc32a442f061db2b984c6dd06210/run_tests_explicit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
7526,
12,
70,
9737,
16,
642,
16,
813,
67,
3595,
16,
1663,
67,
3595,
4672,
3536,
64,
1939,
87,
279,
2202,
14128,
791,
598,
326,
864,
1664,
16,
813,
1800,
471,
3778,
1800,
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,
1086,
67,
7526,
12,
70,
9737,
16,
642,
16,
813,
67,
3595,
16,
1663,
67,
3595,
4672,
3536,
64,
1939,
87,
279,
2202,
14128,
791,
598,
326,
864,
1664,
16,
813,
1800,
471,
3778,
1800,
18... |
kwargs['outsourceslices'] = True | kwargs.setdefault('outsourceslices',True) | def __init__(self,name,func,*args,**kwargs): self.name = name self.func = func self.removedim = None self.useslices = False kwargs['outsourceslices'] = True LazyOperation.__init__(self,*args,**kwargs) | 9ea383d3931ae4a9f60ca83c4897ac51e8e54f2f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/381/9ea383d3931ae4a9f60ca83c4897ac51e8e54f2f/expressions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
529,
16,
644,
16,
14,
1968,
16,
636,
4333,
4672,
365,
18,
529,
273,
508,
365,
18,
644,
273,
1326,
365,
18,
14923,
381,
273,
599,
365,
18,
6117,
80,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
529,
16,
644,
16,
14,
1968,
16,
636,
4333,
4672,
365,
18,
529,
273,
508,
365,
18,
644,
273,
1326,
365,
18,
14923,
381,
273,
599,
365,
18,
6117,
80,
1... |
else: return stdMathHeader | return stdMathHeader | def getMathHeader(): if os.path.exists(siteFile): import Site if hasattr(Site, "mathInc"): return Site.mathInc else: return stdMathHeader | c7d2cd50125af6cfd54c2fca5fd104d8a1d0f139 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13973/c7d2cd50125af6cfd54c2fca5fd104d8a1d0f139/BuildSupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
421,
1864,
13332,
309,
1140,
18,
803,
18,
1808,
12,
4256,
812,
4672,
1930,
9063,
309,
3859,
12,
4956,
16,
315,
15949,
14559,
6,
4672,
327,
9063,
18,
15949,
14559,
327,
2044,
10477,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2108,
421,
1864,
13332,
309,
1140,
18,
803,
18,
1808,
12,
4256,
812,
4672,
1930,
9063,
309,
3859,
12,
4956,
16,
315,
15949,
14559,
6,
4672,
327,
9063,
18,
15949,
14559,
327,
2044,
10477,... |
self.parent.mainwindow.canvas.commands.ForceRedraw() | self.parent.mainwindow.canvas.ForceRedraw() | def refreshTab(self): self.parent.mainwindow.canvas.commands.ForceRedraw() | eaac87d51e271d075dfddd8eba2a2e2a1fa51867 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/eaac87d51e271d075dfddd8eba2a2e2a1fa51867/doctabs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
5661,
12,
2890,
4672,
365,
18,
2938,
18,
5254,
5668,
18,
15424,
18,
10997,
3715,
1899,
1435,
225,
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,
4460,
5661,
12,
2890,
4672,
365,
18,
2938,
18,
5254,
5668,
18,
15424,
18,
10997,
3715,
1899,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.unixsocket = 0 | def __init__(self, address=('localhost', SYSLOG_UDP_PORT), facility=LOG_USER): """ Initialize a handler. | 5492e1722af1ce85b8248e30cf35e957429d161d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5492e1722af1ce85b8248e30cf35e957429d161d/handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1758,
33,
2668,
13014,
2187,
7068,
55,
4842,
67,
20352,
67,
6354,
3631,
28164,
33,
4842,
67,
4714,
4672,
3536,
9190,
279,
1838,
18,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1758,
33,
2668,
13014,
2187,
7068,
55,
4842,
67,
20352,
67,
6354,
3631,
28164,
33,
4842,
67,
4714,
4672,
3536,
9190,
279,
1838,
18,
2,
-100,
-100,
-100,
... | |
if check_mk.is_allowed_to_act(html.req.user) and (check_mk.is_unrestricted_action_user(html.req.user) or host in all_hosts()): | if not check_mk.is_allowed_to_act(html.req.user) and not (check_mk.is_unrestricted_action_user(html.req.user) or host in all_hosts()): | def do_log_ack(html): show_tabs(html, tabs, "log") host = html.var('host') file = form_file_to_int(html.var('file')) fileDisplay = form_file_to_ext(file) ack = html.var('ack') # check_mk.is_allowed_to_act: Does the user have the permission to act in multiadmin? # check_mk.is_unrestricted_action_user: Is the user allowed to override the Nagios permissions? # If not unrestricted check if the user is allowed for that object if check_mk.is_allowed_to_act(html.req.user) and (check_mk.is_unrestricted_action_user(html.req.user) or host in all_hosts()): html.write("<h1 class=error>Permission denied</h1>\n") html.write("<div class=error>You are not allowed to acknowledge the logs of the host %s</div>" % htmllib.attrencode(host)) return # filter invalid values if ack != '1': raise MKUserError('ack', 'Invalid value for ack parameter.') try: os.remove(check_mk.logwatch_dir + '/' + host + '/' + file) html.write('<h1>%s: %s Acknowledged</h1>' % \ (htmllib.attrencode(host), htmllib.attrencode(fileDisplay))) html.write('<p>The log messages from host "%s" in file' '"%s" have been acknowledged.</p>' % \ (htmllib.attrencode(host), htmllib.attrencode(fileDisplay))) except: raise MKGeneralException('The log file "%s" from host "%s"' ' could not be deleted.' % \ (htmllib.attrencode(fileDisplay), htmllib.attrencode(host))) | c1f228314b05f99c60e8bf7cfc93ccfc9f97b124 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/c1f228314b05f99c60e8bf7cfc93ccfc9f97b124/page_logwatch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1330,
67,
484,
12,
2620,
4672,
2405,
67,
16056,
12,
2620,
16,
10920,
16,
315,
1330,
7923,
225,
1479,
273,
1729,
18,
1401,
2668,
2564,
6134,
585,
273,
646,
67,
768,
67,
869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1330,
67,
484,
12,
2620,
4672,
2405,
67,
16056,
12,
2620,
16,
10920,
16,
315,
1330,
7923,
225,
1479,
273,
1729,
18,
1401,
2668,
2564,
6134,
585,
273,
646,
67,
768,
67,
869,
... |
self.graph.anchorData = orangeom.optimizeAnchors(Numeric.transpose(self.graph.scaledData).tolist(), classes, self.graph.anchorData, self.attractG, -self.repelG, steps) | ai = self.graph.attributeNameIndex attrIndices = [ai[label] for label in self.getShownAttributeList()] self.graph.anchorData = orangeom.optimizeAnchors(Numeric.transpose(self.graph.scaledData).tolist(), classes, self.graph.anchorData, attrIndices, self.attractG, -self.repelG, steps) | def freeAttributes(self, iterations, steps): attrList = self.getShownAttributeList() classes = [int(x.getclass()) for x in self.graph.rawdata] for i in range(iterations): self.graph.anchorData = orangeom.optimizeAnchors(Numeric.transpose(self.graph.scaledData).tolist(), classes, self.graph.anchorData, self.attractG, -self.repelG, steps) self.graph.updateData(attrList) self.graph.repaint() | 73d00e1361a586245c008ffd4cf26616698f4632 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/73d00e1361a586245c008ffd4cf26616698f4632/OWRadviz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4843,
2498,
12,
2890,
16,
11316,
16,
6075,
4672,
1604,
682,
273,
365,
18,
588,
27042,
1499,
682,
1435,
3318,
273,
306,
474,
12,
92,
18,
588,
1106,
10756,
364,
619,
316,
365,
18,
4660,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4843,
2498,
12,
2890,
16,
11316,
16,
6075,
4672,
1604,
682,
273,
365,
18,
588,
27042,
1499,
682,
1435,
3318,
273,
306,
474,
12,
92,
18,
588,
1106,
10756,
364,
619,
316,
365,
18,
4660,
... |
pass | def __init__(self, ui, path): if not has_https: raise util.Abort(_('Python support for SSL and HTTPS ' 'is not installed')) httprepository.__init__(self, ui, path) | def unbundle(self, cg, heads, source): # have to stream bundle to a temp file because we do not have # http 1.1 chunked transfer. | 69ef06fd90f8589ca946e888ce78b889a62bae28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/69ef06fd90f8589ca946e888ce78b889a62bae28/httprepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
9991,
12,
2890,
16,
14947,
16,
22742,
16,
1084,
4672,
468,
1240,
358,
1407,
3440,
358,
279,
1906,
585,
2724,
732,
741,
486,
1240,
468,
1062,
404,
18,
21,
19949,
7412,
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,
640,
9991,
12,
2890,
16,
14947,
16,
22742,
16,
1084,
4672,
468,
1240,
358,
1407,
3440,
358,
279,
1906,
585,
2724,
732,
741,
486,
1240,
468,
1062,
404,
18,
21,
19949,
7412,
18,
2,
-100,... |
def make_auth_regex_str(author=None): | def make_auth_regex_str(author=None,first_author=None): | def get_bad_char_replacements(): """When a document is converted to plain-text from PDF, certain characters may result in the plain-text, that are either unwanted, or broken. These characters need to be corrected or removed. Examples are, certain control characters that would be illegal in XML and must be removed; TeX ligatures (etc); broken accents such as umlauts on letters that must be corrected. This function returns a dictionary of (unwanted) characters to look for and the characters that should be used to replace them. @return: (dictionary) - { seek -> replace, } or charsacters to replace in plain-text. """ replacements = { ## Control characters not allowed in XML: u'\u2028' : u"", u'\u2029' : u"", u'\u202A' : u"", u'\u202B' : u"", u'\u202C' : u"", u'\u202D' : u"", u'\u202E' : u"", u'\u206A' : u"", u'\u206B' : u"", u'\u206C' : u"", u'\u206D' : u"", u'\u206E' : u"", u'\u206F' : u"", u'\uFFF9' : u"", u'\uFFFA' : u"", u'\uFFFB' : u"", u'\uFFFC' : u"", u'\uFEFF' : u"", ## Language Tag Code Points: u"\U000E0000" : u"", u"\U000E0001" : u"", u"\U000E0002" : u"", u"\U000E0003" : u"", u"\U000E0004" : u"", u"\U000E0005" : u"", u"\U000E0006" : u"", u"\U000E0007" : u"", u"\U000E0008" : u"", u"\U000E0009" : u"", u"\U000E000A" : u"", u"\U000E000B" : u"", u"\U000E000C" : u"", u"\U000E000D" : u"", u"\U000E000E" : u"", u"\U000E000F" : u"", u"\U000E0010" : u"", u"\U000E0011" : u"", u"\U000E0012" : u"", u"\U000E0013" : u"", u"\U000E0014" : u"", u"\U000E0015" : u"", u"\U000E0016" : u"", u"\U000E0017" : u"", u"\U000E0018" : u"", u"\U000E0019" : u"", u"\U000E001A" : u"", u"\U000E001B" : u"", u"\U000E001C" : u"", u"\U000E001D" : u"", u"\U000E001E" : u"", u"\U000E001F" : u"", u"\U000E0020" : u"", u"\U000E0021" : u"", u"\U000E0022" : u"", u"\U000E0023" : u"", u"\U000E0024" : u"", u"\U000E0025" : u"", u"\U000E0026" : u"", u"\U000E0027" : u"", u"\U000E0028" : u"", u"\U000E0029" : u"", u"\U000E002A" : u"", u"\U000E002B" : u"", u"\U000E002C" : u"", u"\U000E002D" : u"", u"\U000E002E" : u"", u"\U000E002F" : u"", u"\U000E0030" : u"", u"\U000E0031" : u"", u"\U000E0032" : u"", u"\U000E0033" : u"", u"\U000E0034" : u"", u"\U000E0035" : u"", u"\U000E0036" : u"", u"\U000E0037" : u"", u"\U000E0038" : u"", u"\U000E0039" : u"", u"\U000E003A" : u"", u"\U000E003B" : u"", u"\U000E003C" : u"", u"\U000E003D" : u"", u"\U000E003E" : u"", u"\U000E003F" : u"", u"\U000E0040" : u"", u"\U000E0041" : u"", u"\U000E0042" : u"", u"\U000E0043" : u"", u"\U000E0044" : u"", u"\U000E0045" : u"", u"\U000E0046" : u"", u"\U000E0047" : u"", u"\U000E0048" : u"", u"\U000E0049" : u"", u"\U000E004A" : u"", u"\U000E004B" : u"", u"\U000E004C" : u"", u"\U000E004D" : u"", u"\U000E004E" : u"", u"\U000E004F" : u"", u"\U000E0050" : u"", u"\U000E0051" : u"", u"\U000E0052" : u"", u"\U000E0053" : u"", u"\U000E0054" : u"", u"\U000E0055" : u"", u"\U000E0056" : u"", u"\U000E0057" : u"", u"\U000E0058" : u"", u"\U000E0059" : u"", u"\U000E005A" : u"", u"\U000E005B" : u"", u"\U000E005C" : u"", u"\U000E005D" : u"", u"\U000E005E" : u"", u"\U000E005F" : u"", u"\U000E0060" : u"", u"\U000E0061" : u"", u"\U000E0062" : u"", u"\U000E0063" : u"", u"\U000E0064" : u"", u"\U000E0065" : u"", u"\U000E0066" : u"", u"\U000E0067" : u"", u"\U000E0068" : u"", u"\U000E0069" : u"", u"\U000E006A" : u"", u"\U000E006B" : u"", u"\U000E006C" : u"", u"\U000E006D" : u"", u"\U000E006E" : u"", u"\U000E006F" : u"", u"\U000E0070" : u"", u"\U000E0071" : u"", u"\U000E0072" : u"", u"\U000E0073" : u"", u"\U000E0074" : u"", u"\U000E0075" : u"", u"\U000E0076" : u"", u"\U000E0077" : u"", u"\U000E0078" : u"", u"\U000E0079" : u"", u"\U000E007A" : u"", u"\U000E007B" : u"", u"\U000E007C" : u"", u"\U000E007D" : u"", u"\U000E007E" : u"", u"\U000E007F" : u"", ## Musical Notation Scoping u"\U0001D173" : u"", u"\U0001D174" : u"", u"\U0001D175" : u"", u"\U0001D176" : u"", u"\U0001D177" : u"", u"\U0001D178" : u"", u"\U0001D179" : u"", u"\U0001D17A" : u"", u'\u0001' : u"", ## START OF HEADING ## START OF TEXT & END OF TEXT: u'\u0002' : u"", u'\u0003' : u"", u'\u0004' : u"", ## END OF TRANSMISSION ## ENQ and ACK u'\u0005' : u"", u'\u0006' : u"", u'\u0007' : u"", # BELL u'\u0008' : u"", # BACKSPACE ## SHIFT-IN & SHIFT-OUT u'\u000E' : u"", u'\u000F' : u"", ## Other controls: u'\u0010' : u"", ## DATA LINK ESCAPE u'\u0011' : u"", ## DEVICE CONTROL ONE u'\u0012' : u"", ## DEVICE CONTROL TWO u'\u0013' : u"", ## DEVICE CONTROL THREE u'\u0014' : u"", ## DEVICE CONTROL FOUR u'\u0015' : u"", ## NEGATIVE ACK u'\u0016' : u"", ## SYNCRONOUS IDLE u'\u0017' : u"", ## END OF TRANSMISSION BLOCK u'\u0018' : u"", ## CANCEL u'\u0019' : u"", ## END OF MEDIUM u'\u001A' : u"", ## SUBSTITUTE u'\u001B' : u"", ## ESCAPE u'\u001C' : u"", ## INFORMATION SEPARATOR FOUR (file separator) u'\u001D' : u"", ## INFORMATION SEPARATOR THREE (group separator) u'\u001E' : u"", ## INFORMATION SEPARATOR TWO (record separator) u'\u001F' : u"", ## INFORMATION SEPARATOR ONE (unit separator) ## \r -> remove it u'\r' : u"", ## Strange parantheses - change for normal: u'\x1c' : u'(', u'\x1d' : u')', ## Some ff from tex: u'\u0013\u0010' : u'\u00ED', u'\x0b' : u'ff', ## fi from tex: u'\x0c' : u'fi', ## ligatures from TeX: u'\ufb00' : u'ff', u'\ufb01' : u'fi', u'\ufb02' : u'fl', u'\ufb03' : u'ffi', u'\ufb04' : u'ffl', ## Superscripts from TeX u'\u2212' : u'-', u'\u2013' : u'-', ## Word style speech marks: u'\u201d' : u'"', u'\u201c' : u'"', ## pdftotext has problems with umlaut and prints it as diaeresis ## followed by a letter:correct it ## (Optional space between char and letter - fixes broken ## line examples) u'\u00A8 a' : u'\u00E4', u'\u00A8 e' : u'\u00EB', u'\u00A8 i' : u'\u00EF', u'\u00A8 o' : u'\u00F6', u'\u00A8 u' : u'\u00FC', u'\u00A8 y' : u'\u00FF', u'\u00A8 A' : u'\u00C4', u'\u00A8 E' : u'\u00CB', u'\u00A8 I' : u'\u00CF', u'\u00A8 O' : u'\u00D6', u'\u00A8 U' : u'\u00DC', u'\u00A8 Y' : u'\u0178', u'\xA8a' : u'\u00E4', u'\xA8e' : u'\u00EB', u'\xA8i' : u'\u00EF', u'\xA8o' : u'\u00F6', u'\xA8u' : u'\u00FC', u'\xA8y' : u'\u00FF', u'\xA8A' : u'\u00C4', u'\xA8E' : u'\u00CB', u'\xA8I' : u'\u00CF', u'\xA8O' : u'\u00D6', u'\xA8U' : u'\u00DC', u'\xA8Y' : u'\u0178', ## More umlaut mess to correct: u'\x7fa' : u'\u00E4', u'\x7fe' : u'\u00EB', u'\x7fi' : u'\u00EF', u'\x7fo' : u'\u00F6', u'\x7fu' : u'\u00FC', u'\x7fy' : u'\u00FF', u'\x7fA' : u'\u00C4', u'\x7fE' : u'\u00CB', u'\x7fI' : u'\u00CF', u'\x7fO' : u'\u00D6', u'\x7fU' : u'\u00DC', u'\x7fY' : u'\u0178', u'\x7f a' : u'\u00E4', u'\x7f e' : u'\u00EB', u'\x7f i' : u'\u00EF', u'\x7f o' : u'\u00F6', u'\x7f u' : u'\u00FC', u'\x7f y' : u'\u00FF', u'\x7f A' : u'\u00C4', u'\x7f E' : u'\u00CB', u'\x7f I' : u'\u00CF', u'\x7f O' : u'\u00D6', u'\x7f U' : u'\u00DC', u'\x7f Y' : u'\u0178', ## pdftotext: fix accute accent: u'\x13a' : u'\u00E1', u'\x13e' : u'\u00E9', u'\x13i' : u'\u00ED', u'\x13o' : u'\u00F3', u'\x13u' : u'\u00FA', u'\x13y' : u'\u00FD', u'\x13A' : u'\u00C1', u'\x13E' : u'\u00C9', u'\x13I' : u'\u00CD', u'\x13O' : u'\u00D3', u'\x13U' : u'\u00DA', u'\x13Y' : u'\u00DD', u'\x13 a' : u'\u00E1', u'\x13 e' : u'\u00E9', u'\x13 i' : u'\u00ED', u'\x13 o' : u'\u00F3', u'\x13 u' : u'\u00FA', u'\x13 y' : u'\u00FD', u'\x13 A' : u'\u00C1', u'\x13 E' : u'\u00C9', u'\x13 I' : u'\u00CD', u'\x13 O' : u'\u00D3', u'\x13 U' : u'\u00DA', u'\x13 Y' : u'\u00DD', u'\u00B4 a' : u'\u00E1', u'\u00B4 e' : u'\u00E9', u'\u00B4 i' : u'\u00ED', u'\u00B4 o' : u'\u00F3', u'\u00B4 u' : u'\u00FA', u'\u00B4 y' : u'\u00FD', u'\u00B4 A' : u'\u00C1', u'\u00B4 E' : u'\u00C9', u'\u00B4 I' : u'\u00CD', u'\u00B4 O' : u'\u00D3', u'\u00B4 U' : u'\u00DA', u'\u00B4 Y' : u'\u00DD', u'\u00B4a' : u'\u00E1', u'\u00B4e' : u'\u00E9', u'\u00B4i' : u'\u00ED', u'\u00B4o' : u'\u00F3', u'\u00B4u' : u'\u00FA', u'\u00B4y' : u'\u00FD', u'\u00B4A' : u'\u00C1', u'\u00B4E' : u'\u00C9', u'\u00B4I' : u'\u00CD', u'\u00B4O' : u'\u00D3', u'\u00B4U' : u'\u00DA', u'\u00B4Y' : u'\u00DD', ## pdftotext: fix grave accent: u'\u0060 a' : u'\u00E0', u'\u0060 e' : u'\u00E8', u'\u0060 i' : u'\u00EC', u'\u0060 o' : u'\u00F2', u'\u0060 u' : u'\u00F9', u'\u0060 A' : u'\u00C0', u'\u0060 E' : u'\u00C8', u'\u0060 I' : u'\u00CC', u'\u0060 O' : u'\u00D2', u'\u0060 U' : u'\u00D9', u'\u0060a' : u'\u00E0', u'\u0060e' : u'\u00E8', u'\u0060i' : u'\u00EC', u'\u0060o' : u'\u00F2', u'\u0060u' : u'\u00F9', u'\u0060A' : u'\u00C0', u'\u0060E' : u'\u00C8', u'\u0060I' : u'\u00CC', u'\u0060O' : u'\u00D2', u'\u0060U' : u'\u00D9', ## \02C7 : caron u'\u02C7C' : u'\u010C', u'\u02C7c' : u'\u010D', u'\u02C7S' : u'\u0160', u'\u02C7s' : u'\u0161', u'\u02C7Z' : u'\u017D', u'\u02C7z' : u'\u017E', ## \027 : aa (a with ring above) u'\u02DAa' : u'\u00E5', u'\u02DAA' : u'\u00C5', ## \030 : cedilla u'\u0327c' : u'\u00E7', u'\u0327C' : u'\u00C7', ## \02DC : tilde u'\u02DCn' : u'\u00F1', u'\u02DCN' : u'\u00D1', u'\u02DCo' : u'\u00F5', u'\u02DCO' : u'\u00D5', u'\u02DCa' : u'\u00E3', u'\u02DCA' : u'\u00C3', } return replacements | 4f63bfe58dc96cfe23ab0f0c42cbb2980b2e7a6e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/4f63bfe58dc96cfe23ab0f0c42cbb2980b2e7a6e/refextract.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8759,
67,
3001,
67,
2079,
1346,
13332,
3536,
9434,
279,
1668,
353,
5970,
358,
7351,
17,
955,
628,
12667,
16,
8626,
3949,
2026,
563,
316,
326,
7351,
17,
955,
16,
716,
854,
3344... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8759,
67,
3001,
67,
2079,
1346,
13332,
3536,
9434,
279,
1668,
353,
5970,
358,
7351,
17,
955,
628,
12667,
16,
8626,
3949,
2026,
563,
316,
326,
7351,
17,
955,
16,
716,
854,
3344... |
Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete | Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete. | def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: DyckWord('()()') [1, 0, 1, 0] sage: DyckWord('(())') [1, 1, 0, 0] sage: DyckWord('((') [1, 1] :: sage: DyckWord(noncrossing_partition=[[1],[2]]) [1, 0, 1, 0] sage: DyckWord(noncrossing_partition=[[1,2]]) [1, 1, 0, 0] TODO: In functions where a Dyck word is necessary, an error should be raised (e.g. a_statistic, b_statistic)? """ if noncrossing_partition is not None: return from_noncrossing_partition(noncrossing_partition) elif isinstance(dw, str): l = map(replace_parens, dw) else: l = dw if isinstance(l, DyckWord_class): return l elif l in DyckWords() or is_a_prefix(l): return DyckWord_class(l) else: raise ValueError, "invalid Dyck word" | 7e1334f768dfbfef3881c254af52ae022484f92b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/7e1334f768dfbfef3881c254af52ae022484f92b/dyck_word.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
463,
93,
363,
3944,
12,
22512,
33,
7036,
16,
1661,
14653,
310,
67,
10534,
33,
7036,
4672,
436,
8395,
2860,
279,
463,
93,
363,
2076,
733,
578,
279,
910,
434,
279,
463,
93,
363,
2076,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
463,
93,
363,
3944,
12,
22512,
33,
7036,
16,
1661,
14653,
310,
67,
10534,
33,
7036,
4672,
436,
8395,
2860,
279,
463,
93,
363,
2076,
733,
578,
279,
910,
434,
279,
463,
93,
363,
2076,
... |
self._top.bind('<Delete>', self._delete_module) self._top.bind('<Alt-o>', self._options_toggle) self._top.bind('<Alt-g>', self._go) self._top.bind('<Alt-s>', self._go) self._top.bind('<Control-g>', self._go) self._top.bind('<Control-o>', self._open) self._top.bind('<Control-s>', self._save) self._top.bind('<Control-a>', self._saveas) | self._root.bind('<Delete>', self._delete_module) self._root.bind('<Alt-o>', self._options_toggle) self._root.bind('<Alt-m>', self._messages_toggle) self._root.bind('<F5>', self._go) self._root.bind('<Alt-s>', self._go) self._root.bind('<Control-n>', self._new) self._root.bind('<Control-o>', self._open) self._root.bind('<Control-s>', self._save) self._root.bind('<Control-a>', self._saveas) | def _init_bindings(self): self._top.bind('<Delete>', self._delete_module) self._top.bind('<Alt-o>', self._options_toggle) self._top.bind('<Alt-g>', self._go) self._top.bind('<Alt-s>', self._go) self._top.bind('<Control-g>', self._go) | 4cf6d74130c32443c10897614b39d1c2c512796c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/4cf6d74130c32443c10897614b39d1c2c512796c/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
15863,
12,
2890,
4672,
365,
6315,
3669,
18,
4376,
2668,
32,
2613,
1870,
16,
365,
6315,
3733,
67,
2978,
13,
365,
6315,
3669,
18,
4376,
2668,
32,
10655,
17,
83,
1870,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
15863,
12,
2890,
4672,
365,
6315,
3669,
18,
4376,
2668,
32,
2613,
1870,
16,
365,
6315,
3733,
67,
2978,
13,
365,
6315,
3669,
18,
4376,
2668,
32,
10655,
17,
83,
1870,
16,
... |
"""Returns True if the T,L,S tensors are not set, or are set with values of zero. | """Returns True if the T,L,S tensors are not set, or are set with values of zero. | def is_null(self): """Returns True if the T,L,S tensors are not set, or are set with values of zero. """ if numpy.allclose(numpy.trace(self.T), 0.0) or numpy.allclose(numpy.trace(self.L), 0.0): return True return False | 0af2bbd2f823c142ced4a1951f7ce02d646d6905 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/0af2bbd2f823c142ced4a1951f7ce02d646d6905/TLS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2011,
12,
2890,
4672,
3536,
1356,
1053,
309,
326,
399,
16,
48,
16,
55,
25122,
854,
486,
444,
16,
578,
854,
444,
598,
924,
434,
3634,
18,
3536,
309,
3972,
18,
454,
4412,
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,
353,
67,
2011,
12,
2890,
4672,
3536,
1356,
1053,
309,
326,
399,
16,
48,
16,
55,
25122,
854,
486,
444,
16,
578,
854,
444,
598,
924,
434,
3634,
18,
3536,
309,
3972,
18,
454,
4412,
12,
... |
fb_uploadurl_re = re.compile(r'^(%s)' % reverse("fb_upload")) | fb_uploadurl_re = re.compile(r'^.*(%s)' % reverse("fb_upload")) | def _upload_file(request): """ Upload file to the server. """ from django.core.files.move import file_move_safe if request.method == 'POST': folder = request.POST.get('folder') fb_uploadurl_re = re.compile(r'^(%s)' % reverse("fb_upload")) folder = fb_uploadurl_re.sub('', folder) abs_path = os.path.join(MEDIA_ROOT, DIRECTORY, folder) if request.FILES: filedata = request.FILES['Filedata'] filedata.name = convert_filename(filedata.name) # PRE UPLOAD SIGNAL filebrowser_pre_upload.send(sender=request, path=request.POST.get('folder'), file=filedata) # HANDLE UPLOAD uploadedfile = handle_file_upload(abs_path, filedata) # MOVE UPLOADED FILE # if file already exists if os.path.isfile(os.path.join(MEDIA_ROOT, DIRECTORY, folder, filedata.name)): old_file = os.path.join(abs_path, filedata.name) new_file = os.path.join(abs_path, uploadedfile) file_move_safe(new_file, old_file) # POST UPLOAD SIGNAL filebrowser_post_upload.send(sender=request, path=request.POST.get('folder'), file=FileObject(os.path.join(DIRECTORY, folder, filedata.name))) return HttpResponse('True') | 27f7ebba9129a72d35df658889c3a5f09ae6b82f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12975/27f7ebba9129a72d35df658889c3a5f09ae6b82f/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6327,
67,
768,
12,
2293,
4672,
3536,
9414,
585,
358,
326,
1438,
18,
3536,
225,
628,
13710,
18,
3644,
18,
2354,
18,
8501,
1930,
585,
67,
8501,
67,
4626,
225,
309,
590,
18,
2039,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6327,
67,
768,
12,
2293,
4672,
3536,
9414,
585,
358,
326,
1438,
18,
3536,
225,
628,
13710,
18,
3644,
18,
2354,
18,
8501,
1930,
585,
67,
8501,
67,
4626,
225,
309,
590,
18,
2039,
... |
def CompileC(obj=0,src=0,ipath=[],opts=[]): | def CompileC(obj=0,src=0,ipath=[],opts=[],xdep=[]): | def CompileC(obj=0,src=0,ipath=[],opts=[]): global VERBOSE if ((obj==0)|(src==0)): sys.exit("syntax error in CompileC directive") ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"] fullsrc = CxxFindSource(src, ipath) if (fullsrc == 0): sys.exit("Cannot find source file "+src) dep = CxxCalcDependencies(fullsrc, ipath, []) if (COMPILER=="MSVC7"): wobj = PREFIX+"/tmp/"+obj if (older(wobj, dep)): if VERBOSE >= 0: checkIfNewDir(ipath[1]) cmd = "cl.exe /Fo" + wobj + " /nologo /c" cmd = cmd + " /I" + PREFIX + "/python/include" if (opts.count("DXSDK")): cmd = cmd + ' /I"' + DIRECTXSDK + '/include"' for ver in ["MAYA5","MAYA6","MAYA65"]: if (opts.count(ver)): cmd = cmd + ' /I"' + MAYASDK[ver] + '/include"' for max in ["MAX5","MAX6","MAX7"]: if (PkgSelected(opts,max)): cmd = cmd + ' /I"' + MAXSDK[max] + '/include" /I"' + MAXSDKCS[max] + '" /D' + max for pkg in PACKAGES: if (pkg[:4] != "MAYA") and PkgSelected(opts,pkg): cmd = cmd + " /I" + THIRDPARTY + "/win-libs-vc7/" + pkg.lower() + "/include" for x in ipath: cmd = cmd + " /I" + x if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305' if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA' if (OPTIMIZE==1): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING /RTCs /GS" if (OPTIMIZE==2): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING " if (OPTIMIZE==3): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING " if (OPTIMIZE==4): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING /GL /DNDEBUG " cmd = cmd + " /Fd" + wobj[:-4] + ".pdb" building = buildingwhat(opts) if (building): cmd = cmd + " /DBUILDING_" + building cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 " + fullsrc oscmd(cmd) updatefiledate(wobj) if (COMPILER=="LINUXA"): wobj = PREFIX+"/tmp/" + obj[:-4] + ".o" if (older(wobj, dep)): if VERBOSE >= 0: checkIfNewDir(ipath[1]) if (src[-2:]==".c"): cmd = 'gcc -c -o ' + wobj else: cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj cmd = cmd + ' -I"' + PythonSDK + '"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/vrpn/include' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fftw/include' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fmod/include' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/nvidiacg/include' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/nspr/include' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2' for x in ipath: cmd = cmd + ' -I' + x if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA' if (OPTIMIZE==1): cmd = cmd + " -g" if (OPTIMIZE==2): cmd = cmd + " -O1" if (OPTIMIZE==3): cmd = cmd + " -O2" if (OPTIMIZE==4): cmd = cmd + " -O2" building = buildingwhat(opts) if (building): cmd = cmd + " -DBUILDING_" + building cmd = cmd + ' ' + fullsrc oscmd(cmd) updatefiledate(wobj) | 8fd5a5147d54776cde7f8879cd333f478ebf3714 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/8fd5a5147d54776cde7f8879cd333f478ebf3714/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16143,
39,
12,
2603,
33,
20,
16,
4816,
33,
20,
16,
625,
421,
22850,
6487,
4952,
22850,
6487,
92,
15037,
33,
8526,
4672,
2552,
27857,
309,
14015,
2603,
631,
20,
14047,
12,
4816,
631,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16143,
39,
12,
2603,
33,
20,
16,
4816,
33,
20,
16,
625,
421,
22850,
6487,
4952,
22850,
6487,
92,
15037,
33,
8526,
4672,
2552,
27857,
309,
14015,
2603,
631,
20,
14047,
12,
4816,
631,
20... |
def set_env(self, name, val): | def set_env(self, val): | def set_env(self, name, val): """setter for the env property""" self.all_envs[name] = val | 5bcf53ca87845dd3b9c371c4d1cb1bed32b5bca6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/5bcf53ca87845dd3b9c371c4d1cb1bed32b5bca6/Build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3074,
12,
2890,
16,
1244,
4672,
3536,
18062,
364,
326,
1550,
1272,
8395,
365,
18,
454,
67,
30339,
63,
529,
65,
273,
1244,
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,
444,
67,
3074,
12,
2890,
16,
1244,
4672,
3536,
18062,
364,
326,
1550,
1272,
8395,
365,
18,
454,
67,
30339,
63,
529,
65,
273,
1244,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
otherside = otherside._rescale(exp, context=context, watchexp=0) | otherside = otherside._rescale(exp, context=context, watchexp=0) | def _divide(self, other, divmod = 0, context=None): """Return a / b, to context.prec precision. | 17931de110ac84e6b0eb88d77a95798f8670765a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/17931de110ac84e6b0eb88d77a95798f8670765a/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2892,
831,
12,
2890,
16,
1308,
16,
26105,
273,
374,
16,
819,
33,
7036,
4672,
3536,
990,
279,
342,
324,
16,
358,
819,
18,
4036,
6039,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2892,
831,
12,
2890,
16,
1308,
16,
26105,
273,
374,
16,
819,
33,
7036,
4672,
3536,
990,
279,
342,
324,
16,
358,
819,
18,
4036,
6039,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
print >> sys.stderr, line print >> sys.stderr, " " * (offset-2), "^" | msg.lineno = lineno msg.message_args = (line,) msg.message = '<tt>%%s</tt>\n<tt>%s^</tt>' % (' ' * (offset - 2)) return [msg] | def _check(self, document): code_string = document.string filename = document.filename try: tree = compiler.parse(code_string) except (SyntaxError, IndentationError): value = sys.exc_info()[1] (lineno, offset, line) = value[1][1:] if line.endswith("\n"): line = line[:-1] print >> sys.stderr, line print >> sys.stderr, " " * (offset-2), "^" else: w = pyflakes.Checker(tree, filename) return w.messages | ccb4061a2e3bfa25d149efeff86ff548ce9d137d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/ccb4061a2e3bfa25d149efeff86ff548ce9d137d/pyflaker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
12,
2890,
16,
1668,
4672,
981,
67,
1080,
273,
1668,
18,
1080,
1544,
273,
1668,
18,
3459,
775,
30,
2151,
273,
5274,
18,
2670,
12,
710,
67,
1080,
13,
1335,
261,
22510,
16,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
12,
2890,
16,
1668,
4672,
981,
67,
1080,
273,
1668,
18,
1080,
1544,
273,
1668,
18,
3459,
775,
30,
2151,
273,
5274,
18,
2670,
12,
710,
67,
1080,
13,
1335,
261,
22510,
16,
2... |
return self.TALSourceToURL(source_file), ln | return self.TALSourceToURL(source_file, frame), ln | def getFilenameAndLine(self, frame): """Returns the filename and line number for the frame. Invoked often. | 2de8b221c4cd2305a9e71370e89f7ed7c48bbe8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2de8b221c4cd2305a9e71370e89f7ed7c48bbe8d/ZopeScriptDebugServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14632,
1876,
1670,
12,
2890,
16,
2623,
4672,
3536,
1356,
326,
1544,
471,
980,
1300,
364,
326,
2623,
18,
225,
5454,
14276,
16337,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14632,
1876,
1670,
12,
2890,
16,
2623,
4672,
3536,
1356,
326,
1544,
471,
980,
1300,
364,
326,
2623,
18,
225,
5454,
14276,
16337,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
try: os.rmdir(mytmpdir) except: pass | def check(id=''): '''Checks for available new or updated managed software, downloading installer items if needed. Returns 1 if there are available updates, 0 if there are no available updates, and -1 if there were errors.''' global mytmpdir mytmpdir = tempfile.mkdtemp() getMachineFacts() ManagedInstallDir = munkicommon.ManagedInstallDir() if munkicommon.munkistatusoutput: munkistatus.activate() munkistatus.message("Checking for available updates...") munkistatus.percent("-1") munkicommon.log("### Beginning managed software check ###") mainmanifestpath = getPrimaryManifest(id) if munkicommon.stopRequested(): return 0 installinfo = {} if mainmanifestpath: # initialize our installinfo record installinfo['managed_installs'] = [] installinfo['removals'] = [] munkicommon.display_detail("**Checking for installs**") installinfo = processManifestForInstalls(mainmanifestpath, installinfo) if munkicommon.stopRequested(): return 0 # clean up cache dir # remove any item in the install cache that isn't scheduled # to be installed -- # this allows us to 'pull back' an item before it is installed # by removing it from the manifest installer_item_list = [] for item in installinfo['managed_installs']: if "installer_item" in item: installer_item_list.append(item["installer_item"]) cachedir = os.path.join(ManagedInstallDir, "Cache") for item in os.listdir(cachedir): if item not in installer_item_list: munkicommon.display_detail("Removing %s from cache" % item) os.unlink(os.path.join(cachedir, item)) if munkicommon.munkistatusoutput: # reset progress indicator and detail field munkistatus.percent("-1") munkistatus.detail('') # now generate a list of items to be uninstalled munkicommon.display_detail("**Checking for removals**") if munkicommon.stopRequested(): return 0 installinfo = processManifestForRemovals(mainmanifestpath, installinfo) if munkicommon.munkistatusoutput: munkistatus.disableStopButton() # need to write out install list so the autoinstaller # can use it to install things in the right order installinfochanged = True installinfopath = os.path.join(ManagedInstallDir, "InstallInfo.plist") if os.path.exists(installinfopath): oldinstallinfo = plistlib.readPlist(installinfopath) if oldinstallinfo == installinfo: installinfochanged = False munkicommon.display_detail("No change in InstallInfo.") if installinfochanged: plistlib.writePlist(installinfo, os.path.join(ManagedInstallDir, "InstallInfo.plist")) else: # couldn't get a primary manifest. Check to see if we have a valid InstallList from # an earlier run. munkicommon.display_error("Could not retreive managed install primary manifest.") installinfopath = os.path.join(ManagedInstallDir, "InstallInfo.plist") if os.path.exists(installinfopath): try: installinfo = plistlib.readPlist(installinfopath) except: installinfo = {} try: # clean up our tmp dir os.rmdir(mytmpdir) except: # not fatal if it fails pass installcount = getInstallCount(installinfo) removalcount = getRemovalCount(installinfo) if installcount: munkicommon.display_info("The following items will be installed or upgraded:") for item in installinfo['managed_installs']: if item.get('installer_item'): munkicommon.display_info(" + %s-%s" % (item.get('name',''), item.get('version_to_install',''))) if item.get('description'): munkicommon.display_info(" %s" % item['description']) if item.get('RestartAction') == 'RequireRestart': munkicommon.display_info(" *Restart required") if removalcount: munkicommon.display_info("The following items will be removed:") for item in installinfo['removals']: if item.get('installed'): munkicommon.display_info(" - %s" % item.get('name')) if item.get('RestartAction') == 'RequireRestart': munkicommon.display_info(" *Restart required") if installcount == 0 and removalcount == 0: munkicommon.display_info("No changes to managed software are available.") munkicommon.log("### End managed software check ###") if munkicommon.errors: reporterrors() if installcount or removalcount: return 1 else: return 0 | 377cd3ddc2085e326fef895a28eed842c9346e25 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6241/377cd3ddc2085e326fef895a28eed842c9346e25/updatecheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
350,
2218,
11,
4672,
9163,
4081,
364,
2319,
394,
578,
3526,
7016,
17888,
16,
23742,
16050,
1516,
309,
3577,
18,
2860,
404,
309,
1915,
854,
2319,
4533,
16,
225,
374,
309,
1915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
350,
2218,
11,
4672,
9163,
4081,
364,
2319,
394,
578,
3526,
7016,
17888,
16,
23742,
16050,
1516,
309,
3577,
18,
2860,
404,
309,
1915,
854,
2319,
4533,
16,
225,
374,
309,
1915,
... | |
if errorStatus & numpy.FPE_UNDERFLOW: | if errorStatus & np.FPE_UNDERFLOW: | def handleError(errorStatus, sourcemsg): """Take error status and use error mode to handle it.""" modes = np.geterr() if errorStatus & numpy.FPE_INVALID: if modes['invalid'] == "warn": print "Warning: Encountered invalid numeric result(s)", sourcemsg if modes['invalid'] == "raise": raise MathDomainError(sourcemsg) if errorStatus & numpy.FPE_DIVIDEBYZERO: if modes['dividebyzero'] == "warn": print "Warning: Encountered divide by zero(s)", sourcemsg if modes['dividebyzero'] == "raise": raise ZeroDivisionError(sourcemsg) if errorStatus & numpy.FPE_OVERFLOW: if modes['overflow'] == "warn": print "Warning: Encountered overflow(s)", sourcemsg if modes['overflow'] == "raise": raise NumOverflowError(sourcemsg) if errorStatus & numpy.FPE_UNDERFLOW: if modes['underflow'] == "warn": print "Warning: Encountered underflow(s)", sourcemsg if modes['underflow'] == "raise": raise UnderflowError(sourcemsg) | a2dc78f54f65fa67d6d02e9fcc563752efd67509 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/a2dc78f54f65fa67d6d02e9fcc563752efd67509/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15676,
12,
1636,
1482,
16,
1084,
3576,
4672,
3536,
13391,
555,
1267,
471,
999,
555,
1965,
358,
1640,
518,
12123,
12382,
273,
1130,
18,
588,
370,
1435,
309,
555,
1482,
473,
3972,
18,
42,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15676,
12,
1636,
1482,
16,
1084,
3576,
4672,
3536,
13391,
555,
1267,
471,
999,
555,
1965,
358,
1640,
518,
12123,
12382,
273,
1130,
18,
588,
370,
1435,
309,
555,
1482,
473,
3972,
18,
42,
... |
count = count+1 if count > 0: newwidget.caption = newwidget.caption + " (" + str(count+1) + ")" | list.append(item.caption) i = 1; found = 0 while not found: if newwidget.caption + " (" + str(i) + ")" not in list: found = 1 newwidget.caption = newwidget.caption + " (" + str(i) + ")" else: i += 1 | def addWidget(self, widget): newwidget = orngCanvasItems.CanvasWidget(self.canvas, widget, self.canvasDlg.defaultPic, self.canvasDlg) x = self.canvasView.contentsX() + 10 for w in self.widgets: x = max(w.x() + 90, x) x = x/10*10 y = 150 newwidget.move(x,y) | adc01a36294f318d160b0e142c9b8627f1f717ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/adc01a36294f318d160b0e142c9b8627f1f717ca/orngDoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22149,
12,
2890,
16,
3604,
4672,
394,
6587,
273,
578,
3368,
12971,
3126,
18,
12971,
4609,
12,
2890,
18,
15424,
16,
3604,
16,
365,
18,
15424,
40,
23623,
18,
1886,
52,
335,
16,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22149,
12,
2890,
16,
3604,
4672,
394,
6587,
273,
578,
3368,
12971,
3126,
18,
12971,
4609,
12,
2890,
18,
15424,
16,
3604,
16,
365,
18,
15424,
40,
23623,
18,
1886,
52,
335,
16,
365,
18,
... |
dbh.execute("insert into NSRL_hashes set md5=%r,filename=%r,productcode=%r,oscode=%r",(to_md5(row[1]),row[3],row[5],row[6])) | dbh.mass_insert( md5=to_md5(row[1]), filename=row[3], productcode=row[5], oscode=row[6], ) | def MainNSRLHash(dirname): fd=csv.reader(file(dirname+"/NSRLFile.txt")) print "Starting to import %s/NSRLFile.txt" % dirname ## Ensure the NSRL tables do not have any indexes - this speeds up insert significantly try: dbh.execute("alter table NSRL_hashes drop index md5"); except: pass for row in fd: try: dbh.execute("insert into NSRL_hashes set md5=%r,filename=%r,productcode=%r,oscode=%r",(to_md5(row[1]),row[3],row[5],row[6])) except (ValueError,DB.DBError),e: print "SQL Error skipped %s" %e | 2b819ebdabf58f59455e86c30491e4f73712f69b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/2b819ebdabf58f59455e86c30491e4f73712f69b/nsrl_load.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12740,
3156,
54,
48,
2310,
12,
12287,
4672,
5194,
33,
6715,
18,
10530,
12,
768,
12,
12287,
9078,
19,
3156,
54,
48,
812,
18,
5830,
6,
3719,
1172,
315,
11715,
358,
1930,
738,
87,
19,
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,
12740,
3156,
54,
48,
2310,
12,
12287,
4672,
5194,
33,
6715,
18,
10530,
12,
768,
12,
12287,
9078,
19,
3156,
54,
48,
812,
18,
5830,
6,
3719,
1172,
315,
11715,
358,
1930,
738,
87,
19,
3... |
self.doc.addPageTemplates(WikiPage(firstArticleTitle, **kwargs)) elements.append(NextPageTemplate(firstArticleTitle.encode('utf-8'))) | self.doc.addPageTemplates(WikiPage(first_article_title, **kwargs)) elements.append(NextPageTemplate(first_article_title.encode('utf-8'))) | def writeTitlePage(self, coverimage=None): # FIXME: clean this up. there seems to be quite a bit of deprecated here title = self.book.get('title') subtitle = self.book.get('subtitle') | 6de9058291473c4d19f9cdf0d4dae6cba4b7e505 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12390/6de9058291473c4d19f9cdf0d4dae6cba4b7e505/rlwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
4247,
1964,
12,
2890,
16,
5590,
2730,
33,
7036,
4672,
468,
9852,
30,
2721,
333,
731,
18,
1915,
12001,
358,
506,
25102,
279,
2831,
434,
6849,
2674,
2077,
273,
365,
18,
3618,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
4247,
1964,
12,
2890,
16,
5590,
2730,
33,
7036,
4672,
468,
9852,
30,
2721,
333,
731,
18,
1915,
12001,
358,
506,
25102,
279,
2831,
434,
6849,
2674,
2077,
273,
365,
18,
3618,
18,
5... |
if mapPrefix == 'de': | if len(es.createentitylist('func_bomb_target')): | def unload(): global gungameWeaponOrderMenu # Unload all enabled addons for addonName in gungamelib.getRegisteredAddonlist(): if addonName in list_includedAddonsDir: es.unload('gungame/included_addons/%s' % addonName) elif addonName in list_customAddonsDir: es.unload('gungame/custom_addons/%s' % addonName) # Enable Buyzones userid = es.getuserid() es.server.cmd('es_xfire %d func_buyzone Enable' % userid) # Get map if try: mapObjectives = gungamelib.getVariableValue('gg_map_obj') mapPrefix = gungamelib.getGlobal('gungame_currentmap_prefix') # Re-enable objectives if mapObjectives < 3: # Re-enable all objectives if mapObjectives == 0: if mapPrefix == 'de': es.server.cmd('es_xfire %d func_bomb_target Enable' %userid) elif mapPrefix == 'cs': es.server.cmd('es_xfire %d func_hostage_rescue Enable' %userid) # Enable bomb zone elif mapObjectives == 1: if mapPrefix == 'de': es.server.cmd('es_xfire %d func_bomb_target Enable' %userid) # Enable hostage objectives elif mapObjectives == 2: if mapPrefix == 'cs': es.server.cmd('es_xfire %d func_hostage_rescue Enable' %userid) except: pass # Fire gg_unload event es.event('initialize', 'gg_unload') es.event('fire', 'gg_unload') # Remove the notify flag from all GunGame Console Variables list_gungameVariables = gungamelib.getVariableList() for variable in list_gungameVariables: es.ServerVar(variable).removeFlag('notify') es.server.cmd('%s 0' % variable) # Unregister this addon gungamelib.unregisterAddon('gungame') gungamelib.clearGunGame() | 7e69bb95a56d48637acdc3e83635e6a7231045a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/7e69bb95a56d48637acdc3e83635e6a7231045a3/gungame.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27060,
13332,
2552,
31475,
13957,
3218,
28629,
2448,
4599,
225,
468,
1351,
945,
777,
3696,
31439,
364,
15466,
461,
316,
314,
20651,
9925,
495,
18,
588,
10868,
27901,
1098,
13332,
309,
15466,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27060,
13332,
2552,
31475,
13957,
3218,
28629,
2448,
4599,
225,
468,
1351,
945,
777,
3696,
31439,
364,
15466,
461,
316,
314,
20651,
9925,
495,
18,
588,
10868,
27901,
1098,
13332,
309,
15466,... |
else: raise ValueError, "zero step for randrange()" | else: raise ValueError, "zero step for randrange()" | def randrange(self, start, stop=None, step=1, # Do not supply the following arguments int=int, default=None): # This code is a bit messy to make it fast for the # common case while still doing adequate error checking istart = int(start) if istart != start: raise ValueError, "non-integer arg 1 for randrange()" if stop is default: if istart > 0: return int(self.random() * istart) raise ValueError, "empty range for randrange()" istop = int(stop) if istop != stop: raise ValueError, "non-integer stop for randrange()" if step == 1: if istart < istop: return istart + int(self.random() * (istop - istart)) raise ValueError, "empty range for randrange()" istep = int(step) if istep != step: raise ValueError, "non-integer step for randrange()" if istep > 0: n = (istop - istart + istep - 1) / istep elif istep < 0: n = (istop - istart + istep + 1) / istep else: raise ValueError, "zero step for randrange()" | b938c6c64cadf2660479183b417619c46f50af75 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b938c6c64cadf2660479183b417619c46f50af75/whrandom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5605,
3676,
12,
2890,
16,
787,
16,
2132,
33,
7036,
16,
2235,
33,
21,
16,
468,
2256,
486,
14467,
326,
3751,
1775,
509,
33,
474,
16,
805,
33,
7036,
4672,
468,
1220,
981,
353,
279,
2831... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5605,
3676,
12,
2890,
16,
787,
16,
2132,
33,
7036,
16,
2235,
33,
21,
16,
468,
2256,
486,
14467,
326,
3751,
1775,
509,
33,
474,
16,
805,
33,
7036,
4672,
468,
1220,
981,
353,
279,
2831... |
/.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log /.../RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py | /.../chandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log /.../chandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py | def runStartupPerfTests(options, timer, largeData=False, repeat=3, logger=log): """ Run startup time tests. >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', repeat=1) Creating repository for startup time tests /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log /.../RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', largeData=True) Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --restore=test_profile/__repository__.001 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup_with_large_calendar 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> options.tbox = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 <BLANKLINE> Startup [#TINDERBOX# Status = PASSED] OSAF_QA: Startup | ... | 0.00 #TINDERBOX# Testname = Startup #TINDERBOX# Status = PASSED #TINDERBOX# Time elapsed = 0.00 (seconds) - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ if repeat < 3: repeat = 3 # You can't get an accurate number otherwise # Create test repo if options.verbose: log('Creating repository for startup time tests') cmd = options.runchandler['release'][:] cmd += ['--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'quit.py'),] if not largeData: cmd += ['--create'] timeout = 180 name = 'Startup' else: cmd += ['--restore=%s' % os.path.join(options.profileDir, '__repository__.001')] timeout = 600 name = 'Startup_with_large_calendar' if options.params: cmd += [options.params] if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=timeout, logger=logger) if result != 0: log('***Error exit code=%d, creating %s repository' % (result, name)) failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) # Time startup values = [] timeLog = os.path.join(options.profileDir, 'time.log') if not options.dryrun: if os.path.isfile(timeLog): os.remove(timeLog) cmd = [timer, r'--format=%e', '-o', timeLog] cmd += options.runchandler['release'][:] cmd += ['--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'end.py'),] if options.params: cmd += [options.params] if options.verbose: log(' '.join(cmd)) log(name.ljust(33), newline=' ') for _x in range(repeat): if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=180, logger=logger) if result == 0: if options.dryrun: line = '0.0' else: line = open(timeLog).readline()[:-1] try: value = float(line) except ValueError, e: log('| %s' % str(e)) failedTests.append(name) return True log(('%02.2f' % value).rjust(6), newline=' ') values.append(value) else: log('| failed') failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) else: values.sort() value = values[repeat/2] log(' | ', newline='') log(('%02.2f' % value).rjust(6) , newline='') log(u' \u00B1 '.encode('utf8'), newline='') # Unicode PLUS-MINUS SIGN log(('%02.2f' % stddev(values)).rjust(6)) if options.tbox: revision = getattr(build_lib.loadModuleFromFile(os.path.join(options.chandlerHome, 'version.py'), 'vmodule'), 'revision', '') log('') log('%s [#TINDERBOX# Status = PASSED]' % name) log('OSAF_QA: %s | %s | %02.2f' % (name, revision, value)) log('#TINDERBOX# Testname = %s' % name) log('#TINDERBOX# Status = PASSED') log('#TINDERBOX# Time elapsed = %02.2f (seconds)' % value) if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) return False | 2268248f0e4728b63ca1842648cbad866d679472 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/2268248f0e4728b63ca1842648cbad866d679472/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
22178,
22016,
14650,
12,
2116,
16,
5441,
16,
7876,
751,
33,
8381,
16,
7666,
33,
23,
16,
1194,
33,
1330,
4672,
3536,
1939,
11850,
813,
7434,
18,
225,
4080,
702,
273,
1109,
1320,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
22178,
22016,
14650,
12,
2116,
16,
5441,
16,
7876,
751,
33,
8381,
16,
7666,
33,
23,
16,
1194,
33,
1330,
4672,
3536,
1939,
11850,
813,
7434,
18,
225,
4080,
702,
273,
1109,
1320,
1... |
return plugin_list_str.strip(" %s"%PLUGIN_NAME_FORBIDEN_STRING) | return plugin_list_str.strip(" ").split("%s"%PLUGIN_NAME_FORBIDEN_STRING) | def __getCategoryPluginsListFromConfig(self, plugin_list_str): """ Parse the string describing the list of plugins to activate, to discover their actual names and return them. """ return plugin_list_str.strip(" %s"%PLUGIN_NAME_FORBIDEN_STRING) | 693721552bb77897680e2e050f6c02caff2fc94e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10419/693721552bb77897680e2e050f6c02caff2fc94e/ConfigurablePluginManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
4457,
9461,
682,
22102,
12,
2890,
16,
1909,
67,
1098,
67,
701,
4672,
3536,
2884,
326,
533,
16868,
326,
666,
434,
4799,
358,
10235,
16,
358,
10372,
3675,
3214,
1257,
471,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
588,
4457,
9461,
682,
22102,
12,
2890,
16,
1909,
67,
1098,
67,
701,
4672,
3536,
2884,
326,
533,
16868,
326,
666,
434,
4799,
358,
10235,
16,
358,
10372,
3675,
3214,
1257,
471,
327,
... |
return 0 | return 0 | def _getPTS( self ): if self.aindex== -1: if not self.aPTS: self.aPTS= time.time() return time.time()- self.aPTS if self.snd== None: return 0 p= self.snd.getPosition() return p+ self.aDelta | 506e9172460401ded500869a56c03da6aec7db18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2107/506e9172460401ded500869a56c03da6aec7db18/player.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
1856,
55,
12,
365,
262,
30,
309,
365,
18,
530,
561,
631,
300,
21,
30,
309,
486,
365,
18,
69,
1856,
55,
30,
365,
18,
69,
1856,
55,
33,
813,
18,
957,
1435,
225,
327,
813,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
1856,
55,
12,
365,
262,
30,
309,
365,
18,
530,
561,
631,
300,
21,
30,
309,
486,
365,
18,
69,
1856,
55,
30,
365,
18,
69,
1856,
55,
33,
813,
18,
957,
1435,
225,
327,
813,... |
if i == 0: return '' | if i == 0: return '' | def commonprefix(m): "Given a list of pathnames, returns the longest common leading component" if not m: return '' prefix = m[0] for item in m: for i in range(len(prefix)): if prefix[:i+1] != item[:i+1]: prefix = prefix[:i] if i == 0: return '' break return prefix | 77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2975,
3239,
12,
81,
4672,
315,
6083,
279,
666,
434,
589,
1973,
16,
1135,
326,
12163,
2975,
7676,
1794,
6,
309,
486,
312,
30,
327,
875,
1633,
273,
312,
63,
20,
65,
364,
761,
316,
312,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2975,
3239,
12,
81,
4672,
315,
6083,
279,
666,
434,
589,
1973,
16,
1135,
326,
12163,
2975,
7676,
1794,
6,
309,
486,
312,
30,
327,
875,
1633,
273,
312,
63,
20,
65,
364,
761,
316,
312,... |
for line in r.read().split("\n"): | data = r.read().replace('</a>', '\n').replace('</A>', '\n') for line in data.split('\n'): | def parsedata(self, results, id=0): """results (imdb html page), imdb_id Returns tuple of (title, info(dict), image_urls)""" | 46eacecf62cc7867e8d9499ebf3fa81722bd852f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/46eacecf62cc7867e8d9499ebf3fa81722bd852f/fxdimdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2707,
396,
12,
2890,
16,
1686,
16,
612,
33,
20,
4672,
3536,
4717,
261,
381,
1966,
1729,
1363,
3631,
709,
1966,
67,
350,
2860,
3193,
434,
261,
2649,
16,
1123,
12,
1576,
3631,
1316,
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,
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,
2707,
396,
12,
2890,
16,
1686,
16,
612,
33,
20,
4672,
3536,
4717,
261,
381,
1966,
1729,
1363,
3631,
709,
1966,
67,
350,
2860,
3193,
434,
261,
2649,
16,
1123,
12,
1576,
3631,
1316,
67,
... |
cAlphaViewer = self.app.viewers['calpha'] moveZ = self.posMoveDict['z'].value() - cAlphaViewer.renderer.selectionCenterOfMass().z() | oldZ = self.z newZ = self.posMoveDict['z'].value() moveZ = newZ - oldZ self.z = newZ | def posMoveCM_z(self): cAlphaViewer = self.app.viewers['calpha'] moveZ = self.posMoveDict['z'].value() - cAlphaViewer.renderer.selectionCenterOfMass().z() translateVector = Vector3DFloat(0, 0, moveZ) cAlphaViewer.renderer.selectionMove(translateVector) cAlphaViewer.emitModelChanged() | 9fefa88d897047cb33ba1b9c7ca873fe31bb572c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/9fefa88d897047cb33ba1b9c7ca873fe31bb572c/structure_editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
949,
7607,
9611,
67,
94,
12,
2890,
4672,
1592,
62,
273,
365,
18,
94,
394,
62,
273,
365,
18,
917,
7607,
5014,
3292,
94,
29489,
1132,
1435,
3635,
62,
273,
394,
62,
300,
1592,
62,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
949,
7607,
9611,
67,
94,
12,
2890,
4672,
1592,
62,
273,
365,
18,
94,
394,
62,
273,
365,
18,
917,
7607,
5014,
3292,
94,
29489,
1132,
1435,
3635,
62,
273,
394,
62,
300,
1592,
62,
365,
... |
email_group = guet.select() | cols = [guet.c.user_id, guet.c.email] email_group = sa.select(cols) | def get_member_addresses(self, site_id, group_id, id_getter, preferred_only=True, process_settings=True, verified_only=True): # TODO: We currently can't use site_id # TODO: Should only get verified addresses site_id = '' | 4658175cfd291f4bd0a2d349c0e1270d577b7d64 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6274/4658175cfd291f4bd0a2d349c0e1270d577b7d64/queries.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5990,
67,
13277,
12,
2890,
16,
2834,
67,
350,
16,
1041,
67,
350,
16,
612,
67,
11990,
16,
9119,
67,
3700,
33,
5510,
16,
1207,
67,
4272,
33,
5510,
16,
13808,
67,
3700,
33,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5990,
67,
13277,
12,
2890,
16,
2834,
67,
350,
16,
1041,
67,
350,
16,
612,
67,
11990,
16,
9119,
67,
3700,
33,
5510,
16,
1207,
67,
4272,
33,
5510,
16,
13808,
67,
3700,
33,
5... |
print "OPTCHECK FAILURE" for r in problematic_set: print " Result:", id(r), r print " Op", r.owner print " Value Type:", type(r_vals[r]) print " Value: ", r_vals[r] print " Reason: ", [(str(reason), id(old_r)) for reason, old_r in env.equivalence_tracker.reasons[r]] print " Snapshots:" for s in env.equivalence_tracker.snapshots[r]: print " BEFORE" print s[1] print " AFTER" print s[2] print "" raise Exception("OptCheckFailure") | def f(): for x in no_recycling: x[0] = None try: equiv_vals = {} problematic = set() r_vals = {} assert len(thunks) == len(order) for i, (thunk, node) in enumerate(zip(thunks, order)): thunk() | ec7877c435bf313d24aefb0e39fdef074125a2f4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/ec7877c435bf313d24aefb0e39fdef074125a2f4/debugmode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
13332,
364,
619,
316,
1158,
67,
266,
2431,
830,
310,
30,
619,
63,
20,
65,
273,
599,
775,
30,
1298,
427,
67,
4524,
273,
2618,
6199,
2126,
273,
444,
1435,
436,
67,
4524,
273,
2618... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
13332,
364,
619,
316,
1158,
67,
266,
2431,
830,
310,
30,
619,
63,
20,
65,
273,
599,
775,
30,
1298,
427,
67,
4524,
273,
2618,
6199,
2126,
273,
444,
1435,
436,
67,
4524,
273,
2618... | |
output.write (str(value)) | if type(value) == unicode: output.write (value.encode('ascii', 'replace')) else: output.write (str(value)) | def output_object(o): global indentation indent() if o in memory: if o.savedData.has_key ('id'): output.write('<%s id="%s"/>\n' % (o.classString, o.savedData['id'])) else: output.write('<%s/>\n' % (o.classString,)) return memory.add(o) if o.savedData.has_key ('id'): output.write('<%s id="%s">\n' % (o.classString, o.savedData['id'])) else: output.write('<%s>\n' % (o.classString,)) indentation = indentation + 1 for key in o.savedData: if key == 'id': continue indent() output.write('<%s>' % (key,)) value = o.savedData[key] if isinstance (value, SavableObject): output.write ('\n') indentation = indentation + 1 output_object(value) indentation = indentation - 1 indent() else: output.write (str(value)) output.write ('</%s>\n' % (key,)) indentation = indentation - 1 indent() output.write ('</%s>\n' % (o.classString,)) | bb84b71591bde8e01fe09acd95e9d3e256993f2c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/bb84b71591bde8e01fe09acd95e9d3e256993f2c/storedatabase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
1612,
12,
83,
4672,
2552,
12018,
3504,
1435,
309,
320,
316,
3778,
30,
309,
320,
18,
14077,
751,
18,
5332,
67,
856,
7707,
350,
11,
4672,
876,
18,
2626,
2668,
32,
9,
87,
612,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
1612,
12,
83,
4672,
2552,
12018,
3504,
1435,
309,
320,
316,
3778,
30,
309,
320,
18,
14077,
751,
18,
5332,
67,
856,
7707,
350,
11,
4672,
876,
18,
2626,
2668,
32,
9,
87,
612,
... |
self.pushBotJoin(do_nick=True) | if self.syncd: self.pushBotJoin(do_nick=True) | def handleCmd_KILL(self, prefix, args): | 41cfee835992c192fb2464a231351b4271c46427 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8524/41cfee835992c192fb2464a231351b4271c46427/bridge_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
5931,
67,
47,
15125,
12,
2890,
16,
1633,
16,
833,
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,
1640,
5931,
67,
47,
15125,
12,
2890,
16,
1633,
16,
833,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
def _get_reports(self, cr, uid, context): | def _get_reports(self, cr, uid, context): | def _get_reports(self, cr, uid, context): # {{{ document_id = self.dm_wiz_data['id'] pool = pooler.get_pool(cr.dbname) group_obj = pool.get('ir.actions.report.xml') ids = group_obj.search(cr, uid, [('document_id', '=', document_id)]) res = [(group.id, group.name) for group in group_obj.browse(cr, uid, ids)] res.sort(lambda x, y: cmp(x[1], y[1])) return res # }}} | c4b3f8fbfd260b59e6476663f0fbd313179a12b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/c4b3f8fbfd260b59e6476663f0fbd313179a12b3/dm_document_report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
20195,
12,
2890,
16,
4422,
16,
4555,
16,
819,
4672,
468,
10179,
95,
1668,
67,
350,
273,
365,
18,
10956,
67,
91,
452,
67,
892,
3292,
350,
3546,
2845,
273,
2845,
264,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
20195,
12,
2890,
16,
4422,
16,
4555,
16,
819,
4672,
468,
10179,
95,
1668,
67,
350,
273,
365,
18,
10956,
67,
91,
452,
67,
892,
3292,
350,
3546,
2845,
273,
2845,
264,
18,... |
allowed_files = [ constants.CLUSTER_CONF_FILE, constants.ETC_HOSTS, constants.SSH_KNOWN_HOSTS_FILE, constants.VNC_PASSWORD_FILE, ] if file_name not in allowed_files: | if file_name not in _ALLOWED_UPLOAD_FILES: | def UploadFile(file_name, data, mode, uid, gid, atime, mtime): """Write a file to the filesystem. This allows the master to overwrite(!) a file. It will only perform the operation if the file belongs to a list of configuration files. @type file_name: str @param file_name: the target file name @type data: str @param data: the new contents of the file @type mode: int @param mode: the mode to give the file (can be None) @type uid: int @param uid: the owner of the file (can be -1 for default) @type gid: int @param gid: the group of the file (can be -1 for default) @type atime: float @param atime: the atime to set on the file (can be None) @type mtime: float @param mtime: the mtime to set on the file (can be None) @rtype: boolean @return: the success of the operation; errors are logged in the node daemon log """ if not os.path.isabs(file_name): logging.error("Filename passed to UploadFile is not absolute: '%s'", file_name) return False allowed_files = [ constants.CLUSTER_CONF_FILE, constants.ETC_HOSTS, constants.SSH_KNOWN_HOSTS_FILE, constants.VNC_PASSWORD_FILE, ] if file_name not in allowed_files: logging.error("Filename passed to UploadFile not in allowed" " upload targets: '%s'", file_name) return False raw_data = _Decompress(data) utils.WriteFile(file_name, data=raw_data, mode=mode, uid=uid, gid=gid, atime=atime, mtime=mtime) return True | 360b0dc2ef100c06f47358cc38e8da714742a614 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/360b0dc2ef100c06f47358cc38e8da714742a614/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9414,
812,
12,
768,
67,
529,
16,
501,
16,
1965,
16,
4555,
16,
11399,
16,
622,
494,
16,
13158,
4672,
3536,
3067,
279,
585,
358,
326,
6496,
18,
225,
1220,
5360,
326,
4171,
358,
6156,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9414,
812,
12,
768,
67,
529,
16,
501,
16,
1965,
16,
4555,
16,
11399,
16,
622,
494,
16,
13158,
4672,
3536,
3067,
279,
585,
358,
326,
6496,
18,
225,
1220,
5360,
326,
4171,
358,
6156,
1... |
self._input_ctf = inputStream | self._input_ctf1 = inputStream | def set_input(self, idx, inputStream): if idx == 0: self._input_data = inputStream elif idx == 1: self._input_otf = inputStream | e2ff337f2c0075220b13998c40b658517a4d13ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4494/e2ff337f2c0075220b13998c40b658517a4d13ac/ExpVolumeRender.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2630,
12,
2890,
16,
2067,
16,
10010,
4672,
309,
2067,
422,
374,
30,
365,
6315,
2630,
67,
892,
273,
10010,
225,
1327,
2067,
422,
404,
30,
365,
6315,
2630,
67,
352,
74,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2630,
12,
2890,
16,
2067,
16,
10010,
4672,
309,
2067,
422,
374,
30,
365,
6315,
2630,
67,
892,
273,
10010,
225,
1327,
2067,
422,
404,
30,
365,
6315,
2630,
67,
352,
74,
273,
1... |
log.msg("INFO profile.py: (wader.common) - get_profile_by_uuid: " + profile) | log.msg("INFO profile.py: (wader.common) - get_profile_by_uuid: %s" % profile) | def get_profile_by_uuid(self, uuid): """ Returns the :class:`Profile` identified by ``uuid`` | 17a49edb489cb6060d7efc7002e80291ffec4412 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12036/17a49edb489cb6060d7efc7002e80291ffec4412/profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5040,
67,
1637,
67,
7080,
12,
2890,
16,
3822,
4672,
3536,
2860,
326,
294,
1106,
28288,
4029,
68,
9283,
635,
12176,
7080,
10335,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5040,
67,
1637,
67,
7080,
12,
2890,
16,
3822,
4672,
3536,
2860,
326,
294,
1106,
28288,
4029,
68,
9283,
635,
12176,
7080,
10335,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.notify.debug('container %s no longer exists', name) | self.notify.debug('container %s no longer exists; caught exception in eval (%s)' % (name, e)) | def run(self): self._leakDetector._index2containerName2len[self._index] = {} self._leakDetector.notify.debug(repr(self._leakDetector._id2pathStr)) ids = self._leakDetector._id2pathStr.keys() # record the current len of each container for id in ids: yield None name = self._leakDetector._id2pathStr[id] try: container = eval(name) except NameError, ne: # this container no longer exists self.notify.debug('container %s no longer exists', name) del self._leakDetector._id2pathStr[id] continue cLen = len(container) self._leakDetector._index2containerName2len[self._index][name] = cLen # compare the current len of each container to past lens if self._index > 0: idx2name2len = self._leakDetector._index2containerName2len for name in idx2name2len[self._index]: yield None if name in idx2name2len[self._index-1]: diff = idx2name2len[self._index][name] - idx2name2len[self._index-1][name] if diff > 0: if diff > idx2name2len[self._index-1][name]: minutes = (self._leakDetector._index2delay[self._index] - self._leakDetector._index2delay[self._index-1]) / 60. self.notify.warning('container %s grew > 200% in %s minutes' % (name, minutes)) if self._index > 3: diff2 = idx2name2len[self._index-1][name] - idx2name2len[self._index-2][name] diff3 = idx2name2len[self._index-2][name] - idx2name2len[self._index-3][name] if self._index <= 5: msg = ('%s consistently increased in length over the last 3 periods (currently %s items)' % (name, idx2name2len[self._index][name])) self.notify.warning(msg) else: # if size has consistently increased over the last 5 checks, send out a warning diff4 = idx2name2len[self._index-3][name] - idx2name2len[self._index-4][name] diff5 = idx2name2len[self._index-4][name] - idx2name2len[self._index-5][name] if diff > 0 and diff2 > 0 and diff3 > 0 and diff4 > 0 and diff5 > 0: msg = ('%s consistently increased in length over the last 5 periods (currently %s items), notifying system' % (name, idx2name2len[self._index][name])) self.notify.warning(msg) messenger.send(self._leakDetector.getLeakEvent(), [msg]) yield Job.Done | 47008cd9505a530220259d792c80126029e3b41c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/47008cd9505a530220259d792c80126029e3b41c/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
365,
6315,
298,
581,
12594,
6315,
1615,
22,
3782,
461,
22,
1897,
63,
2890,
6315,
1615,
65,
273,
2618,
365,
6315,
298,
581,
12594,
18,
12336,
18,
4148,
12,
12715,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
365,
6315,
298,
581,
12594,
6315,
1615,
22,
3782,
461,
22,
1897,
63,
2890,
6315,
1615,
65,
273,
2618,
365,
6315,
298,
581,
12594,
18,
12336,
18,
4148,
12,
12715,
... |
str += self._class_summary(doc.classes()) | (classes,excepts) = self._split_classes_and_excepts(doc) str += self._class_summary(classes, 'Classes') str += self._class_summary(excepts, 'Exceptions') | def _module_to_html(self, uid): 'Return an HTML page for a Module' doc = self._docmap[uid] descr = doc.descr() if uid.is_package(): moduletype = 'package' else: moduletype = 'module' str = self._header(`uid`) str += self._navbar(moduletype, uid) | 1b52b16120989cc834166571a9a1e9b8676d968f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1b52b16120989cc834166571a9a1e9b8676d968f/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2978,
67,
869,
67,
2620,
12,
2890,
16,
4555,
4672,
296,
990,
392,
3982,
1363,
364,
279,
5924,
11,
997,
273,
365,
6315,
2434,
1458,
63,
1911,
65,
18426,
273,
997,
18,
28313,
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,
389,
2978,
67,
869,
67,
2620,
12,
2890,
16,
4555,
4672,
296,
990,
392,
3982,
1363,
364,
279,
5924,
11,
997,
273,
365,
6315,
2434,
1458,
63,
1911,
65,
18426,
273,
997,
18,
28313,
1435,
... |
return self.__array_data__.__getitem__(index) def getValue(self): """For scalars.""" return self.__array_data__.item() def typecode(self): return ['b', 'c', 'h', 'i', 'f', 'd'][self._nc_type-1] def _test(): import doctest doctest.testmod() | return self.data[index] def __setitem__(self, index, data): if self.isrec: if isinstance(index, tuple): rec_index = index[0] else: rec_index = index if isinstance(rec_index, slice): recs = (rec_index.start or 0) + len(data) else: recs = rec_index + 1 if recs > len(self.data): shape = (recs,) + self._shape[1:] self.data.resize(shape) self.data[index] = data NetCDFFile = netcdf_file NetCDFVariable = netcdf_variable | def __getitem__(self, index): return self.__array_data__.__getitem__(index) | c5eeb7a30fccf949fe4b4d016a566826aaaf111c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5572/c5eeb7a30fccf949fe4b4d016a566826aaaf111c/pupynere.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
770,
4672,
327,
365,
16186,
1126,
67,
892,
972,
16186,
31571,
972,
12,
1615,
13,
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,
1001,
31571,
972,
12,
2890,
16,
770,
4672,
327,
365,
16186,
1126,
67,
892,
972,
16186,
31571,
972,
12,
1615,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
max_score, klass = scores[0], self.classes[0] | max_score, klass = scores[0], me.classes[0] | def classify(me, observation): """classify(me, observation) -> class Classify an observation into a class. """ scores = calculate(me, observation) max_score, klass = scores[0], self.classes[0] for i in range(1, len(scores)): if scores[i] > max_score: max_score, klass = scores[i], self.classes[i] return klass | 1fd3b28c3fcf201f7cdfc13c239e9ab5c6bdb2b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/1fd3b28c3fcf201f7cdfc13c239e9ab5c6bdb2b8/MaxEntropy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19974,
12,
3501,
16,
13853,
4672,
3536,
1106,
1164,
12,
3501,
16,
13853,
13,
317,
667,
225,
1659,
1164,
392,
13853,
1368,
279,
667,
18,
225,
3536,
8474,
273,
4604,
12,
3501,
16,
13853,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19974,
12,
3501,
16,
13853,
4672,
3536,
1106,
1164,
12,
3501,
16,
13853,
13,
317,
667,
225,
1659,
1164,
392,
13853,
1368,
279,
667,
18,
225,
3536,
8474,
273,
4604,
12,
3501,
16,
13853,
... |
parser.add_option("-N", action="store_false", dest="label", default=True, | optgrp.add_option("-N", action="store_false", dest="label", default=True, | def clush_main(args): """Main clush script function""" # Default values nodeset_base, nodeset_exclude = NodeSet(), NodeSet() # # Argument management # usage = "%prog [options] command" parser = optparse.OptionParser(usage, version="%%prog %s" % version) parser.disable_interspersed_args() # Node selections optgrp = optparse.OptionGroup(parser, "Selecting target nodes") optgrp.add_option("-w", action="store", dest="nodes", help="nodes where to run the command") optgrp.add_option("-x", action="store", dest="exclude", help="exclude nodes from the node list") optgrp.add_option("-a", "--all", action="store_true", dest="nodes_all", help="run command on all nodes") optgrp.add_option("-g", "--group", action="store", dest="group", help="run command on a group of nodes") parser.add_option_group(optgrp) parser.add_option("-q", "--quiet", action="store_true", dest="quiet", help="be quiet, print essential output only") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="be verbose, print informative messages") parser.add_option("-d", "--debug", action="store_true", dest="debug", help="output more messages for debugging purpose") parser.add_option("-N", action="store_false", dest="label", default=True, help="disable labeling of command line") parser.add_option("-l", "--user", action="store", dest="user", help="execute remote command as user") parser.add_option("-S", action="store_true", dest="maxrc", help="return the largest of command return codes") parser.add_option("-b", "--dshbak", action="store_true", dest="gather", help="display results in a dshbak-like way") # Copy parser.add_option("-c", "--copy", action="store", dest="source_path", help="copy local file or directory to the nodes") parser.add_option("--dest", action="store", dest="dest_path", help="destination file or directory on the nodes") parser.add_option("-f", "--fanout", action="store", dest="fanout", help="use a specified fanout", type="int") # Timeouts parser.add_option("-t", "--connect_timeout", action="store", dest="connect_timeout", help="limit time to connect to a node" ,type="int") parser.add_option("-u", "--command_timeout", action="store", dest="command_timeout", help="limit time for command to run on the node", type="int") (options, args) = parser.parse_args() # # Load config file # config = ClushConfig(options) # Apply command line overrides if options.quiet: config.set_main("verbosity", VERB_QUIET) if options.verbose: config.set_main("verbosity", VERB_VERB) if options.debug: config.set_main("verbosity", VERB_DEBUG) if options.fanout: config.set_main("fanout", overrides.fanout) if options.user: self.set_main("ssh_user", overrides.user) if options.connect_timeout: self.set_main("connect_timeout", overrides.connect_timeout) if options.command_timeout: self.set_main("command_timeout", overrides.command_timeout) # # Compute the nodeset # nodeset_base = NodeSet(options.nodes) nodeset_exclude = NodeSet(options.exclude) # Do we have nodes group? task = task_self() task.set_info("debug", config.get_verbosity() > 1) if options.nodes_all: command = config.get_nodes_all_command() task.shell(command, key="all") if options.group: command = config.get_nodes_group_command(options.group) task.shell(command, key="group") # Run needed external commands task.resume() for buf, keys in task.iter_buffers(): for line in buf.splitlines(): config.verbose_print(DEBUG, "Nodes from option %s: %s" % (','.join(keys), buf)) nodeset_base.add(line) # Do we have an exclude list? (-x ...) nodeset_base.difference_update(nodeset_exclude) if len(nodeset_base) < 1: parser.error('No node to run on.') config.verbose_print(VERB_DEBUG, "Final NodeSet is %s" % nodeset_base) # # Task management # stdin_isatty = sys.stdin.isatty() if stdin_isatty: # Standard input is a terminal and we want to perform some user # interactions in the main thread (using blocking calls), so # we run cluster commands in a new ClusterShell Task (a new # thread is created). task = Task() signal.signal(signal.SIGHUP, signal_handler) task.set_info("USER_handle_SIGHUP", True) else: # Perform everything in main thread. task.set_info("USER_handle_SIGHUP", False) timeout = 0 task.set_info("debug", config.get_verbosity() >= VERB_DEBUG) task.set_info("fanout", config.get_fanout() * 2) ssh_user = config.get_ssh_user() if ssh_user: task.set_info("ssh_user", ssh_user) ssh_path = config.get_ssh_path() if ssh_path: task.set_info("ssh_path", ssh_path) ssh_options = config.get_ssh_options() if ssh_options: task.set_info("ssh_options", ssh_options) connect_timeout = config.get_connect_timeout() task.set_info("connect_timeout", connect_timeout) timeout += connect_timeout command_timeout = config.get_command_timeout() task.set_info("command_timeout", command_timeout) if connect_timeout < 1e-3 or command_timeout < 1e-3: timeout = 0 else: timeout += command_timeout # Configure custom task related status task.set_info("USER_interactive", len(args) == 0 and not options.source_path) task.set_info("USER_running", False) if options.source_path and not options.dest_path: options.dest_path = options.source_path if options.source_path: if not options.dest_path: options.dest_path = options.source_path op = "copy source=%s dest=%s" % (options.source_path, options.dest_path) else: op = "command=\"%s\"" % ' '.join(args) config.verbose_print(VERB_VERB, "clush: nodeset=%s fanout=%d [timeout conn=%d " \ "cmd=%d] %s" % (nodeset_base, task.info("fanout")/2, task.info("connect_timeout"), task.info("command_timeout"), op)) if not task.info("USER_interactive"): if options.source_path: if not options.dest_path: options.dest_path = options.source_path run_copy(task, options.source_path, options.dest_path, nodeset_base, 0) else: run_command(task, ' '.join(args), nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) if stdin_isatty: ttyloop(task, nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) elif task.info("USER_interactive"): print >>sys.stderr, "ERROR: interactive mode requires a tty" os_.exit(1) # return the command retcode if options.maxrc: os._exit(task.max_retcode()) # return clush retcode else: os._exit(0) | 96d07ce6e79c549159c502f12c931c42463ef2de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11479/96d07ce6e79c549159c502f12c931c42463ef2de/clush.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
927,
1218,
67,
5254,
12,
1968,
4672,
3536,
6376,
927,
1218,
2728,
445,
8395,
225,
468,
2989,
924,
2199,
278,
67,
1969,
16,
2199,
278,
67,
10157,
273,
2029,
694,
9334,
2029,
694,
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,
927,
1218,
67,
5254,
12,
1968,
4672,
3536,
6376,
927,
1218,
2728,
445,
8395,
225,
468,
2989,
924,
2199,
278,
67,
1969,
16,
2199,
278,
67,
10157,
273,
2029,
694,
9334,
2029,
694,
1435,
... |
verts = data.keys() | verts = set(data.keys()) | 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 | 6d7af7ab7291776d2986e5dad1d1007f72dce49d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6d7af7ab7291776d2986e5dad1d1007f72dce49d/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,
... |
self.selectAllAction.setToolTip(self.__tr("Select All (Ctrl+A)")) | self.selectAllAction.setToolTip(self.__tr("Select All")) | def languageChange(self): self.setCaption(self.__tr("nanoENGINEER-1")) self.fileOpenAction.setText(self.__tr("Open")) self.fileOpenAction.setMenuText(self.__tr("&Open...")) self.fileOpenAction.setAccel(self.__tr("Ctrl+O")) self.fileSaveAction.setText(self.__tr("Save")) self.fileSaveAction.setMenuText(self.__tr("&Save")) self.fileSaveAction.setAccel(self.__tr("Ctrl+S")) self.fileSaveAsAction.setText(self.__tr("Save As")) self.fileSaveAsAction.setMenuText(self.__tr("Save &As...")) self.fileSaveAsAction.setAccel(QString.null) self.fileImageAction.setText(self.__tr("&Image...")) self.fileImageAction.setMenuText(self.__tr("&Image...")) self.fileImageAction.setAccel(self.__tr("Ctrl+I")) self.fileExitAction.setText(self.__tr("Exit")) self.fileExitAction.setMenuText(self.__tr("E&xit")) self.fileExitAction.setAccel(QString.null) self.editUndoAction.setText(self.__tr("Undo")) self.editUndoAction.setMenuText(self.__tr("&Undo")) self.editUndoAction.setAccel(self.__tr("Ctrl+Z")) self.editRedoAction.setText(self.__tr("Redo")) self.editRedoAction.setMenuText(self.__tr("&Redo")) self.editRedoAction.setAccel(self.__tr("Ctrl+Y")) self.editCutAction.setText(self.__tr("Cut")) self.editCutAction.setMenuText(self.__tr("&Cut")) self.editCutAction.setAccel(self.__tr("Ctrl+X")) self.editCopyAction.setText(self.__tr("Copy")) self.editCopyAction.setMenuText(self.__tr("C&opy")) self.editCopyAction.setAccel(self.__tr("Ctrl+C")) self.editPasteAction.setText(self.__tr("Paste")) self.editPasteAction.setMenuText(self.__tr("&Paste")) self.editPasteAction.setAccel(self.__tr("Ctrl+V")) self.editFindAction.setText(self.__tr("Find")) self.editFindAction.setMenuText(self.__tr("&Find...")) self.helpContentsAction.setText(self.__tr("Contents")) self.helpContentsAction.setMenuText(self.__tr("&Contents...")) self.helpContentsAction.setAccel(QString.null) self.helpAssistantAction.setText(self.__tr("nanoENGINEER-1 Assistant")) self.helpAssistantAction.setMenuText(self.__tr("nanoENGINEER-1 Assistant")) self.helpAssistantAction.setAccel(QString.null) self.helpAboutAction.setText(self.__tr("About nanoENGINEER-1")) self.helpAboutAction.setMenuText(self.__tr("&About nanoENGINEER-1")) self.helpAboutAction.setAccel(QString.null) self.setViewFitToWindowAction.setText(self.__tr("Fit to Window")) self.setViewFitToWindowAction.setMenuText(self.__tr("&Fit to Window")) self.setViewFitToWindowAction.setToolTip(self.__tr("Fit to Window (Ctrl+F)")) self.setViewFitToWindowAction.setAccel(self.__tr("Ctrl+F")) self.fileCloseAction.setText(self.__tr("Close")) self.fileCloseAction.setMenuText(self.__tr("&Close")) self.viewDefviewAction.setText(self.__tr("Orientations")) self.viewDefviewAction.setMenuText(self.__tr("Orientations")) self.viewDefviewAction.setToolTip(self.__tr("Default Views")) self.dispBGColorAction.setText(self.__tr("Background Color...")) self.dispBGColorAction.setMenuText(self.__tr("&Background Color...")) self.selectAllAction.setText(self.__tr("All")) self.selectAllAction.setMenuText(self.__tr("&All")) self.selectAllAction.setToolTip(self.__tr("Select All (Ctrl+A)")) self.selectAllAction.setAccel(self.__tr("Ctrl+A")) self.selectNoneAction.setText(self.__tr("None")) self.selectNoneAction.setMenuText(self.__tr("&None")) self.selectNoneAction.setToolTip(self.__tr("Select None")) self.selectInvertAction.setText(self.__tr("Invert")) self.selectInvertAction.setMenuText(self.__tr("&Invert")) self.selectInvertAction.setToolTip(self.__tr("Select Invert (Ctrl+Shift+I)")) self.selectInvertAction.setAccel(self.__tr("Ctrl+Shift+I")) self.ccAddLayerAction.setText(self.__tr("Add Layer")) self.ccAddLayerAction.setMenuText(self.__tr("Add Layer")) self.ccAddLayerAction.setToolTip(self.__tr("Add a new layer.(Maximum is 6 layer)")) self.toolsDoneAction.setText(self.__tr("Done")) self.toolsDoneAction.setMenuText(self.__tr("Done")) self.toolsCancelAction.setText(self.__tr("Cancel")) self.toolsCancelAction.setMenuText(self.__tr("Cancel")) self.editDeleteAction.setText(self.__tr("Delete")) self.editDeleteAction.setMenuText(self.__tr("&Delete")) self.editDeleteAction.setToolTip(self.__tr("Delete (Del)")) self.editDeleteAction.setAccel(self.__tr("Del")) self.viewToolbarsAction.setText(self.__tr("Toolbars")) self.viewToolbarsAction.setMenuText(self.__tr("&Toolbars")) self.dispObjectColorAction.setText(self.__tr("Chunk Color")) self.dispObjectColorAction.setMenuText(self.__tr("&Chunk Color...")) self.dispOpenBondsAction.setText(self.__tr("Display Open Bonds")) self.dispOpenBondsAction.setMenuText(self.__tr("Display Open Bonds")) self.modifyHydrogenateAction.setText(self.__tr("Hydrogenate")) self.modifyHydrogenateAction.setMenuText(self.__tr("&Hydrogenate")) self.modifyHydrogenateAction.setToolTip(self.__tr("Hydrogenate")) self.modifyPassivateAction.setText(self.__tr("Passivate")) self.modifyPassivateAction.setMenuText(self.__tr("&Passivate")) self.modifyPassivateAction.setToolTip(self.__tr("Passivate (Ctrl+P)")) self.modifyPassivateAction.setAccel(self.__tr("Ctrl+P")) self.jigsMotorAction.setText(self.__tr("Rotary Motor")) self.jigsMotorAction.setMenuText(self.__tr("&Rotary Motor")) self.modifyMinimizeSelAction.setText(self.__tr("Minimize Selection")) self.modifyMinimizeSelAction.setMenuText(self.__tr("&Minimize Selection")) self.modifyMinimizeSelAction.setToolTip(self.__tr("Minimize Selection (Ctrl+M)")) self.modifyMinimizeSelAction.setAccel(self.__tr("Ctrl+M")) self.toggleFileTbarAction.setText(self.__tr("File")) self.toggleFileTbarAction.setMenuText(self.__tr("File")) self.toggleEditTbarAction.setText(self.__tr("Edit")) self.toggleEditTbarAction.setMenuText(self.__tr("Edit")) self.toggleViewTbarAction.setText(self.__tr("View")) self.toggleViewTbarAction.setMenuText(self.__tr("View")) self.toggleModelDispTbarAction.setText(self.__tr("Model Display")) self.toggleModelDispTbarAction.setMenuText(self.__tr("Model Display")) self.toggleSelectTbarAction.setText(self.__tr("Select")) self.toggleSelectTbarAction.setMenuText(self.__tr("Select")) self.toggleToolsTbarAction.setText(self.__tr("Tools")) self.toggleToolsTbarAction.setMenuText(self.__tr("Tools")) self.fileSetWorkDirAction.setText(self.__tr("Set Working Directory...")) self.fileSetWorkDirAction.setMenuText(self.__tr("Set &Working Directory...")) self.dispTrihedronAction.setText(self.__tr("Trihedron")) self.dispTrihedronAction.setMenuText(self.__tr("Trihedron")) self.dispTrihedronAction.setToolTip(self.__tr("Display Trihedron")) self.dispDatumPlanesAction.setText(self.__tr("Display Datum Planes")) self.dispDatumPlanesAction.setMenuText(self.__tr("Display Datum Planes")) self.dispCsysAction.setText(self.__tr("Display Coordinate System")) self.dispCsysAction.setMenuText(self.__tr("Display Coordinate System")) self.dispDatumLinesAction.setText(self.__tr("Display Datum Lines")) self.dispDatumLinesAction.setMenuText(self.__tr("Display Datum Lines")) self.dispGridAction.setText(self.__tr("Display Grid")) self.dispGridAction.setMenuText(self.__tr("Display Grid")) self.selectConnectedAction.setText(self.__tr("Connected")) self.selectConnectedAction.setMenuText(self.__tr("&Connected")) self.selectConnectedAction.setToolTip(self.__tr("Select Connected")) self.selectConnectedAction.setAccel(self.__tr("Ctrl+Shift+C")) self.selectDoublyAction.setText(self.__tr("Doubly")) self.selectDoublyAction.setMenuText(self.__tr("&Doubly")) self.selectDoublyAction.setToolTip(self.__tr("Select Doubly")) self.editPrefsAction.setText(self.__tr("Preferences")) self.editPrefsAction.setMenuText(self.__tr("Pre&ferences...")) self.editPrefsAction.setToolTip(self.__tr("Preferences")) self.jigsBearingAction.setText(self.__tr("Bearing")) self.jigsBearingAction.setMenuText(self.__tr("&Bearing")) self.jigsSpringAction.setText(self.__tr("Spring")) self.jigsSpringAction.setMenuText(self.__tr("&Spring")) self.jigsDynoAction.setText(self.__tr("Dyno")) self.jigsDynoAction.setMenuText(self.__tr("&Dyno")) self.jigsHeatsinkAction.setText(self.__tr("Heatsin&k")) self.jigsHeatsinkAction.setMenuText(self.__tr("Heatsin&k")) self.jigsAnchorAction.setText(self.__tr("Anchor")) self.jigsAnchorAction.setMenuText(self.__tr("&Anchor")) self.jigsHandleAction.setText(self.__tr("Handle")) self.jigsHandleAction.setMenuText(self.__tr("&Handle")) self.modifySeparateAction.setText(self.__tr("Separate")) self.modifySeparateAction.setMenuText(self.__tr("&Separate")) self.orient100Action.setText(self.__tr("Surface 100")) self.orient100Action.setMenuText(self.__tr("Surface 100")) self.orient110Action.setText(self.__tr("Surface 110")) self.orient110Action.setMenuText(self.__tr("Surface 110")) self.orient111Action.setText(self.__tr("Surface 111")) self.orient111Action.setMenuText(self.__tr("Surface 111")) self.setViewFrontAction.setText(self.__tr("Front")) self.setViewFrontAction.setMenuText(self.__tr("&Front")) self.setViewFrontAction.setToolTip(self.__tr("Front View")) self.setViewBackAction.setText(self.__tr("Back")) self.setViewBackAction.setMenuText(self.__tr("&Back")) self.setViewBackAction.setToolTip(self.__tr("Back View")) self.setViewTopAction.setText(self.__tr("Top")) self.setViewTopAction.setMenuText(self.__tr("&Top")) self.setViewTopAction.setToolTip(self.__tr("Top View")) self.setViewBottomAction.setText(self.__tr("Bottom")) self.setViewBottomAction.setMenuText(self.__tr("Botto&m")) self.setViewBottomAction.setToolTip(self.__tr("Bottom View")) self.setViewRightAction.setText(self.__tr("Right")) self.setViewRightAction.setMenuText(self.__tr("&Right")) self.setViewRightAction.setToolTip(self.__tr("Right View")) self.setViewRightAction.setStatusTip(self.__tr("Right View")) self.setViewLeftAction.setText(self.__tr("Left")) self.setViewLeftAction.setMenuText(self.__tr("&Left")) self.setViewLeftAction.setToolTip(self.__tr("Left View")) self.setViewHomeAction.setText(self.__tr("Home")) self.setViewHomeAction.setMenuText(self.__tr("&Home")) self.setViewHomeAction.setToolTip(self.__tr("Home View (Home)")) self.setViewHomeAction.setAccel(self.__tr("Home")) self.setViewRecenterAction.setText(self.__tr("Recenter")) self.setViewRecenterAction.setMenuText(self.__tr("&Recenter")) self.setViewRecenterAction.setToolTip(self.__tr("Recenter (Ctrl+R)")) self.setViewRecenterAction.setAccel(self.__tr("Ctrl+R")) self.jigsLinearMotorAction.setText(self.__tr("Linear Motor")) self.jigsLinearMotorAction.setMenuText(self.__tr("&Linear Motor")) self.toggleModifyTbarAction.setText(self.__tr("Modify")) self.toggleModifyTbarAction.setMenuText(self.__tr("Modify")) self.toolsStartOverAction.setText(self.__tr("Start Over")) self.toolsStartOverAction.setMenuText(self.__tr("Start Over")) self.toolsBackUpAction.setText(self.__tr("Back Up")) self.toolsBackUpAction.setMenuText(self.__tr("Back Up")) self.fileClearAction.setText(self.__tr("Clear")) self.fileClearAction.setMenuText(self.__tr("C&lear")) self.modifyCopyBondAction.setText(self.__tr("Copy Bond")) self.modifyCopyBondAction.setMenuText(self.__tr("&Copy Bond")) self.modifyEdgeBondAction.setText(self.__tr("Edge Bond")) self.modifyEdgeBondAction.setMenuText(self.__tr("Ed&ge Bond")) self.modifyMergeAction.setText(self.__tr("Merge")) self.modifyMergeAction.setMenuText(self.__tr("Mer&ge")) self.toggleDatumDispTbarAction.setText(self.__tr("Datum Display")) self.toggleDatumDispTbarAction.setMenuText(self.__tr("Datum Display")) self.modifySetElementAction.setText(self.__tr("Element Selector")) self.modifySetElementAction.setMenuText(self.__tr("&Element Selector...")) self.fileInsertAction.setText(self.__tr("Inser&t...")) self.fileInsertAction.setMenuText(self.__tr("Inser&t...")) self.modifyDehydrogenateAction.setText(self.__tr("Dehydrogenate")) self.modifyDehydrogenateAction.setMenuText(self.__tr("&Dehydrogenate")) self.toggleGridsTbarAction.setText(self.__tr("Grids")) self.toggleGridsTbarAction.setMenuText(self.__tr("Grids")) self.dispCPKAction.setText(self.__tr("CPK")) self.dispCPKAction.setMenuText(self.__tr("CPK")) self.dispDefaultAction.setText(self.__tr("Default")) self.dispDefaultAction.setMenuText(self.__tr("Default")) self.dispInvisAction.setText(self.__tr("Invisible")) self.dispInvisAction.setMenuText(self.__tr("Invisible")) self.dispLinesAction.setText(self.__tr("Lines")) self.dispLinesAction.setMenuText(self.__tr("Lines")) self.dispTubesAction.setText(self.__tr("Tubes")) self.dispTubesAction.setMenuText(self.__tr("Tubes")) self.dispVdWAction.setText(self.__tr("VdW")) self.dispVdWAction.setMenuText(self.__tr("VdW")) self.setPerspectiveActionGroup.setText(self.__tr("ActionGroup")) self.setPerspectiveActionGroup.setMenuText(self.__tr("ActionGroup")) self.setViewOrthoAction.setText(self.__tr("Orthographic Projection")) self.setViewOrthoAction.setMenuText(self.__tr("Orthographic Projection")) self.setViewOrthoAction.setToolTip(self.__tr("Orthographic Projection")) self.setViewPerspecAction.setText(self.__tr("Perspective Projection")) self.setViewPerspecAction.setMenuText(self.__tr("Perspective Projection")) self.setViewPerspecAction.setToolTip(self.__tr("Perspective Projection")) self.toolsModeActionGroup.setText(self.__tr("ActionGroup")) self.toolsModeActionGroup.setMenuText(self.__tr("ActionGroup")) self.toolsDepositAtomAction.setText(self.__tr("Build Atoms")) self.toolsDepositAtomAction.setMenuText(self.__tr("Build &Atoms")) self.toolsDepositAtomAction.setToolTip(self.__tr("Build Atoms")) self.toolsCookieCutAction.setText(self.__tr("Cookie Cutter")) self.toolsCookieCutAction.setMenuText(self.__tr("&Cookie Cutter")) self.toolsCookieCutAction.setToolTip(self.__tr("Cookie Cutter")) self.toolsExtrudeAction.setText(self.__tr("Extrude")) self.toolsExtrudeAction.setMenuText(self.__tr("&Extrude")) self.toolsExtrudeAction.setToolTip(self.__tr("Extrude")) self.toolsRevolveAction.setText(self.__tr("Revolve")) self.toolsRevolveAction.setMenuText(self.__tr("&Revolve")) self.toolsRevolveAction.setToolTip(self.__tr("Revolve")) self.toolsMirrorAction.setText(self.__tr("Mirror")) self.toolsMirrorAction.setMenuText(self.__tr("Mi&rror")) self.toolsMirrorAction.setToolTip(self.__tr("Mirror")) self.toolsMirrorCircularBoundaryAction.setText(self.__tr("Mirror Circular Boundary")) self.toolsMirrorCircularBoundaryAction.setMenuText(self.__tr("Mirror Circular &Boundary")) self.toolsMirrorCircularBoundaryAction.setToolTip(self.__tr("Mirror Circular Boundary")) self.simMoviePlayerAction.setText(self.__tr("Movie Player")) self.simMoviePlayerAction.setMenuText(self.__tr("&Movie Player")) self.simMoviePlayerAction.setToolTip(self.__tr("Movie Player")) self.toolsAddBondAction.setText(self.__tr("Add Bond")) self.toolsAddBondAction.setMenuText(self.__tr("Add Bond")) self.toolsAddBondAction.setToolTip(self.__tr("Add Bond")) self.toolsDeleteBondAction.setText(self.__tr("Delete Bond")) self.toolsDeleteBondAction.setMenuText(self.__tr("Delete Bond")) self.toolsDeleteBondAction.setToolTip(self.__tr("Delete Bond")) self.toolsSelectAtomsAction.setText(self.__tr("Select Atoms")) self.toolsSelectAtomsAction.setMenuText(self.__tr("Select Atoms")) self.toolsSelectAtomsAction.setToolTip(self.__tr("Select Atoms")) self.toolsSelectMoleculesAction.setText(self.__tr("Select Chunks")) self.toolsSelectMoleculesAction.setMenuText(self.__tr("Select Chunks")) self.toolsSelectMoleculesAction.setToolTip(self.__tr("Select Chunks")) self.toolsMoveMoleculeAction.setText(self.__tr("Move Chunks")) self.toolsMoveMoleculeAction.setMenuText(self.__tr("Move Chunks")) self.toolsMoveMoleculeAction.setToolTip(self.__tr("Move Chunks")) self.toolsFuseChunksAction.setText(self.__tr("Fuse Chunks")) self.toolsFuseChunksAction.setMenuText(self.__tr("Fuse Chunks")) self.toolsFuseChunksAction.setToolTip(self.__tr("Fuse Chunks")) self.toolsFuseAtomsAction.setText(self.__tr("Fuse Atoms")) self.toolsFuseAtomsAction.setToolTip(self.__tr("Fuse Atoms")) self.modifyStretchAction.setText(self.__tr("Stretch")) self.modifyStretchAction.setMenuText(self.__tr("S&tretch")) self.MoveOptionsGroup.setText(self.__tr("Move Chunks")) self.MoveOptionsGroup.setMenuText(self.__tr("Move Chunks")) self.transXAction.setText(self.__tr("X Transformation")) self.transXAction.setMenuText(self.__tr("X Transformation")) self.transXAction.setToolTip(self.__tr("X Transformation")) self.transYAction.setText(self.__tr("Y Transformation")) self.transYAction.setMenuText(self.__tr("Y Transformation")) self.transYAction.setToolTip(self.__tr("Y Transformation")) self.transZAction.setText(self.__tr("Z Transformation")) self.transZAction.setMenuText(self.__tr("Z Transformation")) self.transZAction.setToolTip(self.__tr("Z Transformation")) self.rotXAction.setText(self.__tr("X Rotation")) self.rotXAction.setMenuText(self.__tr("X Rotation")) self.rotXAction.setToolTip(self.__tr("X Rotation")) self.rotYAction.setText(self.__tr("Y Rotation")) self.rotYAction.setMenuText(self.__tr("Y Rotation")) self.rotYAction.setToolTip(self.__tr("Y Rotation")) self.rotZAction.setText(self.__tr("Z Rotation")) self.rotZAction.setMenuText(self.__tr("Z Rotation")) self.rotZAction.setToolTip(self.__tr("Z Rotation")) self.moveFreeAction.setText(self.__tr("Mov")) self.moveFreeAction.setMenuText(self.__tr("Move")) self.moveFreeAction.setToolTip(self.__tr("Move")) self.rotFreeAction.setText(self.__tr("Rotate ")) self.rotFreeAction.setMenuText(self.__tr("Rotate Molecule Unconstrained")) self.rotFreeAction.setToolTip(self.__tr("Rotate Molecule Unconstrained")) self.moveConstrainedAction.setText(self.__tr("Move/Rotate Constrained")) self.moveConstrainedAction.setMenuText(self.__tr("Move/Rotate Constrained")) self.moveConstrainedAction.setToolTip(self.__tr("Move/Rotate Constrained")) self.moveXAction.setText(self.__tr("Move X")) self.moveXAction.setMenuText(self.__tr("Move X")) self.moveXAction.setToolTip(self.__tr("Move X")) self.moveYAction.setText(self.__tr("Move Y")) self.moveYAction.setMenuText(self.__tr("Move Y")) self.moveYAction.setToolTip(self.__tr("Move Y")) self.nullAction.setText(QString.null) self.nullAction.setMenuText(QString.null) self.jigsStatAction.setText(self.__tr("Thermostat")) self.jigsStatAction.setMenuText(self.__tr("Thermo&stat")) self.dispResetChunkColorAction.setText(self.__tr("Reset Chunk Color")) self.dispResetChunkColorAction.setMenuText(self.__tr("&Reset Chunk Color")) self.helpWhatsThisAction.setText(self.__tr("What's This")) self.helpWhatsThisAction.setMenuText(self.__tr("What's This")) self.movieResetAction.setText(self.__tr("Reset Movie")) self.movieResetAction.setMenuText(self.__tr("Reset Movie")) self.moviePlayRevActiveAction.setText(self.__tr("Play Reverse")) self.moviePlayRevActiveAction.setMenuText(self.__tr("Play Reverse")) self.moviePlayActiveAction.setText(self.__tr("Play Forward")) self.moviePlayActiveAction.setMenuText(self.__tr("Play Forward")) self.movieMoveToEndAction.setText(self.__tr("Advance To End")) self.movieMoveToEndAction.setMenuText(self.__tr("Advance To End")) self.moviePauseAction.setText(self.__tr("Pause")) self.moviePauseAction.setMenuText(self.__tr("Pause")) self.moviePlayAction.setText(self.__tr("Play Forward")) self.moviePlayAction.setMenuText(self.__tr("Play Forward")) self.moviePlayAction.setToolTip(self.__tr("Play Forward")) self.setViewHomeToCurrentAction.setText(self.__tr("Set Home View to Current View")) self.setViewHomeToCurrentAction.setMenuText(self.__tr("Set Home View to &Current View")) self.modifyAlignCommonAxisAction.setText(self.__tr("Align to Common Axis")) self.modifyAlignCommonAxisAction.setMenuText(self.__tr("Align to &Common Axis")) self.dispSetEltable1Action.setText(self.__tr("Set Atom Colors to Default")) self.dispSetEltable1Action.setMenuText(self.__tr("Set Atom Colors to Default")) self.dispSetEltable2Action.setText(self.__tr("Set Atom Colors to Alternate")) self.dispSetEltable2Action.setMenuText(self.__tr("Set Atom Colors to Alternate")) self.movieDoneAction.setText(self.__tr("Done")) self.movieDoneAction.setMenuText(self.__tr("Done")) self.movieNextFrameAction.setText(self.__tr("Next")) self.movieNextFrameAction.setMenuText(self.__tr("Next")) self.moviePrevFrameAction.setText(self.__tr("Prev")) self.moviePrevFrameAction.setMenuText(self.__tr("Prev")) self.fileSaveMovieAction.setText(self.__tr("Save Movie")) self.fileSaveMovieAction.setMenuText(self.__tr("Save Movie")) self.moviePlayRevAction.setText(self.__tr("Play Reverse")) self.moviePlayRevAction.setMenuText(self.__tr("Play Reverse")) self.fileOpenMovieAction.setText(self.__tr("Open Movie File")) self.fileOpenMovieAction.setMenuText(self.__tr("Open Movie File")) self.movieInfoAction.setText(self.__tr("Movie Information")) self.movieInfoAction.setMenuText(self.__tr("Movie Information")) self.zoomToolAction.setText(self.__tr("Zoom Tool")) self.zoomToolAction.setMenuText(self.__tr("&Zoom Tool")) self.panToolAction.setText(self.__tr("Pan Tool")) self.panToolAction.setMenuText(self.__tr("&Pan Tool")) self.rotateWindowAction.setText(self.__tr("Action")) self.rotateWindowAction.setMenuText(self.__tr("Action")) self.jigsThermoAction.setText(self.__tr("Thermometer")) self.jigsThermoAction.setMenuText(self.__tr("&Thermometer")) self.panDoneAction.setText(self.__tr("Done")) self.panDoneAction.setMenuText(self.__tr("Done")) self.rotateToolAction.setText(self.__tr("Rotate Tool")) self.rotateToolAction.setMenuText(self.__tr("Rotate Tool")) self.modifyDeleteBondsAction.setText(self.__tr("Delete Bonds")) self.modifyDeleteBondsAction.setMenuText(self.__tr("Delete &Bonds")) self.dispElementColorSettingsAction.setText(self.__tr("Element Color Settings...")) self.dispElementColorSettingsAction.setMenuText(self.__tr("Element Color Settings...")) self.simSetupAction.setText(self.__tr("Simulator Setup")) self.simSetupAction.setMenuText(self.__tr("Simulator Setup...")) self.simPlotToolAction.setText(self.__tr("Plot Tool")) self.simPlotToolAction.setMenuText(self.__tr("Plot Tool...")) self.dispLightingAction.setText(self.__tr("Lighting")) self.dispLightingAction.setMenuText(self.__tr("Lighting...")) self.selecttestAction.setText(self.__tr("test")) self.selecttestAction.setMenuText(self.__tr("test")) self.dispResetAtomsDisplayAction.setText(self.__tr("Reset Atoms Display")) self.dispResetAtomsDisplayAction.setMenuText(self.__tr("Reset Atoms Display")) self.dispShowInvisAtomsAction.setText(self.__tr("Show Invisible Atoms")) self.dispShowInvisAtomsAction.setMenuText(self.__tr("Show Invisible Atoms")) self.cookieCutterViewActionGroup.setText(self.__tr("ActionGroup")) self.cookieCutterViewActionGroup.setMenuText(self.__tr("ActionGroup")) self.CookieSelectionGroup.setText(self.__tr("ActionGroup")) self.CookieSelectionGroup.setMenuText(self.__tr("ActionGroup")) self.CircleSelAction.setText(self.__tr("Circle Center")) self.CircleSelAction.setMenuText(self.__tr("Circle Center")) self.CircleSelAction.setToolTip(self.__tr("Circle Center")) self.RectCtrSelAction.setText(self.__tr("Rectangle Center")) self.RectCtrSelAction.setMenuText(self.__tr("Rectangle Center")) self.RectCtrSelAction.setToolTip(self.__tr("Rectangle Center")) self.HexagonSelAction.setText(self.__tr("Hexagon Center")) self.HexagonSelAction.setMenuText(self.__tr("Hexagon Center")) self.HexagonSelAction.setToolTip(self.__tr("Hexagon Center")) self.TriangleSelAction.setText(self.__tr("Triangle Center")) self.TriangleSelAction.setMenuText(self.__tr("Triangle Center")) self.TriangleSelAction.setToolTip(self.__tr("Triangle Center")) self.RectCornerSelAction.setText(self.__tr("Rectangle Corners")) self.RectCornerSelAction.setMenuText(self.__tr("Rectangle Corners")) self.RectCornerSelAction.setToolTip(self.__tr("Rectangle Corners")) self.LassoSelAction.setText(self.__tr("Lasso Selection")) self.LassoSelAction.setMenuText(self.__tr("Lasso Selection")) self.LassoSelAction.setToolTip(self.__tr("Lasso Selection")) self.DefaultSelAction.setText(self.__tr("Default Selection")) self.DefaultSelAction.setMenuText(self.__tr("Default Selection")) self.DefaultSelAction.setToolTip(self.__tr("Default Selection")) self.DiamondSelAction.setText(self.__tr("Diamond Center")) self.DiamondSelAction.setMenuText(self.__tr("Diamond Center")) self.DiamondSelAction.setToolTip(self.__tr("Diamond Center")) self.SquareSelAction.setText(self.__tr("Square Center")) self.SquareSelAction.setMenuText(self.__tr("Square Center")) self.SquareSelAction.setToolTip(self.__tr("Square Center")) self.moveDeltaPlusAction.setText(self.__tr("Move Delta (+)")) self.moveDeltaPlusAction.setMenuText(self.__tr("Move Delta (+)")) self.moveAbsoluteAction.setText(self.__tr("Move Absolute")) self.moveAbsoluteAction.setMenuText(self.__tr("Move Absolute")) self.modifyMinimizeAllAction.setText(self.__tr("Minimize All")) self.modifyMinimizeAllAction.setMenuText(self.__tr("Minimize All")) self.moveDeltaMinusAction.setText(self.__tr("Move Delta (-)")) self.moveDeltaMinusAction.setMenuText(self.__tr("Move Delta (-)")) self.modifyInvertAction.setText(self.__tr("Invert")) self.modifyInvertAction.setMenuText(self.__tr("&Invert")) self.rotateClockwiseAction.setText(self.__tr("Rotate Clockwise")) self.rotateClockwiseAction.setMenuText(self.__tr("Rotate Clockwise")) self.rotateCounterClockwiseAction.setText(self.__tr("Rotate Counter Clockwise")) self.rotateCounterClockwiseAction.setMenuText(self.__tr("Rotate Counter Clockwise")) self.jigsGamessAction.setText(self.__tr("Gamess")) self.jigsGamessAction.setMenuText(self.__tr("Gamess")) self.simJobManagerAction.setText(self.__tr("Job Manager...")) self.simJobManagerAction.setMenuText(self.__tr("Job Manager...")) self.serverManagerAction.setText(self.__tr("Server Manager...")) self.serverManagerAction.setMenuText(self.__tr("Server Manager...")) self.moveThetaMinusAction.setText(self.__tr("Rotate Theta (-)")) self.moveThetaMinusAction.setMenuText(self.__tr("Rotate Theta (-)")) self.moveThetaPlusAction.setText(self.__tr("Rotate Theta (+)")) self.moveThetaPlusAction.setMenuText(self.__tr("Rotate Theta (+)")) self.setViewOppositeAction.setText(self.__tr("Opposite")) self.setViewOppositeAction.setMenuText(self.__tr("Opposite")) self.setViewOppositeAction.setToolTip(self.__tr("Opposite View")) self.setViewOppositeAction.setStatusTip(self.__tr("Opposite View")) self.modifyMMKitAction.setText(self.__tr("Molecular Modeling Kit")) self.modifyMMKitAction.setToolTip(self.__tr("Modeling Kit")) self.helpMouseControlsAction.setText(self.__tr("Mouse Controls...")) self.helpMouseControlsAction.setToolTip(self.__tr("Mouse Controls")) self.helpMouseControlsAction.setWhatsThis(self.__tr("Displays help for mouse controls")) self.helpKeyboardShortcutsAction.setText(self.__tr("Keyboard Shortcuts...")) self.helpKeyboardShortcutsAction.setToolTip(self.__tr("Keyboard Shortcuts")) self.helpKeyboardShortcutsAction.setWhatsThis(self.__tr("Displays help for keyboard shortcuts")) self.modifyCenterCommonAxisAction.setText(self.__tr("Center on Common Axis")) self.simNanoHiveAction.setText(self.__tr("Nano-Hive")) self.simNanoHiveAction.setMenuText(self.__tr("Nano-Hive...")) self.jigsGridPlaneAction.setText(self.__tr("Grid Plane")) self.jigsESPWindowAction.setText(self.__tr("ESP Window")) self.jigsESPWindowAction.setMenuText(self.__tr("ESP Window")) self.selectExpandAction.setText(self.__tr("Expand")) self.selectExpandAction.setToolTip(self.__tr("Expand Selection (Ctrl+D)")) self.selectExpandAction.setAccel(self.__tr("Ctrl+D")) self.selectContractAction.setText(self.__tr("Contract")) self.selectContractAction.setToolTip(self.__tr("Contract Selection (Ctrl+Shift+D)")) self.selectContractAction.setAccel(self.__tr("Ctrl+Shift+D")) self.jigAtomSetAction.setText(self.__tr("Atom Set")) self.fileSaveSelectionAction.setText(self.__tr("Save Selection...")) self.setViewPlus90Action.setText(self.__tr("Rotate +90")) self.setViewMinus90Action.setText(self.__tr("Rotate -90")) self.jigsDistanceAction.setText(self.__tr("Measure Distance")) self.jigsDistanceAction.setMenuText(self.__tr("Measure Distance")) self.jigsAngleAction.setText(self.__tr("Measure Angle")) self.jigsAngleAction.setMenuText(self.__tr("Measure Angle")) self.jigsDihedralAction.setText(self.__tr("Measure Dihedral")) self.jigsDihedralAction.setMenuText(self.__tr("Measure Dihedral")) self.insertNanotubeAction.setText(self.__tr("Nanotube")) self.insertNanotubeAction.setToolTip(self.__tr("Nanotube Generator")) self.helpGraphicsCardAction.setText(self.__tr("Graphics Card Info")) self.helpGraphicsCardAction.setMenuText(self.__tr("Graphics Card Info...")) self.fileToolbar.setLabel(self.__tr("File")) self.editToolbar.setLabel(self.__tr("Edit")) self.viewToolbar.setLabel(self.__tr("View")) self.molecularDispToolbar.setLabel(self.__tr("Display Modes")) self.selectToolbar.setLabel(self.__tr("Select")) self.helpToolbar.setLabel(self.__tr("Help")) self.selectAtomsDashboard.setLabel(self.__tr("Select Atoms")) self.textLabel2_2.setText(self.__tr("Select Atoms")) self.cookieCutterDashboard.setLabel(self.__tr("Cookie Cutter")) self.ccLabel.setText(self.__tr("Cookie Cutter")) self.moveChunksDashboard.setLabel(self.__tr("Move Chunks")) self.textLabel1.setText(self.__tr("Move Chunks")) self.moviePlayerDashboard.setLabel(self.__tr("Movie Player Dashboard")) self.textLabel1_4.setText(self.__tr("Movie Player")) self.skipTL.setText(self.__tr("Skip:")) self.frameLabel.setText(self.__tr("Frame (500 total):")) self.frameNumberSB.setPrefix(QString.null) self.movieLoop_checkbox.setText(self.__tr("Loop")) self.selectMolDashboard.setLabel(self.__tr("Select Molecule")) self.textLabel1_2.setText(self.__tr("Select Chunks")) self.zoomDashboard.setLabel(self.__tr("Zoom Tool")) self.zoomTextLabel.setText(self.__tr("Zoom Tool")) self.panDashboard.setLabel(self.__tr("Pan Tool")) self.panTextLabel.setText(self.__tr("Pan Tool")) self.rotateDashboard.setLabel(self.__tr("Rotate Tool")) self.rotateTextLabel.setText(self.__tr("Rotate Tool")) self.fuseChunksDashboard.setLabel(self.__tr("Fuse Chunks")) self.textLabel1_3.setText(self.__tr("Fuse Chunks")) self.depositAtomDashboard.setLabel(self.__tr("Build Dashboard")) self.cookieSelectDashboard.setLabel(self.__tr("Toolbar")) self.modifyToolbar.setLabel(self.__tr("Modify")) self.toolsToolbar.setLabel(self.__tr("Tools")) self.datumDispDashboard.setLabel(self.__tr("Datum Display")) self.simToolbar.setLabel(self.__tr("Simulator")) if self.MenuBar.findItem(4): self.MenuBar.findItem(4).setText(self.__tr("&File")) if self.MenuBar.findItem(5): self.MenuBar.findItem(5).setText(self.__tr("&Edit")) if self.MenuBar.findItem(6): self.MenuBar.findItem(6).setText(self.__tr("&View")) if self.MenuBar.findItem(7): self.MenuBar.findItem(7).setText(self.__tr("&Insert")) if self.MenuBar.findItem(8): self.MenuBar.findItem(8).setText(self.__tr("&Display")) if self.MenuBar.findItem(9): self.MenuBar.findItem(9).setText(self.__tr("&Select")) if self.MenuBar.findItem(10): self.MenuBar.findItem(10).setText(self.__tr("&Modify")) if self.MenuBar.findItem(11): self.MenuBar.findItem(11).setText(self.__tr("&Tools")) if self.MenuBar.findItem(12): self.MenuBar.findItem(12).setText(self.__tr("&Jigs")) if self.MenuBar.findItem(13): self.MenuBar.findItem(13).setText(self.__tr("Simulator")) if self.MenuBar.findItem(14): self.MenuBar.findItem(14).setText(self.__tr("&Help")) | 818c0dc91020d4845a88dd9e90e3711b5c267744 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/818c0dc91020d4845a88dd9e90e3711b5c267744/MainWindowUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2653,
3043,
12,
2890,
4672,
365,
18,
542,
21158,
12,
2890,
16186,
313,
2932,
13569,
83,
28980,
654,
17,
21,
6,
3719,
365,
18,
768,
3678,
1803,
18,
542,
1528,
12,
2890,
16186,
313,
2932... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2653,
3043,
12,
2890,
4672,
365,
18,
542,
21158,
12,
2890,
16186,
313,
2932,
13569,
83,
28980,
654,
17,
21,
6,
3719,
365,
18,
768,
3678,
1803,
18,
542,
1528,
12,
2890,
16186,
313,
2932... |
node.configuration = str(node.cfgInterface) | if node.cfgInterface != None: node.configuration = str(node.cfgInterface) | def __call__(self, node): """ _operator(JobSpecNode)_ | efb7f1b351ccac97e75aa1c1ff73b4fd09af56c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/efb7f1b351ccac97e75aa1c1ff73b4fd09af56c9/LFNAlgorithm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
756,
4672,
3536,
389,
9497,
12,
2278,
1990,
907,
13,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
756,
4672,
3536,
389,
9497,
12,
2278,
1990,
907,
13,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
headers["Authorization"] ="""OAuth realm="%s",oauth_consumer_key="%s",oauth_signature_method="PLAINTEXT",oauth_nonce="%s",oauth_timestamp="%s",oauth_signature="%s",oauth_token="%s",oauth_version="1.0\"""" % ( | headers["Authorization"] ='OAuth realm="%s",oauth_consumer_key="%s",oauth_signature_method="PLAINTEXT",oauth_nonce="%s",oauth_timestamp="%s",oauth_signature="%s",oauth_token="%s",oauth_version="1.0"' % ( | def getHeaderNoCheck(self): headers = {} headers["Authorization"] ="""OAuth realm="%s",oauth_consumer_key="%s",oauth_signature_method="PLAINTEXT",oauth_nonce="%s",oauth_timestamp="%s",oauth_signature="%s",oauth_token="%s",oauth_version="1.0\"""" % ( self.realm, self.escape(self.oauth_consumer_key), self.escape(self.generate_nonce()), self.escape(str(self.generate_timestamp())), self.escape("%s&%s" % (self.oauth_consumer_secret,self.oauth_token_secret)), self.oauth_token) return headers | 057b1c58037210d914f183cca7c24775558fe983 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2802/057b1c58037210d914f183cca7c24775558fe983/gtym.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7911,
2279,
1564,
12,
2890,
4672,
1607,
273,
2618,
1607,
9614,
6063,
11929,
273,
11,
11467,
11319,
11613,
87,
3113,
7280,
67,
13230,
67,
856,
11613,
87,
3113,
7280,
67,
8195,
67,
2039,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7911,
2279,
1564,
12,
2890,
4672,
1607,
273,
2618,
1607,
9614,
6063,
11929,
273,
11,
11467,
11319,
11613,
87,
3113,
7280,
67,
13230,
67,
856,
11613,
87,
3113,
7280,
67,
8195,
67,
2039,
1... |
return ( n.restriction() and n.ref is not None ) | return isinstance(n, Restriction) | def match(self, n): return ( n.restriction() and n.ref is not None ) | 3bd224d531798fbc1160d414daf4161b24496bad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1242/3bd224d531798fbc1160d414daf4161b24496bad/sxbasic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
845,
12,
2890,
16,
290,
4672,
327,
1549,
12,
82,
16,
1124,
6192,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
845,
12,
2890,
16,
290,
4672,
327,
1549,
12,
82,
16,
1124,
6192,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
rendered = RenderedProperty() | rendered = None | def render_property(self, name, mode, context, props): """Renders a node property to HTML.""" candidates = [] for renderer in self.property_renderers: quality = renderer.match_property(name, mode) if quality > 0: candidates.append((quality, renderer)) if candidates: renderer = sorted(candidates, reverse=True)[0][1] rendered = renderer.render_property(name, mode, context, props) if rendered: if isinstance(rendered, RenderedProperty): value = rendered.content rendered = rendered else: value = rendered rendered = RenderedProperty() prop = {'name': name, 'value': value, 'rendered': rendered} return prop | b833cfb36b9ca3e94bad4d2639b6a0a051e2f593 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/b833cfb36b9ca3e94bad4d2639b6a0a051e2f593/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
4468,
12,
2890,
16,
508,
16,
1965,
16,
819,
16,
3458,
4672,
3536,
10900,
279,
756,
1272,
358,
3982,
12123,
7965,
273,
5378,
364,
5690,
316,
365,
18,
4468,
67,
5902,
414,
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,
1743,
67,
4468,
12,
2890,
16,
508,
16,
1965,
16,
819,
16,
3458,
4672,
3536,
10900,
279,
756,
1272,
358,
3982,
12123,
7965,
273,
5378,
364,
5690,
316,
365,
18,
4468,
67,
5902,
414,
30,
... |
return http.Response(stream=template('registration.html', **template_dict)) | return HTMLResponse(stream=template('registration.html', **template_dict)) | def errors_found(): for key, value in filled_in.iteritems(): template_dict[key] = value minus = 1 if 'email' in template_dict else 0 size = len(template_dict) - minus count = 0 boxes = [] if size == 1: return ('',) for i in template_dict: if '_' in i: count += 1 plural = True if count > 1 else False template_dict['error'] = 'Es ' if plural else 'E ' | 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,
1334,
67,
7015,
13332,
364,
498,
16,
460,
316,
6300,
67,
267,
18,
2165,
3319,
13332,
1542,
67,
1576,
63,
856,
65,
273,
460,
12647,
273,
404,
309,
296,
3652,
11,
316,
1542,
67,
1576,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1334,
67,
7015,
13332,
364,
498,
16,
460,
316,
6300,
67,
267,
18,
2165,
3319,
13332,
1542,
67,
1576,
63,
856,
65,
273,
460,
12647,
273,
404,
309,
296,
3652,
11,
316,
1542,
67,
1576,
... |
'WHERE value = \'\' OR value IS NULL ' \ | 'WHERE (value = \'\' OR value IS NULL) ' \ | def _update_translation(self, cursor, user, data, context): translation_obj = self.pool.get('ir.translation') cursor.execute('SELECT name, res_id, type, src, module ' \ 'FROM ir_translation ' \ 'WHERE lang=\'en_US\' ' \ 'AND type in (\'odt\', \'view\', \'wizard_button\', ' \ ' \'selection\', \'error\') ' \ 'EXCEPT SELECT name, res_id, type, src, module ' \ 'FROM ir_translation ' \ 'WHERE lang=%s ' \ 'AND type in (\'odt\', \'view\', \'wizard_button\', ' \ ' \'selection\', \'error\')', (data['form']['lang'],)) for row in cursor.dictfetchall(): translation_obj.create(cursor, user, { 'name': row['name'], 'res_id': row['res_id'], 'lang': data['form']['lang'], 'type': row['type'], 'src': row['src'], 'module': row['module'], }) cursor.execute('SELECT name, res_id, type, module ' \ 'FROM ir_translation ' \ 'WHERE lang=\'en_US\' ' \ 'AND type in (\'field\', \'model\', \'help\') ' \ 'EXCEPT SELECT name, res_id, type, module ' \ 'FROM ir_translation ' \ 'WHERE lang=%s ' \ 'AND type in (\'field\', \'model\', \'help\')', (data['form']['lang'],)) for row in cursor.dictfetchall(): translation_obj.create(cursor, user, { 'name': row['name'], 'res_id': row['res_id'], 'lang': data['form']['lang'], 'type': row['type'], 'module': row['module'], }) cursor.execute('SELECT name, res_id, type, src ' \ 'FROM ir_translation ' \ 'WHERE lang=\'en_US\' ' \ 'AND type in (\'field\', \'model\', \'selection\', ' \ '\'help\') ' \ 'EXCEPT SELECT name, res_id, type, src ' \ 'FROM ir_translation ' \ 'WHERE lang=%s ' \ 'AND type in (\'field\', \'model\', \'selection\', ' \ '\'help\')', (data['form']['lang'],)) for row in cursor.dictfetchall(): cursor.execute('UPDATE ir_translation ' \ 'SET fuzzy = True, ' \ 'src = %s ' \ 'WHERE name = %s ' \ 'AND res_id = %s ' \ 'AND type = %s ' \ 'AND lang = %s', (row['src'], row['name'], row['res_id'], row['type'], data['form']['lang'])) | 1096f6c7137b090bf88a23e18bc59c31d1622aeb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/1096f6c7137b090bf88a23e18bc59c31d1622aeb/translation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
67,
10173,
12,
2890,
16,
3347,
16,
729,
16,
501,
16,
819,
4672,
4794,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
10173,
6134,
3347,
18,
8837,
2668,
4803,
508,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10173,
12,
2890,
16,
3347,
16,
729,
16,
501,
16,
819,
4672,
4794,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
10173,
6134,
3347,
18,
8837,
2668,
4803,
508,
1... |
self.main_window.set_title(self.main_window_title % (self.experiment_script_textview.associated_filename, self.data_handling_textview.associated_filename)) | self.main_window.set_title(self.main_window_title % (os.path.basename(self.experiment_script_textview.associated_filename), os.path.basename(self.data_handling_textview.associated_filename))) | self.data_handling_textbuffer.set_text("""def data_handling(outer_space): | 0ff2c62561cde1d11d985ac0ae59be673a981cd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2646/0ff2c62561cde1d11d985ac0ae59be673a981cd8/DamarisGUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
365,
18,
892,
67,
26822,
67,
955,
4106,
18,
542,
67,
955,
2932,
3660,
536,
501,
67,
26822,
12,
14068,
67,
2981,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
365,
18,
892,
67,
26822,
67,
955,
4106,
18,
542,
67,
955,
2932,
3660,
536,
501,
67,
26822,
12,
14068,
67,
2981,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
installed_modules = map(lambda m: m['name'], modobj.browse(cr, uid, installed_modids, ['name'])) | installed_modules = map(lambda m: m['name'], modobj.read(cr, uid, installed_modids, ['name'])) | def get_module_from_path(path): relative_addons_path = tools.config['addons_path'][len(tools.config['root_path'])+1:] if path.startswith(relative_addons_path) and (os.path.dirname(path) != relative_addons_path): path = path[len(relative_addons_path)+1:] return path.split(os.path.sep)[0] return 'base' # files that are not in a module are considered as being in 'base' module | 7c201f3220b08d7759d6789f1f5a160652d337c7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/7c201f3220b08d7759d6789f1f5a160652d337c7/translate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2978,
67,
2080,
67,
803,
12,
803,
4672,
3632,
67,
1289,
7008,
67,
803,
273,
8513,
18,
1425,
3292,
1289,
7008,
67,
803,
3546,
63,
1897,
12,
6642,
18,
1425,
3292,
3085,
67,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2978,
67,
2080,
67,
803,
12,
803,
4672,
3632,
67,
1289,
7008,
67,
803,
273,
8513,
18,
1425,
3292,
1289,
7008,
67,
803,
3546,
63,
1897,
12,
6642,
18,
1425,
3292,
3085,
67,
80... |
return [page for page in p.getReferences(follow_redirects = False)] | return [page for page in p.getReferences(follow_redirects = False, onlyTemplateInclusion=True)] | def BACK(site,name): name = site.namespace(10) + ':' + name p=wikipedia.Page(site, name) return [page for page in p.getReferences(follow_redirects = False)] | 7696652d8fe28dea8c886308578a3771b6c7cfe9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/7696652d8fe28dea8c886308578a3771b6c7cfe9/featured.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15842,
12,
4256,
16,
529,
4672,
508,
273,
2834,
18,
4937,
12,
2163,
13,
397,
3921,
397,
508,
293,
33,
11999,
13744,
18,
1964,
12,
4256,
16,
508,
13,
327,
306,
2433,
364,
1363,
316,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15842,
12,
4256,
16,
529,
4672,
508,
273,
2834,
18,
4937,
12,
2163,
13,
397,
3921,
397,
508,
293,
33,
11999,
13744,
18,
1964,
12,
4256,
16,
508,
13,
327,
306,
2433,
364,
1363,
316,
2... |
if (hasattr(self.u_initial, "__len__")): self.anisotropic = 1 self.n = 7 | self.anisotropic = hasattr(self.u_initial, "__len__") self.k_min = 1 self.u_scale = unit_cell.getLongestVector2() if (self.anisotropic): self.u_min = [u * self.u_scale for u in self.u_initial] | def __init__(self, miller_indices, multiplicities, data_reference, data_scaled, k_initial, u_initial): python_utils.adopt_init_args(self, locals()) if (hasattr(self.u_initial, "__len__")): self.anisotropic = 1 self.n = 7 else: self.n = 2 self.x = self.pack(self.k_initial, self.u_initial) self.minimizer = run_lbfgs(self) self() del self.x | 8c8243d82303277f8a4c13c510ef163b4bbb65c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/8c8243d82303277f8a4c13c510ef163b4bbb65c6/tst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
312,
24462,
67,
6836,
16,
3309,
1780,
1961,
16,
501,
67,
6180,
16,
501,
67,
20665,
16,
417,
67,
6769,
16,
582,
67,
6769,
4672,
5790,
67,
5471,
18,
361,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
312,
24462,
67,
6836,
16,
3309,
1780,
1961,
16,
501,
67,
6180,
16,
501,
67,
20665,
16,
417,
67,
6769,
16,
582,
67,
6769,
4672,
5790,
67,
5471,
18,
361,... |
self.selected.append(pkg) | selected.append(pkg) | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1400,
67,
10308,
12,
2890,
16,
5907,
16,
7380,
33,
8381,
4672,
3536,
2360,
603,
326,
666,
434,
4209,
471,
2230,
2182,
1245,
17,
1637,
17,
476,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
1400,
67,
10308,
12,
2890,
16,
5907,
16,
7380,
33,
8381,
4672,
3536,
2360,
603,
326,
666,
434,
4209,
471,
2230,
2182,
1245,
17,
1637,
17,
476,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.log.error("Failed to load wiki macro %s (%s)" % (f, e), e) | self.log.error('Failed to load wiki macro %s (%s)' % (f, e)) | def get_macros(self): path = os.path.join(self.env.path, 'wiki-macros') if not os.path.exists(path): return for file in [f for f in os.listdir(path) if f.lower().endswith('.py') and not f.startswith('__')]: try: module = self._load_macro(file[:-3]) yield module.__name__ except Exception, e: self.log.error("Failed to load wiki macro %s (%s)" % (f, e), e) | f1f2fd0c2c9bc1c365df36c394339c92adbef0ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f1f2fd0c2c9bc1c365df36c394339c92adbef0ef/macros.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5821,
6973,
12,
2890,
4672,
589,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3074,
18,
803,
16,
296,
13044,
17,
5821,
6973,
6134,
309,
486,
1140,
18,
803,
18,
1808,
12,
803,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5821,
6973,
12,
2890,
4672,
589,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3074,
18,
803,
16,
296,
13044,
17,
5821,
6973,
6134,
309,
486,
1140,
18,
803,
18,
1808,
12,
803,... |
return [(r['shortcut'], r['name']) for r in res] | return [(r['shortcut'], r['name']) for r in res] + [('','')] | def _partner_title_get(self, cr, uid, context={}): obj = self.pool.get('res.partner.title') ids = obj.search(cr, uid, [('domain', '=', 'partner')]) res = obj.read(cr, uid, ids, ['shortcut','name'], context) return [(r['shortcut'], r['name']) for r in res] | e0a39bb115f0bcbb6032efac792368bb8b7a5382 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/e0a39bb115f0bcbb6032efac792368bb8b7a5382/partner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
31993,
67,
2649,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
819,
12938,
4672,
1081,
273,
365,
18,
6011,
18,
588,
2668,
455,
18,
31993,
18,
2649,
6134,
3258,
273,
1081,
18,
3072,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31993,
67,
2649,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
819,
12938,
4672,
1081,
273,
365,
18,
6011,
18,
588,
2668,
455,
18,
31993,
18,
2649,
6134,
3258,
273,
1081,
18,
3072,
... |
queueHandler.queueFunction(queueHandler.eventQueue,speech.speakMessage,_("caps lock %s")%(_("on") if toggleState else _("off"))) | queueHandler.queueFunction(queueHandler.eventQueue,ui.message,_("caps lock %s")%(_("on") if toggleState else _("off"))) | def speakToggleKey(vkCode): toggleState=bool(not winUser.getKeyState(vkCode)&1) if vkCode==winUser.VK_CAPITAL: queueHandler.queueFunction(queueHandler.eventQueue,speech.speakMessage,_("caps lock %s")%(_("on") if toggleState else _("off"))) elif vkCode==winUser.VK_NUMLOCK: queueHandler.queueFunction(queueHandler.eventQueue,speech.speakMessage,_("num lock %s")%(_("on") if toggleState else _("off"))) elif vkCode==winUser.VK_SCROLL: queueHandler.queueFunction(queueHandler.eventQueue,speech.speakMessage,_("scroll lock %s")%(_("on") if toggleState else _("off"))) | 0dd62032c28661ff45eefdd1db195469f0f9e3d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/0dd62032c28661ff45eefdd1db195469f0f9e3d5/keyboardHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
10244,
17986,
653,
12,
90,
79,
1085,
4672,
10486,
1119,
33,
6430,
12,
902,
5657,
1299,
18,
588,
653,
1119,
12,
90,
79,
1085,
13,
10,
21,
13,
309,
331,
79,
1085,
631,
8082,
1299,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
10244,
17986,
653,
12,
90,
79,
1085,
4672,
10486,
1119,
33,
6430,
12,
902,
5657,
1299,
18,
588,
653,
1119,
12,
90,
79,
1085,
13,
10,
21,
13,
309,
331,
79,
1085,
631,
8082,
1299,... |
echo=self._should_log_info, | echo=self.echo, | def recreate(self): self.log("Pool recreating") return SingletonThreadPool(self._creator, pool_size=self.size, recycle=self._recycle, echo=self._should_log_info, use_threadlocal=self._use_threadlocal, listeners=self.listeners) | 56f64add8195f35961f67cf1baebda476dfb03ec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1074/56f64add8195f35961f67cf1baebda476dfb03ec/pool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23052,
12,
2890,
4672,
365,
18,
1330,
2932,
2864,
283,
23799,
7923,
327,
27802,
20621,
12,
2890,
6315,
20394,
16,
2845,
67,
1467,
33,
2890,
18,
1467,
16,
23493,
33,
2890,
6315,
266,
1394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23052,
12,
2890,
4672,
365,
18,
1330,
2932,
2864,
283,
23799,
7923,
327,
27802,
20621,
12,
2890,
6315,
20394,
16,
2845,
67,
1467,
33,
2890,
18,
1467,
16,
23493,
33,
2890,
6315,
266,
1394... |
def getMyProxyMaxLifeTime(self): | def getMyProxyMaxLifeTime( self ): | def getMyProxyMaxLifeTime(self): return gConfig.getValue( "/DIRAC/VOPolicy/MyProxyMaxDelegationTime", 168 ) * 3600 | 71763bc5d615265855ff68fdb1be8903192a3f1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/71763bc5d615265855ff68fdb1be8903192a3f1b/ProxyDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
93,
3886,
2747,
15315,
950,
12,
365,
262,
30,
327,
314,
809,
18,
24805,
12,
2206,
4537,
2226,
19,
16169,
2582,
19,
12062,
3886,
2747,
26945,
950,
3113,
2872,
28,
262,
380,
12396,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
93,
3886,
2747,
15315,
950,
12,
365,
262,
30,
327,
314,
809,
18,
24805,
12,
2206,
4537,
2226,
19,
16169,
2582,
19,
12062,
3886,
2747,
26945,
950,
3113,
2872,
28,
262,
380,
12396,
... |
def _find_bad_optimizations0(order, reasons, r_vals, allow_remove_inf=False): | def _find_bad_optimizations0(order, reasons, r_vals): | def _find_bad_optimizations0(order, reasons, r_vals, allow_remove_inf=False): """Use a simple algorithm to find broken optimizations. This algorithm is simple to understand, but sometimes when there's a problem it identifies the wrong optimization as the culprit. The problem stems from the fact that results are not evaluated in chronological order (looking at when they were introduced to the graph). """ # iterate over variables looking for values that don't match the values of the # variables they replaced. This is the sign of a broken optimization. for i, node in enumerate(order): for new_r in node.outputs: for reason, r, old_graph_str, new_graph_str in reasons[new_r]: problem = False #check if the value for new_r doesn't match the value for r new_r_val = r_vals[new_r] r_val = r_vals[r] assert r.type == new_r.type if not r.type.values_eq_approx(r_val, new_r_val, allow_remove_inf=allow_remove_inf): raise BadOptimization(old_r=r, new_r=new_r, old_r_val=r_val, new_r_val=new_r_val, reason=reason, old_graph=old_graph_str, new_graph=new_graph_str) | 1f5d36305742b929753110a7ecfbf0869ab4b895 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/1f5d36305742b929753110a7ecfbf0869ab4b895/debugmode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
67,
8759,
67,
16689,
7089,
20,
12,
1019,
16,
14000,
16,
436,
67,
4524,
4672,
3536,
3727,
279,
4143,
4886,
358,
1104,
12933,
5213,
7089,
18,
225,
1220,
4886,
353,
4143,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4720,
67,
8759,
67,
16689,
7089,
20,
12,
1019,
16,
14000,
16,
436,
67,
4524,
4672,
3536,
3727,
279,
4143,
4886,
358,
1104,
12933,
5213,
7089,
18,
225,
1220,
4886,
353,
4143,
358,
... |
def set_widget(self, widget): | def _set_widget_class(self, widget_class): print 'set widget class', widget_class self._widget_class = widget_class def _get_widget_class(self): return self._widget_class widget_class = property(_get_widget_class, _set_widget_class) def _set_widget(self, widget): | def set_widget(self, widget): print 'set widget', widget self.widget = widget | ad1c71bf607e937317a60b5f3f35945bb7fba5bd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1240/ad1c71bf607e937317a60b5f3f35945bb7fba5bd/card_type.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
6587,
67,
1106,
12,
2890,
16,
3604,
67,
1106,
4672,
1172,
296,
542,
3604,
667,
2187,
3604,
67,
1106,
365,
6315,
6587,
67,
1106,
273,
3604,
67,
1106,
225,
1652,
389,
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,
389,
542,
67,
6587,
67,
1106,
12,
2890,
16,
3604,
67,
1106,
4672,
1172,
296,
542,
3604,
667,
2187,
3604,
67,
1106,
365,
6315,
6587,
67,
1106,
273,
3604,
67,
1106,
225,
1652,
389,
588,
... |
command = ' '.join(command) | if command is not None: command = ' '.join(command) | def read_subprocess(): errno, data = pipe_to_subprocess.recv() if errno: command = ' '.join(command) raise CalledProcessError(errno, command) return data | a0e214fc44058b587ad45fa70571cd7634e0906f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/a0e214fc44058b587ad45fa70571cd7634e0906f/subprocess_.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
1717,
2567,
13332,
8402,
16,
501,
273,
6010,
67,
869,
67,
1717,
2567,
18,
18334,
1435,
309,
8402,
30,
309,
1296,
353,
486,
599,
30,
1296,
273,
296,
2418,
5701,
12,
3076,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
1717,
2567,
13332,
8402,
16,
501,
273,
6010,
67,
869,
67,
1717,
2567,
18,
18334,
1435,
309,
8402,
30,
309,
1296,
353,
486,
599,
30,
1296,
273,
296,
2418,
5701,
12,
3076,
13,
... |
taxep = self.pool.get('res.partner').browse(cr, uid, partner_id).property_account_tax | taxep = self.pool.get('res.partner').browse(cr, uid, partner_id).property_account_supplier_tax | def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, price_unit=False, address_invoice_id=False, context={}): if not partner_id: raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") ) if not product: if type in ('in_invoice', 'in_refund'): return {'domain':{'product_uom':[]}} else: return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}} lang=False context.update({'lang': lang}) res = self.pool.get('product.product').browse(cr, uid, product, context=context) taxep=None if partner_id: lang=self.pool.get('res.partner').read(cr, uid, [partner_id])[0]['lang'] tax_obj = self.pool.get('account.tax') if type in ('out_invoice', 'out_refund'): taxep = self.pool.get('res.partner').browse(cr, uid, partner_id).property_account_supplier_tax if not taxep or not taxep.id: tax_id = map(lambda x: x.id, res.taxes_id) else: tax_id = [taxep.id] for t in res.taxes_id: if not t.tax_group==taxep.tax_group: tax_id.append(t.id) else: taxep = self.pool.get('res.partner').browse(cr, uid, partner_id).property_account_tax if not taxep or not taxep.id: tax_id = map(lambda x: x.id, res.supplier_taxes_id) else: tax_id = [taxep.id] for t in res.supplier_taxes_id: if not t.tax_group==taxep.tax_group: tax_id.append(t.id) if type in ('in_invoice', 'in_refund'): result = self.product_id_change_unit_price_inv(cr, uid, tax_id, price_unit, qty, address_invoice_id, product, partner_id, context=context) else: result = {'price_unit': res.list_price, 'invoice_line_tax_id': tax_id} | 5ae5ba465fd5c300b3edc10371147cebc5e4f03a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/5ae5ba465fd5c300b3edc10371147cebc5e4f03a/invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
3017,
16,
582,
362,
16,
26667,
33,
20,
16,
508,
2218,
2187,
618,
2218,
659,
67,
16119,
2187,
19170,
67,
350,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
3017,
16,
582,
362,
16,
26667,
33,
20,
16,
508,
2218,
2187,
618,
2218,
659,
67,
16119,
2187,
19170,
67,
350,
33,
... |
self.settings["CXXFLAGS"]="-O2 -pipe" | def __init__(self,myspec): generic_ppc64.__init__(self,myspec) self.settings["CFLAGS"]="-O2 -pipe" self.settings["CXXFLAGS"]="-O2 -pipe" self.settings["CHOST"]="powerpc64-unknown-linux-gnu" | 33d0469d15bda8bd926fe2c740e2f64d67745961 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7327/33d0469d15bda8bd926fe2c740e2f64d67745961/ppc64.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
81,
1900,
705,
4672,
5210,
67,
84,
2436,
1105,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
8955,
6552,
55,
11929,
1546,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
81,
1900,
705,
4672,
5210,
67,
84,
2436,
1105,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
8955,
6552,
55,
11929,
1546,
17,
... | |
def __init__(self,scene): | def __init__(self, scene): | def __init__(self,scene): """ Initialisation of the Camera object | 9eafeed6682cc7693274ff2418342722b828961f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/9eafeed6682cc7693274ff2418342722b828961f/camera.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9065,
4672,
3536,
10188,
10742,
434,
326,
30355,
733,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9065,
4672,
3536,
10188,
10742,
434,
326,
30355,
733,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
raise xml.dom.WrongDocumentErr("doctype object owned by another DOM tree") | raise xml.dom.WrongDocumentErr( "doctype object owned by another DOM tree") | def createDocument(self, namespaceURI, qualifiedName, doctype): if doctype and doctype.parentNode is not None: raise xml.dom.WrongDocumentErr("doctype object owned by another DOM tree") doc = Document() if doctype is None: doctype = self.createDocumentType(qualifiedName, None, None) if qualifiedName: prefix, localname = _nssplit(qualifiedName) if prefix == "xml" \ and namespaceURI != "http://www.w3.org/XML/1998/namespace": raise xml.dom.NamespaceErr("illegal use of 'xml' prefix") if prefix and not namespaceURI: raise xml.dom.NamespaceErr("illegal use of prefix without namespaces") doctype.parentNode = doc doc.doctype = doctype doc.implementation = self return doc | 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,
27569,
12,
2890,
16,
19421,
16,
24133,
16,
24909,
4672,
309,
24909,
471,
24909,
18,
2938,
907,
353,
486,
599,
30,
1002,
2025,
18,
9859,
18,
13634,
2519,
2524,
12,
315,
2896,
12387,
733,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27569,
12,
2890,
16,
19421,
16,
24133,
16,
24909,
4672,
309,
24909,
471,
24909,
18,
2938,
907,
353,
486,
599,
30,
1002,
2025,
18,
9859,
18,
13634,
2519,
2524,
12,
315,
2896,
12387,
733,
... |
:rtype: dvector | :rtype: tensor of rank one-less-than `coding_dist` | def categorical_crossentropy(coding_dist, true_dist, axis=1): """ WARNING: THIS FUNCTION IS UNNECESSARILY POLYMORPHIC. We ultimately don't want the polymorphism, and will move this function to pylearn.algorithms.cost. The 1hot version will be removed. The length of the documentation here is a form of code smell. Return the cross-entropy between an approximating distribution and a true distribution The cross entropy between two probability distributions measures the average number of bits needed to identify an event from a set of possibilities, if a coding scheme is used based on a given probability distribution q, rather than the "true" distribution p. Mathematically it is defined as follows: .. math:: H(p,q) = - \sum_x p(x) \log(q(x)) :type coding_dist: a dense matrix. :param coding_dist: Each slice along axis represents one distribution. :type true_dist: a dense matrix or sparse matrix or integer vector. :param coding_dist: In the case of a matrix argument, each slice along axis represents one distribution. In the case of an integer vector argument, each element represents the position of the '1' in a 1-of-N encoding. :type axis: int :param axis: the dimension over which each distribution runs. (1 for row distributions, 0 for column distributions) :rtype: dvector :returns: the cross entropy between each coding and true distribution. """ assert true_dist.ndim in (1,2) if true_dist.ndim == 2: return -theano.sum(true_dist * log(coding_dist), axis=axis) else: if axis == 0: retval = coding_dist.T else: retval = coding_dist, return categorical_crossentropy_1hot( #backport #coding_dist.T if axis == 0 else coding_dist, retval, true_dist) | 122f8d1e7d274d98c7a2b2785333a0820fc95cef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/122f8d1e7d274d98c7a2b2785333a0820fc95cef/nnet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22237,
67,
14653,
21937,
12,
2014,
67,
4413,
16,
638,
67,
4413,
16,
2654,
33,
21,
4672,
3536,
9744,
30,
20676,
13690,
4437,
5019,
5407,
5119,
985,
25554,
19383,
61,
49,
916,
8939,
2871,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22237,
67,
14653,
21937,
12,
2014,
67,
4413,
16,
638,
67,
4413,
16,
2654,
33,
21,
4672,
3536,
9744,
30,
20676,
13690,
4437,
5019,
5407,
5119,
985,
25554,
19383,
61,
49,
916,
8939,
2871,
... |
s = datafield.getAttributeNS(None,"tag") | s = datafield.getAttributeNS(None,"tag").encode("utf-8") | def create_record_4suite(xmltext,verbose=verbose,correct=correct): """ creates a record object and returns it uses 4Suite domlette """ record = {} global err if correct: xmlt = xmltext (rec,e) = wash(xmlt,1) err.extend(e) return (rec,e) dom = NonvalidatingReader.parseString(xmltext,"urn:dummy") root = dom.childNodes[0] ord=1 for controlfield in get_childs_by_tag_name(root,"controlfield"): s = controlfield.getAttributeNS(None,"tag") text_nodes = controlfield.childNodes v = u''.join([ n.data for n in text_nodes ]).encode("utf-8") name = type(v).__name__ if (name in ["int","long"]) : field = ([],"","",str(v),ord) # field = (subfields, ind1, ind2,value) elif name in ['str','unicode']: field = ([],"","",v,ord) else: if verbose: err.append((7,'Type found: ' + name)) field = ([],"","","",ord)# the type of value is not correct. (user insert something like a list...) if record.has_key(s): record[s].append(field) else: record[s]=[field] ord=ord+1 for datafield in get_childs_by_tag_name(root,"datafield"): subfields = [] for subfield in get_childs_by_tag_name(datafield,"subfield"): text_nodes = subfield.childNodes v = u''.join([ n.data for n in text_nodes ]).encode("utf-8") code = subfield.getAttributeNS(None,'code').encode("utf-8") if code != '': subfields.append((code,v)) else: subfields.append(('!',v)) s = datafield.getAttributeNS(None,"tag") if s == '': s = '!' ind1 = datafield.getAttributeNS(None,"ind1").encode("utf-8") ind2 = datafield.getAttributeNS(None,"ind2").encode("utf-8") if record.has_key(s): record[s].append((subfields,ind1,ind2,"",ord)) else: record[s]=[(subfields,ind1,ind2,"",ord)] ord=ord+1 return (record,err) | b81818840ac3c029e4d480b85a015d53d6fad191 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/b81818840ac3c029e4d480b85a015d53d6fad191/bibrecord.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3366,
67,
24,
30676,
12,
2902,
955,
16,
11369,
33,
11369,
16,
6746,
33,
6746,
4672,
3536,
3414,
279,
1409,
733,
471,
1135,
518,
4692,
1059,
13587,
4092,
1810,
736,
3536,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3366,
67,
24,
30676,
12,
2902,
955,
16,
11369,
33,
11369,
16,
6746,
33,
6746,
4672,
3536,
3414,
279,
1409,
733,
471,
1135,
518,
4692,
1059,
13587,
4092,
1810,
736,
3536,
225,
... |
def test_stop_all_backends (self): | def test_stop_all_backends(self): | def test_stop_all_backends (self): ### TODO pass | 6f2ec4fdcdd8a62e199dbf17ca2eced9200c0b82 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/6f2ec4fdcdd8a62e199dbf17ca2eced9200c0b82/test_router.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5681,
67,
454,
67,
823,
5839,
12,
2890,
4672,
11849,
2660,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
5681,
67,
454,
67,
823,
5839,
12,
2890,
4672,
11849,
2660,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
set_trace_cond(cond, marker) | self.set_trace_cond(marker, cond) | def do_trace_cond(self, args): args = args.split(' ', 1) if len(args) not in (1, 2): print "trace_cond <cond> [marker]" if len(args) == 1: cond = args[0] marker = 'default' else: marker, cond = args if cond == 'None': cond = None set_trace_cond(cond, marker) return try: cond = int(cond) set_trace_cond(cond, marker) return except ValueError: locals = self.curframe.f_locals globals = self.curframe.f_globals try: cond = eval(cond + '\n', globals, locals) # test to be sure that what we code is a # function that can take one arg and return a bool rv = (type(cond) == bool) or bool(cond(1)) set_trace_cond(cond, marker) except: t, v = sys.exc_info()[:2] if type(t) == type(''): exc_type_name = t else: exc_type_name = t.__name__ print '***', exc_type_name + ':', v | 8409cafdd9e765520a2898ebeba6f505ffdd8d71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/8409cafdd9e765520a2898ebeba6f505ffdd8d71/epdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5129,
67,
10013,
12,
2890,
16,
833,
4672,
833,
273,
833,
18,
4939,
2668,
2265,
404,
13,
309,
562,
12,
1968,
13,
486,
316,
261,
21,
16,
576,
4672,
1172,
315,
5129,
67,
10013,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5129,
67,
10013,
12,
2890,
16,
833,
4672,
833,
273,
833,
18,
4939,
2668,
2265,
404,
13,
309,
562,
12,
1968,
13,
486,
316,
261,
21,
16,
576,
4672,
1172,
315,
5129,
67,
10013,... |
self.api.db.do("INSERT INTO slice_person (person_id, slice_id)" \ " VALUES(%(person_id)d, %(slice_id)d)", locals()) if commit: self.api.db.commit() if 'person_ids' in self and person_id not in self['person_ids']: | if person_id not in self['person_ids']: assert slice_id not in person['slice_ids'] self.api.db.do("INSERT INTO slice_person (person_id, slice_id)" \ " VALUES(%(person_id)d, %(slice_id)d)", locals()) if commit: self.api.db.commit() | def add_person(self, person, commit = True): """ Add person to existing slice. """ | 25d0df2c73067b69bda924b8ddd0514d7fed5a51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/25d0df2c73067b69bda924b8ddd0514d7fed5a51/Slices.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
12479,
12,
2890,
16,
6175,
16,
3294,
273,
1053,
4672,
3536,
1436,
6175,
358,
2062,
2788,
18,
3536,
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,
527,
67,
12479,
12,
2890,
16,
6175,
16,
3294,
273,
1053,
4672,
3536,
1436,
6175,
358,
2062,
2788,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
raise | raise | def __init__(self): super(MainWidget, self).__init__() | 57317cea639e15369c609b58c81154f042261da5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11141/57317cea639e15369c609b58c81154f042261da5/mainwidget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2240,
12,
6376,
4609,
16,
365,
2934,
972,
2738,
972,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2240,
12,
6376,
4609,
16,
365,
2934,
972,
2738,
972,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
parentnames = list(Set([klass.strip() for klass in parentnames])) return baseclass, baseschema, parentnames | dedupedParentNames = [] for parent in parentnames: if not parent in dedupedParentNames: dedupedParentNames.append(parent) return baseclass, baseschema, dedupedParentNames | def getArchetypesBase(self, element, parentnames, parent_is_archetype): """ find bases (baseclass and baseschema) and return a 3-tuple (baseclass, baseschema, parentnames) | e80b92cd515649dfcf956ac1a39ca9f1d2bedfa7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11941/e80b92cd515649dfcf956ac1a39ca9f1d2bedfa7/ArchetypesGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12269,
15180,
2171,
12,
2890,
16,
930,
16,
982,
1973,
16,
982,
67,
291,
67,
991,
5872,
4672,
3536,
1104,
8337,
261,
1969,
1106,
471,
8337,
1243,
13,
471,
327,
279,
890,
17,
8052,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12269,
15180,
2171,
12,
2890,
16,
930,
16,
982,
1973,
16,
982,
67,
291,
67,
991,
5872,
4672,
3536,
1104,
8337,
261,
1969,
1106,
471,
8337,
1243,
13,
471,
327,
279,
890,
17,
8052,
... |
Search \Sage library source code for function names containing \code{name}. | Search Sage library source code for function names containing ``name`` | def search_def(name, extra1='', extra2='', extra3='', extra4='', interact=True): r""" Search \Sage library source code for function names containing \code{name}. The search is not case sensitive. INPUT: -- name: a string to find in the names of functions in the \Sage source code. -- extra1, ..., extra4: see search_src. EXAMPLES: sage: print search_def("fetch", interact=False) # random # long matrix/matrix0.pyx: cdef fetch(self, key): matrix/matrix0.pxd: cdef fetch(self, key) sage: print search_def("fetch", "pyx", interact=False) # random # long matrix/matrix0.pyx: cdef fetch(self, key): """ return search_src(name, extra1='def ', extra2=extra1, extra3=extra2, extra4=extra3, extra5=extra4, interact=interact) | dcebe748f1ef8b1b2487c34467d71b3d3e2fcf7d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/dcebe748f1ef8b1b2487c34467d71b3d3e2fcf7d/sagedoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
536,
12,
529,
16,
2870,
21,
2218,
2187,
2870,
22,
2218,
2187,
2870,
23,
2218,
2187,
2870,
24,
2218,
2187,
16592,
33,
5510,
4672,
436,
8395,
5167,
348,
410,
5313,
1084,
981,
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,
1623,
67,
536,
12,
529,
16,
2870,
21,
2218,
2187,
2870,
22,
2218,
2187,
2870,
23,
2218,
2187,
2870,
24,
2218,
2187,
16592,
33,
5510,
4672,
436,
8395,
5167,
348,
410,
5313,
1084,
981,
3... |
self.tk.call(self._w, 'dragsite', 'set', index) | self.tk.call(self._w, 'dragsite', 'set', index) | def dragsite_set(self, index): | b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5081,
1341,
1137,
67,
542,
12,
2890,
16,
770,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5081,
1341,
1137,
67,
542,
12,
2890,
16,
770,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if fnmatch.fnmatch(f, "*"+render_extension): | if fnmatch.fnmatch(f, renderhtml_mask): if f in ["povpos.pov", "povpre.pov"]: continue | def renderhtml(self): import eagle3d_templates | 79c7433b58ea05327b764b37408ff4a7f0c60ad3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13644/79c7433b58ea05327b764b37408ff4a7f0c60ad3/eagle3d.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
2620,
12,
2890,
4672,
1930,
425,
346,
298,
23,
72,
67,
8502,
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,
1743,
2620,
12,
2890,
4672,
1930,
425,
346,
298,
23,
72,
67,
8502,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
val.update(getattr(self, 'on_change_' + field)(cursor, user, [], args, context=context)) | val.update(getattr(self, 'on_change_' + field)(cursor, user, args, context=context)) | def _default_on_change(self, cursor, user, value, context=None): """ Call on_change function for the default value and return new default value | ec8907e04d1c4fcec6615ca3cad9a3d15cf8de6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/ec8907e04d1c4fcec6615ca3cad9a3d15cf8de6f/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1886,
67,
265,
67,
3427,
12,
2890,
16,
3347,
16,
729,
16,
460,
16,
819,
33,
7036,
4672,
3536,
3049,
603,
67,
3427,
445,
364,
326,
805,
460,
471,
327,
394,
805,
460,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1886,
67,
265,
67,
3427,
12,
2890,
16,
3347,
16,
729,
16,
460,
16,
819,
33,
7036,
4672,
3536,
3049,
603,
67,
3427,
445,
364,
326,
805,
460,
471,
327,
394,
805,
460,
2,
-100,
-... |
for directory,dirDict in res['Value']['Successful'].items(): | for directory, dirDict in res['Value']['Successful'].items(): | def getDirectorySize(self,path): """ Get the size of the directory on the storage """ res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value'] | 70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19831,
1225,
12,
2890,
16,
803,
4672,
3536,
968,
326,
963,
434,
326,
1867,
603,
326,
2502,
3536,
400,
273,
365,
18,
1893,
1379,
1630,
12,
803,
13,
309,
486,
400,
3292,
3141,
3546,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19831,
1225,
12,
2890,
16,
803,
4672,
3536,
968,
326,
963,
434,
326,
1867,
603,
326,
2502,
3536,
400,
273,
365,
18,
1893,
1379,
1630,
12,
803,
13,
309,
486,
400,
3292,
3141,
3546,
30,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.