rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
subtree = self.children[prefix] subtree._unindex_term(suffix, doc_number) | if prefix in self.children: subtree = self.children[prefix] subtree._unindex_term(suffix, doc_number) | def _unindex_term(self, word, doc_number): if word: prefix, suffix = word[0], word[1:] subtree = self.children[prefix] subtree._unindex_term(suffix, doc_number) else: del self.documents[doc_number] # Update resource tree_rsrc = self.root.tree_handler.resource docs = self.root.docs_handler docs_rsrc = docs.resource # Search the document slot tree_slot = 16 + self.slot * 16 docs_slot_r = tree_rsrc[tree_slot+4:tree_slot+8] docs_slot_n = IO.decode_link(docs_slot_r) # Free slot prev_slot_n = prev_slot = None while docs_slot_n is not None: docs_slot = 12 + docs_slot_n * 12 x = IO.decode_uint32(docs_rsrc[docs_slot:docs_slot+4]) next_slot_r = docs_rsrc[docs_slot+8:docs_slot+12] next_slot_n = IO.decode_link(next_slot_r) if x == doc_number: # Remove from the documents list if prev_slot_n is None: tree_rsrc[tree_slot+4:tree_slot+8] = next_slot_r else: docs_rsrc[prev_slot+8:prev_slot+12] = next_slot_r # Add to the free list old_first_r = docs_rsrc[8:12] docs_rsrc[docs_slot+8:docs_slot+12] = old_first_r docs_rsrc[8:12] = IO.encode_link(docs_slot_n) # Update on memory docs.first_empty = docs_slot_n # Done break # Next prev_slot_n, prev_slot = docs_slot_n, docs_slot docs_slot_n = next_slot_n else: raise ValueError, 'The database is corrupted!!' | 0f25159ac78f6533e983857dd8eb3f011e7ae412 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/0f25159ac78f6533e983857dd8eb3f011e7ae412/IIndex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
318,
1615,
67,
6408,
12,
2890,
16,
2076,
16,
997,
67,
2696,
4672,
309,
2076,
30,
1633,
16,
3758,
273,
2076,
63,
20,
6487,
2076,
63,
21,
26894,
309,
1633,
316,
365,
18,
5906,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
318,
1615,
67,
6408,
12,
2890,
16,
2076,
16,
997,
67,
2696,
4672,
309,
2076,
30,
1633,
16,
3758,
273,
2076,
63,
20,
6487,
2076,
63,
21,
26894,
309,
1633,
316,
365,
18,
5906,
30,... |
return self.name.lower() == other.name.lower() | return str(self.name).lower() == str(other.name).lower() | def __eq__(self, other): if isinstance(other, SimpleRecord): return self.name.lower() == other.name.lower() return 0 | 8c5744280915832cf4f388aaad8f3e6e46f23b1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8c5744280915832cf4f388aaad8f3e6e46f23b1f/dns.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
4477,
2115,
4672,
327,
609,
12,
2890,
18,
529,
2934,
8167,
1435,
422,
609,
12,
3011,
18,
529,
2934,
8167,
1435,
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,
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,
11253,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
4477,
2115,
4672,
327,
609,
12,
2890,
18,
529,
2934,
8167,
1435,
422,
609,
12,
3011,
18,
529,
2934,
8167,
1435,
327... |
config.positioner.storage = configElement_nonSave("storage", configSelection, 0, ("1", "2", "3")) | storepos = [] for x in range(255): storepos.append(str(x)) config.positioner.storage = configElement_nonSave("storage", configSelection, 0, storepos) | def createConfig(self): config.positioner = ConfigSubsection() config.positioner.tune = configElement_nonSave("tune", configNothing, 0, None) config.positioner.move = configElement_nonSave("move", configNothing, 0, None) config.positioner.limits = configElement_nonSave("limits", configNothing, 0, None) config.positioner.storage = configElement_nonSave("storage", configSelection, 0, ("1", "2", "3")) | 96c90246cf97606521e7ceca8fcb7e6fe70703fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/96c90246cf97606521e7ceca8fcb7e6fe70703fc/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
809,
12,
2890,
4672,
642,
18,
3276,
264,
273,
1903,
1676,
3464,
1435,
642,
18,
3276,
264,
18,
88,
7556,
273,
642,
1046,
67,
5836,
4755,
2932,
88,
7556,
3113,
642,
23814,
16,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
809,
12,
2890,
4672,
642,
18,
3276,
264,
273,
1903,
1676,
3464,
1435,
642,
18,
3276,
264,
18,
88,
7556,
273,
642,
1046,
67,
5836,
4755,
2932,
88,
7556,
3113,
642,
23814,
16,
374,
... |
'bd6566af7b3bfa28f917aa545bf4174661817d79' : 'http://www.asturlinux.org/~jsmanrique/foaf.rdf' | 'bd6566af7b3bfa28f917aa545bf4174661817d79' : 'http://www.asturlinux.org/~jsmanrique/foaf.rdf', '97d9756f1281858d0e9e4489003073e4986546ce' : 'http://xtrasgu.asturlinux.org/descargas/foaf.rdf' | def getFoaf(self, mail): """ Services to obtain FOAF URI from an email address @param mail: an email address @type mail: string @return: the FOAF URI of this email owner @rtype: string @todo customize foaf service """ mail_sha1sum = self.getShaMail(mail) # TODO: customize this with a real service # # ideas: - PyGoogle <http://pygoogle.sourceforge.net/> # import google # google.LICENSE_KEY = '...' # data = google.doGoogleSearch('119222cf3a2893a375cc4f884a0138155c771415 filetype:rdf') # # - Swoogle <http://swoogle.umbc.edu/> foafs = { '119222cf3a2893a375cc4f884a0138155c771415' : 'http://www.wikier.org/foaf.rdf', '98a99390f2fe9395041bddc41e933f50e59a5ecb' : 'http://www.asturlinux.org/~berrueta/foaf.rdf', '8114083efd55b6d18cae51f1591dd9906080ae89' : 'http://di002.edv.uniovi.es/~labra/labraFoaf.rdf', '84d076726727b596b08198e26ef37e4817353e97' : 'http://frade.no-ip.info:2080/~ivan/foaf.rdf', 'bd6566af7b3bfa28f917aa545bf4174661817d79' : 'http://www.asturlinux.org/~jsmanrique/foaf.rdf' } if (mail_sha1sum in foafs): return foafs[mail_sha1sum] else: return None | e54260464af1a4b46d84b68f728a1e4b88d7b4ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2232/e54260464af1a4b46d84b68f728a1e4b88d7b4ef/services.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2812,
83,
1727,
12,
2890,
16,
4791,
4672,
3536,
12826,
358,
7161,
17634,
6799,
3699,
628,
392,
2699,
1758,
225,
632,
891,
4791,
30,
392,
2699,
1758,
632,
723,
4791,
30,
533,
632,
2463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2812,
83,
1727,
12,
2890,
16,
4791,
4672,
3536,
12826,
358,
7161,
17634,
6799,
3699,
628,
392,
2699,
1758,
225,
632,
891,
4791,
30,
392,
2699,
1758,
632,
723,
4791,
30,
533,
632,
2463,
... |
self.center = 0 self.bond_width = -abs( self.bond_width) | return (-1, 0) | def get_circles_for_side( side): res = 0 side1, side2 = side while len( side1): a1 = side1.pop(0) for a2 in side2: atoms = copy.copy( self.molecule.atoms_map) atoms.remove( self.atom1) atoms.remove( self.atom2) if accessible( a1, a2, atoms): res += 1 return res | 63aa8de15cad833fb626b0c351076ad00b5150de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4298/63aa8de15cad833fb626b0c351076ad00b5150de/classes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
11614,
9558,
67,
1884,
67,
5564,
12,
4889,
4672,
400,
273,
374,
4889,
21,
16,
4889,
22,
273,
4889,
1323,
562,
12,
4889,
21,
4672,
279,
21,
273,
4889,
21,
18,
5120,
12,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11614,
9558,
67,
1884,
67,
5564,
12,
4889,
4672,
400,
273,
374,
4889,
21,
16,
4889,
22,
273,
4889,
1323,
562,
12,
4889,
21,
4672,
279,
21,
273,
4889,
21,
18,
5120,
12,
20,
... |
extend -- bool (default: True); if True, return a square root in an extension ring, if necessary. Otherwise, raise a ValueError if the square is not in the base ring. | extend -- bool (default: True); this is a place holder, and is always ignored or passed to the sqrt function for x, since in the symbolic ring everything has a square root. | def __call__(self, x, *args, **kwds): """ INPUT: x -- a number prec -- integer (default: None): if None, returns an exact square root; otherwise returns a numerical square root if necessary, to the given bits of precision. extend -- bool (default: True); if True, return a square root in an extension ring, if necessary. Otherwise, raise a ValueError if the square is not in the base ring. all -- bool (default: False); if True, return all square roots of self, instead of just one. """ if isinstance(x, float): return math.sqrt(x) try: return x.sqrt(*args, **kwds) except AttributeError: pass return self._do_sqrt(x, *args, **kwds) | 69afd4144711eb5a412d07852ac91cbafa95d845 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/69afd4144711eb5a412d07852ac91cbafa95d845/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
380,
1968,
16,
2826,
25577,
4672,
3536,
12943,
30,
619,
1493,
279,
1300,
13382,
1493,
3571,
261,
1886,
30,
599,
4672,
309,
599,
16,
1135,
392,
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,
1001,
1991,
972,
12,
2890,
16,
619,
16,
380,
1968,
16,
2826,
25577,
4672,
3536,
12943,
30,
619,
1493,
279,
1300,
13382,
1493,
3571,
261,
1886,
30,
599,
4672,
309,
599,
16,
1135,
392,
5... |
print 'realizando calculo venta:' | def compute_venta(self, cr, uid, ids, scl_obj, q_mov,tot,prom,q_des): subtot = 0.0 print 'q mov: ',q_mov print 'qda antes: ',q_des print 'subtotal antes: ',subtot print 'total antes: ',tot print 'avg antes: ',prom q_des-=q_mov print 'realizando calculo venta:' subtot = prom*q_mov tot -= subtot | 62ca858ba796453e95db5d16001d237fb203c2e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7359/62ca858ba796453e95db5d16001d237fb203c2e9/stock_card.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
67,
616,
69,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
31648,
67,
2603,
16,
1043,
67,
81,
1527,
16,
3307,
16,
17401,
16,
85,
67,
5489,
4672,
720,
3307,
273,
374,
18,
20,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
67,
616,
69,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
31648,
67,
2603,
16,
1043,
67,
81,
1527,
16,
3307,
16,
17401,
16,
85,
67,
5489,
4672,
720,
3307,
273,
374,
18,
20,
11... | |
res = reg.match(name[::-1]).groups() return [ r[::-1] for r in res[::-1]] | res = reg.match(name).groups() if len(res[0]) == len(res[1]) == 0: return [res[2],'', ''] return [ r for r in res] | def numstem(name): """ cant see how to do without reversing strings Match 1 or more digits going backwards from the end of the string """ import re reg = re.compile("""(\D*)(\d\d*)(\w*)""") try: res = reg.match(name[::-1]).groups() return [ r[::-1] for r in res[::-1]] except AttributeError: # no digits found return [name, "", ""] | b8c13e3451855b44528564c95f36ddc69bb89ee8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9619/b8c13e3451855b44528564c95f36ddc69bb89ee8/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
818,
19781,
12,
529,
4672,
3536,
848,
88,
2621,
3661,
358,
741,
2887,
19795,
310,
2064,
4639,
404,
578,
1898,
6815,
8554,
12727,
628,
326,
679,
434,
326,
533,
225,
3536,
1930,
283,
960,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
818,
19781,
12,
529,
4672,
3536,
848,
88,
2621,
3661,
358,
741,
2887,
19795,
310,
2064,
4639,
404,
578,
1898,
6815,
8554,
12727,
628,
326,
679,
434,
326,
533,
225,
3536,
1930,
283,
960,
... |
resource = libutils.path_to_resource(self.project, os.path.join(self.project.address, glade_file)) | resource = self.project.get_resource(glade_file) | def get_class_attributes(self, pyclass): scope_path = get_attribute_scope_path(pyclass) try: return self.cache[scope_path] except KeyError: pass if scope_path not in self.gtk_aware_classes: attrs = {} self.cache[scope_path] = attrs return attrs glade_file = self.gtk_aware_classes[scope_path] resource = libutils.path_to_resource(self.project, os.path.join(self.project.address, glade_file)) handler = GladeHandler() xml.sax.parseString(open(resource.real_path).read(), handler) attrs = {} for id, cls, line in handler.objects: type = self.get_type(self.get_pygtk_class_name(cls)) attrs[id] = GladeName(type.get_object(), ResourceAsModule(resource), line) self.cache[scope_path] = attrs return attrs | 42c89015a9e7a15f60cdf141b964cf6d1328d268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/42c89015a9e7a15f60cdf141b964cf6d1328d268/pygtkhints.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1106,
67,
4350,
12,
2890,
16,
2395,
1106,
4672,
2146,
67,
803,
273,
336,
67,
4589,
67,
4887,
67,
803,
12,
2074,
1106,
13,
775,
30,
327,
365,
18,
2493,
63,
4887,
67,
803,
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,
336,
67,
1106,
67,
4350,
12,
2890,
16,
2395,
1106,
4672,
2146,
67,
803,
273,
336,
67,
4589,
67,
4887,
67,
803,
12,
2074,
1106,
13,
775,
30,
327,
365,
18,
2493,
63,
4887,
67,
803,
6... |
subprocess.Popen(('taskkill.exe', '/f', '/im', layout_package_path_utils.TestShellBinary()), | subprocess.Popen(['taskkill.exe', '/f', '/im', self.TestShellBinary()], | def KillAllTestShells(self): """Kills all instances of the test_shell binary currently running.""" subprocess.Popen(('taskkill.exe', '/f', '/im', layout_package_path_utils.TestShellBinary()), stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait() | e025ef6b51ab89989971abb7930e741a50a92bc2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/e025ef6b51ab89989971abb7930e741a50a92bc2/platform_utils_win.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20520,
1595,
4709,
13220,
87,
12,
2890,
4672,
3536,
19045,
87,
777,
3884,
434,
326,
1842,
67,
10304,
3112,
4551,
3549,
12123,
6652,
18,
52,
3190,
12,
3292,
4146,
16418,
18,
14880,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20520,
1595,
4709,
13220,
87,
12,
2890,
4672,
3536,
19045,
87,
777,
3884,
434,
326,
1842,
67,
10304,
3112,
4551,
3549,
12123,
6652,
18,
52,
3190,
12,
3292,
4146,
16418,
18,
14880,
2187,
... |
if self.returncode == None: | if self.returncode is None: | def poll(self): """Check if child process has terminated. Returns returncode attribute.""" if self.returncode == None: if WaitForSingleObject(self._handle, 0) == WAIT_OBJECT_0: self.returncode = GetExitCodeProcess(self._handle) _active.remove(self) return self.returncode | 587e8b6e7deec97da104d8c9590d53e2cbdee4c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/587e8b6e7deec97da104d8c9590d53e2cbdee4c5/subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7672,
12,
2890,
4672,
3536,
1564,
309,
1151,
1207,
711,
14127,
18,
225,
2860,
18125,
1566,
12123,
309,
365,
18,
2463,
710,
353,
599,
30,
309,
24129,
5281,
921,
12,
2890,
6315,
4110,
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,
7672,
12,
2890,
4672,
3536,
1564,
309,
1151,
1207,
711,
14127,
18,
225,
2860,
18125,
1566,
12123,
309,
365,
18,
2463,
710,
353,
599,
30,
309,
24129,
5281,
921,
12,
2890,
6315,
4110,
16,
... |
'already_out' : fields.float('Already Out', readonly=True, \ | 'already_out': fields.float('Already Out', readonly=True, \ | coeff = coeff_uom2def * coeff_def2uom | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
11943,
273,
11943,
67,
89,
362,
22,
536,
380,
11943,
67,
536,
22,
89,
362,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11943,
273,
11943,
67,
89,
362,
22,
536,
380,
11943,
67,
536,
22,
89,
362,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
""" % (getattr(rec, 'context%d_id'%(i,)).name, 'task%d_ids'%(i,)) | """ % (getattr(rec, 'context%d_id'%(i,)).name.encode('utf-8'), 'task%d_ids'%(i,)) | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False): res = super(project_gtd_timebox,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar) if (res['type']=='form') and ('record_id' in context): if context['record_id']: rec = self.browse(cr, uid, int(context['record_id']), context) else: iids = self.search(cr,uid, [('user_id','=',uid),('parent_id','=',False)], context=context) if len(iids): rec = self.browse(cr, uid, int(iids[0]), context=context) else: return res res['arch'] = """ | c72da62763e5e8efa3299f5141307c05846ded09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/c72da62763e5e8efa3299f5141307c05846ded09/project_gtd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1466,
67,
1945,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1476,
67,
350,
33,
7036,
16,
1476,
67,
723,
2218,
687,
2187,
819,
33,
7036,
16,
12748,
33,
8381,
4672,
400,
273,
2240,
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,
1466,
67,
1945,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1476,
67,
350,
33,
7036,
16,
1476,
67,
723,
2218,
687,
2187,
819,
33,
7036,
16,
12748,
33,
8381,
4672,
400,
273,
2240,
12,
... |
self.archive = zipfile.ZipFile(self.infile) | self.archive = zipfile.ZipFile(self.filename) | def isValid(self) : """Returns True if data is OpenDocument, else False.""" if self.firstblock[:2] == "PK" : try : self.archive = zipfile.ZipFile(self.infile) self.contentxml = self.archive.read("content.xml") self.metaxml = self.archive.read("meta.xml") except : return False else : self.logdebug("DEBUG: Input file is in the OpenDocument (ISO/IEC DIS 26300) format.") return True else : return False | 30256b9e247a433cc383cc46972e8794eefcb623 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/486/30256b9e247a433cc383cc46972e8794eefcb623/ooo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4908,
12,
2890,
13,
294,
3536,
1356,
1053,
309,
501,
353,
3502,
2519,
16,
469,
1083,
12123,
309,
365,
18,
3645,
2629,
10531,
22,
65,
422,
315,
8784,
6,
294,
775,
294,
365,
18,
10686,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4908,
12,
2890,
13,
294,
3536,
1356,
1053,
309,
501,
353,
3502,
2519,
16,
469,
1083,
12123,
309,
365,
18,
3645,
2629,
10531,
22,
65,
422,
315,
8784,
6,
294,
775,
294,
365,
18,
10686,
... |
rstack.resume_point("CALL_METHOD_no_kwargs", f, n_args, returns=w_result) | rstack.resume_point("CALL_METHOD", f, w_self, n_args, returns=w_result) | def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue(n_args + (2 * n_kwargs)) w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) n = n_args + (w_self is not None) if not n_kwargs: try: w_result = f.space.call_valuestack(w_callable, n, f) rstack.resume_point("CALL_METHOD_no_kwargs", f, n_args, returns=w_result) finally: f.dropvalues(n_args + 2) else: keywords = [None] * n_kwargs keywords_w = [None] * n_kwargs while True: n_kwargs -= 1 if n_kwargs < 0: break w_value = f.popvalue() w_key = f.popvalue() key = f.space.str_w(w_key) keywords[n_kwargs] = key keywords_w[n_kwargs] = w_value arguments = f.popvalues(n) args = f.argument_factory(arguments, keywords, keywords_w, None, None) try: w_result = f.space.call_args(w_callable, args) rstack.resume_point("CALL_METHOD", f, w_self, returns=w_result) finally: f.dropvalues(1 + (w_self is None)) f.pushvalue(w_result) | 694eb993a65fb48ce097d1b91febe7ce634f4e7d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/694eb993a65fb48ce097d1b91febe7ce634f4e7d/callmethod.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22753,
67,
5327,
12,
74,
16,
1061,
3175,
16,
380,
24055,
4672,
468,
1061,
1968,
1914,
326,
1501,
16,
471,
19554,
1056,
16,
19560,
326,
10592,
296,
2890,
11,
290,
67,
1968,
273,
1061,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22753,
67,
5327,
12,
74,
16,
1061,
3175,
16,
380,
24055,
4672,
468,
1061,
1968,
1914,
326,
1501,
16,
471,
19554,
1056,
16,
19560,
326,
10592,
296,
2890,
11,
290,
67,
1968,
273,
1061,
3... |
REQUEST[ 'RESPONSE' ].redirect( self.absolute_url() + '/manage_cachingPolicies' + '?manage_tabs_message=Policy+added.' ) | if REQUEST is not None: REQUEST[ 'RESPONSE' ].redirect( self.absolute_url() + '/manage_cachingPolicies' + '?manage_tabs_message=' + 'Policy+added.' ) | def addPolicy( self , policy_id , predicate # TALES expr (def. 'python:1') , mtime_func # TALES expr (def. 'content/modified') , max_age_secs # integer, seconds (def. 0) , no_cache # boolean (def. 0) , no_store # boolean (def. 0) , must_revalidate # boolean (def. 0) , vary # string value , REQUEST ): """ Add a caching policy. """ self._addPolicy( policy_id , predicate , mtime_func , max_age_secs , no_cache , no_store , must_revalidate , vary ) REQUEST[ 'RESPONSE' ].redirect( self.absolute_url() + '/manage_cachingPolicies' + '?manage_tabs_message=Policy+added.' ) | 574c72e1f5820a51f924caf0a3ad2720c5766720 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/574c72e1f5820a51f924caf0a3ad2720c5766720/CachingPolicyManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2582,
12,
365,
269,
3329,
67,
350,
269,
5641,
3639,
468,
399,
37,
11386,
3065,
261,
536,
18,
296,
8103,
30,
21,
6134,
269,
13158,
67,
644,
4202,
468,
399,
37,
11386,
3065,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2582,
12,
365,
269,
3329,
67,
350,
269,
5641,
3639,
468,
399,
37,
11386,
3065,
261,
536,
18,
296,
8103,
30,
21,
6134,
269,
13158,
67,
644,
4202,
468,
399,
37,
11386,
3065,
261,
... |
class KeepaliveServerTestCase(BaseServerTestCase): | class BaseKeepaliveServerTestCase(BaseServerTestCase): | def test_dotted_attribute(self): # Raises an AttributeError because private methods are not allowed. self.assertRaises(AttributeError, xmlrpc.server.resolve_dotted_attribute, str, '__add') | f6087ca999b42aab51b44fce7b72040a07a7dfb3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/f6087ca999b42aab51b44fce7b72040a07a7dfb3/test_xmlrpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9811,
2344,
67,
4589,
12,
2890,
4672,
468,
20497,
392,
6394,
2724,
3238,
2590,
854,
486,
2935,
18,
365,
18,
11231,
12649,
6141,
12,
1499,
668,
16,
31811,
18,
3567,
18,
10828,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
9811,
2344,
67,
4589,
12,
2890,
4672,
468,
20497,
392,
6394,
2724,
3238,
2590,
854,
486,
2935,
18,
365,
18,
11231,
12649,
6141,
12,
1499,
668,
16,
31811,
18,
3567,
18,
10828,
... |
1 - normal redirect, target page exists and is not a redirect | 1 - normal redirect, target page exists and is not a redirect | def get_redirects_via_api(self, number = u'max', namespaces = [], start = None, until = None, maxlen = 8 ): """ Generator which will yield a tuple of data about Pages that are redirects: 0 - page title of a redirect page 1 - type of redirect: 0 - broken redirect, target page title missing 1 - normal redirect, target page exists and is not a redirect 2..maxlen - start of a redirect chain of that many redirects (currently, the API seems not to return sufficient data to make these return values possible, but that may change) maxlen+1 - start of an even longer chain, or a loop (currently, the API seems not to return sufficient data to allow this return vaules, but that may change) None - start of a redirect chain of unknown length, or loop 2 - target page title of the redirect, or chain (may not exist) 3 - target page of the redirect, or end of chain, or page title where chain or loop detecton was halted, or None if unknown Get number of page ids in one go. Iterates over namespaces, Main if an empty list. In each namespace, start alphabetically from a pagetitle start, wich need not exist. """ # wikipedia.output(u'====> get_redirects_via_api(number=%s, #ns=%d, start=%s, until=%s, maxlen=%s)' % (number, len(namespaces), start, until, maxlen)) import urllib if namespaces == []: namespaces = [ 0 ] params = { 'action':'query', 'redirects':1, #'':'', } for apiQ in self._next_redirects_via_api_commandline(number, namespaces, start, until): # wikipedia.output (u'===apiQ=%s' % apiQ) params['pageids'] = apiQ data = query.GetData(params, self.site) # wikipedia.output(u'===RESULT===\n%s\n' % result) redirects = {} pages = {} redirects = dict([[x['from'], x['to']] for x in data['query']['redirects']]) for pagetitle in data['query']['pages'].values(): # wikipedia.output (u'M: %s' % pagetitle) if 'missing' in pagetitle and 'pageid' not in pagetitle: pages[pagetitle['title']] = False else: pages[pagetitle['title']] = True for redirect in redirects: target = redirects[redirect] result = 0 final = None try: if pages[target]: final = target try: while result <= maxlen: result += 1 final = redirects[final] # result = None except KeyError: pass except KeyError: result = None pass yield (redirect, result, target, final) # wikipedia.output (u'X%d: %s => %s ----> %s' % (result, redirect, target, final)) | c499f5c4d7eb66e6b361af0a88786c3f2ea91f11 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/c499f5c4d7eb66e6b361af0a88786c3f2ea91f11/redirect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
22715,
67,
21985,
67,
2425,
12,
2890,
16,
1300,
273,
582,
17784,
651,
2187,
7728,
273,
5378,
16,
225,
787,
273,
599,
16,
3180,
273,
599,
16,
21882,
273,
1725,
262,
30,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
22715,
67,
21985,
67,
2425,
12,
2890,
16,
1300,
273,
582,
17784,
651,
2187,
7728,
273,
5378,
16,
225,
787,
273,
599,
16,
3180,
273,
599,
16,
21882,
273,
1725,
262,
30,
3536,
... |
box = wx.StaticBox(parent = self, label = "Bouy") | box = wx.StaticBox(parent = self, label = name) | def _createControls(self): # Creat box around controls box = wx.StaticBox(parent = self, label = "Bouy") topSizer = wx.StaticBoxSizer(box) self.sizer = wx.FlexGridSizer(0, 2, 10, 10) topSizer.Add(self.sizer, 1, wx.EXPAND) # Buoy Text and Label self._hide = wx.Button(self, label = "Hide") self.sizer.Add(self._hide, 1, flag = wx.ALIGN_CENTER) self._hide.Bind(wx.EVT_BUTTON, self._onButton) | dbfe0ba996521b1d01d8cb971d1132a55c29e7bb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10608/dbfe0ba996521b1d01d8cb971d1132a55c29e7bb/vision.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
16795,
12,
2890,
4672,
468,
5799,
270,
3919,
6740,
11022,
3919,
273,
7075,
18,
5788,
3514,
12,
2938,
273,
365,
16,
1433,
273,
508,
13,
1760,
20512,
273,
7075,
18,
5788,
3514,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2640,
16795,
12,
2890,
4672,
468,
5799,
270,
3919,
6740,
11022,
3919,
273,
7075,
18,
5788,
3514,
12,
2938,
273,
365,
16,
1433,
273,
508,
13,
1760,
20512,
273,
7075,
18,
5788,
3514,
... |
attrib[fixname(key)] = self._fixtext(value) | attrib[fixname(key)] = value | def _start(self, tag, attrib_in): fixname = self._fixname tag = fixname(tag) attrib = {} for key, value in attrib_in.items(): attrib[fixname(key)] = self._fixtext(value) return self._target.start(tag, attrib) | e4cfaf8f7bb5d21848fb232e3757979401720c1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/e4cfaf8f7bb5d21848fb232e3757979401720c1d/ElementTree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1937,
12,
2890,
16,
1047,
16,
5885,
67,
267,
4672,
2917,
529,
273,
365,
6315,
904,
529,
1047,
273,
2917,
529,
12,
2692,
13,
5885,
273,
2618,
364,
498,
16,
460,
316,
5885,
67,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1937,
12,
2890,
16,
1047,
16,
5885,
67,
267,
4672,
2917,
529,
273,
365,
6315,
904,
529,
1047,
273,
2917,
529,
12,
2692,
13,
5885,
273,
2618,
364,
498,
16,
460,
316,
5885,
67,
26... |
wrap = None | wrap = None | def insert(arr, obj, values, axis=None): """Return a new array with values inserted along the given axis before the given indices If axis is None, then ravel the array first. The obj argument can be an integer, a slice, or a sequence of integers. Example: >>> a = array([[1,2,3], [4,5,6], [7,8,9]]) >>> insertinto(a, [1,2], [[4],[5]], axis=0) array([[1,2,3], [4,4,4], [4,5,6], [5,5,5], [7,8,9]) """ wrap = None if type(arr) is not ndarray: try: wrap = arr.__array_wrap__ except AttributeError: pass arr = asarray(arr) ndim = arr.ndim if axis is None: if ndim != 1: arr = arr.ravel() ndim = arr.ndim axis = ndim-1 if (ndim == 0): arr = arr.copy() arr[...] = values if wrap: return wrap(arr) else: return arr slobj = [slice(None)]*ndim N = arr.shape[axis] newshape = list(arr.shape) if isinstance(obj, (int, long, integer)): if (obj < 0): obj += N if (obj < 0 or obj >=N): raise ValueError, "index (%d) out of range (0<=index<=%d) "\ "in dimension %d" % (obj, N, axis) newshape[axis] += 1; new = empty(newshape, arr.dtype, arr.flags.fnc) slobj[axis] = slice(None, obj) new[slobj] = arr[slobj] slobj[axis] = obj new[slobj] = values slobj[axis] = slice(obj+1,None) slobj2 = [slice(None)]*ndim slobj2[axis] = slice(obj,None) new[slobj] = arr[slobj2] if wrap: return wrap(new) return new elif isinstance(obj, slice): # turn it into a range object obj = arange(*obj.indices(N),**{'dtype':intp}) # get two sets of indices # one is the indices which will hold the new stuff # two is the indices where arr will be copied over obj = asarray(obj, dtype=intp) numnew = len(obj) index1 = obj + arange(numnew) index2 = setdiff1d(arange(numnew+N),index1) newshape[axis] += numnew new = empty(newshape, arr.dtype, arr.flags.fnc) slobj2 = [slice(None)]*ndim slobj[axis] = index1 slobj2[axis] = index2 new[slobj] = values new[slobj2] = arr if wrap: return wrap(new) return new | c268f1d89bbf826e69bafabbf0029b7847ca59a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/c268f1d89bbf826e69bafabbf0029b7847ca59a4/function_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
12,
5399,
16,
1081,
16,
924,
16,
2654,
33,
7036,
4672,
3536,
990,
279,
394,
526,
598,
924,
9564,
7563,
326,
864,
2654,
1865,
326,
864,
4295,
225,
971,
2654,
353,
599,
16,
1508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
12,
5399,
16,
1081,
16,
924,
16,
2654,
33,
7036,
4672,
3536,
990,
279,
394,
526,
598,
924,
9564,
7563,
326,
864,
2654,
1865,
326,
864,
4295,
225,
971,
2654,
353,
599,
16,
1508,
... |
if _debug: print "\t%s: Called Camera.__init__()" % rendererName | Item.__init__(self) debugMsg("Called Camera.__init__()") | 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,
23694,
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,
23694,
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,
-10... |
parser.add_option("-d", "--output-dir", dest = "output_dir", help = "stored captured images at the given directory") | parser.add_option("-o", "--output-dir", dest = "output_dir", help = "store captured images at the given directory") parser.add_option("-d", "--debug", action="store_true", dest = "debug", default = False, help = "activate debugging features") parser.add_option("-c", "--camera", type="int", dest = "camera_dev", help = "camera device to be selected (-1 for default)") | def read_cmd_options(): parser = OptionParser("usage: %prog [options]") parser.add_option("-e", "--exam-data-file", dest = "ex_data_filename", help = "read model data from FILENAME") parser.add_option("-a", "--answers-file", dest = "answers_filename", help = "write students' answers to FILENAME") parser.add_option("-s", "--start-id", dest = "start_id", type = "int", help = "start at the given exam id", default = 0) parser.add_option("-d", "--output-dir", dest = "output_dir", help = "stored captured images at the given directory") (options, args) = parser.parse_args() return options | 2ec431991d17410c7738e13419a987de6b90b5c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12267/2ec431991d17410c7738e13419a987de6b90b5c2/camgrade.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
4172,
67,
2116,
13332,
2082,
273,
18862,
2932,
9167,
30,
738,
14654,
306,
2116,
4279,
13,
2082,
18,
1289,
67,
3482,
2932,
17,
73,
3113,
5238,
338,
301,
17,
892,
17,
768,
3113,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
4172,
67,
2116,
13332,
2082,
273,
18862,
2932,
9167,
30,
738,
14654,
306,
2116,
4279,
13,
2082,
18,
1289,
67,
3482,
2932,
17,
73,
3113,
5238,
338,
301,
17,
892,
17,
768,
3113,... |
a.append((c, "%+d" % (d,))) | a.append((c, d)) | def update_model(self): a = self.combatant_model a.clear() b = self.combatants for c, d in b.iteritems(): a.append((c, "%+d" % (d,))) print a.get_sort_column_id() | f746e8f97b379cc2f7f2f13b09f594fe438f5353 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4811/f746e8f97b379cc2f7f2f13b09f594fe438f5353/genkounter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2284,
12,
2890,
4672,
279,
273,
365,
18,
9301,
270,
970,
67,
2284,
279,
18,
8507,
1435,
324,
273,
365,
18,
9301,
270,
4388,
364,
276,
16,
302,
316,
324,
18,
2165,
3319,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2284,
12,
2890,
4672,
279,
273,
365,
18,
9301,
270,
970,
67,
2284,
279,
18,
8507,
1435,
324,
273,
365,
18,
9301,
270,
4388,
364,
276,
16,
302,
316,
324,
18,
2165,
3319,
133... |
different strides? (This can catch bugs, but is generally overly strict.) | different strides? (This can catch bugs, but is generally overly strict.) 0 no check, 1 warn, 2 err. | def _pickle_DebugMode_Maker(maker): raise NotImplementedError('DebugMode is not picklable (yet)') | 46b095c0e7ff8443f597aafb093374e91179f1cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/46b095c0e7ff8443f597aafb093374e91179f1cc/debugmode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
20847,
67,
2829,
2309,
67,
12373,
12,
29261,
4672,
1002,
11206,
2668,
2829,
2309,
353,
486,
6002,
80,
429,
261,
24404,
2506,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
20847,
67,
2829,
2309,
67,
12373,
12,
29261,
4672,
1002,
11206,
2668,
2829,
2309,
353,
486,
6002,
80,
429,
261,
24404,
2506,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
hrefs = set(xpath(ncx, '//ncx:content/@src')) | hrefs = set(map(urlnormalize, xpath(ncx, '//ncx:content/@src'))) | def _update_playorder(self, ncx): hrefs = set(xpath(ncx, '//ncx:content/@src')) playorder = {} next = 1 selector = XPath('h:body//*[@id or @name]') for item in self.spine: base = item.href if base in hrefs: playorder[base] = next next += 1 for elem in selector(item.data): added = False for attr in ('id', 'name'): id = elem.get(attr) if not id: continue href = '#'.join([base, id]) if href in hrefs: playorder[href] = next added = True if added: next += 1 selector = XPath('ncx:content/@src') for elem in xpath(ncx, '//*[@playOrder and ./ncx:content[@src]]'): href = selector(elem)[0] order = playorder.get(href, 0) elem.attrib['playOrder'] = str(order) return | 925b3ea1fcdf76b98b9048f09c8d5333f85deead /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/925b3ea1fcdf76b98b9048f09c8d5333f85deead/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
67,
1601,
1019,
12,
2890,
16,
8194,
92,
4672,
3897,
87,
273,
444,
12,
1458,
12,
718,
12237,
16,
6748,
12,
14202,
92,
16,
12084,
14202,
92,
30,
1745,
19,
36,
4816,
11,
2034... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1601,
1019,
12,
2890,
16,
8194,
92,
4672,
3897,
87,
273,
444,
12,
1458,
12,
718,
12237,
16,
6748,
12,
14202,
92,
16,
12084,
14202,
92,
30,
1745,
19,
36,
4816,
11,
2034... |
def set_escape_dos_devices(self): SetConnections.UpdateGlobal('escape_dos_devices', \ self.dest_fsa.escape_dos_devices) | def set_escape_dos_devices(self): SetConnections.UpdateGlobal('escape_dos_devices', \ self.dest_fsa.escape_dos_devices) | 7da9bdf57df966f94b1ffc47ed21cb4e47d2cf2d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/783/7da9bdf57df966f94b1ffc47ed21cb4e47d2cf2d/fs_abilities.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
6939,
67,
19219,
67,
12506,
12,
2890,
4672,
1000,
9314,
18,
1891,
5160,
2668,
6939,
67,
19219,
67,
12506,
2187,
521,
365,
18,
10488,
67,
2556,
69,
18,
6939,
67,
19219,
67,
125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6939,
67,
19219,
67,
12506,
12,
2890,
4672,
1000,
9314,
18,
1891,
5160,
2668,
6939,
67,
19219,
67,
12506,
2187,
521,
365,
18,
10488,
67,
2556,
69,
18,
6939,
67,
19219,
67,
125... | |
"back " + pixvals(GL_BACK)) | "back " + pixvals(GL_BACK) ) | def pixvals(buff): glReadBuffer(buff) gl_format, gl_type = GL_RGBA, GL_UNSIGNED_BYTE rgba = glReadPixels( wX, wY, 1, 1, gl_format, gl_type )[0][0] return ("rgba %u, %u, %u, %u" % (us(rgba[0]), us(rgba[1]), us(rgba[2]), us(rgba[3]))) | 748256dc87917c09570e64f2cc27bfb918b53b06 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/748256dc87917c09570e64f2cc27bfb918b53b06/DynamicTip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11871,
4524,
12,
20664,
4672,
5118,
1994,
1892,
12,
20664,
13,
5118,
67,
2139,
16,
5118,
67,
723,
273,
10252,
67,
23263,
16,
10252,
67,
2124,
21049,
67,
15377,
19465,
273,
5118,
1994,
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,
11871,
4524,
12,
20664,
4672,
5118,
1994,
1892,
12,
20664,
13,
5118,
67,
2139,
16,
5118,
67,
723,
273,
10252,
67,
23263,
16,
10252,
67,
2124,
21049,
67,
15377,
19465,
273,
5118,
1994,
18... |
self.baseclass.push('226 transfer complete') self.close() | if not self.dtp_conn_closed: self.baseclass.push('226 transfer complete') self.close() self.dtp_conn_closed = True | def handle_close(self): self.baseclass.push('226 transfer complete') self.close() | dbbbc946039920dffbeef9e7a5bd9be2e8685b36 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/dbbbc946039920dffbeef9e7a5bd9be2e8685b36/test_ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
4412,
12,
2890,
4672,
365,
18,
1969,
1106,
18,
6206,
2668,
3787,
26,
7412,
3912,
6134,
365,
18,
4412,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
4412,
12,
2890,
4672,
365,
18,
1969,
1106,
18,
6206,
2668,
3787,
26,
7412,
3912,
6134,
365,
18,
4412,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.sharedArea = gConfig.getValue('/LocalSite/SharedArea') | def configure(self, csSection, submitPool ): """ Here goes common configuration for DIRAC PilotDirector """ | d4abebe0f52eb23d65894d6e3e3c5d75eba9084e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/d4abebe0f52eb23d65894d6e3e3c5d75eba9084e/DIRACPilotDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
12,
2890,
16,
2873,
5285,
16,
4879,
2864,
262,
30,
3536,
13743,
13998,
2975,
1664,
364,
18544,
2226,
453,
22797,
28280,
3536,
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,
0,
0,
0,
0,
0,
0,
0,
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,
5068,
12,
2890,
16,
2873,
5285,
16,
4879,
2864,
262,
30,
3536,
13743,
13998,
2975,
1664,
364,
18544,
2226,
453,
22797,
28280,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
except ProgrammerError, err: raise xmlrpclib.Fault(100, "GENIOpError: Internal GENI Error! Recieved a ProgrammerError while calling interface.acquire_vessels. Details: " + str(err)) | def acquire_resources(auth, rspec): """ <Purpose> Acquires resources for users over XMLRPC. <Arguments> auth An authorization dict of the form {'username':username, 'password':password} rspec A resource specificiation dict of the form {'rspec_type':type, 'number_of_nodes':num} <Exceptions> Raises xmlrpclib Fault objects: 100, "GENIOpError" for internal errors. 103, "GENINotEnoughCredits" if user has insufficient vessel credits to complete request. <Returns> A list of 'info' dictionaries, each 'infodict' contains acquired vessel info. """ geni_user = _auth(auth) resource_type = rspec['rspec_type'] num_vessels = rspec['number_of_nodes'] acquired_vessels = [] # validate rspec data if not isinstance(resource_type, str) or not isinstance(num_vessels, int): raise xmlrpclib.Fault(102, "GENIInvalidUserInput: rspec has invalid data types.") if (resource_type != "lan" and resource_type != "wan" and \ resource_type != "random") or num_vessels < 1: raise xmlrpclib.Fault(102, "GENIInvalidUserInput: rspec has invalid values.") # since acquired_vessels expects rand instead of random if resource_type == 'random': resource_type = 'rand' try: acquired_vessels = interface.acquire_vessels(geni_user, num_vessels, resource_type) except DoesNotExistError: raise xmlrpclib.Fault(100, "GENIOpError: Internal GENI Error! Recieved a DoesNotExistError while calling interface.acquire_vessels") except UnableToAcquireResourcesError, err: raise xmlrpclib.Fault(100, "GENIOpError: Internal GENI Error! Unable to fulfill vessel acquire request at this given time. Please try again later.") except InsufficientUserResourcesError, err: raise xmlrpclib.Fault(103, "GENINotEnoughCredits: You do not have enough vessel credits to acquire the number of vessels requested.") except ProgrammerError, err: raise xmlrpclib.Fault(100, "GENIOpError: Internal GENI Error! Recieved a ProgrammerError while calling interface.acquire_vessels. Details: " + str(err)) # since acquire_vessels returns a list of Vessel objects, we # need to convert them into a list of 'info' dictionaries. return interface.get_vessel_infodict_list(acquired_vessels) | e15bef7c1eeeea6ae4b8f7315efcfc14ff360ad0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/e15bef7c1eeeea6ae4b8f7315efcfc14ff360ad0/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10533,
67,
4683,
12,
1944,
16,
436,
2793,
4672,
3536,
411,
10262,
4150,
34,
12848,
4138,
2703,
364,
3677,
1879,
3167,
8087,
18,
411,
4628,
34,
1357,
1922,
6093,
2065,
434,
326,
646,
1366... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10533,
67,
4683,
12,
1944,
16,
436,
2793,
4672,
3536,
411,
10262,
4150,
34,
12848,
4138,
2703,
364,
3677,
1879,
3167,
8087,
18,
411,
4628,
34,
1357,
1922,
6093,
2065,
434,
326,
646,
1366... | |
self.Logger.error("Invalid Address ID %s"%str(slot)); raise pyDCPU.FatIOModError; def write(self, Connection, Data): self.Logger.error("This module is read only"); raise pyDCPU.IOModError; | def write(self, Connection, Data): raise pyDCPU.AccessDenied("This module is read only"); | def read(self, Connection, len): slot = Connection.Address; if not slot: self.Logger.error("No connection!!!"); raise pyDCPU.FatIOModError; | 2797f7cc5dfc35cdc1823b3697093c4c7e49463b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2439/2797f7cc5dfc35cdc1823b3697093c4c7e49463b/AGI54622A.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
4050,
16,
562,
4672,
4694,
273,
4050,
18,
1887,
31,
309,
486,
4694,
30,
365,
18,
3328,
18,
1636,
2932,
2279,
1459,
8548,
4442,
1769,
1002,
2395,
40,
15222,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
4050,
16,
562,
4672,
4694,
273,
4050,
18,
1887,
31,
309,
486,
4694,
30,
365,
18,
3328,
18,
1636,
2932,
2279,
1459,
8548,
4442,
1769,
1002,
2395,
40,
15222,
18,
42,
... |
"""Check that the action can be performed by username on the resource | """Check that the action can be performed by username on the resource | def check_permission(action, username, resource, perm): | aaea2624d62378836b05f688a633d7962e1d2e38 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/aaea2624d62378836b05f688a633d7962e1d2e38/perm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
9827,
12,
1128,
16,
2718,
16,
1058,
16,
4641,
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,
866,
67,
9827,
12,
1128,
16,
2718,
16,
1058,
16,
4641,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return repl.getstdout() | return clirepl.getstdout() | def main_curses(scr, args, config, interactive=True, locals_=None, banner=None): """main function for the curses convenience wrapper Initialise the two main objects: the interpreter and the repl. The repl does what a repl does and lots of other cool stuff like syntax highlighting and stuff. I've tried to keep it well factored but it needs some tidying up, especially in separating the curses stuff from the rest of the repl. """ global stdscr global DO_RESIZE global colors global repl DO_RESIZE = False old_sigwinch_handler = signal.signal(signal.SIGWINCH, lambda *_: sigwinch(scr)) # redraw window after being suspended old_sigcont_handler = signal.signal(signal.SIGCONT, lambda *_: sigcont(scr)) stdscr = scr try: curses.start_color() curses.use_default_colors() cols = make_colors(config) except curses.error: cols = FakeDict(-1) # FIXME: Gargh, bad design results in using globals without a refactor :( colors = cols scr.timeout(300) curses.raw(True) main_win, statusbar = init_wins(scr, cols, config) if locals_ is None: sys.modules['__main__'] = ModuleType('__main__') locals_ = sys.modules['__main__'].__dict__ interpreter = repl.Interpreter(locals_, getpreferredencoding()) clirepl = CLIRepl(main_win, interpreter, statusbar, config, idle) clirepl._C = cols sys.stdin = FakeStdin(repl) sys.stdout = repl sys.stderr = repl if args: bpython.args.exec_code(interpreter, args) if not interactive: curses.raw(False) return clirepl.getstdout() else: sys.path.insert(0, '') clirepl.startup() if banner is not None: clirepl.write(banner) clirepl.write('\n') clirepl.repl() if config.hist_length: histfilename = os.path.expanduser(config.hist_file) clirepl.rl_history.save(histfilename, getpreferredencoding()) main_win.erase() main_win.refresh() statusbar.win.clear() statusbar.win.refresh() curses.raw(False) # Restore signal handlers signal.signal(signal.SIGWINCH, old_sigwinch_handler) signal.signal(signal.SIGCONT, old_sigcont_handler) return repl.getstdout() | d389b904b92863eb8b2572189a64f322ae038343 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6932/d389b904b92863eb8b2572189a64f322ae038343/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
67,
1397,
2420,
12,
24638,
16,
833,
16,
642,
16,
12625,
33,
5510,
16,
8985,
67,
33,
7036,
16,
14090,
33,
7036,
4672,
3536,
5254,
445,
364,
326,
30436,
13553,
4053,
225,
31739,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
67,
1397,
2420,
12,
24638,
16,
833,
16,
642,
16,
12625,
33,
5510,
16,
8985,
67,
33,
7036,
16,
14090,
33,
7036,
4672,
3536,
5254,
445,
364,
326,
30436,
13553,
4053,
225,
31739,
32... |
if not(isinstance(val,float) or isinstance(val,int)): | if not(isinstance(val,float) or isinstance(val,int) or isinstance(val,int32) or \ isinstance(val,int64) or isinstance(val,float32) or isinstance(val,float64) ): | def add_des_var(self,ref,low=None,high=None): """adds a design variable to the driver. 'ref' is a string refering to the public variable the driver should vary during execution. 'low' and 'high' refer to the minimum and maximum allowed values for the optimizer to use. If neither are specified, the min and max will default to the values in the metadata of the public variable being referenced. If they are not specified in the metadata and not provided as arguments a ValueError is raised. """ | 927808af643fac87e7e83e0fb5fcc60a35582f2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/927808af643fac87e7e83e0fb5fcc60a35582f2d/genetic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
5489,
67,
1401,
12,
2890,
16,
1734,
16,
821,
33,
7036,
16,
8766,
33,
7036,
4672,
3536,
25428,
279,
8281,
2190,
358,
326,
3419,
18,
296,
1734,
11,
353,
279,
533,
8884,
310,
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,
527,
67,
5489,
67,
1401,
12,
2890,
16,
1734,
16,
821,
33,
7036,
16,
8766,
33,
7036,
4672,
3536,
25428,
279,
8281,
2190,
358,
326,
3419,
18,
296,
1734,
11,
353,
279,
533,
8884,
310,
3... |
], CONTEXT) | ], 0, None, None, CONTEXT) | def test0020integer(self): ''' Test Integer. ''' integer1_id = self.integer.create({ 'integer': 1, }, CONTEXT) self.assert_(integer1_id) | 52062c763bf1737b3f2071e48338f60845edc54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/52062c763bf1737b3f2071e48338f60845edc54d/test_tryton.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
713,
3462,
7745,
12,
2890,
4672,
9163,
7766,
2144,
18,
9163,
3571,
21,
67,
350,
273,
365,
18,
7745,
18,
2640,
12590,
296,
7745,
4278,
404,
16,
19879,
13862,
13,
365,
18,
11231,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
713,
3462,
7745,
12,
2890,
4672,
9163,
7766,
2144,
18,
9163,
3571,
21,
67,
350,
273,
365,
18,
7745,
18,
2640,
12590,
296,
7745,
4278,
404,
16,
19879,
13862,
13,
365,
18,
11231,
6... |
self.assertEqual(d.values(), [2]) | self.assertEqual(set(d.values()), {2}) | def test_values(self): d = {} self.assertEqual(d.values(), []) d = {1:2} self.assertEqual(d.values(), [2]) | d97ef59cd009e3205fe166ecac3a2935156c382d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/d97ef59cd009e3205fe166ecac3a2935156c382d/test_dict.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2372,
12,
2890,
4672,
302,
273,
2618,
365,
18,
11231,
5812,
12,
72,
18,
2372,
9334,
5378,
13,
302,
273,
288,
21,
30,
22,
97,
365,
18,
11231,
5812,
12,
72,
18,
2372,
9334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2372,
12,
2890,
4672,
302,
273,
2618,
365,
18,
11231,
5812,
12,
72,
18,
2372,
9334,
5378,
13,
302,
273,
288,
21,
30,
22,
97,
365,
18,
11231,
5812,
12,
72,
18,
2372,
9334,
... |
'time':time} print rule.domain_force | 'time':time} | def _domain_force_get(self, cr, uid, ids, field_name, arg, context={}): res = {} for rule in self.browse(cr, uid, ids, context): eval_user_data = {'user': self.pool.get('res.users').browse(cr, 1, uid), 'time':time} print rule.domain_force res[rule.id] = eval(rule.domain_force, eval_user_data) return res | 833d3f5afdbfca3c0c56ba5e8cf224d1f27ef66f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/833d3f5afdbfca3c0c56ba5e8cf224d1f27ef66f/ir_rule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4308,
67,
5734,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
12938,
4672,
400,
273,
2618,
364,
1720,
316,
365,
18,
25731,
12,
3353,
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,
4308,
67,
5734,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
12938,
4672,
400,
273,
2618,
364,
1720,
316,
365,
18,
25731,
12,
3353,
16,
... |
function = location_text_table[style] location = function(self.location_text) else: function = location_pos_table[style] location = function(self.location_start, self.location_end) self.callback(location) | self.callback(self.location_style, (self.text_join_func(self.text_lines), None)) else: self.callback(self.location_style, (self.location_start, self.location_end)) def start_feature_location(self, tag, attrs): self.save_characters() def end_feature_location(self, tag): self.text_lines.append(self.get_characters()) add_text_handler(Handle_feature_location, "feature_location_start", "location_start") add_text_handler(Handle_feature_location, "feature_location_end", "location_end") | def end_(self, tag): style = self.location_style if self.location_text: if self.location_start or self.location_end: raise TypeError("Cannot have both location text and start/end") function = location_text_table[style] location = function(self.location_text) else: function = location_pos_table[style] location = function(self.location_start, self.location_end) self.callback(location) | 7795919201eb3f63ba6ae6a328d1c7499aba60a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/7795919201eb3f63ba6ae6a328d1c7499aba60a2/StdHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
12,
2890,
16,
1047,
4672,
2154,
273,
365,
18,
3562,
67,
4060,
309,
365,
18,
3562,
67,
955,
30,
309,
365,
18,
3562,
67,
1937,
578,
365,
18,
3562,
67,
409,
30,
1002,
3580,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
12,
2890,
16,
1047,
4672,
2154,
273,
365,
18,
3562,
67,
4060,
309,
365,
18,
3562,
67,
955,
30,
309,
365,
18,
3562,
67,
1937,
578,
365,
18,
3562,
67,
409,
30,
1002,
3580,
2... |
w(t) = - t + \cdots | i(t) = - t + a_1 t^2 + \cdots | def inverse(self, prec=20): r""" The formal group power series w. | d6d52d622e2ed6ae873e4370b7a510dcaf6f4837 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/d6d52d622e2ed6ae873e4370b7a510dcaf6f4837/formal_group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8322,
12,
2890,
16,
13382,
33,
3462,
4672,
436,
8395,
1021,
25739,
1041,
7212,
4166,
341,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
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,
8322,
12,
2890,
16,
13382,
33,
3462,
4672,
436,
8395,
1021,
25739,
1041,
7212,
4166,
341,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
resource_count = list(c.execute( "SELECT count(*) FROM resources WHERE name = ?", (name,) ))[0][0] | resource_count = list(cc.execute( "SELECT count(*) FROM resources WHERE name = ?", (name,) ))[0][0] | def store(self, name, obj, c=None): cc = self.conn.cursor() if c is None else c resource_count = list(c.execute( "SELECT count(*) FROM resources WHERE name = ?", (name,) ))[0][0] if resource_count == 0: cc.execute( "INSERT INTO resources VALUES (?, ?)", (name, cPickle.dumps( obj )) ) if not c: self.conn.commit() if not c: cc.close() | 64752f54b6e9904860e4d1fa29d3b25fddbe125e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10974/64752f54b6e9904860e4d1fa29d3b25fddbe125e/graphdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1707,
12,
2890,
16,
508,
16,
1081,
16,
276,
33,
7036,
4672,
4946,
273,
365,
18,
4646,
18,
9216,
1435,
309,
276,
353,
599,
469,
276,
1058,
67,
1883,
273,
666,
12,
952,
18,
8837,
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,
1707,
12,
2890,
16,
508,
16,
1081,
16,
276,
33,
7036,
4672,
4946,
273,
365,
18,
4646,
18,
9216,
1435,
309,
276,
353,
599,
469,
276,
1058,
67,
1883,
273,
666,
12,
952,
18,
8837,
12,
... |
if prog.stop < now: | if ( prog.stop + config.RECORD_PADDING) < now: | def checkToRecord(self): if DEBUG: log.debug('in checkToRecord') rec_cmd = None rec_prog = None cleaned = None scheduledRecordings = self.getScheduledRecordings() | f79c81409fa066f1fd35ff211636eb7c2c76f741 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f79c81409fa066f1fd35ff211636eb7c2c76f741/recordserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
774,
2115,
12,
2890,
4672,
309,
6369,
30,
613,
18,
4148,
2668,
267,
866,
774,
2115,
6134,
1950,
67,
4172,
273,
599,
1950,
67,
14654,
273,
599,
9426,
273,
599,
9755,
2115,
899,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
774,
2115,
12,
2890,
4672,
309,
6369,
30,
613,
18,
4148,
2668,
267,
866,
774,
2115,
6134,
1950,
67,
4172,
273,
599,
1950,
67,
14654,
273,
599,
9426,
273,
599,
9755,
2115,
899,
273... |
def init(self): | def init(self, parent): | def init(self): super(AddChannelSheetController, self).initWithWindowNibName_owner_("AddChannelSheet", self) return self.retain() | 844613ba16f5aa178e0454025827157881e137b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/844613ba16f5aa178e0454025827157881e137b2/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
982,
4672,
2240,
12,
986,
2909,
8229,
2933,
16,
365,
2934,
2738,
1190,
3829,
50,
495,
461,
67,
8443,
67,
2932,
986,
2909,
8229,
3113,
365,
13,
327,
365,
18,
1349,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
12,
2890,
16,
982,
4672,
2240,
12,
986,
2909,
8229,
2933,
16,
365,
2934,
2738,
1190,
3829,
50,
495,
461,
67,
8443,
67,
2932,
986,
2909,
8229,
3113,
365,
13,
327,
365,
18,
1349,
... |
return map(lambda (a,b,c): detector_thresholds(min_threshold,ifos,a,b,c,sensitivities), zip(RA,dec,gps_time)) | return map(lambda (a,b,c): detector_thresholds(ifos,a,b,c,sensitivities,min_threshold=min_threshold,max_threshold=max_threshold), zip(RA,dec,gps_time)) | def detector_thresholds(min_threshold, ifos, RA, dec, gps_time, sensitivities=None): """ Return a dictionary of sensitivity thresholds for each detector, based on a minimum threshold of min_threshold in the least sensitive one, for a source at position (RA,dec) specified in radians at time gps_time. Specifying a dictionary of sensitivities allows one to weight also by the relative SNR of a reference system in each detector to handle different noise curves. """ # Recurse if multiple RA, dec and GPS times are specified if type(gps_time)!=float or type(RA)!=float or type(dec)!=float: assert len(gps_time)==len(RA),len(gps_time)==len(dec) return map(lambda (a,b,c): detector_thresholds(min_threshold,ifos,a,b,c,sensitivities), zip(RA,dec,gps_time)) from pylal import antenna # Sensitivies specifies relative SNRs of a reference signal (BNS) if sensitivities is None: sensitivities={} for det in ifos: sensitivies[det]=1.0 else: assert len(ifos)==len(sensitivites) # Normalise sensitivities minsens=min(sensitivities.values()) for det in ifos: sensitivities[det]/=minsens resps={} threshs={} # Make a dictionary of average responses for det in ifos: resps[det]=antenna.response(gps_time,RA,dec,0,0,'radians',det)[2] worst_resp=min(resps.values()) # Assuming that lowest threshold is in worst detector, return thresholds for det in ifos: threshs[det]=min_threshold*(resps[det]/worst_resp)*sensitivities[det] return threshs | 323638fdd5a246491641cf1f6c20df7c1ed90d57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/323638fdd5a246491641cf1f6c20df7c1ed90d57/grbsummary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13826,
67,
8699,
87,
12,
1154,
67,
8699,
16,
309,
538,
16,
26880,
16,
2109,
16,
20985,
67,
957,
16,
15390,
305,
427,
1961,
33,
7036,
4672,
3536,
2000,
279,
3880,
434,
15390,
20862,
199... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13826,
67,
8699,
87,
12,
1154,
67,
8699,
16,
309,
538,
16,
26880,
16,
2109,
16,
20985,
67,
957,
16,
15390,
305,
427,
1961,
33,
7036,
4672,
3536,
2000,
279,
3880,
434,
15390,
20862,
199... |
if w > max_w and max_w != 0: | if max_w and w > max_w: | def _verify_min_w(self, w, group_w, group_h, max_w, group): if w < 0: w = 0 if w > max_w and max_w != 0: w = max_w if w > group_w: group.resize(w, group_h) | 7e7a5b5846f817a4dbbbfe738d3f37068ba15d1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/7e7a5b5846f817a4dbbbfe738d3f37068ba15d1a/editable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8705,
67,
1154,
67,
91,
12,
2890,
16,
341,
16,
1041,
67,
91,
16,
1041,
67,
76,
16,
943,
67,
91,
16,
1041,
4672,
309,
341,
411,
374,
30,
341,
273,
374,
309,
943,
67,
91,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8705,
67,
1154,
67,
91,
12,
2890,
16,
341,
16,
1041,
67,
91,
16,
1041,
67,
76,
16,
943,
67,
91,
16,
1041,
4672,
309,
341,
411,
374,
30,
341,
273,
374,
309,
943,
67,
91,
471,... |
title = t.artist.name + ' - ' + t.title | trackArtist = t.artist if t.artist else release.artist title = trackArtist.name + ' - ' + t.title | def showReleaseHandler(self): print "loading release from server ... " print | 741c324e66e51d0c6c91f7151df37b2e855247d5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6926/741c324e66e51d0c6c91f7151df37b2e855247d5/controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
7391,
1503,
12,
2890,
4672,
1172,
315,
15174,
3992,
628,
1438,
1372,
315,
1172,
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,
2405,
7391,
1503,
12,
2890,
4672,
1172,
315,
15174,
3992,
628,
1438,
1372,
315,
1172,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
renderer = gtk.CellRendererText() self._pattern_combo.pack_start(renderer, True) self._pattern_combo.add_attribute(renderer, "text", 0) | self._pattern_combo.set_text_column(0) | def _init_pattern_combo(self): """Initialize the pattern combo box.""" store = gtk.ListStore(str) self._pattern_combo.set_model(store) for pattern in self.patterns: store.append((pattern,)) renderer = gtk.CellRendererText() self._pattern_combo.pack_start(renderer, True) self._pattern_combo.add_attribute(renderer, "text", 0) | 5802fb813a76082ea8f64aeabac6832a9f0a6b4e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12852/5802fb813a76082ea8f64aeabac6832a9f0a6b4e/search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
4951,
67,
25053,
12,
2890,
4672,
3536,
7520,
326,
1936,
16778,
3919,
12123,
1707,
273,
22718,
18,
682,
2257,
12,
701,
13,
365,
6315,
4951,
67,
25053,
18,
542,
67,
2284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4951,
67,
25053,
12,
2890,
4672,
3536,
7520,
326,
1936,
16778,
3919,
12123,
1707,
273,
22718,
18,
682,
2257,
12,
701,
13,
365,
6315,
4951,
67,
25053,
18,
542,
67,
2284,
... |
if options.verbose: print "%s not done yet" % (system['name']) | if options.verbose: print "%s not completed yet." % (system['name']) | def get_action_results(key, systems): '''Gets action results that have been scheduled''' if options.debug: wait = 5 elif options.verbose: wait = 15 else: wait = 30 complete = False while not complete: for system in systems: if system['skip']: continue if not system['complete']: if options.verbose: print "checking system:", system['name'] script_result = client.system.get_script_results(key, system['action_id']) if options.verbose: print "Script result:", script_result if not script_result == []: if options.verbose: print "%s script result:" % (system['name']) if options.debug: print script_result system['output'] = script_result[0]['output'] system['return_code'] = script_result[0]['returnCode'] system['complete'] = True else: system['complete'] = False if options.verbose: print "%s not done yet" % (system['name']) complete = True for system in systems: if system['skip']: continue if not system['complete']: complete = False if not complete: print "waiting %i seconds for results ..." % (wait) time.sleep(wait) for system in systems: if system['skip']: continue data = system['output'].split('\n') if options.debug: print "DEBUG: Raw output from %s script: %s" %(system['name'], data) for line in data: if options.debug: print "DEBUG: %s checking '%s'" % (system['name'], line) if 'System ID:' in line: if options.verbose: print "Found system_id of:", line.split()[-1] system['system_id'] = line.split()[-1].lower() break else: system['system_id'] = False for system in systems: if system['skip']: continue if options.verbose: print "Output for %s is: %s" % (system['name'], system['system_id']) new_channel = DELL_INFO['label'] + '-' + SYSTEM_VENDOR_ID + '.dev_' + system['system_id'] + '-' + system['base_channel'] system['system_channel'] = new_channel if options.verbose: print "Subscribing %s to channel %s" % (system['name'], system['system_channel']) subscribe(key, system['base_channel'], system['system_channel'], system['id']) return systems | a505c3724245a7ab265bfa6c2d81e21adace87b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/a505c3724245a7ab265bfa6c2d81e21adace87b1/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1128,
67,
4717,
12,
856,
16,
14908,
4672,
9163,
3002,
1301,
1686,
716,
1240,
2118,
9755,
26418,
309,
702,
18,
4148,
30,
2529,
273,
1381,
1327,
702,
18,
11369,
30,
2529,
273,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1128,
67,
4717,
12,
856,
16,
14908,
4672,
9163,
3002,
1301,
1686,
716,
1240,
2118,
9755,
26418,
309,
702,
18,
4148,
30,
2529,
273,
1381,
1327,
702,
18,
11369,
30,
2529,
273,
4... |
dt = now - self.networkToLocalTime(networkTime, now) | dt = now - self.networkToLocalTime(networkTime, now, bits=bits) | def localElapsedTime(self, networkTime): """localElapsedTime(self, int networkTime) | 633409b2bf5e7b41caaa168cac1cf1fe5ae3d4d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/633409b2bf5e7b41caaa168cac1cf1fe5ae3d4d2/ClockDelta.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
28827,
950,
12,
2890,
16,
2483,
950,
4672,
3536,
3729,
28827,
950,
12,
2890,
16,
509,
2483,
950,
13,
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,
1191,
28827,
950,
12,
2890,
16,
2483,
950,
4672,
3536,
3729,
28827,
950,
12,
2890,
16,
509,
2483,
950,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
(1, 'bottom'): ('', ''), (1, 'middle'): ('\\raisebox{-0.5\\height}{', '}'), (1, 'top'): ('\\raisebox{-\\height}{', '}'), (0, 'center'): ('{\\hfill', '\\hfill}'), (0, 'left'): ('{', '\\hfill}'), (0, 'right'): ('{\\hfill', '}'),} if 'scale' in attrs: pre.append('\\scalebox{%f}{' % (attrs['scale'] / 100.0,)) post.append('}') if 'width' in attrs: include_graphics_options.append('width=%s' % ( self.latex_image_length(attrs['width']), )) if 'height' in attrs: include_graphics_options.append('height=%s' % ( self.latex_image_length(attrs['height']), )) | (True, 'bottom'): ('', ''), (True, 'middle'): (r'\raisebox{-0.5\height}{', '}'), (True, 'top'): (r'\raisebox{-\height}{', '}'), (False, 'center'): (r'\noindent\makebox[\textwidth][c]{', '}'), (False, 'left'): ('{', r'\hfill}'), (False, 'right'): (r'{\hfill', '}'),} | def visit_image(self, node): self.requirements['graphicx'] = self.graphicx_package attrs = node.attributes # Add image URI to dependency list, assuming that it's # referring to a local file. self.settings.record_dependencies.add(attrs['uri']) pre = [] # in reverse order post = [] include_graphics_options = [] inline = isinstance(node.parent, nodes.TextElement) align_prepost = { # key == (<inline>, <align>) # By default latex aligns the bottom of an image. (1, 'bottom'): ('', ''), (1, 'middle'): ('\\raisebox{-0.5\\height}{', '}'), (1, 'top'): ('\\raisebox{-\\height}{', '}'), (0, 'center'): ('{\\hfill', '\\hfill}'), # According to the HTML standard # http://www.w3.org/TR/html4/struct/objects.html#adef-align-IMG # the image should be floated alongside the paragraph. # However, this is not even honoured by all HTML browsers. (0, 'left'): ('{', '\\hfill}'), (0, 'right'): ('{\\hfill', '}'),} if 'scale' in attrs: # Could also be done with ``scale`` option to # ``\includegraphics``; doing it this way for consistency. pre.append('\\scalebox{%f}{' % (attrs['scale'] / 100.0,)) post.append('}') if 'width' in attrs: include_graphics_options.append('width=%s' % ( self.latex_image_length(attrs['width']), )) if 'height' in attrs: include_graphics_options.append('height=%s' % ( self.latex_image_length(attrs['height']), )) if 'align' in attrs: try: pre.append(align_prepost[inline, attrs['align']][0]) post.append(align_prepost[inline, attrs['align']][1]) except KeyError: pass # XXX complain here? if not inline: pre.append('\n') post.append('\n') pre.reverse() self.body.extend( pre ) options = '' if len(include_graphics_options)>0: options = '[%s]' % (','.join(include_graphics_options)) self.body.append( '\\includegraphics%s{%s}' % ( options, attrs['uri'] ) ) self.body.extend( post ) | ca2f22b1c4e8be5a06f234a03127244e2db8bd3c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1532/ca2f22b1c4e8be5a06f234a03127244e2db8bd3c/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
365,
18,
16175,
3292,
4660,
335,
92,
3546,
273,
365,
18,
4660,
335,
92,
67,
5610,
3422,
273,
756,
18,
4350,
468,
1436,
1316,
3699,
358,
4904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
365,
18,
16175,
3292,
4660,
335,
92,
3546,
273,
365,
18,
4660,
335,
92,
67,
5610,
3422,
273,
756,
18,
4350,
468,
1436,
1316,
3699,
358,
4904,
... |
atts['align'] = node['align'] | atts['class'] += " align-" + node['align'] | def visit_figure(self, node): atts = {'class': 'figure'} if node.get('width'): atts['style'] = 'width: %spx' % node['width'] if node.get('align'): atts['align'] = node['align'] self.body.append(self.starttag(node, 'div', **atts)) | 56c63b60aa36007ad9f919386a755e628ba4b2a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8194/56c63b60aa36007ad9f919386a755e628ba4b2a9/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
19675,
12,
2890,
16,
756,
4672,
15687,
273,
13666,
1106,
4278,
296,
19675,
11,
97,
309,
756,
18,
588,
2668,
2819,
11,
4672,
15687,
3292,
4060,
3546,
273,
296,
2819,
30,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
19675,
12,
2890,
16,
756,
4672,
15687,
273,
13666,
1106,
4278,
296,
19675,
11,
97,
309,
756,
18,
588,
2668,
2819,
11,
4672,
15687,
3292,
4060,
3546,
273,
296,
2819,
30,
738,
... |
if choice == 's': return text, False elif choice == 'e': editor = editarticle.TextEditor() newText = editor.edit(text, jumpIndex = match.start()) if newText: return newText, True else: return text, True elif choice == 'm': return self.handleNextLink(text, match, context = context + 100) else: new = match.group('label') or match.group('title') new += match.group('linktrail') return text[:match.start()] + new + text[match.end():], False | if choice == 's': return text, False elif choice == 'e': editor = editarticle.TextEditor() newText = editor.edit(text, jumpIndex = match.start()) if newText: return newText, True else: return text, True elif choice == 'm': return self.handleNextLink(text, match, context = context + 100) elif choice == 'a': self.always = True elif choice == 'q': self.done = True return text, False new = match.group('label') or match.group('title') new += match.group('linktrail') return text[:match.start()] + new + text[match.end():], False | def handleNextLink(self, text, match, context = 100): """ Returns a tuple (text, jumpToBeginning). text is the unicode string after the current link has been processed. jumpToBeginning is a boolean which specifies if the cursor position should be reset to 0. This is required after the user has edited the article. """ # ignore interwiki links and links to sections of the same page as well as section links if not match.group('title') or self.pageToUnlink.site().isInterwikiLink(match.group('title')) or match.group('section'): return text, False | 333c7adbfe5dafc20ddb17800987a60848d63725 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/333c7adbfe5dafc20ddb17800987a60848d63725/unlink.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
2134,
2098,
12,
2890,
16,
977,
16,
845,
16,
819,
273,
2130,
4672,
3536,
2860,
279,
3193,
261,
955,
16,
11833,
774,
8149,
2093,
2934,
977,
353,
326,
5252,
533,
1839,
326,
783,
169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
2134,
2098,
12,
2890,
16,
977,
16,
845,
16,
819,
273,
2130,
4672,
3536,
2860,
279,
3193,
261,
955,
16,
11833,
774,
8149,
2093,
2934,
977,
353,
326,
5252,
533,
1839,
326,
783,
169... |
if self.window.window.get_state() & gtk.gdk.WINDOW_STATE_WITHDRAWN: | if not self.window.window: | def trayaction_activate(self, status_icon): # Clicking on a gtk.StatusIcon: if not self.ignore_toggle_signal: # This prevents the user clicking twice in a row quickly # and having the second click not revert to the intial # state self.ignore_toggle_signal = True prev_state = self.UIManager.get_widget('/traymenu/showmenu').get_active() self.UIManager.get_widget('/traymenu/showmenu').set_active(not prev_state) if self.window.window.get_state() & gtk.gdk.WINDOW_STATE_WITHDRAWN: # window is hidden self.withdraw_app_undo() elif not (self.window.window.get_state() & gtk.gdk.WINDOW_STATE_WITHDRAWN): # window is showing self.withdraw_app() # This prevents the tooltip from popping up again until the user # leaves and enters the trayicon again #if self.traytips.notif_handler == None and self.traytips.notif_handler <> -1: # self.traytips._remove_timer() gobject.timeout_add(100, self.set_ignore_toggle_signal_false) | b6771580c235cbf7f0b7e95275fd82e4dcb413b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/b6771580c235cbf7f0b7e95275fd82e4dcb413b3/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
435,
1128,
67,
10014,
12,
2890,
16,
1267,
67,
3950,
4672,
468,
18417,
310,
603,
279,
22718,
18,
1482,
5554,
30,
309,
486,
365,
18,
6185,
67,
14401,
67,
10420,
30,
468,
1220,
17793... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
435,
1128,
67,
10014,
12,
2890,
16,
1267,
67,
3950,
4672,
468,
18417,
310,
603,
279,
22718,
18,
1482,
5554,
30,
309,
486,
365,
18,
6185,
67,
14401,
67,
10420,
30,
468,
1220,
17793... |
shape == None | shape = None | def F(dfn, dfd, shape=[]): """F(dfn, dfd) or F(dfn, dfd, [n, m, ...]) returns array of F distributed random numbers with dfn degrees of freedom in the numerator and dfd degrees of freedom in the denominator.""" if shape == []: shape == None return mt.f(dfn, dfd, shape) | dea664f86f0f24f0f999945e20f9b2042d6b159c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/dea664f86f0f24f0f999945e20f9b2042d6b159c/random_array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
478,
12,
2180,
82,
16,
3013,
72,
16,
2179,
33,
8526,
4672,
3536,
42,
12,
2180,
82,
16,
3013,
72,
13,
578,
478,
12,
2180,
82,
16,
3013,
72,
16,
306,
82,
16,
312,
16,
1372,
5717,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
478,
12,
2180,
82,
16,
3013,
72,
16,
2179,
33,
8526,
4672,
3536,
42,
12,
2180,
82,
16,
3013,
72,
13,
578,
478,
12,
2180,
82,
16,
3013,
72,
16,
306,
82,
16,
312,
16,
1372,
5717,
1... |
navmenuid='login') | navmenuid='youraccount') | def login(self, req, form): args = wash_urlargd(form, { 'p_un': (str, None), 'p_pw': (str, None), 'login_method': (str, None), 'action': (str, ''), 'referer': (str, '')}) | 4c876fe64fb130207f0be345ae26cff77b07aac9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/4c876fe64fb130207f0be345ae26cff77b07aac9/websession_webinterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
2890,
16,
1111,
16,
646,
4672,
833,
273,
341,
961,
67,
718,
3175,
72,
12,
687,
16,
288,
296,
84,
67,
318,
4278,
261,
701,
16,
599,
3631,
296,
84,
67,
14921,
4278,
261,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
2890,
16,
1111,
16,
646,
4672,
833,
273,
341,
961,
67,
718,
3175,
72,
12,
687,
16,
288,
296,
84,
67,
318,
4278,
261,
701,
16,
599,
3631,
296,
84,
67,
14921,
4278,
261,
70... |
>>> browser.getControl('Approved') <ItemControl ...> | >>> 'Indicate whether this project is approved by product reviewers.' in browser.contents True | >>> def browserLogin(id, password): | 65a8e09b38031e81f1eb9cb45d3108ba71865310 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12516/65a8e09b38031e81f1eb9cb45d3108ba71865310/test_reviewer_security.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
4748,
5358,
12,
350,
16,
2201,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
4748,
5358,
12,
350,
16,
2201,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self._inUseLED = ram.gui.led.LED(parent, state = 3) | self._enableLED = ram.gui.led.LED(parent, state = 0) | def _createControls(self, powerSource, parent): # Define custom color ranges yellow = wx.Color(255, 255, 0) colorList = [] valueList = [] if self._mode == PowerSourceDisplay.VOLTAGE: colorList = [wx.RED, yellow, wx.GREEN, yellow, wx.RED] valueList = [22, 25.5, 26.5, 29.5, 30, 31] elif self._mode == PowerSourceDisplay.CURRENT: colorList = [wx.GREEN, yellow, wx.RED] valueList = [0, 7, 9, 10] | d170db9cee3f309190f467021b22e8cd2c3fae11 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10608/d170db9cee3f309190f467021b22e8cd2c3fae11/controls.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
16795,
12,
2890,
16,
7212,
1830,
16,
982,
4672,
468,
13184,
1679,
2036,
7322,
20614,
273,
7075,
18,
2957,
12,
10395,
16,
4561,
16,
374,
13,
2036,
682,
273,
5378,
460,
682,
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,
2640,
16795,
12,
2890,
16,
7212,
1830,
16,
982,
4672,
468,
13184,
1679,
2036,
7322,
20614,
273,
7075,
18,
2957,
12,
10395,
16,
4561,
16,
374,
13,
2036,
682,
273,
5378,
460,
682,
2... |
"""Send a command to the server. """ | """Send a command to the server.""" | def putcmd(self, cmd, args=""): """Send a command to the server. """ str = '%s %s%s' % (cmd, args, CRLF) self.send(str) | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
4172,
12,
2890,
16,
1797,
16,
833,
1546,
6,
4672,
3536,
3826,
279,
1296,
358,
326,
1438,
12123,
609,
273,
1995,
87,
738,
87,
9,
87,
11,
738,
261,
4172,
16,
833,
16,
21791,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
4172,
12,
2890,
16,
1797,
16,
833,
1546,
6,
4672,
3536,
3826,
279,
1296,
358,
326,
1438,
12123,
609,
273,
1995,
87,
738,
87,
9,
87,
11,
738,
261,
4172,
16,
833,
16,
21791,
13,
... |
[Local data at Fractional ideal (-3*i - 2): | [Local data at Fractional ideal (2*i + 1): Reduction type: bad non-split multiplicative Local minimal model: Elliptic Curve defined by y^2 + (i+1)*x*y + y = x^3 over Number Field in i with defining polynomial x^2 + 1 Minimal discriminant valuation: 1 Conductor exponent: 1 Kodaira Symbol: I1 Tamagawa Number: 1, Local data at Fractional ideal (-3*i - 2): | def local_data(self, P=None, proof = None): r""" Local data for this elliptic curve at the prime `P`. | 829cfc94952c0c1813e9f7aef0851ba5cb4e5b39 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/829cfc94952c0c1813e9f7aef0851ba5cb4e5b39/ell_number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
67,
892,
12,
2890,
16,
453,
33,
7036,
16,
14601,
273,
599,
4672,
436,
8395,
3566,
501,
364,
333,
415,
549,
21507,
8882,
622,
326,
17014,
1375,
52,
8338,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
67,
892,
12,
2890,
16,
453,
33,
7036,
16,
14601,
273,
599,
4672,
436,
8395,
3566,
501,
364,
333,
415,
549,
21507,
8882,
622,
326,
17014,
1375,
52,
8338,
2,
-100,
-100,
-100,
-100... |
cmd = "d" | print "ERROR: unknown dumpmode:", self.dumpmode return | def dump_address(self, address): self.address_label.set_text("0x%06x" % address) if self.dumpmode == self._MEMDUMP: cmd = "m" else: cmd = "d" # request memory data from Hatari and wait until it's available self.hatari.debug_command("%s %06x" % (cmd, address)) self.memory_label.set_label(self.get_data()) self.address = address | a839da0699cb05f1e3add20b29be66d8dc90680a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2811/a839da0699cb05f1e3add20b29be66d8dc90680a/debugui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
67,
2867,
12,
2890,
16,
1758,
4672,
365,
18,
2867,
67,
1925,
18,
542,
67,
955,
2932,
20,
92,
9,
7677,
92,
6,
738,
1758,
13,
309,
365,
18,
8481,
3188,
422,
365,
6315,
958,
618... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
67,
2867,
12,
2890,
16,
1758,
4672,
365,
18,
2867,
67,
1925,
18,
542,
67,
955,
2932,
20,
92,
9,
7677,
92,
6,
738,
1758,
13,
309,
365,
18,
8481,
3188,
422,
365,
6315,
958,
618... |
self.assertRaises(Exception, test_view('sale_price_list')) | test_view('sale_price_list') | def test0005views(self): ''' Test views. ''' self.assertRaises(Exception, test_view('sale_price_list')) | c02959f642e6f2c7a8f3ee8fb080aa8f3280fdae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9287/c02959f642e6f2c7a8f3ee8fb080aa8f3280fdae/test_sale_price_list.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3784,
25,
7061,
12,
2890,
4672,
9163,
7766,
7361,
18,
9163,
365,
18,
11231,
12649,
6141,
12,
503,
16,
1842,
67,
1945,
2668,
87,
5349,
67,
8694,
67,
1098,
26112,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3784,
25,
7061,
12,
2890,
4672,
9163,
7766,
7361,
18,
9163,
365,
18,
11231,
12649,
6141,
12,
503,
16,
1842,
67,
1945,
2668,
87,
5349,
67,
8694,
67,
1098,
26112,
2,
-100,
-100,
-1... |
self.sources.append((file, 'tarball', extractDir, use, ())) def addPatch(self, file, level='1', backup='', extractDir='', keyid=None, use=None, macros=False, extraArgs=''): self._appendSource(file, keyid, 'patch', extractDir, use, (level, backup, macros, extraArgs)) def addSource(self, file, keyid=None, extractDir='', apply=None, use=None): self._appendSource(file, keyid, 'source', extractDir, use, (apply)) | self.sources.append((filename, 'tarball', extractDir, use, ())) def addPatch(self, filename, level='1', backup='', extractDir='', keyid=None, use=None, macros=False, extraArgs=''): self._appendSource(filename, keyid, 'patch', extractDir, use, (level, backup, macros, extraArgs)) def addSource(self, filename, keyid=None, extractDir='', apply=None, use=None, macros=False): self._appendSource(filename, keyid, 'source', extractDir, use, (apply, macros)) | def addArchiveFromRPM(self, rpm, file, extractDir='', use=None): | 7e87e4a2066ad87e01658b5a03e8e4dbdf32fde2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/7e87e4a2066ad87e01658b5a03e8e4dbdf32fde2/recipe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
7465,
1265,
54,
12728,
12,
2890,
16,
25228,
16,
585,
16,
2608,
1621,
2218,
2187,
999,
33,
7036,
4672,
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,
7465,
1265,
54,
12728,
12,
2890,
16,
25228,
16,
585,
16,
2608,
1621,
2218,
2187,
999,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
elif linehook: linehook(line) | def getreply(self, linehook=None): """Get a reply from the server. Returns a tuple consisting of: - server response code (e.g. '250', or such, if all goes well) Note: returns -1 if it can't read response code. - server response string corresponding to response code (note : multiline responses converted to a single, multiline string) """ resp=[] self.file = self.sock.makefile('rb') while 1: line = self.file.readline() if self.debuglevel > 0: print 'reply:', `line` resp.append(string.strip(line[4:])) code=line[:3] #check if multiline resp if line[3:4]!="-": break elif linehook: linehook(line) try: errcode = string.atoi(code) except(ValueError): errcode = -1 | 2fa5f60664065d7f143e96d9f7ecc34ac6c401ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2fa5f60664065d7f143e96d9f7ecc34ac6c401ed/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
10629,
12,
2890,
16,
980,
4476,
33,
7036,
4672,
3536,
967,
279,
4332,
628,
326,
1438,
18,
225,
2860,
279,
3193,
23570,
434,
30,
300,
1438,
766,
981,
261,
73,
18,
75,
18,
296,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
10629,
12,
2890,
16,
980,
4476,
33,
7036,
4672,
3536,
967,
279,
4332,
628,
326,
1438,
18,
225,
2860,
279,
3193,
23570,
434,
30,
300,
1438,
766,
981,
261,
73,
18,
75,
18,
296,
26... | |
name = "New Multi-Key Binding" | name = "Replace with Multi-Key Binding" | def action(self, index=-1, multiplier=1): KeystrokeRecording(self.mode, self.keyboard) | 101a4c61f894038c4fae88bb1224bd5d9e43cf25 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/101a4c61f894038c4fae88bb1224bd5d9e43cf25/keyboard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
2890,
16,
770,
29711,
21,
16,
15027,
33,
21,
4672,
1929,
16181,
21037,
12,
2890,
18,
3188,
16,
365,
18,
31486,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
2890,
16,
770,
29711,
21,
16,
15027,
33,
21,
4672,
1929,
16181,
21037,
12,
2890,
18,
3188,
16,
365,
18,
31486,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if self.browser is None: self.browser = WebBrowser(SIGNATURE, start = 1) self.browser.openfile(self.hits[i][1]) | path = self.hits[i][1] url = "file://" + "/".join(path.split(":")) webbrowser.open(url) | def listhit(self, isdbl = 1): if isdbl: for i in self.w.results.getselection(): if self.browser is None: self.browser = WebBrowser(SIGNATURE, start = 1) self.browser.openfile(self.hits[i][1]) | c4637cd08a9bbc96efb42cb813b77be74b9dae66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c4637cd08a9bbc96efb42cb813b77be74b9dae66/PyDocSearch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
15989,
12,
2890,
16,
353,
1966,
80,
273,
404,
4672,
309,
353,
1966,
80,
30,
364,
277,
316,
365,
18,
91,
18,
4717,
18,
588,
10705,
13332,
309,
365,
18,
11213,
353,
599,
30,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
15989,
12,
2890,
16,
353,
1966,
80,
273,
404,
4672,
309,
353,
1966,
80,
30,
364,
277,
316,
365,
18,
91,
18,
4717,
18,
588,
10705,
13332,
309,
365,
18,
11213,
353,
599,
30,
365,
... |
if pl.ordered_bases is None: | if pl.ordered_bases is None: | def make_or_unmake_crossover(twoPls, make = True, cmdname = None): "Make or Unmake (according to make option) a crossover, given Pl_recognizers for its two Pl atoms." # What we are doing is recognizing one local structure and replacing it with another # made from the same atoms. It'd sure be easier if I could do the manipulation in an mmp file, # save that somewhere, and read those to generate the operation! I'd have two sets of atoms, before and after, # and see how bonds and atomtypes got changed. # In this case it's not too hard to hand-code... I guess only the Pl atoms and their bonds are affected. # We probably do have to look at strand directions -- hmm, probably we should require them to exist before saying it's ok! # Or maybe better to give history error message when the command is chosen, saying you need to set them (or repair them) first... # Then we have to move the new/moved Pl atoms into a good position... # Note: Pl.ordered_bases are ordered by bond direction, to make this easier... # but if we want to patch up the directions in the end, do we need to care exactly which ones were defined? # or only "per-Pl"? hmm... it's per-Pl for now assert cmdname for pl in twoPls: if pl.ordered_bases is None: ###BUG: this could have various causes, not only the one reported below! Somehow we need access to the # message supplied to the RecognizerError, for use here. ###REVIEW: Does that mean it should pass through compute methods (probably in a controlled way) # rather than making computed values None? # Or, should the value not be None, but a "frozen" examinable and reraisable version of the error exception?? msg = "%s: Error: bond direction is locally undefined or inconsistent around %s" % (cmdname, pl.atom) ###UNTESTED env.history.message( redmsg( quote_html( msg))) return Pl1, Pl2 = twoPls a,b = Pl1.ordered_bases d,c = Pl2.ordered_bases # note: we use d,c rather than c,d so that the atom arrangement is as shown in the diagram below. # Note: the geometric arrangement is initially: # # c <-- Pl2 <-- d # # a --> Pl1 --> b # # and it ends up being (where dots indicate arrowheads, to show bond direction): # # c d # . / # \ . # Pl1 Pl2 # . \ # / . # a b # # Note: Pl1 stays attached to a, and Pl2 to d. Which two opposite bonds to preserve like that # is an arbitrary choice -- as long as Make and Unmake make the same choice about that, # they'll reverse each other's effects precisely (assuming the sugars were initially correct as Ss or Sj). # break the bonds we no longer want for obj1, obj2 in [(Pl1, b), (Pl2, c)]: bond = find_bond(obj1.atom, obj2.atom) bond.bust(make_bondpoints = False) # make the bonds we want and didn't already have for obj1, obj2 in [(Pl1, c), (Pl2, b)]: assert not atoms_are_bonded(obj1.atom, obj2.atom) ###e we should make bond_atoms do this assert itself, or maybe tolerate it (or does it already??) bond_atoms_faster(obj1.atom, obj2.atom, V_SINGLE) # set directions of all 4 bonds (even the preserved ones -- it's possible they were not set before, # if some but not all bonds had directions set in the part of a strand whose directions we look at.) for obj1, obj2 in [(a, Pl1), (Pl1, c), (d, Pl2), (Pl2, b)]: bond = find_bond(obj1.atom, obj2.atom) bond.set_bond_direction_from(obj1.atom, 1) # WARNING: after that bond rearrangement, don't use our Pl_recognizers in ways that depend on Pl bonding, # since it's not well defined whether they think about the old or new bonding to give their answers. Pl_atoms = Pl1.atom, Pl2.atom del Pl1, Pl2, twoPls # transmute base sugars to Sj or Ss as appropriate want = make and Element_Sj or Element_Ss for obj in (a,b,c,d): obj.atom.Transmute(want) # Note: we do this after the bond making/breaking so it doesn't add singlets which mess us up. # move Pl atoms into better positions # (someday, consider using local minimize; for now, just place them directly between their new neighbor atoms, # hopefully we leave them selected so user can easily do their own local minimize.) for pl in Pl_atoms: pl.setposn( average_value( map( lambda neighbor: neighbor.posn() , pl.neighbors() ))) env.history.message( greenmsg( cmdname + ": ") + quote_html("(%s - %s)" % tuple(Pl_atoms))) #e need assy.changed()? evidently not. return # from make_or_unmake_crossover | f3409c2827e88ba9c4c98914a03ed544d2b23aff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/f3409c2827e88ba9c4c98914a03ed544d2b23aff/crossovers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
280,
67,
318,
6540,
67,
14653,
1643,
12,
15415,
1749,
87,
16,
1221,
273,
1053,
16,
1797,
529,
273,
599,
4672,
315,
6464,
578,
1351,
6540,
261,
1077,
4643,
358,
1221,
1456,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
280,
67,
318,
6540,
67,
14653,
1643,
12,
15415,
1749,
87,
16,
1221,
273,
1053,
16,
1797,
529,
273,
599,
4672,
315,
6464,
578,
1351,
6540,
261,
1077,
4643,
358,
1221,
1456,
13... |
"constructor; pass source code, and optionally 'twee' or 'html'" | """Pass source code, and optionally 'twee' or 'html'""" | def __init__ (self, source, type = 'twee'): "constructor; pass source code, and optionally 'twee' or 'html'" if type == 'twee': self.init_twee(source) else: self.init_html(source) | 6c1969959d8e0961fa5075dac2f76e60b7f2c5fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11433/6c1969959d8e0961fa5075dac2f76e60b7f2c5fe/tiddlywiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
1084,
16,
618,
273,
296,
11246,
1340,
11,
4672,
3536,
6433,
1084,
981,
16,
471,
8771,
296,
11246,
1340,
11,
578,
296,
2620,
11,
8395,
309,
618,
422,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
261,
2890,
16,
1084,
16,
618,
273,
296,
11246,
1340,
11,
4672,
3536,
6433,
1084,
981,
16,
471,
8771,
296,
11246,
1340,
11,
578,
296,
2620,
11,
8395,
309,
618,
422,
296... |
where p is a prime such that `X_0(p)` has genus 0. | where `p` is a prime such that `X_0(p)` has genus 0. | def OverconvergentModularForms(prime, weight, radius, base_ring=QQ, prec = 20, char = None): r""" Create a space of overconvergent `p`-adic modular forms of level `\Gamma_0(p)`, over the given base ring. The base ring need not be a `p`-adic ring (the spaces we compute with typically have bases over `\QQ`). INPUT: - ``prime`` - a prime number `p`, which must be one of the primes `\{2, 3, 5, 7, 13\}`, or the congruence subgroup Gamma0(p) where p is one of these primes. - ``weight`` - an integer (which at present must be 0 or `\ge 2`), the weight. - ``radius`` - a rational number in the interval `\left( 0, \frac{p}{p+1} \right)`, the radius of overconvergence. - ``base_ring`` (default: `\QQ`), a ring over which to compute. This need not be a `p`-adic ring. - ``prec`` - an integer (default: 20), the number of `q`-expansion terms to compute. - ``char`` - a Dirichlet character modulo `p` or ``None`` (the default). Here ``None`` is interpreted as the trivial character modulo `p`. The character `\chi` and weight `k` must satisfy `(-1)^k = \chi(-1)`, and the base ring must contain an element `v` such that `{\rm ord}_p(v) = \frac{12 r}{p-1}` where `r` is the radius of overconvergence (and `{\rm ord}_p` is normalised so `{\rm ord}_p(p) = 1`). EXAMPLES:: sage: OverconvergentModularForms(3, 0, 1/2) Space of 3-adic 1/2-overconvergent modular forms of weight-character 0 over Rational Field sage: OverconvergentModularForms(3, 16, 1/2) Space of 3-adic 1/2-overconvergent modular forms of weight-character 16 over Rational Field sage: OverconvergentModularForms(3, 3, 1/2, char = DirichletGroup(3,QQ).0) Space of 3-adic 1/2-overconvergent modular forms of weight-character (3, 3, [-1]) over Rational Field """ if is_Gamma0(prime) or is_Gamma1(prime): prime = prime.level() else: prime = ZZ(prime) if char is None: char = trivial_character(prime, base_ring=QQ) if int(prime) not in [2, 3, 5, 7, 13]: raise ValueError, "p must be one of {2, 3, 5, 7, 13}" key = (prime, weight, radius, base_ring, prec, char) if __ocmfdict.has_key(key): w = __ocmfdict[key] M = w() if not (M is None): return M M = OverconvergentModularFormsSpace(*key) __ocmfdict[key] = weakref.ref(M) return M | b526c3d210b712e2659f9ba0fab589c5ff5e9564 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/b526c3d210b712e2659f9ba0fab589c5ff5e9564/genus0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10752,
591,
502,
75,
319,
1739,
2490,
18529,
12,
16382,
16,
3119,
16,
5725,
16,
1026,
67,
8022,
33,
53,
53,
16,
13382,
273,
4200,
16,
1149,
273,
599,
4672,
436,
8395,
1788,
279,
3476,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10752,
591,
502,
75,
319,
1739,
2490,
18529,
12,
16382,
16,
3119,
16,
5725,
16,
1026,
67,
8022,
33,
53,
53,
16,
13382,
273,
4200,
16,
1149,
273,
599,
4672,
436,
8395,
1788,
279,
3476,
... |
def __new__(cls, output_paramters, stream): | def __new__(cls, output_parameters, stream): | def __new__(cls, output_paramters, stream): # Attempt to switch to the "true" writer as soon as possible cls = cls._lookup(output_paramters) return streamwriter.__new__(cls, output_paramters, stream) | 74e87f1564798d630a4711cb91fd8cf5e7718ea0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14078/74e87f1564798d630a4711cb91fd8cf5e7718ea0/proxywriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2704,
972,
12,
6429,
16,
876,
67,
3977,
16,
1407,
4672,
468,
12864,
358,
1620,
358,
326,
315,
3767,
6,
2633,
487,
17136,
487,
3323,
2028,
273,
2028,
6315,
8664,
12,
2844,
67,
891... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2704,
972,
12,
6429,
16,
876,
67,
3977,
16,
1407,
4672,
468,
12864,
358,
1620,
358,
326,
315,
3767,
6,
2633,
487,
17136,
487,
3323,
2028,
273,
2028,
6315,
8664,
12,
2844,
67,
891... |
if real_last_text_version and real_last_text_version != self.last_text_version: | if real_last_text_version and real_last_text_version != last_text_version: | def update_denorm_fields(self): real_last_text_version = self.fetch_latest_version() modif = False if real_last_text_version and real_last_text_version != self.last_text_version: self.last_text_version = real_last_text_version modif = True if real_last_text_version and real_last_text_version.title and real_last_text_version.title != self.title: self.title = real_last_text_version.title modif = True if real_last_text_version and real_last_text_version.modified != self.modified: self.modified = real_last_text_version.modified modif = True if modif: self.save() | c7f22fd9ae5501491bebb7097c2473d86c332ccb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5622/c7f22fd9ae5501491bebb7097c2473d86c332ccb/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
13002,
535,
67,
2821,
12,
2890,
4672,
2863,
67,
2722,
67,
955,
67,
1589,
273,
365,
18,
5754,
67,
13550,
67,
1589,
1435,
225,
681,
430,
273,
1083,
309,
2863,
67,
2722,
67,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
13002,
535,
67,
2821,
12,
2890,
4672,
2863,
67,
2722,
67,
955,
67,
1589,
273,
365,
18,
5754,
67,
13550,
67,
1589,
1435,
225,
681,
430,
273,
1083,
309,
2863,
67,
2722,
67,
9... |
sage: print genus(T1, T2) | sage: genus(T1, T2) | def genus(T1, T2): """ Returns the genus of hypermap embedding associated with the bitrade (T1, T2). Informally, we compute the [tau_1, tau_2, tau_3] permutation representation of the bitrade. Each cycle of tau_1, tau_2, and tau_3 gives a rotation scheme for a black, white, and star vertex (respectively). The genus then comes from Euler's formula. For more details see Carlo Hamalainen: Partitioning 3-homogeneous latin bitrades. To appear in Geometriae Dedicata, available at http://arxiv.org/abs/0710.0938 EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: (a, b, c, G) = alternating_group_bitrade_generators(1) sage: (T1, T2) = bitrade_from_group(a, b, c, G) sage: print genus(T1, T2) 1 sage: (a, b, c, G) = pq_group_bitrade_generators(3, 7) sage: (T1, T2) = bitrade_from_group(a, b, c, G) sage: print genus(T1, T2) 3 """ cells_map, t1, t2, t3 = tau123(T1, T2) return (len(t1.to_cycles()) + len(t2.to_cycles()) + len(t3.to_cycles()) - T1.nr_filled_cells() - 2)/(-2) | 494f2bd1cd82ea9dcc25f8e258b7375812aed1c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/494f2bd1cd82ea9dcc25f8e258b7375812aed1c9/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
407,
12,
56,
21,
16,
399,
22,
4672,
3536,
2860,
326,
3157,
407,
434,
9512,
1458,
15853,
3627,
598,
326,
2831,
354,
323,
261,
56,
21,
16,
399,
22,
2934,
657,
687,
1230,
16,
732,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
407,
12,
56,
21,
16,
399,
22,
4672,
3536,
2860,
326,
3157,
407,
434,
9512,
1458,
15853,
3627,
598,
326,
2831,
354,
323,
261,
56,
21,
16,
399,
22,
2934,
657,
687,
1230,
16,
732,... |
page_start(req, of, cc, as, ln, uid) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", rm="", of="id", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", recid="-1", recidb="-1", sysno="", id="-1", idb="-1", sysnb="", action="", d1y="0", d1m="0", d1d="0", d2y="0", d2m="0", d2d="0", verbose="0", ap="0", ln=cdslang): """Perform search or browse request, without checking for authentication. Return list of recIDs found, if of=id. Otherwise create web page. The arguments are as follows: req - mod_python Request class instance. cc - current collection (e.g. "ATLAS"). The collection the user started to search/browse from. c - collectin list (e.g. ["Theses", "Books"]). The collections user may have selected/deselected when starting to search from 'cc'. p - pattern to search for (e.g. "ellis and muon or kaon"). f - field to search within (e.g. "author"). rg - records in groups of (e.g. "10"). Defines how many hits per collection in the search results page are displayed. sf - sort field (e.g. "title"). so - sort order ("a"=ascending, "d"=descending). sp - sort pattern (e.g. "CERN-") -- in case there are more values in a sort field, this argument tells which one to prefer rm - ranking method (e.g. "jif"). Defines whether results should be ranked by some known ranking method. of - output format (e.g. "hb"). Usually starting "h" means HTML output (and "hb" for HTML brief, "hd" for HTML detailed), "x" means XML output, "t" means plain text output, "id" means no output at all but to return list of recIDs found. (Suitable for high-level API.) ot - output only these MARC tags (e.g. "100,700,909C0b"). Useful if only some fields are to be shown in the output, e.g. for library to control some fields. as - advanced search ("0" means no, "1" means yes). Whether search was called from within the advanced search interface. p1 - first pattern to search for in the advanced search interface. Much like 'p'. f1 - first field to search within in the advanced search interface. Much like 'f'. m1 - first matching type in the advanced search interface. ("a" all of the words, "o" any of the words, "e" exact phrase, "p" partial phrase, "r" regular expression). op1 - first operator, to join the first and the second unit in the advanced search interface. ("a" add, "o" or, "n" not). p2 - second pattern to search for in the advanced search interface. Much like 'p'. f2 - second field to search within in the advanced search interface. Much like 'f'. m2 - second matching type in the advanced search interface. ("a" all of the words, "o" any of the words, "e" exact phrase, "p" partial phrase, "r" regular expression). op2 - second operator, to join the second and the third unit in the advanced search interface. ("a" add, "o" or, "n" not). p3 - third pattern to search for in the advanced search interface. Much like 'p'. f3 - third field to search within in the advanced search interface. Much like 'f'. m3 - third matching type in the advanced search interface. ("a" all of the words, "o" any of the words, "e" exact phrase, "p" partial phrase, "r" regular expression). sc - split by collection ("0" no, "1" yes). Governs whether we want to present the results in a single huge list, or splitted by collection. jrec - jump to record (e.g. "234"). Used for navigation inside the search results. recid - display record ID (e.g. "20000"). Do not search/browse but go straight away to the Detailed record page for the given recID. recidb - display record ID bis (e.g. "20010"). If greater than 'recid', then display records from recid to recidb. Useful for example for dumping records from the database for reformatting. sysno - display old system SYS number (e.g. ""). If you migrate to CDSware from another system, and store your old SYS call numbers, you can use them instead of recid if you wish so. id - the same as recid, in case recid is not set. For backwards compatibility. idb - the same as recid, in case recidb is not set. For backwards compatibility. sysnb - the same as sysno, in case sysno is not set. For backwards compatibility. action - action to do. "SEARCH" for searching, "Browse" for browsing. Default is to search. d1y - first date year (e.g. "1998"). Useful for search limits on creation date. d1m - first date month (e.g. "08"). Useful for search limits on creation date. d1d - first date day (e.g. "23"). Useful for search limits on creation date. d2y - second date year (e.g. "1998"). Useful for search limits on creation date. d2m - second date month (e.g. "09"). Useful for search limits on creation date. d2d - second date day (e.g. "02"). Useful for search limits on creation date. verbose - verbose level (0=min, 9=max). Useful to print some internal information on the searching process in case something goes wrong. ap - alternative patterns (0=no, 1=yes). In case no exact match is found, the search engine can try alternative patterns e.g. to replace non-alphanumeric characters by a boolean query. ap defines if this is wanted. ln - language of the search interface (e.g. "en"). Useful for internationalization. """ # wash all passed arguments: cc = wash_url_argument(cc, 'str') sc = wash_url_argument(sc, 'int') (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) # which colls to search and to display? p = wash_pattern(wash_url_argument(p, 'str')) f = wash_field(wash_url_argument(f, 'str')) rg = wash_url_argument(rg, 'int') sf = wash_url_argument(sf, 'str') so = wash_url_argument(so, 'str') sp = wash_url_argument(sp, 'str') rm = wash_url_argument(rm, 'str') of = wash_url_argument(of, 'str') if type(ot) is list: ot = string.join(ot,",") ot = wash_url_argument(ot, 'str') as = wash_url_argument(as, 'int') p1 = wash_pattern(wash_url_argument(p1, 'str')) f1 = wash_field(wash_url_argument(f1, 'str')) m1 = wash_url_argument(m1, 'str') op1 = wash_url_argument(op1, 'str') p2 = wash_pattern(wash_url_argument(p2, 'str')) f2 = wash_field(wash_url_argument(f2, 'str')) m2 = wash_url_argument(m2, 'str') op2 = wash_url_argument(op2, 'str') p3 = wash_pattern(wash_url_argument(p3, 'str')) f3 = wash_field(wash_url_argument(f3, 'str')) m3 = wash_url_argument(m3, 'str') jrec = wash_url_argument(jrec, 'int') recid = wash_url_argument(recid, 'int') recidb = wash_url_argument(recidb, 'int') sysno = wash_url_argument(sysno, 'str') id = wash_url_argument(id, 'int') idb = wash_url_argument(idb, 'int') sysnb = wash_url_argument(sysnb, 'str') action = wash_url_argument(action, 'str') d1y = wash_url_argument(d1y, 'int') d1m = wash_url_argument(d1m, 'int') d1d = wash_url_argument(d1d, 'int') d2y = wash_url_argument(d2y, 'int') d2m = wash_url_argument(d2m, 'int') d2d = wash_url_argument(d2d, 'int') day1, day2 = wash_dates(d1y, d1m, d1d, d2y, d2m, d2d) verbose = wash_url_argument(verbose, 'int') ap = wash_url_argument(ap, 'int') ln = wash_language(ln) # backwards compatibility: id, idb, sysnb -> recid, recidb, sysno (if applicable) if sysnb != "" and sysno == "": sysno = sysnb if id > 0 and recid == -1: recid = id if idb > 0 and recidb == -1: recidb = idb # TODO deduce passed search limiting criterias (if applicable) pl, pl_in_url = "", "" # no limits by default if action != msg_browse[ln] and req and req.args: # we do not want to add options while browsing or while calling via command-line fieldargs = cgi.parse_qs(req.args) for fieldcode in get_fieldcodes(): if fieldargs.has_key(fieldcode): for val in fieldargs[fieldcode]: pl += "+%s:\"%s\" " % (fieldcode, val) pl_in_url += "&%s=%s" % (urllib.quote(fieldcode), urllib.quote(val)) # deduce recid from sysno argument (if applicable): if sysno: # ALEPH SYS number was passed, so deduce MySQL recID for the record: recid = get_mysql_recid_from_aleph_sysno(sysno) # deduce collection we are in (if applicable): if recid>0: cc = guess_primary_collection_of_a_record(recid) # deduce user id (if applicable): try: uid = getUid(req) except: uid = 0 ## 0 - start output page_start(req, of, cc, as, ln, uid) if recid>0: ## 1 - detailed record display if of == "hb": of = "hd" if record_exists(recid): if recidb<=recid: # sanity check recidb=recid+1 print_records(req, range(recid,recidb), -1, -9999, of, ot, ln) else: # record does not exist if of.startswith("h"): print_warning(req, "Requested record does not seem to exist.") elif action == msg_browse[ln]: ## 2 - browse needed if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, action)) try: if as==1 or (p1 or p2 or p3): browse_pattern(req, colls_to_search, p1, f1, rg) browse_pattern(req, colls_to_search, p2, f2, rg) browse_pattern(req, colls_to_search, p3, f3, rg) else: browse_pattern(req, colls_to_search, p, f, rg) except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) return page_end(req, of, ln) else: ## 3 - search needed if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, action)) t1 = os.times()[4] results_in_any_collection = HitSet() if as == 1 or (p1 or p2 or p3): ## 3A - advanced search try: results_in_any_collection = search_pattern(req, p1, f1, m1, ap=ap, of=of, verbose=verbose, ln=ln) if results_in_any_collection._nbhits == 0: return page_end(req, of, ln) if p2: results_tmp = search_pattern(req, p2, f2, m2, ap=ap, of=of, verbose=verbose, ln=ln) if op1 == "a": # add results_in_any_collection.intersect(results_tmp) elif op1 == "o": # or results_in_any_collection.union(results_tmp) elif op1 == "n": # not results_in_any_collection.difference(results_tmp) else: if of.startswith("h"): print_warning(req, "Invalid set operation %s." % op1, "Error") results_in_any_collection.calculate_nbhits() if results_in_any_collection._nbhits == 0: return page_end(req, of, ln) if p3: results_tmp = search_pattern(req, p3, f3, m3, ap=ap, of=of, verbose=verbose, ln=ln) if op2 == "a": # add results_in_any_collection.intersect(results_tmp) elif op2 == "o": # or results_in_any_collection.union(results_tmp) elif op2 == "n": # not results_in_any_collection.difference(results_tmp) else: if of.startswith("h"): print_warning(req, "Invalid set operation %s." % op2, "Error") results_in_any_collection.calculate_nbhits() except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) return page_end(req, of, ln) else: ## 3B - simple search try: results_in_any_collection = search_pattern(req, p, f, ap=ap, of=of, verbose=verbose, ln=ln) except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) return page_end(req, of, ln) if results_in_any_collection._nbhits == 0: return page_end(req, of, ln) | 97eb228b38eb0d434005896f76d64b6d3daf7801 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/97eb228b38eb0d434005896f76d64b6d3daf7801/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
2293,
67,
3072,
12,
3658,
33,
7036,
16,
4946,
33,
71,
2377,
529,
16,
276,
33,
7036,
16,
293,
1546,
3113,
284,
1546,
3113,
14524,
1546,
2163,
3113,
9033,
1546,
3113,
1427,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
2293,
67,
3072,
12,
3658,
33,
7036,
16,
4946,
33,
71,
2377,
529,
16,
276,
33,
7036,
16,
293,
1546,
3113,
284,
1546,
3113,
14524,
1546,
2163,
3113,
9033,
1546,
3113,
1427,
154... | |
dist_s += (at.md_virial[i,j] - at.dft_virial[i,j])**2.0 | dist_s += (at.md_stress[i,j] - at.dft_stress[i,j])**2.0 | def costfn(config_list, pot, wf=1.0, ws=0.5, we=0.1, bulk_mod=2000.0/294156.6447): s = fzeros((3,3)) normweight = sqrt(wf*wf + ws*ws + we*we) wf /= normweight ws /= normweight we /= normweight dist_f = 0.0; norm_f = 0.0 dist_e = 0.0; norm_e = 0.0 dist_s = 0.0; norm_s = 0.0 for ati, at in enumerate(config_list): pot.calc(at, virial=s, calc_force=True, calc_energy=True) at.params['md_energy'] = at.params['energy'] / HARTREE at.params['md_virial'] = s / (HARTREE/(BOHR**3)) at.md_force = at.force / (HARTREE/BOHR) for i in frange(at.n): for j in (1,2,3): dist_f += (at.md_force[j,i] - at.dft_force[j,i])**2.0 norm_f += at.dft_force[j,i]**2.0 for i in (1,2,3): for j in (1,2,3): dist_s += (at.md_virial[i,j] - at.dft_virial[i,j])**2.0 norm_s += bulk_mod**2.0 for i, ati in enumerate(config_list): for j, atj in enumerate(config_list): if j <= i: continue diff_md = ati.md_energy - atj.md_energy diff_ai = ati.dft_energy - atj.dft_energy norm_e += diff_ai**2.0 dist_e += (diff_md - diff_ai)**2.0 dist_f = sqrt(dist_f / norm_f) dist_s = sqrt(dist_s / norm_s) dist_e = sqrt(dist_e / norm_e) return config_list, (wf*dist_f + ws*dist_s + we*dist_e, dist_f, dist_s, dist_e) | c678eb69f4e3322139aeed2586b2b437a89e282f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/c678eb69f4e3322139aeed2586b2b437a89e282f/sio2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6991,
4293,
12,
1425,
67,
1098,
16,
5974,
16,
11578,
33,
21,
18,
20,
16,
4945,
33,
20,
18,
25,
16,
732,
33,
20,
18,
21,
16,
8280,
67,
1711,
33,
17172,
18,
20,
19,
5540,
24,
28946... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6991,
4293,
12,
1425,
67,
1098,
16,
5974,
16,
11578,
33,
21,
18,
20,
16,
4945,
33,
20,
18,
25,
16,
732,
33,
20,
18,
21,
16,
8280,
67,
1711,
33,
17172,
18,
20,
19,
5540,
24,
28946... |
self.statemachine.node += self.unindentwarning() | self.statemachine.node += self.unindent_warning('Field list') | def field_marker(self, match, context, nextstate): """Field list item.""" fieldlist = nodes.field_list() self.statemachine.node += fieldlist field, blankfinish = self.field(match) fieldlist += field offset = self.statemachine.lineoffset + 1 # next line newlineoffset, blankfinish = self.nestedlistparse( self.statemachine.inputlines[offset:], inputoffset=self.statemachine.abslineoffset() + 1, node=fieldlist, initialstate='FieldList', blankfinish=blankfinish) if not blankfinish: self.statemachine.node += self.unindentwarning() self.gotoline(newlineoffset) return [], nextstate, [] | 519a9371a95abd6fdb5d1592e8f592b84dddf678 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/519a9371a95abd6fdb5d1592e8f592b84dddf678/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
652,
67,
11145,
12,
2890,
16,
845,
16,
819,
16,
1024,
2019,
4672,
3536,
974,
666,
761,
12123,
652,
1098,
273,
2199,
18,
1518,
67,
1098,
1435,
365,
18,
2019,
9149,
18,
2159,
1011,
652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
652,
67,
11145,
12,
2890,
16,
845,
16,
819,
16,
1024,
2019,
4672,
3536,
974,
666,
761,
12123,
652,
1098,
273,
2199,
18,
1518,
67,
1098,
1435,
365,
18,
2019,
9149,
18,
2159,
1011,
652,
... |
linker_so=('%s -mcygwin -mdll' % self.linker_dll)) | linker_so=('%s -mcygwin %s' % (self.linker_dll, shared_option))) | def __init__ (self, verbose=0, dry_run=0, force=0): | 11b3a6bf462f6f71f82b49e533ac03e7b26e2227 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11b3a6bf462f6f71f82b49e533ac03e7b26e2227/cygwinccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
16,
2944,
33,
20,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
261,
2890,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
16,
2944,
33,
20,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
program = [('version', '1.5'), | program = [('version', '1.6'), | def test_translate_static_text_as_dynamic_from_bytecode(self): program = [('version', '1.5'), | 7a4a610b6943a4f0e0eff9fe7a51800ee82104d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7a4a610b6943a4f0e0eff9fe7a51800ee82104d5/test_talinterpreter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13929,
67,
3845,
67,
955,
67,
345,
67,
14507,
67,
2080,
67,
1637,
16651,
12,
2890,
4672,
5402,
273,
225,
306,
2668,
1589,
2187,
296,
21,
18,
25,
19899,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13929,
67,
3845,
67,
955,
67,
345,
67,
14507,
67,
2080,
67,
1637,
16651,
12,
2890,
4672,
5402,
273,
225,
306,
2668,
1589,
2187,
296,
21,
18,
25,
19899,
2,
-100,
-100,
-100,
... |
return None | return [] | def textToDns(text): """ Search for possible DNS in an arbitrary text. """ match = re.findall("\w*\.\w*\.\w*", text) if match: return match else: return None | 8312439b4df870685d3e7b1f2c140b8dd54be72e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12786/8312439b4df870685d3e7b1f2c140b8dd54be72e/dns.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
977,
774,
18600,
12,
955,
4672,
3536,
5167,
364,
3323,
8858,
316,
392,
11078,
977,
18,
3536,
845,
273,
283,
18,
4720,
454,
31458,
91,
14,
19002,
91,
14,
19002,
91,
14,
3113,
977,
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,
977,
774,
18600,
12,
955,
4672,
3536,
5167,
364,
3323,
8858,
316,
392,
11078,
977,
18,
3536,
845,
273,
283,
18,
4720,
454,
31458,
91,
14,
19002,
91,
14,
19002,
91,
14,
3113,
977,
13,
... |
os.remove(group.get_logo_filename()) | os.remove(group.logo.path) | def edit_group(request, group, is_admin=False): """Edit group properties""" old_logo = group.get_logo_filename() if request.method == 'POST': form = GroupForm(data=request.POST, files=request.FILES, instance=group, user=request.user) if form.is_valid(): form.save() if old_logo and old_logo != group.get_logo_filename(): os.remove(old_logo) elif 'delete_logo' in form.cleaned_data and old_logo: os.remove(group.get_logo_filename()) group.logo = '' group.save() request.user.message_set.create( message=_('Group successfully updated')) return HttpResponseRedirect(reverse('group-summary', args=(group.slug,))) else: form = GroupForm(instance=group) return render_to_response('common/group_form.html', { 'is_admin': is_admin, 'group': group, 'form': form, }, context_instance=RequestContext(request)) | 786ead23892b46b51a45b4469327037e4d4be279 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12178/786ead23892b46b51a45b4469327037e4d4be279/edit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
67,
1655,
12,
2293,
16,
1041,
16,
353,
67,
3666,
33,
8381,
4672,
3536,
4666,
1041,
1790,
8395,
225,
1592,
67,
19882,
273,
1041,
18,
588,
67,
19882,
67,
3459,
1435,
225,
309,
590,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
67,
1655,
12,
2293,
16,
1041,
16,
353,
67,
3666,
33,
8381,
4672,
3536,
4666,
1041,
1790,
8395,
225,
1592,
67,
19882,
273,
1041,
18,
588,
67,
19882,
67,
3459,
1435,
225,
309,
590,... |
if (not os.path.isdir(os.path.join(dir, "icons"))): | if (not os.path.isdir(os.path.join(dir, DEFAULT_WBROOT))): | def check_source(dir): if (not os.path.isdir(dir)): raise InstallError("\n\nSource directory " + dir + " does not exist!") if (not os.path.isdir(os.path.join(dir, "icons"))): raise InstallError("\n\nSource directory does not seem to be valid:\n"+\ os.path.join(dir, "icons") + " not found.") | acf559e6e5de1c1854bbf63e6dc9e1b4740212a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8183/acf559e6e5de1c1854bbf63e6dc9e1b4740212a6/tomb-install-dist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
3168,
12,
1214,
4672,
309,
261,
902,
1140,
18,
803,
18,
291,
1214,
12,
1214,
3719,
30,
1002,
10284,
668,
31458,
82,
64,
82,
1830,
1867,
315,
397,
1577,
397,
315,
1552,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
3168,
12,
1214,
4672,
309,
261,
902,
1140,
18,
803,
18,
291,
1214,
12,
1214,
3719,
30,
1002,
10284,
668,
31458,
82,
64,
82,
1830,
1867,
315,
397,
1577,
397,
315,
1552,
486,
... |
self -- a p-adic ring x -- an integer or element of $\Z / p\Z$ that is not divisible by $p$ OUTPUT: element -- the teichmuller lift of x EXAMPLES: sage: R = Zp(5, 10, 'capped-rel', 'series') sage: R.teichmuller(2) 2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10) sage: R = Qp(5, 10,'capped-rel','series') sage: R.teichmuller(2) 2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10) sage: R = Zp(5, 10, 'capped-abs', 'series') sage: R.teichmuller(2) 2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10) sage: R = Zp(5, 10, 'fixed-mod', 'series') sage: R.teichmuller(2) 2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10) | self -- a p-adic ring x -- something that can be cast into self OUTPUT: element -- the teichmuller lift of x EXAMPLES: sage: R = Zp(5, 10, 'capped-rel', 'series') sage: R.teichmuller(2) 2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10) sage: R = Qp(5, 10,'capped-rel','series') sage: R.teichmuller(2) 2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10) sage: R = Zp(5, 10, 'capped-abs', 'series') sage: R.teichmuller(2) 2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10) sage: R = Zp(5, 10, 'fixed-mod', 'series') sage: R.teichmuller(2) 2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10) sage: R = Zp(5,5) sage: S.<x> = R[] sage: f = x^5 + 75*x^3 - 15*x^2 +125*x - 5 sage: W.<w> = R.ext(f) sage: y = W.teichmuller(3); y 3 + 3*w^5 + w^7 + 2*w^9 + 2*w^10 + 4*w^11 + w^12 + 2*w^13 + 3*w^15 + 2*w^16 + 3*w^17 + w^18 + 3*w^19 + 3*w^20 + 2*w^21 + 2*w^22 + 3*w^23 + 4*w^24 + O(w^25) sage: y^5 == y True sage: g = x^3 + 3*x + 3 sage: A.<a> = R.ext(g) sage: b = A.teichmuller(1 + 2*a - a^2); b (4*a^2 + 2*a + 1) + 2*a*5 + (3*a^2 + 1)*5^2 + (a + 4)*5^3 + (a^2 + a + 1)*5^4 + O(5^5) sage: b^125 == b True | def teichmuller(self, x, prec = None): r""" Returns the teichmuller representative of x. | 30a764f77f807a9f30b4503dfb3c45d3268a9450 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/30a764f77f807a9f30b4503dfb3c45d3268a9450/padic_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6489,
1354,
81,
420,
264,
12,
2890,
16,
619,
16,
13382,
273,
599,
4672,
436,
8395,
2860,
326,
6489,
1354,
81,
420,
264,
23174,
434,
619,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6489,
1354,
81,
420,
264,
12,
2890,
16,
619,
16,
13382,
273,
599,
4672,
436,
8395,
2860,
326,
6489,
1354,
81,
420,
264,
23174,
434,
619,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
unicode_names.append( (ix, unicodedata.name(unichr(ix))) ) | unicode_names.append((ix, unicodedata.name(unichr(ix)))) | def main(args): unicode_names= [] for ix in range(sys.maxunicode+1): try: unicode_names.append( (ix, unicodedata.name(unichr(ix))) ) except ValueError: # no name for the character pass for arg in args: pat = re.compile(arg, re.I) matches = [(x,y) for (x,y) in unicode_names if pat.search(y) is not None] if matches: print "***", arg, "matches", "***" for (x,y) in matches: print "%s (%d)" % (y,x) | 3c531ff74ae7d943b8c50bdd89b1f0393015b964 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/3c531ff74ae7d943b8c50bdd89b1f0393015b964/find-uname.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
5252,
67,
1973,
33,
5378,
364,
8288,
316,
1048,
12,
9499,
18,
1896,
9124,
15,
21,
4672,
775,
30,
5252,
67,
1973,
18,
6923,
12443,
697,
16,
5252,
892,
18,
529,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
5252,
67,
1973,
33,
5378,
364,
8288,
316,
1048,
12,
9499,
18,
1896,
9124,
15,
21,
4672,
775,
30,
5252,
67,
1973,
18,
6923,
12443,
697,
16,
5252,
892,
18,
529,
1... |
if not self.podcast_list_can_tooltip: | if not self.podcast_list_can_tooltip or (column is not None and column != treeview.get_columns()[0]): | def treeview_channels_query_tooltip(self, treeview, x, y, keyboard_tooltip, tooltip): (path, column, rx, ry) = treeview.get_path_at_pos( x, y) or (None,)*4 | e14200a9ba1c18883fbd91a008db394fec8f52c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/e14200a9ba1c18883fbd91a008db394fec8f52c6/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2151,
1945,
67,
9114,
67,
2271,
67,
19798,
12,
2890,
16,
2151,
1945,
16,
619,
16,
677,
16,
16263,
67,
19798,
16,
11915,
4672,
261,
803,
16,
1057,
16,
8581,
16,
16826,
13,
273,
2151,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2151,
1945,
67,
9114,
67,
2271,
67,
19798,
12,
2890,
16,
2151,
1945,
16,
619,
16,
677,
16,
16263,
67,
19798,
16,
11915,
4672,
261,
803,
16,
1057,
16,
8581,
16,
16826,
13,
273,
2151,
... |
static void *gen_userdata(int no) { | static void *gen_userdata(int no, int nr ATTRIBUTE_UNUSED) { | def is_known_param_type(name): for type in known_param_types: if type == name: return 1 return 0 | 3d97e669eca6f4849c7b3014f472cacc57817015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/3d97e669eca6f4849c7b3014f472cacc57817015/gentest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2994,
67,
891,
67,
723,
12,
529,
4672,
364,
618,
316,
4846,
67,
891,
67,
2352,
30,
309,
618,
422,
508,
30,
327,
404,
327,
374,
225,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2994,
67,
891,
67,
723,
12,
529,
4672,
364,
618,
316,
4846,
67,
891,
67,
2352,
30,
309,
618,
422,
508,
30,
327,
404,
327,
374,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.write(line) | self.write(line.encode('ascii')) | def mt_interact(self): """Multithreaded version of interact().""" import _thread _thread.start_new_thread(self.listener, ()) while 1: line = sys.stdin.readline() if not line: break self.write(line) | 783645f700459069cdf72120d36d8c194397ec56 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/783645f700459069cdf72120d36d8c194397ec56/telnetlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5874,
67,
2761,
621,
12,
2890,
4672,
3536,
5049,
483,
20528,
1177,
434,
16592,
1435,
12123,
1930,
389,
5930,
389,
5930,
18,
1937,
67,
2704,
67,
5930,
12,
2890,
18,
12757,
16,
1832,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5874,
67,
2761,
621,
12,
2890,
4672,
3536,
5049,
483,
20528,
1177,
434,
16592,
1435,
12123,
1930,
389,
5930,
389,
5930,
18,
1937,
67,
2704,
67,
5930,
12,
2890,
18,
12757,
16,
1832,
13,
... |
title = "TLS Model Translation Tensor RMSD Values of Principal Components", | title = "TLS Model Translation Tensor RMSD Values of Principal Components", | def write_data_file(self): """Generate the data file and return the filename. """ nrows = len(self.cpartition.chain) ncols = 1 + 3 * self.cpartition.num_tls_segments() tbl = table.StringTable(nrows, ncols, "?", title = "TLS Model Translation Tensor RMSD Values of Principal Components", column_titles = ["Residue"]) | b506e1ac631a2bdb447b739ed1d90a635dddd71a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/b506e1ac631a2bdb447b739ed1d90a635dddd71a/gnuplots.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
892,
67,
768,
12,
2890,
4672,
3536,
4625,
326,
501,
585,
471,
327,
326,
1544,
18,
3536,
18871,
273,
562,
12,
2890,
18,
71,
10534,
18,
5639,
13,
21330,
273,
404,
397,
890,
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,
1045,
67,
892,
67,
768,
12,
2890,
4672,
3536,
4625,
326,
501,
585,
471,
327,
326,
1544,
18,
3536,
18871,
273,
562,
12,
2890,
18,
71,
10534,
18,
5639,
13,
21330,
273,
404,
397,
890,
3... |
self.unset_clip_planes() self.set_clip_planes() | if self.gl_active > 0: self.unset_clip_planes() self.set_clip_planes() | def update_clip_planes(self): self.unset_clip_planes() self.set_clip_planes() | 1375395e9f64180c0c0e93a7ab98acdc55bb8a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11052/1375395e9f64180c0c0e93a7ab98acdc55bb8a6a/universe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
14161,
67,
7088,
281,
12,
2890,
4672,
365,
18,
18579,
67,
14161,
67,
7088,
281,
1435,
365,
18,
542,
67,
14161,
67,
7088,
281,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
67,
14161,
67,
7088,
281,
12,
2890,
4672,
365,
18,
18579,
67,
14161,
67,
7088,
281,
1435,
365,
18,
542,
67,
14161,
67,
7088,
281,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
index = text.indexOf(expression) | index = expression.indexIn(text) | def highlightBlock(self, text): | 4ef400c87059896564f79dd33991daa9fbb56a02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4440/4ef400c87059896564f79dd33991daa9fbb56a02/controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8839,
1768,
12,
2890,
16,
977,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8839,
1768,
12,
2890,
16,
977,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if options['tests'].get('full'): checks |= DocChecker.ALL_T if options['tests'].get('type'): DocChecker.TYPE | if options['tests'].get('vars'): checks |= DocChecker.ALL_T if options['tests'].get('types'): checks |= DocChecker.ALL_T DocChecker.TYPE | def _check(docmap, modules, options): """ Run completeness checks on the objects in the given documentation map. By default, C{_check} checks for docstrings in all public modules, classes, functions, and properties. Additional checks can be added with the C{'tests'} option: - C{private}: Also checks private objects. - C{full}: Also checks variables, parameters, and return values. @param docmap: A documentation map containing the documentation for the objects whose API documentation should be created. @param options: Options from the command-line arguments. @type options: C{dict} """ from epydoc.checker import DocChecker # Run completeness checks. if options['verbosity'] > 0: print >>sys.stderr, 'Performing completeness checks...' checker = DocChecker(docmap, modules) if options['tests'].get('all'): for test in TESTS: options['tests'][test] = 1 # Run the checks checks = 0 if (options['tests'].get('basic') or options['tests'].get('full') or options['tests'].get('private')): checks |= (DocChecker.MODULE | DocChecker.CLASS | DocChecker.FUNC | DocChecker.PROPERTY | DocChecker.DESCR_LAZY | DocChecker.PUBLIC) if options['tests'].get('private'): checks |= DocChecker.PRIVATE if options['tests'].get('full'): checks |= DocChecker.ALL_T if options['tests'].get('type'): DocChecker.TYPE passed_checks = checker.check(checks) if options['tests'].get('author'): checks = DocChecker.MODULE | DocChecker.PUBLIC | DocChecker.AUTHOR if options['tests'].get('private'): checks |= DocChecker.PRIVATE passed_checks = checker.check(checks) and passed_checks if options['tests'].get('version'): checks = DocChecker.MODULE | DocChecker.PUBLIC | DocChecker.VERSION if options['tests'].get('private'): checks |= DocChecker.PRIVATE passed_checks = checker.check(checks) and passed_checks if passed_checks and options['verbosity'] > 0: print >>sys.stderr, ' All checks passed!' | 5397b1945fdf3feb9813ef60349d76c37defaafe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5397b1945fdf3feb9813ef60349d76c37defaafe/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
12,
2434,
1458,
16,
4381,
16,
702,
4672,
3536,
1939,
2302,
15681,
4271,
603,
326,
2184,
316,
326,
864,
7323,
225,
852,
18,
225,
2525,
805,
16,
385,
95,
67,
1893,
97,
4271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2434,
1458,
16,
4381,
16,
702,
4672,
3536,
1939,
2302,
15681,
4271,
603,
326,
2184,
316,
326,
864,
7323,
225,
852,
18,
225,
2525,
805,
16,
385,
95,
67,
1893,
97,
4271,
... |
Returns True if the group is solvable. | Returns ``True`` if the group is solvable. | def is_solvable(self): """ Returns True if the group is solvable. | 2d077a3331069892dd585070aa02c876686672d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/2d077a3331069892dd585070aa02c876686672d2/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
18281,
16845,
12,
2890,
4672,
3536,
2860,
1053,
309,
326,
1041,
353,
3704,
16845,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
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,
353,
67,
18281,
16845,
12,
2890,
4672,
3536,
2860,
1053,
309,
326,
1041,
353,
3704,
16845,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
(default: 'vector') | (default: ``'vector'``) | def random_element(self, elem_type = "vector"): """ Return a random element for self. INPUT: - ``elem_type`` - either 'vector' or 'state array' (default: 'vector') EXAMPLE:: sage: sr = mq.SR() sage: sr.random_element() [ a^3 + a + 1] [ a^3 + 1] [a^3 + a^2 + 1] [a^3 + a^2 + a] sage: sr.random_element('state_array') [a + 1] """ if elem_type == "vector": return self.random_vector() elif elem_type == "state_array": return self.random_state_array() else: raise TypeError, "parameter type not understood" | f145241e51a69266a2640a052ee008637b5d9160 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f145241e51a69266a2640a052ee008637b5d9160/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2744,
67,
2956,
12,
2890,
16,
3659,
67,
723,
273,
315,
7737,
6,
4672,
3536,
2000,
279,
2744,
930,
364,
365,
18,
225,
12943,
30,
282,
300,
225,
12176,
10037,
67,
723,
10335,
300,
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,
2744,
67,
2956,
12,
2890,
16,
3659,
67,
723,
273,
315,
7737,
6,
4672,
3536,
2000,
279,
2744,
930,
364,
365,
18,
225,
12943,
30,
282,
300,
225,
12176,
10037,
67,
723,
10335,
300,
3344,
... |
reactor.callinthread(i[0], typ, f, body) | reactor.callInThread(i[0], typ, f, body) | def cbmessage(self, x): try: body=self.getChild(x, "body").getContent() except: body="" try: f=x["from"] except: f="" try: typ=x["type"] except: typ="chat" for i in self.msghandlers: if re.search(i[1], body) and (i[2] in (typ, None)) and (i[3] in (f, None)): reactor.callinthread(i[0], typ, f, body) | d5587d9129660712d4cf24ddd6ba4db646f1d8b8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2729/d5587d9129660712d4cf24ddd6ba4db646f1d8b8/twistedwrapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2875,
2150,
12,
2890,
16,
619,
4672,
775,
30,
1417,
33,
2890,
18,
588,
1763,
12,
92,
16,
315,
3432,
20387,
588,
1350,
1435,
1335,
30,
1417,
1546,
6,
775,
30,
284,
33,
92,
9614,
2080,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2875,
2150,
12,
2890,
16,
619,
4672,
775,
30,
1417,
33,
2890,
18,
588,
1763,
12,
92,
16,
315,
3432,
20387,
588,
1350,
1435,
1335,
30,
1417,
1546,
6,
775,
30,
284,
33,
92,
9614,
2080,... |
if ct in _addDefaults: self.style |= _addDefaults[ct] | def createDialogTemplate(self): ct = self.controlType if "CONTROL"==ct: ct = self.subType if ct in _addDefaults: self.style |= _addDefaults[ct] if ct in _controlMap: ct = _controlMap[ct] t = [ct, self.label, self.idNum, (self.x, self.y, self.w, self.h), self.style] #print t return t | 4c7ce4aac702da7f45a3728e193d41cf292ed38d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/4c7ce4aac702da7f45a3728e193d41cf292ed38d/win32rcparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
6353,
2283,
12,
2890,
4672,
5691,
273,
365,
18,
7098,
559,
309,
315,
18248,
6,
631,
299,
30,
5691,
273,
365,
18,
1717,
559,
309,
5691,
316,
389,
7098,
863,
30,
5691,
273,
389,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
6353,
2283,
12,
2890,
4672,
5691,
273,
365,
18,
7098,
559,
309,
315,
18248,
6,
631,
299,
30,
5691,
273,
365,
18,
1717,
559,
309,
5691,
316,
389,
7098,
863,
30,
5691,
273,
389,
7... | |
return Utils.unquote(filename.strip()) | if isinstance(filename, TupleType): newvalue = _unquotevalue(filename) return unicode(newvalue[2], newvalue[0]) else: newvalue = _unquotevalue(filename.strip()) return newvalue | def get_filename(self, failobj=None): """Return the filename associated with the payload if present. | 908dc4bea84e4c1d5c20c03160a202c0f69db49d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/908dc4bea84e4c1d5c20c03160a202c0f69db49d/Message.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3459,
12,
2890,
16,
2321,
2603,
33,
7036,
4672,
3536,
990,
326,
1544,
3627,
598,
326,
2385,
309,
3430,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3459,
12,
2890,
16,
2321,
2603,
33,
7036,
4672,
3536,
990,
326,
1544,
3627,
598,
326,
2385,
309,
3430,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for row, ifo in enumerate(ifos): | for row, ifo in enumerate(ifos[::-1]): | def add_contents(self, segdict, ifos=None): """ Add the contents of segdict to the plot. Provide the list ifos, if you wish to specify the order in which they appear or wish to plot a subset of the segmentlists in segdict. """ if ifos is None: ifos = segdict.keys() ifos.sort() self.ifos.extend(ifos[::-1]) for row, ifo in enumerate(ifos): color = self.color_code[ifo] for seg in segdict[ifo]: a = self._time_transform(seg[0]) b = self._time_transform(seg[1]) self.ax.fill([a, b, b, a, a], [row, row, row+1, row+1, row], color) | 9200ab61a73e06f4f72a150fc5f99b0f68999685 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/9200ab61a73e06f4f72a150fc5f99b0f68999685/plotsegments.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3980,
12,
2890,
16,
2291,
1576,
16,
309,
538,
33,
7036,
4672,
3536,
1436,
326,
2939,
434,
2291,
1576,
358,
326,
3207,
18,
225,
26569,
326,
666,
309,
538,
16,
309,
1846,
14302,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3980,
12,
2890,
16,
2291,
1576,
16,
309,
538,
33,
7036,
4672,
3536,
1436,
326,
2939,
434,
2291,
1576,
358,
326,
3207,
18,
225,
26569,
326,
666,
309,
538,
16,
309,
1846,
14302,... |
check_call_noisy([options.hg, 'clone', '-r', SWITCH_MOZILLA_BASE_REV] + hgopts + [backup_mozilla_path, mozilla_path]) | check_call_noisy([options.hg, 'clone', '-r', SWITCH_MOZILLA_BASE_REV] + hgopts + [backup_mozilla_path, mozilla_path], retryMax=options.retries) | def switch_mozilla_repo(): """If the mozilla/ repo matches SWITCH_MOZILLA_REPO_REGEXP then: 1) Backup (unused anymore) checkout of mozilla/. 2a) If SWITCH_MOZILLA_REPO_OLD_REPO_LOCATION exists, move that to mozilla/. 2b) Else clone the backup of mozilla/ up to the SWITCH_MOZILLA_BASE_REV revision and set the pull location to SWITCH_MOZILLA_REPO_REPLACE. It is expected that the normal pull/update functions in this script will update the new mozilla/ repo to the latest version. """ mozilla_path = os.path.join(topsrcdir, 'mozilla') # Do nothing if there is no Mozilla directory. if not os.path.exists(mozilla_path): return import ConfigParser, re config = ConfigParser.ConfigParser() config.read([os.path.join(mozilla_path, '.hg', 'hgrc')]) if not config.has_option('paths', 'default'): # Abort, not to get into a possibly inconsistent state. sys.exit("Error: default path in mozilla/.hg/hgrc is undefined!") # Compile the Mozilla repository regex. moz_old_regex = re.compile(SWITCH_MOZILLA_REPO_REGEXP, re.I) match = moz_old_regex.match(config.get('paths', 'default')) # Do nothing if not pulling from the one we're trying to switch from. if not match: return config.set('paths', 'default', SWITCH_MOZILLA_REPO_REPLACE % match.group(1) ) if config.has_option('paths', 'default-push'): match = moz_old_regex.match(config.get('paths', 'default-push')) # Do not update this property if not pushing to Mozilla trunk. if match: config.set('paths', 'default-push', SWITCH_MOZILLA_REPO_REPLACE % match.group(1) ) hgopts = [] if options.hgopts: hgopts = options.hgopts.split() hgcloneopts = [] if options.hgcloneopts: hgcloneopts = options.hgcloneopts.split() backup_mozilla_path = os.path.join(topsrcdir, SWITCH_MOZILLA_REPO_BACKUP_LOCATION) print "Moving mozilla to " + SWITCH_MOZILLA_REPO_BACKUP_LOCATION + "..." try: os.rename(mozilla_path, backup_mozilla_path) except: # Print the exception without its traceback. sys.excepthook(sys.exc_info()[0], sys.exc_info()[1], None) sys.exit("Error: Mozilla directory renaming failed!") # Does the user have a pre-existing backup repository? old_backup_repository = os.path.join(topsrcdir, SWITCH_MOZILLA_REPO_OLD_REPO_LOCATION) if SWITCH_MOZILLA_REPO_OLD_REPO_LOCATION != "" and \ os.path.exists(old_backup_repository): # Yes, so let's use that print "Moving " + old_backup_repository + " to " + mozilla_path + "..." try: os.rename(old_backup_repository, mozilla_path) except: # Print the exception without its traceback. sys.excepthook(sys.exc_info()[0], sys.exc_info()[1], None) sys.exit("Error: Renaming old backup directory failed! You must recover manually.") # Let's leave the hgrc as it was, so any repo specific config is left # the same. return # Locally clone common repository history. check_call_noisy([options.hg, 'clone', '-r', SWITCH_MOZILLA_BASE_REV] + hgopts + [backup_mozilla_path, mozilla_path]) # Rewrite hgrc for new local mozilla repo based on pre-existing hgrc # but with new values f = open(os.path.join(topsrcdir, 'mozilla', '.hg', 'hgrc'), 'w') try: config.write(f) finally: f.close() | 0376e156dff5362923ab01c36e488d21031811d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11044/0376e156dff5362923ab01c36e488d21031811d4/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1620,
67,
8683,
15990,
67,
7422,
13332,
3536,
2047,
326,
27513,
19,
3538,
1885,
16392,
25588,
67,
5980,
62,
2627,
2534,
67,
862,
2419,
67,
28225,
1508,
30,
404,
13,
11856,
261,
14375,
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,
1620,
67,
8683,
15990,
67,
7422,
13332,
3536,
2047,
326,
27513,
19,
3538,
1885,
16392,
25588,
67,
5980,
62,
2627,
2534,
67,
862,
2419,
67,
28225,
1508,
30,
404,
13,
11856,
261,
14375,
16... |
if ENABLE_DEBUG_PRINTS: print "~~~~~~~~~~ | def _orient_for_modify(self, end1, end2): from model.Line import Line | c4a8d077f70d55111f7a19ce7efa485e92728f66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/c4a8d077f70d55111f7a19ce7efa485e92728f66/DnaDuplex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14766,
67,
1884,
67,
17042,
12,
2890,
16,
679,
21,
16,
679,
22,
4672,
628,
938,
18,
1670,
1930,
5377,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14766,
67,
1884,
67,
17042,
12,
2890,
16,
679,
21,
16,
679,
22,
4672,
628,
938,
18,
1670,
1930,
5377,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
allow to install multiple versions of the package in parallel.""" | allow to install multiple versions of the package in parallel.""", 'shlib-legacy-policy-name-error', """Your shared library package is not named after its SONAME, but it has been added to the list of legacy exceptions. Please do ot rename the package until SONAME changes, and if you have to rename it for another reason, make sure you name it correctly.""" | def check(self, pkg): global _policy_legacy_exceptions | 935c9162b22bdc1c58d1bc0df35806e5b3d35869 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10341/935c9162b22bdc1c58d1bc0df35806e5b3d35869/LibraryPolicyCheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
2890,
16,
3475,
4672,
2552,
389,
5086,
67,
17386,
67,
11855,
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,
866,
12,
2890,
16,
3475,
4672,
2552,
389,
5086,
67,
17386,
67,
11855,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if string.find(sys.executable, sys.exec_prefix) != -1: | if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): | def finalize_options (self): from distutils import sysconfig | 938a029f5a8ca7da527d1cfb19390ed3262eb72f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/938a029f5a8ca7da527d1cfb19390ed3262eb72f/build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
67,
2116,
261,
2890,
4672,
628,
2411,
5471,
1930,
2589,
1425,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
12409,
67,
2116,
261,
2890,
4672,
628,
2411,
5471,
1930,
2589,
1425,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
_tryorder = ["galeon", "mozilla", "netscape", "kfm", "grail", "links", "lynx", "w3m",] | _tryorder = ["links", "lynx", "w3m"] | def open_new(self, url): self.open(url) | c75fd3de79457d9891801c2dd0c58b144120a306 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c75fd3de79457d9891801c2dd0c58b144120a306/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2704,
12,
2890,
16,
880,
4672,
365,
18,
3190,
12,
718,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1696,
67,
2704,
12,
2890,
16,
880,
4672,
365,
18,
3190,
12,
718,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def makeCallbackFloat(val): | def makeCallbackFloat(self, val): | def makeCallbackFloat(val): pyxpcomcalls.makeCallback(self.callbackID, val) | 28bf8cd64231a2659099b37e09fae5d3668d0d2d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/28bf8cd64231a2659099b37e09fae5d3668d0d2d/pycallback.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
2428,
4723,
12,
2890,
16,
1244,
4672,
2395,
23829,
832,
12550,
18,
6540,
2428,
12,
2890,
18,
3394,
734,
16,
1244,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
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,
1221,
2428,
4723,
12,
2890,
16,
1244,
4672,
2395,
23829,
832,
12550,
18,
6540,
2428,
12,
2890,
18,
3394,
734,
16,
1244,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.