rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
import unittest | import unittest, sys if len(sys.argv) == 3: clobberURL = sys.argv[1] dbFile = sys.argv[2] del sys.argv[2] del sys.argv[1] elif len(sys.argv) > 1: print "Usage: %s [clobberURL dbFile]" % sys.argv[0] sys.exit(1) | def testReleaseClobberPrefixBuilder(self): """Test that clobbers on release builders with the release-* prefix work""" now = int(time.time()) makeBuildDir('release-mozilla-central-linux_build', now-10) updateBuild('branch2', 'release-mozilla-central-linux_build', 'release-mozilla-central-linux_build', 'slave01', 'master01') time.sleep(1) data = setClobberPage('branch2', 'linux_build', None, None, now) self.assert_('release-mozilla-central-linux_build' in data, data) | 4c631128323cbebaf3d5a8bddd3ed5f079a4d8ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/4c631128323cbebaf3d5a8bddd3ed5f079a4d8ed/test_clobberer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7391,
39,
1295,
744,
2244,
1263,
12,
2890,
4672,
3536,
4709,
716,
1219,
70,
2210,
603,
3992,
19916,
598,
326,
3992,
17,
14,
1633,
1440,
8395,
2037,
273,
509,
12,
957,
18,
957,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7391,
39,
1295,
744,
2244,
1263,
12,
2890,
4672,
3536,
4709,
716,
1219,
70,
2210,
603,
3992,
19916,
598,
326,
3992,
17,
14,
1633,
1440,
8395,
2037,
273,
509,
12,
957,
18,
957,
10... |
len(rebaselined_tests)) | len(self._rebaselined_tests)) | def Run(self, backup): """Run rebaseline process.""" | bde066cf969da31c2e385b05815f0a7b2fb63cba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/bde066cf969da31c2e385b05815f0a7b2fb63cba/rebaseline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
12,
2890,
16,
5114,
4672,
3536,
1997,
283,
27818,
1207,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1939,
12,
2890,
16,
5114,
4672,
3536,
1997,
283,
27818,
1207,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return frozenset(temp_list) | retval = frozenset(temp_list) | def _copy(self, obj): """ <Purpose> Create a deep copy of an object without using the python 'copy' module. Using copy.deepcopy() doesn't work because builtins like id and hasattr aren't available when this is called. <Arguments> self obj The object to make a deep copy of. <Exceptions> TypeError If an object is encountered that we don't know how to make a copy of. NamespaceViolationError If an unexpected error occurs while copying. This isn't the greatest solution, but in general the idea is we just need to abort the wrapped function call. <Side Effects> A new reference is created to every non-simple type of object. That is, everything except objects of type str, unicode, int, etc. <Returns> The deep copy of obj. """ try: # types.InstanceType is included because the user can provide an instance # of a class of their own in the list of callback args to settimer. if _is_in(type(obj), [str, unicode, int, long, float, complex, bool, types.NoneType, types.FunctionType, types.LambdaType, types.MethodType, types.InstanceType]): return obj elif _is_in(type(obj), [tuple, list, set, frozenset]): temp_list = [] for item in obj: temp_list.append(self._copy(item)) if type(obj) is tuple: return tuple(temp_list) elif type(obj) is set: return set(temp_list) elif type(obj) is frozenset: return frozenset(temp_list) else: return temp_list elif type(obj) is dict: temp_dict = {} for key in obj: temp_dict[key] = self._copy(obj[key]) return temp_dict # We don't copy certain objects. This is because copying an emulated file # object, for example, will cause the destructor of the original one to # be invoked, which will close the actual underlying file. As the object # is wrapped and the client does not have access to it, it's safe to not # wrap it. elif isinstance(obj, (NamespaceObjectWrapper, emulfile.emulated_file, emulcomm.emulated_socket, thread.LockType, virtual_namespace.VirtualNamespace)): return obj else: raise TypeError("_copy is not implemented for objects of type " + str(type(obj))) except Exception, e: self._handle_violation("_copy failed on " + str(obj) + " with message " + str(e)) | 759752687cec6068c546f27a7dc8f1af0bc14d0a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7272/759752687cec6068c546f27a7dc8f1af0bc14d0a/namespace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3530,
12,
2890,
16,
1081,
4672,
3536,
411,
10262,
4150,
34,
1788,
279,
4608,
1610,
434,
392,
733,
2887,
1450,
326,
5790,
296,
3530,
11,
1605,
18,
11637,
1610,
18,
16589,
3530,
1435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3530,
12,
2890,
16,
1081,
4672,
3536,
411,
10262,
4150,
34,
1788,
279,
4608,
1610,
434,
392,
733,
2887,
1450,
326,
5790,
296,
3530,
11,
1605,
18,
11637,
1610,
18,
16589,
3530,
1435,... |
elif currSat.tonemode == "off": | elif currSat.tonemode.value == "off": | def updateAdvanced(self, sec, slotid): lnbSat = {} for x in range(1,37): lnbSat[x] = [] | a57321af1e0bfebaadc5b747e51b9eb5bb7d3f3f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/a57321af1e0bfebaadc5b747e51b9eb5bb7d3f3f/NimManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
23618,
12,
2890,
16,
1428,
16,
4694,
350,
4672,
328,
6423,
15163,
273,
2618,
364,
619,
316,
1048,
12,
21,
16,
6418,
4672,
328,
6423,
15163,
63,
92,
65,
273,
5378,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
23618,
12,
2890,
16,
1428,
16,
4694,
350,
4672,
328,
6423,
15163,
273,
2618,
364,
619,
316,
1048,
12,
21,
16,
6418,
4672,
328,
6423,
15163,
63,
92,
65,
273,
5378,
2,
-100,
-100,
... |
sage: L = K.extension(t^3+t+a, b); L | sage: L = K.extension(t^3+t+a, 'b'); L | def NumberField(polynomial, name=None, check=True, names=None): r""" Return {\em the} number field defined by the given irreducible polynomial and with variable with the given name. If check is True (the default), also verify that the defining polynomial is irreducible and over Q. INPUT: polynomial -- a polynomial over Q (for now) name -- a string (default: 'a'), the name of the generator check -- bool (default: True); do type checking and irreducibility checking. EXAMPLES: sage: z = QQ['z'].0 sage: K = NumberField(z^2 - 2,'s'); K Number Field in s with defining polynomial z^2 - 2 sage: s = K.0; s s sage: s*s 2 sage: s^2 2 EXAMPLES: Constructing a relative number field sage: K.<a> = NumberField(x^2 - 2) sage: R.<t> = K[] sage: L = K.extension(t^3+t+a, b); L Extension by t^3 + t + a of the Number Field in a with defining polynomial x^2 - 2 sage: L.absolute_field() Number Field in b with defining polynomial x^6 + 2*x^4 + x^2 - 2 sage: b = L.gen() sage: a*b -b^4 - b^2 sage: L.lift_to_base(-3*b^3 - 3*b + 1) 3*a + 1 Number fields are globally unique. sage: K.<a>= NumberField(x^3-5) sage: a^3 5 sage: L.<a>= NumberField(x^3-5) sage: K is L True """ if name is None and names is None: raise TypeError, "You must specify the name of the generator." if not names is None: name = names name = sage.structure.parent_gens.normalize_names(1, name) if not isinstance(polynomial, polynomial_element.Polynomial): try: polynomial = polynomial.polynomial(QQ) except (AttributeError, TypeError): raise TypeError, "polynomial (=%s) must be a polynomial."%repr(polynomial) key = (polynomial, name) if _nf_cache.has_key(key): K = _nf_cache[key]() if not K is None: return K R = polynomial.base_ring() if R == ZZ: polynomial = QQ['x'](polynomial) elif isinstance(R, NumberField_generic): S = R.extension(polynomial, name) _nf_cache[key] = weakref.ref(S) return S if polynomial.degree() == 2: K = NumberField_quadratic(polynomial, name, check) else: K = NumberField_generic(polynomial, name, None, check) _nf_cache[key] = weakref.ref(K) return K | c7143c2a98b41a56e5ac8a84b0c268db949a7885 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c7143c2a98b41a56e5ac8a84b0c268db949a7885/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3588,
974,
12,
3915,
13602,
16,
508,
33,
7036,
16,
866,
33,
5510,
16,
1257,
33,
7036,
4672,
436,
8395,
2000,
18890,
351,
326,
97,
1300,
652,
2553,
635,
326,
864,
9482,
1118,
5286,
1523... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3588,
974,
12,
3915,
13602,
16,
508,
33,
7036,
16,
866,
33,
5510,
16,
1257,
33,
7036,
4672,
436,
8395,
2000,
18890,
351,
326,
97,
1300,
652,
2553,
635,
326,
864,
9482,
1118,
5286,
1523... |
self.resetButton.setMaximumWidth(101) | self.resetButton.setMaximumWidth(applyButtonWidth) self.icons = {orange.VarTypes.Continuous: self.createAttributePixmap("C"), orange.VarTypes.Discrete: self.createAttributePixmap("D"), orange.VarTypes.String: self.createAttributePixmap("S")} | def __init__(self,parent = None, signalManager = None): OWWidget.__init__(self, parent, signalManager, "Data Domain") #initialize base class | c60b799c2d721cec880f1547ee4418a162265b81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/c60b799c2d721cec880f1547ee4418a162265b81/OWDataDomain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
4277,
1318,
273,
599,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
315,
751,
6648,
7923,
468,
11160,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
4277,
1318,
273,
599,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
315,
751,
6648,
7923,
468,
11160,
1... |
u = gnomevfs.URI(sound_file.get_uri()) root, ext = os.path.splitext(u.path) if u.host_port: host = "%s:%s" % (u.host_name, u.host_port) else: host = u.host_name | def get_target_name(self, sound_file): | 00c7950d95780419f81f22b1df74d95c2287e517 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/00c7950d95780419f81f22b1df74d95c2287e517/soundconverter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3299,
67,
529,
12,
2890,
16,
14190,
67,
768,
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,
336,
67,
3299,
67,
529,
12,
2890,
16,
14190,
67,
768,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
continue; | continue | def GenResIndex(dat_list_file_path): res_index = "res_index.txt" brkitrs = set() colls = set() currs = set() langs = set() locales = set() regions = set() zones = set() for line in open(dat_list_file_path, "r"): if "root." in line or "res_index" in line or "_.res" in line: continue; if "brkitr/" in line: AddResFile(brkitrs, line) elif "coll/" in line: AddResFile(colls, line) elif "curr/" in line: AddResFile(currs, line) elif "lang/" in line: AddResFile(langs, line) elif "region/" in line: AddResFile(regions, line) elif "zone/" in line: AddResFile(zones, line) elif ".res" in line: # We need to determine the resource is locale resource or misc resource. # To determine the locale resource, we assume max script length is 3. end = line.find(".res") if end <= 3 or (line.find("_") <= 3 and line.find("_") > 0): locales.add(line[:end]) kind_to_locales = { "brkitr": brkitrs, "coll": colls, "curr": currs, "lang": langs, "locales": locales, "region": regions, "zone": zones } # Find every locale we've mentioned, for whatever reason. every_locale = set() for locales in kind_to_locales.itervalues(): every_locale = every_locale.union(locales) if VERBOSE: for kind, locales in kind_to_locales.items(): print "%s=%s" % (kind, sorted(locales)) print "every_locale=" % sorted(every_locale) # Find cases where we've included only part of a locale's data. missing_files = [] for locale in every_locale: for kind, locales in kind_to_locales.items(): p = os.path.join(ICU4C_DIR, "data", kind, locale + ".txt") if not locale in locales and os.path.exists(p): missing_files.append(p) # Warn about the missing files. for missing_file in sorted(missing_files): print "warning: %s exists but isn't included in %s" % (missing_file, dat_list_file_path) # Write the genrb input files. WriteIndex(os.path.join(TMP_DAT_PATH, res_index), locales, CLDR_VERSION) for kind, locales in kind_to_locales.items(): if kind == "locales": continue WriteIndex(os.path.join(TMP_DAT_PATH, kind, res_index), locales) # Call genrb to generate new res_index.res. InvokeIcuTool("genrb", TMP_DAT_PATH, [res_index]) for kind, locales in kind_to_locales.items(): if kind == "locales": continue InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, kind), [res_index]) | 7173c2a35d19fbdcad4e894b17842fdc2b6dfa81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10672/7173c2a35d19fbdcad4e894b17842fdc2b6dfa81/icu_dat_generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10938,
607,
1016,
12,
3404,
67,
1098,
67,
768,
67,
803,
4672,
400,
67,
1615,
273,
315,
455,
67,
1615,
18,
5830,
6,
225,
5186,
8691,
5453,
273,
444,
1435,
645,
3251,
273,
444,
1435,
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,
10938,
607,
1016,
12,
3404,
67,
1098,
67,
768,
67,
803,
4672,
400,
67,
1615,
273,
315,
455,
67,
1615,
18,
5830,
6,
225,
5186,
8691,
5453,
273,
444,
1435,
645,
3251,
273,
444,
1435,
4... |
(ngettext_("%(title)s and %(count)d more", "%(title)s and %(count)d more", len(files) - 1) % ( | (ngettext("%(title)s and %(count)d more", "%(title)s and %(count)d more", len(files) - 1) % ( | def __changed(self, selector, selection, label): model, rows = selection.get_selected_rows() files = [] | c935b7c0ef1e83d0f72ee380575323420e6ee46a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4764/c935b7c0ef1e83d0f72ee380575323420e6ee46a/exfalsowindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
6703,
12,
2890,
16,
3451,
16,
4421,
16,
1433,
4672,
938,
16,
2595,
273,
4421,
18,
588,
67,
8109,
67,
3870,
1435,
1390,
273,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
6703,
12,
2890,
16,
3451,
16,
4421,
16,
1433,
4672,
938,
16,
2595,
273,
4421,
18,
588,
67,
8109,
67,
3870,
1435,
1390,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
i, args = yield tichy.WaitFirst(tichy.Wait(self.window.main_layout, 'save'), tichy.Wait(self.window.main_layout, 'back'),tichy.Wait(parent, 'back')) | i, args = yield tichy.WaitFirst(tichy.Wait(self.edje_obj,'save'), tichy.Wait(self.edje_obj,'back'),tichy.Wait(parent,'back')) | def run(self, setting, parent, layout): self.edje_file = os.path.join(os.path.dirname(__file__), 'settings.edj') layout.elm_obj.hide() self.window = gui.elm_list_subwindow(parent, self.edje_file, "stringsetting","entry", layout.elm_obj) self.edje_obj = self.window.main_layout if setting != None: self.edje_obj.Edje.signal_emit(str(setting.name),"set_text") textbox = gui.elementary.Entry(parent.window.elm_obj) | 61abcff4e16be6346b1b7183b9275b78ad1144eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/61abcff4e16be6346b1b7183b9275b78ad1144eb/settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
3637,
16,
982,
16,
3511,
4672,
365,
18,
329,
78,
73,
67,
768,
273,
1140,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3631,
296,
4272,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
3637,
16,
982,
16,
3511,
4672,
365,
18,
329,
78,
73,
67,
768,
273,
1140,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3631,
296,
4272,
18,... |
print "looking for node " + i.toString() + " using name " + txt | def init(self) : print "init()" i = 0 while i < maxNodeAddr : x = (i * 1000) + 1 txt = "CT" + x.toString() print "looking for node " + i.toString() + " using name " + txt node = jmri.jmrix.cmri.serial.SerialAddress.getNodeFromSystemName(txt) if (node != None) : print "found node for " + txt self.nodeList.append(node) self.nodeAddrList.append(i) i = i + 1 return | 03bdc2b410bd965f8f24825301a41964921c5d72 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1660/03bdc2b410bd965f8f24825301a41964921c5d72/CmriNodeTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
13,
294,
1172,
315,
2738,
10031,
277,
273,
374,
1323,
277,
411,
943,
907,
3178,
294,
619,
273,
261,
77,
380,
4336,
13,
397,
404,
6463,
273,
315,
1268,
6,
397,
619,
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,
1208,
12,
2890,
13,
294,
1172,
315,
2738,
10031,
277,
273,
374,
1323,
277,
411,
943,
907,
3178,
294,
619,
273,
261,
77,
380,
4336,
13,
397,
404,
6463,
273,
315,
1268,
6,
397,
619,
18... | |
else: self.http_user = authorization[0] return True | except exceptions.BadArgumentError: logging.warning('empty username or password sent as authentification string into WMI.') return False | def user_authorized(self): """ Return True if authorization exists AND user is authorized.""" | cb6c58a714751c7c15db22610596234f47738d42 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/cb6c58a714751c7c15db22610596234f47738d42/wmi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
67,
8434,
12,
2890,
4672,
3536,
2000,
1053,
309,
6093,
1704,
4116,
729,
353,
10799,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
67,
8434,
12,
2890,
4672,
3536,
2000,
1053,
309,
6093,
1704,
4116,
729,
353,
10799,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
for category in sdata['categories'].keys(): | _categories = sdata['categories'].keys() _categories.sort() for category in _categories: | def __init__ (self, parent, rule, index): """initialize pics rule display frame""" FXRuleFrame.__init__(self, parent, rule, index) FXMAPFUNC(self,SEL_COMMAND,FXPicsRuleFrame.ID_URL,FXPicsRuleFrame.onCmdUrl) FXMAPFUNC(self,SEL_COMMAND,FXPicsRuleFrame.ID_SERVICE,FXPicsRuleFrame.onCmdService) FXMAPFUNC(self,SEL_COMMAND,FXPicsRuleFrame.ID_CATEGORY,FXPicsRuleFrame.onCmdCategory) | 0350497bce6790417e0d4b5f3bc223a2bdce721c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/0350497bce6790417e0d4b5f3bc223a2bdce721c/FXPicsRuleFrame.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
982,
16,
1720,
16,
770,
4672,
3536,
11160,
293,
2102,
1720,
2562,
2623,
8395,
478,
60,
2175,
3219,
16186,
2738,
972,
12,
2890,
16,
982,
16,
1720,
16,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
982,
16,
1720,
16,
770,
4672,
3536,
11160,
293,
2102,
1720,
2562,
2623,
8395,
478,
60,
2175,
3219,
16186,
2738,
972,
12,
2890,
16,
982,
16,
1720,
16,
77... |
action="store", type="string", dest="name", default = None, | action="store", type="string", dest="name", default=None, | def mod_keyword_parse_arguments(app, configuration): usage_text = "\n\t%s keyword --name=<nom> [--rename=<nouveau_nom>] [--parent=<nouveau_parent>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--remove-parent] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_profile')) keyword = OptionGroup(parser, stylize(ST_OPTION, "Modify keyword options ")) keyword.add_option("--name", action="store", type="string", dest="name", default = None, help="specify keyword to modify (%s)." % stylize(ST_IMPORTANT, "required")) keyword.add_option("--rename", action="store", type="string", dest="newname", default = None, help="Rename keyword") keyword.add_option("--parent", action="store", type="string", dest="parent", default = None, help="Change keyword's parent.") keyword.add_option("--remove-parent", action="store_true", dest="remove_parent", default = False, help="Remove parent.") keyword.add_option("--recursive", action="store_true", dest="recursive", default = False, help="Modify all file in all subdirs.") keyword.add_option("--description", action="store", type="string", dest="description", default = None, help="Remove parent.") parser.add_option_group(keyword) return parser.parse_args() | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
681,
67,
11041,
67,
2670,
67,
7099,
12,
2910,
16,
1664,
4672,
225,
4084,
67,
955,
273,
1548,
82,
64,
88,
9,
87,
4932,
1493,
529,
27127,
12306,
34,
306,
413,
18539,
27127,
82,
1395,
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,
681,
67,
11041,
67,
2670,
67,
7099,
12,
2910,
16,
1664,
4672,
225,
4084,
67,
955,
273,
1548,
82,
64,
88,
9,
87,
4932,
1493,
529,
27127,
12306,
34,
306,
413,
18539,
27127,
82,
1395,
5... |
labelTypeTitle=Label(frameKeySets,text='Select : ') self.radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=1,command=self.SetKeysType,text='a Built-in Key Set') self.radioKeysCustom=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=0,command=self.SetKeysType,text='a Custom Key Set') self.optMenuKeysBuiltin=DynOptionMenu(frameKeySets, self.builtinKeys,None,command=None) self.optMenuKeysCustom=DynOptionMenu(frameKeySets, self.customKeys,None,command=None) self.buttonDeleteCustomKeys=Button(frameKeySets,text='Delete Custom Key Set', command=self.DeleteCustomKeys) | def CreatePageKeys(self): #tkVars self.bindingTarget=StringVar(self) self.builtinKeys=StringVar(self) self.customKeys=StringVar(self) self.keysAreBuiltin=BooleanVar(self) self.keyBinding=StringVar(self) ##widget creation #body frame frame=self.tabPages.pages['Keys'].frame #body section frames frameCustom=LabelFrame(frame,borderwidth=2,relief=GROOVE, text=' Custom Key Bindings ') frameKeySets=LabelFrame(frame,borderwidth=2,relief=GROOVE, text=' Key Set ') #frameCustom frameTarget=Frame(frameCustom) labelTargetTitle=Label(frameTarget,text='Action - Key(s)') scrollTargetY=Scrollbar(frameTarget) scrollTargetX=Scrollbar(frameTarget,orient=HORIZONTAL) self.listBindings=Listbox(frameTarget,takefocus=FALSE, exportselection=FALSE) self.listBindings.bind('<ButtonRelease-1>',self.KeyBindingSelected) scrollTargetY.config(command=self.listBindings.yview) scrollTargetX.config(command=self.listBindings.xview) self.listBindings.config(yscrollcommand=scrollTargetY.set) self.listBindings.config(xscrollcommand=scrollTargetX.set) self.buttonNewKeys=Button(frameCustom,text='Get New Keys for Selection', command=self.GetNewKeys,state=DISABLED) buttonSaveCustomKeys=Button(frameCustom, text='Save as New Custom Key Set',command=self.SaveAsNewKeySet) #frameKeySets labelTypeTitle=Label(frameKeySets,text='Select : ') self.radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=1,command=self.SetKeysType,text='a Built-in Key Set') self.radioKeysCustom=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=0,command=self.SetKeysType,text='a Custom Key Set') self.optMenuKeysBuiltin=DynOptionMenu(frameKeySets, self.builtinKeys,None,command=None) self.optMenuKeysCustom=DynOptionMenu(frameKeySets, self.customKeys,None,command=None) self.buttonDeleteCustomKeys=Button(frameKeySets,text='Delete Custom Key Set', command=self.DeleteCustomKeys) ##widget packing #body frameCustom.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH) frameKeySets.pack(side=LEFT,padx=5,pady=5,fill=Y) #frameCustom buttonSaveCustomKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5) self.buttonNewKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5) frameTarget.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH) #frame target frameTarget.columnconfigure(0,weight=1) frameTarget.rowconfigure(1,weight=1) labelTargetTitle.grid(row=0,column=0,columnspan=2,sticky=W) self.listBindings.grid(row=1,column=0,sticky=NSEW) scrollTargetY.grid(row=1,column=1,sticky=NS) scrollTargetX.grid(row=2,column=0,sticky=EW) #frameKeySets labelTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) self.radioKeysBuiltin.pack(side=TOP,anchor=W,padx=5) self.radioKeysCustom.pack(side=TOP,anchor=W,padx=5,pady=2) self.optMenuKeysBuiltin.pack(side=TOP,fill=X,padx=5,pady=5) self.optMenuKeysCustom.pack(side=TOP,fill=X,anchor=W,padx=5,pady=5) self.buttonDeleteCustomKeys.pack(side=TOP,fill=X,padx=5,pady=5) return frame | 1a560bd8eaec35366d40c44a551ff7c3dddf278b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/1a560bd8eaec35366d40c44a551ff7c3dddf278b/configDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
1964,
2396,
12,
2890,
4672,
468,
16099,
5555,
365,
18,
7374,
2326,
33,
780,
1537,
12,
2890,
13,
365,
18,
24553,
2396,
33,
780,
1537,
12,
2890,
13,
365,
18,
3662,
2396,
33,
780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
1964,
2396,
12,
2890,
4672,
468,
16099,
5555,
365,
18,
7374,
2326,
33,
780,
1537,
12,
2890,
13,
365,
18,
24553,
2396,
33,
780,
1537,
12,
2890,
13,
365,
18,
3662,
2396,
33,
780,
... | |
if res == args[0]: | if re.search(args[0], res): | def do_title(self, rest): """title [title] Show the title of the current page or test if it's equal to the argument. Surround multi words titles with single or double quotes (eg. 'my title')""" args = self._getCountedArgs("title " + rest, 0, 1) try: res = self.browser.title() except mechanize.BrowserStateError, e: raise error.PBPScriptError(e) | efaf05cbc9586cd71da963dffd2dba9156f0bdec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2493/efaf05cbc9586cd71da963dffd2dba9156f0bdec/pbpscript.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2649,
12,
2890,
16,
3127,
4672,
3536,
2649,
306,
2649,
65,
9674,
326,
2077,
434,
326,
783,
1363,
578,
1842,
309,
518,
1807,
3959,
358,
326,
1237,
18,
16680,
2260,
3309,
4511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2649,
12,
2890,
16,
3127,
4672,
3536,
2649,
306,
2649,
65,
9674,
326,
2077,
434,
326,
783,
1363,
578,
1842,
309,
518,
1807,
3959,
358,
326,
1237,
18,
16680,
2260,
3309,
4511,
... |
"title": library + " " + version + " " + variant | "title": library + " " + version + " " + variant, "manifest" : self.libraries[library][version].getManifest() | def getDemoData(self, library, version, variant): demoDict = { "name": version + "-" + variant + ".html", "nr": variant.capitalize(), "tags": [library], "title": library + " " + version + " " + variant } qooxdooVersions = self.libraries[library][version].getManifest()["info"]["qooxdoo-versions"] for ver in qooxdooVersions: demoDict["tags"].append("qxVersion_" + ver) | 69de26f8f6828dc9fdfc2f299939e6879b9fd16b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/69de26f8f6828dc9fdfc2f299939e6879b9fd16b/repository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
351,
83,
751,
12,
2890,
16,
5313,
16,
1177,
16,
5437,
4672,
21477,
5014,
273,
288,
315,
529,
6877,
1177,
397,
7514,
397,
5437,
397,
3552,
2620,
3113,
315,
11611,
6877,
5437,
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,
2343,
351,
83,
751,
12,
2890,
16,
5313,
16,
1177,
16,
5437,
4672,
21477,
5014,
273,
288,
315,
529,
6877,
1177,
397,
7514,
397,
5437,
397,
3552,
2620,
3113,
315,
11611,
6877,
5437,
18,
... |
return [prog_path] | return ["'" + prog_path+ "'"] | def python_args(self): # Find the proper executable in the current dir for f in self.launcher_alternatives: if os.path.isfile(f): prog_name = f break else: return None prog_path = abspath(prog_name) # We try to keep the same Python interpreter as currently if os.path.exists(sys.executable) and re.match(r'.*\.py[cow]?$', prog_name, re.IGNORECASE): return [sys.executable, prog_path] else: return [prog_path] | 7080d8a6f305d0bea91e695fd80d1cdbf2d4a9bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2522/7080d8a6f305d0bea91e695fd80d1cdbf2d4a9bb/launch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5790,
67,
1968,
12,
2890,
4672,
468,
4163,
326,
5338,
9070,
316,
326,
783,
1577,
364,
284,
316,
365,
18,
20738,
264,
67,
16025,
8785,
30,
309,
1140,
18,
803,
18,
291,
768,
12,
74,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5790,
67,
1968,
12,
2890,
4672,
468,
4163,
326,
5338,
9070,
316,
326,
783,
1577,
364,
284,
316,
365,
18,
20738,
264,
67,
16025,
8785,
30,
309,
1140,
18,
803,
18,
291,
768,
12,
74,
46... |
Collect disk usage data. """ rawList = utils.safe_popen('/usr/bin/df -kFufs | grep -v Filesystem ; /usr/bin/df -kFvxfs | grep -v Filesystem', 'r') self.data.datahash = {} self.data.mounthash = {} for line in rawList.readlines(): fields = string.split(line) p = df(fields) self.data.datahash[fields[0]] = p self.data.mounthash[fields[5]] = p utils.safe_pclose( rawList ) log.log( "<df>dfList.collectData(): collected data for %d filesystems" % (len(self.data.datahash.keys())), 6 ) class df: """ df object holds stats on disk usage for a single filesystem. """ def __init__(self, *arg): self.raw = arg[0] self.data = {} self.data['fsname'] = self.raw[0] self.data['size'] = int(self.raw[1]) self.data['used'] = int(self.raw[2]) self.data['avail'] = int(self.raw[3]) self.data['pctused'] = float(self.raw[4][:-1]) self.data['mountpt'] = self.raw[5] def __str__(self): str = "%-20s %10s %10s %10s %4s %-12s\n" % ("Filesystem","Size","Used","Available","Use%","Mounted on") str = str + "%-20s %10s %10s %10s %4s %-12s" % (self.data['fsname'],self.data['size'],self.data['used'],self.data['avail'],self.data['pctused'],self.data['mountpt']) return(str) def getHash(self): """ Return a copy of the filesystem data dictionary. """ hash_copy = {} hash_copy.update(self.data) return hash_copy | return self.data.copy() | def collectData(self): """ Collect disk usage data. """ | bb8b24122688da280b1ccf26519d7870684d7ae3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/bb8b24122688da280b1ccf26519d7870684d7ae3/df.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3274,
751,
12,
2890,
4672,
3536,
9302,
4234,
4084,
501,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
3274,
751,
12,
2890,
4672,
3536,
9302,
4234,
4084,
501,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if result[:11] == 'Bad command': | res = bbox_re.search(result) if res is None: sys.stderr.write('To fix bounding box install ghostscript in the PATH') | def convert_bounding_box(inname, outname): fid = open(inname,'r') oldfile = fid.read() fid.close() gsargs = '-dNOPAUSE -dBATCH -sDEVICE=bbox' # use cygwin gs if present cmd = 'gs %s %s' % (gsargs, inname) w, r = os.popen4(cmd) w.close() result = r.read() r.close() if result[:11] == 'Bad command' and sys.platform == 'win32': cmd = 'gswin32c %s %s' % (gsargs, inname) w, r = os.popen4(cmd) w.close() result = r.read() r.close() if result[:11] == 'Bad command': return False res = bbox_re.search(result) bbox = map(int,res.groups()) newstr = bbox2_re.sub("BoundingBox: %d %d %d %d" % tuple(bbox), oldfile) fid = open(outname, 'wb') fid.write(newstr) fid.close() return True | 09d23f7e8e736abc56a2ea5a98859b764df109a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/09d23f7e8e736abc56a2ea5a98859b764df109a3/gist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
3653,
310,
67,
2147,
12,
267,
529,
16,
596,
529,
4672,
13444,
273,
1696,
12,
267,
529,
11189,
86,
6134,
1592,
768,
273,
13444,
18,
896,
1435,
13444,
18,
4412,
1435,
10763,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
3653,
310,
67,
2147,
12,
267,
529,
16,
596,
529,
4672,
13444,
273,
1696,
12,
267,
529,
11189,
86,
6134,
1592,
768,
273,
13444,
18,
896,
1435,
13444,
18,
4412,
1435,
10763,
19... |
self.StyleSetSpec(stc.STC_P_DEFAULT, "fore: | self.StyleSetSpec(stc.STC_C_DEFAULT, "fore: | def __init__ (self,parent): wx.stc.StyledTextCtrl.__init__(self,parent) font = wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, False, "Courier New") self.StyleSetFont(wx.stc.STC_STYLE_DEFAULT, font) self.Bind(wx.EVT_CHAR, self.OnChar) self.SetModEventMask(wx.stc.STC_MOD_INSERTTEXT | wx.stc.STC_MOD_DELETETEXT | wx.stc.STC_PERFORMED_USER) self.Bind(wx.stc.EVT_STC_CHANGE, self.OnStcChange) self.CmdKeyAssign(ord('B'), stc.STC_SCMOD_CTRL, stc.STC_CMD_ZOOMIN) self.CmdKeyAssign(ord('N'), stc.STC_SCMOD_CTRL, stc.STC_CMD_ZOOMOUT) | 50c444321a077c149eeb7545d767e753034d7fb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11200/50c444321a077c149eeb7545d767e753034d7fb8/Psycollider.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2938,
4672,
7075,
18,
334,
71,
18,
24273,
1259,
1528,
12418,
16186,
2738,
972,
12,
2890,
16,
2938,
13,
3512,
273,
7075,
18,
5711,
12,
2163,
16,
7075,
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,
1001,
2738,
972,
261,
2890,
16,
2938,
4672,
7075,
18,
334,
71,
18,
24273,
1259,
1528,
12418,
16186,
2738,
972,
12,
2890,
16,
2938,
13,
3512,
273,
7075,
18,
5711,
12,
2163,
16,
7075,
18... |
y, x = self.scr.getyx() | def reprint_line(lineno, s, to_replace=[]): if lineno < 0: return t = list(PythonLexer().get_tokens(s)) for (i, token) in to_replace: t[i] = token o = format(t, BPythonFormatter(OPTS.color_scheme)) self.scr.move(lineno, 4) map(self.echo, o.split('\x04')) | fa75c6bdd4fa31ff17d4a326515ef5ea3d186e66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6932/fa75c6bdd4fa31ff17d4a326515ef5ea3d186e66/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
1188,
67,
1369,
12,
17782,
16,
272,
16,
358,
67,
2079,
33,
8526,
4672,
309,
7586,
411,
374,
30,
327,
268,
273,
666,
12,
15774,
13356,
7675,
588,
67,
7860,
12,
87,
3719,
364,
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,
283,
1188,
67,
1369,
12,
17782,
16,
272,
16,
358,
67,
2079,
33,
8526,
4672,
309,
7586,
411,
374,
30,
327,
268,
273,
666,
12,
15774,
13356,
7675,
588,
67,
7860,
12,
87,
3719,
364,
261... | |
songs = [channel.request(requests.queryregistersong("main", path)) for path in args[1:]] | songs = [channel.request(requests.autoregisterer_queryregistersong("main", path)) for path in args[1:]] | def usage(): print "pytonectl %s" % version.version print "Copyright (C) 2003, 2004 Jrg Lehmann <joerg@luga.de>" print "usage: pytonectl.py [options] command" print print "Possible options are:" print " -h, --help: show this help" print " -s, --server <hostname>: connect to PyTone server on hostname" print " -p, --port <portnumber>: connect to PyTone server on given port" print " -f, --file <filename>: connect to PyTone UNIX socket filename" print print "The supported commands are:" print " getplayerinfo: show information on the song currently being played" print " playerforward: play the next song in the playlist" print " playerprevious: play the previous song in the playlist" print " playerseekrelative <seconds>: seek relative in the current song by the given number of seconds" print " playerpause: pause the player" print " playerstart: start/unpause the player" print " playertogglepause: pause the player, if playing, or play, if paused" print " playerstop: stop the player" print " playerratecurrentsong <rating>: rate the song currently being played (1<=rating<=5)" print " playlistaddsongs <filenames>: add files to end of playlist" print " playlistaddsongtop <filename>: play file immediately" print " playlistclear: clear the playlist" print " playlistdeleteplayedsongs: remove all played songs from the playlist" print " playlistreplay: mark all songs in the playlist as unplayed" print " playlistshuffle: shuffle the playlist" | dc5fffabbbb179af1131231ab95ffa2a6aeaf06a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/348/dc5fffabbbb179af1131231ab95ffa2a6aeaf06a/pytonectl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
315,
2074,
1917,
386,
80,
738,
87,
6,
738,
1177,
18,
1589,
1172,
315,
2951,
4083,
261,
39,
13,
4044,
23,
16,
4044,
24,
804,
26876,
3519,
76,
81,
1072,
411,
30952,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
315,
2074,
1917,
386,
80,
738,
87,
6,
738,
1177,
18,
1589,
1172,
315,
2951,
4083,
261,
39,
13,
4044,
23,
16,
4044,
24,
804,
26876,
3519,
76,
81,
1072,
411,
30952,
... |
if not get("quiet"): | if not get_option("quiet"): | def cli_tags_main(input_files): global error error = ErrorPrinter() for input_file in input_files: if not get("quiet"): print input_file.get_uri() t = TagReader(input_file) t.setup() while t.do_work(): pass t.finish() if not get("quiet"): keys = input_file.keys() keys.sort() for key in keys: print " %s: %s" % (key, input_file[key]) | b67f2bdf893af97da061ecd20771c631016e4219 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/b67f2bdf893af97da061ecd20771c631016e4219/soundconverter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
67,
4156,
67,
5254,
12,
2630,
67,
2354,
4672,
2552,
555,
555,
273,
1068,
12149,
1435,
364,
810,
67,
768,
316,
810,
67,
2354,
30,
309,
486,
336,
67,
3482,
2932,
20380,
6,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
67,
4156,
67,
5254,
12,
2630,
67,
2354,
4672,
2552,
555,
555,
273,
1068,
12149,
1435,
364,
810,
67,
768,
316,
810,
67,
2354,
30,
309,
486,
336,
67,
3482,
2932,
20380,
6,
4672,
... |
def check_alignment(image1, image2, imdata, method='ncc', lite=0, smhist=0, alpha=0.0, beta=0.0, gamma=0.0, Tx=0, Ty=0, Tz=0, ret_histo=0): | def check_alignment(image1, image1_mat, image2, image2_mat, histo_fwhm=3, method='ncc', lite=0, smhist=0, alpha=0.0, beta=0.0, gamma=0.0, Tx=0, Ty=0, Tz=0, ret_histo=0): | def check_alignment(image1, image2, imdata, method='ncc', lite=0, smhist=0, alpha=0.0, beta=0.0, gamma=0.0, Tx=0, Ty=0, Tz=0, ret_histo=0): # # to test the cost function and view the joint histogram # for 2 images. used for debug # imdata['parms'][0] = alpha imdata['parms'][1] = beta imdata['parms'][2] = gamma imdata['parms'][3] = Tx imdata['parms'][4] = Ty imdata['parms'][5] = Tz M = build_rotate_matrix(imdata['parms']) optfunc_args = (image1, image2, imdata['step'], imdata['fwhm'], lite, smhist, method, ret_histo) if ret_histo: cost, joint_histogram = optimize_function(imdata['parms'], optfunc_args) return cost, joint_histogram else: cost = optimize_function(imdata['parms'], optfunc_args) return cost | a0a06507bdbd3322039b726463a7cc1c63e59774 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/a0a06507bdbd3322039b726463a7cc1c63e59774/_registration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
14409,
12,
2730,
21,
16,
1316,
21,
67,
7373,
16,
1316,
22,
16,
1316,
22,
67,
7373,
16,
5356,
83,
67,
74,
3350,
81,
33,
23,
16,
707,
2218,
82,
952,
2187,
328,
1137,
33,
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,
866,
67,
14409,
12,
2730,
21,
16,
1316,
21,
67,
7373,
16,
1316,
22,
16,
1316,
22,
67,
7373,
16,
5356,
83,
67,
74,
3350,
81,
33,
23,
16,
707,
2218,
82,
952,
2187,
328,
1137,
33,
2... |
def __init__(self, screenName=None, baseName=None, className='Tk', useTk=1): | def __init__(self, screenName=None, baseName=None, className='Tk', useTk=1, sync=0, use=None): | def __init__(self, screenName=None, baseName=None, className='Tk', useTk=1): """Return a new Toplevel widget on screen SCREENNAME. A new Tcl interpreter will be created. BASENAME will be used for the identification of the profile file (see readprofile). It is constructed from sys.argv[0] without extensions if None is given. CLASSNAME is the name of the widget class.""" self.master = None self.children = {} self._tkloaded = 0 # to avoid recursions in the getattr code in case of failure, we # ensure that self.tk is always _something_. self.tk = None if baseName is None: import sys, os baseName = os.path.basename(sys.argv[0]) baseName, ext = os.path.splitext(baseName) if ext not in ('.py', '.pyc', '.pyo'): baseName = baseName + ext interactive = 0 self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk) if useTk: self._loadtk() self.readprofile(baseName, className) | 194397e70f7430d928cab4d48a7d0f93549e7048 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/194397e70f7430d928cab4d48a7d0f93549e7048/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5518,
461,
33,
7036,
16,
16162,
33,
7036,
16,
2658,
2218,
56,
79,
2187,
999,
56,
79,
33,
21,
16,
3792,
33,
20,
16,
999,
33,
7036,
4672,
3536,
990,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5518,
461,
33,
7036,
16,
16162,
33,
7036,
16,
2658,
2218,
56,
79,
2187,
999,
56,
79,
33,
21,
16,
3792,
33,
20,
16,
999,
33,
7036,
4672,
3536,
990,
27... |
if plat == 'sunos5': | if platform == 'sunos5': | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' ) | 34febf5e9273cf7715b46286ff28fb41fa413231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/34febf5e9273cf7715b46286ff28fb41fa413231/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
309,
1173,
13640,
19,
3729,
19,
2941,
11,
486,
316,
365,
18,
9576,
18,
12083,
67,
8291,
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,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
309,
1173,
13640,
19,
3729,
19,
2941,
11,
486,
316,
365,
18,
9576,
18,
12083,
67,
8291,
30,
365,
... |
try: opts = self.__sections[section] except KeyError: raise NoSectionError(section) return opts.has_key(option) | return option in self.options(section) | def has_option(self, section, option): """Return whether the given section has the given option.""" try: opts = self.__sections[section] except KeyError: raise NoSectionError(section) return opts.has_key(option) | cecb7da2a446f1c0227844233d9d438a365a7cc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cecb7da2a446f1c0227844233d9d438a365a7cc7/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
4672,
3536,
990,
2856,
326,
864,
2442,
711,
326,
864,
1456,
12123,
775,
30,
1500,
273,
365,
16186,
11657,
63,
3464,
65,
1335,
4999,
30,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
4672,
3536,
990,
2856,
326,
864,
2442,
711,
326,
864,
1456,
12123,
775,
30,
1500,
273,
365,
16186,
11657,
63,
3464,
65,
1335,
4999,
30,
100... |
raise RuntimeError, "digest not calculated yet" | raise RuntimeError("digest not calculated yet") | def is_atomic(self): if self._atomic is None: raise RuntimeError, "digest not calculated yet" return bool(self._atomic) | 84793e205fe4971c4c2a29abcd6745c9541063d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7249/84793e205fe4971c4c2a29abcd6745c9541063d2/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
27718,
12,
2890,
4672,
309,
365,
6315,
27718,
353,
599,
30,
1002,
7265,
2932,
10171,
486,
8894,
4671,
7923,
327,
1426,
12,
2890,
6315,
27718,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
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,
27718,
12,
2890,
4672,
309,
365,
6315,
27718,
353,
599,
30,
1002,
7265,
2932,
10171,
486,
8894,
4671,
7923,
327,
1426,
12,
2890,
6315,
27718,
13,
2,
-100,
-100,
-100,
-100,
-100... |
ratio_max_parts = __calculate_ratio(config, config.ctib_max) | ratio_max_parts = __calculate_ratio(config, config.cwdb_max) | def run(config, tim=None): """ This method is where the data reduction process gets done. @param config: Object containing the data reduction configuration information. @type config: L{hlr_utils.Configure} @param tim: (OPTIONAL) Object that will allow the method to perform timing evaluations. @type tim: C{sns_time.DiffTime} """ # Steps 1-3 ratio_min_parts = __calculate_ratio(config, config.ctib_min) ratio_min = __make_ratio(ratio_min_parts) if tim is not None: tim.getTime(msg="After minimum ratio calculation ") # Step 4 ratio_max_parts = __calculate_ratio(config, config.ctib_max) ratio_max = __make_ratio(ratio_max_parts) if tim is not None: tim.getTime(msg="After maximum ratio calculation ") # Step 5 if __check_parts(ratio_min_parts) and __check_parts(ratio_max_parts): if (config.ratio[0] < ratio_min or config.ratio[0] > ratio_max): raise RuntimeError("Ratios from minimum and maximum ctibs do not "\ +"bracket ratio. Increase the maximum ctib " +"parameter. Min: %f, Max: %f, Given Ratio: %f"\ % (ratio_min, ratio_max, config.ratio[0])) elif __check_parts(ratio_min_parts) and not __check_parts(ratio_max_parts): if ratio_min > config.ratio[0]: raise RuntimeError("Ratio from minimum ctib is greater than "\ +"requested ratio. Decrease the minimum ctib "\ +"parameter. Min: %f, Given Ratio: %f" \ %(ratio_min, config.ratio[0])) elif not __check_parts(ratio_min_parts) and \ not __check_parts(ratio_max_parts): raise RuntimeError("The components of both ratios are negative. "\ +"Decrease the value of the minimum ctib "\ +"parameter.") else: pass # Step 6 tib_try = 0.0 ratio_try = 0.0 tib_range = [config.ctib_min, config.ctib_max] run_ok = False counter = 0 while counter < config.niter: tib_try = __bisect_range(tib_range) if config.verbose: print "TIB Try: ", tib_try ratio_try_parts = __calculate_ratio(config, tib_try) ratio_try = __make_ratio(ratio_try_parts) # First, check to see if ratio is within tolerance if __check_range(ratio_try, config.ratio[0]-config.ratio[1], config.ratio[0]+config.ratio[1]): if config.verbose: print "Final TIB: %f" % tib_try run_ok = True break # If not, check if the ratio parts if not __check_parts(ratio_try_parts): # It's not +/+, move range down tib_range[1] = tib_try else: # It's +/+, so look at ratio if ratio_try > config.ratio[0]: # Move range down tib_range[1] = tib_try else: # Move range up tib_range[0] = tib_try counter += 1 if not run_ok: # If you hit here, you've exhausted the number of iterations print "Maximum number of iterations exceeded! No suitable TIB found!" print "Best Value: %f, Ratio: %f" % (tib_try, ratio_try) | 36badd65c251eeb079d3bfab833aabc1dc8ebc9b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/763/36badd65c251eeb079d3bfab833aabc1dc8ebc9b/find_ldb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
1425,
16,
1658,
33,
7036,
4672,
3536,
1220,
707,
353,
1625,
326,
501,
20176,
1207,
5571,
2731,
18,
225,
632,
891,
642,
30,
1033,
4191,
326,
501,
20176,
1664,
1779,
18,
632,
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,
1086,
12,
1425,
16,
1658,
33,
7036,
4672,
3536,
1220,
707,
353,
1625,
326,
501,
20176,
1207,
5571,
2731,
18,
225,
632,
891,
642,
30,
1033,
4191,
326,
501,
20176,
1664,
1779,
18,
632,
7... |
self.opts.suffix+'.png' | self.opts.suffix if self.tag: filename+='_'+self.tag filename+='.png' | def investigateInspiral(self, triggerFiles, inj, ifoName, stage, number ): """ Investigate inspiral triggers and create a time-series of the SNRs around the injected time @param triggerFiles: List of files containing the inspiral triggers @param inj: The current injection @param ifo: The current IFO @param stage: The name of the stage (FIRST, SECOND) @param number: The consecutive number for this inspiral followup """ # read the inspiral file(s) if self.verbose: print "Processing INSPIRAL triggers from files ", triggerFiles snglTriggers = SnglInspiralUtils.ReadSnglInspiralFromFiles( triggerFiles ) | 098f1967c466e5dd8f2c3c2287152a59fa7af9cc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/098f1967c466e5dd8f2c3c2287152a59fa7af9cc/followup_missed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2198,
25999,
340,
382,
1752,
481,
287,
12,
2890,
16,
3080,
2697,
16,
316,
78,
16,
225,
21479,
461,
16,
6009,
16,
1300,
262,
30,
3536,
5454,
25999,
340,
316,
1752,
481,
287,
11752,
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,
2198,
25999,
340,
382,
1752,
481,
287,
12,
2890,
16,
3080,
2697,
16,
316,
78,
16,
225,
21479,
461,
16,
6009,
16,
1300,
262,
30,
3536,
5454,
25999,
340,
316,
1752,
481,
287,
11752,
471,... |
return loc, [] | elif loc == len(instring): return loc+1, [] else: exc = self.myException exc.loc = loc exc.pstr = instring raise exc | def parseImpl( self, instring, loc, doActions=True ): if loc < len(instring): #~ raise ParseException( instring, loc, "Expected end of text" ) exc = self.myException exc.loc = loc exc.pstr = instring raise exc return loc, [] | ccc5690b8f31e6ed4d9ab5da203030720cbab093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3693/ccc5690b8f31e6ed4d9ab5da203030720cbab093/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
2828,
12,
365,
16,
316,
1080,
16,
1515,
16,
741,
6100,
33,
5510,
262,
30,
309,
1515,
411,
562,
12,
267,
1080,
4672,
468,
98,
1002,
10616,
12,
316,
1080,
16,
1515,
16,
315,
6861... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
2828,
12,
365,
16,
316,
1080,
16,
1515,
16,
741,
6100,
33,
5510,
262,
30,
309,
1515,
411,
562,
12,
267,
1080,
4672,
468,
98,
1002,
10616,
12,
316,
1080,
16,
1515,
16,
315,
6861... |
command = "cp -R " + tmp.group(1) + "/* " + outdir + "/" | command = "mv " + tmp.group(1) + "/* " + outdir + "/" | def getOutput( self, obj, outdir='' ): """ retrieve job output """ if type(obj) == Job : # check for the RunningJob integrity if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob )) # the object passed is a valid Job, let's go on ... command = "glite-wms-job-output --json --noint " \ + obj.runningJob['schedulerId'] out, ret = self.ExecuteCommand( self.proxyString + command ) if ret != 0 : if out.find("Proxy File Not Found") != -1 : # Proxy missing # # adapting the error string for JobOutput requirements obj.runningJob.errors.append("Proxy Missing") elif out.find("Output files already retrieved") != -1 : # Output files already retrieved --> Archive! self.logging.warning( obj.runningJob['schedulerId'] + \ ' output already retrieved.' ) obj.runningJob.warnings.append("Job has been purged, " + \ "recovering status") else : self.logging.error( out ) obj.runningJob.errors.append( out ) elif ret == 0 and out.find("result: success") == -1 : # Excluding all the previous cases however something went wrong self.logging.error( obj.runningJob['schedulerId'] + \ ' problems during getOutput operation.' ) obj.runningJob.errors.append(out) else : # Output successfully retrieved without problems # let's copy in the right place... tmp = re.search(self.pathPattern, out) command = "cp -R " + tmp.group(1) + "/* " + outdir + "/" os.system( command ) command = "rm -rf " + tmp.group(1) os.system( command ) # self.logging.debug("Output of %s successfully retrieved" % str(obj.runningJob['schedulerId'])) if obj.runningJob.isError() : raise SchedulerError( obj.runningJob.errors[0][0], \ obj.runningJob.errors[0][1] ) elif type(obj) == Task : # the object passed is a Task for selJob in obj.jobs: if not self.valid( selJob.runningJob ): continue command = "glite-wms-job-output --json --noint " + \ selJob.runningJob['schedulerId'] out, ret = self.ExecuteCommand( self.proxyString + command ) | d2ba151848f06109e5b67cacf250a72fbc6a2ea2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8886/d2ba151848f06109e5b67cacf250a72fbc6a2ea2/SchedulerGLite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11062,
12,
365,
16,
1081,
16,
15398,
2218,
11,
262,
30,
3536,
4614,
1719,
876,
3536,
225,
309,
618,
12,
2603,
13,
422,
3956,
294,
225,
468,
866,
364,
326,
20480,
2278,
24425,
309,
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,
11062,
12,
365,
16,
1081,
16,
15398,
2218,
11,
262,
30,
3536,
4614,
1719,
876,
3536,
225,
309,
618,
12,
2603,
13,
422,
3956,
294,
225,
468,
866,
364,
326,
20480,
2278,
24425,
309,
486,... |
self.db = dbconnector.DatabaseConnector.getDBConnector( databaseSettings) | self.db = dbconnector.DatabaseConnector.getDBConnector(databaseUrl) | def __init__(self, databaseSettings={}, dbConnectInst=None, dataPath=[], quiet=False, rebuildDepending=True, rebuildExisting=True, noFail=False, prefer=[], additionalBuilders=[]): """ Constructs the DatabaseBuilder. | c8d1a8d19e806d9bc6b9afeb42dd63a4d0f19fb4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11128/c8d1a8d19e806d9bc6b9afeb42dd63a4d0f19fb4/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2063,
2628,
28793,
1319,
5215,
10773,
33,
7036,
16,
501,
743,
22850,
6487,
10902,
33,
8381,
16,
13419,
4584,
310,
33,
5510,
16,
13419,
9895,
33,
5510,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2063,
2628,
28793,
1319,
5215,
10773,
33,
7036,
16,
501,
743,
22850,
6487,
10902,
33,
8381,
16,
13419,
4584,
310,
33,
5510,
16,
13419,
9895,
33,
5510,
16,
... |
self.assertEquals('MyDateTime', typename('var_mytime')) | self.assertEquals('MyDateTime', typename('var_mytime')) | def testExactConverter(self): class MyInteger(int, JSClass): pass class MyString(str, JSClass): pass class MyUnicode(unicode, JSClass): pass class MyDateTime(datetime.time, JSClass): pass class Global(JSClass): var_bool = True var_int = 1 var_float = 1.0 var_str = 'str' var_unicode = u'unicode' var_datetime = datetime.datetime.now() var_date = datetime.date.today() var_time = datetime.time() var_myint = MyInteger() var_mystr = MyString('mystr') var_myunicode = MyUnicode('myunicode') var_mytime = MyDateTime() with JSContext(Global()) as ctxt: typename = ctxt.eval("(function (name) { return this[name].constructor.name; })") typeof = ctxt.eval("(function (name) { return typeof(this[name]); })") self.assertEquals('Boolean', typename('var_bool')) self.assertEquals('Number', typename('var_int')) self.assertEquals('Number', typename('var_float')) self.assertEquals('String', typename('var_str')) self.assertEquals('String', typename('var_unicode')) self.assertEquals('Date', typename('var_datetime')) self.assertEquals('Date', typename('var_date')) self.assertEquals('Date', typename('var_time')) self.assertEquals('MyInteger', typename('var_myint')) self.assertEquals('MyString', typename('var_mystr')) self.assertEquals('MyUnicode', typename('var_myunicode')) self.assertEquals('MyDateTime', typename('var_mytime')) self.assertEquals('object', typeof('var_myint')) self.assertEquals('object', typeof('var_mystr')) self.assertEquals('object', typeof('var_myunicode')) self.assertEquals('object', typeof('var_mytime')) | d76ea3f452d147f051e65b20fdab9b87a8b84413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2065/d76ea3f452d147f051e65b20fdab9b87a8b84413/PyV8.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14332,
5072,
12,
2890,
4672,
667,
8005,
4522,
12,
474,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
780,
12,
701,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
16532,
12,
9124,
16,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14332,
5072,
12,
2890,
4672,
667,
8005,
4522,
12,
474,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
780,
12,
701,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
16532,
12,
9124,
16,
67... |
pass | return | def RietveldSetup(ui, repo): global defaultcc, upload_options, rpc, server, server_url_base, force_google_account, verbosity, contributors # Read repository-specific options from lib/codereview/codereview.cfg try: f = open(repo.root + '/lib/codereview/codereview.cfg') for line in f: if line.startswith('defaultcc: '): defaultcc = SplitCommaSpace(line[10:]) except: pass try: f = open(repo.root + '/CONTRIBUTORS', 'r') except: raise util.Abort("cannot open %s: %s" % (repo.root+'/CONTRIBUTORS', ExceptionDetail())) for line in f: # CONTRIBUTORS is a list of lines like: # Person <email> # Person <email> <alt-email> # The first email address is the one used in commit logs. if line.startswith('#'): continue m = re.match(r"([^<>]+\S)\s+(<[^<>\s]+>)((\s+<[^<>\s]+>)*)\s*$", line) if m: name = m.group(1) email = m.group(2)[1:-1] contributors[email.lower()] = (name, email) for extra in m.group(3).split(): contributors[extra[1:-1].lower()] = (name, email) # TODO(rsc): If the repository config has no codereview section, # do not enable the extension. This allows users to # put the extension in their global .hgrc but only # enable it for some repositories. # if not ui.has_section("codereview"): # cmdtable = {} # return if not ui.verbose: verbosity = 0 # Config options. x = ui.config("codereview", "server") if x is not None: server = x # TODO(rsc): Take from ui.username? email = None x = ui.config("codereview", "email") if x is not None: email = x server_url_base = "http://" + server + "/" testing = ui.config("codereview", "testing") force_google_account = ui.configbool("codereview", "force_google_account", False) upload_options = opt() upload_options.email = email upload_options.host = None upload_options.verbose = 0 upload_options.description = None upload_options.description_file = None upload_options.reviewers = None upload_options.cc = None upload_options.message = None upload_options.issue = None upload_options.download_base = False upload_options.revision = None upload_options.send_mail = False upload_options.vcs = None upload_options.server = server upload_options.save_cookies = True if testing: upload_options.save_cookies = False upload_options.email = "test@example.com" rpc = None | 075bef20c05899ae4c13324b2a95878e40bda73c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5761/075bef20c05899ae4c13324b2a95878e40bda73c/codereview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
534,
6213,
90,
488,
7365,
12,
4881,
16,
3538,
4672,
2552,
805,
952,
16,
3617,
67,
2116,
16,
6724,
16,
1438,
16,
1438,
67,
718,
67,
1969,
16,
2944,
67,
9536,
67,
4631,
16,
11561,
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,
534,
6213,
90,
488,
7365,
12,
4881,
16,
3538,
4672,
2552,
805,
952,
16,
3617,
67,
2116,
16,
6724,
16,
1438,
16,
1438,
67,
718,
67,
1969,
16,
2944,
67,
9536,
67,
4631,
16,
11561,
16,
... |
def Description(self): | def Description(self, lang=None): | def Description(self): "Dublin Core element - resource summary" descr_field = self.Schema()['description'] return descr_field.get(self) | e4ce0e470f84c07fbdd8de54207e863eb79e1597 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/e4ce0e470f84c07fbdd8de54207e863eb79e1597/I18NMixin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6507,
12,
2890,
16,
3303,
33,
7036,
4672,
315,
40,
29056,
4586,
930,
300,
1058,
4916,
6,
18426,
67,
1518,
273,
365,
18,
3078,
1435,
3292,
3384,
3546,
327,
18426,
67,
1518,
18,
588,
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,
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,
6507,
12,
2890,
16,
3303,
33,
7036,
4672,
315,
40,
29056,
4586,
930,
300,
1058,
4916,
6,
18426,
67,
1518,
273,
365,
18,
3078,
1435,
3292,
3384,
3546,
327,
18426,
67,
1518,
18,
588,
12,... |
print "LAST ROW ID", self._last_inserted_ids | def post_exec(self, engine, proxy, compiled, parameters, **kwargs): """ Turn off the INDENTITY_INSERT mode if it's been activated, and fetch recently inserted IDENTIFY values (works only for one column) """ if getattr(compiled, "isinsert", False): if self.IINSERT: proxy("SET IDENTITY_INSERT %s OFF" % compiled.statement.table.name) self.IINSERT = False elif self.HASIDENT: cursor = proxy("SELECT @@IDENTITY AS lastrowid") row = cursor.fetchone() self._last_inserted_ids = [int(row[0])] print "LAST ROW ID", self._last_inserted_ids self.HASIDENT = False | facbaa3333a5ca24f1cd4d09e5f84b63d3faefe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/facbaa3333a5ca24f1cd4d09e5f84b63d3faefe5/mssql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
67,
4177,
12,
2890,
16,
4073,
16,
2889,
16,
7743,
16,
1472,
16,
2826,
4333,
4672,
3536,
22425,
3397,
326,
2120,
40,
11101,
67,
11356,
1965,
309,
518,
1807,
2118,
14892,
16,
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,
1603,
67,
4177,
12,
2890,
16,
4073,
16,
2889,
16,
7743,
16,
1472,
16,
2826,
4333,
4672,
3536,
22425,
3397,
326,
2120,
40,
11101,
67,
11356,
1965,
309,
518,
1807,
2118,
14892,
16,
471,
... | |
print esc(" ERROR:",RED)+esc(" Header in file should be "+header,BOLD) print " --> ",esc(line,YELLOW,True) | print esc(" ERROR:",RED)+esc(" Header in file should be "+header,BOLD) print " --> ",esc(line,YELLOW,True) | def usage(): print "Usage: missing.py [--nocolor] [--hidetrans] langXX" | 6a4c4fb149ce545711f2ea5cbc01572ef63b9c03 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/206/6a4c4fb149ce545711f2ea5cbc01572ef63b9c03/missing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
315,
5357,
30,
3315,
18,
2074,
306,
413,
31470,
355,
280,
65,
306,
413,
76,
350,
16354,
634,
65,
3303,
5619,
6,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
4084,
13332,
1172,
315,
5357,
30,
3315,
18,
2074,
306,
413,
31470,
355,
280,
65,
306,
413,
76,
350,
16354,
634,
65,
3303,
5619,
6,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if sign == -1: strBody = '-' + strBody | if sign: strBody = '-' + strBody | def format(self, num): # positivize the numbers absNum = abs(num) if absNum == num: sign = 1 else: sign = -1 intPart, fracPart = divmod(absNum, 1.0) strInt = str(long(intPart)) if self.thousandSeparator is not None: strNew = '' while strInt: left, right = strInt[0:-3], strInt[-3:] if left == '': #strNew = self.thousandSeparator + right + strNew strNew = right + strNew else: strNew = self.thousandSeparator + right + strNew strInt = left strInt = strNew places, sep = self.decimalPlaces, self.decimalSeparator strip = places<=0 if places and strip: places = -places pattern = '%0.' + str(places) + 'f' strFrac = sep + (pattern % fracPart)[2:] if strip: while strFrac and strFrac[-1] in ['0',sep]: strFrac = strFrac[:-1] strBody = strInt + strFrac if sign == -1: strBody = '-' + strBody if self.prefix: strBody = self.prefix + strBody if self.suffix: strBody = strBody + self.suffix return strBody | cbd179ea41441d305bf7b364d9c61173d2c55564 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/cbd179ea41441d305bf7b364d9c61173d2c55564/formatters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
818,
4672,
468,
949,
305,
427,
554,
326,
5600,
2417,
2578,
273,
2417,
12,
2107,
13,
309,
2417,
2578,
422,
818,
30,
1573,
273,
404,
469,
30,
1573,
273,
300,
21,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
818,
4672,
468,
949,
305,
427,
554,
326,
5600,
2417,
2578,
273,
2417,
12,
2107,
13,
309,
2417,
2578,
422,
818,
30,
1573,
273,
404,
469,
30,
1573,
273,
300,
21,
225... |
if '\n' in text: if string.find(text, '\r\n') >= 0: self._eoln = '\r\n' else: self._eoln = '\n' text = string.replace(text, self._eoln, '\r') change = 0 else: change = 0 self._eoln = '\r' | def __init__(self, path = "", title = ""): defaultfontsettings, defaulttabsettings, defaultwindowsize = geteditorprefs() global _scriptuntitledcounter if not path: if title: self.title = title else: self.title = "Untitled Script " + `_scriptuntitledcounter` _scriptuntitledcounter = _scriptuntitledcounter + 1 text = "" self._creator = W._signature self._eoln = os.linesep elif os.path.exists(path): path = resolvealiases(path) dir, name = os.path.split(path) self.title = name f = open(path, "rb") text = f.read() f.close() self._creator, filetype = MacOS.GetCreatorAndType(path) self.addrecentfile(path) else: raise IOError, "file '%s' does not exist" % path self.path = path if '\n' in text: if string.find(text, '\r\n') >= 0: self._eoln = '\r\n' else: self._eoln = '\n' text = string.replace(text, self._eoln, '\r') change = 0 else: change = 0 self._eoln = '\r' self.settings = {} if self.path: self.readwindowsettings() if self.settings.has_key("windowbounds"): bounds = self.settings["windowbounds"] else: bounds = defaultwindowsize if self.settings.has_key("fontsettings"): self.fontsettings = self.settings["fontsettings"] else: self.fontsettings = defaultfontsettings if self.settings.has_key("tabsize"): try: self.tabsettings = (tabsize, tabmode) = self.settings["tabsize"] except: self.tabsettings = defaulttabsettings else: self.tabsettings = defaulttabsettings W.Window.__init__(self, bounds, self.title, minsize = (330, 120), tabbable = 0) self.setupwidgets(text) if change > 0: self.editgroup.editor.textchanged() if self.settings.has_key("selection"): selstart, selend = self.settings["selection"] self.setselection(selstart, selend) self.open() self.setinfotext() self.globals = {} self._buf = "" # for write method self.debugging = 0 self.profiling = 0 self.run_as_main = self.settings.get("run_as_main", 0) self.run_with_interpreter = self.settings.get("run_with_interpreter", 0) self.run_with_cl_interpreter = self.settings.get("run_with_cl_interpreter", 0) | 23336dc4985ce42aabdee8f9a4da0cf2186ee528 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23336dc4985ce42aabdee8f9a4da0cf2186ee528/PyEdit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
273,
23453,
2077,
273,
1408,
4672,
805,
5776,
4272,
16,
805,
7032,
4272,
16,
805,
5668,
1467,
273,
336,
9177,
1484,
2556,
1435,
2552,
389,
4263,
10032... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
273,
23453,
2077,
273,
1408,
4672,
805,
5776,
4272,
16,
805,
7032,
4272,
16,
805,
5668,
1467,
273,
336,
9177,
1484,
2556,
1435,
2552,
389,
4263,
10032... | |
""" | """ % arg | def do_help(self, arg): msg = """ | 27e83a3774587a84532112eaada08ead41debbe9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/27e83a3774587a84532112eaada08ead41debbe9/shell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5201,
12,
2890,
16,
1501,
4672,
1234,
273,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5201,
12,
2890,
16,
1501,
4672,
1234,
273,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
resp=self._owner.SendAndWaitForResponse(Protocol('iq',type='set',payload=[Node('bind',attrs={'xmlns':NS_BIND})])) | if resource: resource=[Node('resource',payload=[resource])] else: resource=[] resp=self._owner.SendAndWaitForResponse(Protocol('iq',type='set',payload=[Node('bind',attrs={'xmlns':NS_BIND},payload=resource)])) | def Bind(self,resource): while self.bound is None and self._owner.Process(1): pass | ed9bbc187c416413336b1cec5d7c6ab176ee8864 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7194/ed9bbc187c416413336b1cec5d7c6ab176ee8864/auth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6936,
12,
2890,
16,
3146,
4672,
1323,
365,
18,
3653,
353,
599,
471,
365,
6315,
8443,
18,
2227,
12,
21,
4672,
1342,
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,
6936,
12,
2890,
16,
3146,
4672,
1323,
365,
18,
3653,
353,
599,
471,
365,
6315,
8443,
18,
2227,
12,
21,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def __new__(self, data=None, name='PLS regression', **kwds): | def __new__(self, data=None, **kwds): | def __new__(self, data=None, name='PLS regression', **kwds): learner = object.__new__(self, **kwds) if data: learner.__init__(name) # force init return learner(data) else: return learner # invokes the __init__ | e8a7c8d2ae14302029948b56e59003ddda075e7a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/e8a7c8d2ae14302029948b56e59003ddda075e7a/orngRegression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2704,
972,
12,
2890,
16,
501,
33,
7036,
16,
2826,
25577,
4672,
884,
24834,
273,
733,
16186,
2704,
972,
12,
2890,
16,
2826,
25577,
13,
309,
501,
30,
884,
24834,
16186,
2738,
972,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2704,
972,
12,
2890,
16,
501,
33,
7036,
16,
2826,
25577,
4672,
884,
24834,
273,
733,
16186,
2704,
972,
12,
2890,
16,
2826,
25577,
13,
309,
501,
30,
884,
24834,
16186,
2738,
972,
... |
'pdc': u'Portal', | def __init__(self): family.Family.__init__(self) self.name = 'wikipedia' | abbd4ca1646bf80f482e7e9171830c8747b9ce9c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/abbd4ca1646bf80f482e7e9171830c8747b9ce9c/wikipedia_family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
11999,
13744,
11,
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,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
11999,
13744,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
f = file(filename) | f = file(filename, "w") out.seek(0) | def update_file(self, filename): '''Update the specified configuration file.''' sectname = None optname = None out = TemporaryFile("w") if os.path.exists(filename): f = file(filename, "r") else: # doesn't exist, so create it - all the changed options will # be added to it if options["globals", "verbose"]: print "Creating new configuration file", filename f = file(filename, "w") f.close() f = file(filename, "r") written = [] vi = ": " # default; uses the one from the file where possible while True: line = f.readline() if not line: break # comment or blank line? if line.strip() == '' or line[0] in '#;': out.write(line) continue if line.split(None, 1)[0].lower() == 'rem' and line[0] in "rR": # no leading whitespace out.write(line) continue # continuation line? if line[0].isspace() and sectname is not None and optname: continue # a section header or option header? else: # is it a section header? mo = self.SECTCRE.match(line) if mo: # Add any missing from the previous section if sectname is not None: self._add_missing(out, written, sectname, vi, False) sectname = mo.group('header') # So sections can't start with a continuation line optname = None if sectname in self.sections(): out.write(line) # an option line? else: mo = self.OPTCRE.match(line) if mo: optname, vi, optval = mo.group('option', 'vi', 'value') if vi in ('=', ':') and ';' in optval: # ';' is a comment delimiter only if it follows # a spacing character pos = optval.find(';') if pos != -1 and optval[pos-1].isspace(): optval = optval[:pos] optval = optval.strip() # allow empty values if optval == '""': optval = '' optname = optname.rstrip().lower() if self._options.has_key((sectname, optname)): out.write(optname) out.write(vi) out.write(self.unconvert(sectname, optname)) out.write('\n') written.append((sectname, optname)) for sect in self.sections(): self._add_missing(out, written, sect, vi) f.close() out.flush() if options["globals", "verbose"]: # save a backup of the old file shutil.copyfile(filename, filename + ".bak") # copy the new file across f = file(filename) shutil.copyfileobj(out, f) out.close() f.close() | cfc9cd733a379cce73446367aac2c802ab6c357f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/cfc9cd733a379cce73446367aac2c802ab6c357f/Options.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
768,
12,
2890,
16,
1544,
4672,
9163,
1891,
326,
1269,
1664,
585,
1093,
6309,
29140,
529,
273,
599,
2153,
529,
273,
599,
596,
273,
22791,
812,
2932,
91,
7923,
309,
1140,
18,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
768,
12,
2890,
16,
1544,
4672,
9163,
1891,
326,
1269,
1664,
585,
1093,
6309,
29140,
529,
273,
599,
2153,
529,
273,
599,
596,
273,
22791,
812,
2932,
91,
7923,
309,
1140,
18,
8... |
return time.strftime("%Y-%m-%d %H:%M:%S") | date_obj = self.pool.get('ir.date') return date_obj.today(cursor, user, context=context) | def default_create_date(self, cursor, user, context=None ): return time.strftime("%Y-%m-%d %H:%M:%S") | 34d7d08f1e92a2df55d0eb352afdd98909dedd21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2593/34d7d08f1e92a2df55d0eb352afdd98909dedd21/cms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
2640,
67,
712,
12,
2890,
16,
3347,
16,
729,
16,
819,
33,
7036,
262,
30,
1509,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
712,
6134,
327,
1509,
67,
2603,
18,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
2640,
67,
712,
12,
2890,
16,
3347,
16,
729,
16,
819,
33,
7036,
262,
30,
1509,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
712,
6134,
327,
1509,
67,
2603,
18,
300... |
self.flush_move_actions() | self.flush_delayed_actions() | def create_abstraction(self, module_ids, connection_ids, name): self.flush_move_actions() (abstraction, connections) = \ BaseController.create_abstraction(self, self.current_pipeline, module_ids, connection_ids, name) op_list = [] op_list.extend(('delete', self.current_pipeline.connections[c_id]) for c_id in connection_ids) op_list.extend(('delete', self.current_pipeline.modules[m_id]) for m_id in module_ids) op_list.append(('add', abstraction)) op_list.extend(('add', c) for c in connections) action = core.db.action.create_action(op_list) self.add_new_action(action) result = self.perform_action(action) return abstraction | 79dd982e6cefb84d959fc7a4fd17507a2c038301 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/79dd982e6cefb84d959fc7a4fd17507a2c038301/vistrail_controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
378,
701,
1128,
12,
2890,
16,
1605,
67,
2232,
16,
1459,
67,
2232,
16,
508,
4672,
365,
18,
11330,
67,
10790,
329,
67,
4905,
1435,
261,
378,
701,
1128,
16,
5921,
13,
273,
521,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
378,
701,
1128,
12,
2890,
16,
1605,
67,
2232,
16,
1459,
67,
2232,
16,
508,
4672,
365,
18,
11330,
67,
10790,
329,
67,
4905,
1435,
261,
378,
701,
1128,
16,
5921,
13,
273,
521,... |
complexity :math:`O(V+N_k^2)`, where :math:`N_k < V` is the number of different degrees sampled (or in,out-degree pairs). | complexity :math:`O(V + E\log N_k + N_k^2)`, where :math:`N_k < V` is the number of different degrees sampled (or in,out-degree pairs). | def random_graph(N, deg_sampler, deg_corr=None, directed=True, parallel=False, self_loops=False, seed=0, verbose=False): r""" Generate a random graph, with a given degree distribution and correlation. Parameters ---------- N : int Number of vertices in the graph. deg_sampler : function A degree sampler function which is called without arguments, and returns a tuple of ints representing the in and out-degree of a given vertex (or a single int for undirected graphs, representing the out-degree). This function is called once per vertex, but may be called more times, if the degree sequence cannot be used to build a graph. deg_corr : function (optional, default: None) A function which give the degree correlation of the graph. It should be callable with two parameters: the in,out-degree pair of the source vertex an edge, and the in,out-degree pair of the target of the same edge (for undirected graphs, both parameters are single values). The function should return a number proportional to the probability of such an edge existing in the generated graph. directed : bool (optional, default: True) Whether the generated graph should be directed. parallel : bool (optional, default: False) If True, parallel edges are allowed. self_loops : bool (optional, default: False) If True, self-loops are allowed. seed : int (optional, default: 0) Seed for the random number generator. If seed=0, a random value is chosen. Returns ------- random_graph : Graph The generated graph. See Also -------- random_rewire: in place graph shuffling Notes ----- The algorithm maintains a list of all available source and target degree pairs, such that the deg_corr function is called only once with the same parameters. The uncorrelated case, the complexity is :math:`O(V+E)`. For the correlated case the worst-case complexity is :math:`O(V^2)`, but the typical case has complexity :math:`O(V+N_k^2)`, where :math:`N_k < V` is the number of different degrees sampled (or in,out-degree pairs). Examples -------- >>> from numpy.random import randint, random, seed, poisson >>> from pylab import * >>> seed(42) This is a degree sampler which uses rejection sampling to sample from the distribution :math:`P(k)\propto 1/k`, up to a maximum. >>> def sample_k(max): ... accept = False ... while not accept: ... k = randint(1,max+1) ... accept = random() < 1.0/k ... return k ... The following generates a random undirected graph with degree distribution :math:`P(k)\propto 1/k` (with k_max=40) and an *assortative* degree correlation of the form: .. math:: P(i,k) \propto \frac{1}{1+|i-k|} >>> g = gt.random_graph(1000, lambda: sample_k(40), ... lambda i,k: 1.0/(1+abs(i-k)), directed=False) >>> gt.scalar_assortativity(g, "out") (0.52810631736984548, 0.012618649197538264) The following samples an in,out-degree pair from the joint distribution: .. math:: p(j,k) = \frac{1}{2}\frac{e^{-m_1}m_1^j}{j!}\frac{e^{-m_1}m_1^k}{k!} + \frac{1}{2}\frac{e^{-m_2}m_2^j}{j!}\frac{e^{-m_2}m_2^k}{k!} with :math:`m_1 = 4` and :math:`m_2 = 20`. >>> def deg_sample(): ... if random() > 0.5: ... return poisson(4), poisson(4) ... else: ... return poisson(20), poisson(20) ... The following generates a random directed graph with this distribution, and plots the combined degree correlation. >>> g = gt.random_graph(20000, deg_sample) >>> >>> hist = gt.combined_corr_hist(g, "in", "out") >>> imshow(hist[0], interpolation="nearest") <...> >>> colorbar() <...> >>> xlabel("in degree") <...> >>> ylabel("out degree") <...> >>> savefig("combined-deg-hist.png") .. figure:: combined-deg-hist.png :align: center Combined degree histogram. A correlated directed graph can be build as follows. Consider the following degree correlation: .. math:: P(j',k'|j,k)=\frac{e^{-k}k^{j'}}{j'!} \frac{e^{-(20-j)}(20-j)^{k'}}{k'!} i.e., the in->out correlation is "disassortative", the out->in correlation is "assortative", and everything else is uncorrelated. We will use a flat degree distribution in the range [1,20). >>> p = scipy.stats.poisson >>> g = gt.random_graph(20000, lambda: (sample_k(19), sample_k(19)), ... lambda a,b: (p.pmf(a[0],b[1])* ... p.pmf(a[1],20-b[0]))) Lets plot the average degree correlations to check. >>> clf() >>> corr = gt.avg_neighbour_corr(g, "in", "in") >>> errorbar(corr[2], corr[0], yerr=corr[1], fmt="o-", label="<in> vs in") (...) >>> corr = gt.avg_neighbour_corr(g, "in", "out") >>> errorbar(corr[2], corr[0], yerr=corr[1], fmt="o-", label="<out> vs in") (...) >>> corr = gt.avg_neighbour_corr(g, "out", "in") >>> errorbar(corr[2], corr[0], yerr=corr[1], fmt="o-", label="<in> vs out") (...) >>> corr = gt.avg_neighbour_corr(g, "out", "out") >>> errorbar(corr[2], corr[0], yerr=corr[1], fmt="o-", label="<out> vs out") (...) >>> legend(loc="best") <...> >>> xlabel("source degree") <...> >>> ylabel("average target degree") <...> >>> savefig("deg-corr-dir.png") .. figure:: deg-corr-dir.png :align: center Average nearest neighbour correlations. """ if seed == 0: seed = numpy.random.randint(0, sys.maxint) g = Graph() if deg_corr == None: uncorrelated = True else: uncorrelated = False if not directed and deg_corr != None: corr = lambda i,j: _corr_wrap(i, j, deg_corr) else: corr = deg_corr libgraph_tool_generation.gen_random_graph(g._Graph__graph, N, deg_sampler, corr, uncorrelated, not parallel, not self_loops, not directed, seed, verbose) g.set_directed(directed) return g | 5488003591e84b00c9314769f67e9050e263a6d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3516/5488003591e84b00c9314769f67e9050e263a6d3/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2744,
67,
4660,
12,
50,
16,
5843,
67,
87,
10463,
16,
5843,
67,
17515,
33,
7036,
16,
20830,
33,
5510,
16,
7230,
33,
8381,
16,
365,
67,
383,
4473,
33,
8381,
16,
5009,
33,
20,
16,
398... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4660,
12,
50,
16,
5843,
67,
87,
10463,
16,
5843,
67,
17515,
33,
7036,
16,
20830,
33,
5510,
16,
7230,
33,
8381,
16,
365,
67,
383,
4473,
33,
8381,
16,
5009,
33,
20,
16,
398... |
for other in graph.nodes: if other.position: repulsionForce(self, other, 80) edgeStrength = 200 for axis in (0,1): self.position[axis] += edgeStrength / max(self.position[axis], 1) self.position[axis] -= edgeStrength / max(graph.viewport.size[axis] - self.position[axis], 1) self.position += (random.normalvariate(0, graph.temperature), random.normalvariate(0, graph.temperature)) | if not self.isGrabbed: for other in graph.nodes: if other.position: repulsionForce(self, other, 80) edgeStrength = 200 for axis in (0,1): self.position[axis] += edgeStrength / max(self.position[axis], 1) self.position[axis] -= edgeStrength / max(graph.viewport.size[axis] - self.position[axis], 1) self.position += (random.normalvariate(0, graph.temperature), random.normalvariate(0, graph.temperature)) | def animate(self, graph): # If we're new, start in the middle if self.position is None: self.position = Numeric.array(graph.viewport.size, Numeric.Float)/2 | 6491199321a1cbf73b40c206b538dcf92d438c77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/6491199321a1cbf73b40c206b538dcf92d438c77/glgraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14671,
12,
2890,
16,
2667,
4672,
468,
971,
732,
4565,
394,
16,
787,
316,
326,
7689,
309,
365,
18,
3276,
353,
599,
30,
365,
18,
3276,
273,
16980,
18,
1126,
12,
4660,
18,
28852,
18,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14671,
12,
2890,
16,
2667,
4672,
468,
971,
732,
4565,
394,
16,
787,
316,
326,
7689,
309,
365,
18,
3276,
353,
599,
30,
365,
18,
3276,
273,
16980,
18,
1126,
12,
4660,
18,
28852,
18,
14... |
result.update(EntityDetailView.get_metadata(request, entity.identifier_scheme, entity.identifier_value)) | result.update(EntityDetailView(self.conf).get_metadata(request, entity.identifier_scheme, entity.identifier_value)) | def entity_search(self, request, query, is_single_app_search): entities = Entity.objects.all() if hasattr(self.conf, 'search_identifiers'): entities = entities.filter( _identifiers__scheme__in = self.conf.search_identifiers, _identifiers__value__iexact = query, ) else: entities = entities.filter( _identifiers__value__iexact = query, ) | 3bd2e185e9cec8204163a30139db161bcd7b6650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/3bd2e185e9cec8204163a30139db161bcd7b6650/search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1522,
67,
3072,
12,
2890,
16,
590,
16,
843,
16,
353,
67,
7526,
67,
2910,
67,
3072,
4672,
5140,
273,
3887,
18,
6911,
18,
454,
1435,
309,
3859,
12,
2890,
18,
3923,
16,
296,
3072,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1522,
67,
3072,
12,
2890,
16,
590,
16,
843,
16,
353,
67,
7526,
67,
2910,
67,
3072,
4672,
5140,
273,
3887,
18,
6911,
18,
454,
1435,
309,
3859,
12,
2890,
18,
3923,
16,
296,
3072,
67,
... |
u.bind(x, 42) | sp.bind(x, 42) | def test_one_thread_reading_one_var(self): cons = Consumer() x = u.var('x') cons.give_var(x) cons.start() u.bind(x, 42) cons.join() assert cons.var.val == 42 | 50b8fd3666df00823a923a91776f1cf8144d3ffe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/50b8fd3666df00823a923a91776f1cf8144d3ffe/test_variable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
476,
67,
5930,
67,
21803,
67,
476,
67,
1401,
12,
2890,
4672,
1959,
273,
9326,
1435,
619,
273,
582,
18,
1401,
2668,
92,
6134,
1959,
18,
75,
688,
67,
1401,
12,
92,
13,
1959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
476,
67,
5930,
67,
21803,
67,
476,
67,
1401,
12,
2890,
4672,
1959,
273,
9326,
1435,
619,
273,
582,
18,
1401,
2668,
92,
6134,
1959,
18,
75,
688,
67,
1401,
12,
92,
13,
1959,
... |
leftradiussquared = ( leftrect.width ** 2 + leftrect.height ** 2 ) / 4 | leftradiussquared = (leftrect.width ** 2 + leftrect.height ** 2) / 4 | def collide_circle( left, right ): """collision detection between two sprites, using circles. pygame.sprite.collide_circle(left, right): return bool Tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute. New in pygame 1.8.0 """ xdistance = left.rect.centerx - right.rect.centerx ydistance = left.rect.centery - right.rect.centery distancesquared = xdistance ** 2 + ydistance ** 2 try: leftradiussquared = left.radius ** 2 except AttributeError: leftrect = left.rect leftradiussquared = ( leftrect.width ** 2 + leftrect.height ** 2 ) / 4 try: rightradiussquared = right.radius ** 2 except AttributeError: rightrect = right.rect rightradiussquared = ( rightrect.width ** 2 + rightrect.height ** 2 ) / 4 return distancesquared < leftradiussquared + rightradiussquared | d9760f3e4782abb02dd98080337626eefdad67ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/d9760f3e4782abb02dd98080337626eefdad67ee/sprite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
645,
8130,
67,
18970,
12,
2002,
16,
2145,
262,
30,
3536,
12910,
1951,
11649,
3086,
2795,
1694,
24047,
16,
1450,
5886,
9558,
18,
2395,
13957,
18,
1752,
796,
18,
1293,
8130,
67,
18970,
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,
645,
8130,
67,
18970,
12,
2002,
16,
2145,
262,
30,
3536,
12910,
1951,
11649,
3086,
2795,
1694,
24047,
16,
1450,
5886,
9558,
18,
2395,
13957,
18,
1752,
796,
18,
1293,
8130,
67,
18970,
12,... |
table = tables.getTable(f, self.current) | table = tables.getTable(f, None, self.current) | def testTables(self, newfile = True): if newfile: self.repofile(self.sf.db_uuid) f = omero.model.OriginalFileI( 1, False) self.sf.return_values.append( f ) tables = self.tablesI() table = tables.getTable(f, self.current) self.assert_( table ) self.assert_( table.table ) self.assert_( table.table.storage ) return table | a7bf44d8e2cbb411e37c19eab6872649a38acbeb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/a7bf44d8e2cbb411e37c19eab6872649a38acbeb/servants.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6905,
12,
2890,
16,
394,
768,
273,
1053,
4672,
309,
394,
768,
30,
365,
18,
7422,
768,
12,
2890,
18,
21668,
18,
1966,
67,
7080,
13,
284,
273,
8068,
2439,
18,
2284,
18,
8176,
812... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6905,
12,
2890,
16,
394,
768,
273,
1053,
4672,
309,
394,
768,
30,
365,
18,
7422,
768,
12,
2890,
18,
21668,
18,
1966,
67,
7080,
13,
284,
273,
8068,
2439,
18,
2284,
18,
8176,
812... |
except (IOError, EOFError), inst: | except (IOError, EOFError, ValueError), inst: | def readConfig(self): self.config_lock.acquire() | e8afc64bbb2882ef3fd95ae57010906bd9e15e35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8738/e8afc64bbb2882ef3fd95ae57010906bd9e15e35/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
809,
12,
2890,
4672,
365,
18,
1425,
67,
739,
18,
1077,
1039,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
809,
12,
2890,
4672,
365,
18,
1425,
67,
739,
18,
1077,
1039,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
category = gdata.atom.Category(scheme=gdata.docs.service.DATA_KIND_SCHEME, term=gdata.docs.service.DOCUMENT_KIND_TERM, label='document') self.new_entry.category.append(category) | self.new_entry.category.append(self.DOCUMENT_CATEGORY) | def setUp(self): client_login() self.doclist = client self.TITLE = 'Test title' self.new_entry = gdata.docs.DocumentListEntry() category = gdata.atom.Category(scheme=gdata.docs.service.DATA_KIND_SCHEME, term=gdata.docs.service.DOCUMENT_KIND_TERM, label='document') self.new_entry.category.append(category) | dcc46816af19bac967f4b588353a3ee4514dd5d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6580/dcc46816af19bac967f4b588353a3ee4514dd5d2/service_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
1004,
67,
5819,
1435,
365,
18,
2434,
1098,
273,
1004,
365,
18,
14123,
273,
296,
4709,
2077,
11,
365,
18,
2704,
67,
4099,
273,
314,
892,
18,
8532,
18,
2519,
27899... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
1004,
67,
5819,
1435,
365,
18,
2434,
1098,
273,
1004,
365,
18,
14123,
273,
296,
4709,
2077,
11,
365,
18,
2704,
67,
4099,
273,
314,
892,
18,
8532,
18,
2519,
27899... |
"""Converts a string of the basic form [[dd:]mm:]ss to decimal seconds | """Convert a string of the basic form [[dd:]mm:]ss to decimal seconds | def secStrFromDMSStr(dmsStr): """Converts a string of the basic form [[dd:]mm:]ss to decimal seconds preserving the original accuracy of seconds Note that missing fields are handled differently than degFromDMSStr! See splitDMSStr for details of the format. error conditions: raises ValueError if the string cannot be parsed """ dmsItems = splitDMSStr(dmsStr) # extract sign and fractional seconds (includes decimal point) signStr = dmsItems[0] fracSecStr = dmsItems[-1] # compute integer seconds # convert all but first and last items to integers intList = [intFromStr(item) for item in dmsItems[1:-1]] intSec = 0 for intVal in intList: intSec = abs(intVal) + (intSec * 60) return "%s%s%s" % (signStr, intSec, fracSecStr) | a5c12743960cc44ddb0aa0f21361c8697521f18c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6354/a5c12743960cc44ddb0aa0f21361c8697521f18c/StringUtil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1428,
1585,
1265,
16125,
1260,
313,
12,
72,
959,
1585,
4672,
3536,
2723,
279,
533,
434,
326,
5337,
646,
12167,
449,
26894,
7020,
26894,
1049,
358,
6970,
3974,
27995,
326,
2282,
15343,
434,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1428,
1585,
1265,
16125,
1260,
313,
12,
72,
959,
1585,
4672,
3536,
2723,
279,
533,
434,
326,
5337,
646,
12167,
449,
26894,
7020,
26894,
1049,
358,
6970,
3974,
27995,
326,
2282,
15343,
434,... |
pass | def tearDown(self): # cleanup if os.path.isfile("./test/HierarchicalCache.fio") : os.remove("./test/HierarchicalCache.fio") pass | 70d2b92eff39bc0dc1c21757ebd3b59d7a198c43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/70d2b92eff39bc0dc1c21757ebd3b59d7a198c43/HierarchicalCache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
225,
468,
6686,
309,
1140,
18,
803,
18,
291,
768,
2932,
18,
19,
3813,
19,
44,
14529,
1649,
18,
74,
1594,
7923,
294,
1140,
18,
4479,
2932,
18,
19,
381... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
268,
2091,
4164,
12,
2890,
4672,
225,
468,
6686,
309,
1140,
18,
803,
18,
291,
768,
2932,
18,
19,
3813,
19,
44,
14529,
1649,
18,
74,
1594,
7923,
294,
1140,
18,
4479,
2932,
18,
19,
381... | |
if val!=globalVars.lastProgressValue: | if val and val!=globalVars.lastProgressValue: | def event_valueChange(self): if config.conf["presentation"]["beepOnProgressBarUpdates"] and controlTypes.STATE_INVISIBLE not in self.states and winUser.isWindowVisible(self.windowHandle) and winUser.isDescendantWindow(winUser.getForegroundWindow(),self.windowHandle): val=self.value if val!=globalVars.lastProgressValue: tones.beep(self.BASE_BEEP_FREQ*2**(float(val[:-1])/25.0),40) globalVars.lastProgressValue=val else: super(ProgressBar,self).event_valueChange() | 3988dec1c87f313c5e885741dc230275379c27fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/3988dec1c87f313c5e885741dc230275379c27fc/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
1132,
3043,
12,
2890,
4672,
309,
642,
18,
3923,
9614,
10364,
6,
6362,
6,
2196,
881,
1398,
31547,
5121,
11929,
471,
3325,
2016,
18,
7998,
67,
706,
29588,
486,
316,
365,
18,
799... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
1132,
3043,
12,
2890,
4672,
309,
642,
18,
3923,
9614,
10364,
6,
6362,
6,
2196,
881,
1398,
31547,
5121,
11929,
471,
3325,
2016,
18,
7998,
67,
706,
29588,
486,
316,
365,
18,
799... |
return 0 | return proxy_bypass_macosx_sysconf(host) | def proxy_bypass(host): if getproxies_environment(): return proxy_bypass_environment(host) else: return 0 | e866d1c661942e5befcca467d598edfcf9eac2fd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/e866d1c661942e5befcca467d598edfcf9eac2fd/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2889,
67,
29604,
12,
2564,
4672,
309,
336,
20314,
606,
67,
10274,
13332,
327,
2889,
67,
29604,
67,
10274,
12,
2564,
13,
469,
30,
327,
374,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
2889,
67,
29604,
12,
2564,
4672,
309,
336,
20314,
606,
67,
10274,
13332,
327,
2889,
67,
29604,
67,
10274,
12,
2564,
13,
469,
30,
327,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
os.system("hg init %s" % repodir) writeFile(repodir + "/.hgignore", [ignoreBinary(), "\.src\.rpm$\n"]) writeFile(repodir + "/.hg/hgrc", ["[web]\ndescription = %s\n" % repodescr, "author = %s\n" % hgauthor]) for (repodescr, reponame, dirs, filecache, maxchanges) in srpm_repos: repodir = hgrepo + "/" + reponame if not dirs or os.path.isdir(repodir): continue | continue if os.path.isdir(repodir): firsttime = 0 else: firsttime = 1 os.system("hg init %s" % repodir) writeFile(repodir + "/.hgignore", [ignoreBinary(), "\.src\.rpm$\n"]) writeFile(repodir + "/.hg/hgrc", ["[web]\ndescription = %s\n" % repodescr, "author = %s\n" % hgauthor]) | def createMercurial(): if not os.path.isdir(hgrepo) or not os.path.isdir(hgfiles): print "Error: Paths for mercurial not setup." return createGitMirrors() createMercurialCGI() createMercurialMirrors() updateMercurialMirrors() # Create and initialize repos if still missing. for (repodescr, reponame, dirs, filecache, maxchanges) in srpm_repos: repodir = hgrepo + "/" + reponame if not dirs or os.path.isdir(repodir): continue os.system("hg init %s" % repodir) writeFile(repodir + "/.hgignore", [ignoreBinary(), "\.src\.rpm$\n"]) writeFile(repodir + "/.hg/hgrc", ["[web]\ndescription = %s\n" % repodescr, "author = %s\n" % hgauthor]) # Write data for different repos. for (repodescr, reponame, dirs, filecache, maxchanges) in srpm_repos: repodir = hgrepo + "/" + reponame if not dirs or os.path.isdir(repodir): continue if not filecache: filecache = hgfiles + "/" + reponame makeDirs(filecache) r = RpmTree() #if len(dirs) > 1: # dirs = dirs[1:] for d in dirs: r.addDirectory(d) r.sort_unify() r.keepNewest() for pkgname in r.getNames(): for pkg in r.h[pkgname]: pkgdir = repodir + "/" + pkg["name"] makeDirs(pkgdir) os.system("cd %s && rm -rf * .[^.h]* .h[^g]*" % pkgdir) extractRpm(pkg, pkgdir + "/") files = pkg.getFilenames() specfile = files[pkg.getSpecfile(files)] if "sources" in files or "Makefile" in files: raise ValueError, "src.rpm contains sources / Makefile: %s" % pkg.filename sources = [] if filecache: for i in xrange(len(files)): f = files[i] if not S_ISREG(pkg["filemodes"][i]) or not isBinary(f): continue fsrc = pkgdir + "/" + f # XXX should we use sha instead of md5? #md5data = getMD5(fsrc) md5data = pkg["filemd5s"][i] fdir = "%s/%s" % (filecache, md5data[0:2]) fname = "%s/%s.bin" % (fdir, md5data) if not os.path.isfile(fname): makeDirs(fdir) doLnOrCopy(fsrc, fname) os.unlink(fsrc) sources.append("%s %s\n" % (md5data, f)) sources.sort() # we should sort on filename, not on md5sum writeFile(pkgdir + "/sources", sources) writeFile(pkgdir + "/Makefile", ["include ../pyrpm/Makefile.srpm\n", "NAME:=%s\nSPECFILE:=%s\n" % (pkg["name"], specfile)]) os.system("cd %s; hg commit -q -A -m initial-import" % repodir) | d5b95a34fa0e48227e7afbfbbaaecef730519c14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/d5b95a34fa0e48227e7afbfbbaaecef730519c14/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
8478,
1397,
649,
13332,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
26981,
7422,
13,
578,
486,
1140,
18,
803,
18,
291,
1214,
12,
26981,
2354,
4672,
1172,
315,
668,
30,
16643,
364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8478,
1397,
649,
13332,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
26981,
7422,
13,
578,
486,
1140,
18,
803,
18,
291,
1214,
12,
26981,
2354,
4672,
1172,
315,
668,
30,
16643,
364,... |
def _valid_cart_products(self, cart): | def _valid_products(self, item_query): | def _valid_cart_products(self, cart): validslugs = self.validProducts.values_list('slug', flat=True) cartslugs = cart.cartitem_set.values_list('product__slug', flat=True) return ProductPriceLookup.objects.filter( discountable=True, productslug__in=validslugs, productslug__in=cartslugs ).values_list('productslug', flat=True) | 07f54bcfe71c4ba267ddc3dc833320807bee3ea0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/07f54bcfe71c4ba267ddc3dc833320807bee3ea0/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
877,
67,
18736,
12,
2890,
16,
761,
67,
2271,
4672,
923,
2069,
9024,
273,
365,
18,
877,
13344,
18,
2372,
67,
1098,
2668,
6436,
2187,
3569,
33,
5510,
13,
7035,
2069,
9024,
273,
7035... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
877,
67,
18736,
12,
2890,
16,
761,
67,
2271,
4672,
923,
2069,
9024,
273,
365,
18,
877,
13344,
18,
2372,
67,
1098,
2668,
6436,
2187,
3569,
33,
5510,
13,
7035,
2069,
9024,
273,
7035... |
if self.psych: self.fb.show() self._runstats_update(clear=1) self.startfn(self) except: goto_error('Runtime Error') | try: if self.psych: self.fb.show() self._runstats_update(clear=1) self.startfn(self) except: goto_error('Runtime Error') | def _start_helper(self, temp=None): self._savestate() if self.startfn: if not self.running: self._loadmenu.disableall() self._button_bounce.config(state=DISABLED) self._button_slideshow.config(state=DISABLED) if int(self.rig_common.query('testing')): if ask("pype", "testing mode ok?", ("yes", "no")) == 1: return if temp: if self.sub_common.queryv('save_tmp'): fname = './%s.tmp' % self.uname if posixpath.exists(fname): posix.unlink(fname) else: fname = '/dev/null' self.record_selectfile(fname) else: if self.record_selectfile() is None: Logger('run aborted\n') return # If elog is in use, then at the end of each run insert # (or update, since force=1) data on this file in the # sql database. # Do this at the START of the run so it can be seen right # away.. if self.use_elog and not temp: import elogapi (ok, ecode) = elogapi.AddDatafile( self._exper, self.sub_common.queryv('full_subject'), self.uname, self.record_file, self.task_name, force=1) if not ok: warn('Warning (elog)', ecode) #del self._exper if self.tk: self._startbut.config(text='stop') self._startbut_tmp.config(text='stop') self.udpy.stop(command=self._start_helper) self._allowabort = 1 | 9b08cdf72c9ce45942ee8bee205036a9387ae599 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5701/9b08cdf72c9ce45942ee8bee205036a9387ae599/pype.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1937,
67,
4759,
12,
2890,
16,
1906,
33,
7036,
4672,
365,
6315,
87,
842,
395,
340,
1435,
225,
309,
365,
18,
1937,
4293,
30,
309,
486,
365,
18,
8704,
30,
365,
6315,
945,
5414,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1937,
67,
4759,
12,
2890,
16,
1906,
33,
7036,
4672,
365,
6315,
87,
842,
395,
340,
1435,
225,
309,
365,
18,
1937,
4293,
30,
309,
486,
365,
18,
8704,
30,
365,
6315,
945,
5414,
18,... |
canonical_url = "http://www.doughellmann.com/PyMOTW/" + MODULE + "/" | canonical_url = "http://www.doughellmann.com/" + url_base if not canonical_url.endswith('/'): canonical_url += '/' | def gen_blog_post(outdir, input_base, blog_base): """Generate the blog post body. """ outdir = path(outdir) input_file = outdir / input_base blog_file = outdir/ blog_base canonical_url = "http://www.doughellmann.com/PyMOTW/" + MODULE + "/" if input_base != "index.html": canonical_url += input_base home_page_reference = '''<p><a class="reference external" href="http://www.doughellmann.com/PyMOTW/">PyMOTW Home</a></p>''' canonical_reference = '''<p>The <a class="reference external" href="%(canonical_url)s">canonical version</a> of this article</p>''' % locals() # Add links to project pages at the end body = input_file.text().strip() output_body = clean_blog_html(body) + home_page_reference + canonical_reference blog_file.write_text(output_body) return | 275bd0a8aed6801523436ca1a8c22bb8066532d7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1534/275bd0a8aed6801523436ca1a8c22bb8066532d7/pavement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
11439,
67,
2767,
12,
659,
1214,
16,
810,
67,
1969,
16,
10700,
67,
1969,
4672,
3536,
4625,
326,
10700,
1603,
1417,
18,
3536,
15398,
273,
589,
12,
659,
1214,
13,
810,
67,
768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
11439,
67,
2767,
12,
659,
1214,
16,
810,
67,
1969,
16,
10700,
67,
1969,
4672,
3536,
4625,
326,
10700,
1603,
1417,
18,
3536,
15398,
273,
589,
12,
659,
1214,
13,
810,
67,
768,
... |
assert False, \ "Each column represents an edge: -1 goes to 1." | msg += "Each column represents an edge: -1 goes to 1." assert False | def __init__(self, data=None, pos=None, loops=None, format=None, boundary=[], weighted=None, implementation='networkx', sparse=True, vertex_labels=True, **kwds): """ TESTS:: sage: D = DiGraph() sage: loads(dumps(D)) == D True | db76baf167127ccb52ad91ec34a42f359828d3a4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/db76baf167127ccb52ad91ec34a42f359828d3a4/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
501,
33,
7036,
16,
949,
33,
7036,
16,
14075,
33,
7036,
16,
740,
33,
7036,
16,
7679,
22850,
6487,
13747,
33,
7036,
16,
4471,
2218,
5185,
92,
2187,
9387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
501,
33,
7036,
16,
949,
33,
7036,
16,
14075,
33,
7036,
16,
740,
33,
7036,
16,
7679,
22850,
6487,
13747,
33,
7036,
16,
4471,
2218,
5185,
92,
2187,
9387,
... |
except sqlite.Error, e: | except sqlite3.Error, e: | def getDbFile(self, dbtype): | 1bd6adee371af6defb14a869c8d6fece65e51000 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/1bd6adee371af6defb14a869c8d6fece65e51000/sqliterepodb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11188,
812,
12,
2890,
16,
1319,
723,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11188,
812,
12,
2890,
16,
1319,
723,
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... |
configpath = [os.path.expanduser(p) for p in configpath] | def readconfig(self,configpath=None): '''Read bugzillarc file(s) into memory.''' configpath = [os.path.expanduser(p) for p in configpath] import ConfigParser c = ConfigParser.SafeConfigParser() if not configpath: configpath = self.configpath r = c.read(configpath) if not r: return # FIXME save parsed config in a more lightweight form? self.conf = c | 735e18f2d1aa144af541ad972ca419a2b4cef005 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5050/735e18f2d1aa144af541ad972ca419a2b4cef005/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
1425,
12,
2890,
16,
1425,
803,
33,
7036,
4672,
9163,
1994,
7934,
94,
737,
11828,
585,
12,
87,
13,
1368,
3778,
1093,
6309,
1930,
25076,
276,
273,
25076,
18,
9890,
809,
2678,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
1425,
12,
2890,
16,
1425,
803,
33,
7036,
4672,
9163,
1994,
7934,
94,
737,
11828,
585,
12,
87,
13,
1368,
3778,
1093,
6309,
1930,
25076,
276,
273,
25076,
18,
9890,
809,
2678,
1435,
... | |
def __init__(self, debug_fn, allow_none=False, encoding=None): self._dispatcher = _IkiWikiExtPluginXMLRPCDispatcher(allow_none, encoding) | def __init__(self, debug_fn): self._dispatcher = _IkiWikiExtPluginXMLRPCDispatcher() | def __init__(self, debug_fn, allow_none=False, encoding=None): self._dispatcher = _IkiWikiExtPluginXMLRPCDispatcher(allow_none, encoding) self.register_function = self._dispatcher.register_function self._debug_fn = debug_fn | e3624de63c799427fbd95fa5bbef9462f95912c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3905/e3624de63c799427fbd95fa5bbef9462f95912c6/proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1198,
67,
4293,
4672,
365,
6315,
18495,
273,
389,
45,
15299,
25438,
2482,
3773,
4201,
8087,
6681,
1435,
365,
18,
4861,
67,
915,
273,
365,
6315,
18495,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1198,
67,
4293,
4672,
365,
6315,
18495,
273,
389,
45,
15299,
25438,
2482,
3773,
4201,
8087,
6681,
1435,
365,
18,
4861,
67,
915,
273,
365,
6315,
18495,
18,
... |
body = create_error_box(req, title=title, verbose=0, ln=ln), | body = create_error_box(req, title=str(title), verbose=0, ln=ln), | def errorMsg(title, req, c=None, ln=CFG_SITE_LANG): # load the right message language _ = gettext_set_language(ln) if c is None: c = CFG_SITE_NAME_INTL.get(ln, CFG_SITE_NAME) return page(title = _("Error"), body = create_error_box(req, title=title, verbose=0, ln=ln), description="%s - Internal Error" % c, keywords="%s, Internal Error" % c, uid = getUid(req), language=ln, req=req, navmenuid='submit') | 152ef05305276f3f0246cef13a81fe02b2a6602a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/152ef05305276f3f0246cef13a81fe02b2a6602a/websubmit_webinterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16949,
12,
2649,
16,
1111,
16,
276,
33,
7036,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
468,
1262,
326,
2145,
883,
2653,
389,
273,
24972,
67,
542,
67,
4923,
12,
2370,
13,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16949,
12,
2649,
16,
1111,
16,
276,
33,
7036,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
468,
1262,
326,
2145,
883,
2653,
389,
273,
24972,
67,
542,
67,
4923,
12,
2370,
13,
225,
... |
addResourceToPackage(script, classToResourceMap, resId, resvalue) | addResourceToPackages(script, classToResourceMap, resId, resvalue) for combId, combImg in combinedImages.items(): if combImg.used == True: addResourceToPackages(script, classToResourceMap, combId, combImg) | def serialize(filteredResources, resdata): for resId, resval in filteredResources.items(): # build up resdata if isinstance(resval, ImgInfoFmt): resvalue = resval.flatten() else: # handle other resources resvalue = resval resdata[resId] = resvalue addResourceToPackage(script, classToResourceMap, resId, resvalue) # register the resource with the package needing it | 944a27fdae148f35239ab227d4fa63652b5bb099 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/944a27fdae148f35239ab227d4fa63652b5bb099/CodeGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4472,
12,
12071,
3805,
16,
400,
892,
4672,
364,
400,
548,
16,
400,
1125,
316,
5105,
3805,
18,
3319,
13332,
468,
1361,
731,
400,
892,
309,
1549,
12,
455,
1125,
16,
2221,
75,
966,
16090,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4472,
12,
12071,
3805,
16,
400,
892,
4672,
364,
400,
548,
16,
400,
1125,
316,
5105,
3805,
18,
3319,
13332,
468,
1361,
731,
400,
892,
309,
1549,
12,
455,
1125,
16,
2221,
75,
966,
16090,... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 292) else quickfix.StringField.__init__(self, 292, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
576,
9975,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
576,
9975,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
9... |
cmd = ["rsync", "-a", local_file, "root@%s:%s" % (self.name, remote_file)] | cmd = [Host.RSYNC_COMMAND, local_file, "root@%s:%s" % (self.name, remote_file)] | def upload(self, local_file, remote_file, task=None): cmd = ["rsync", "-a", local_file, "root@%s:%s" % (self.name, remote_file)] str = self.name + ": " + local_file + " -> " + remote_file + "\n" self.execute("mkdir -p $(dirname %s)" % remote_file, task) if task: fd = task.output else: fd = sys.stdout fd.write(str) res = self._exec(cmd) fd.write(res) return res | a6b3ac5d5b06ef067a9ca8931ca12d7e299c0fac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3860/a6b3ac5d5b06ef067a9ca8931ca12d7e299c0fac/hosts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
12,
2890,
16,
1191,
67,
768,
16,
2632,
67,
768,
16,
1562,
33,
7036,
4672,
1797,
273,
306,
2594,
18,
54,
25142,
67,
19104,
16,
1191,
67,
768,
16,
315,
3085,
36,
9,
87,
5319,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
12,
2890,
16,
1191,
67,
768,
16,
2632,
67,
768,
16,
1562,
33,
7036,
4672,
1797,
273,
306,
2594,
18,
54,
25142,
67,
19104,
16,
1191,
67,
768,
16,
315,
3085,
36,
9,
87,
5319,
8... |
@type summary: L{ParsedDocstring} | @type summary: L{ParsedDocstring<epydoc.markup.ParsedDocstring>} | def __nonzero__(self): raise ValueError('Sentinel value <%s> can not be used as a boolean' % self.name) | 33121bce6f65cd75f953a9ffe4dbeae5bc5d3f3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/33121bce6f65cd75f953a9ffe4dbeae5bc5d3f3e/apidoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
26449,
972,
12,
2890,
4672,
1002,
2068,
2668,
7828,
12927,
460,
23930,
87,
34,
848,
486,
506,
1399,
487,
279,
1250,
11,
738,
365,
18,
529,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
26449,
972,
12,
2890,
4672,
1002,
2068,
2668,
7828,
12927,
460,
23930,
87,
34,
848,
486,
506,
1399,
487,
279,
1250,
11,
738,
365,
18,
529,
13,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
sage: f(x) = function('f',x) sage: _limit_latex_(f(x), x, a) | sage: f = function('f',x) sage: _limit_latex_(0, f, x, a) | def _limit_latex_(*args): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f(x) = function('f',x) sage: _limit_latex_(f(x), x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' AUTHORS: - Golam Mortuza Hossain (2009-06-15) """ # Read f,x,a from arguments f = args[0] x = args[1] a = args[2] return "\\lim_{%s \\to %s}\\, %s"%(latex(x), latex(a), latex(f)) | acf862616c491eaa6eff0382681451ce96478191 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/acf862616c491eaa6eff0382681451ce96478191/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3595,
67,
26264,
67,
30857,
1968,
4672,
436,
8395,
2000,
25079,
2652,
364,
1800,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
628,
272,
410,
18,
12780,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3595,
67,
26264,
67,
30857,
1968,
4672,
436,
8395,
2000,
25079,
2652,
364,
1800,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
628,
272,
410,
18,
12780,... |
for line in apply(traceback.format_exception, err): for l in string.split(line,"\n")[:-1]: self.stream.writeln("%s" % l) | self.stream.writeln("%s" % err) | def printErrorList(self, flavour, errors): for test, err in errors: self.stream.writeln(self.separator1) self.stream.writeln("%s: %s" % (flavour,self.getDescription(test))) self.stream.writeln(self.separator2) for line in apply(traceback.format_exception, err): for l in string.split(line,"\n")[:-1]: self.stream.writeln("%s" % l) | 6dac8554a532cd089c836298954d1e64f2eea2f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6dac8554a532cd089c836298954d1e64f2eea2f3/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
668,
682,
12,
2890,
16,
31227,
477,
16,
1334,
4672,
364,
1842,
16,
393,
316,
1334,
30,
365,
18,
3256,
18,
5363,
292,
82,
12,
2890,
18,
11287,
21,
13,
365,
18,
3256,
18,
5363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
668,
682,
12,
2890,
16,
31227,
477,
16,
1334,
4672,
364,
1842,
16,
393,
316,
1334,
30,
365,
18,
3256,
18,
5363,
292,
82,
12,
2890,
18,
11287,
21,
13,
365,
18,
3256,
18,
5363,
... |
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE, | p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE, | def getMachineFacts(): global machine machine['hostname'] = os.uname()[1] machine['arch'] = os.uname()[4] cmd = ['/usr/bin/sw_vers', '-productVersion'] p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (output, err) = p.communicate() # format version string like "10.5.8", so that "10.6" becomes "10.6.0" machine['os_vers'] = munkicommon.padVersionString(output.rstrip("\n"),3) | 5350042f4ddfb098468c8d75b15dfa28757b9321 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6241/5350042f4ddfb098468c8d75b15dfa28757b9321/updatecheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
3093,
9766,
87,
13332,
2552,
5228,
225,
5228,
3292,
10358,
3546,
273,
1140,
18,
318,
339,
1435,
63,
21,
65,
5228,
3292,
991,
3546,
273,
1140,
18,
318,
339,
1435,
63,
24,
65,
1797... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
3093,
9766,
87,
13332,
2552,
5228,
225,
5228,
3292,
10358,
3546,
273,
1140,
18,
318,
339,
1435,
63,
21,
65,
5228,
3292,
991,
3546,
273,
1140,
18,
318,
339,
1435,
63,
24,
65,
1797... |
sage: R = MPolynomialRing(QQ,3,'x') | sage: R = PolynomialRing(QQ,3,'x') | def construction(self): """ The construction functor and base ring for self. | 6875d7c71609de038c71080542943969764ed340 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6875d7c71609de038c71080542943969764ed340/free_module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16171,
12,
2890,
4672,
3536,
1021,
16171,
12882,
280,
471,
1026,
9221,
364,
365,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
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,
16171,
12,
2890,
4672,
3536,
1021,
16171,
12882,
280,
471,
1026,
9221,
364,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self._meter.progress("Testing (%d%%): %d ran as expected, %d didn't," " %d left" % (percent_complete, result_summary.expected, | action = "Testing" if self._retries > 0: action = "Retrying" self._meter.progress("%s (%d%%): %d ran as expected, %d didn't," " %d left" % (action, percent_complete, result_summary.expected, | def _display_one_line_progress(self, result_summary): """Displays the progress through the test run.""" percent_complete = 100 * (result_summary.expected + result_summary.unexpected) / result_summary.total self._meter.progress("Testing (%d%%): %d ran as expected, %d didn't," " %d left" % (percent_complete, result_summary.expected, result_summary.unexpected, result_summary.remaining)) | 88ee9d1c9a750a80e9c3ee0a8118e28544518b8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/88ee9d1c9a750a80e9c3ee0a8118e28544518b8a/run_webkit_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5417,
67,
476,
67,
1369,
67,
8298,
12,
2890,
16,
563,
67,
7687,
4672,
3536,
16900,
326,
4007,
3059,
326,
1842,
1086,
12123,
5551,
67,
6226,
273,
2130,
380,
261,
2088,
67,
7687,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5417,
67,
476,
67,
1369,
67,
8298,
12,
2890,
16,
563,
67,
7687,
4672,
3536,
16900,
326,
4007,
3059,
326,
1842,
1086,
12123,
5551,
67,
6226,
273,
2130,
380,
261,
2088,
67,
7687,
18... |
main(ns) | result = ns.func(ns) | def main(args): ret = args.func(args) if args.save: np.save(args.save, ret) | da58ca5898d4480228103f309bcc8ce535c5cf3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11300/da58ca5898d4480228103f309bcc8ce535c5cf3e/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
325,
273,
833,
18,
644,
12,
1968,
13,
309,
833,
18,
5688,
30,
1130,
18,
5688,
12,
1968,
18,
5688,
16,
325,
13,
225,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
325,
273,
833,
18,
644,
12,
1968,
13,
309,
833,
18,
5688,
30,
1130,
18,
5688,
12,
1968,
18,
5688,
16,
325,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
__version__='$Revision: 1.6 $'[11:-2] import base64, POSException, BTree, BaseStorage, time, string, utils | __version__='$Revision: 1.7 $'[11:-2] import base64, time, string from ZODB import POSException, BaseStorage, utils | def info(RESPONSE): RESPONSE['Content-type']= 'text/plain' | 5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
12,
14508,
4672,
20645,
3292,
1350,
17,
723,
3546,
33,
296,
955,
19,
7446,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
12,
14508,
4672,
20645,
3292,
1350,
17,
723,
3546,
33,
296,
955,
19,
7446,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if correct and self.streak >= 10 and self.last_review != datetime.datetime.min: | if correct and self.last_review != datetime.datetime.min: | def schedule_review(self, correct, now=datetime.datetime.now()): if self.streak + correct < 10: return review_interval = self.get_review_interval() if correct and self.streak >= 10 and self.last_review != datetime.datetime.min: time_since_last_review = now - self.last_review if time_since_last_review >= review_interval: review_interval = time_since_last_review * 2 if not correct: review_interval = review_interval // 3 if correct: self.last_review = now else: self.last_review = datetime.datetime.min self.review_interval_secs = review_interval.days * 86400 + review_interval.seconds | 3e220f2624267eec127e53da6b6c1685923ee167 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/3e220f2624267eec127e53da6b6c1685923ee167/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4788,
67,
16041,
12,
2890,
16,
3434,
16,
2037,
33,
6585,
18,
6585,
18,
3338,
1435,
4672,
309,
365,
18,
334,
870,
397,
3434,
411,
1728,
30,
327,
10725,
67,
6624,
273,
365,
18,
588,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4788,
67,
16041,
12,
2890,
16,
3434,
16,
2037,
33,
6585,
18,
6585,
18,
3338,
1435,
4672,
309,
365,
18,
334,
870,
397,
3434,
411,
1728,
30,
327,
10725,
67,
6624,
273,
365,
18,
588,
67... |
self.formatLog() | if getReportFrom == 'testLog': self.formatLog(logFile) else: self.formatLog() | def runTests(self, appConf): if appConf['clearLogs']: self.clearLogs() tf = '%Y-%m-%d_%H-%M-%S' startTime = time.strftime(tf) logFile = appConf['appName'] + "_" + startTime + ".log" | 88596f97416e90a41938e11f7158c44b56dcfe86 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/88596f97416e90a41938e11f7158c44b56dcfe86/qxtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
14650,
12,
2890,
16,
595,
3976,
4672,
225,
309,
595,
3976,
3292,
8507,
7777,
3546,
30,
365,
18,
8507,
7777,
1435,
225,
3253,
273,
1995,
61,
6456,
81,
6456,
72,
10185,
44,
6456,
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,
1086,
14650,
12,
2890,
16,
595,
3976,
4672,
225,
309,
595,
3976,
3292,
8507,
7777,
3546,
30,
365,
18,
8507,
7777,
1435,
225,
3253,
273,
1995,
61,
6456,
81,
6456,
72,
10185,
44,
6456,
4... |
"VALUES ('%s',%d,'%s','%s','%s','%s',UTC_TIMESTAMP(),UTC_TIMESTAMP(),'Submitted','%s')" % \ | "VALUES ('%s',%d,'%s','%s','%s','%s',UTC_TIMESTAMP(),UTC_TIMESTAMP(),'Submitted')" % \ | def addPilotReference(self,pilotRef,jobID,ownerDN,ownerGroup,broker='Unknown', gridType='DIRAC',requirements='Unknown'): """ Add a new pilot job reference """ | bec66fb3af37d9e29744c6fa68f6e4cd56925142 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/bec66fb3af37d9e29744c6fa68f6e4cd56925142/PilotAgentsDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
52,
22797,
2404,
12,
2890,
16,
84,
22797,
1957,
16,
4688,
734,
16,
8443,
8609,
16,
8443,
1114,
16,
21722,
2218,
4874,
2187,
3068,
559,
2218,
4537,
2226,
2187,
16175,
2218,
4874,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
52,
22797,
2404,
12,
2890,
16,
84,
22797,
1957,
16,
4688,
734,
16,
8443,
8609,
16,
8443,
1114,
16,
21722,
2218,
4874,
2187,
3068,
559,
2218,
4537,
2226,
2187,
16175,
2218,
4874,
11,... |
self.count = self.count + 1 if self.count < 3: | if text[0:2] in ['++', '--']: | def writeline(self, text): match = header_re.search(text) if match: self.hdf.setValue('%s.name.old' % self.prefix, match.group(1)) self.hdf.setValue('%s.name.new' % self.prefix, match.group(2)) return self.count = self.count + 1 if self.count < 3: return match = line_re.search(text) if match: self.changeno += 1 pfx = '%s.changes.%d.line' % (self.prefix, self.changeno) self.print_block() self.hdf.setValue('%s.old' % pfx, match.group(1)) self.hdf.setValue('%s.new' % pfx, match.group(3)) return ttype = text[0] text = text[1:] text = space_re.sub(' ', text.expandtabs(8)) if ttype == self.ttype: self.block.append(text) else: if ttype == '+' and self.ttype == '-': self.p_block = self.block self.p_type = self.ttype else: self.print_block() self.block = [text] self.ttype = ttype | 5dca6282e50a01de0d2391edf83de1f9e93f7147 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5dca6282e50a01de0d2391edf83de1f9e93f7147/Changeset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
3027,
12,
2890,
16,
977,
4672,
845,
273,
1446,
67,
266,
18,
3072,
12,
955,
13,
309,
845,
30,
365,
18,
26428,
18,
542,
620,
29909,
87,
18,
529,
18,
1673,
11,
738,
365,
18,
323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
3027,
12,
2890,
16,
977,
4672,
845,
273,
1446,
67,
266,
18,
3072,
12,
955,
13,
309,
845,
30,
365,
18,
26428,
18,
542,
620,
29909,
87,
18,
529,
18,
1673,
11,
738,
365,
18,
323... |
p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) divhelp = p.system.methodHelp('div') self.assertEqual(divhelp, 'This is the div function') | try: p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) divhelp = p.system.methodHelp('div') self.assertEqual(divhelp, 'This is the div function') except xmlrpclib.ProtocolError, e: self.fail("%s\n%s" % (e, e.headers)) | def test_introspection2(self): p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) divhelp = p.system.methodHelp('div') self.assertEqual(divhelp, 'This is the div function') | 095843808f6940bbcdf850b6544a8efc02ed14d6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/095843808f6940bbcdf850b6544a8efc02ed14d6/test_xmlrpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
474,
26362,
22,
12,
2890,
4672,
293,
273,
2025,
13832,
830,
495,
18,
2081,
3886,
2668,
2505,
2207,
13014,
5319,
72,
11,
738,
20987,
13,
3739,
5201,
273,
293,
18,
4299,
18,
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,
1842,
67,
474,
26362,
22,
12,
2890,
4672,
293,
273,
2025,
13832,
830,
495,
18,
2081,
3886,
2668,
2505,
2207,
13014,
5319,
72,
11,
738,
20987,
13,
3739,
5201,
273,
293,
18,
4299,
18,
20... |
return addinfourl(open(url2pathname(file), 'r'), noheaders(), self.openedurl) | return addinfourl(open(url2pathname(file), 'r'), noheaders(), 'file:'+file) | def open_local_file(self, url): host, file = splithost(url) if not host: return addinfourl(open(url2pathname(file), 'r'), noheaders(), self.openedurl) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfourl(open(url2pathname(file), 'r'), noheaders(), self.openedurl) raise IOError, ('local file error', 'not on local host') | f821614d209481982caa874557b68bcf26e1ed41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f821614d209481982caa874557b68bcf26e1ed41/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
3729,
67,
768,
12,
2890,
16,
880,
4672,
1479,
16,
585,
273,
6121,
483,
669,
12,
718,
13,
309,
486,
1479,
30,
327,
527,
10625,
477,
80,
12,
3190,
12,
718,
22,
28336,
12,
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,
1696,
67,
3729,
67,
768,
12,
2890,
16,
880,
4672,
1479,
16,
585,
273,
6121,
483,
669,
12,
718,
13,
309,
486,
1479,
30,
327,
527,
10625,
477,
80,
12,
3190,
12,
718,
22,
28336,
12,
7... |
'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade'), | 'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade', select=True), | def _check_xml(self, cr, uid, ids, context=None): logger = logging.getLogger('init') for view in self.browse(cr, uid, ids, context): eview = etree.fromstring(view.arch.encode('utf8')) frng = tools.file_open(os.path.join('base','rng','view.rng')) relaxng_doc = etree.parse(frng) relaxng = etree.RelaxNG(relaxng_doc) if not relaxng.validate(eview): for error in relaxng.error_log: logger.error(tools.ustr(error)) return False return True | 18f5099415d0e803a40e7e4d33d1363401264754 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/18f5099415d0e803a40e7e4d33d1363401264754/ir_ui_view.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
2902,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
1194,
273,
2907,
18,
588,
3328,
2668,
2738,
6134,
364,
1476,
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,
1893,
67,
2902,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
1194,
273,
2907,
18,
588,
3328,
2668,
2738,
6134,
364,
1476,
316,
365,
18,
25731,
12,
3353,
16,
... |
pass | self.sock = None | def connect(self, host, port=False): if not port: buf = host.split('//')[1] host, port = buf.rsplit(':', 1) hostname = host if host in DNS_CACHE: host = DNS_CACHE[host] self.sock = None if socket.has_ipv6: try: socket.getaddrinfo(host, int(port), socket.AF_INET6) self.sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) except: pass if self.sock is None: self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.settimeout(120) self.sock.connect((host, int(port))) DNS_CACHE[hostname], port = self.sock.getpeername()[:2] try: sock = None if socket.has_ipv6: try: socket.getaddrinfo(host, int(port), socket.AF_INET6) sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) except: pass if sock is None: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(120) sock.connect((host, int(port))) if hasattr(socket, 'ssl'): ssl_sock = socket.ssl(sock) self.ssl = True except: pass if self.ssl: self.ssl_sock = socket.ssl(self.sock) self.host = host self.hostname = hostname self.port = port self.connected = True | fc7b5a761eb121489193cd5d288e20dc300e2c70 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/fc7b5a761eb121489193cd5d288e20dc300e2c70/pysocket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
1479,
16,
1756,
33,
8381,
4672,
309,
486,
1756,
30,
1681,
273,
1479,
18,
4939,
2668,
759,
6134,
63,
21,
65,
1479,
16,
1756,
273,
1681,
18,
86,
4939,
2668,
30,
218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
1479,
16,
1756,
33,
8381,
4672,
309,
486,
1756,
30,
1681,
273,
1479,
18,
4939,
2668,
759,
6134,
63,
21,
65,
1479,
16,
1756,
273,
1681,
18,
86,
4939,
2668,
30,
218... |
users = self.pool.get('res.users') users.write(cr, uid, users.search(cr, uid, [('action_id','=','Setup')], context=context), {'action_id': menu.id}, context=context) users.write(cr, uid, users.search(cr, uid, [('menu_id','=','Setup')], context=context), {'menu_id': menu.id}, context=context) | user = self.pool.get('res.users')\ .browse(cr, uid, uid, context=context) user.write({'action_id': menu.id, 'menu_id': menu.id}) | def set_default_menu(self, cr, uid, menu, context=None): users = self.pool.get('res.users') users.write(cr, uid, users.search(cr, uid, [('action_id','=','Setup')], context=context), {'action_id': menu.id}, context=context) users.write(cr, uid, users.search(cr, uid, [('menu_id','=','Setup')], context=context), {'menu_id': menu.id}, context=context) | bedf69d3f01304c66ca07bda475fe77f5dfbb9bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/bedf69d3f01304c66ca07bda475fe77f5dfbb9bb/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
1886,
67,
5414,
12,
2890,
16,
4422,
16,
4555,
16,
3824,
16,
819,
33,
7036,
4672,
3677,
273,
365,
18,
6011,
18,
588,
2668,
455,
18,
5577,
6134,
3677,
18,
2626,
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,
444,
67,
1886,
67,
5414,
12,
2890,
16,
4422,
16,
4555,
16,
3824,
16,
819,
33,
7036,
4672,
3677,
273,
365,
18,
6011,
18,
588,
2668,
455,
18,
5577,
6134,
3677,
18,
2626,
12,
3353,
16,
... |
def ensureMinimal(minVersion): """ Checks to see if the default version of wxPython is greater-than or equal to `minVersion`. If not then it will try to find an installed version that is >= minVersion. If none are available then a message is displayed that will inform the user and will offer to open their web browser to the wxPython downloads page, and will then exit the application. """ assert type(minVersion) == str | def versions_installed(): """Return list of installed wxPython versions""" | def ensureMinimal(minVersion): """ Checks to see if the default version of wxPython is greater-than or equal to `minVersion`. If not then it will try to find an installed version that is >= minVersion. If none are available then a message is displayed that will inform the user and will offer to open their web browser to the wxPython downloads page, and will then exit the application. """ assert type(minVersion) == str # ensure that wxPython hasn't been imported yet. if sys.modules.has_key('wx') or sys.modules.has_key('wxPython'): raise VersionError("wxversion.ensureMinimal() must be called before wxPython is imported") bestMatch = None minv = _wxPackageInfo(minVersion) defaultPath = _find_default() if defaultPath: defv = _wxPackageInfo(defaultPath, True) if defv >= minv: bestMatch = defv if bestMatch is None: installed = _find_installed() if installed: # The list is in reverse sorted order, so if the first one is # big enough then choose it if installed[0] >= minv: bestMatch = installed[0] if bestMatch is None: import wx, webbrowser versions = "\n".join([" "+ver for ver in getInstalled()]) app = wx.PySimpleApp() result = wx.MessageBox("This application requires a version of wxPython " "greater than or equal to %s, but a matching version " "was not found.\n\n" "You currently have these version(s) installed:\n%s\n\n" "Would you like to download a new version of wxPython?\n" % (minVersion, versions), "wxPython Upgrade Needed", style=wx.YES_NO) if result == wx.YES: webbrowser.open(UPDATE_URL) app.MainLoop() sys.exit() sys.path.insert(0, bestMatch.pathname) _selected = bestMatch | 160d2bc69832a740481b419e980806742a525124 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/160d2bc69832a740481b419e980806742a525124/wxpy-config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5244,
67,
13435,
13332,
3536,
990,
666,
434,
5876,
7075,
15774,
5244,
8395,
225,
468,
3387,
716,
7075,
15774,
13342,
1404,
2118,
9101,
4671,
18,
309,
2589,
18,
6400,
18,
5332,
67,
856,
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,
5244,
67,
13435,
13332,
3536,
990,
666,
434,
5876,
7075,
15774,
5244,
8395,
225,
468,
3387,
716,
7075,
15774,
13342,
1404,
2118,
9101,
4671,
18,
309,
2589,
18,
6400,
18,
5332,
67,
856,
2... |
txt = "" | txt = "==========================\n" txt += "Platform/Software Information:\n" txt += "==========================\n" | def generateSysinfo(self): import platform txt = "" txt += "Platform: %s, %s\n" % (platform.platform(), platform.version()) txt += "Architecture: " + ", ".join(platform.architecture()) + "\n" txt += "Python version:" + "".join(platform.python_version()) + "\n" txt += "Python build: " + ", ".join(platform.python_build()) + "\n" hwinfo = self.getHWInfos() if hwinfo == "": return txt += hwinfo self.writeFile(BUGREPORT_FILENAME, txt) | 3a934dbb68efe55cb1af26802544a92d1b61b968 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/808/3a934dbb68efe55cb1af26802544a92d1b61b968/bugreport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12712,
1376,
12,
2890,
4672,
1930,
4072,
6463,
273,
315,
2429,
1432,
631,
64,
82,
6,
6463,
1011,
315,
8201,
19,
21742,
15353,
5581,
82,
6,
6463,
1011,
315,
2429,
1432,
631,
64,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12712,
1376,
12,
2890,
4672,
1930,
4072,
6463,
273,
315,
2429,
1432,
631,
64,
82,
6,
6463,
1011,
315,
8201,
19,
21742,
15353,
5581,
82,
6,
6463,
1011,
315,
2429,
1432,
631,
64,
8... |
fam == default_family | fam = default_family | def getSite(code = None, fam = None, user=None): if code == None: code = default_code if fam == None: fam == default_family key = '%s:%s'%(fam,code) if not _sites.has_key(key): _sites[key] = Site(code=code, fam=fam, user=user) return _sites[key] | e4f3886467f46c4dfd3c4a918469a888fc25b51b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/e4f3886467f46c4dfd3c4a918469a888fc25b51b/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11021,
12,
710,
273,
599,
16,
26688,
273,
599,
16,
729,
33,
7036,
4672,
309,
981,
422,
599,
30,
981,
273,
805,
67,
710,
309,
26688,
422,
599,
30,
26688,
273,
805,
67,
9309,
498,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11021,
12,
710,
273,
599,
16,
26688,
273,
599,
16,
729,
33,
7036,
4672,
309,
981,
422,
599,
30,
981,
273,
805,
67,
710,
309,
26688,
422,
599,
30,
26688,
273,
805,
67,
9309,
498,
273,... |
print(status) | print('Status: %s' % status) | def handleStatus(self, version, status, message): """ Called when the status header is received """ print(status) | 382ee43230b4edd23aa42a717e9fc5a3d328e8bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7045/382ee43230b4edd23aa42a717e9fc5a3d328e8bc/rtsp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
1482,
12,
2890,
16,
1177,
16,
1267,
16,
883,
4672,
3536,
11782,
1347,
326,
1267,
1446,
353,
5079,
3536,
1172,
12,
2327,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
1482,
12,
2890,
16,
1177,
16,
1267,
16,
883,
4672,
3536,
11782,
1347,
326,
1267,
1446,
353,
5079,
3536,
1172,
12,
2327,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
""" p = [[]] q = [[]] | TESTS:: The empty permutation:: sage: p = Permutation([]) sage: p.robinson_schensted() [[], []] """ p = [] q = [] | def robinson_schensted(self): """ Returns the pair of standard tableau obtained by running the Robinson-Schensted Algorithm on self. EXAMPLES:: sage: p = Permutation([6,2,3,1,7,5,4]) sage: p.robinson_schensted() [[[1, 3, 4], [2, 5], [6, 7]], [[1, 3, 5], [2, 6], [4, 7]]] """ | 8ec921190e25a2890a16d2ac74fe1f8b033eb881 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/8ec921190e25a2890a16d2ac74fe1f8b033eb881/permutation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
721,
4757,
816,
67,
28204,
275,
334,
329,
12,
2890,
4672,
3536,
2860,
326,
3082,
434,
4529,
1014,
8377,
12700,
635,
3549,
326,
19686,
267,
816,
17,
55,
343,
275,
334,
329,
15067,
603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
721,
4757,
816,
67,
28204,
275,
334,
329,
12,
2890,
4672,
3536,
2860,
326,
3082,
434,
4529,
1014,
8377,
12700,
635,
3549,
326,
19686,
267,
816,
17,
55,
343,
275,
334,
329,
15067,
603,
... |
self.old_stp = alpha1 | def _line_search(self, func, myfprime, xk, pk, gfk, old_fval, old_old_fval, maxstep=.2, c1=.23, c2=0.46, xtrapl=1.1, xtrapu=4., stpmax=50, args=()): | 641f60dd96106011e01aa0fa742d73c4ded7f0ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/641f60dd96106011e01aa0fa742d73c4ded7f0ab/linesearch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1369,
67,
3072,
12,
2890,
16,
1326,
16,
3399,
74,
16382,
16,
619,
79,
16,
2365,
16,
13828,
79,
16,
1592,
67,
74,
1125,
16,
1592,
67,
1673,
67,
74,
1125,
16,
943,
4119,
33,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1369,
67,
3072,
12,
2890,
16,
1326,
16,
3399,
74,
16382,
16,
619,
79,
16,
2365,
16,
13828,
79,
16,
1592,
67,
74,
1125,
16,
1592,
67,
1673,
67,
74,
1125,
16,
943,
4119,
33,
18,... | |
res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-lenSize-22, 20), font = 0, flags = RT_HALIGN_LEFT, text = txt)) | res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-lenSize-22, 20), font = 0, flags = RT_HALIGN_LEFT, text = data.txt)) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] | 716bef7c11e21da35924da2accdba9404b4d09e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/716bef7c11e21da35924da2accdba9404b4d09e6/MovieList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
16727,
13120,
27899,
12,
2890,
16,
24658,
822,
74,
16,
1123,
16,
2376,
16,
562,
4672,
1835,
273,
365,
18,
80,
18,
588,
1180,
1225,
7675,
2819,
1435,
22943,
273,
24658,
822,
74,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
16727,
13120,
27899,
12,
2890,
16,
24658,
822,
74,
16,
1123,
16,
2376,
16,
562,
4672,
1835,
273,
365,
18,
80,
18,
588,
1180,
1225,
7675,
2819,
1435,
22943,
273,
24658,
822,
74,
1... |
why = os.strerror(err.errno) | why = _strerror(err) | def ftp_DELE(self, line): """Delete the specified file.""" path = self.fs.translate(line) | 93acc72ebc75fdf3b1931c4e1f9e2f2d830514c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/93acc72ebc75fdf3b1931c4e1f9e2f2d830514c9/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
1639,
900,
12,
2890,
16,
980,
4672,
3536,
2613,
326,
1269,
585,
12123,
589,
273,
365,
18,
2556,
18,
13929,
12,
1369,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
1639,
900,
12,
2890,
16,
980,
4672,
3536,
2613,
326,
1269,
585,
12123,
589,
273,
365,
18,
2556,
18,
13929,
12,
1369,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
try: self.__buf = self.__buf + struct.pack('>d', x) | try: self.__buf.write(struct.pack('>d', x)) | def pack_double(self, x): try: self.__buf = self.__buf + struct.pack('>d', x) except struct.error, msg: raise ConversionError, msg | b621203e075014e295705a6868a6c9ce80446501 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b621203e075014e295705a6868a6c9ce80446501/xdrlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
67,
9056,
12,
2890,
16,
619,
4672,
775,
30,
365,
16186,
4385,
18,
2626,
12,
1697,
18,
2920,
2668,
34,
72,
2187,
619,
3719,
1335,
1958,
18,
1636,
16,
1234,
30,
1002,
16401,
668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2298,
67,
9056,
12,
2890,
16,
619,
4672,
775,
30,
365,
16186,
4385,
18,
2626,
12,
1697,
18,
2920,
2668,
34,
72,
2187,
619,
3719,
1335,
1958,
18,
1636,
16,
1234,
30,
1002,
16401,
668,
... |
widgets.songs.append([song] + [song.get(i, "") for i in HEADERS]) CURRENT_FILTER.pop(0) | widgets.songs.append([song]) | def open_chooser(*args): chooser = gtk.FileChooserDialog( title = "Add Music", action = gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) chooser.set_select_multiple(True) resp = chooser.run() if resp == gtk.RESPONSE_OK: CURRENT_FILTER.insert(0, FILTER_ALL) for song in library.load(chooser.get_filenames()): widgets.songs.append([song] + [song.get(i, "") for i in HEADERS]) CURRENT_FILTER.pop(0) chooser.destroy() widgets.filter.refilter() | 1d196f7d1fa4c2797fb6dc380cc629c36e123459 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/1d196f7d1fa4c2797fb6dc380cc629c36e123459/quodlibet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2599,
13164,
30857,
1968,
4672,
5011,
13164,
273,
22718,
18,
812,
17324,
6353,
12,
2077,
273,
315,
986,
490,
14894,
3113,
1301,
273,
22718,
18,
3776,
67,
22213,
51,
2123,
67,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2599,
13164,
30857,
1968,
4672,
5011,
13164,
273,
22718,
18,
812,
17324,
6353,
12,
2077,
273,
315,
986,
490,
14894,
3113,
1301,
273,
22718,
18,
3776,
67,
22213,
51,
2123,
67,
1... |
+ self.setMessageFlags(md, replyvar, reply=1) | + self.setMessageFlags(md, replyvar, reply=1, routingId=routingId) | def makeReply(self, md, errfn): # TODO special cases for async ctor/dtor replies if md.decl.type.isAsync(): return [ ] | fa5c94e1b5b7b3aa3001aa243f76dffe8917888b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/fa5c94e1b5b7b3aa3001aa243f76dffe8917888b/lower.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
7817,
12,
2890,
16,
3481,
16,
393,
4293,
4672,
468,
2660,
4582,
6088,
364,
4326,
15120,
19,
7510,
280,
22009,
309,
3481,
18,
8840,
18,
723,
18,
291,
2771,
13332,
327,
306,
308,
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,
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,
7817,
12,
2890,
16,
3481,
16,
393,
4293,
4672,
468,
2660,
4582,
6088,
364,
4326,
15120,
19,
7510,
280,
22009,
309,
3481,
18,
8840,
18,
723,
18,
291,
2771,
13332,
327,
306,
308,
2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.