rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if not res:
if res is None:
def parse_comment(self, i): rawdata = self.rawdata if rawdata[i:i+4] <> '<!--': raise RuntimeError, 'unexpected call to handle_comment' res = commentclose.search(rawdata, i+4) if not res: return -1 if doubledash.search(rawdata, i+4, res.start(0)): self.syntax_error("`--' inside comment") if rawdata[res.start(0)-1] == '-': self.syntax_error('comment cannot end in three dashes') if illegal.search(rawdata, i+4, res.start(0)): self.syntax_error('illegal character in comment') self.handle_comment(rawdata[i+4: res.start(0)]) return res.end(0)
6ab07a6994f604145de2212d52c2267c7ebfeb5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6ab07a6994f604145de2212d52c2267c7ebfeb5c/xmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 3469, 12, 2890, 16, 277, 4672, 1831, 892, 273, 365, 18, 1899, 892, 309, 1831, 892, 63, 77, 30, 77, 15, 24, 65, 2813, 2368, 22772, 4278, 1002, 7265, 16, 296, 21248, 745, 358...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 3469, 12, 2890, 16, 277, 4672, 1831, 892, 273, 365, 18, 1899, 892, 309, 1831, 892, 63, 77, 30, 77, 15, 24, 65, 2813, 2368, 22772, 4278, 1002, 7265, 16, 296, 21248, 745, 358...
client=memcache.Client(connargs, False)
client=memcache.Client(servers, False)
def _get_memcache_client(): global _clients servers=C.memcacheCacheBackend if not servers: return None try: return _clients[servers] except KeyError: client=memcache.Client(connargs, False) _clients[servers]=client return client
81b326cf02a910047bcaaa947639d5c96c303c4b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2304/81b326cf02a910047bcaaa947639d5c96c303c4b/aememcache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3917, 2493, 67, 2625, 13332, 2552, 389, 16931, 7084, 33, 39, 18, 3917, 2493, 1649, 7172, 309, 486, 7084, 30, 327, 599, 775, 30, 327, 389, 16931, 63, 14247, 65, 1335, 4999...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3917, 2493, 67, 2625, 13332, 2552, 389, 16931, 7084, 33, 39, 18, 3917, 2493, 1649, 7172, 309, 486, 7084, 30, 327, 599, 775, 30, 327, 389, 16931, 63, 14247, 65, 1335, 4999...
{'amu':'Abbreviation for atomic mass unit.\nApproximately equal to 1.660538782*10^-27 kilograms.', 'assay_ton':'Defined to be milligram*short_ton/ounce_troy.\nEqual to 7/240 of a kilogram.', 'atomic_mass_unit':'Defined to be one twelfth of the mass of an isolated atom of carbon-12 at rest and in its ground state.\nApproximately equal to 1.660538782*10^-27 kilograms.', 'avoirdupois_ounce':'Equivalent to ounce.\nEqual to 1/16 of an avoirdupois pound.\nApproximately equal to 0.02835 kilograms.', 'avoirdupois_pound':'Equivalent to pound.\nEqual to 16 avoirdupois ounces.\nApproximately equal to 0.45359 kilograms.', 'bale':'Equal to 500 pounds.\nApproximately equal to 226.796 kilograms.', 'carat':'Defined to be equal to 200 milligrams.\nCommonly denoted ct.', 'cental':'Equal to 100 pounds.\nApproximately equal to 45.36 kilograms.', 'dalton':'Equivalent to atomic_mass_unit.\nApproximately equal to 1.660538782*10^-27 kilograms.', 'drachma':'Ancient Greek unit of mass.\nEqual to 6 obols.\nApproximately equal to 0.00429234 kilograms.', 'geepound':'Equivalent to slug.\nApproximately equal to 14.5939 kilograms.', 'grain':'Historically based on the average mass of a single seed of a typical cereal.\nDefined in 1958 to be 64.79891 milligrams.', 'gram':'Equal to 0.0001 kilograms.', 'gross_hundredweight':'Equivalent to hundredweight.\nEqual to 112 pounds.\nApproximately equal to 50.802 kilograms.', 'hundredweight':'Defined to be 112 pounds.\nApproximately equal to 50.802 kilograms.', 'kilogram':'SI base unit of mass.\nDefined to be equal to the mass of the International Prototype Kilogram.\nAlmost exactly equal to the amount of mass in one liter of water.', 'libra':'Ancient Roman unit of mass.\nApproximately equal to 0.325971 kilogram.', 'long_ton':'Defined to be 2240 pounds.\nApproximately equal to 1016.05 kilograms.', 'metric_ton':'Defined to be 1000 kilograms.', 'mina':'Ancient Greek unit of mass.\nEqual to 100 drachma.\nApproximately equal to 0.429234 kilograms.', 'net_hundredweight':'Equivalent to cental.\nEqual to 100 pounds.\nApproximately equal to 45.36 kilograms.', 'obol':'Ancient Greek unit of mass.\nEqual to 1/6 of drachma.\nApproximately equal to 0.00071538 kilograms.', 'ounce':'Equal to 1/16 of pound.\nCommonly abbreviated oz.\nApproximately equal to 0.02835 kilograms.', 'ounce_troy':'Equal to 1/12 of pound_troy.\nApproximately equal to 0.031103 kilograms.', 'pennyweight':'Equal to 1/20 of ounce_troy.\nCommonly abbreviated dwt.\nApproximately equal to 0.001555 kilograms.', 'pondus':'Ancient Roman unit of mass.\nApproximately equal to 0.325969 kilograms.', 'pound':'Equal to 16 ounces.\nDefined to be exactly 0.45359237 kilograms.', 'pound_troy':'Equal to 12 ounce_troy.\nApproximately equal to 0.37324 kilograms.', 'quintal':'Equal to 100 kilograms.', 'shekel':'Ancient Hebrew unit of mass.\nApproximately equal to 0.0141 kilograms.', 'short_hundredweight':'Equivalent to cental.\nEqual to 100 pounds.\nApproximately equal to 45.36 kilograms.', 'short_ton':'Equivalent to ton.\nEqual to 2000 pounds.\nApproximately equal to 907.18 kilograms.', 'slug':'Defined to be a mass that is accelerated 1 ft/s^2 when 1 pound_force is exerted on it.\nApproximately equal to 14.5939 kilograms.', 'solar_mass':'Defined to be the mass of the Sun.\nAbout 332,950 times the size of the Earth or 1,048 times the mass of Jupiter.\nApproximately equal to 1.98892*10^30 kilograms.', 'stone':'Defined to be 14 pounds.\nApproximately equal to 6.35 kilograms.', 'talent':'Ancient Greek unit of mass.\nEqual to 6000 drachmae.\nApproximately equal to 25.754 kilograms.', 'ton':'Equal to 2000 pounds.\nApproximately equal to 907.18 kilograms.', 'tonne':'Equivalent to metric_ton.\nDefined to be 1000 kilograms.', 'wey':'Defined to be 252 pounds.\nApproximately equal to 114.305 kilograms.'},
{'amu':'Abbreviation for atomic mass unit.\nApproximately equal to 1.660538782*10^-27 kilograms.', 'assay_ton':'Defined to be milligram*short_ton/ounce_troy.\nEqual to 7/240 of a kilogram.', 'atomic_mass_unit':'Defined to be one twelfth of the mass of an isolated atom of carbon-12 at rest and in its ground state.\nApproximately equal to 1.660538782*10^-27 kilograms.', 'avoirdupois_ounce':'Equivalent to ounce.\nEqual to 1/16 of an avoirdupois pound.\nApproximately equal to 0.02835 kilograms.', 'avoirdupois_pound':'Equivalent to pound.\nEqual to 16 avoirdupois ounces.\nApproximately equal to 0.45359 kilograms.', 'bale':'Equal to 500 pounds.\nApproximately equal to 226.796 kilograms.', 'carat':'Defined to be equal to 200 milligrams.\nCommonly denoted ct.', 'cental':'Equal to 100 pounds.\nApproximately equal to 45.36 kilograms.', 'dalton':'Equivalent to atomic_mass_unit.\nApproximately equal to 1.660538782*10^-27 kilograms.', 'drachma':'Ancient Greek unit of mass.\nEqual to 6 obols.\nApproximately equal to 0.00429234 kilograms.', 'geepound':'Equivalent to slug.\nApproximately equal to 14.5939 kilograms.', 'grain':'Historically based on the average mass of a single seed of a typical cereal.\nDefined in 1958 to be 64.79891 milligrams.', 'gram':'Equal to 0.0001 kilograms.', 'gross_hundredweight':'Equivalent to hundredweight.\nEqual to 112 pounds.\nApproximately equal to 50.802 kilograms.', 'hundredweight':'Defined to be 112 pounds.\nApproximately equal to 50.802 kilograms.', 'kilogram':'SI base unit of mass.\nDefined to be equal to the mass of the International Prototype Kilogram.\nAlmost exactly equal to the amount of mass in one liter of water.', 'libra':'Ancient Roman unit of mass.\nApproximately equal to 0.325971 kilogram.', 'long_ton':'Defined to be 2240 pounds.\nApproximately equal to 1016.05 kilograms.', 'metric_ton':'Defined to be 1000 kilograms.', 'mina':'Ancient Greek unit of mass.\nEqual to 100 drachma.\nApproximately equal to 0.429234 kilograms.', 'net_hundredweight':'Equivalent to cental.\nEqual to 100 pounds.\nApproximately equal to 45.36 kilograms.', 'obol':'Ancient Greek unit of mass.\nEqual to 1/6 of drachma.\nApproximately equal to 0.00071538 kilograms.', 'ounce':'Equal to 1/16 of pound.\nCommonly abbreviated oz.\nApproximately equal to 0.02835 kilograms.', 'ounce_troy':'Equal to 1/12 of pound_troy.\nApproximately equal to 0.031103 kilograms.', 'pennyweight':'Equal to 1/20 of ounce_troy.\nCommonly abbreviated dwt.\nApproximately equal to 0.001555 kilograms.', 'pondus':'Ancient Roman unit of mass.\nApproximately equal to 0.325969 kilograms.', 'pound':'Equal to 16 ounces.\nDefined to be exactly 0.45359237 kilograms.', 'pound_troy':'Equal to 12 ounce_troy.\nApproximately equal to 0.37324 kilograms.', 'quintal':'Equal to 100 kilograms.', 'shekel':'Ancient Hebrew unit of mass.\nApproximately equal to 0.0141 kilograms.', 'short_hundredweight':'Equivalent to cental.\nEqual to 100 pounds.\nApproximately equal to 45.36 kilograms.', 'short_ton':'Equivalent to ton.\nEqual to 2000 pounds.\nApproximately equal to 907.18 kilograms.', 'slug':'Defined to be a mass that is accelerated 1 ft/s^2 when 1 pound_force is exerted on it.\nApproximately equal to 14.5939 kilograms.', 'solar_mass':'Defined to be the mass of the Sun.\nAbout 332,950 times the size of the Earth or 1,048 times the mass of Jupiter.\nApproximately equal to 1.98892*10^30 kilograms.', 'stone':'Defined to be 14 pounds.\nApproximately equal to 6.35 kilograms.', 'talent':'Ancient Greek unit of mass.\nEqual to 6000 drachmae.\nApproximately equal to 25.754 kilograms.', 'ton':'Equal to 2000 pounds.\nApproximately equal to 907.18 kilograms.', 'tonne':'Equivalent to metric_ton.\nDefined to be 1000 kilograms.', 'wey':'Defined to be 252 pounds.\nApproximately equal to 114.305 kilograms.'},
def evalunitdict(): """ Replace all the string values of the unitdict variable by their evaluated forms, and builds some other tables for ease of use. This function is mainly used internally, for efficiency (and flexibility) purposes, making it easier to describe the units. EXAMPLES:: sage: sage.symbolic.units.evalunitdict() """ from sage.misc.all import sage_eval for key, value in unitdict.iteritems(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.iteritems()]) # FEATURE IDEA: create a function that would allow users to add # new entries to the table without having to know anything about # how the table is stored internally. # # Format the table for easier use. # for k, v in unitdict.iteritems(): for a in v: unit_to_type[a] = k for w in unitdict.iterkeys(): for j in unitdict[w].iterkeys(): if type(unitdict[w][j]) == tuple: unitdict[w][j] = unitdict[w][j][0] value_to_unit[w] = dict(zip(unitdict[w].itervalues(), unitdict[w].iterkeys()))
36d2f28c044694ad73a4a70a9d869366d0e39ec4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/36d2f28c044694ad73a4a70a9d869366d0e39ec4/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
self.file.write(line)
self.__write(line)
def read_lines_to_eof(self): """Internal: read lines until EOF.""" while 1: line = self.fp.readline() if not line: self.done = -1 break self.file.write(line)
52b8c29ca7172b4a6821e3e34b293562f3ae9a3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/52b8c29ca7172b4a6821e3e34b293562f3ae9a3f/cgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3548, 67, 869, 67, 9339, 12, 2890, 4672, 3536, 3061, 30, 855, 2362, 3180, 6431, 12123, 1323, 404, 30, 980, 273, 365, 18, 7944, 18, 896, 1369, 1435, 309, 486, 980, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3548, 67, 869, 67, 9339, 12, 2890, 4672, 3536, 3061, 30, 855, 2362, 3180, 6431, 12123, 1323, 404, 30, 980, 273, 365, 18, 7944, 18, 896, 1369, 1435, 309, 486, 980, 30, 365, 1...
f = open(path, "rb")
f = open(file_path, "rb")
def FileHandler(self): """This handler sends the contents of the requested file. Wow, it's like a real webserver!"""
b0dcb9339511b02acbe62c17070415faf1baa7dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/b0dcb9339511b02acbe62c17070415faf1baa7dd/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1387, 1503, 12, 2890, 4672, 3536, 2503, 1838, 9573, 326, 2939, 434, 326, 3764, 585, 18, 225, 678, 543, 16, 518, 1807, 3007, 279, 2863, 732, 2266, 502, 5, 8395, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1387, 1503, 12, 2890, 4672, 3536, 2503, 1838, 9573, 326, 2939, 434, 326, 3764, 585, 18, 225, 678, 543, 16, 518, 1807, 3007, 279, 2863, 732, 2266, 502, 5, 8395, 2, -100, -100, -100, -10...
tmp = "/tmp" for file in os.listdir(tmp): try: if file.startswith("Flash"): filepath = os.path.join(tmp, file)
for filepath in commands.getoutput("pgrep -f flashplayer | xargs -I PID find /proc/PID/fd -lname '/tmp/Flash*'").split("\n"): if filepath != "": try:
def _check_for_Flash(self): try: tmp = "/tmp" ## look for filenames that begin with 'Flash' for file in os.listdir(tmp): try: if file.startswith("Flash"): filepath = os.path.join(tmp, file) duration = utils.getFLVLength(filepath)
a84893f830ac0afc45ec7b6a342c7e128c06e74d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1563/a84893f830ac0afc45ec7b6a342c7e128c06e74d/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1884, 67, 11353, 12, 2890, 4672, 775, 30, 1853, 273, 2206, 5645, 6, 7541, 2324, 364, 9066, 716, 2376, 598, 296, 11353, 11, 364, 585, 316, 1140, 18, 1098, 1214, 12, 5645,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1884, 67, 11353, 12, 2890, 4672, 775, 30, 1853, 273, 2206, 5645, 6, 7541, 2324, 364, 9066, 716, 2376, 598, 296, 11353, 11, 364, 585, 316, 1140, 18, 1098, 1214, 12, 5645,...
gLogger.debug("SRM2Storage.exists: Path exists: %s" % pathSURL)
gLogger.debug( "SRM2Storage.exists: Path exists: %s" % pathSURL )
def exists(self,path): """ Check if the given path exists. """ res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value']
70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1704, 12, 2890, 16, 803, 4672, 3536, 2073, 309, 326, 864, 589, 1704, 18, 3536, 400, 273, 365, 18, 1893, 1379, 1630, 12, 803, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 6903, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1704, 12, 2890, 16, 803, 4672, 3536, 2073, 309, 326, 864, 589, 1704, 18, 3536, 400, 273, 365, 18, 1893, 1379, 1630, 12, 803, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 6903, ...
return mysite.customs.bugtrackers.bugzilla.url2bug_data( 'https://bugzilla.gnome.org/buglist.cgi?columnlist=id&keywords=gnome-love&query_format=advanced&resolution=---')
queries = { 'Easy bugs': 'https://bugzilla.gnome.org/buglist.cgi?columnlist=id&keywords=gnome-love&query_format=advanced&resolution=---', } return self.generate_bug_xml_from_queries(queries)
def get_current_xml_bug_tree(self): # Get all bugs that contain any of the keywords 'gnome-love' # or 'documentation' return mysite.customs.bugtrackers.bugzilla.url2bug_data( 'https://bugzilla.gnome.org/buglist.cgi?columnlist=id&keywords=gnome-love&query_format=advanced&resolution=---') # FIXME: Query with documentation keyword causes XML syntax errors #'https://bugzilla.gnome.org/buglist.cgi?columnlist=id&keywords=gnome-love%2Cdocumentation&query_format=advanced&resolution=---')
e18f8d0790dd7a4976e34fcd84482d92c3f9b23f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/e18f8d0790dd7a4976e34fcd84482d92c3f9b23f/bugzilla_instances.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 67, 2902, 67, 925, 67, 3413, 12, 2890, 4672, 468, 968, 777, 22398, 716, 912, 1281, 434, 326, 7093, 296, 1600, 1742, 17, 383, 537, 11, 468, 578, 296, 26941, 11, 327, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 67, 2902, 67, 925, 67, 3413, 12, 2890, 4672, 468, 968, 777, 22398, 716, 912, 1281, 434, 326, 7093, 296, 1600, 1742, 17, 383, 537, 11, 468, 578, 296, 26941, 11, 327, 31...
'allowable_content_types' : None,
'allowable_content_types' : ('text/plain',),
def getIndexable(self, instance): # XXX Naive implementation that loads all data contents into # memory. To have this not happening set your field to not # 'searchable' (the default) or define your own 'index_method' # property. transforms = getUtility(IPortalTransformsTool) f = self.get(instance) try: datastream = transforms.convertTo( "text/plain", str(f), # 666 mimetype = self.getContentType(instance), filename = self.getFilename(instance, 0), ) except (ConflictError, KeyboardInterrupt): raise except Exception, e: log("Error while trying to convert file contents to 'text/plain' " "in %r.getIndexable() of %r: %s" % (self, instance, e))
7ceff8c470eae33b4a063061230f3f8948cfaf8b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12165/7ceff8c470eae33b4a063061230f3f8948cfaf8b/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8088, 429, 12, 2890, 16, 791, 4672, 468, 11329, 16350, 688, 4471, 716, 6277, 777, 501, 2939, 1368, 468, 3778, 18, 225, 2974, 1240, 333, 486, 5865, 310, 444, 3433, 652, 358, 486, 468, 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, 8088, 429, 12, 2890, 16, 791, 4672, 468, 11329, 16350, 688, 4471, 716, 6277, 777, 501, 2939, 1368, 468, 3778, 18, 225, 2974, 1240, 333, 486, 5865, 310, 444, 3433, 652, 358, 486, 468, 2...
if re.search('TITEL',line):
if line.find('TITEL') != -1:
def atom_types(self): """Method that returns list of atomtypes.""" file=open(self._file_,'r') lines=file.readlines() file.close() atomtypes=[] for line in lines: if re.search('TITEL',line): atomtypes.append(line.split()[3].split('_')[0].split('.')[0]) return atomtypes
0ef92d0036640a01731a11fd224ec8bb5389da74 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/0ef92d0036640a01731a11fd224ec8bb5389da74/vasp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3179, 67, 2352, 12, 2890, 4672, 3536, 1305, 716, 1135, 666, 434, 3179, 2352, 12123, 585, 33, 3190, 12, 2890, 6315, 768, 67, 11189, 86, 6134, 2362, 33, 768, 18, 896, 3548, 1435, 585, 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, 3179, 67, 2352, 12, 2890, 4672, 3536, 1305, 716, 1135, 666, 434, 3179, 2352, 12123, 585, 33, 3190, 12, 2890, 6315, 768, 67, 11189, 86, 6134, 2362, 33, 768, 18, 896, 3548, 1435, 585, 18...
heights=heights).show(**kwds)
heights=heights, edge_style=edge_style).show(**kwds)
def show(self, pos=None, layout=None, vertex_labels=True, edge_labels=False, vertex_size=200, graph_border=False, vertex_colors=None, edge_colors=None, partition=None, scaling_term=0.05, talk=False, iterations=50, loop_size=.1, color_by_label=False, heights=None, **kwds): """ Shows the (di)graph.
b0885df6c3b16c8b472169635cb99aa46c52e043 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b0885df6c3b16c8b472169635cb99aa46c52e043/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 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, 2405, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 5...
t = binascii.b2a_hex(s) u = binascii.a2b_hex(t)
t = binascii.b2a_hex(self.type2test(s)) u = binascii.a2b_hex(self.type2test(t))
def test_hex(self): # test hexlification s = '{s\005\000\000\000worldi\002\000\000\000s\005\000\000\000helloi\001\000\000\0000' t = binascii.b2a_hex(s) u = binascii.a2b_hex(t) self.assertEqual(s, u) self.assertRaises(TypeError, binascii.a2b_hex, t[:-1]) self.assertRaises(TypeError, binascii.a2b_hex, t[:-1] + 'q')
17a549a67eb93f5303f060fc8481745716520cf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/17a549a67eb93f5303f060fc8481745716520cf0/test_binascii.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7118, 12, 2890, 4672, 468, 1842, 3827, 80, 1480, 272, 273, 2292, 87, 64, 28564, 64, 3784, 64, 3784, 64, 3784, 18179, 77, 64, 24908, 64, 3784, 64, 3784, 64, 3784, 87, 64, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7118, 12, 2890, 4672, 468, 1842, 3827, 80, 1480, 272, 273, 2292, 87, 64, 28564, 64, 3784, 64, 3784, 64, 3784, 18179, 77, 64, 24908, 64, 3784, 64, 3784, 64, 3784, 87, 64, 28...
"*/%s_RDS_*/%s/*.html"%(sngl.ifo,sngl.time)): if myFile.upper().__contains__("PEM"): indexDict[sngl.ifo].append(myFile)
"*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile)
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # # Check to see if wiki file with name already exists # maxCount=0 while os.path.exists(wikiFilename) and maxCount < 10: sys.stdout.write("File %s already exists.\n"%\ os.path.split(wikiFilename)[1]) wikiFilename=wikiFilename+".wiki" maxCount=maxCount+1 # #Create the wikipage object etc # wikiPage=wiki(wikiFilename) # # Create top two trigger params tables # cTable=wikiPage.wikiTable(2,8) cTable.data=[ ["Trigger Type", "Rank", "FAR", "SNR", "IFOS(Coinc)", "Instruments(Active)", "Coincidence Time (s)", "Total Mass (mSol)" ], ["%s"%(wikiCoinc.type), "%s"%(wikiCoinc.rank), "%s"%(wikiCoinc.far), "%s"%(wikiCoinc.snr), "%s"%(wikiCoinc.ifos), "%s"%(wikiCoinc.instruments), "%s"%(wikiCoinc.time), "%s"%(wikiCoinc.mass) ] ] pTable=wikiPage.wikiTable(len(wikiCoinc.sngls_in_coinc())+1,6) pTable.data[0]=[ "IFO", "GPS Time(s)", "SNR", "CHISQR", "Mass 1", "Mass 2" ] for row,cSngl in enumerate(wikiCoinc.sngls_in_coinc()): pTable.data[row+1]=[ "%s"%(cSngl.ifo), "%s"%(cSngl.time), "%s"%(cSngl.snr), "%s"%(cSngl.chisqr), "%s"%(cSngl.mass1), "%s"%(cSngl.mass2) ] #Write the tables into the Wiki object wikiPage.putText("Coincident Trigger Event Information: %s\n"\ %(stfu_pipe.gpsTimeToReadableDate(wikiCoinc.time))) wikiPage.insertTable(cTable) wikiPage.putText("Corresponding Coincident Single IFO Trigger Information\n") wikiPage.insertTable(pTable) #Generate a table of contents to appear after candidate params table wikiPage.tableOfContents(3) #Begin including each checklist item as section with subsections wikiPage.section("Follow-up Checklist") #Put each checklist item wikiPage.subsection("Checklist Summary") wikiPage.subsubsection("Does this candidate pass this checklist?") wikiPage.subsubsection("Answer") wikiPage.subsubsection("Relevant Information and Comments") wikiPage.insertHR() # #First real checklist item wikiPage.subsection("#0 False Alarm Probability") wikiPage.subsubsection("Question") wikiPage.putText("What is the false alarm rate associated with this candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") farTable=wikiPage.wikiTable(2,1) farTable.setTableStyle("background-color: yellow; text-align center;") farTable.data[0][0]="False Alarm Rate" farTable.data[1][0]="%s"%(wikiCoinc.far) wikiPage.insertTable(farTable) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#1 Data Quality Flags") wikiPage.subsubsection("Question") wikiPage.putText("Can the data quality flags coincident with this candidate be safely disregarded?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPath=os.path.split(wikiFilename)[0] dqFileList=wikiFileFinder.get_findFlags() if len(dqFileList) != 1: sys.stdout.write("Warning: DQ flags data product import problem.\n") print "Found %i files."%len(dqFileList) for mf in dqFileList: print mf for myFile in dqFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#2 Veto Investigations") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate survive the veto investigations performed at its time?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") vetoFileList=wikiFileFinder.get_findVetos() if len(vetoFileList) != 1: sys.stdout.write("Warning: Veto flags data product import problem.\n") for myFile in vetoFileList:print myFile for myFile in vetoFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#3 IFO Status") wikiPage.subsubsection("Question") wikiPage.putText("Are the interferometers operating normally with a reasonable level of sensitivity around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") #Add link to Daily Stats if wikiCoinc.time > endOfS5: statsLink=wikiPage.makeExternalLink("http://blue.ligo-wa.caltech.edu/scirun/S5/DailyStatistics/",\ "S5 Daily Stats Page") else: statsLink="This should be a link to S6 Daily Stats!\n" wikiPage.putText(statsLink) #Link figures of merit #Get link for all members of wikiCoinc wikiPage.putText("Figures of Merit\n") if wikiCoinc.time > endOfS5: fomLinks=dict() elems=0 for wikiSngl in wikiCoinc.sngls: if not(wikiSngl.ifo.upper().rstrip().lstrip() == 'V1'): fomLinks[wikiSngl.ifo]=stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo) elems=elems+len(fomLinks[wikiSngl.ifo]) else: for myLabel,myLink,myThumb in stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo): wikiPage.putText("%s\n"%(wikiPage.makeExternalLink(myLink,myLabel))) if elems%3 != 0: sys.stdout.write("Generation of FOM links seems incomplete!\n") cols=4 rows=(elems/3)+1 fTable=wikiPage.wikiTable(rows,cols) fTable.data[0]=["IFO,Shift","FOM1","FOM2","FOM3"] currentIndex=0 for myIFOKey in fomLinks.keys(): for label,link,thumb in fomLinks[myIFOKey]: myRow=currentIndex/int(3)+1 myCol=currentIndex%int(3)+1 fTable.data[myRow][0]=label thumbURL=file2URL.convert(thumb) fTable.data[myRow][myCol]="%s"%(wikiPage.linkedRemoteImage(thumb,link)) currentIndex=currentIndex+1 wikiPage.insertTable(fTable) else: wikiPage.putText("Can not automatically fetch S5 FOM links.") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#4 Candidate Appearance") wikiPage.subsubsection("Question") wikiPage.putText("Do the Qscan figures show what we would expect for a gravitational-wave event?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() for sngl in wikiCoinc.sngls: frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'hoft') indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*/%s/*/%s/*index.html"%(frametype,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened.png"\ %(sngl.time,channelName)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened?thumb.png"\ %(sngl.time,channelName)) # #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("GW data channel scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >= 1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >= 1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: Candidate appearance plot import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#5 Seismic Plots") wikiPage.subsubsection("Question") wikiPage.putText("Is the seismic activity insignificant around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() for sngl in wikiCoinc.sngls: indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/index.html"%(sngl.ifo,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEIS?_512.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEIS?_512.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Seismic scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: Seismic plots product import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#6 Other environmental causes") wikiPage.subsubsection("Question") wikiPage.putText("Were the environmental disturbances (other than seismic) insignificant at the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() #Select only PEM channels for sngl in wikiCoinc.sngls: imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*.html"%(sngl.ifo,sngl.time)): if myFile.upper().__contains__("PEM"): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if myFile.upper().__contains__("PEM"): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if myFile.upper().__contains__("PEM"): thumbDict[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("PEM scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(imageDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: PEM plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#7 Auxiliary degree of freedom") wikiPage.subsubsection("Question") wikiPage.putText("Were the auxiliary channel transients coincident with the candidate insignificant?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() #Select only AUX channels for sngl in wikiCoinc.sngls: imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*.html"%(sngl.ifo,sngl.time)): if not myFile.upper().__contains__("PEM"): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if not myFile.upper().__contains__("PEM"): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if not myFile.upper().__contains__("PEM"): thumbDict[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("PEM scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(imageDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: AUX plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#8 Electronic Log Book") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the comments posted by the sci-mons or the operators in the e-log?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiLinkLHOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"H1"), "Hanford eLog") wikiLinkLLOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"L1"), "Livingston eLog") wikiPage.putText("%s\n\n%s\n\n"%(wikiLinkLHOlog,wikiLinkLLOlog)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#9 Glitch Report") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the weekly glitch report?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") if int(wikiCoinc.time) >= endOfS5: wikiLinkGlitch=wikiPage.makeExternalLink( "https://www.lsc-group.phys.uwm.edu/twiki/bin/view/DetChar/GlitchStudies", "Glitch Reports for S6" ) else: wikiLinkGlitch=wikiPage.makeExternalLink( "http://www.lsc-group.phys.uwm.edu/glitch/investigations/s5index.html#shift", "Glitch Reports for S5" ) wikiPage.putText("%s\n"%(wikiLinkGlitch)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#10 Snr versus time") wikiPage.subsubsection("Question") wikiPage.putText("Is this trigger significant in a SNR versus time plot of all triggers in its analysis chunk?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#11 Parameters of the candidate") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate have a high likelihood of being a gravitational-wave according to its parameters?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Effective Distance Ratio Test\n") effDList=wikiFileFinder.get_effDRatio() if len(effDList) != 1: sys.stdout.write("Warning: Effective Distance Test import problem.\n") for myFile in effDList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#12 Snr and Chisq") wikiPage.subsubsection("Question") wikiPage.putText("Are the SNR and CHISQ time series consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") # #Put plots SNR and Chi sqr # indexList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*.html") thumbList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_snr-*thumb.png") thumbList.extend(fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_chisq-*thumb.png")) thumbList.sort() indexList=[file2URL.convert(x) for x in indexList] thumbList=[file2URL.convert(x) for x in thumbList] #Two thumb types possible "_thumb.png" or ".thumb.png" imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] ifoCount=len(wikiCoinc.sngls) rowLabel={"SNR":1,"CHISQ":2} rowCount=len(rowLabel) colCount=ifoCount if len(indexList) >= 1: snrTable=wikiPage.wikiTable(rowCount+1,colCount+1) for i,sngl in enumerate(wikiCoinc.sngls): myIndex="" for indexFile in indexList: if indexFile.__contains__("_pipe_%s_FOLLOWUP_"%sngl.ifo): myIndex=indexFile if myIndex=="": snrTable.data[0][i+1]=" %s "%sngl.ifo else: snrTable.data[0][i+1]=wikiPage.makeExternalLink(myIndex,sngl.ifo) for col,sngl in enumerate(wikiCoinc.sngls): for row,label in enumerate(rowLabel.keys()): snrTable.data[row+1][0]=label for k,image in enumerate(imageList): if (image.__contains__("_%s-"%label.lower()) \ and image.__contains__("pipe_%s_FOLLOWUP"%sngl.ifo)): snrTable.data[row+1][col+1]=" %s "%(thumbList[k]) wikiPage.insertTable(snrTable) else: sys.stdout.write("Warning: SNR and CHISQ plots not found.\n") wikiPage.putText("SNR and CHISQ plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#13 Template bank veto") wikiPage.subsubsection("Question") wikiPage.putText("Is the bank veto value consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#14 Coherent studies") wikiPage.subsubsection("Question") wikiPage.putText("Are the triggers found in multiple interferometers coherent with each other?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") indexList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),"*.html") if len(indexList) > 1: myIndex=file2URL.convert(indexList[0]) wikiPage.putText(wikiPage.makeExternalLink(myIndex,\ "%s Coherence Study Results"%(wikiCoinc.ifos))) thumbList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),\ "PLOT_CHIA_%s_snr-squared*thumb.png"%(wikiCoinc.time)) imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] rowCount=len(imageList) colCount=1 cohSnrTimeTable=wikiPage.wikiTable(rowCount+1,colCount) cohSnrTimeTable.data[0][0]="%s Coherent SNR Squared Times Series"%(wikiCoinc.ifos) for i,image in enumerate(imageList): cohSnrTimeTable.data[i+1][0]=wikiPage.linkedRemoteImaage(image,thumbList[i]) wikiPage.insertTable(cohSnrTimeTable) else: sys.stdout.write("Warning: Coherent plotting jobs not found.\n") wikiPage.putText("Coherent Studies plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#15 Segmentation Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in segmentation?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#16 Calibration Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in calibration that are consistent with systematic uncertainties?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #
b70b4fcde32aaece5660335ff3ea1009958cd810 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/b70b4fcde32aaece5660335ff3ea1009958cd810/makeCheckListWiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1564, 1098, 12, 13044, 5359, 33, 7036, 16, 13044, 27055, 71, 33, 7036, 16, 13044, 2471, 33, 7036, 16, 768, 22, 1785, 33, 7036, 4672, 3536, 2985, 358, 2911, 279, 866, 1098, 1625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1564, 1098, 12, 13044, 5359, 33, 7036, 16, 13044, 27055, 71, 33, 7036, 16, 13044, 2471, 33, 7036, 16, 768, 22, 1785, 33, 7036, 4672, 3536, 2985, 358, 2911, 279, 866, 1098, 1625, ...
err = self.add_location(rec['name'], rec['description'], rec['address'], rec.get('URL', ''), approved, parent_folder, geo_type, rec.get('latitude', ''), rec.get('longitude', ''))
err = self.add_location(self.utToUnicode(rec['name']), self.utToUnicode(rec['description']), rec['address'], rec.get('URL', ''), approved, parent_folder, geo_type, rec.get('latitude', ''), rec.get('longitude', ''))
def uploadLocations(self, file='', dialect='comma', encoding='utf-8', approved=0, parent_folder='', geo_type='', REQUEST=None): """ """
45cf5014bd0f0a617aa397f4d3554e87c3a97b62 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/45cf5014bd0f0a617aa397f4d3554e87c3a97b62/GeoMapTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 10985, 12, 2890, 16, 585, 2218, 2187, 10864, 2218, 25034, 2187, 2688, 2218, 3158, 17, 28, 2187, 20412, 33, 20, 16, 982, 67, 5609, 2218, 2187, 7856, 67, 723, 2218, 2187, 12492, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3617, 10985, 12, 2890, 16, 585, 2218, 2187, 10864, 2218, 25034, 2187, 2688, 2218, 3158, 17, 28, 2187, 20412, 33, 20, 16, 982, 67, 5609, 2218, 2187, 7856, 67, 723, 2218, 2187, 12492, 33, ...
createRsp = testmsg("0200002307") createRspObj = parser.parse(createRsp) assert(createRspObj.opcode == MCAP_MD_CREATE_MDL_RSP) assert(createRspObj.mdlid == 0x0023) assert(createRspObj.rspcode == MCAP_RSP_SUCCESS) assert(createRspObj.config == 0x07)
msg = testmsg("0200002307") msgObj = parser.parse(msg) assert(msgObj.opcode == MCAP_MD_CREATE_MDL_RSP) assert(msgObj.mdlid == 0x0023) assert(msgObj.rspcode == MCAP_RSP_SUCCESS) assert(msgObj.config == 0x07) assert(msgObj.encode() == msg)
def test(): createReq = CreateMDLRequest(0x01, 0x01, 0x0001) assert(createReq.mdlid == 0x01) assert(createReq.mdepid == 0x01) assert(createReq.opcode == MCAP_MD_CREATE_MDL_REQ) reconnectReq = ReconnectMDLRequest(0x01) assert(reconnectReq.mdlid == 0x01) assert(reconnectReq.opcode == MCAP_MD_RECONNECT_MDL_REQ) deleteReq = DeleteMDLRequest(0x02) assert(deleteReq.mdlid == 0x02) assert(deleteReq.opcode == MCAP_MD_DELETE_MDL_REQ) abortReq = AbortMDLRequest(0x03) assert(abortReq.mdlid == 0x03) assert(abortReq.opcode == MCAP_MD_ABORT_MDL_REQ) # TEST PARSER parser = MessageParser() # test CreateReq message parsing createReq = testmsg("0100230ABC") createReqObj = parser.parse(createReq) assert(createReqObj.opcode == MCAP_MD_CREATE_MDL_REQ) assert(createReqObj.mdlid == 0x0023) assert(createReqObj.mdepid == 0x0A) assert(createReqObj.conf == 0xBC) # test ReconnectReq message parsing reconnectReq = testmsg("0300AB") reconnectReqObj = parser.parse(reconnectReq) assert(reconnectReqObj.opcode == MCAP_MD_RECONNECT_MDL_REQ) assert(reconnectReqObj.mdlid == 0x00AB) # test AbortReq message parsing abortReq = testmsg("0500AB") abortReqObj = parser.parse(abortReq) assert(abortReqObj.opcode == MCAP_MD_ABORT_MDL_REQ) assert(abortReqObj.mdlid == 0x00AB) # test DeleteReq message parsing deleteReq = testmsg("0700CC") deleteReqObj = parser.parse(deleteReq) assert(deleteReqObj.opcode == MCAP_MD_DELETE_MDL_REQ) assert(deleteReqObj.mdlid == 0x00CC) # test CreateRsp message parsing createRsp = testmsg("0200002307") createRspObj = parser.parse(createRsp) assert(createRspObj.opcode == MCAP_MD_CREATE_MDL_RSP) assert(createRspObj.mdlid == 0x0023) assert(createRspObj.rspcode == MCAP_RSP_SUCCESS) assert(createRspObj.config == 0x07) # test ReconnectRsp message parsing reconnectRsp = testmsg("040200AB") reconnectRspObj = parser.parse(reconnectRsp) assert(reconnectRspObj.opcode == MCAP_MD_RECONNECT_MDL_RSP) assert(reconnectRspObj.mdlid == 0x00AB) assert(reconnectRspObj.rspcode == MCAP_RSP_INVALID_PARAMETER_VALUE) # test AbortRsp message parsing abortRsp = testmsg("0605FFFF") abortRspObj = parser.parse(abortRsp) assert(abortRspObj.opcode == MCAP_MD_ABORT_MDL_RSP) assert(abortRspObj.mdlid == 0xFFFF) assert(abortRspObj.rspcode == MCAP_RSP_INVALID_MDL) # test DeleteRsp message parsing deleteRsp = testmsg("080000CC") deleteRspObj = parser.parse(deleteRsp) assert(deleteRspObj.opcode == MCAP_MD_DELETE_MDL_RSP) assert(deleteRspObj.mdlid == 0x00CC) assert(deleteRspObj.rspcode == MCAP_RSP_SUCCESS) exc = None try: parser.parse(testmsg("8B003344")) except Exception, e: exc = e assert(isinstance(exc, InvalidMessage)) exc = None try: parser.parse(testmsg("01")) except Exception, e: exc = e assert(isinstance(exc, InvalidMessage)) exc = None try: parser.parse("") except Exception, e: exc = e assert(isinstance(exc, InvalidMessage)) print "TESTS OK"
5ab73709fd24f71f38fc2ed06c5d1fbb3996f217 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8028/5ab73709fd24f71f38fc2ed06c5d1fbb3996f217/mcap_defs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 752, 6113, 273, 1788, 6188, 48, 691, 12, 20, 92, 1611, 16, 374, 92, 1611, 16, 374, 92, 13304, 13, 1815, 12, 2640, 6113, 18, 1264, 80, 350, 422, 374, 92, 1611, 13, 1815, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 752, 6113, 273, 1788, 6188, 48, 691, 12, 20, 92, 1611, 16, 374, 92, 1611, 16, 374, 92, 13304, 13, 1815, 12, 2640, 6113, 18, 1264, 80, 350, 422, 374, 92, 1611, 13, 1815, ...
schema_raw_data['title'] = schema_raw_data['title'].replace(self.id, id)
schema_raw_data['title'] = schema_raw_data.get('title', '').replace(self.id, id)
def process_add(self, REQUEST, **kwargs): """ """ schema_raw_data = dict(REQUEST.form) _lang = schema_raw_data.pop('_lang', schema_raw_data.pop('lang', None)) _releasedate = self.process_releasedate(schema_raw_data.pop('releasedate', ''), self.releasedate)
39eb78c54193ed903a72ca1074605b1e609fc7c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/39eb78c54193ed903a72ca1074605b1e609fc7c2/document_item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1289, 12, 2890, 16, 12492, 16, 2826, 4333, 4672, 3536, 3536, 1963, 67, 1899, 67, 892, 273, 2065, 12, 5519, 18, 687, 13, 389, 4936, 273, 1963, 67, 1899, 67, 892, 18, 5120, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1289, 12, 2890, 16, 12492, 16, 2826, 4333, 4672, 3536, 3536, 1963, 67, 1899, 67, 892, 273, 2065, 12, 5519, 18, 687, 13, 389, 4936, 273, 1963, 67, 1899, 67, 892, 18, 5120, 2...
systemConfig = 'ANY'
systemConfig = gConfig.getValue( '/LocalSite/Architecture', '' ) self.log.info('Setting system config to /LocalSite/Architecture = %s' %systemConfig)
def execute( self ): """The JobAgent execution method. """ jobManager = RPCClient( 'WorkloadManagement/JobManager' ) if self.jobCount: #Only call timeLeft utility after a job has been picked up self.log.info( 'Attempting to check CPU time left for filling mode' ) if self.fillingMode: if self.timeLeftError: self.log.warn( self.timeLeftError ) return self.__finish( self.timeLeftError ) self.log.info( '%s normalized CPU units remaining in slot' % ( self.timeLeft ) ) # Need to update the Configuration so that the new value is published in the next matching request result = self.computingElement.setCPUTimeLeft( cpuTimeLeft = self.timeLeft ) if not result['OK']: return self.__finish( result['Message'] ) ceJDL = self.computingElement.getJDL() resourceJDL = ceJDL['Value'] else: return self.__finish( 'Filling Mode is Disabled' )
8c300231f5f8b4aab3545a0da525098d46f45b0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8c300231f5f8b4aab3545a0da525098d46f45b0e/JobAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 365, 262, 30, 3536, 1986, 3956, 3630, 4588, 707, 18, 3536, 1719, 1318, 273, 8295, 1227, 12, 296, 2421, 945, 10998, 19, 2278, 1318, 11, 262, 309, 365, 18, 4688, 1380, 30, 468,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 365, 262, 30, 3536, 1986, 3956, 3630, 4588, 707, 18, 3536, 1719, 1318, 273, 8295, 1227, 12, 296, 2421, 945, 10998, 19, 2278, 1318, 11, 262, 309, 365, 18, 4688, 1380, 30, 468,...
pageTxt = pageTxt.replace(ltxt, newTitle) pageTxt = pageTxt.replace(ltxt[0].lower() + ltxt[1:], newTitle[0].lower() + newTitle[1:]) pageTxt = pageTxt.replace(ltxt.replace(u' ', '_'), newTitle)
frmParts = self.wordBreaker.split(ltxt) toParts = self.wordBreaker.split(newTitle) if len(frmParts) != len(toParts): raise u'Splitting parts do not match counts' for i in range(0, len(frmParts)): if len(frmParts[i]) != len(toParts[i]): raise u'Splitting parts do not match word length' if len(frmParts[i]) > 0: pageTxt = pageTxt.replace(frmParts[i], toParts[i]) pageTxt = pageTxt.replace(frmParts[i][0].lower() + frmParts[i][1:], toParts[i][0].lower() + toParts[i][1:])
def Run(self): try: count = 0 for namespace in self.namespaces: self.params['apnamespace'] = namespace self.apfrom = self.apfrom title = None while True: # Get data self.params['apfrom'] = self.apfrom data = query.GetData(self.site.lang, self.params, self.verbose) try: self.apfrom = data['query']['allpages']['next'] except: self.apfrom = None # Process received data if 'pages' in data: for pageID, page in data['pages'].iteritems(): printed = False title = page['title'] if self.titles: err = self.ProcessTitle(title) if err: changed = False if self.replace and namespace != 14: newTitle = self.PickTarget(False, title, err[1]) if newTitle: src = wikipedia.Page(self.site, title) src.move( newTitle, u'mixed case rename') changed = True if not changed: self.WikiLog(u"* " + err[0]) printed = True if self.links: if 'links' in page: pageObj = None pageTxt = None msg = [] for l in page['links']: ltxt = l['*'] err = self.ProcessTitle(ltxt) if err: newTitle = None if self.replace: newTitle = self.PickTarget(True, ltxt, err[1]) if newTitle: if pageObj is None: pageObj = wikipedia.Page(self.site, title) pageTxt = pageObj.get() msg.append(u'[[%s]] => [[%s]]' % (ltxt, newTitle)) pageTxt = pageTxt.replace(ltxt, newTitle) pageTxt = pageTxt.replace(ltxt[0].lower() + ltxt[1:], newTitle[0].lower() + newTitle[1:]) pageTxt = pageTxt.replace(ltxt.replace(u' ', '_'), newTitle) if not newTitle: if not printed: self.WikiLog(u"* [[:%s]]: link to %s" % (title, err[0])) printed = True else: self.WikiLog(u"** link to %s" % err[0]) if pageObj is not None: if pageObj.get() == pageTxt: self.WikiLog(u"* Error: Text replacement failed in [[:%s]] (%s)" % (title, u', '.join(msg))) else: wikipedia.output(u'Case Replacements: %s' % u', '.join(msg)) try: pageObj.put(pageTxt, u'Case Replacements: %s' % u', '.join(msg)) except: self.WikiLog(u"* Error: Could not save updated page [[:%s]] (%s)" % (title, u', '.join(msg))) count += 1 if self.stopAfter > 0 and count == self.stopAfter: raise "Stopping because we are done" if self.apfrom is None: break
d7ae8d783a650481e56e5f8027b09cf5b7a199dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/d7ae8d783a650481e56e5f8027b09cf5b7a199dc/casechecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 12, 2890, 4672, 775, 30, 1056, 273, 374, 364, 1981, 316, 365, 18, 16078, 30, 365, 18, 2010, 3292, 438, 4937, 3546, 273, 1981, 365, 18, 438, 2080, 273, 365, 18, 438, 2080, 2077, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 12, 2890, 4672, 775, 30, 1056, 273, 374, 364, 1981, 316, 365, 18, 16078, 30, 365, 18, 2010, 3292, 438, 4937, 3546, 273, 1981, 365, 18, 438, 2080, 273, 365, 18, 438, 2080, 2077, ...
recent_log = time.strftime('%Y-%m-%d %H%M%S.log')
recent_log = time.strftime('%Y-%m-%d.%H%M%S.log')
def log_file(network, name, new=False): network_dir = os.path.join(LOG_DIR, network.name) if not os.access(network_dir, os.F_OK): os.mkdir(network_dir) name_dir = os.path.join(LOG_DIR, network.name, name) if not os.access(name_dir, os.F_OK): os.mkdir(name_dir) if new: recent_log = time.strftime('%Y-%m-%d.%H%M%S.log') else: try: recent_log = sorted(os.listdir(name_dir))[-1] except IndexError: recent_log = time.strftime('%Y-%m-%d %H%M%S.log') return LogFile(os.path.join(name_dir, recent_log), 'a')
4acd3bc2cb4633d1b9d7992b523ded54c3db1471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/4acd3bc2cb4633d1b9d7992b523ded54c3db1471/ulogging.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 768, 12, 5185, 16, 508, 16, 394, 33, 8381, 4672, 2483, 67, 1214, 273, 1140, 18, 803, 18, 5701, 12, 4842, 67, 4537, 16, 2483, 18, 529, 13, 309, 486, 1140, 18, 3860, 12, 518...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 768, 12, 5185, 16, 508, 16, 394, 33, 8381, 4672, 2483, 67, 1214, 273, 1140, 18, 803, 18, 5701, 12, 4842, 67, 4537, 16, 2483, 18, 529, 13, 309, 486, 1140, 18, 3860, 12, 518...
return space.call(space.getattr(self.w_dir, w('read')), space.newlist([w(filename)]))
return space.call_function(space.getattr(self.w_dir, w('read')), w(filename))
def get_data(self, space, filename): if ZIPSEP != os.path.sep: filename = filename.replace(os.path.sep, ZIPSEP) w = space.wrap try: return space.call(space.getattr(self.w_dir, w('read')), space.newlist([w(filename)])) except OperationError, e: raise OperationError(space.w_IOError, e.w_value)
3d02697f6774715af3319534d9fc6e5efda61441 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/3d02697f6774715af3319534d9fc6e5efda61441/interp_zipimport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 892, 12, 2890, 16, 3476, 16, 1544, 4672, 309, 18277, 28610, 480, 1140, 18, 803, 18, 10814, 30, 1544, 273, 1544, 18, 2079, 12, 538, 18, 803, 18, 10814, 16, 18277, 28610, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 892, 12, 2890, 16, 3476, 16, 1544, 4672, 309, 18277, 28610, 480, 1140, 18, 803, 18, 10814, 30, 1544, 273, 1544, 18, 2079, 12, 538, 18, 803, 18, 10814, 16, 18277, 28610, 13, ...
print "db lib: using", db_ver, dblib if db_setup_debug: print "db: lib dir", dblib_dir, "inc dir", db_incdir
if db_setup_debug: print "db lib: using", db_ver, dblib print "db: lib dir", dblib_dir, "inc dir", db_incdir
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
87949ecca00b63f3383a2037a83e9f865ca5b733 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/87949ecca00b63f3383a2037a83e9f865ca5b733/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, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 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, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
def _debug(self, args): if tsumufs.debugMode: s = "fusefile <%s>: %s" % (self._path, args) if len(s) > 252: s = s[:252] + "..." syslog.syslog(s)
def _flags2mode(self, flags): """ Borrowed directly from fuse-python's xmp.py script. Credits go to Jeff Epler and Csaba Henk.
7d79afc546399aefea407102ceb76fb893da65b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5149/7d79afc546399aefea407102ceb76fb893da65b3/fusefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7133, 22, 3188, 12, 2890, 16, 2943, 4672, 3536, 605, 15318, 329, 5122, 628, 19552, 17, 8103, 1807, 619, 1291, 18, 2074, 2728, 18, 385, 1118, 1282, 1960, 358, 804, 17098, 512, 20728,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 7133, 22, 3188, 12, 2890, 16, 2943, 4672, 3536, 605, 15318, 329, 5122, 628, 19552, 17, 8103, 1807, 619, 1291, 18, 2074, 2728, 18, 385, 1118, 1282, 1960, 358, 804, 17098, 512, 20728,...
def GetConfigInfo(self): info = {}
def GetConfigInfo(self, category, subcat=None):
def GetConfigInfo(self): info = {} for gui in self._gui: if hasattr(gui, 'GetConfigCategory') and \ hasattr(gui, 'GetConfigInfo'): key = gui.GetConfigCategory()[0] value = gui.GetConfigInfo(self) info[key] = value return info
aec38fef609e79c2b930b06a178523c1ab1dc04c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/aec38fef609e79c2b930b06a178523c1ab1dc04c/MailList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26666, 966, 12, 2890, 16, 3150, 16, 720, 2574, 33, 7036, 4672, 364, 13238, 316, 365, 6315, 20292, 30, 309, 3859, 12, 20292, 16, 296, 967, 809, 4457, 6134, 471, 521, 3859, 12, 20292, 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, 26666, 966, 12, 2890, 16, 3150, 16, 720, 2574, 33, 7036, 4672, 364, 13238, 316, 365, 6315, 20292, 30, 309, 3859, 12, 20292, 16, 296, 967, 809, 4457, 6134, 471, 521, 3859, 12, 20292, 16...
System.setOut(PrintStream(self._capt_java_out)) System.setErr(PrintStream(self._capt_java_err))
System.setOut(PrintStream(self._capt_java_out, False, 'UTF-8')) System.setErr(PrintStream(self._capt_java_err, False, 'UTF-8'))
def _capture_output(self): sys.stdout = _PythonOutput() sys.stderr = _PythonOutput() if os.name == 'java': self._orig_java_out = System.out self._orig_java_err = System.err self._capt_java_out = _JavaOutput() self._capt_java_err = _JavaOutput() System.setOut(PrintStream(self._capt_java_out)) System.setErr(PrintStream(self._capt_java_err))
1a7e8ea75a1e3b813397c230d0db68d30370f008 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6988/1a7e8ea75a1e3b813397c230d0db68d30370f008/outputcapture.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19250, 67, 2844, 12, 2890, 4672, 2589, 18, 10283, 273, 389, 15774, 1447, 1435, 2589, 18, 11241, 273, 389, 15774, 1447, 1435, 309, 1140, 18, 529, 422, 296, 6290, 4278, 365, 6315, 494...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19250, 67, 2844, 12, 2890, 4672, 2589, 18, 10283, 273, 389, 15774, 1447, 1435, 2589, 18, 11241, 273, 389, 15774, 1447, 1435, 309, 1140, 18, 529, 422, 296, 6290, 4278, 365, 6315, 494...
def pageText(url): try: request = urllib2.Request(url) user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7' request.add_header("User-Agent", user_agent) response = urllib2.urlopen(request) text = response.read() response.close() except urllib2.HTTPError: wikipedia.output(u"Server error. Pausing for 10 seconds before continuing. " + time.strftime("%d %b %Y %H:%M:%S (UTC)", time.gmtime())) time.sleep(10) request = urllib2.Request(url) user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7' request.add_header("User-Agent", user_agent) response = urllib2.urlopen(request) text = response.read() response.close() return text
def badword_function(raw): list_loaded = list() pos = 0 load_2 = True # I search with a regex how many user have not the talk page # and i put them in a list (i find it more easy and secure) while load_2 == True: regl = "(\"|\')(.*?)(\"|\')(, |\))" pl = re.compile(regl, re.UNICODE) xl = pl.search(raw, pos) if xl == None: if len(list_loaded) >= 1: wikipedia.output(u"\nBad words loaded.") load_2 = False return list_loaded elif len(done) == 0: wikipedia.output(u"There was no input on the page with bad words.") load_2 = False continue pos = xl.end() badword = xl.group(2) if badword not in list_loaded: list_loaded.append(badword)
e84f02593b3eb100ad10b8fa43c2d6d5085e2faa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/e84f02593b3eb100ad10b8fa43c2d6d5085e2faa/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5570, 1095, 67, 915, 12, 1899, 4672, 666, 67, 4230, 273, 666, 1435, 949, 273, 374, 1262, 67, 22, 273, 1053, 468, 467, 1623, 598, 279, 3936, 3661, 4906, 729, 1240, 486, 326, 26591, 1363...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5570, 1095, 67, 915, 12, 1899, 4672, 666, 67, 4230, 273, 666, 1435, 949, 273, 374, 1262, 67, 22, 273, 1053, 468, 467, 1623, 598, 279, 3936, 3661, 4906, 729, 1240, 486, 326, 26591, 1363...
self.assertEqual([deque([self.deps_c['0002_c']]), deque([self.deps_c['0003_c']]), deque([self.deps_c['0004_c']]), deque([self.deps_c['0005_c']]), deque([])],
self.assertEqual([set([self.deps_c['0002_c']]), set([self.deps_c['0003_c']]), set([self.deps_c['0004_c']]), set([self.deps_c['0005_c']]), set([])],
def test_dependents(self): self.assertEqual([deque([self.deps_a['0002_a']]), deque([self.deps_c['0005_c'], self.deps_b['0002_b'], self.deps_a['0003_a']]), deque([self.deps_b['0003_b'], self.deps_a['0004_a']]), deque([self.deps_a['0005_a']]), deque([])], [m.dependents for m in self.deps_a]) self.assertEqual([deque([self.deps_b['0002_b']]), deque([self.deps_b['0003_b']]), deque([self.deps_b['0004_b'], self.deps_a['0004_a']]), deque([self.deps_b['0005_b']]), deque([])], [m.dependents for m in self.deps_b]) self.assertEqual([deque([self.deps_c['0002_c']]), deque([self.deps_c['0003_c']]), deque([self.deps_c['0004_c']]), deque([self.deps_c['0005_c']]), deque([])], [m.dependents for m in self.deps_c])
0c0f340bc8be175e12f8ac3631b51f8ab31c3f45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/0c0f340bc8be175e12f8ac3631b51f8ab31c3f45/logic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5817, 4877, 12, 2890, 4672, 365, 18, 11231, 5812, 3816, 323, 1857, 3816, 2890, 18, 14877, 67, 69, 3292, 17954, 67, 69, 3546, 65, 3631, 21147, 3816, 2890, 18, 14877, 67, 71, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5817, 4877, 12, 2890, 4672, 365, 18, 11231, 5812, 3816, 323, 1857, 3816, 2890, 18, 14877, 67, 69, 3292, 17954, 67, 69, 3546, 65, 3631, 21147, 3816, 2890, 18, 14877, 67, 71, 3...
if window[-1]=='A':
if window.endswith('A'):
def lcc_mult(seq,wsize,start,end): """Return a list called lccsal, the LCC, a complexity measure
3d45bf521c4adc9e7c82272c7e26271842ba064f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/3d45bf521c4adc9e7c82272c7e26271842ba064f/lcc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 952, 67, 5421, 12, 5436, 16, 91, 1467, 16, 1937, 16, 409, 4672, 3536, 990, 279, 666, 2566, 328, 952, 21982, 16, 326, 511, 6743, 16, 279, 21610, 6649, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 952, 67, 5421, 12, 5436, 16, 91, 1467, 16, 1937, 16, 409, 4672, 3536, 990, 279, 666, 2566, 328, 952, 21982, 16, 326, 511, 6743, 16, 279, 21610, 6649, 2, -100, -100, -100, -100, ...
r = self.execute_operation(rop.OOIS, [u1_box, u1_box], 'int') assert r.value == 1 r = self.execute_operation(rop.OOISNOT, [u2_box, u2_box], 'int')
r = self.execute_operation(rop.OOIS, [u1_box, u1_box.clonebox()], 'int') assert r.value == 1 r = self.execute_operation(rop.OOISNOT, [u2_box, u2_box.clonebox()], 'int')
def test_ooops(self): u1_box, U_box = self.alloc_instance(self.U) u2_box, U_box = self.alloc_instance(self.U) r = self.execute_operation(rop.OOIS, [u1_box, u1_box], 'int') assert r.value == 1 r = self.execute_operation(rop.OOISNOT, [u2_box, u2_box], 'int') assert r.value == 0 r = self.execute_operation(rop.OOIS, [u1_box, u2_box], 'int') assert r.value == 0 r = self.execute_operation(rop.OOISNOT, [u2_box, u1_box], 'int') assert r.value == 1 r = self.execute_operation(rop.OOISNULL, [u1_box], 'int') assert r.value == 0 r = self.execute_operation(rop.OONONNULL, [u2_box], 'int') assert r.value == 1 # null_box = self.null_instance() r = self.execute_operation(rop.OOIS, [null_box, null_box], 'int') assert r.value == 1 r = self.execute_operation(rop.OOIS, [u1_box, null_box], 'int') assert r.value == 0 r = self.execute_operation(rop.OOIS, [null_box, u2_box], 'int') assert r.value == 0 r = self.execute_operation(rop.OOISNOT, [null_box, null_box], 'int') assert r.value == 0 r = self.execute_operation(rop.OOISNOT, [u2_box, null_box], 'int') assert r.value == 1 r = self.execute_operation(rop.OOISNOT, [null_box, u1_box], 'int') assert r.value == 1 r = self.execute_operation(rop.OOISNULL, [null_box], 'int') assert r.value == 1 r = self.execute_operation(rop.OONONNULL, [null_box], 'int') assert r.value == 0
4fadf64b29ac40fd74c2c7a4371c4679e689355b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/4fadf64b29ac40fd74c2c7a4371c4679e689355b/runner_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5161, 4473, 12, 2890, 4672, 582, 21, 67, 2147, 16, 587, 67, 2147, 273, 365, 18, 9853, 67, 1336, 12, 2890, 18, 57, 13, 582, 22, 67, 2147, 16, 587, 67, 2147, 273, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5161, 4473, 12, 2890, 4672, 582, 21, 67, 2147, 16, 587, 67, 2147, 273, 365, 18, 9853, 67, 1336, 12, 2890, 18, 57, 13, 582, 22, 67, 2147, 16, 587, 67, 2147, 273, 365, 18, ...
try: body = [output, extra] except NameError: body = [output]
body = [output]
def perform_modifypreferences(req, userID, login_method='', callback='yes', confirm=0): """modify email and password of an account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="4"></a>4. Modify preferences.&nbsp&nbsp&nbsp<small>[<a title="See guide" href="%s/admin/webaccess/guide.html#4">?</a>]</small>""" % weburl res = run_sql("SELECT id, email, password FROM user WHERE id=%s" % userID) output = "" if res: user_pref = get_user_preferences(userID) if confirm in [1, "1"]: if login_method: user_pref['login_method'] = login_method set_user_preferences(userID, user_pref) output += "Select default login method:<br>" text = "" methods = CFG_EXTERNAL_AUTHENTICATION.keys() methods.sort() for system in methods: text += """<input type="radio" name="login_method" value="%s" %s>%s<br>""" % (system, (user_pref['login_method'] == system and "checked" or ""), system) output += createhiddenform(action="modifypreferences", text=text, confirm=1, userID=userID, button="Select") if confirm in [1, "1"]: if login_method: output += """<b><span class="info">The login method has been changed</span></b>""" else: output += """<b><span class="info">Nothing to update</span></b>""" else: output += '<b><span class="info">The account id given does not exist.</span></b>' try: body = [output, extra] except NameError: body = [output] if callback: return perform_editaccount(req, userID, mtype='perform_modifypreferences', content=addadminbox(subtitle, body), callback='yes') else: return addadminbox(subtitle, body)
8e6aa1042563d2e1f44b1ffbe6e50d6cd67dbacc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1931/8e6aa1042563d2e1f44b1ffbe6e50d6cd67dbacc/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1711, 430, 879, 14353, 12, 3658, 16, 16299, 16, 3925, 67, 2039, 2218, 2187, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 17042, 2699, 471, 2201, 434, 392, 2236, 8395, 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, 3073, 67, 1711, 430, 879, 14353, 12, 3658, 16, 16299, 16, 3925, 67, 2039, 2218, 2187, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 17042, 2699, 471, 2201, 434, 392, 2236, 8395, 225,...
return max( (g.longest_path(s = s, t = t, weighted = weighted, algorithm = algorithm) for g in self.connected_components_subgraphs() ), key = lambda x : x.order() )
return max((g.longest_path(s=s, t=t, weighted=weighted, algorithm=algorithm) for g in self.connected_components_subgraphs()), key=lambda x: x.order())
def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``.
851087dd5fd3776eb2db10b18fb5402a16a5dd17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/851087dd5fd3776eb2db10b18fb5402a16a5dd17/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
block1 = link.target
if not block1.exits: break
def visit(link): if isinstance(link, Link): while not link.target.operations: if (len(link.target.exits) != 1 and link.target.exitswitch != c_last_exception): break block1 = link.target exit = block1.exits[0] assert block1 is not exit.target, ( "the graph contains an empty infinite loop") outputargs = [] for v in exit.args: if isinstance(v, Variable): # this variable is valid in the context of block1 # but it must come from 'link' i = block1.inputargs.index(v) v = link.args[i] outputargs.append(v) link.args = outputargs link.target = exit.target # the while loop above will simplify recursively the new link
d68330e8b4d6c2754986016c7c2195e2b800a3dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/d68330e8b4d6c2754986016c7c2195e2b800a3dd/simplify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 12, 1232, 4672, 309, 1549, 12, 1232, 16, 4048, 4672, 1323, 486, 1692, 18, 3299, 18, 17542, 30, 309, 261, 1897, 12, 1232, 18, 3299, 18, 338, 1282, 13, 480, 404, 471, 1692, 18, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 12, 1232, 4672, 309, 1549, 12, 1232, 16, 4048, 4672, 1323, 486, 1692, 18, 3299, 18, 17542, 30, 309, 261, 1897, 12, 1232, 18, 3299, 18, 338, 1282, 13, 480, 404, 471, 1692, 18, 3...
CONFIG_DESCRIPTIONS[lastOption] = (lastArg, strippedDescription)
CONFIG_DESCRIPTIONS[lastOption.lower()] = (lastArg, strippedDescription)
def loadOptionDescriptions(loadPath = None): """ Fetches and parses descriptions for tor's configuration options from its man page. This can be a somewhat lengthy call, and raises an IOError if issues occure. If available, this can load the configuration descriptions from a file where they were previously persisted to cut down on the load time (latency for this is around 200ms). Arguments: loadPath - if set, this attempts to fetch the configuration descriptions from the given path instead of the man page """ CONFIG_DESCRIPTIONS_LOCK.acquire() CONFIG_DESCRIPTIONS.clear() raisedExc = None try: if loadPath: # Input file is expected to be of the form: # <option> # <arg description> # <description, possibly multiple lines> # <PERSIST_ENTRY_DIVIDER> inputFile = open(loadPath, "r") inputFileContents = inputFile.readlines() inputFile.close() try: while inputFileContents: option = inputFileContents.pop(0).rstrip() argument = inputFileContents.pop(0).rstrip() description, loadedLine = "", inputFileContents.pop(0) while loadedLine != PERSIST_ENTRY_DIVIDER: description += loadedLine if inputFileContents: loadedLine = inputFileContents.pop(0) else: break CONFIG_DESCRIPTIONS[option] = (argument, description.rstrip()) except IndexError: CONFIG_DESCRIPTIONS.clear() raise IOError("input file format is invalid") else: manCallResults = sysTools.call("man tor") lastOption, lastArg = None, None lastDescription = "" for line in manCallResults: strippedLine = line.strip() # we have content, but an indent less than an option (ignore line) if strippedLine and not line.startswith(" " * MAN_OPT_INDENT): continue # line starts with an indent equivilant to a new config option isOptIndent = line.startswith(" " * MAN_OPT_INDENT) and line[MAN_OPT_INDENT] != " " if isOptIndent: # Most lines with this indent that aren't config options won't have # any description set at this point (not a perfect filter, but cuts # down on the noise). strippedDescription = lastDescription.strip() if lastOption and strippedDescription: CONFIG_DESCRIPTIONS[lastOption] = (lastArg, strippedDescription) lastDescription = "" # parses the option and argument line = line.strip() divIndex = line.find(" ") if divIndex != -1: lastOption, lastArg = line[:divIndex], line[divIndex + 1:] else: # Appends the text to the running description. Empty lines and lines # starting with a specific indentation are used for formatting, for # instance the ExitPolicy and TestingTorNetwork entries. if lastDescription and lastDescription[-1] != "\n": lastDescription += " " if not strippedLine: lastDescription += "\n\n" elif line.startswith(" " * MAN_EX_INDENT): lastDescription += " %s\n" % strippedLine else: lastDescription += strippedLine except IOError, exc: raisedExc = exc CONFIG_DESCRIPTIONS_LOCK.release() if raisedExc: raise raisedExc
7440b5490feffac41d851dc9f97491f4fc5563ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13459/7440b5490feffac41d851dc9f97491f4fc5563ff/torConfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 1895, 16844, 12, 945, 743, 273, 599, 4672, 3536, 8065, 281, 471, 8940, 15550, 364, 8934, 1807, 1664, 702, 628, 2097, 3161, 1363, 18, 1220, 848, 506, 279, 18016, 11304, 769, 93, 745...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 1895, 16844, 12, 945, 743, 273, 599, 4672, 3536, 8065, 281, 471, 8940, 15550, 364, 8934, 1807, 1664, 702, 628, 2097, 3161, 1363, 18, 1220, 848, 506, 279, 18016, 11304, 769, 93, 745...
if self.sink:
if self.sink and hasattr(self.sink, "expose"):
def onExpose(self, widget, event): confirmMainThread() if self.sink: self.sink.expose() else: widget.window.draw_rectangle(self.gc, True, 0, 0, widget.allocation.width, widget.allocation.height) return True
e93c006a777cb64354a30ca504bd5f00fdf8424e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/e93c006a777cb64354a30ca504bd5f00fdf8424e/gstreamerrenderer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 424, 4150, 12, 2890, 16, 3604, 16, 871, 4672, 6932, 6376, 3830, 1435, 309, 365, 18, 17074, 471, 3859, 12, 2890, 18, 17074, 16, 315, 338, 4150, 6, 4672, 365, 18, 17074, 18, 338, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 424, 4150, 12, 2890, 16, 3604, 16, 871, 4672, 6932, 6376, 3830, 1435, 309, 365, 18, 17074, 471, 3859, 12, 2890, 18, 17074, 16, 315, 338, 4150, 6, 4672, 365, 18, 17074, 18, 338, ...
self._branch_button.hide()
def check_dependencies(self, index): """ determines if current VisTrail will be supported by the repository's VisTrail server """
98409d064cdfec158820194ae897a365db78af1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/98409d064cdfec158820194ae897a365db78af1a/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 11037, 12, 2890, 16, 770, 4672, 3536, 12949, 309, 783, 8077, 18107, 903, 506, 3260, 635, 326, 3352, 1807, 8077, 18107, 1438, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 11037, 12, 2890, 16, 770, 4672, 3536, 12949, 309, 783, 8077, 18107, 903, 506, 3260, 635, 326, 3352, 1807, 8077, 18107, 1438, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -...
if '__main__' == __name__: option_parser = optparse.OptionParser() option_parser.add_option('--server', type='choice', choices=['start', 'stop'], default='start', help='Server action (start|stop)') option_parser.add_option('-p', '--port', dest='port', default=None, help='Port to listen on') option_parser.add_option('-r', '--root', help='Absolute path to DocumentRoot ' '(overrides layout test roots)') option_parser.add_option('-t', '--tls', dest='use_tls', action='store_true', default=False, help='use TLS (wss://)') option_parser.add_option('-k', '--private_key', dest='private_key', default='', help='TLS private key file.') option_parser.add_option('-c', '--certificate', dest='certificate', default='', help='TLS certificate file.') option_parser.add_option('--register_cygwin', action="store_true", dest="register_cygwin", help='Register Cygwin paths (on Win try bots)') option_parser.add_option('--pidfile', help='path to pid file.') options, args = option_parser.parse_args() if not options.port: if options.use_tls: options.port = _DEFAULT_WSS_PORT else: options.port = _DEFAULT_WS_PORT kwds = {'port': options.port, 'use_tls': options.use_tls} if options.root: kwds['root'] = options.root if options.private_key: kwds['private_key'] = options.private_key if options.certificate: kwds['certificate'] = options.certificate kwds['register_cygwin'] = options.register_cygwin if options.pidfile: kwds['pidfile'] = options.pidfile port_obj = factory.get() pywebsocket = PyWebSocket(port_obj, tempfile.gettempdir(), **kwds) if 'start' == options.server: pywebsocket.start() else: pywebsocket.stop(force=True)
def stop(self, force=False): if not force and not self.is_running(): return
558eb3f4446ba3ee8c640986dddc1e6c14958900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/558eb3f4446ba3ee8c640986dddc1e6c14958900/websocket_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 16, 2944, 33, 8381, 4672, 309, 486, 2944, 471, 486, 365, 18, 291, 67, 8704, 13332, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 16, 2944, 33, 8381, 4672, 309, 486, 2944, 471, 486, 365, 18, 291, 67, 8704, 13332, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print 'HTTPS server started on port %d...' % port
print 'HTTPS server started on port %d...' % server.server_port
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): print 'specified server cert file not found: ' + options.cert + \ ' exiting...' return for ca_cert in options.ssl_client_ca: if not os.path.isfile(ca_cert): print 'specified trusted client CA file not found: ' + ca_cert + \ ' exiting...' return server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth, options.ssl_client_ca, options.ssl_bulk_cipher) print 'HTTPS server started on port %d...' % port else: server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler) print 'HTTP server started on port %d...' % port server.data_dir = MakeDataDir() server.file_root_url = options.file_root_url server._sync_handler = None server._device_management_handler = None # means FTP Server else: my_data_dir = MakeDataDir() # Instantiate a dummy authorizer for managing 'virtual' users authorizer = pyftpdlib.ftpserver.DummyAuthorizer() # Define a new user having full r/w permissions and a read-only # anonymous user authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw') authorizer.add_anonymous(my_data_dir) # Instantiate FTP handler class ftp_handler = pyftpdlib.ftpserver.FTPHandler ftp_handler.authorizer = authorizer # Define a customized banner (string returned when client connects) ftp_handler.banner = ("pyftpdlib %s based ftpd ready." % pyftpdlib.ftpserver.__ver__) # Instantiate FTP server class and listen to 127.0.0.1:port address = ('127.0.0.1', port) server = pyftpdlib.ftpserver.FTPServer(address, ftp_handler) print 'FTP server started on port %d...' % port # Notify the parent that we've started. (BaseServer subclasses # bind their sockets on construction.) if options.startup_pipe is not None: if sys.platform == 'win32': fd = msvcrt.open_osfhandle(options.startup_pipe, 0) else: fd = options.startup_pipe startup_pipe = os.fdopen(fd, "w") startup_pipe.write("READY") startup_pipe.close() try: server.serve_forever() except KeyboardInterrupt: print 'shutting down server' server.stop = True
fd6cfaf721f4da81f4fb19983b73f96c1005f0d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/fd6cfaf721f4da81f4fb19983b73f96c1005f0d8/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
mtype = h5t.create(h5t.COMPOUND)
subtypes = {} for idx in range(htype.get_nmembers()): subtypes[htype.get_member_name(idx)] = htype.get_member_type(idx) for name in names: if name not in subtypes: raise ValueError("Field %s does not appear in this type." % name) insertlist = [(name, subtypes[name].get_size()) for name in names] totalsize = sum([x[1] for x in insertlist]) mtype = h5t.create(h5t.COMPOUND, totalsize)
def __getitem__(self, args): """ Read a slice from the underlying HDF5 array. Takes slices and recarray-style field names (more than one is allowed!) in any order. Examples:
083acd94cf4f30f16e99cf8a5b9440590dcb72aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10380/083acd94cf4f30f16e99cf8a5b9440590dcb72aa/highlevel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 833, 4672, 3536, 2720, 279, 2788, 628, 326, 6808, 21673, 25, 526, 18, 225, 23004, 12390, 471, 1950, 1126, 17, 4060, 652, 1257, 261, 10161, 2353, 1245, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 31571, 972, 12, 2890, 16, 833, 4672, 3536, 2720, 279, 2788, 628, 326, 6808, 21673, 25, 526, 18, 225, 23004, 12390, 471, 1950, 1126, 17, 4060, 652, 1257, 261, 10161, 2353, 1245, 353...
line(out, indent, 'if (PyObject_TypeCheck(arg, &FinalizerProxyType) &&')
line(out, indent, 'if (PyObject_TypeCheck(arg, &FinalizerProxy$$Type) &&')
def call(out, indent, cls, inCase, method, names, cardinality, isExtension): if inCase: line(out, indent, '{') indent += 1 name = method.getName() modifiers = method.getModifiers() params = method.getParameterTypes() returnType = method.getReturnType() count = len(params) for i in xrange(count): line(out, indent, '%s a%d%s;', typename(params[i], cls, False), i, not params[i].isPrimitive() and '((jobject) NULL)' or '') returnName = returnType.getName() if returnName != 'void': line(out, indent, '%s result%s;', typename(returnType, cls, False), not returnType.isPrimitive() and '((jobject) NULL)' or '') result = 'result = ' else: result = '' if cardinality and (count or not inCase): s = cardinality > 1 and 's' or '' line(out) if isExtension and name == 'clone' and Modifier.isNative(modifiers): line(out, indent, 'if (arg)') else: line(out, indent, 'if (!parseArg%s(arg%s, "%s"%s%s))', s, s, *parseArgs(params, cls)) line(out, indent, '{') indent += 1 if name in RESERVED: name += '$' if Modifier.isStatic(modifiers): line(out, indent, 'OBJ_CALL(%s%s::%s(%s));', result, '::'.join(names), name, ', '.join(['a%d' %(i) for i in xrange(count)])) else: line(out, indent, 'OBJ_CALL(%sself->object.%s(%s));', result, name, ', '.join(['a%d' %(i) for i in xrange(count)])) if isExtension and name == 'clone' and Modifier.isNative(modifiers): line(out) line(out, indent, '%s object(result.this$);', typename(cls, cls, False)) line(out, indent, 'if (PyObject_TypeCheck(arg, &FinalizerProxyType) &&') line(out, indent, ' PyObject_TypeCheck(((t_fp *) arg)->object, self->ob_type))') line(out, indent, '{') line(out, indent + 1, 'PyObject *_arg = ((t_fp *) arg)->object;') line(out, indent + 1, '((t_JObject *) _arg)->object = object;') line(out, indent + 1, 'Py_INCREF(_arg);') line(out, indent + 1, 'object.pythonExtension((jlong) (Py_intptr_t) (void *) _arg);') line(out, indent + 1, 'Py_INCREF(arg);') line(out, indent + 1, 'return arg;') line(out, indent, '}') line(out, indent, 'return PyErr_SetArgsError("%s", arg);' %(name)) elif returnName != 'void': line(out, indent, returnValue(cls, returnType, 'result')) else: line(out, indent, 'Py_RETURN_NONE;') if cardinality and (count or not inCase): indent -= 1 line(out, indent, '}') if inCase: indent -= 1 line(out, indent, '}')
bd30bad5d125561664588e92bf20684eef823d24 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4005/bd30bad5d125561664588e92bf20684eef823d24/python.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 659, 16, 3504, 16, 2028, 16, 316, 2449, 16, 707, 16, 1257, 16, 14379, 16, 353, 3625, 4672, 225, 309, 316, 2449, 30, 980, 12, 659, 16, 3504, 16, 2292, 6134, 3504, 1011, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 659, 16, 3504, 16, 2028, 16, 316, 2449, 16, 707, 16, 1257, 16, 14379, 16, 353, 3625, 4672, 225, 309, 316, 2449, 30, 980, 12, 659, 16, 3504, 16, 2292, 6134, 3504, 1011, 404, ...
self.link_shared_object (objects, "lib%s%s" % (output_libname, SO))
self.link_shared_object (objects, "lib%s%s" % \ (output_libname, self._shared_lib_ext), build_info=build_info)
def link_shared_lib (self, objects, output_libname, libraries=None, library_dirs=None): # XXX should we sanity check the library name? (eg. no # slashes) self.link_shared_object (objects, "lib%s%s" % (output_libname, SO))
8c4f097a5c637a4673608d1db14fe675c1b4ea3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c4f097a5c637a4673608d1db14fe675c1b4ea3b/unixccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 11574, 67, 2941, 261, 2890, 16, 2184, 16, 876, 67, 2941, 529, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 4672, 468, 11329, 1410, 732, 16267, 866, 326, 5313, 508, 35, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 11574, 67, 2941, 261, 2890, 16, 2184, 16, 876, 67, 2941, 529, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 4672, 468, 11329, 1410, 732, 16267, 866, 326, 5313, 508, 35, ...
objectDict['vtkActor'].GetMatrix()) for prop in (objectDict['vtkActor'], objectDict['axisActor']):
theProp.GetMatrix()) for prop in (theProp, objectDict['axisLineActor']):
def _axisToSlice(self, tdObject, sliceDirection): """If tdObject has an axis, make the axis lie in the plane defined by sliceDirection. """
fc0788b84d2d17e23cfbf2eba51bf9dd35371f2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/fc0788b84d2d17e23cfbf2eba51bf9dd35371f2d/tdObjects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4890, 774, 5959, 12, 2890, 16, 6655, 921, 16, 2788, 8212, 4672, 3536, 2047, 6655, 921, 711, 392, 2654, 16, 1221, 326, 2654, 328, 1385, 316, 326, 11017, 2553, 635, 2788, 8212, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4890, 774, 5959, 12, 2890, 16, 6655, 921, 16, 2788, 8212, 4672, 3536, 2047, 6655, 921, 711, 392, 2654, 16, 1221, 326, 2654, 328, 1385, 316, 326, 11017, 2553, 635, 2788, 8212, 18, ...
if unblock[0] != None: if self.same_source(unblock[0], source_u[VERSION]):
if unblock[0] != None and self.same_source(unblock[0], source_u[VERSION]):
def should_upgrade_src(self, src, suite): """Check if source package should be upgraded
20621c1a27f8a4f6da24233ea559a07cf583e4db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2784/20621c1a27f8a4f6da24233ea559a07cf583e4db/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1410, 67, 15097, 67, 4816, 12, 2890, 16, 1705, 16, 11371, 4672, 3536, 1564, 309, 1084, 2181, 1410, 506, 31049, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1410, 67, 15097, 67, 4816, 12, 2890, 16, 1705, 16, 11371, 4672, 3536, 1564, 309, 1084, 2181, 1410, 506, 31049, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
debug("NEWargv: %s" % argv)
def process(userData, kind_id, argv): """ Execute system call then updates the database consequently. exit_code != 0 means problem. """ user_id = userData['UserID'] kind = userData['Kind'] # Log file to store storeLog = '_condor_stderr' success = 0 db = DB(host = DATABASE_HOST, user = DATABASE_USER, passwd = DATABASE_PASSWORD, db = DATABASE_NAME) g = DBGeneric(db.con) start = getNowDateTime(time.time()) (imgName, task_id, g) = task_start_log(userData, start, kind_id) ################### PRE-PROCESSING STUFF GOES HERE ######################################## # Automatic .head (or .ahead for Scamp) file generation if kind == 'fitsin': #image name from commandline argv splittedArgs = argv[len(argv) - 1].split('/') nameFromDB = splittedArgs[len(splittedArgs) -1][:-5] debug("nameFromDB: %s" % nameFromDB) imgChecksum = g.execute("SELECT checksum FROM youpi_image WHERE name='%s'" % nameFromDB)[0][0] debug("imgChecksum: %s" % imgChecksum) imgNames = g.execute("SELECT name FROM youpi_image WHERE checksum='%s'" % imgChecksum)[0] debug("imgNames: %s" % imgNames) litename = nameFromDB for imgName in imgNames: if len(imgName) < len(litename): litename = imgName debug("litename: %s" % litename) argv[len(argv) - 1] = argv[len(argv) -1].replace(nameFromDB,litename) debug("NEWargv: %s" % argv) if userData['HandleHeadOption']: try: from genimgdothead import genImageDotHead img_id = userData['ImgID'] data, lenght, missing = genImageDotHead(int(img_id)) if len(data): headname = litename + '.head' f = open(headname, 'w') for i in range(lenght): for k, v in data.iteritems(): f.write("%s = %s\n" % (k, v)) f.write("END\n") f.close() debug("Generated: %s" % headname) except Exception, e: debug("Error during automatic .head file generation: %s" % e) for a in argv: if (a == '--head'): argv[argv.index(a) + 1] = argv[argv.index(a) + 1].replace(nameFromDB, litename) # Other preprocessing stuff if kind == 'sex': img_id = userData['ImgID'] imgName = g.execute("SELECT name FROM youpi_image WHERE id='%s'" % img_id)[0][0] os.mkdir(imgName) os.chmod(imgName, RWX_ALL) os.system("mv sex-config* sex-param* *.conv *.nnw %s" %(imgName)) os.chdir(imgName) # FIXME: remove this code that won't get executed at all since the files are not yet # transferred... (see Swarp plugin code for a fix) fzs = glob.glob('*.fits.fz') for fz in fzs: debug("Sextractor Preprocessing: uncompressing %s" % fz) os.system("%s %s %s" % (CMD_IMCOPY, fz, fz[:-3])) elif kind == 'fitsin': flatname = g.execute("SELECT flat FROM youpi_image WHERE id=%s" % userData['ImgID'])[0][0] if userData['ExitIfFlatMissing']: # Check for flat file flatFile = os.path.join(userData['Flat'], flatname) if not os.path.exists(flatFile): exit_code = 1 success = 0 debug("Error: FLAT file %s has not been found (and you asked Youpi to halt in this case)" % flatFile) debug("Exiting now...") task_end_log(userData, g, storeLog, task_id, success, kind) debug("Exited (code %d)" % exit_code) sys.exit(exit_code) else: debug("Found FLAT file: %s" % flatFile) else: debug("No check for FLAT image %s existence (checkbox was unchecked)" % flatname) ################### END OF PRE-PROCESSING ################################################ # Execute process, waiting for completion cmd_line = string.join(argv, ' ') debug("Executing command line: %s\n" % cmd_line) try: exit_code = os.system(cmd_line) except: pass debug("Command line execution terminated (code %d)" % exit_code) ################### POST-PROCESSING STUFF GOES HERE ######################################## debug("Beginning post-processing operations") # QualityFITS-In processing if kind == 'fitsin': if exit_code == 0: time.sleep(2) data = os.popen('ls */*/.finished 2>&1') done = data.readlines() data.close() if len(done): # QF was successful success = 1 else: storeLog = '_condor_stdout' # Stores results of QF into DB when successful (stores at least flat, mask, reg paths and QF config content) try: g.setTableName('youpi_plugin_fitsin') g.insert( task_id = int(task_id), flat = userData['Flat'], mask = userData['Mask'], reg = userData['Reg'], exitIfFlatMissing = userData['ExitIfFlatMissing'], handleHeadOption = userData['HandleHeadOption'], # # QF config file serialization: base64 encoding over zlib compression # To retreive data: zlib.decompress(base64.decodestring(encoded_data)) # qfconfig = base64.encodestring(zlib.compress(string.join(open(os.path.basename(userData['ConfigFile']), 'r').readlines(), ''), 9)).replace('\n', ''), www = os.path.join( WWW_FITSIN_PREFIX, username, userData['Kind'], userData['ResultsOutputDir'][userData['ResultsOutputDir'].find(userData['Kind'])+len(userData['Kind'])+1:], imgName, 'qualityFITS' ) + '/' ) fitsin_id = g.con.insert_id() # Now results ingestion takes place ingestQFitsInResults(fitsin_id, g) except Exception, e: raise WrapperError, e elif kind == 'scamp': if exit_code == 0: # FIXME: look for scamp.xml; parse it and look for errors in it success = 1 configContent = open(os.path.basename(userData['ConfigFile']), 'r').readlines() try: if HAS_CONVERT: convert = 1 else: convert = 0 debug("[Warning] convert utility not found. No thumbnails will be generated") g.setTableName('youpi_plugin_scamp') g.insert( task_id = int(task_id), # # Scamp config file serialization: base64 encoding over zlib compression # config = base64.encodestring(zlib.compress(string.join(configContent, ''), 9)).replace('\n', ''), ldac_files = base64.encodestring(marshal.dumps(userData['LDACFiles'])).replace('\n', ''), www = os.path.join( WWW_SCAMP_PREFIX, username, userData['Kind'], userData['ResultsOutputDir'][userData['ResultsOutputDir'].find(userData['Kind'])+len(userData['Kind'])+1:] ), thumbnails = convert, aheadPath = userData['AheadPath'] ) scamp_id = g.con.insert_id() except Exception, e: raise WrapperError, e # Copy XSL stylesheet try: xslPath = re.search(r'file://(.*)$', getConfigValue(configContent, 'XSL_URL')) if xslPath: copyFileChmodAll(xslPath.group(1), userData['ResultsOutputDir']) except TypeError, e: # No custom XSL_URL value pass # Create thumbnails for group #1, if convert cmd available if HAS_CONVERT: debug("Creating image thumbnails for group #1") olds = glob.glob(os.path.join(userData['ResultsOutputDir'], 'tn_*.png')) for old in olds: os.remove(old) pngs = glob.glob(os.path.join(userData['ResultsOutputDir'], '*_1.png')) for png in pngs: os.system("%s %s %s" % (CMD_CONVERT_THUMB, # Source png, # Destination os.path.join(os.path.dirname(png), 'tn_' + os.path.basename(png)))) elif kind == 'sex': if exit_code == 0: success = 1 configContent = open(os.path.basename(userData['ConfigFile']), 'r').readlines() try: if HAS_CONVERT: convert = 1 else: convert = 0 debug("[Warning] convert utility not found. No thumbnails will be generated") g.setTableName('youpi_plugin_sex') g.insert( task_id = int(task_id), weightPath = userData['Weight'], flagPath = userData['Flag'], psfPath = userData['Psf'], dualMode = userData['DualMode'], dualImage = userData['DualImage'], dualweightPath = userData['DualWeight'], dualflagPath = userData['DualFlag'], # # Sex config file serialization: base64 encoding over zlib compression # config = base64.encodestring(zlib.compress(string.join(configContent, ''), 9)).replace('\n', ''), param = base64.encodestring(zlib.compress(string.join(open(os.path.basename(userData['ParamFile']), 'r').readlines(), ''), 9)).replace('\n', ''), www = os.path.join( WWW_SEX_PREFIX, username, userData['Kind'], userData['ResultsOutputDir'][userData['ResultsOutputDir'].find(userData['Kind'])+len(userData['Kind'])+1:]) + '/', thumbnails = convert, ) sex_id = g.con.insert_id() except Exception, e: raise WrapperError, e # Copy XSL stylesheet try: xslPath = re.search(r'file://(.*)$', getConfigValue(configContent, 'XSL_URL')) if xslPath: copyFileChmodAll(xslPath.group(1), userData['ResultsOutputDir']) except TypeError, e: # No custom XSL_URL value pass # Gets image name motif = "CHECKIMAGE_NAME" path_cf = userData['ConfigFile'] cfile = path_cf.split('/')[2] f = open(cfile,'r') for ligne in f : if motif in ligne: m = re.findall(r'(\w+\.fits)', ligne) f.close() for current in m: name = current.split('.') cur = name[0] if (os.path.exists(cur +'.fits')): os.system(CMD_SWARP + " %s -SUBTRACT_BACK N -WRITE_XML N -PIXELSCALE_TYPE MANUAL -PIXEL_SCALE 4.0 -RESAMPLING_TYPE BILINEAR -IMAGEOUT_NAME %s" % (cur + '.fits', os.path.join(userData['ResultsOutputDir'], 'temp.fits'))) # Converts produced FITS image into PNG format tiff = os.path.join(userData['ResultsOutputDir'], cur + '.tif') os.system("%s %s -OUTFILE_NAME %s 2>/dev/null" % (CMD_STIFF,os.path.join(userData['ResultsOutputDir'], 'temp.fits'), tiff)) os.remove(os.path.join(userData['ResultsOutputDir'], 'temp.fits')) os.system("%s %s %s" % (CMD_CONVERT, tiff, os.path.join(userData['ResultsOutputDir'], cur + '.png'))) if HAS_CONVERT: debug("Creating image thumbnails") os.system("%s %s %s" % (CMD_CONVERT_THUMB, tiff, os.path.join(userData['ResultsOutputDir'] , 'tn_' + cur + '.png'))) os.remove(tiff) elif kind == 'swarp': if exit_code == 0: # FIXME: look for swarp.xml; parse it and look for errors in it success = 1 configContent = open(os.path.basename(userData['ConfigFile']), 'r').readlines() # Final stack image ingestion debug("Starting ingestion of final stack image...") try: from stack_ingestion import run_stack_ingestion imgout = getConfigValue(configContent, 'IMAGEOUT_NAME') finalStackName = run_stack_ingestion(g, os.path.join(userData['ResultsOutputDir'], imgout), user_id) debug("Final stack ingestion complete") if finalStackName != imgout: # Stack name has changed! # The config file IMAGEOUT_NAME must be modified j = 0 for line in configContent: if line.find('IMAGEOUT_NAME') != -1: line = re.sub(r'#.*$', '', line) res = [k for k in re.split(r'[ \t]', line) if len(k)] try: res[1] = finalStackName except: debug("IMAGEOUT_NAME parameter: could not set value") raise configContent[j] = string.join(res, '\t') break j += 1 if j == len(configContent): debug("Could not find IMAGEOUT_NAME parameter in the config file") raise WrapperError, "IMAGEOUT_NAME param not found" debug("IMAGEOUT_NAME parameter value set to %s" % finalStackName) # The stack file has to be renamed on disk os.rename(os.path.join(userData['ResultsOutputDir'], imgout), os.path.join(userData['ResultsOutputDir'], finalStackName)) debug("Renamed %s to %s in %s" % (imgout, finalStackName, userData['ResultsOutputDir'])) except Exception, e: debug("Could not ingest final stack image. Error: %s" % e) success = 0 exit_code = 1 try: if HAS_CONVERT: convert = 1 else: convert = 0 debug("[Warning] convert utility not found. No thumbnails will be generated") g.setTableName('youpi_plugin_swarp') g.insert( task_id = int(task_id), # # Swarp config file serialization: base64 encoding over zlib compression # config = base64.encodestring(zlib.compress(string.join(configContent, ''), 9)).replace('\n', ''), www = os.path.join( WWW_SWARP_PREFIX, username, userData['Kind'], userData['ResultsOutputDir'][userData['ResultsOutputDir'].find(userData['Kind'])+len(userData['Kind'])+1:] ), weightPath = userData['WeightPath'], useQFITSWeights = userData['UseQFITSWeights'], headPath = userData['HeadPath'], useHeadFiles = userData['UseHeadFiles'], thumbnails = convert ) swarp_id = g.con.insert_id() except Exception, e: raise WrapperError, e # Copy XSL stylesheet try: xslPath = re.search(r'file://(.*)$', getConfigValue(configContent, 'XSL_URL')) if xslPath: copyFileChmodAll(xslPath.group(1), userData['ResultsOutputDir']) except TypeError, e: # No custom XSL_URL value pass # Gets image name imgout = getConfigValue(configContent, 'IMAGEOUT_NAME') if imgout: # Converts produced FITS image into PNG format tiff = os.path.join(userData['ResultsOutputDir'], 'swarp.tif') os.system("%s %s -OUTFILE_NAME %s -BINNING 40 2>/dev/null" % (CMD_STIFF, imgout, tiff)) os.system("%s %s %s" % (CMD_CONVERT, tiff, os.path.join(userData['ResultsOutputDir'], 'swarp.png'))) if HAS_CONVERT: debug("Creating image thumbnails") os.system("%s %s %s" % (CMD_CONVERT_THUMB, tiff, os.path.join(userData['ResultsOutputDir'], 'tn_swarp.png'))) else: debug("[Warning] IMAGEOUT_NAME keyword not found in configuration file") else: # Default: success is set to that task_end_log marks the job as successful if exit_code == 0: success = 1 ################### END OF POST-PROCESSING ################################################ task_end_log(userData, g, storeLog, task_id, success, kind) debug("Post-processing operations terminated"); debug("Exited (code %d)" % exit_code) sys.exit(exit_code)
4386b3fce41e4f947242a074665b6ad7374046ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11651/4386b3fce41e4f947242a074665b6ad7374046ae/wrapper_processing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 1355, 751, 16, 3846, 67, 350, 16, 5261, 4672, 3536, 7903, 2619, 745, 1508, 4533, 326, 2063, 356, 9116, 715, 18, 2427, 67, 710, 480, 374, 4696, 6199, 18, 3536, 225, 729, 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, 1207, 12, 1355, 751, 16, 3846, 67, 350, 16, 5261, 4672, 3536, 7903, 2619, 745, 1508, 4533, 326, 2063, 356, 9116, 715, 18, 2427, 67, 710, 480, 374, 4696, 6199, 18, 3536, 225, 729, 67, ...
actiongroup.add_radio_actions([
self._actiongroup.add_radio_actions([
def __init__(self, window): gtk.UIManager.__init__(self) self._window = window
e6a2bb0f854d131baa7feea110f314792ba32c5b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14624/e6a2bb0f854d131baa7feea110f314792ba32c5b/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2742, 4672, 22718, 18, 5370, 1318, 16186, 2738, 972, 12, 2890, 13, 365, 6315, 5668, 273, 2742, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2742, 4672, 22718, 18, 5370, 1318, 16186, 2738, 972, 12, 2890, 13, 365, 6315, 5668, 273, 2742, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def create(self, key, directory):
def create(self, key, directory, content=None):
def create(self, key, directory): '''Create a message object from a filename in a directory''' return IMAPFileMessage(key, directory)
c4d7670dff445a1db6fa6542323dae6b3cdc7cdc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/c4d7670dff445a1db6fa6542323dae6b3cdc7cdc/sb_pop3dnd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 498, 16, 1867, 16, 913, 33, 7036, 4672, 9163, 1684, 279, 883, 733, 628, 279, 1544, 316, 279, 1867, 26418, 327, 6246, 2203, 812, 1079, 12, 856, 16, 1867, 13, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 12, 2890, 16, 498, 16, 1867, 16, 913, 33, 7036, 4672, 9163, 1684, 279, 883, 733, 628, 279, 1544, 316, 279, 1867, 26418, 327, 6246, 2203, 812, 1079, 12, 856, 16, 1867, 13, 2, -10...
lowerpart = part.lower() matches = [x for x in set(list) if x.lower().startswith(lowerpart) and len(x) >= len(part)]
matches = GetCompletions(part, list)
def GetCompletion(part, list): lowerpart = part.lower() matches = [x for x in set(list) if x.lower().startswith(lowerpart) and len(x) >= len(part)] if len(matches) == 0: return None, 0 if len(matches) == 1: return matches[0], 1 else: return commonprefix([x.lower() for x in matches]), 0
76412353c4971a724d0da8e618e53541118ef1fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8738/76412353c4971a724d0da8e618e53541118ef1fc/chatrooms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 11238, 12, 2680, 16, 666, 4672, 1885, 273, 968, 6297, 1115, 12, 2680, 16, 666, 13, 309, 562, 12, 8436, 13, 422, 374, 30, 327, 599, 16, 374, 309, 562, 12, 8436, 13, 422, 404, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 11238, 12, 2680, 16, 666, 4672, 1885, 273, 968, 6297, 1115, 12, 2680, 16, 666, 13, 309, 562, 12, 8436, 13, 422, 374, 30, 327, 599, 16, 374, 309, 562, 12, 8436, 13, 422, 404, 3...
\\end_document\n""")
\\end_document """ args = {} args["usage"] = "Usage: csv2lyx [options] csvfile [file.lyx]" args["description"] = """This script creates a LyX document containing a table created from a comma-separated-value (CSV) file. The resulting LyX file can be opened with LyX 1.5.0 or any later version. If no options are given csv2lyx will try to infer the CSV type of the csvfile, """ parser = optparse.OptionParser(**args) parser.set_defaults(excel='', column_sep='') parser.add_option("-e", "--excel", metavar="CHAR", help="""CHAR corresponds to a CSV type: 'e': Excel-generated CSV file 't': Excel-generated TAB-delimited CSV file""") parser.add_option("-s", "--separator", dest="column_sep", help= """column separator 't' means Tab""") group = optparse.OptionGroup(parser, "Remarks", """If your CSV file contains special characters (e. g. umlauts, accented letters, etc.) make sure it is coded in UTF-8 (unicode). Else LyX will loose some cell contents. If your CSV file was not written according to the "Common Format and MIME Type for Comma-Separated Values (CSV) Files" (http://tools.ietf.org/html/rfc4180) there may be unexpected results.""") parser.add_option_group(group) (options, args) = parser.parse_args() if len(args) == 1: infile = args[0] fout = sys.stdout elif len(args) ==2: infile = args[0] fout = open(args[1], 'w') else: parser.print_help() sys.exit(1) if not os.path.exists(infile): error('File "%s" not found.' % infile) dialects = {'' : None, 'e' : 'excel', 't' : 'excel-tab'} if options.excel not in dialects: parser.print_help() sys.exit(1) dialect= dialects[options.excel] if options.column_sep == 't': options.column_sep = "\t" if options.column_sep or dialect : reader = csv.reader(open(infile, "rb"), dialect= dialect, delimiter=options.column_sep) else: guesser = csv.Sniffer() input_file = "".join(open(infile,'rb').readlines()) try: dialect = guesser.sniff(input_file) reader = csv.reader(open(infile, "rb"), dialect= dialect) except: reader = csv.reader(open(infile, "rb"), dialect= dialect, delimiter=',') num_cols = 1 rows = [] for row in reader: num_cols = max(num_cols, len(row)) rows.append(row) num_rows = reader.line_num fout.write(header % (num_rows, num_cols)) for i in range(num_cols): fout.write('<column alignment="left" valignment="top" width="0pt">\n') for j in range(num_rows): row = ['<row>'] for i in range(len(rows[j])): row.append( cell % rows[j][i]) for i in range(len(rows[j]), num_cols): row.append(cell % " ") fout.write("\n".join(row) + '\n</row>\n') fout.write(footer)
def error(message): sys.stderr.write(message + '\n') sys.exit(1)
b1faf5366959793a748c24bb8cde052d8931dc1a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/b1faf5366959793a748c24bb8cde052d8931dc1a/csv2lyx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 555, 12, 2150, 4672, 2589, 18, 11241, 18, 2626, 12, 2150, 397, 2337, 82, 6134, 2589, 18, 8593, 12, 21, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 555, 12, 2150, 4672, 2589, 18, 11241, 18, 2626, 12, 2150, 397, 2337, 82, 6134, 2589, 18, 8593, 12, 21, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
try: Util().check_prerequisite_command('losetup') except NotFoundError: sys.exit(1)
Util().check_prerequisite_command('losetup')
def create_loopback(self, image_path):
be99daf4b6f697762bb053d60594aa73fb866280 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12707/be99daf4b6f697762bb053d60594aa73fb866280/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6498, 823, 12, 2890, 16, 1316, 67, 803, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6498, 823, 12, 2890, 16, 1316, 67, 803, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Update handle positions
Update handle positions and also update the resize handle radii and their 'stopper' lengths. @see: self._update_resizeHandle_radius() @see: self._update_resizeHandle_stopper_length()
def updateHandlePositions(self): """ Update handle positions """
b6328deff5eae78e09a343d950096c6bc9067a14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/b6328deff5eae78e09a343d950096c6bc9067a14/DnaSegment_EditCommand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 3259, 11024, 12, 2890, 4672, 3536, 2315, 1640, 6865, 471, 2546, 1089, 326, 7041, 1640, 28125, 471, 3675, 296, 5681, 457, 11, 10917, 18, 632, 5946, 30, 365, 6315, 2725, 67, 15169, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 3259, 11024, 12, 2890, 4672, 3536, 2315, 1640, 6865, 471, 2546, 1089, 326, 7041, 1640, 28125, 471, 3675, 296, 5681, 457, 11, 10917, 18, 632, 5946, 30, 365, 6315, 2725, 67, 15169, 3...
verticalalignment='bottom', horizontalalignment='center', size = pixelToPoint(plot_title_size,dpi), family=prefs['font_family'], fontname=prefs['font']
verticalalignment = 'bottom', horizontalalignment = 'center', size = pixelToPoint( plot_title_size, dpi ), family = prefs['font_family'], fontname = prefs['font']
def draw(self): prefs = self.prefs dpi = self.ax_contain.figure.get_dpi() # Update palette palette = prefs.get('colors',{}) if palette: self.palette.addPalette(palette) xlabel = prefs.get('xlabel','') ylabel = prefs.get('ylabel','') xticks_flag = prefs.get('xticks',True) yticks_flag = prefs.get('yticks',True) text_size = prefs['text_size'] text_padding = prefs['text_padding'] label_text_size = prefs.get('label_text_size',text_size) label_text_size_point = pixelToPoint(label_text_size,dpi) tick_text_size = prefs.get('tick_text_size',text_size) tick_text_size_point = pixelToPoint(tick_text_size,dpi) ytick_length = prefs.get('ytick_length',7*tick_text_size) plot_title = prefs.get('plot_title','') if not plot_title or plot_title == 'NoTitle': plot_title_size = 0 plot_title_padding = 0 else: plot_title_size = prefs.get('plot_title_size',text_size) plot_title_padding = prefs.get('plot_text_padding',text_padding) plot_title_size_point = pixelToPoint(plot_title_size,dpi) stats_flag = prefs.get('statistics_line',False) stats_line = '' stats_line_space = 0. if stats_flag: stats_line = self.gdata.getStatString() stats_line_size = label_text_size stats_line_padding = label_text_size*2. stats_line_space = stats_line_size+stats_line_padding
34ec1e9add6e7beaae414fa998b4771d25b40ccb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/34ec1e9add6e7beaae414fa998b4771d25b40ccb/PlotBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 225, 15503, 273, 365, 18, 1484, 2556, 16361, 273, 365, 18, 651, 67, 28744, 18, 19675, 18, 588, 67, 72, 7259, 1435, 225, 468, 2315, 12127, 12127, 273, 15503, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 225, 15503, 273, 365, 18, 1484, 2556, 16361, 273, 365, 18, 651, 67, 28744, 18, 19675, 18, 588, 67, 72, 7259, 1435, 225, 468, 2315, 12127, 12127, 273, 15503, 18, 5...
extend2(new,newne,newce)
try: extend2(new,newne,newce) except Exception: print "new:",new,newne,newce print "old:",old,ne,ce raise
def extend2(old,ne,ce): """Extend procedure from Bron and Kerbosch""" #print old,ne,ce new=range(ce) minnod,nod=ce,0
9aa175fd5a95c4807bd27710c54b693447f75920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11674/9aa175fd5a95c4807bd27710c54b693447f75920/Multialign.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2133, 22, 12, 1673, 16, 4644, 16, 311, 4672, 3536, 16675, 12131, 628, 605, 1949, 471, 1475, 264, 70, 538, 343, 8395, 468, 1188, 1592, 16, 4644, 16, 311, 394, 33, 3676, 12, 311, 13, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2133, 22, 12, 1673, 16, 4644, 16, 311, 4672, 3536, 16675, 12131, 628, 605, 1949, 471, 1475, 264, 70, 538, 343, 8395, 468, 1188, 1592, 16, 4644, 16, 311, 394, 33, 3676, 12, 311, 13, 1...
self._chunks = newchunks return self._encode_chunks()
return self._encode_chunks(newchunks)
def encode(self): """Encode a message header into an RFC-compliant format.
34ce2bfa48747b0a7f527c61ad82dcfa08c73636 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/34ce2bfa48747b0a7f527c61ad82dcfa08c73636/Header.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2890, 4672, 3536, 5509, 279, 883, 1446, 1368, 392, 8372, 17, 832, 18515, 740, 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...
[ 1, 1, 1, 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, 2017, 12, 2890, 4672, 3536, 5509, 279, 883, 1446, 1368, 392, 8372, 17, 832, 18515, 740, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
this = apply(_quickfix.new_QuoteReqID, args)
this = _quickfix.new_QuoteReqID(*args)
def __init__(self, *args): this = apply(_quickfix.new_QuoteReqID, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 10257, 6113, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 10257, 6113, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
params = {'Size': size, 'Zone' : zone}
params = {'Size': size, 'AvailabilityZone' : zone}
def create_volume(self, size, zone, snapshot=None): """ Create a new EBS Volume.
b505be31639a300e54fa0ca7b5ebfc4dfea54d38 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/b505be31639a300e54fa0ca7b5ebfc4dfea54d38/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 9491, 12, 2890, 16, 963, 16, 4157, 16, 4439, 33, 7036, 4672, 3536, 1788, 279, 394, 512, 12692, 7404, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 9491, 12, 2890, 16, 963, 16, 4157, 16, 4439, 33, 7036, 4672, 3536, 1788, 279, 394, 512, 12692, 7404, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
pkg = create_package(self.project, 'Pkg') self.project.do(FixModuleNames(self.project).get_changes())
pkg = create_package(self.project, 'xkg') self.project.do(FixModuleNames(self.project).get_changes(_fixer))
def test_packages_module_renaming(self): pkg = create_package(self.project, 'Pkg') self.project.do(FixModuleNames(self.project).get_changes()) self.assertFalse(pkg.exists()) self.assertTrue(self.project.get_resource('pkg/__init__.py').exists())
7fed812d78d571f340e6642aadea368f82e54e8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8286/7fed812d78d571f340e6642aadea368f82e54e8d/fixmodnamestest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10308, 67, 2978, 67, 1187, 7772, 12, 2890, 4672, 3475, 273, 752, 67, 5610, 12, 2890, 18, 4406, 16, 296, 92, 14931, 6134, 365, 18, 4406, 18, 2896, 12, 8585, 3120, 1557, 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, 1842, 67, 10308, 67, 2978, 67, 1187, 7772, 12, 2890, 4672, 3475, 273, 752, 67, 5610, 12, 2890, 18, 4406, 16, 296, 92, 14931, 6134, 365, 18, 4406, 18, 2896, 12, 8585, 3120, 1557, 12, ...
cursor.execute(sqlCommand) except MySQLdb.Error: self.conn = self.connect(invalidate = True)
cursor.execute(sqlCommand) except MySQLdb.Error: self.conn = self.connect() self.redo()
def getUnmergedFileList(self, datasetId): """ __getUnmergedFileList__ Get the list of unmerged files associated to a dataset organized by fileblock Arguments: datasetId -- the dataset id in database Return: the list of unmerged files in the dataset
f6d38da4b0910650112bd5df8a6e148fb35b760b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/f6d38da4b0910650112bd5df8a6e148fb35b760b/MergeSensorDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10833, 15459, 26098, 12, 2890, 16, 3709, 548, 4672, 3536, 1001, 588, 984, 15459, 26098, 972, 225, 968, 326, 666, 434, 27013, 1390, 3627, 358, 279, 3709, 15501, 1235, 635, 585, 2629, 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, 10833, 15459, 26098, 12, 2890, 16, 3709, 548, 4672, 3536, 1001, 588, 984, 15459, 26098, 972, 225, 968, 326, 666, 434, 27013, 1390, 3627, 358, 279, 3709, 15501, 1235, 635, 585, 2629, 225, ...
re_nameserver = re.compile(r'nameserver\s([0-9\.]+)$')
def write(self,s): self.wrfun(s) if self.flfun: self.flfun() return
8fb83025efceaf8c02533faae101f66a1eee2ebc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6933/8fb83025efceaf8c02533faae101f66a1eee2ebc/dnsproxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 87, 4672, 365, 18, 91, 5809, 318, 12, 87, 13, 309, 365, 18, 2242, 12125, 30, 365, 18, 2242, 12125, 1435, 327, 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, 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, 1045, 12, 2890, 16, 87, 4672, 365, 18, 91, 5809, 318, 12, 87, 13, 309, 365, 18, 2242, 12125, 30, 365, 18, 2242, 12125, 1435, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
if line[i] == "'": if not in_quote(): in_single_quote = True i += 1 continue elif in_single_quote: in_single_quote = False i += 1 continue elif line[i:i+3] == '"""': if not in_quote(): in_triple_quote = True i += 3 continue elif in_triple_quote: in_triple_quote = False i += 3 continue elif line[i] == '"': if not in_quote(): in_double_quote = True i += 1 continue elif in_double_quote: in_double_quote = False i += 1 continue
if i == 0 or line[i-1] != "\\": if line[i] == "'": if not in_quote(): in_single_quote = True i += 1 continue elif in_single_quote: in_single_quote = False i += 1 continue elif line[i:i+3] == '"""': if not in_quote(): in_triple_quote = True i += 3 continue elif in_triple_quote: in_triple_quote = False i += 3 continue elif line[i] == '"': if not in_quote(): in_double_quote = True i += 1 continue elif in_double_quote: in_double_quote = False i += 1 continue
def wrap_num(i, line, is_real, num_start): zz = line[num_start:i] if is_real or '.' in zz: if zz[-1] == '.' and i < len(line) and line[i].isalpha(): # by popular demand -- this allows, e.g., 173.sqrt(). if '.' in zz[:-1]: O = "RealNumber('"; C="')." else: O = "Integer("; C = ")." zz = zz[:-1] else: O = "RealNumber('"; C="')" else: O = "Integer("; C = ")" line = line[:num_start] + O + zz + C + line[i:] return line, len(O+C)
505bc16cd4f423ce39a655b7dfe0562f2c6cb51d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/505bc16cd4f423ce39a655b7dfe0562f2c6cb51d/preparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 2107, 12, 77, 16, 980, 16, 353, 67, 7688, 16, 818, 67, 1937, 4672, 11273, 273, 980, 63, 2107, 67, 1937, 30, 77, 65, 309, 353, 67, 7688, 578, 2611, 316, 11273, 30, 309, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 2107, 12, 77, 16, 980, 16, 353, 67, 7688, 16, 818, 67, 1937, 4672, 11273, 273, 980, 63, 2107, 67, 1937, 30, 77, 65, 309, 353, 67, 7688, 578, 2611, 316, 11273, 30, 309, 11...
try: return self.__gens.has_key(True) except AttributeError: self.gens() return self.__gens.has_key(True)
return self.__gens.has_key(True)
def gens_certain(self): """ Return True if the generators have been proven correct. """ try: return self.__gens.has_key(True) except AttributeError: self.gens() return self.__gens.has_key(True)
191c8e1d61e26b049ead6a7ffe9599d513e93fe4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/191c8e1d61e26b049ead6a7ffe9599d513e93fe4/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 773, 67, 7593, 530, 12, 2890, 4672, 3536, 2000, 1053, 309, 326, 13327, 1240, 2118, 450, 3995, 3434, 18, 3536, 775, 30, 327, 365, 16186, 23730, 18, 5332, 67, 856, 12, 5510, 13, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 773, 67, 7593, 530, 12, 2890, 4672, 3536, 2000, 1053, 309, 326, 13327, 1240, 2118, 450, 3995, 3434, 18, 3536, 775, 30, 327, 365, 16186, 23730, 18, 5332, 67, 856, 12, 5510, 13, 133...
db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname), 'r') except anydbm.open, error: if error.args[0] != 2: raise
db = self._opendb('journals.%s'%classname, 'r') except anydbm.error, error: if str(error) == "need 'c' or 'n' flag to open new db": return [] elif error.args[0] != 2: raise
def getjournal(self, classname, nodeid): ''' get the journal for id ''' # attempt to open the journal - in some rare cases, the journal may # not exist try: db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname), 'r') except anydbm.open, error: if error.args[0] != 2: raise return [] journal = marshal.loads(db[nodeid]) res = [] for entry in journal: (nodeid, date_stamp, self.journaltag, action, params) = entry date_obj = date.Date(date_stamp) res.append((nodeid, date_obj, self.journaltag, action, params)) return res
cdcc95291c36576dd9ab369f2e2e949fd9f4fe8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cdcc95291c36576dd9ab369f2e2e949fd9f4fe8e/back_anydbm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 22644, 12, 2890, 16, 7479, 16, 756, 350, 4672, 9163, 336, 326, 13001, 364, 612, 9163, 468, 4395, 358, 1696, 326, 13001, 300, 316, 2690, 25671, 6088, 16, 326, 13001, 2026, 468, 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, 336, 22644, 12, 2890, 16, 7479, 16, 756, 350, 4672, 9163, 336, 326, 13001, 364, 612, 9163, 468, 4395, 358, 1696, 326, 13001, 300, 316, 2690, 25671, 6088, 16, 326, 13001, 2026, 468, 486, ...
Assumes cost function is not directly dependent on parameters (in this case - input u).
Assumes cost function is only dependent on state X.
def _shoot(model, start_time, end_time): """ Does a single "shot". Model parameters must be set BEFORE calling this method. @note: Currently written specifically for VDP. @note: Currently only supports inputs. @note: Assumes cost function is not directly dependent on parameters (in this case - input u). @param start_time: The time when simulation should start. @param end_time: The time when the simulation should finish. @return: A tuple consisting of: 1. The cost after simulation. 2. The cost gradient with respect to input U. 3. The final ($t_{tp_0}=1$) simulation states. """ T, ys, sens, params = solve_using_sundials(model, end_time, start_time, sensi=True) u_sens = sens[:][params.u_start:params.u_end] model._jmim.setX_P(ys[-1], 0) model._jmim.setDX_P(model.getDiffs(), 0) cost = model.evalCost() cost_jac = model.getCostJacobian(JMI_DER_X_P) # This assumes that the cost function does not depend on the u:s # which is the case of gradient = N.dot(cost_jac, u_sens.T) gradient = gradient.flatten() last_y = ys[-1][:] return cost, gradient, last_y
733964346bd705d3e3fa78795693f8a99289c936 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/733964346bd705d3e3fa78795693f8a99289c936/shooting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 674, 1632, 12, 2284, 16, 787, 67, 957, 16, 679, 67, 957, 4672, 3536, 9637, 279, 2202, 315, 2415, 9654, 3164, 1472, 1297, 506, 444, 21203, 4440, 333, 707, 18, 225, 632, 7652, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 674, 1632, 12, 2284, 16, 787, 67, 957, 16, 679, 67, 957, 4672, 3536, 9637, 279, 2202, 315, 2415, 9654, 3164, 1472, 1297, 506, 444, 21203, 4440, 333, 707, 18, 225, 632, 7652, 30, ...
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#ifdef __cplusplus
6daeed854b76a664846bc5236af43e73deff42c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/6daeed854b76a664846bc5236af43e73deff42c8/scons_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 1001, 71, 10103, 10103, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 1001, 71, 10103, 10103, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def get_data_files(path, files = []): l = [] for name in os.listdir(path): if name[0] == ".":
def get_data_files(relpath, files=None): files = files or [] for name in os.listdir(os.path.join(BASEDIR, relpath)): if name.startswith("."):
def get_data_files(path, files = []): l = [] for name in os.listdir(path): if name[0] == ".": continue relpath = os.path.join(path, name) f = os.path.join(BASEDIR, relpath) if os.path.isdir(f): get_data_files(relpath, files) elif os.path.isfile(f): l.append(f) pref = sysconfig.get_python_lib()[len(sysconfig.PREFIX) + 1:] files.append((os.path.join(pref, path), l)) return files
53a938452116c30143e60661aa56bd20af6f536f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/53a938452116c30143e60661aa56bd20af6f536f/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1652, 336, 67, 892, 67, 2354, 12, 2878, 803, 16, 1390, 33, 7036, 4672, 1390, 273, 1390, 578, 5378, 364, 508, 316, 1140, 18, 1098, 1214, 12, 538, 18, 803, 18, 5701, 12, 8369, 4537, 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, 225, 1652, 336, 67, 892, 67, 2354, 12, 2878, 803, 16, 1390, 33, 7036, 4672, 1390, 273, 1390, 578, 5378, 364, 508, 316, 1140, 18, 1098, 1214, 12, 538, 18, 803, 18, 5701, 12, 8369, 4537, 16,...
if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and sysconfig.get_config_var('Py_ENABLE_SHARED')):
if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos':
def finalize_options (self): from distutils import sysconfig
523539de5ec2bad125c0fbafb9b02f18d335299a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/523539de5ec2bad125c0fbafb9b02f18d335299a/build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 2890, 4672, 628, 2411, 5471, 1930, 2589, 1425, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 2890, 4672, 628, 2411, 5471, 1930, 2589, 1425, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
text = join(lines[i][1])
text = join(tx.lines[i][1])
def _do_under_lines(i, t_off, tx): y = tx.XtraState.cur_y - i*tx.XtraState.style.leading - tx.XtraState.f.fontSize/8.0 # 8.0 factor copied from para.py text = join(lines[i][1]) textlen = tx._canvas.stringWidth(text, tx._fontname, tx._fontsize) tx._canvas.line(t_off, y, t_off+textlen, y)
05006eb70065415d261e84f00ba1d2566c88a75c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/05006eb70065415d261e84f00ba1d2566c88a75c/paragraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 9341, 67, 3548, 12, 77, 16, 268, 67, 3674, 16, 2229, 4672, 677, 273, 2229, 18, 60, 2033, 1119, 18, 1397, 67, 93, 300, 277, 14, 978, 18, 60, 2033, 1119, 18, 4060, 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, 2896, 67, 9341, 67, 3548, 12, 77, 16, 268, 67, 3674, 16, 2229, 4672, 677, 273, 2229, 18, 60, 2033, 1119, 18, 1397, 67, 93, 300, 277, 14, 978, 18, 60, 2033, 1119, 18, 4060, 18,...
res = self.checkArgumentFormat(path)
res = self.checkArgumentFormat( path )
def putDirectory(self,path): """ Put a local directory to the physical storage together with all its files and subdirectories. """ res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value']
70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 2853, 12, 2890, 16, 803, 4672, 3536, 4399, 279, 1191, 1867, 358, 326, 11640, 2502, 9475, 598, 777, 2097, 1390, 471, 31220, 18, 3536, 400, 273, 365, 18, 1893, 1379, 1630, 12, 589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1378, 2853, 12, 2890, 16, 803, 4672, 3536, 4399, 279, 1191, 1867, 358, 326, 11640, 2502, 9475, 598, 777, 2097, 1390, 471, 31220, 18, 3536, 400, 273, 365, 18, 1893, 1379, 1630, 12, 589, ...
tx.setXPos(offset) text = string.join(words)
setXPos(tx,offset) text = join(words)
def _justifyDrawParaLine( tx, offset, extraspace, words, last=0): tx.setXPos(offset) text = string.join(words) if last: #last one, left align tx._textOut(text,1) else: nSpaces = len(words)-1 if nSpaces: tx.setWordSpace(extraspace / float(nSpaces)) tx._textOut(text,1) tx.setWordSpace(0) else: tx._textOut(text,1)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3732, 1164, 6493, 23529, 1670, 12, 2229, 16, 1384, 16, 11875, 909, 16, 4511, 16, 1142, 33, 20, 4672, 23733, 1616, 12, 978, 16, 3348, 13, 977, 225, 273, 1233, 12, 3753, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3732, 1164, 6493, 23529, 1670, 12, 2229, 16, 1384, 16, 11875, 909, 16, 4511, 16, 1142, 33, 20, 4672, 23733, 1616, 12, 978, 16, 3348, 13, 977, 225, 273, 1233, 12, 3753, 13, 309, ...
text = replaceExcept(text, categoryR, '', ['nowiki', 'comment', 'math', 'pre'])
text = replaceExcept(text, categoryR, '', ['nowiki', 'comment', 'math', 'pre'], marker = marker)
def removeCategoryLinks(text, site): """Given the wiki-text of a page, return that page with all category links removed. """ # This regular expression will find every link that is possibly an # interwiki link, plus trailing whitespace. The language code is grouped. # NOTE: This assumes that language codes only consist of non-capital # ASCII letters and hyphens. catNamespace = '|'.join(site.category_namespaces()) categoryR = re.compile(r'\[\[\s*(%s)\s*:.*?\]\][\s]*' % catNamespace) text = replaceExcept(text, categoryR, '', ['nowiki', 'comment', 'math', 'pre']) return normalWhitespace(text)
f9c80ef99f35a24fb3c47761699987c6879700b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/f9c80ef99f35a24fb3c47761699987c6879700b2/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 4457, 7100, 12, 955, 16, 2834, 4672, 3536, 6083, 326, 9050, 17, 955, 434, 279, 1363, 16, 327, 716, 1363, 598, 777, 3150, 4716, 3723, 18, 3536, 468, 1220, 6736, 2652, 903, 1104, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 4457, 7100, 12, 955, 16, 2834, 4672, 3536, 6083, 326, 9050, 17, 955, 434, 279, 1363, 16, 327, 716, 1363, 598, 777, 3150, 4716, 3723, 18, 3536, 468, 1220, 6736, 2652, 903, 1104, 3...
self.body.append('"%s" @ExternalLink { ' % node['refuri'])
self.body.append('{"%s"} @ExternalLink { ' % node['refuri'])
def visit_reference(self, node): if node.has_key('refuri'): self.body.append('"%s" @ExternalLink { ' % node['refuri']) return elif node.has_key('refid'): href = node['refid'] elif node.has_key('refname'): href = node['refid'] = self.document.nameids[node['refname']] self.body.append('%s @CrossLink { ' % href)
7123a9bf4e3df3d0330f584f8ddb098c789b0185 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/7123a9bf4e3df3d0330f584f8ddb098c789b0185/lout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6180, 12, 2890, 16, 756, 4672, 309, 756, 18, 5332, 67, 856, 2668, 1734, 1650, 11, 4672, 365, 18, 3432, 18, 6923, 2668, 16711, 9, 87, 6, 97, 632, 6841, 2098, 288, 296, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6180, 12, 2890, 16, 756, 4672, 309, 756, 18, 5332, 67, 856, 2668, 1734, 1650, 11, 4672, 365, 18, 3432, 18, 6923, 2668, 16711, 9, 87, 6, 97, 632, 6841, 2098, 288, 296, 738, ...
elif compiler[:3] == "gcc" or compiler[:3] == "g++": return "-Wl,-R" + dir
elif sys.platform[:5] == "hp-ux": return "+s -L" + dir elif compiler[:3] == "gcc" or compiler[:3] == "g++": return "-Wl,-R" + dir
def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php # ?func=detail&aid=445902&group_id=5470&atid=105470 # Linkers on different platforms need different options to # specify that directories need to be added to the list of # directories searched for dependencies when a dynamic library # is sought. GCC has to be told to pass the -R option through # to the linker, whereas other compilers just know this. # Other compilers may need something slightly different. At # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so # we use this hack. compiler = os.path.basename(sysconfig.get_config_var("CC")) if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif compiler[:3] == "gcc" or compiler[:3] == "g++": return "-Wl,-R" + dir else: return "-R" + dir
b71bcb632260fdb2ee80a45ddce2c724f66edb4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b71bcb632260fdb2ee80a45ddce2c724f66edb4c/unixccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3099, 67, 12083, 67, 1214, 67, 3482, 12, 2890, 16, 1577, 4672, 468, 11329, 670, 484, 1468, 16, 622, 326, 8572, 4520, 18, 225, 2164, 6600, 7934, 468, 6334, 6162, 3103, 30, 468, 1062, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3099, 67, 12083, 67, 1214, 67, 3482, 12, 2890, 16, 1577, 4672, 468, 11329, 670, 484, 1468, 16, 622, 326, 8572, 4520, 18, 225, 2164, 6600, 7934, 468, 6334, 6162, 3103, 30, 468, 1062, 22...
if deps or self.always_copy: log.info("Processing dependencies for %s", requirement) else: return if self.always_copy: for req in dist.requires(requirement.extras): if req.key not in self.installed_projects: self.easy_install(req) return
elif requirement is not None and dist.key != requirement.key: log.warn("Skipping dependencies for %s", dist) return if requirement is None or dist not in requirement: distreq = dist.as_requirement() requirement = Requirement( distreq.project_name, distreq.specs, requirement.extras ) log.info("Processing dependencies for %s", requirement)
def process_distribution(self, requirement, dist, deps=True, *info): self.update_pth(dist) self.package_index.add(dist) self.local_index.add(dist) self.install_egg_scripts(dist) self.installed_projects[dist.key] = dist log.warn(self.installation_report(dist, *info))
a7477dea697437bdd96bede179913c9d5b9b1220 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/a7477dea697437bdd96bede179913c9d5b9b1220/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 16279, 12, 2890, 16, 12405, 16, 2411, 16, 8740, 33, 5510, 16, 380, 1376, 4672, 365, 18, 2725, 67, 2397, 12, 4413, 13, 365, 18, 5610, 67, 1615, 18, 1289, 12, 4413, 13, 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, 1207, 67, 16279, 12, 2890, 16, 12405, 16, 2411, 16, 8740, 33, 5510, 16, 380, 1376, 4672, 365, 18, 2725, 67, 2397, 12, 4413, 13, 365, 18, 5610, 67, 1615, 18, 1289, 12, 4413, 13, 365, ...
visit_author = depart_author = lambda self,node: None visit_authors = depart_authors = lambda self,node: None
def visit_author(self, node): raise nodes.SkipNode def visit_authors(self, node): raise nodes.SkipNode
def depart_attention(self, node): self.body.append('</note>\n')
81818dd428bfab36de0c7775dcdb742978a01329 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/81818dd428bfab36de0c7775dcdb742978a01329/docbook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 17899, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 1757, 7652, 5333, 82, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 17899, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 1757, 7652, 5333, 82, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def commit_factory(classes_mappaths, base_dir=None, message=None):
def commit_factory(paths, base_dir=None, message=None):
def commit_factory(classes_mappaths, base_dir=None, message=None): guess = rabbitvcs.vcs.guess(paths[0]) return classes_map[guess["vcs"]](paths, base_dir, message)
3a023bd3da4663528b1b1cf368d97ceefc5d4655 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/3a023bd3da4663528b1b1cf368d97ceefc5d4655/commit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 67, 6848, 12, 4481, 16, 1026, 67, 1214, 33, 7036, 16, 883, 33, 7036, 4672, 7274, 273, 767, 70, 3682, 18982, 18, 18982, 18, 20885, 12, 4481, 63, 20, 5717, 327, 3318, 67, 1458, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 67, 6848, 12, 4481, 16, 1026, 67, 1214, 33, 7036, 16, 883, 33, 7036, 4672, 7274, 273, 767, 70, 3682, 18982, 18, 18982, 18, 20885, 12, 4481, 63, 20, 5717, 327, 3318, 67, 1458, 6...
if acl.acl == 'approveacls' and acl.status == self.approvedStatus.statuscodeid:
if acl.acl == 'approveacls' and acl.status == self.approvedStatus:
def name(self, packageName, collectionName=None, collectionVersion=None): '''Retrieve Packages by their name.
7186138b2e9701a82eb880f695da6eebeb0fe918 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/7186138b2e9701a82eb880f695da6eebeb0fe918/packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 2890, 16, 9929, 16, 17137, 33, 7036, 16, 1849, 1444, 33, 7036, 4672, 9163, 5767, 7930, 1023, 635, 3675, 508, 18, 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, 508, 12, 2890, 16, 9929, 16, 17137, 33, 7036, 16, 1849, 1444, 33, 7036, 4672, 9163, 5767, 7930, 1023, 635, 3675, 508, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if name in local_scope: if name.__class__.__name__ == 'ModuleProxy': local_scope[name] = mod elif name in global_scope: if name.__class__.__name__ == 'ModuleProxy': global_scope[name] = mod
moduleParts = name.split('.') names = [ '.'.join(moduleParts[-x:]) for x in range(len(moduleParts)) ] for modulePart in names: if modulePart in local_scope: if local_scope[modulePart].__class__.__name__ == 'ModuleProxy': if pathname in repr(local_scope[modulePart]): local_scope[modulePart] = mod if modulePart in global_scope: if global_scope[modulePart].__class__.__name__ == 'ModuleProxy': if pathname in repr(global_scope[modulePart]): global_scope[modulePart] = mod
def _loadModule(): """ Load the given module, and insert it into the parent scope, and also the original importing scope. """
ba626e0dc02e59a404d31809c3224ca3f6e744e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/ba626e0dc02e59a404d31809c3224ca3f6e744e5/importer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 3120, 13332, 3536, 4444, 326, 864, 1605, 16, 471, 2243, 518, 1368, 326, 982, 2146, 16, 471, 2546, 326, 2282, 25077, 2146, 18, 3536, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 3120, 13332, 3536, 4444, 326, 864, 1605, 16, 471, 2243, 518, 1368, 326, 982, 2146, 16, 471, 2546, 326, 2282, 25077, 2146, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100,...
"python setup.py install " "--root=$RPM_BUILD_ROOT " "--record=INSTALLED_FILES"),
("%s setup.py install " "--root=$RPM_BUILD_ROOT " "--record=INSTALLED_FILES") % self.python),
def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). """ # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version(), '%define release ' + self.release, '', 'Summary: ' + self.distribution.get_description(), ]
64988d2ae018b34f23a3cbdc33a117147f1438da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/64988d2ae018b34f23a3cbdc33a117147f1438da/bdist_rpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 2793, 67, 768, 12, 2890, 4672, 3536, 4625, 326, 977, 434, 392, 534, 12728, 857, 585, 471, 327, 518, 487, 279, 666, 434, 2064, 261, 476, 1534, 980, 2934, 3536, 468, 6377,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6540, 67, 2793, 67, 768, 12, 2890, 4672, 3536, 4625, 326, 977, 434, 392, 534, 12728, 857, 585, 471, 327, 518, 487, 279, 666, 434, 2064, 261, 476, 1534, 980, 2934, 3536, 468, 6377,...
if not queued_recipes() and not scheduled_recipes():
queued = queued_recipes() scheduled = scheduled_recipes(): if not queued and not scheduled:
def schedule(): bkr.server.scheduler._start_scheduler() log.debug("starting new recipes Thread") # Create new_recipes Thread add_onetime_task(action=new_recipes_loop, args=[lambda:datetime.now()]) log.debug("starting processed recipes Thread") # Create processed_recipes Thread add_onetime_task(action=processed_recipesets_loop, args=[lambda:datetime.now()], initialdelay=5) #log.debug("starting queued recipes Thread") # Create queued_recipes Thread #add_onetime_task(action=queued_recipes_loop, # args=[lambda:datetime.now()], # initialdelay=10) log.debug("starting scheduled recipes Thread") # Run scheduled_recipes in this process while True: if not queued_recipes() and not scheduled_recipes(): time.sleep(20)
b083cd828ccbf257d265b4591ce5c8722670e9ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14755/b083cd828ccbf257d265b4591ce5c8722670e9ed/beakerd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4788, 13332, 22723, 86, 18, 3567, 18, 19972, 6315, 1937, 67, 19972, 1435, 613, 18, 4148, 2932, 18526, 394, 5863, 281, 4884, 7923, 468, 1788, 394, 67, 266, 3449, 281, 4884, 527, 67, 265, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 22723, 86, 18, 3567, 18, 19972, 6315, 1937, 67, 19972, 1435, 613, 18, 4148, 2932, 18526, 394, 5863, 281, 4884, 7923, 468, 1788, 394, 67, 266, 3449, 281, 4884, 527, 67, 265, ...
container = self.get_handler(path)
self.get_handler(path)
def has_handler(self, path): # Be sure path is a Path if not isinstance(path, Path): path = Path(path)
ac6a508574d14b125e271cb6d5cc4ec4e0e9f2a2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/ac6a508574d14b125e271cb6d5cc4ec4e0e9f2a2/folder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 4176, 12, 2890, 16, 589, 4672, 468, 4823, 3071, 589, 353, 279, 2666, 309, 486, 1549, 12, 803, 16, 2666, 4672, 589, 273, 2666, 12, 803, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 4176, 12, 2890, 16, 589, 4672, 468, 4823, 3071, 589, 353, 279, 2666, 309, 486, 1549, 12, 803, 16, 2666, 4672, 589, 273, 2666, 12, 803, 13, 2, -100, -100, -100, -100, -100, -...
arch.set_promisc(self.ins, i, 0)
set_promisc(self.ins, i, 0)
def close(self): if self.promisc: for i in self.iff: arch.set_promisc(self.ins, i, 0) SuperSocket.close(self)
14c74c45cca1c3048391b67bd41fd3df4f699bde /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7311/14c74c45cca1c3048391b67bd41fd3df4f699bde/linux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 309, 365, 18, 17401, 291, 71, 30, 364, 277, 316, 365, 18, 3048, 30, 444, 67, 17401, 291, 71, 12, 2890, 18, 2679, 16, 277, 16, 374, 13, 14845, 4534, 18, 4412, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 309, 365, 18, 17401, 291, 71, 30, 364, 277, 316, 365, 18, 3048, 30, 444, 67, 17401, 291, 71, 12, 2890, 18, 2679, 16, 277, 16, 374, 13, 14845, 4534, 18, 4412, ...
dleft_col.set_sort_column_id (self.TASKS_TV_COL_DLEFT)
dleft_col.set_sort_column_id (self.TASK_MODEL_DLEFT)
def __create_task_tview(self):
b116e0ff61274cec3f885f83e48088d3089ac749 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/b116e0ff61274cec3f885f83e48088d3089ac749/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 4146, 67, 88, 1945, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 4146, 67, 88, 1945, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 191) else quickfix.DoubleField.__init__(self, 191, 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, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 5342, 21, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 5342, 21, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
double_window=None, gi_list='(None)', expect='10',
double_window=None, gi_list='(None)', list_org = None, expect='10',
def blast(program, datalib, sequence, input_type='Sequence in FASTA format', double_window=None, gi_list='(None)', expect='10', filter='L', genetic_code='Standard (1)', mat_param='PAM30 9 1', other_advanced=None, ncbi_gi=None, overview=None, alignment_view='0', descriptions=None, alignments=None, email=None, path=None, html=None, cgi='http://www.ncbi.nlm.nih.gov/blast/blast.cgi', timeout=20 ): """blast(program, datalib, sequence, input_type='Sequence in FASTA format', double_window=None, gi_list='(None)', expect='10', filter='L', genetic_code='Standard (1)', mat_param='PAM30 9 1', other_advanced=None, ncbi_gi=None, overview=None, alignment_view='0', descriptions=None, alignments=None, email=None, path=None, html=None, cgi='http://www.ncbi.nlm.nih.gov/blast/blast.cgi', timeout=20) -> handle Do a BLAST search against NCBI. Returns a handle to the results. timeout is the number of seconds to wait for the results before timing out. The other parameters are provided to BLAST. A description can be found online at: http://www.ncbi.nlm.nih.gov/BLAST/newoptions.html """ # NCBI Blast is hard to work with. The user enters a query, and then # it returns a "reference" page which contains a button that the user # clicks to retrieve the results. This will retrieve the "results" # page. However, this page may not contain BLAST results if the # search isn't done. # This function will send off the query and parse the reference # page to figure out how to retrieve the results. Then, it needs to # check the results to see if the search has been finished. params = {'PROGRAM' : program, 'DATALIB' : datalib, 'SEQUENCE' : sequence, 'DOUBLE_WINDOW' : double_window, 'INPUT_TYPE' : input_type, 'EXPECT' : expect, 'FILTER' : filter, 'GENETIC_CODE' : genetic_code, 'MAT_PARAM' : mat_param, 'OTHER_ADVANCED' : other_advanced, 'NCBI_GI' : ncbi_gi, 'OVERVIEW' : overview, 'ALIGNMENT_VIEW' : alignment_view, 'DESCRIPTIONS' : descriptions, 'ALIGNMENTS' : alignments, 'EMAIL' : email, 'PATH' : path, 'HTML' : html } variables = {} for k in params.keys(): if params[k] is not None: variables[k] = str(params[k]) # This returns a handle to the HTML file that points to the results. handle = NCBI._open(cgi, variables, get=0) # Now parse the HTML from the handle and figure out how to retrieve # the results. refcgi, params = _parse_blast_ref_page(handle, cgi) start = time.time() while 1: # Sometimes the BLAST results aren't done yet. Look at the page # to see if the results are there. If not, then try again later. handle = NCBI._open(cgi, params, get=0) ready, results, refresh_delay = _parse_blast_results_page(handle) if ready: break # Time out if it's not done after timeout minutes. if time.time() - start > timeout*60: raise IOError, "timed out after %d minutes" % timeout # pause and try again. time.sleep(refresh_delay) return File.UndoHandle(File.StringHandle(results))
9d7ccb5ff588731f0c906f580bd39af30d8291bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/9d7ccb5ff588731f0c906f580bd39af30d8291bc/NCBIWWW.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19047, 12, 12890, 16, 18462, 495, 16, 3102, 16, 810, 67, 723, 2218, 4021, 316, 24239, 37, 740, 2187, 1645, 67, 5668, 33, 7036, 16, 16221, 67, 1098, 2218, 12, 7036, 13, 2187, 666, 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, 19047, 12, 12890, 16, 18462, 495, 16, 3102, 16, 810, 67, 723, 2218, 4021, 316, 24239, 37, 740, 2187, 1645, 67, 5668, 33, 7036, 16, 16221, 67, 1098, 2218, 12, 7036, 13, 2187, 666, 67, ...
def spikes_to_signal_1D(fs, spikes, tmax=None):
def _spikes_to_signal(fs, spikes, tmax=None):
def signal_to_spikes(fs, signals): """ Convert time functions to a list of spike trains. fs: samping frequency in Hz signals: input signals return: spike trains with spike timings >>> fs = 10 >>> s = np.array([[0,0,0,1,0,0], [0,2,1,0,0,0]]).T >>> signal_to_spikes(fs, s) [array([ 300.]), array([ 100., 100., 200.])] """ spike_trains = [] if signals.ndim == 1: spike_trains = [ signal_to_spikes_1D(fs, signals) ] elif signals.ndim == 2: spike_trains = [ signal_to_spikes_1D(fs, signal) for signal in signals.T ] else: assert False return spike_trains
2ab363a56510bc9bbc386e65baeaf98d22b44ad8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7039/2ab363a56510bc9bbc386e65baeaf98d22b44ad8/_thorns.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4277, 67, 869, 67, 1752, 25235, 12, 2556, 16, 11505, 4672, 3536, 4037, 813, 4186, 358, 279, 666, 434, 28883, 1284, 2679, 18, 225, 2662, 30, 10747, 310, 8670, 316, 670, 94, 11505, 30, 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, 4277, 67, 869, 67, 1752, 25235, 12, 2556, 16, 11505, 4672, 3536, 4037, 813, 4186, 358, 279, 666, 434, 28883, 1284, 2679, 18, 225, 2662, 30, 10747, 310, 8670, 316, 670, 94, 11505, 30, 8...
finally: gc.restore_state()
def _render(self, gc, pts): gc.save_state() gc.clip_to_rect(self.x, self.y, self.width, self.height) try: if not self.index: gc.restore_state() return name = self.selection_metadata_name md = self.index.metadata if name in md and md[name] is not None and len(md[name]) > 0: # FIXME: when will we ever encounter multiple masks in the list? sel_mask = md[name][0] sel_pts = np.compress(sel_mask, pts, axis=0) unsel_pts = np.compress(~sel_mask, pts, axis=0) color = list(self.color_) color[3] *= self.unselected_alpha outline_color = list(self.outline_color_) outline_color[3] *= self.unselected_alpha if unsel_pts.size > 0: self.render_markers_func(gc, unsel_pts, self.marker, self.marker_size, tuple(color), self.unselected_line_width, tuple(outline_color), self.custom_symbol) if sel_pts.size > 0: self.render_markers_func(gc, sel_pts, self.marker, self.marker_size, self.selected_color_, self.line_width, self.outline_color_, self.custom_symbol) else: self.render_markers_func(gc, pts, self.marker, self.marker_size, self.color_, self.line_width, self.outline_color_, self.custom_symbol) finally: gc.restore_state()
eb2be8757a6eaafdc44773a74ea51807fee895a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13167/eb2be8757a6eaafdc44773a74ea51807fee895a7/jitterplot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 12, 2890, 16, 8859, 16, 13397, 4672, 8859, 18, 5688, 67, 2019, 1435, 8859, 18, 14161, 67, 869, 67, 2607, 12, 2890, 18, 92, 16, 365, 18, 93, 16, 365, 18, 2819, 16, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 12, 2890, 16, 8859, 16, 13397, 4672, 8859, 18, 5688, 67, 2019, 1435, 8859, 18, 14161, 67, 869, 67, 2607, 12, 2890, 18, 92, 16, 365, 18, 93, 16, 365, 18, 2819, 16, 365, 1...
self.serverProxy.removeFileInfo(self.cnxId, unicode(filename, self.filesystemEncoding))
self.serverProxy.removeFileInfo(self.cnxId, filename)
def purgeFiles(self,fileset): for filename in fileset: if self.verbose: print "Requesting unindexation of %s" % filename self.serverProxy.removeFileInfo(self.cnxId, unicode(filename, self.filesystemEncoding)) if self.verbose: print "Requesting cleanup of unreferenced documents" self.serverProxy.removeUnreferencedDocuments(self.cnxId)
ae82a70867b9703a112398a06be6d55e1f353b36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2259/ae82a70867b9703a112398a06be6d55e1f353b36/indexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 2697, 12, 2890, 16, 2354, 278, 4672, 364, 1544, 316, 1390, 278, 30, 309, 365, 18, 11369, 30, 1172, 315, 691, 310, 640, 1615, 367, 434, 738, 87, 6, 738, 1544, 365, 18, 3567, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 2697, 12, 2890, 16, 2354, 278, 4672, 364, 1544, 316, 1390, 278, 30, 309, 365, 18, 11369, 30, 1172, 315, 691, 310, 640, 1615, 367, 434, 738, 87, 6, 738, 1544, 365, 18, 3567, 38...
oid = id(module) if oid in _introspecting: return _introspecting[oid]
def introspect_module(module): """ Add API documentation information about the module C{module} to C{module_doc}. """ oid = id(module) if oid in _introspecting: return _introspecting[oid] # Create the ModuleDoc module_doc = ModuleDoc(pyval=module, repr=value_repr(module), canonical_name = get_canonical_name(module)) _introspecting[oid] = module_doc # Record the module's docstring & docformat. if hasattr(module, '__doc__'): module_doc.docstring = get_docstring(module) if hasattr(module, '__docformat__'): module_doc.docformat = unicode(module.__docformat__) # Record the module's __all__ attribute (public names). if hasattr(module, '__all__'): try: public_names = Set([str(name) for name in module.__all__]) for name, var_doc in module_doc.variables.items(): if name in public_names: var_doc.is_public = True if not isinstance(var_doc, ModuleDoc): var_doc.is_imported = False else: var_doc.is_public = False except: pass # Record the module's filename if hasattr(module, '__file__'): try: module_doc.filename = unicode(module.__file__) except: pass # If the module has a __path__, then it's (probably) a # package; so set is_package=True and record its __path__. if hasattr(module, '__path__'): module_doc.is_package = True try: module_doc.path = [unicode(p) for p in module.__path__] except: pass else: module_doc.is_package = False # Make sure we have a name for the package. dotted_name = module_doc.canonical_name if dotted_name is UNKNOWN: dotted_name = DottedName(module.__name__) # Record the module's parent package, if it has one. if len(dotted_name) > 1: package_name = str(dotted_name.container()) package = sys.modules.get(package_name) if package is not None: module_doc.package = introspect_docs(package) else: module_doc.package = None # Initialize the submodules property module_doc.submodules = [] # Add the module to its parent package's submodules list. if module_doc.package not in (None, UNKNOWN): module_doc.package.submodules.append(module_doc) # Record the module's variables. module_doc.variables = {} for child_name in dir(module): if child_name in UNDOCUMENTED_MODULE_VARS: continue child = getattr(module, child_name) # Create a VariableDoc for the child, and introspect its # value if it's defined in this module. container = get_containing_module(child) if container != None and container == module_doc.canonical_name: # Local variable. child_val_doc = introspect_docs(child, context=module_doc) child_var_doc = VariableDoc(name=child_name, value=child_val_doc, is_imported=False, container=module_doc) elif container is None or module_doc.canonical_name is UNKNOWN: # Possibly imported variable. child_val_doc = introspect_docs(child, context=module_doc) child_var_doc = VariableDoc(name=child_name, value=child_val_doc, container=module_doc) else: # Imported variable. child_val_doc = _get_valuedoc(child) child_var_doc = VariableDoc(name=child_name, value=child_val_doc, is_imported=True, container=module_doc) module_doc.variables[child_name] = child_var_doc return module_doc
8306498614e7db9ddd2c5e78aa700eded3f33a2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/8306498614e7db9ddd2c5e78aa700eded3f33a2e/docintrospecter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30165, 67, 2978, 12, 2978, 4672, 3536, 1436, 1491, 7323, 1779, 2973, 326, 1605, 385, 95, 2978, 97, 358, 385, 95, 2978, 67, 2434, 5496, 3536, 468, 1788, 326, 5924, 1759, 1605, 67, 2434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30165, 67, 2978, 12, 2978, 4672, 3536, 1436, 1491, 7323, 1779, 2973, 326, 1605, 385, 95, 2978, 97, 358, 385, 95, 2978, 67, 2434, 5496, 3536, 468, 1788, 326, 5924, 1759, 1605, 67, 2434, ...
builtin = dict(int=int, long=long, float=float, complex=complex)
def call_function(self, func, *args): return func(*args)
be293e90428d03ba0f8853a112969d284759f0fd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/be293e90428d03ba0f8853a112969d284759f0fd/fakes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 915, 12, 2890, 16, 1326, 16, 380, 1968, 4672, 327, 1326, 30857, 1968, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 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, 745, 67, 915, 12, 2890, 16, 1326, 16, 380, 1968, 4672, 327, 1326, 30857, 1968, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
where |*|_2 is the 2 norm of its argument *.
where :math:`|*|_2` is the 2-norm of its argument *.
def cdist(XA, XB, metric='euclidean', p=2, V=None, VI=None, w=None): r""" Computes distance between each pair of observation vectors in the Cartesian product of two collections of vectors. ``XA`` is a :math:`m_A` by :math:`n` array while ``XB`` is a :math:`m_B` by :math:`n` array. A :math:`m_A` by :math:`m_B` array is returned. An exception is thrown if ``XA`` and ``XB`` do not have the same number of columns. A rectangular distance matrix ``Y`` is returned. For each :math:`i` and :math:`j`, the metric ``dist(u=XA[i], v=XB[j])`` is computed and stored in the :math:`ij` th entry. The following are common calling conventions: 1. ``Y = cdist(XA, XB, 'euclidean')`` Computes the distance between :math:`m` points using Euclidean distance (2-norm) as the distance metric between the points. The points are arranged as :math:`m` :math:`n`-dimensional row vectors in the matrix X. 2. ``Y = cdist(XA, XB, 'minkowski', p)`` Computes the distances using the Minkowski distance :math:`||u-v||_p` (:math:`p`-norm) where :math:`p \geq 1`. 3. ``Y = cdist(XA, XB, 'cityblock')`` Computes the city block or Manhattan distance between the points. 4. ``Y = cdist(XA, XB, 'seuclidean', V=None)`` Computes the standardized Euclidean distance. The standardized Euclidean distance between two n-vectors ``u`` and ``v`` is .. math:: \sqrt{\sum {(u_i-v_i)^2 / V[x_i]}}. V is the variance vector; V[i] is the variance computed over all the i'th components of the points. If not passed, it is automatically computed. 5. ``Y = cdist(XA, XB, 'sqeuclidean')`` Computes the squared Euclidean distance ||u-v||_2^2 between the vectors. 6. ``Y = cdist(XA, XB, 'cosine')`` Computes the cosine distance between vectors u and v, .. math:: \frac{1 - uv^T} {{|u|}_2 {|v|}_2} where |*|_2 is the 2 norm of its argument *. 7. ``Y = cdist(XA, XB, 'correlation')`` Computes the correlation distance between vectors u and v. This is .. math:: \frac{1 - (u - n{|u|}_1){(v - n{|v|}_1)}^T} {{|(u - n{|u|}_1)|}_2 {|(v - n{|v|}_1)|}^T} where :math:`|*|_1` is the Manhattan (or 1-norm) of its argument, and :math:`n` is the common dimensionality of the vectors. 8. ``Y = cdist(XA, XB, 'hamming')`` Computes the normalized Hamming distance, or the proportion of those vector elements between two n-vectors ``u`` and ``v`` which disagree. To save memory, the matrix ``X`` can be of type boolean. 9. ``Y = cdist(XA, XB, 'jaccard')`` Computes the Jaccard distance between the points. Given two vectors, ``u`` and ``v``, the Jaccard distance is the proportion of those elements ``u[i]`` and ``v[i]`` that disagree where at least one of them is non-zero. 10. ``Y = cdist(XA, XB, 'chebyshev')`` Computes the Chebyshev distance between the points. The Chebyshev distance between two n-vectors ``u`` and ``v`` is the maximum norm-1 distance between their respective elements. More precisely, the distance is given by .. math:: d(u,v) = max_i {|u_i-v_i|}. 11. ``Y = cdist(XA, XB, 'canberra')`` Computes the Canberra distance between the points. The Canberra distance between two points ``u`` and ``v`` is .. math:: d(u,v) = \sum_u {|u_i-v_i|} {|u_i|+|v_i|} 12. ``Y = cdist(XA, XB, 'braycurtis')`` Computes the Bray-Curtis distance between the points. The Bray-Curtis distance between two points ``u`` and ``v`` is .. math:: d(u,v) = \frac{\sum_i {u_i-v_i}} {\sum_i {u_i+v_i}} 13. ``Y = cdist(XA, XB, 'mahalanobis', VI=None)`` Computes the Mahalanobis distance between the points. The Mahalanobis distance between two points ``u`` and ``v`` is :math:`(u-v)(1/V)(u-v)^T` where :math:`(1/V)` (the ``VI`` variable) is the inverse covariance. If ``VI`` is not None, ``VI`` will be used as the inverse covariance matrix. 14. ``Y = cdist(XA, XB, 'yule')`` Computes the Yule distance between each pair of boolean vectors. (see yule function documentation) 15. ``Y = cdist(XA, 'matching')`` Computes the matching distance between each pair of boolean vectors. (see matching function documentation) 16. ``Y = cdist(XA, 'dice')`` Computes the Dice distance between each pair of boolean vectors. (see dice function documentation) 17. ``Y = cdist(XA, XB, 'kulsinski')`` Computes the Kulsinski distance between each pair of boolean vectors. (see kulsinski function documentation) 18. ``Y = cdist(XA, XB, 'rogerstanimoto')`` Computes the Rogers-Tanimoto distance between each pair of boolean vectors. (see rogerstanimoto function documentation) 19. ``Y = cdist(XA, XB, 'russellrao')`` Computes the Russell-Rao distance between each pair of boolean vectors. (see russellrao function documentation) 20. ``Y = cdist(XA, XB, 'sokalmichener')`` Computes the Sokal-Michener distance between each pair of boolean vectors. (see sokalmichener function documentation) 21. ``Y = cdist(XA, XB, 'sokalsneath')`` Computes the Sokal-Sneath distance between the vectors. (see sokalsneath function documentation) 22. ``Y = cdist(XA, XB, 'wminkowski')`` Computes the weighted Minkowski distance between the vectors. (see sokalsneath function documentation) 23. ``Y = cdist(XA, XB, f)`` Computes the distance between all pairs of vectors in X using the user supplied 2-arity function f. For example, Euclidean distance between the vectors could be computed as follows:: dm = cdist(XA, XB, (lambda u, v: np.sqrt(((u-v)*(u-v).T).sum()))) Note that you should avoid passing a reference to one of the distance functions defined in this library. For example,:: dm = cdist(XA, XB, sokalsneath) would calculate the pair-wise distances between the vectors in X using the Python function sokalsneath. This would result in sokalsneath being called :math:`{n \choose 2}` times, which is inefficient. Instead, the optimized C version is more efficient, and we call it using the following syntax.:: dm = cdist(XA, XB, 'sokalsneath') :Parameters: XA : ndarray An :math:`m_A` by :math:`n` array of :math:`m_A` original observations in an :math:`n`-dimensional space. XB : ndarray An :math:`m_B` by :math:`n` array of :math:`m_B` original observations in an :math:`n`-dimensional space. metric : string or function The distance metric to use. The distance function can be 'braycurtis', 'canberra', 'chebyshev', 'cityblock', 'correlation', 'cosine', 'dice', 'euclidean', 'hamming', 'jaccard', 'kulsinski', 'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto', 'russellrao', 'seuclidean', 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'wminkowski', 'yule'. w : ndarray The weight vector (for weighted Minkowski). p : double The p-norm to apply (for Minkowski, weighted and unweighted) V : ndarray The variance vector (for standardized Euclidean). VI : ndarray The inverse of the covariance matrix (for Mahalanobis). :Returns: Y : ndarray A :math:`m_A` by :math:`m_B` distance matrix. """
dcffe95513dbb5a464da95e7b7240d3d4fbb8311 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/dcffe95513dbb5a464da95e7b7240d3d4fbb8311/distance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 4413, 12, 17269, 16, 1139, 38, 16, 3999, 2218, 73, 22392, 2187, 293, 33, 22, 16, 776, 33, 7036, 16, 12596, 33, 7036, 16, 341, 33, 7036, 4672, 436, 8395, 14169, 281, 3888, 3086, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 4413, 12, 17269, 16, 1139, 38, 16, 3999, 2218, 73, 22392, 2187, 293, 33, 22, 16, 776, 33, 7036, 16, 12596, 33, 7036, 16, 341, 33, 7036, 4672, 436, 8395, 14169, 281, 3888, 3086, ...
os.popen("perl create-ovp.perl gregoria")
system("perl create-ovp.perl gregoria")
def finishCreation(): for i in range(9): print "tftopl gregoria-%d.tfm gregoria-%d.pl" % (i,i) os.popen("tftopl gregoria-%d.tfm gregoria-%d.pl" % (i,i)) print "perl create-ovp.perl gregoria" os.popen("perl create-ovp.perl gregoria") print "ovp2ovf gregoria.ovp gregoria.ovf gregoria.ofm" os.popen("ovp2ovf gregoria.ovp gregoria.ovf gregoria.ofm")
5793a8d9c69a539fd28403473bebf475356c4700 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7096/5793a8d9c69a539fd28403473bebf475356c4700/gregoria2gregorio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 9906, 13332, 364, 277, 316, 1048, 12, 29, 4672, 1172, 315, 6632, 869, 412, 314, 13430, 1155, 6456, 72, 18, 6632, 81, 314, 13430, 1155, 6456, 72, 18, 412, 6, 738, 261, 77, 16, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 9906, 13332, 364, 277, 316, 1048, 12, 29, 4672, 1172, 315, 6632, 869, 412, 314, 13430, 1155, 6456, 72, 18, 6632, 81, 314, 13430, 1155, 6456, 72, 18, 412, 6, 738, 261, 77, 16, 7...
self.pool.apply_async(job_runner, args=(job,), callback=job.get_callback(ParallelContext._condition))
self.processpool.apply_async(job_runner, args=(job,), callback=job.get_callback(ParallelContext._condition))
def _docallnative(self, module, method, argv, env, cwd, cb, echo, pycommandpath=None): if echo is not None: print echo job = PythonJob(module, method, argv, env, cwd, pycommandpath) self.pool.apply_async(job_runner, args=(job,), callback=job.get_callback(ParallelContext._condition)) self.running.append((job, cb))
a78031823f3fb6b9f94fd6706c2ed1af8a948e75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7005/a78031823f3fb6b9f94fd6706c2ed1af8a948e75/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2434, 454, 13635, 12, 2890, 16, 1605, 16, 707, 16, 5261, 16, 1550, 16, 7239, 16, 2875, 16, 3376, 16, 2395, 3076, 803, 33, 7036, 4672, 309, 3376, 353, 486, 599, 30, 1172, 3376, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2434, 454, 13635, 12, 2890, 16, 1605, 16, 707, 16, 5261, 16, 1550, 16, 7239, 16, 2875, 16, 3376, 16, 2395, 3076, 803, 33, 7036, 4672, 309, 3376, 353, 486, 599, 30, 1172, 3376, 1...
eventPair = self._watching[inputSource].pop(token)
name, eventOn, eventOff = self._watching[inputSource].pop(token)
def _ignore(self, token): """ Undo a watch(). Don't call this directly, call release() on the token that watch() returned. """ inputSource = self._token2inputSource.pop(token) eventPair = self._watching[inputSource].pop(token) token.invalidate() eventOn, eventOff = eventPair DirectObject.DirectObject.ignore(self, eventOn) DirectObject.DirectObject.ignore(self, eventOff) if len(self._watching[inputSource]) == 0: del self._watching[inputSource] self.set(name, False, inputSource)
b8adfe5ae221cc5444ecfeefd4c5c35b187f102a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/b8adfe5ae221cc5444ecfeefd4c5c35b187f102a/InputState.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6185, 12, 2890, 16, 1147, 4672, 3536, 1351, 2896, 279, 4267, 7675, 7615, 1404, 745, 333, 5122, 16, 745, 3992, 1435, 603, 326, 1147, 716, 4267, 1435, 2106, 18, 3536, 810, 1830, 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, 389, 6185, 12, 2890, 16, 1147, 4672, 3536, 1351, 2896, 279, 4267, 7675, 7615, 1404, 745, 333, 5122, 16, 745, 3992, 1435, 603, 326, 1147, 716, 4267, 1435, 2106, 18, 3536, 810, 1830, 273, ...
elif data[0] == '(': self.announce('''(%s: %s'''%(self.name,data[1:]))
elif data[0] == '(': self.announce('''(%s: %s'''%(self.nick,data[1:]))
def game(self,data): if len(data) == 0: return data = data.decode('utf-8') tok = data.split(' ') if tok[0] == 'TYPING': self.typing = True;self.announce_players() elif tok[0] == 'NOT_TYPING': self.typing = False;self.announce_players() elif tok[0] == '/name': self.setname(" ".join(tok[1:]))#self.name = ;self.regex = re.compile(self.name,re.IGNORECASE) elif tok[0] == '/gm': self.gm = (self.gm+1)%2;self.typing = False;self.announce_players() elif tok[0] == '/tell': self.tell(tok[1:]) else: if data[0] == '*': self.announce('''%s %s'''%(self.name,data[1:])) elif data[0] == '!': self.announce('''(%s: %s)'''%(self.name,data)) elif data[0] == '#': self.announce('''(%s) %s'''%(self.name,data[1:])) elif data[0] == '(': self.announce('''(%s: %s'''%(self.name,data[1:])) else: self.announce('''%s says, "%s"'''%(self.name,data)) self.typing = False self.announce_players()
3eeb5803fcaa9200603943617ea56898d709469e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13227/3eeb5803fcaa9200603943617ea56898d709469e/ropeserve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7920, 12, 2890, 16, 892, 4672, 309, 562, 12, 892, 13, 422, 374, 30, 327, 501, 273, 501, 18, 3922, 2668, 3158, 17, 28, 6134, 946, 273, 501, 18, 4939, 2668, 8624, 309, 946, 63, 20, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7920, 12, 2890, 16, 892, 4672, 309, 562, 12, 892, 13, 422, 374, 30, 327, 501, 273, 501, 18, 3922, 2668, 3158, 17, 28, 6134, 946, 273, 501, 18, 4939, 2668, 8624, 309, 946, 63, 20, 6...
return self.statcmd('STAT ' + id)
return self.statcmd('STAT {0}'.format(id))
def stat(self, id): """Process a STAT command. Argument: - id: article number or message id Returns: - resp: server response if successful - nr: the article number - id: the message id"""
933238ad85875df26c18a674f77afc1abaafb88e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/933238ad85875df26c18a674f77afc1abaafb88e/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 610, 12, 2890, 16, 612, 4672, 3536, 2227, 279, 2347, 789, 1296, 18, 225, 5067, 30, 300, 612, 30, 7559, 1300, 578, 883, 612, 2860, 30, 300, 1718, 30, 1438, 766, 309, 6873, 300, 9884, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 610, 12, 2890, 16, 612, 4672, 3536, 2227, 279, 2347, 789, 1296, 18, 225, 5067, 30, 300, 612, 30, 7559, 1300, 578, 883, 612, 2860, 30, 300, 1718, 30, 1438, 766, 309, 6873, 300, 9884, ...
self._dkeys = self._dict.keys() self._dkeys.sort()
def __init__(self, *args): unittest.TestCase.__init__(self, *args) self._dkeys = self._dict.keys() self._dkeys.sort()
c08fe82b32386d2621f4c6c17cc334c7a3a924b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c08fe82b32386d2621f4c6c17cc334c7a3a924b9/test_dumbdbm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 2836, 3813, 18, 4709, 2449, 16186, 2738, 972, 12, 2890, 16, 380, 1968, 13, 365, 6315, 72, 2452, 273, 365, 6315, 1576, 18, 2452, 1435, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 2836, 3813, 18, 4709, 2449, 16186, 2738, 972, 12, 2890, 16, 380, 1968, 13, 365, 6315, 72, 2452, 273, 365, 6315, 1576, 18, 2452, 1435, 36...
self.ReleaseMouse()
def OnLeftUp(self, event): if not self.IsEnabled(): return if not self.up: # if the button was down when the mouse was released... self.Notify() self.up = true self.ReleaseMouse() self.Refresh() event.Skip()
843a4cc675bf53258a2805445f6876ae875e4368 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/843a4cc675bf53258a2805445f6876ae875e4368/buttons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3910, 1211, 12, 2890, 16, 871, 4672, 309, 486, 365, 18, 2520, 1526, 13332, 327, 309, 486, 365, 18, 416, 30, 565, 468, 309, 326, 3568, 1703, 2588, 1347, 326, 7644, 1703, 15976, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3910, 1211, 12, 2890, 16, 871, 4672, 309, 486, 365, 18, 2520, 1526, 13332, 327, 309, 486, 365, 18, 416, 30, 565, 468, 309, 326, 3568, 1703, 2588, 1347, 326, 7644, 1703, 15976, 27...
for i in range(55):
for i in range(1, 55):
def setUp(self): try: self.user = os.environ['USER'] except KeyError: self.user = None # Probably Windows... self.node = platform.node() self.name = self.node.replace('.', '_') self.python = find_python() self.cluster = None
8c9e9f11744b3b9c29b2702463f700af7e659886 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/8c9e9f11744b3b9c29b2702463f700af7e659886/test_resource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 775, 30, 365, 18, 1355, 273, 1140, 18, 28684, 3292, 4714, 3546, 1335, 4999, 30, 365, 18, 1355, 273, 599, 225, 468, 14610, 6906, 8202, 2777, 365, 18, 2159, 273, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 775, 30, 365, 18, 1355, 273, 1140, 18, 28684, 3292, 4714, 3546, 1335, 4999, 30, 365, 18, 1355, 273, 599, 225, 468, 14610, 6906, 8202, 2777, 365, 18, 2159, 273, 4...
for kw, (ref, _, _, _) in self.env.modules.iteritems(): rv[kw] = (ref, 0) for kw, (ref, ref_type) in self.env.descrefs.iteritems():
for fullname, (doc, desctype) in self.env.descrefs.iteritems(): prefix, name = rpartition(fullname, '.') pdict = rv.setdefault(prefix, {})
def get_keyword_map(self): """Return a dict of all keywords.""" rv = {} dt = self._desctypes for kw, (ref, _, _, _) in self.env.modules.iteritems(): rv[kw] = (ref, 0) for kw, (ref, ref_type) in self.env.descrefs.iteritems(): try: i = dt[ref_type] except KeyError: i = len(dt) dt[ref_type] = i rv[kw] = (ref, i) return rv
406cbf18870a26a8b9da1e725378ca8af03b1224 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7032/406cbf18870a26a8b9da1e725378ca8af03b1224/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11041, 67, 1458, 12, 2890, 4672, 3536, 990, 279, 2065, 434, 777, 7093, 12123, 5633, 273, 2618, 3681, 273, 365, 6315, 5489, 299, 989, 364, 13321, 16, 261, 2434, 16, 2832, 12387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11041, 67, 1458, 12, 2890, 4672, 3536, 990, 279, 2065, 434, 777, 7093, 12123, 5633, 273, 2618, 3681, 273, 365, 6315, 5489, 299, 989, 364, 13321, 16, 261, 2434, 16, 2832, 12387, ...
self.eclipseVersion = "1.1.2"
self.eclipseVersion = "1.1.3"
def __init__(self): if pkgutil.isWindows(): self.packageRoot = "c:/tmp/qtjambi-builder" else: self.packageRoot = "/tmp/qtjambi-builder" self.eclipseVersion = "1.1.2" self.p4User = "qt" self.p4Client = "qt-builder" self.binaryPackageCount = 0 self.packageExtraName = ""
cf2778399c015385417fb8f372bc563c5c875f20 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4229/cf2778399c015385417fb8f372bc563c5c875f20/package_builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 309, 3475, 1367, 18, 291, 10399, 13332, 365, 18, 5610, 2375, 273, 315, 71, 27824, 5645, 19, 23311, 78, 2536, 77, 17, 9574, 6, 469, 30, 365, 18, 5610, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 309, 3475, 1367, 18, 291, 10399, 13332, 365, 18, 5610, 2375, 273, 315, 71, 27824, 5645, 19, 23311, 78, 2536, 77, 17, 9574, 6, 469, 30, 365, 18, 5610, ...
x = E.expect(['@p\d+\.','@@','@[A-Z]','@[123456!"
x = E.expect(['@p\d+\.','@@','@[A-Z]','@[123456!"
def _execute_line(self, line, wait_for_prompt=True, expect_eof=False): E = self._expect try: if len(line) > 4095: raise RuntimeError,"Passing commands this long to gap would hang" E.sendline(line) except OSError: return RuntimeError, "Error evaluating %s in %s"%(line, self) if wait_for_prompt == False: return ('','') if len(line)==0: return ('','') try: E.expect("\r\n") # seems to be necessary to skip TWO echoes E.expect("\r\n") # one from the pty and one from GAP, I guess normal_outputs = [] error_outputs = [] current_outputs = normal_outputs while True: x = E.expect(['@p\d+\.','@@','@[A-Z]','@[123456!"#$%&].*\+', '@e','@c','@f','@h','@i','@m','@n','@r','@s\d','@w.*\+', '@x','@z']) current_outputs.append(E.before) if x == 0: # @p if E.after != '@p1.': print "Warning: possibly wrong version of GAP package interface\n" print "Crossing fingers and continuing\n" elif x == 1: #@@ current_outputs.append('@') elif x == 2: #special char current_outputs.append(chr(ord(E.after[1:2])-ord('A')+1)) elif x == 3: # garbage collection info, ignore pass elif x == 4: # @e -- break loop E.sendline(" ") #E.expect("\r\n") #E.expect("\r\n") elif x == 5: # @c completion, doesn't seem to happen when -p is in use print "I didn't think GAP could do this\n" elif x == 6: # @f GAP error message current_outputs = error_outputs; elif x == 7: # @h help text, but this stopped happening with new help print "I didn't think GAP could do this" elif x == 8: # @i awaiting normal input break; elif x == 9: # @m finished running a child # not generated in GAP 4 print "Warning: this should never happen" elif x==10: #@n normal output line current_outputs = normal_outputs; elif x==11: #@r echoing input E.expect('@J') elif x==12: #@sN shouldn't happen print "Warning: this should never happen" elif x==13: #@w GAP is trying to send a Window command print "Warning: this should never happen" elif x ==14: #@x seems to be safely ignorable pass elif x == 15:#@z GAP starting a subprocess # actually not used print "Warning: this should never happen" except pexpect.EOF: if not expect_eof: raise RuntimeError, "Unexpected EOF from %s executing %s"%(self,line) except IOError: raise RuntimeError, "IO Error from %s executing %s"%(self,line) return ("".join(normal_outputs),"".join(error_outputs))
77c24d514a21bb4e9570492494b65d2b8e270c5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/77c24d514a21bb4e9570492494b65d2b8e270c5e/gap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 67, 1369, 12, 2890, 16, 980, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 4489, 67, 9339, 33, 8381, 4672, 512, 273, 365, 6315, 12339, 775, 30, 309, 562, 12, 1369, 13, 405,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 67, 1369, 12, 2890, 16, 980, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 4489, 67, 9339, 33, 8381, 4672, 512, 273, 365, 6315, 12339, 775, 30, 309, 562, 12, 1369, 13, 405,...
pref = PrefPanel(self.panel, cls) self.panel.GetSizer().Add(pref, 0, wx.EXPAND, border=0)
pref = PrefPanel(self.splitter, cls)
def createPanel(self, cls): pref = PrefPanel(self.panel, cls) self.panel.GetSizer().Add(pref, 0, wx.EXPAND, border=0) self.pref_panels[cls] = pref return pref
7b8bb8ecb4a7c79f4b6f463f6f011d7fb01d0571 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/7b8bb8ecb4a7c79f4b6f463f6f011d7fb01d0571/userparams.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 5537, 12, 2890, 16, 2028, 4672, 11307, 273, 28184, 5537, 12, 2890, 18, 4939, 387, 16, 2028, 13, 365, 18, 25724, 67, 7355, 10558, 63, 6429, 65, 273, 11307, 327, 11307, 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, 752, 5537, 12, 2890, 16, 2028, 4672, 11307, 273, 28184, 5537, 12, 2890, 18, 4939, 387, 16, 2028, 13, 365, 18, 25724, 67, 7355, 10558, 63, 6429, 65, 273, 11307, 327, 11307, 2, -100, -10...
def change_file_prop(self, file_baton, name, value, pool): if not file_baton: return (old_path, new_path, pool) = file_baton prefix = 'changeset.changes.%d.props.%s' % (self.fileno, name)
self.prev_path = old_path or new_path self.prefix = 'changeset.changes.%d' % (self.fileno)
def close_file(self, file_baton, pool): self.fileno += 1
5d4c14a9ae16d7086c0ba29b263aafad5e909c0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5d4c14a9ae16d7086c0ba29b263aafad5e909c0b/Changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 67, 768, 12, 2890, 16, 585, 67, 70, 16799, 16, 2845, 4672, 365, 18, 7540, 5764, 1011, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 67, 768, 12, 2890, 16, 585, 67, 70, 16799, 16, 2845, 4672, 365, 18, 7540, 5764, 1011, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...