rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
if len(params.keys()) == ['isbn']: isbn_redirect(params['isbn'])
if i.keys() == ['isbn']: isbn_redirect(i.isbn)
def GET(self): i = web.input(author_key=[], language=[], first_publish_year=[], publisher_facet=[], subject_facet=[], person_facet=[], place_facet=[], time_facet=[]) params = self.clean_inputs(i)
5f024882651fcbd2cf1a65719d808c5d3990eff2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/5f024882651fcbd2cf1a65719d808c5d3990eff2/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4978, 12, 2890, 4672, 277, 273, 3311, 18, 2630, 12, 4161, 67, 856, 22850, 6487, 2653, 22850, 6487, 1122, 67, 6543, 67, 6874, 22850, 6487, 12855, 67, 21568, 22850, 6487, 3221, 67, 21568, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4978, 12, 2890, 4672, 277, 273, 3311, 18, 2630, 12, 4161, 67, 856, 22850, 6487, 2653, 22850, 6487, 1122, 67, 6543, 67, 6874, 22850, 6487, 12855, 67, 21568, 22850, 6487, 3221, 67, 21568, ...
address = self.__getaddr('TO:', arg)
address = self.__getaddr('TO:', arg) if arg else None
def smtp_RCPT(self, arg): print >> DEBUGSTREAM, '===> RCPT', arg if not self.__mailfrom: self.push('503 Error: need MAIL command') return address = self.__getaddr('TO:', arg) if not address: self.push('501 Syntax: RCPT TO: <address>') return self.__rcpttos.append(address) print >> DEBUGSTREAM, 'recips:', self.__rcpttos self.push('250 Ok')
38965448416a6c0413ced7daa571e1d25dac08d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/38965448416a6c0413ced7daa571e1d25dac08d0/smtpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17660, 67, 11529, 1856, 12, 2890, 16, 1501, 4672, 1172, 1671, 6369, 13693, 16, 296, 631, 9207, 24206, 1856, 2187, 1501, 309, 486, 365, 16186, 4408, 2080, 30, 365, 18, 6206, 2668, 3361, 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, 17660, 67, 11529, 1856, 12, 2890, 16, 1501, 4672, 1172, 1671, 6369, 13693, 16, 296, 631, 9207, 24206, 1856, 2187, 1501, 309, 486, 365, 16186, 4408, 2080, 30, 365, 18, 6206, 2668, 3361, 2...
parser.add_option("-t", "--test", action="store_true", dest="log_stderr", default=False)
parser.add_option("-t", "--test", action="store_true", dest="test_mode", default=False) parser.add_option("-d", "--debug-print", action="store_true", dest="log_stderr", default=False)
def getOptionParser(self): from optparse import OptionParser
79b3c764f1f9c01efa2318456f7eb2435f148aa9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/79b3c764f1f9c01efa2318456f7eb2435f148aa9/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5651, 2678, 12, 2890, 4672, 628, 2153, 2670, 1930, 18862, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5651, 2678, 12, 2890, 4672, 628, 2153, 2670, 1930, 18862, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.name = toklist[1] self.daemon = toklist[1]
self.name = utils.stripquote(toklist[1]) self.daemon = utils.stripquote(toklist[1])
def __init__(self, toklist):
62360427ecbee9f64f0c27e8796b9ac469d8bc47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/62360427ecbee9f64f0c27e8796b9ac469d8bc47/directive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 946, 1098, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 946, 1098, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
data = cPickle.dumps(value, self.binary)
data = _dumps(value, self.protocol)
def __append(self, value, txn=None): data = cPickle.dumps(value, self.binary) return self.db.append(data, txn)
b7de61bf49a6659663f54be6387c3445a40702d4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/b7de61bf49a6659663f54be6387c3445a40702d4/dbshelve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6923, 12, 2890, 16, 460, 16, 7827, 33, 7036, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 327, 365, 18, 1966, 18, 6923, 12, 892, 16, 7827, 13, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6923, 12, 2890, 16, 460, 16, 7827, 33, 7036, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 327, 365, 18, 1966, 18, 6923, 12, 892, 16, 7827, 13, 2, -100, ...
fndir = os.path.dirname(filename) if os.path.isabs(filename): coverpath = fndir
self.donothing = 1 def run(self, cmd): import __main__ dict = __main__.__dict__ if not self.donothing: sys.settrace(self.globaltrace) try: exec cmd in dict, dict finally: if not self.donothing: sys.settrace(None) def runctx(self, cmd, globals=None, locals=None): if globals is None: globals = {} if locals is None: locals = {} if not self.donothing: sys.settrace(gself.lobaltrace) try: exec cmd in dict, dict finally: if not self.donothing: sys.settrace(None) def runfunc(self, func, *args, **kw): result = None if not self.donothing: sys.settrace(self.globaltrace) try: result = apply(func, args, kw) finally: if not self.donothing: sys.settrace(None) return result def globaltrace_countfuncs(self, frame, why, arg): """ Handles `call' events (why == 'call') and adds the (filename, modulename, funcname,) to the self._calledfuncs dict. """ if why == 'call': (filename, lineno, funcname, context, lineindex,) = inspect.getframeinfo(frame, 0) if filename: modulename = inspect.getmodulename(filename)
def create_results_log(results, dirname = ".", show_missing = 1, save_counts = 0, summary = 0, coverdir = None): import re # turn the counts data ("(filename, lineno) = count") into something # accessible on a per-file basis per_file = {} for filename, lineno in results.counts.keys(): lines_hit = per_file[filename] = per_file.get(filename, {}) lines_hit[lineno] = results.counts[(filename, lineno)] # try and merge existing counts and modules file from dirname try: counts = marshal.load(open(os.path.join(dirname, "counts"))) modules = marshal.load(open(os.path.join(dirname, "modules"))) results.update(results.__class__(counts, modules)) except IOError: pass # there are many places where this is insufficient, like a blank # line embedded in a multiline string. blank = re.compile(r'^\s*(#.*)?$') # accumulate summary info, if needed sums = {} # generate file paths for the coverage files we are going to write... fnlist = [] tfdir = tempfile.gettempdir() for key in per_file.keys(): filename = key # skip some "files" we don't care about... if filename == "<string>": continue # are these caused by code compiled using exec or something? if filename.startswith(tfdir): continue modulename = os.path.split(results.modules[key])[1] if filename.endswith(".pyc") or filename.endswith(".pyo"): filename = filename[:-1] if coverdir: listfilename = os.path.join(coverdir, modulename + ".cover") else: # XXX this is almost certainly not portable!!! fndir = os.path.dirname(filename) if os.path.isabs(filename): coverpath = fndir else: coverpath = os.path.join(dirname, fndir) # build list file name by appending a ".cover" to the module name # and sticking it into the specified directory if "." in modulename: # A module in a package finalname = modulename.split(".")[-1] listfilename = os.path.join(coverpath, finalname + ".cover") else: listfilename = os.path.join(coverpath, modulename + ".cover") # Get the original lines from the .py file try: lines = open(filename, 'r').readlines() except IOError, err: print >> sys.stderr, "trace: Could not open %s for reading " \ "because: %s - skipping" % (`filename`, err) continue try: outfile = open(listfilename, 'w') except IOError, err: sys.stderr.write( '%s: Could not open %s for writing because: %s" \ "- skipping\n' % ("trace", `listfilename`, err)) continue # If desired, get a list of the line numbers which represent # executable content (returned as a dict for better lookup speed) if show_missing: executable_linenos = find_executable_linenos(filename) else: executable_linenos = {} n_lines = 0 n_hits = 0 lines_hit = per_file[key] for i in range(len(lines)): line = lines[i] # do the blank/comment match to try to mark more lines # (help the reader find stuff that hasn't been covered) if lines_hit.has_key(i+1): # count precedes the lines that we captured outfile.write('%5d: ' % lines_hit[i+1]) n_hits = n_hits + 1 n_lines = n_lines + 1 elif blank.match(line): # blank lines and comments are preceded by dots outfile.write(' . ') else: # lines preceded by no marks weren't hit # Highlight them if so indicated, unless the line contains # '#pragma: NO COVER' (it is possible to embed this into # the text as a non-comment; no easy fix) if executable_linenos.has_key(i+1) and \ string.find(lines[i], string.join(['#pragma', 'NO COVER'])) == -1: outfile.write('>>>>>> ') else: outfile.write(' '*7) n_lines = n_lines + 1 outfile.write(string.expandtabs(lines[i], 8)) outfile.close() if summary and n_lines: percent = int(100 * n_hits / n_lines) sums[modulename] = n_lines, percent, modulename, filename if save_counts: # try and store counts and module info into dirname try: marshal.dump(results.counts, open(os.path.join(dirname, "counts"), "w")) marshal.dump(results.modules, open(os.path.join(dirname, "modules"), "w")) except IOError, err: sys.stderr.write("cannot save counts/modules " \ "files because %s" % err) if summary and sums: mods = sums.keys() mods.sort() print "lines cov% module (path)" for m in mods: n_lines, percent, modulename, filename = sums[m] print "%5d %3d%% %s (%s)" % sums[m]
8fb89f9fd74a61e165437eec10be9ace4c3738cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8fb89f9fd74a61e165437eec10be9ace4c3738cb/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4717, 67, 1330, 12, 4717, 16, 4283, 273, 4585, 16, 2405, 67, 7337, 273, 404, 16, 1923, 67, 8008, 273, 374, 16, 4916, 273, 374, 16, 5590, 1214, 273, 599, 4672, 1930, 283, 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, 752, 67, 4717, 67, 1330, 12, 4717, 16, 4283, 273, 4585, 16, 2405, 67, 7337, 273, 404, 16, 1923, 67, 8008, 273, 374, 16, 4916, 273, 374, 16, 5590, 1214, 273, 599, 4672, 1930, 283, 468...
h = win32api.LoadLibrary(filename) found = win32api.GetModuleFileName(h)
if os.path.isfile(os.path.join(sys.prefix, filename)): found = os.path.join(sys.prefix, filename) else: import win32api h = win32api.LoadLibrary(filename) found = win32api.GetModuleFileName(h)
def __import(modname): import win32api, imp, sys, os suffix = "" if win32api.__file__.endswith("_d.pyd")>0: suffix = "_d" filename = "%s%d%d%s.dll" % (modname, sys.version_info[0], sys.version_info[1], suffix) if hasattr(sys, "frozen"): # If we are running from a frozen program (py2exe, McMillan, freeze) # then we try and load the DLL from our sys.path for look in sys.path: found = os.path.join(look, filename) if os.path.isfile(found): break else: raise ImportError, "Module '%s' isn't in frozen sys.path directories" % modname h = None else: # Normal Python needs these files in a directory somewhere on # %PATH%, so let Windows search it out for us h = win32api.LoadLibrary(filename) found = win32api.GetModuleFileName(h) # Python can load the module mod = imp.load_module(modname, None, found, ('.dll', 'rb', imp.C_EXTENSION)) # and fill our namespace with it. globals().update(mod.__dict__) if h is not None: win32api.FreeLibrary(h)
f94fef29ca63089e7ab8f54997f6eb29ba8597ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/f94fef29ca63089e7ab8f54997f6eb29ba8597ee/pywintypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5666, 12, 1711, 529, 4672, 1930, 5657, 1578, 2425, 16, 1646, 16, 2589, 16, 1140, 3758, 273, 1408, 309, 5657, 1578, 2425, 16186, 768, 25648, 5839, 1918, 2932, 67, 72, 18, 2074, 72, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5666, 12, 1711, 529, 4672, 1930, 5657, 1578, 2425, 16, 1646, 16, 2589, 16, 1140, 3758, 273, 1408, 309, 5657, 1578, 2425, 16186, 768, 25648, 5839, 1918, 2932, 67, 72, 18, 2074, 72, ...
time_col = name == 'milestone' and 'milestone.due' or 'version.time'
time_col = name == 'milestone' and 'milestone.due' or \ 'version.time'
def get_constraint_sql(name, value, mode, neg): if name not in custom_fields: name = 't.' + name else: name = name + '.value' value = value[len(mode) + neg:]
87f2b587949e267f7ef8012e23eb81ac3d067ed9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/87f2b587949e267f7ef8012e23eb81ac3d067ed9/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 13364, 67, 4669, 12, 529, 16, 460, 16, 1965, 16, 4251, 4672, 309, 508, 486, 316, 1679, 67, 2821, 30, 508, 273, 296, 88, 1093, 397, 508, 469, 30, 508, 273, 508, 397, 2418, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 13364, 67, 4669, 12, 529, 16, 460, 16, 1965, 16, 4251, 4672, 309, 508, 486, 316, 1679, 67, 2821, 30, 508, 273, 296, 88, 1093, 397, 508, 469, 30, 508, 273, 508, 397, 2418, ...
print "enter_custom_mode specialcase -- import succeeded"
print "_enter_custom_mode specialcase -- import succeeded"
def enter_custom_mode( self, commandName, modefile): #bruce 050515 # TODO: move to CommandSequencer.py, and call on self.win.commandSequencer rather than on self fn = modefile if not os.path.exists(fn) and commandName != 'testmode': env.history.message("should never happen: file does not exist: [%s]" % fn) return if commandName == 'testmode': #bruce 070429 explicit import probably needed for sake of py2app (so an explicit --include is not needed for it) # (but this is apparently still failing to let the testmode item work in a built release -- I don't know why ###FIX) print "enter_custom_mode specialcase for testmode" #e remove this print, when it works in a built release import testmode ## reload(testmode) # This reload is part of what prevented this case from working in A9 [bruce 070611] from testmode import testmode as _modeclass print "enter_custom_mode specialcase -- import succeeded" else: dir, file = os.path.split(fn) base, ext = os.path.splitext(file) ## commandName = base ###e need better way to import from this specific file! # (Like using an appropriate function in the import-related Python library module.) # This kluge is not protected against weird chars in base. oldpath = list(sys.path) if dir not in sys.path: sys.path.append(dir) # Note: this doesn't guarantee we load file from that dir -- # if it's present in another one on path (e.g. cad/src), # we'll load it from there instead. That's basically a bug, # but prepending dir onto path would risk much worse bugs # if dir masked any standard modules which got loaded now. import gpl_only # make sure exec is ok in this version (caller should have done this already) _module = _modeclass = None # fool pylint into realizing this is not undefined 2 lines below exec("import %s as _module" % (base,)) reload(_module) exec("from %s import %s as _modeclass" % (base,base)) sys.path = oldpath modeobj = _modeclass(self) # this should put it into self.commandTable under the name defined in the mode module # note: this self is probably supposed to be the command sequencer self.commandTable[commandName] = modeobj # also put it in under this name, if different [### will this cause bugs?] self.userEnterCommand(commandName) # note: self is acting as the command sequencer here; in future we'll get it from somewhere, # e.g. self.win.commandSequencer, or just move this whole method there (and get cmdseq from win when we call it) return
71132be5a1d47aaaf9cfd69d6387025bb7fa763d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/71132be5a1d47aaaf9cfd69d6387025bb7fa763d/GLPane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 67, 3662, 67, 3188, 12, 365, 16, 20893, 16, 1965, 768, 4672, 468, 2848, 3965, 374, 3361, 25, 3600, 468, 2660, 30, 3635, 358, 3498, 1761, 372, 23568, 18, 2074, 16, 471, 745, 603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 67, 3662, 67, 3188, 12, 365, 16, 20893, 16, 1965, 768, 4672, 468, 2848, 3965, 374, 3361, 25, 3600, 468, 2660, 30, 3635, 358, 3498, 1761, 372, 23568, 18, 2074, 16, 471, 745, 603, ...
diff_style, diff_options = get_diff_options(req) if req.args.has_key('update'): req.redirect(self.env.href.wiki(page.name, version=page.version, action='diff'))
def _render_diff(self, req, db, page): req.perm.assert_permission(perm.WIKI_VIEW)
49428f30e0191e27396c824e07d9b78925c3f1a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/49428f30e0191e27396c824e07d9b78925c3f1a3/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 5413, 12, 2890, 16, 1111, 16, 1319, 16, 1363, 4672, 1111, 18, 12160, 18, 11231, 67, 9827, 12, 12160, 18, 23109, 47, 45, 67, 12145, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 5902, 67, 5413, 12, 2890, 16, 1111, 16, 1319, 16, 1363, 4672, 1111, 18, 12160, 18, 11231, 67, 9827, 12, 12160, 18, 23109, 47, 45, 67, 12145, 13, 2, -100, -100, -100, -100, -100, ...
pipeline_size = 5
def AddNewActor(self, pubsub_evt): """ Create surface actor, save into project and send it to viewer. """ imagedata, colour, [min_value, max_value], edited_points = pubsub_evt.data quality='Optimal' mode = 'CONTOUR' # 'GRAYSCALE' imagedata_tmp = None if (edited_points): imagedata_tmp = vtk.vtkImageData() imagedata_tmp.DeepCopy(imagedata) imagedata_tmp.Update() imagedata = BuildEditedImage(imagedata_tmp, edited_points)
9bc7d016304defad70f07a51ceb179e9c0ef6cde /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/9bc7d016304defad70f07a51ceb179e9c0ef6cde/surface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 1908, 17876, 12, 2890, 16, 23288, 67, 73, 11734, 4672, 3536, 1788, 9034, 8327, 16, 1923, 1368, 1984, 471, 1366, 518, 358, 14157, 18, 3536, 8902, 329, 396, 16, 15046, 16, 306, 1154,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 1908, 17876, 12, 2890, 16, 23288, 67, 73, 11734, 4672, 3536, 1788, 9034, 8327, 16, 1923, 1368, 1984, 471, 1366, 518, 358, 14157, 18, 3536, 8902, 329, 396, 16, 15046, 16, 306, 1154,...
tasksIds = [] missing = [] imgList = Image.objects.filter(id__in = idList) tasks = Processing_task.objects.filter(kind__name__exact = 'scamp', success = True).order_by('-end_date')
from django.db import connection cur = connection.cursor() idList = string.join(idList, ',')
def checkForScampData(self, request, imgList = None): """ Check if the image selection matches a successful Scamp involving the same image selection. @return List of Scamp processings, if any """
e20f1271a7e99398df38185571c8ed27ea14e868 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/e20f1271a7e99398df38185571c8ed27ea14e868/swarp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13855, 1541, 931, 751, 12, 2890, 16, 590, 16, 3774, 682, 273, 599, 4672, 3536, 2073, 309, 326, 1316, 4421, 1885, 279, 6873, 2850, 931, 29876, 6282, 326, 1967, 1316, 4421, 18, 632, 2463, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13855, 1541, 931, 751, 12, 2890, 16, 590, 16, 3774, 682, 273, 599, 4672, 3536, 2073, 309, 326, 1316, 4421, 1885, 279, 6873, 2850, 931, 29876, 6282, 326, 1967, 1316, 4421, 18, 632, 2463, ...
ShowMissing(brkitrs, locales, "brkitr", dat_list_file_path) ShowMissing(colls, locales, "coll", dat_list_file_path) ShowMissing(currs, locales, "curr", dat_list_file_path) ShowMissing(langs, locales, "lang", dat_list_file_path) ShowMissing(regions, locales, "region", dat_list_file_path) ShowMissing(zones, locales, "zone", dat_list_file_path) ShowMissing(rbnfs, locales, "rbnf", dat_list_file_path)
kind_to_locales = { "brkitr": brkitrs, "coll": colls, "curr": currs, "lang": langs, "locales": locales, "region": regions, "zone": zones } every_locale = set() for locales in kind_to_locales.itervalues(): every_locale = every_locale.union(locales) if VERBOSE: for kind, locales in kind_to_locales.items(): print "%s=%s" % (kind, sorted(locales)) print "every_locale=" % sorted(every_locale) missing_files = [] for locale in every_locale: for kind, locales in kind_to_locales.items(): p = os.path.join(ICU4C_DIR, "data", kind, locale + ".txt") if not locale in locales and os.path.exists(p): missing_files.append(p) for missing_file in sorted(missing_files): print "warning: %s exists but isn't included in %s" % (missing_file, dat_list_file_path)
def GenResIndex(dat_list_file_path): res_index = "res_index.txt" locales = set() brkitrs = set() colls = set() currs = set() langs = set() regions = set() zones = set() rbnfs = set() for line in open(dat_list_file_path, "r"): if line.find("root.") >= 0: continue if line.find("res_index") >= 0: continue if line.find("_.res") >= 0: continue; if line.find("brkitr/") >= 0: end = line.find(".res") if end > 0: brkitrs.add(line[line.find("/")+1:end]) elif line.find("coll/") >= 0: end = line.find(".res") if end > 0: colls.add(line[line.find("/")+1:end]) elif line.find("curr/") >= 0: end = line.find(".res") if end > 0: currs.add(line[line.find("/")+1:end]) elif line.find("lang/") >= 0: end = line.find(".res") if end > 0: langs.add(line[line.find("/")+1:end]) elif line.find("region/") >= 0: end = line.find(".res") if end > 0: regions.add(line[line.find("/")+1:end]) elif line.find("zone/") >= 0: end = line.find(".res") if end > 0: zones.add(line[line.find("/")+1:end]) elif line.find("rbnf/") >= 0: end = line.find(".res") if end > 0: rbnfs.add(line[line.find("/")+1:end]) elif line.find(".res") >= 0: # We need to determine the resource is locale resource or misc resource. # To determine the locale resource, we assume max script length is 3. end = line.find(".res") if end <= 3 or (line.find("_") <= 3 and line.find("_") > 0): locales.add(line[:end]) ShowMissing(brkitrs, locales, "brkitr", dat_list_file_path) ShowMissing(colls, locales, "coll", dat_list_file_path) ShowMissing(currs, locales, "curr", dat_list_file_path) ShowMissing(langs, locales, "lang", dat_list_file_path) ShowMissing(regions, locales, "region", dat_list_file_path) ShowMissing(zones, locales, "zone", dat_list_file_path) ShowMissing(rbnfs, locales, "rbnf", dat_list_file_path) WriteIndex(os.path.join(TMP_DAT_PATH, res_index), locales, CLDR_VERSION) WriteIndex(os.path.join(TMP_DAT_PATH, "brkitr", res_index), brkitrs) WriteIndex(os.path.join(TMP_DAT_PATH, "coll", res_index), colls) WriteIndex(os.path.join(TMP_DAT_PATH, "curr", res_index), currs) WriteIndex(os.path.join(TMP_DAT_PATH, "lang", res_index), langs) WriteIndex(os.path.join(TMP_DAT_PATH, "region", res_index), regions) WriteIndex(os.path.join(TMP_DAT_PATH, "zone", res_index), zones) WriteIndex(os.path.join(TMP_DAT_PATH, "rbnf", res_index), rbnfs) # Call genrb to generate new res_index.res. InvokeIcuTool("genrb", TMP_DAT_PATH, [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "brkitr"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "coll"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "curr"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "lang"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "region"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "zone"), [res_index]) if len(rbnfs): InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "rbnf"), [res_index])
89f309f809ddaba6a3ba4a31a8ee74cfa5e85be3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10672/89f309f809ddaba6a3ba4a31a8ee74cfa5e85be3/icu_dat_generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10938, 607, 1016, 12, 3404, 67, 1098, 67, 768, 67, 803, 4672, 400, 67, 1615, 273, 315, 455, 67, 1615, 18, 5830, 6, 225, 6922, 273, 444, 1435, 5186, 8691, 5453, 273, 444, 1435, 645, 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, 10938, 607, 1016, 12, 3404, 67, 1098, 67, 768, 67, 803, 4672, 400, 67, 1615, 273, 315, 455, 67, 1615, 18, 5830, 6, 225, 6922, 273, 444, 1435, 5186, 8691, 5453, 273, 444, 1435, 645, 3...
if type(sel) == type(1.0) and 0.0 <= sel < 1.0:
if isinstance(sel, float) and 0.0 <= sel < 1.0:
def eval_print_amount(self, sel, list, msg): new_list = list if type(sel) == type(""): new_list = [] for func in list: if re.search(sel, func_std_string(func)): new_list.append(func) else: count = len(list) if type(sel) == type(1.0) and 0.0 <= sel < 1.0: count = int(count * sel + .5) new_list = list[:count] elif type(sel) == type(1) and 0 <= sel < count: count = sel new_list = list[:count] if len(list) != len(new_list): msg = msg + " List reduced from %r to %r due to restriction <%r>\n" % ( len(list), len(new_list), sel)
d9839e637b7c812d57b335b956f1d674502783c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/d9839e637b7c812d57b335b956f1d674502783c9/pstats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 67, 1188, 67, 8949, 12, 2890, 16, 357, 16, 666, 16, 1234, 4672, 394, 67, 1098, 273, 666, 309, 618, 12, 1786, 13, 422, 618, 2932, 6, 4672, 394, 67, 1098, 273, 5378, 364, 1326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 1188, 67, 8949, 12, 2890, 16, 357, 16, 666, 16, 1234, 4672, 394, 67, 1098, 273, 666, 309, 618, 12, 1786, 13, 422, 618, 2932, 6, 4672, 394, 67, 1098, 273, 5378, 364, 1326, ...
if len(workd.shape) == 1: levels = 1 else: levels = workd.shape[0] sserr = zeros((levels,levels),'f') for i in range(levels): for j in range(i,levels): ssval = add.reduce(workd[i]*workd[j]) sserr[i,j] = ssval sserr[j,i] = ssval return sserr
if len(workd.shape) == 1: levels = 1 else: levels = workd.shape[0] sserr = zeros((levels,levels),'f') for i in range(levels): for j in range(i,levels): ssval = add.reduce(workd[i]*workd[j]) sserr[i,j] = ssval sserr[j,i] = ssval return sserr
def multivar_sscalc(workd):
3bb739baad4fb4f21aa19b39fbb10f6aa5c1a041 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/3bb739baad4fb4f21aa19b39fbb10f6aa5c1a041/stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1778, 22647, 67, 1049, 12448, 12, 1252, 72, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1778, 22647, 67, 1049, 12448, 12, 1252, 72, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
statresult = commands.getstatusoutput('stat -f -c "%S %b" $PWD')
statresult = commands.getstatusoutput('df -P .')
def get_diskused(): """ Returns the total size in Bytes of the parition/mount that the working directory is on. """ disksize = 0 disksizedefault = 10000000 #blocksize unit is bytes blocksize = 0 freeblocks = 0 #Basic commands for linux stat # stat arguement -f get filesystem info # stat arguement -c use valid format sequence # %s block size (faster transfer) # %S Fundamental block size (for block count) # %b Total data blocks in the file system. statresult = commands.getstatusoutput('stat -f -c "%S %b" $PWD') # Test because if first element of tuple is other than 0 # then the exit status of the linux command is an error. if (statresult[0] != 0): #Failed return disksizedefault statresult = (statresult[1]).split() #Example of expected value for statresult #['4096', '3751807'] try: blocksize = long(statresult[0]) except ValueError: return disksizedefault try: freeblocks = long(statresult[1]) except ValueError: return disksizedefault disksize = blocksize * freeblocks return disksize
2417e03d916953ff278668c88050b18355050c6e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/2417e03d916953ff278668c88050b18355050c6e/Linux_resources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10863, 3668, 13332, 3536, 2860, 326, 2078, 963, 316, 5985, 434, 326, 779, 608, 19, 4778, 716, 326, 5960, 1867, 353, 603, 18, 3536, 225, 4234, 1467, 273, 374, 4234, 1467, 1886, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10863, 3668, 13332, 3536, 2860, 326, 2078, 963, 316, 5985, 434, 326, 779, 608, 19, 4778, 716, 326, 5960, 1867, 353, 603, 18, 3536, 225, 4234, 1467, 273, 374, 4234, 1467, 1886, ...
sage: g.transitive_reduction().edges()
sage: edges = g.transitive_reduction().edges(); len(edges)
def transitive_reduction(self): r""" Returns a transitive reduction of a graph. The original graph is not modified.
f4e6071fec9db9b82cf2a9a85c21c347bbe3d50a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f4e6071fec9db9b82cf2a9a85c21c347bbe3d50a/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30442, 67, 1118, 4062, 12, 2890, 4672, 436, 8395, 2860, 279, 30442, 20176, 434, 279, 2667, 18, 225, 1021, 2282, 2667, 353, 486, 4358, 18, 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, 30442, 67, 1118, 4062, 12, 2890, 4672, 436, 8395, 2860, 279, 30442, 20176, 434, 279, 2667, 18, 225, 1021, 2282, 2667, 353, 486, 4358, 18, 2, -100, -100, -100, -100, -100, -100, -100, -10...
('a', 'first'), ('b', 'middle'), ('c', 'last'),
('1', 'first'), ('2', 'middle'), ('3', 'last'),
def getCities(self): """get all cities belonging to this city list cities returned are sorted by the position field, which means the first city in returned list will be a city marked as start point for traveler and the last one will be city marked as traveler's destination point """ cities = CityInList.objects.order_by('position').filter(cityList = self) return cities
13c8a952043c99ac3209e5531dc2a589ea77ca4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1965/13c8a952043c99ac3209e5531dc2a589ea77ca4a/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1927, 1961, 12, 2890, 4672, 3536, 588, 777, 276, 1961, 17622, 358, 333, 12797, 666, 225, 276, 1961, 2106, 854, 3115, 635, 326, 1754, 652, 16, 1492, 4696, 326, 1122, 12797, 316, 2106, 666...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1927, 1961, 12, 2890, 4672, 3536, 588, 777, 276, 1961, 17622, 358, 333, 12797, 666, 225, 276, 1961, 2106, 854, 3115, 635, 326, 1754, 652, 16, 1492, 4696, 326, 1122, 12797, 316, 2106, 666...
infoDict[ 'path' ] = proxyLoc
infoDict[ 'path' ] = proxyLocation
def getProxyInfo( proxy = False, disableVOMS = False ): """ Returns a dict with all the proxy info * values that will be there always 'chain' : chain object containing the proxy 'subject' : subject of the proxy 'issuer' : issuer of the proxy 'isProxy' : bool 'isLimitedProxy' : bool 'validDN' : Valid DN in DIRAC 'validGroup' : Valid Group in DIRAC 'secondsLeft' : Seconds left * values that can be there 'path' : path to the file, 'group' : DIRAC group 'username' : DIRAC username 'identity' : DN that generated the proxy 'hostname' : DIRAC host nickname 'VOMS' """ #Discover proxy location if type( proxy ) == g_X509ChainType: chain = proxy proxyLocation = False else: if not proxy: proxyLocation = Locations.getProxyLocation() elif type( proxy ) in ( types.StringType, types.UnicodeType ): proxyLocation = proxy else: return S_ERROR( "Can't find a valid proxy" ) chain = X509Chain() retVal = chain.loadProxyFromFile( proxyLocation ) if not retVal[ 'OK' ]: return S_ERROR( "Can't load %s: %s " % ( proxyLocation, retVal[ 'Message' ] ) ) retVal = chain.getCredentials() if not retVal[ 'OK' ]: return retVal infoDict = retVal[ 'Value' ] infoDict[ 'chain' ] = chain if proxyLocation: infoDict[ 'path' ] = proxyLoc if not disableVOMS and chain.isVOMS()['Value']: retVal = VOMS().getVOMSAttributes( chain ) if retVal[ 'OK' ]: infoDict[ 'VOMS' ] = retVal[ 'Value' ] return S_OK( infoDict )
ae1c68e3461345e39a0c63fa67a7f0fbabc6ba69 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/ae1c68e3461345e39a0c63fa67a7f0fbabc6ba69/Misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18992, 966, 12, 2889, 273, 1083, 16, 4056, 58, 1872, 55, 273, 1083, 262, 30, 3536, 2860, 279, 2065, 598, 777, 326, 2889, 1123, 380, 924, 716, 903, 506, 1915, 3712, 296, 5639, 11, 294, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18992, 966, 12, 2889, 273, 1083, 16, 4056, 58, 1872, 55, 273, 1083, 262, 30, 3536, 2860, 279, 2065, 598, 777, 326, 2889, 1123, 380, 924, 716, 903, 506, 1915, 3712, 296, 5639, 11, 294, ...
filename = dirname+'/'+filenames.pop()
if dirname: filename = dirname+'/'+filenames.pop() else: filename = filenames.pop()
def getFiles(self,pkgId): for (rep,cache) in self.filelistsdb.items(): found = False result = {} cur = cache.cursor() cur.execute("select * from packages,filelist where packages.pkgId = %s and packages.pkgKey = filelist.pkgKey", pkgId) for ob in cur.fetchall(): found = True dirname = ob['filelist.dirname'] filetypes = decodefiletypelist(ob['filelist.filetypes']) filenames = decodefilenamelist(ob['filelist.filenames']) while(filenames): filename = dirname+'/'+filenames.pop() filetype = filetypes.pop() result.setdefault(filetype,[]).append(filename) if (found): return result return {}
af749f64d8715fc354348ad8f0065645de907216 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/af749f64d8715fc354348ad8f0065645de907216/sqlitesack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18262, 12, 2890, 16, 10657, 548, 4672, 364, 261, 14462, 16, 2493, 13, 316, 365, 18, 7540, 292, 1486, 1966, 18, 3319, 13332, 1392, 273, 1083, 563, 273, 2618, 662, 273, 1247, 18, 9216, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18262, 12, 2890, 16, 10657, 548, 4672, 364, 261, 14462, 16, 2493, 13, 316, 365, 18, 7540, 292, 1486, 1966, 18, 3319, 13332, 1392, 273, 1083, 563, 273, 2618, 662, 273, 1247, 18, 9216, 1...
n`, if one exists; which is if and only if `a\equiv b\pmod{\gcd(m,n)}` by the Chinese Remainder Theorem. The solution `x` is only well-defined modulo lcm`(m,n)`.
n`, if one exists. By the Chinese Remainder Theorem, a solution to the simultaneous congruences exists if and only if `a\equiv b\pmod{\gcd(m,n)}`. The solution `x` is only well-defined modulo `\text{lcm}(m,n)`.
def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, returns a solution `x` to the simultaneous congruences `x\equiv a \bmod m` and `x\equiv b \bmod n`, if one exists; which is if and only if `a\equiv b\pmod{\gcd(m,n)}` by the Chinese Remainder Theorem. The solution `x` is only well-defined modulo lcm`(m,n)`. If ``a`` and ``b`` are lists, returns a simultaneous solution to the congruences `x\equiv a_i\pmod{b_i}`, if one exists. EXAMPLES:: sage: crt(2, 1, 3, 5) 11 sage: crt(13,20,100,301) 28013 You can also use upper case:: sage: c = CRT(2,3, 3, 5); c 8 sage: c % 3 == 2 True sage: c % 5 == 3 True Note that this also works for polynomial rings:: sage: K.<a> = NumberField(x^3 - 7) sage: R.<y> = K[] sage: f = y^2 + 3 sage: g = y^3 - 5 sage: CRT(1,3,f,g) -3/26*y^4 + 5/26*y^3 + 15/26*y + 53/26 sage: CRT(1,a,f,g) (-3/52*a + 3/52)*y^4 + (5/52*a - 5/52)*y^3 + (15/52*a - 15/52)*y + 27/52*a + 25/52 You can also do this for any number of moduli:: sage: K.<a> = NumberField(x^3 - 7) sage: R.<x> = K[] sage: CRT([], []) 0 sage: CRT([a], [x]) a sage: f = x^2 + 3 sage: g = x^3 - 5 sage: h = x^5 + x^2 - 9 sage: k = CRT([1, a, 3], [f, g, h]); k (127/26988*a - 5807/386828)*x^9 + (45/8996*a - 33677/1160484)*x^8 + (2/173*a - 6/173)*x^7 + (133/6747*a - 5373/96707)*x^6 + (-6/2249*a + 18584/290121)*x^5 + (-277/8996*a + 38847/386828)*x^4 + (-135/4498*a + 42673/193414)*x^3 + (-1005/8996*a + 470245/1160484)*x^2 + (-1215/8996*a + 141165/386828)*x + 621/8996*a + 836445/386828 sage: k.mod(f) 1 sage: k.mod(g) a sage: k.mod(h) 3 If the moduli are not coprime, a solution may not exist:: sage: crt(4,8,8,12) 20 sage: crt(4,6,8,12) Traceback (most recent call last): ... ValueError: No solution to crt problem since gcd(8,12) does not divide 4-6 sage: x = polygen(QQ) sage: crt(2,3,x-1,x+1) -1/2*x + 5/2 sage: crt(2,x,x^2-1,x^2+1) -1/2*x^3 + x^2 + 1/2*x + 1 sage: crt(2,x,x^2-1,x^3-1) Traceback (most recent call last): ... ValueError: No solution to crt problem since gcd(x^2 - 1,x^3 - 1) does not divide 2-x """ if isinstance(a,list): return CRT_list(a,b) g, alpha, beta = XGCD(m,n) q,r = (b-a).quo_rem(g) if r!=0: raise ValueError, "No solution to crt problem since gcd(%s,%s) does not divide %s-%s"%(m,n,a,b) return (a+q*alpha*m) % lcm(m,n)
c4c4857b06059d9fdba46cbaf64ffd83c3f8bac4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/c4c4857b06059d9fdba46cbaf64ffd83c3f8bac4/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30677, 12, 69, 16, 70, 16, 81, 33, 7036, 16, 82, 33, 7036, 4672, 436, 8395, 2860, 279, 6959, 358, 279, 1680, 25331, 2663, 25407, 1021, 479, 81, 6199, 18, 225, 12943, 30, 225, 300, 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, 30677, 12, 69, 16, 70, 16, 81, 33, 7036, 16, 82, 33, 7036, 4672, 436, 8395, 2860, 279, 6959, 358, 279, 1680, 25331, 2663, 25407, 1021, 479, 81, 6199, 18, 225, 12943, 30, 225, 300, 12...
raise errors.BlockDeviceError("command: %s error: %s - %s" % (result.cmd, result.fail_reason, result.output))
_ThrowError("command: %s error: %s - %s", result.cmd, result.fail_reason, result.output)
def Snapshot(self, size): """Create a snapshot copy of an lvm block device.
82463074c0c011a83cf2239affbdb44cb2940801 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/82463074c0c011a83cf2239affbdb44cb2940801/bdev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10030, 12, 2890, 16, 963, 4672, 3536, 1684, 279, 4439, 1610, 434, 392, 328, 3489, 1203, 2346, 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, ...
[ 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10030, 12, 2890, 16, 963, 4672, 3536, 1684, 279, 4439, 1610, 434, 392, 328, 3489, 1203, 2346, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
""" Create the test suite for the given path """
""" Create the test suite for the given path. """
def make_suite(path=test_dir): """ Create the test suite for the given path """ loader = unittest.TestLoader() python_module_names = get_python_module_names(os.listdir(path)) test_module_names = get_test_module_names(python_module_names) suite = loader.loadTestsFromNames(test_module_names) return suite
f197f660de27f119c9000bdd2c634e6960ce4fd0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4939/f197f660de27f119c9000bdd2c634e6960ce4fd0/scaffold.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 30676, 12, 803, 33, 3813, 67, 1214, 4672, 3536, 1788, 326, 1842, 11371, 364, 326, 864, 589, 18, 3536, 4088, 273, 2836, 3813, 18, 4709, 2886, 1435, 5790, 67, 2978, 67, 1973, 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, 1221, 67, 30676, 12, 803, 33, 3813, 67, 1214, 4672, 3536, 1788, 326, 1842, 11371, 364, 326, 864, 589, 18, 3536, 4088, 273, 2836, 3813, 18, 4709, 2886, 1435, 5790, 67, 2978, 67, 1973, 2...
return self._type.check_feature(feature)
return self.__disk.type.check_feature(feature)
def supportsFeature(self, feature): """Check that the disk type supports the provided feature.""" return self._type.check_feature(feature)
68e7a8aa6f15bf543db5837aaf4dcf6c5ebebe0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5978/68e7a8aa6f15bf543db5837aaf4dcf6c5ebebe0d/disk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6146, 4595, 12, 2890, 16, 2572, 4672, 3536, 1564, 716, 326, 4234, 618, 6146, 326, 2112, 2572, 12123, 327, 365, 6315, 723, 18, 1893, 67, 7238, 12, 7238, 13, 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, 0, 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, 6146, 4595, 12, 2890, 16, 2572, 4672, 3536, 1564, 716, 326, 4234, 618, 6146, 326, 2112, 2572, 12123, 327, 365, 6315, 723, 18, 1893, 67, 7238, 12, 7238, 13, 2, -100, -100, -100, -100, -...
return run_sql("UPDATE schTASK SET status=%s where id=%s", (val, options["task"]))
return run_sql("UPDATE schTASK SET status=%s WHERE id=%s", (val, options["task"]))
def task_update_status(val): """Updates status information in the BibSched task table.""" global options if options["verbose"] >= 9: write_message("Updating task status to %s." % val) return run_sql("UPDATE schTASK SET status=%s where id=%s", (val, options["task"]))
c01e7675eac4ac02844b96fe38be4646d43de28c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/c01e7675eac4ac02844b96fe38be4646d43de28c/bibupload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1562, 67, 2725, 67, 2327, 12, 1125, 4672, 3536, 5121, 1267, 1779, 316, 326, 605, 495, 55, 2049, 1562, 1014, 12123, 2552, 702, 309, 702, 9614, 11369, 11929, 1545, 2468, 30, 1045, 67, 2150...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1562, 67, 2725, 67, 2327, 12, 1125, 4672, 3536, 5121, 1267, 1779, 316, 326, 605, 495, 55, 2049, 1562, 1014, 12123, 2552, 702, 309, 702, 9614, 11369, 11929, 1545, 2468, 30, 1045, 67, 2150...
2) 'dir' actually exists, and is a directory.""" if dir is not None and os.path.isdir(dir) and dir not in dirlist: dirlist.insert(0, dir)
2) 'dir' actually exists, and is a directory. """ if dir is None or not os.path.isdir(dir) or dir in dirlist: return for i, path in enumerate(dirlist): if not os.path.isabs(path): dirlist.insert(i + 1, dir) break
def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if 1) 'dir' is not already in 'dirlist' 2) 'dir' actually exists, and is a directory.""" if dir is not None and os.path.isdir(dir) and dir not in dirlist: dirlist.insert(0, dir)
cca5eb64cd979db2e9202838a2db1399aa7b8888 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/cca5eb64cd979db2e9202838a2db1399aa7b8888/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1214, 67, 869, 67, 1098, 12, 1214, 1098, 16, 1577, 4672, 3536, 986, 326, 1867, 296, 1214, 11, 358, 326, 666, 296, 1214, 1098, 11, 261, 270, 326, 6641, 13, 309, 404, 13, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1214, 67, 869, 67, 1098, 12, 1214, 1098, 16, 1577, 4672, 3536, 986, 326, 1867, 296, 1214, 11, 358, 326, 666, 296, 1214, 1098, 11, 261, 270, 326, 6641, 13, 309, 404, 13, 296,...
box2 = gtk.VBox(spacing=20)
box2 = gtk.VBox() box2.set_border_width(15)
def __init__(self): # Game controller. self.controller = Hangman()
c99805dc8b4ef85ccdd69038d55cff9b79b6a2ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/c99805dc8b4ef85ccdd69038d55cff9b79b6a2ea/Hangman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 14121, 2596, 18, 365, 18, 5723, 273, 670, 539, 4728, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 14121, 2596, 18, 365, 18, 5723, 273, 670, 539, 4728, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
B = (10**A.hadamard_bound()) // d + 1
B = (10**A.hadamard_bound()) + 1
def det_given_divisor(A, d, proof=True, stabilize=2): """ Given a divisor d of the determinant of A, compute the determinant of A. INPUT: A -- a square integer matrix d -- a nonzero integer that is assumed to divide the determinant of A proof -- bool (default True) compute det modulo enough primes so that the determinant is computed provably correctly (via the Hadamard bound). It would be VERY hard for det to fail even with proof=False. stabilize -- int (default: 2) if proof = False, then compute det mod p until stabilize successive modulo det computations stabilize. OUTPUT: integer -- determinant EXAMPLES: sage: import sage.matrix.matrix_integer_dense_hnf as matrix_integer_dense_hnf sage: a = matrix(ZZ,3,[-1, -1, -1, -20, 4, 1, -1, 1, 2]) sage: matrix_integer_dense_hnf.det_given_divisor(a, 3) -30 sage: matrix_integer_dense_hnf.det_given_divisor(a, 3, proof=False) -30 sage: matrix_integer_dense_hnf.det_given_divisor(a, 3, proof=False, stabilize=1) -30 sage: a.det() -30 Here we illustrate proof=False giving a wrong answer: sage: p = matrix_integer_dense_hnf.max_det_prime(2) sage: q = previous_prime(p) sage: a = matrix(ZZ, 2, [p, 0, 0, q]) sage: p * q 1125899772623531 sage: matrix_integer_dense_hnf.det_given_divisor(a, 1, proof=False, stabilize=2) 0 This still works, because we don't work modulo primes that divide the determinant bound, which is found using a p-adic algorithm. sage: a.det(proof=False, stabilize=2) 1125899772623531 3 primes is enough: sage: matrix_integer_dense_hnf.det_given_divisor(a, 1, proof=False, stabilize=3) 1125899772623531 sage: matrix_integer_dense_hnf.det_given_divisor(a, 1, proof=False, stabilize=5) 1125899772623531 sage: matrix_integer_dense_hnf.det_given_divisor(a, 1, proof=True) 1125899772623531 """ p = max_det_prime(A.nrows()) z_mod = [] moduli = [] assert d != 0 if proof: N = 1 B = (10**A.hadamard_bound()) // d + 1 dd = d # bad verbose statement, since computing the log overflows! est = int(RR(B).log() / RR(p).log()) + 1 cnt = 1 verbose("Multimodular det -- need to use about %s primes."%est, level=1) while N < B: if d % p != 0: tm = cputime() dd = det_from_modp_and_divisor(A, d, p, z_mod, moduli) N *= p verbose("computed det mod p=%s which is %s (of about %s)"%(p, cnt, est), tm) p = previous_prime(p) cnt += 1 return dd else: val = [] while True: if d % p != 0: tm = cputime() dd = det_from_modp_and_divisor(A, d, p, z_mod, moduli) verbose("computed det mod %s"%p, tm) val.append(dd) if len(val) >= stabilize and len(set(val[-stabilize:])) == 1: return val[-1] p = previous_prime(p)
a62257babbc1b864e9c9d92a8ea9c3f6fe2c2085 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/a62257babbc1b864e9c9d92a8ea9c3f6fe2c2085/matrix_integer_dense_hnf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3023, 67, 10822, 67, 2892, 12385, 12, 37, 16, 302, 16, 14601, 33, 5510, 16, 384, 22681, 554, 33, 22, 4672, 3536, 16803, 279, 15013, 302, 434, 326, 6328, 970, 434, 432, 16, 3671, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3023, 67, 10822, 67, 2892, 12385, 12, 37, 16, 302, 16, 14601, 33, 5510, 16, 384, 22681, 554, 33, 22, 4672, 3536, 16803, 279, 15013, 302, 434, 326, 6328, 970, 434, 432, 16, 3671, 326, ...
elif where=='class': str += I+'<th '+WIDTH+' class="navbar">&nbsp;&nbsp;&nbsp;' str += '<a class="navbar" href="'+`uid.module()`+'.html">' str += 'Module</a>&nbsp;&nbsp;&nbsp;</th>\n' elif where=='module':
elif isinstance(where, UID) and where.is_package(): str += I+'<th '+WIDTH+' bgcolor=" str += '&nbsp;&nbsp;&nbsp;Package&nbsp;&nbsp;&nbsp;</th>\n' elif isinstance(where, UID) and where.is_module():
def _navbar(self, where, uid=None): """ @return: The HTML code for a navigation bar on the given type of page. The navigation bar typically looks like:: [ Package Module Class Tree Index Help ] @rtype: C{string} @param where: The type of page for which a navigation bar should be generated. Possible values are C{'class'}, C{'module'}, C{'package'}, C{'tree'}, C{'index'}, and C{'help'}. @type where: C{string} """ str = self._start_of('Navbar') str += '<table class="navbar" border="0" width="100%"' str += ' cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">\n' str += ' <tr>\n' str += ' <td width="100%">\n' str += ' <table border="0" cellpadding="0" cellspacing="0">\n' str += ' <tr valign="top">\n'
60b4598f963657af72659f4c3492b6028c51c37e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/60b4598f963657af72659f4c3492b6028c51c37e/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 10394, 4653, 603, 326, 864, 618, 434, 1363, 18, 225, 1021, 10394, 4653, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 10394, 4653, 603, 326, 864, 618, 434, 1363, 18, 225, 1021, 10394, 4653, ...
t.errWriteln("Couldn't dump to %s (constructed from %s)" %\
T.errWriteln("Couldn't dump to %s (constructed from %s)" %\
def dump( self, o ): """ Try to pickle an object to the currently valid path. @return: the absolute path to which o was pickled @rtype: str """ try: f = self.local() t.Dump( f, o ) return f except: t.errWriteln("Couldn't dump to %s (constructed from %s)" %\ self.formatted(), self.local() ) raise
3c3e49363a7a3c916b648c6154d8aef255c31d3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/482/3c3e49363a7a3c916b648c6154d8aef255c31d3e/LocalPath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 365, 16, 320, 262, 30, 3536, 6161, 358, 13379, 392, 733, 358, 326, 4551, 923, 589, 18, 225, 632, 2463, 30, 326, 4967, 589, 358, 1492, 320, 1703, 6002, 1259, 632, 86, 723, 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, 4657, 12, 365, 16, 320, 262, 30, 3536, 6161, 358, 13379, 392, 733, 358, 326, 4551, 923, 589, 18, 225, 632, 2463, 30, 326, 4967, 589, 358, 1492, 320, 1703, 6002, 1259, 632, 86, 723, 3...
elif Flag._attrMap['kind'].validate(name):
elif name[-5:]=='_Flag' and Flag._attrMap['kind'].validate(name[:-5]):
def makeMarker(name): if Marker._attrMap['kind'].validate(name): m = Marker() m.kind = name elif Flag._attrMap['kind'].validate(name): m = Flag() m.kind = name m.size = 10 else: raise ValueError, "Invalid marker name %s" % name return m
24877000958f9dfdebd1ed83d3c315a534d27a48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/24877000958f9dfdebd1ed83d3c315a534d27a48/markers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 7078, 12, 529, 4672, 309, 14742, 6315, 1747, 863, 3292, 9224, 29489, 5662, 12, 529, 4672, 312, 273, 14742, 1435, 312, 18, 9224, 273, 508, 1327, 508, 18919, 25, 26894, 18920, 67, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 7078, 12, 529, 4672, 309, 14742, 6315, 1747, 863, 3292, 9224, 29489, 5662, 12, 529, 4672, 312, 273, 14742, 1435, 312, 18, 9224, 273, 508, 1327, 508, 18919, 25, 26894, 18920, 67, 46...
logging.getLogger().setLevel(old_level_name)
def post(self, diff, message=None, codereview_issue=None, cc=None): if not message: raise ScriptError("Rietveld requires a message.")
e370a5112998ea8302333524d3434d75eee0d728 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/e370a5112998ea8302333524d3434d75eee0d728/rietveld.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 16, 3122, 16, 883, 33, 7036, 16, 11012, 822, 1945, 67, 13882, 33, 7036, 16, 4946, 33, 7036, 4672, 309, 486, 883, 30, 1002, 7739, 668, 2932, 54, 6213, 90, 488, 4991, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 16, 3122, 16, 883, 33, 7036, 16, 11012, 822, 1945, 67, 13882, 33, 7036, 16, 4946, 33, 7036, 4672, 309, 486, 883, 30, 1002, 7739, 668, 2932, 54, 6213, 90, 488, 4991, 2...
if not subroot.startswith(fileroot): continue
if subroot.startswith(fileroot) and extension in extensions: found = True break if not found: raise IOError
def preview(self, row, document, command, offset, extensions=default_extensions): """ Preview subtitles with video player.
a45165f5892ab8e2b03583f4a8c9d8137726921c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12852/a45165f5892ab8e2b03583f4a8c9d8137726921c/preview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10143, 12, 2890, 16, 1027, 16, 1668, 16, 1296, 16, 1384, 16, 4418, 33, 1886, 67, 9489, 4672, 3536, 22289, 720, 17643, 598, 6191, 7291, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10143, 12, 2890, 16, 1027, 16, 1668, 16, 1296, 16, 1384, 16, 4418, 33, 1886, 67, 9489, 4672, 3536, 22289, 720, 17643, 598, 6191, 7291, 18, 2, -100, -100, -100, -100, -100, -100, -100, ...
for i, x in enumerate(self.backends): if x == cur_backend: found = True backend_index = i self.backendcombo.remove_text(i) self.backendcombo.append_text(x) if found: self.backendcombo.set_active(backend_index) else:
self.backendcombo.set_active(0) try: self.backendcombo.set_active(self.backends.index(cur_backend)) except ValueError:
def load_preferences_diag(self): """ Loads data into the preferences Dialog. """ self.wiredcheckbox.set_active(daemon.GetAlwaysShowWiredInterface()) self.reconnectcheckbox.set_active(daemon.GetAutoReconnect()) self.debugmodecheckbox.set_active(daemon.GetDebugMode()) self.displaytypecheckbox.set_active(daemon.GetSignalDisplayType()) dhcp_list = [self.dhcpautoradio, self.dhclientradio, self.dhcpcdradio, self.pumpradio] dhcp_method = daemon.GetDHCPClient() dhcp_list[dhcp_method].set_active(True) wired_link_list = [self.linkautoradio, self.ethtoolradio, self.miitoolradio] wired_link_method = daemon.GetLinkDetectionTool() wired_link_list[wired_link_method].set_active(True)
737dc3ba39c831783a4447ece612794251990552 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/353/737dc3ba39c831783a4447ece612794251990552/prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 23219, 67, 12264, 12, 2890, 4672, 3536, 4444, 87, 501, 1368, 326, 12750, 17242, 18, 3536, 225, 365, 18, 91, 2921, 12017, 18, 542, 67, 3535, 12, 21511, 18, 967, 18806, 5706, 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, 1262, 67, 23219, 67, 12264, 12, 2890, 4672, 3536, 4444, 87, 501, 1368, 326, 12750, 17242, 18, 3536, 225, 365, 18, 91, 2921, 12017, 18, 542, 67, 3535, 12, 21511, 18, 967, 18806, 5706, 5...
slides and zero-lag within that group.
slides (except zero-lag) within that group.
def get_next_id(connection, table, id_column): """ Gets the next available id in the specified id_column in the specified table. """ sqlquery = ' '.join(['SELECT', id_column, 'FROM', table ]) ids = [id[0] for id in connection.cursor().execute(sqlquery)] idnums = [int(id.split(':')[2]) for id in ids] new_idnum = max(idnums) + 1 new_id = ':'.join([ids[0].split(':')[0], ids[1].split(':')[1], str(new_idnum)]) return new_id
a54be2507ff78f3bdc42f1d484cd3cdd22558e03 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/a54be2507ff78f3bdc42f1d484cd3cdd22558e03/ligolw_sqlutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4285, 67, 350, 12, 4071, 16, 1014, 16, 612, 67, 2827, 4672, 3536, 11881, 326, 1024, 2319, 612, 316, 326, 1269, 612, 67, 2827, 316, 326, 1269, 1014, 18, 3536, 1847, 2271, 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, 336, 67, 4285, 67, 350, 12, 4071, 16, 1014, 16, 612, 67, 2827, 4672, 3536, 11881, 326, 1024, 2319, 612, 316, 326, 1269, 612, 67, 2827, 316, 326, 1269, 1014, 18, 3536, 1847, 2271, 273, ...
write, read, err = util.popen3(cmd, env=env, newlines=True) retdata = read.read() err = err.read().strip() if err: raise util.Abort(err) return retdata
p = subprocess.Popen(cmd, shell=True, bufsize=-1, close_fds=util.closefds, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, env=env) stdout, stderr = p.communicate() stderr = stderr.strip() if stderr: raise util.Abort(stderr) return stdout
def _svncommand(self, commands, filename=''): path = os.path.join(self._ctx._repo.origroot, self._path, filename) cmd = ['svn'] + commands + [path] cmd = [util.shellquote(arg) for arg in cmd] cmd = util.quotecommand(' '.join(cmd)) env = dict(os.environ) # Avoid localized output, preserve current locale for everything else. env['LC_MESSAGES'] = 'C' write, read, err = util.popen3(cmd, env=env, newlines=True) retdata = read.read() err = err.read().strip() if err: raise util.Abort(err) return retdata
648ea26d1c60da5187dfc3e3fb467d752b5cfa27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/648ea26d1c60da5187dfc3e3fb467d752b5cfa27/subrepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 31505, 3076, 12, 2890, 16, 4364, 16, 1544, 2218, 11, 4672, 589, 273, 1140, 18, 803, 18, 5701, 12, 2890, 6315, 5900, 6315, 7422, 18, 4949, 3085, 16, 365, 6315, 803, 16, 1544, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 31505, 3076, 12, 2890, 16, 4364, 16, 1544, 2218, 11, 4672, 589, 273, 1140, 18, 803, 18, 5701, 12, 2890, 6315, 5900, 6315, 7422, 18, 4949, 3085, 16, 365, 6315, 803, 16, 1544, 13, ...
_UpdateProcThreadAttribute(ctypes.byref(lpAttributeList), 0, Attribute, lpValue, cbSize, NULL, NULL)
_UpdateProcThreadAttribute(ctypes.byref(lpAttributeList), 0, Attribute, ctypes.byref(Value), cbSize, None, None)
def UpdateProcThreadAttribute(lpAttributeList, Attribute, Value, cbSize = None): _UpdateProcThreadAttribute = windll.kernel32.UpdateProcThreadAttribute _UpdateProcThreadAttribute.argtypes = [LPPROC_THREAD_ATTRIBUTE_LIST, DWORD, SIZE_T, PVOID, SIZE_T, PVOID, PSIZE_T] _UpdateProcThreadAttribute.restype = bool _UpdateProcThreadAttribute.errcheck = RaiseIfZero Attribute = DWORD(Attribute) lpValue = ctypes.cast(ctypes.pointer(Value), PVOID) if cbSize is None: cbSize = ctypes.sizeof(Value) _UpdateProcThreadAttribute(ctypes.byref(lpAttributeList), 0, Attribute, lpValue, cbSize, NULL, NULL)
84dca437d09c6db2d383060ad8d6c6f94c8d3e4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/84dca437d09c6db2d383060ad8d6c6f94c8d3e4c/kernel32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 15417, 3830, 1499, 12, 9953, 1499, 682, 16, 3601, 16, 1445, 16, 2875, 1225, 273, 599, 4672, 389, 1891, 15417, 3830, 1499, 273, 17064, 2906, 18, 8111, 1578, 18, 1891, 15417, 3830, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 15417, 3830, 1499, 12, 9953, 1499, 682, 16, 3601, 16, 1445, 16, 2875, 1225, 273, 599, 4672, 389, 1891, 15417, 3830, 1499, 273, 17064, 2906, 18, 8111, 1578, 18, 1891, 15417, 3830, 1...
elif self.category_clist.get_text(row,0)== "Package Selection":
elif self.category_clist.get_text(row,0)== "X Configuration":
def select_category(self, event, row, column, data): if self.category_clist.get_text(row,0)== "Basic Configuration": #change notebook tab self.options_notebook.set_page(0) return elif self.category_clist.get_text(row,0)== "Installation Method": self.options_notebook.set_page(1) return elif self.category_clist.get_text(row,0)== "Partition Information": self.options_notebook.set_page(2) return elif self.category_clist.get_text(row,0)== "Network Configuration": self.options_notebook.set_page(3) return elif self.category_clist.get_text(row,0)== "Authentication": self.options_notebook.set_page(4) return elif self.category_clist.get_text(row,0)== "Firewall Configuration": self.options_notebook.set_page(5) return elif self.category_clist.get_text(row,0)== "X Configuration": self.options_notebook.set_page(6) return elif self.category_clist.get_text(row,0)== "Package Selection": self.options_notebook.set_page(7) return elif self.category_clist.get_text(row,0)== "Pre-Installation Script": self.options_notebook.set_page(8) return elif self.category_clist.get_text(row,0)== "Post-Installation Script": self.options_notebook.set_page(9) return
670901cae1d7c7052675a7ab4c0b846af01c40d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5376/670901cae1d7c7052675a7ab4c0b846af01c40d6/ksconfig_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 4743, 12, 2890, 16, 871, 16, 1027, 16, 1057, 16, 501, 4672, 309, 365, 18, 4743, 67, 830, 376, 18, 588, 67, 955, 12, 492, 16, 20, 13, 631, 315, 8252, 4659, 6877, 468, 3427...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 4743, 12, 2890, 16, 871, 16, 1027, 16, 1057, 16, 501, 4672, 309, 365, 18, 4743, 67, 830, 376, 18, 588, 67, 955, 12, 492, 16, 20, 13, 631, 315, 8252, 4659, 6877, 468, 3427...
if axis is not None:
if axis is not None and axis > 0:
def any(self, axis=None, out=None):
ce23e8f09f38a59b3eda64bcd0f7dcdf9fa7b8d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/ce23e8f09f38a59b3eda64bcd0f7dcdf9fa7b8d8/farray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1281, 12, 2890, 16, 2654, 33, 7036, 16, 596, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1281, 12, 2890, 16, 2654, 33, 7036, 16, 596, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
import IRC return "%s%s %s" % (" ".join(metadata), IRC.format(':', 'bold'), log)
from IRC.Formatting import format return "%s%s %s" % (" ".join(metadata), format(':', 'bold'), log)
def joinMessage(self, metadata, log): import IRC return "%s%s %s" % (" ".join(metadata), IRC.format(':', 'bold'), log)
d830e60292e5b3177afd7169fb02bbe99a80d291 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/d830e60292e5b3177afd7169fb02bbe99a80d291/Formatters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 1079, 12, 2890, 16, 1982, 16, 613, 4672, 1930, 467, 11529, 327, 2213, 87, 9, 87, 738, 87, 6, 738, 7566, 3552, 5701, 12, 4165, 3631, 467, 11529, 18, 2139, 2668, 30, 2187, 296, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 1079, 12, 2890, 16, 1982, 16, 613, 4672, 1930, 467, 11529, 327, 2213, 87, 9, 87, 738, 87, 6, 738, 7566, 3552, 5701, 12, 4165, 3631, 467, 11529, 18, 2139, 2668, 30, 2187, 296, 1...
default_locale = locale.setlocale(locale.LC_ALL) try: locale.setlocale(locale.LC_ALL, 'en') except: locale.setlocale(locale.LC_ALL, 'en_US') t.sort(lambda x, y: locale.strcoll(x[0], y[0])) locale.setlocale(locale.LC_ALL, default_locale)
if skey == 0: default_locale = locale.setlocale(locale.LC_ALL) try: locale.setlocale(locale.LC_ALL, 'en') except: locale.setlocale(locale.LC_ALL, 'en_US') t.sort(lambda x, y: locale.strcoll(x[0], y[0])) locale.setlocale(locale.LC_ALL, default_locale) else: t.sort()
def tt_get_messages(self, query, skey, rkey): """ Returns a list of messages, filtered and sorted according with the given parameters. @param query: query against the list of messages @type query: string @param skey: the sorting key @type skey: string @param rkey: indicates if the list must be reversed @type rkey: string """ msgs = [] langs = self.tt_get_languages_mapping() if skey == 'msg': skey = 0 try: regex = re.compile(query.strip().lower()) except: regex = re.compile('') msgs_append = msgs.append for m, t in self._messages.items(): if regex.search(m.lower()): e = [m] i = 1 for lang in langs: if skey == lang['code']: skey = i e.append(len(t.get(lang['code'], '').strip())>0) i = i + 1 msgs_append(tuple(e)) t = [(x[skey], x) for x in msgs] default_locale = locale.setlocale(locale.LC_ALL) try: locale.setlocale(locale.LC_ALL, 'en') except: locale.setlocale(locale.LC_ALL, 'en_US') t.sort(lambda x, y: locale.strcoll(x[0], y[0])) locale.setlocale(locale.LC_ALL, default_locale) if rkey: t.reverse() msgs = [val for (key, val) in t] return msgs
33a4c35794a8d9ed87371169964fe698ad32fee1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/33a4c35794a8d9ed87371169964fe698ad32fee1/TranslationsTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3574, 67, 588, 67, 6833, 12, 2890, 16, 843, 16, 272, 856, 16, 436, 856, 4672, 3536, 2860, 279, 666, 434, 2743, 16, 5105, 471, 3115, 4888, 598, 326, 864, 1472, 18, 632, 891, 843, 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, 3574, 67, 588, 67, 6833, 12, 2890, 16, 843, 16, 272, 856, 16, 436, 856, 4672, 3536, 2860, 279, 666, 434, 2743, 16, 5105, 471, 3115, 4888, 598, 326, 864, 1472, 18, 632, 891, 843, 30, ...
repos_lst.append((repo.name.lower(), repo.dbrepo.private,))
repos_lst.append((repo.name, repo.dbrepo.private,))
def _get_repos_switcher_cached(cached_repo_list): repos_lst = [] for repo in sorted(x for x in cached_repo_list.values()): if HasRepoPermissionAny('repository.write', 'repository.read', 'repository.admin')(repo.name.lower(), 'main page check'): repos_lst.append((repo.name.lower(), repo.dbrepo.private,)) return repos_lst
36c7bb8e278e42bdbe63b1b141bd6cf45e0d920a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/36c7bb8e278e42bdbe63b1b141bd6cf45e0d920a/hg_model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 15564, 67, 9610, 264, 67, 7097, 12, 7097, 67, 7422, 67, 1098, 4672, 13686, 67, 16923, 273, 5378, 364, 3538, 316, 3115, 12, 92, 364, 619, 316, 3472, 67, 7422, 67, 1098, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15564, 67, 9610, 264, 67, 7097, 12, 7097, 67, 7422, 67, 1098, 4672, 13686, 67, 16923, 273, 5378, 364, 3538, 316, 3115, 12, 92, 364, 619, 316, 3472, 67, 7422, 67, 1098, ...
if sys.platform != "darwin":
if sys.platform != "darwin" and \ not sys.platform.startswith('freebsd'):
def testAbles(self): try: f = _fileio._FileIO(TESTFN, "w") self.assertEquals(f.readable(), False) self.assertEquals(f.writable(), True) self.assertEquals(f.seekable(), True) f.close()
bafd209ac6be0a850220f2e339143248c3dd6217 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/bafd209ac6be0a850220f2e339143248c3dd6217/test_fileio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5895, 1040, 12, 2890, 4672, 775, 30, 284, 273, 389, 768, 1594, 6315, 812, 4294, 12, 16961, 19793, 16, 315, 91, 7923, 365, 18, 11231, 8867, 12, 74, 18, 11018, 9334, 1083, 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, 1842, 5895, 1040, 12, 2890, 4672, 775, 30, 284, 273, 389, 768, 1594, 6315, 812, 4294, 12, 16961, 19793, 16, 315, 91, 7923, 365, 18, 11231, 8867, 12, 74, 18, 11018, 9334, 1083, 13, 365,...
xid = self.window.get_xid() self.opacify_obj.deopacify(xid)
self.opacify_obj.deopacify(self.xid)
def deopacify(self): if self.deopacify_request_sid: gobject.source_remove(self.deopacify_request_sid) self.deopacify_request_sid = None if self.deopacify_sid: self.deopacify_sid = None xid = self.window.get_xid() self.opacify_obj.deopacify(xid)
e1ee65e34df89910451464c74294e52eb752eb47 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/e1ee65e34df89910451464c74294e52eb752eb47/windowbutton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 443, 556, 1077, 1164, 12, 2890, 4672, 309, 365, 18, 323, 556, 1077, 1164, 67, 2293, 67, 7453, 30, 314, 1612, 18, 3168, 67, 4479, 12, 2890, 18, 323, 556, 1077, 1164, 67, 2293, 67, 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, 443, 556, 1077, 1164, 12, 2890, 4672, 309, 365, 18, 323, 556, 1077, 1164, 67, 2293, 67, 7453, 30, 314, 1612, 18, 3168, 67, 4479, 12, 2890, 18, 323, 556, 1077, 1164, 67, 2293, 67, 745...
The date-time value returned is the given offset number of
The date-time value returned is the given offset number of
def __init__(self,*args): """Return a new date-time object
dac48d40f92c430f5ac9efaf8d551dd274897852 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/dac48d40f92c430f5ac9efaf8d551dd274897852/DateTime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14, 1968, 4672, 3536, 990, 279, 394, 1509, 17, 957, 733, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14, 1968, 4672, 3536, 990, 279, 394, 1509, 17, 957, 733, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.set_colors([stroke, fill]) else: self.set_colors([stroke, stroke]) if n == 1:
self._set_colors([stroke, fill]) else: self._set_colors([stroke, stroke]) if number == 1:
def cross_card(self, n, style, stroke, fill): svg_string = "" if style == "none": self.set_colors([stroke, WHITE]) elif style == "gradient": self.set_colors([stroke, fill]) else: self.set_colors([stroke, stroke]) if n == 1: svg_string += self._svg_cross(45.5) elif n == 2: svg_string += self._svg_cross(25.5) svg_string += self._svg_cross(65.5) else: svg_string += self._svg_cross( 5.5) svg_string += self._svg_cross(45.5) svg_string += self._svg_cross(85.5) return svg_string
3abdde2d4415b99e072401aa95cc310d13046e05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7609/3abdde2d4415b99e072401aa95cc310d13046e05/gencards.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6828, 67, 3327, 12, 2890, 16, 290, 16, 2154, 16, 11040, 16, 3636, 4672, 9804, 67, 1080, 273, 1408, 309, 2154, 422, 315, 6102, 6877, 365, 18, 542, 67, 9724, 3816, 16181, 16, 24353, 5717...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6828, 67, 3327, 12, 2890, 16, 290, 16, 2154, 16, 11040, 16, 3636, 4672, 9804, 67, 1080, 273, 1408, 309, 2154, 422, 315, 6102, 6877, 365, 18, 542, 67, 9724, 3816, 16181, 16, 24353, 5717...
for sliver in slivers:
for slicename in slivers:
def install_gids(api, slivers): # install node gid node_gid_path = config_dir + os.sep + "node.gid" node_gid = GID(filename=node_gid_file) node_gid_str = node_gid.save_to_string(save_parents=True) node_hrn = node_gid.get_hrn() # get currently installed slice and node gids interface_hrn = api.config.SFA_INTERFACE_HRN slice_gids = {} node_gids = {} for sliver in slivers: slice_gid_filename = "/vservers/%s/etc/slice.gid" % slicename node_gid_filename = "/vservers/%s/etc/node.gid" % slicename if os.path.isfile(slice_gid_filename): gid_file = open(slice_gid_filename, 'r') slice_gids[sliver] = gid_file.read() gid_file.close() if os.path.isfile(node_gid_filename): gid_file = open(node_gid_filename, 'r') node_gids[sliver] = gid_file.read() gid_file.close() # convert slicenames to hrns hrns = [slicename_to_hrn(interface_hrn, slicename) \ for slicename in slivers] # get current gids from registry cred = api.getCredential() registry = api.get_registry() records = registry.GetGids(cred, hrns) for record in records: # skip if this isnt a slice record if not record['type'] == 'slice': continue vserver_path = "/vservers/%(slicename)s" % locals() # skip if the slice isnt instantiated if not os.path.exists(vserver_path): continue # install slice gid if it doesnt already exist or has changed slice_gid_str = record['gid'] slicename = hrn_to_pl_slicename(record['hrn']) if slicename not in slice_gids or slice_gids[slicename] != slice_gid_str: gid_filename = os.sep.join([vserver_path, "etc", "slice.gid"]) GID(string=slice_gid_str).save_to_file(gid_filename, save_parents=True) # install slice gid if it doesnt already exist or has changed if slicename not in node_gids or node_gids[slicename] != node_gid_str: gid_filename = os.sep.join([vserver_path, "etc", "node.gid"]) GID(string=node_gid_str).save_to_file(gid_filename, save_parents=True)
a1b8649eb48bec7cddb692f115cdc806eddc9baf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6995/a1b8649eb48bec7cddb692f115cdc806eddc9baf/sfagids.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 75, 2232, 12, 2425, 16, 2020, 6760, 4672, 468, 3799, 756, 11399, 756, 67, 15780, 67, 803, 273, 642, 67, 1214, 397, 1140, 18, 10814, 397, 315, 2159, 18, 15780, 6, 756, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 75, 2232, 12, 2425, 16, 2020, 6760, 4672, 468, 3799, 756, 11399, 756, 67, 15780, 67, 803, 273, 642, 67, 1214, 397, 1140, 18, 10814, 397, 315, 2159, 18, 15780, 6, 756, 67, 1...
ldst t1, seg, sib, disp st reg, seg, sib, disp
ldstl t1, seg, sib, disp stul reg, seg, sib, disp
def macroop XCHG_M_R
11bb678a8017bba31c69847ee87212579b6b2f02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6787/11bb678a8017bba31c69847ee87212579b6b2f02/xchg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 1139, 1792, 43, 67, 49, 67, 54, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 1139, 1792, 43, 67, 49, 67, 54, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if self.config.html_out_suffix:
if self.config.html_file_suffix:
def init(self): """Load templates.""" self.init_templates() self.init_translator_class() if self.config.html_out_suffix: self.out_suffix = self.config.html_file_suffix
71b990e4d3101aa8d956673c8b7a6ef48e6b5180 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/71b990e4d3101aa8d956673c8b7a6ef48e6b5180/builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 4672, 3536, 2563, 5539, 12123, 365, 18, 2738, 67, 8502, 1435, 365, 18, 2738, 67, 17879, 67, 1106, 1435, 309, 365, 18, 1425, 18, 2620, 67, 768, 67, 8477, 30, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 4672, 3536, 2563, 5539, 12123, 365, 18, 2738, 67, 8502, 1435, 365, 18, 2738, 67, 17879, 67, 1106, 1435, 309, 365, 18, 1425, 18, 2620, 67, 768, 67, 8477, 30, 365, 18, ...
'original_size': (600,600),
'original_size': None,
def isBinary(self): return 1
95e032d7ba321f13c19bb473fd88f0e1ccb41c5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/95e032d7ba321f13c19bb473fd88f0e1ccb41c5c/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 5905, 12, 2890, 4672, 327, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 5905, 12, 2890, 4672, 327, 404, 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...
pkgNames = set([x.split(':')[-1] for x in troveNames])
pkgNames = set([x.split(':')[0] for x in troveNames])
def nextVersions(repos, db, sourceBinaryList, alwaysBumpCount=False): # search for all the packages that are being created by this cook - # we take the max of all of these versions as our latest. query = {} d = {} if repos: for sourceVersion, troveNames, troveFlavors in sourceBinaryList: if sourceVersion.isOnLocalHost(): continue pkgNames = set([x.split(':')[-1] for x in troveNames]) for pkgName in pkgNames: if pkgName not in query: query[pkgName] = {} label = sourceVersion.getBinaryVersion().trailingLabel() query[pkgName][label] = None d = repos.getTroveVersionsByLabel(query, troveTypes = repos.TROVE_QUERY_ALL) nextVersions = [] for sourceVersion, troveNames, troveFlavors in sourceBinaryList: if not isinstance(troveFlavors, (list, tuple, set)): troveFlavors = set([troveFlavors]) else: troveFlavors = set(troveFlavors) newVersion = _nextVersionFromQuery(d, db, troveNames, sourceVersion, troveFlavors, alwaysBumpCount=alwaysBumpCount) nextVersions.append(newVersion) return nextVersions
c0cd0d80d9f2dae814ca9a580d2aabf24001ebde /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/c0cd0d80d9f2dae814ca9a580d2aabf24001ebde/nextversion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 5940, 12, 15564, 16, 1319, 16, 1084, 5905, 682, 16, 3712, 38, 2801, 1380, 33, 8381, 4672, 468, 1623, 364, 777, 326, 5907, 716, 854, 3832, 2522, 635, 333, 15860, 300, 468, 732, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 5940, 12, 15564, 16, 1319, 16, 1084, 5905, 682, 16, 3712, 38, 2801, 1380, 33, 8381, 4672, 468, 1623, 364, 777, 326, 5907, 716, 854, 3832, 2522, 635, 333, 15860, 300, 468, 732, 48...
self.sip.app.debugMessage(message.toString()) self.sip.app.endCall(self.cookie, 'Other end sent %s'%message.toString()) self.sip._delCallObject(self.getCallID())
else: self.sip.app.debugMessage(message.toString()) self.sip.app.endCall(self.cookie, 'Other end sent %s'%message.toString()) self.sip._delCallObject(self.getCallID())
def recvResponse(self, message): state = self.getState() print "Handling %s while in state %s"%(message.code, state) if message.code in ( 100, 180, 181, 182 ): return elif message.code == 200: if state == 'SENT_INVITE': self.sip.app.debugMessage("Got Response 200\n") self.sendAck(message, startRTP=1) elif state == 'CONNECTED': self.sip.app.debugMessage('Got duplicate OK to our ACK') self.sendAck(message) elif state == 'SENT_BYE': self.sip.app.endCall(self.cookie) self.sip._delCallObject(self.getCallID()) self.sip.app.debugMessage("Hung up on call %s"%self.getCallID()) self.sip.app.statusMessage("idle") else: self.sip.app.debugMessage('Got OK in unexpected state %s'%state) elif message.code - (message.code%100) == 400: self.call_attempts += 1 if self.call_attempts > 5: print "TOO MANY AUTH FAILURES" self.setState('ABORTED') return if message.code == 401: if state in ( 'SENT_INVITE', ): a = message.headers.get('www-authenticate') if a: auth = self.calcAuth(method='INVITE', uri=str(self.remote), authhdr=a[0]) self.sendInvite(toAddr=None, auth=auth, authhdr='authorization') else: # We got bounced and told to bugger off. print "401, no further possible actions" else: print "Unknown state '%s' for a 401"%(state) elif message.code == 407: if state in ( 'SENT_INVITE', ): a = message.headers.get('proxy-authenticate') if a: auth = self.calcAuth(method='INVITE', uri=str(self.remote), authhdr=a[0]) self.sendInvite(toAddr=None, auth=auth, authhdr='proxy-authorization') else: # We got bounced and told to bugger off. print "407, no further possible actions"
897cd87170bee629b3594dd43d2026a496f62fa1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/897cd87170bee629b3594dd43d2026a496f62fa1/sip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 1064, 12, 2890, 16, 883, 4672, 919, 273, 365, 18, 588, 1119, 1435, 1172, 315, 14701, 738, 87, 1323, 316, 919, 738, 87, 6, 17105, 2150, 18, 710, 16, 919, 13, 309, 883, 18, 710,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 1064, 12, 2890, 16, 883, 4672, 919, 273, 365, 18, 588, 1119, 1435, 1172, 315, 14701, 738, 87, 1323, 316, 919, 738, 87, 6, 17105, 2150, 18, 710, 16, 919, 13, 309, 883, 18, 710,...
self.html[1] = self.load(self.pyfile.url)
self.html[1] = self.load(self.pyfile.url,ref=False) print self.html[1] sleep(1)
def freeWait(self): """downloads html with the important informations """ self.html[1] = self.load(self.pyfile.url) self.no_download = True
c175b751e48f0b533cc11f99aa0c636c70b73bc8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/c175b751e48f0b533cc11f99aa0c636c70b73bc8/RapidshareCom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4843, 5480, 12, 2890, 4672, 3536, 7813, 87, 1729, 598, 326, 10802, 26978, 3536, 365, 18, 2620, 63, 21, 65, 273, 365, 18, 945, 12, 2890, 18, 2074, 768, 18, 718, 16, 1734, 33, 8381, 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, 4843, 5480, 12, 2890, 4672, 3536, 7813, 87, 1729, 598, 326, 10802, 26978, 3536, 365, 18, 2620, 63, 21, 65, 273, 365, 18, 945, 12, 2890, 18, 2074, 768, 18, 718, 16, 1734, 33, 8381, 13...
except: transaction=None
def publish(self, module_name, after_list, published='web_objects',
835d90b27a6a934b9f526a4b0ced014ec0fd8cc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/835d90b27a6a934b9f526a4b0ced014ec0fd8cc1/Publish.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 12, 2890, 16, 1605, 67, 529, 16, 1839, 67, 1098, 16, 9487, 2218, 4875, 67, 6911, 2187, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 12, 2890, 16, 1605, 67, 529, 16, 1839, 67, 1098, 16, 9487, 2218, 4875, 67, 6911, 2187, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
DSTAUTO uses DSTADJUST for >=24h and DSTKEEP for < 24h recurconf.recrule delta minutes.
DSTAUTO uses DSTADJUST for a delta >=24h and DSTKEEP for < 24h.
def recurringSequenceTimeDelta(recurconf): """a sequence of integer objects. @param recurconf.start: a python datetime (non-naive) or Zope DateTime. @param recurconf.recrule: Timedelta as integer >=0 (unit is minutes) or None. @param recurconf.until: a python datetime (non-naive) or Zope DateTime >=start or None. @param recurconf.dst: is either DSTADJUST, DSTKEEP or DSTAUTO. On DSTADJUST we have a more human behaviour on daylight saving time changes: 8:00 on day before spring dst-change plus 24h results in 8:00 day after dst-change, which means in fact one hour less is added. On a recurconf.recrule < 24h this will fail! If DSTKEEP is selected, the time is added in its real hours, so the above example results in 9:00 on day after dst-change. DSTAUTO uses DSTADJUST for >=24h and DSTKEEP for < 24h recurconf.recrule delta minutes. @return: a sequence of dates """ start = recurconf.start delta = recurconf.recrule until = recurconf.until dst = recurconf.dst start = pydt(start) if delta is None or delta < 1 or until is None: yield start return yield start before = start until = pydt(until) delta = datetime.timedelta(minutes=delta) while True: after = before + delta after = recurrence_normalize(after, delta, dst) if utc(after) > utc(until): break yield after before = after
3a6bdc0dd355230e95a19cacc74b6b2d65aaa3dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14312/3a6bdc0dd355230e95a19cacc74b6b2d65aaa3dc/recurring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26043, 4021, 950, 9242, 12, 266, 1397, 3923, 4672, 3536, 69, 3102, 434, 3571, 2184, 18, 225, 632, 891, 8112, 3923, 18, 1937, 30, 279, 5790, 3314, 261, 5836, 17, 6582, 688, 13, 578, 228...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26043, 4021, 950, 9242, 12, 266, 1397, 3923, 4672, 3536, 69, 3102, 434, 3571, 2184, 18, 225, 632, 891, 8112, 3923, 18, 1937, 30, 279, 5790, 3314, 261, 5836, 17, 6582, 688, 13, 578, 228...
def get_metadata(stream): mr = MobiReader(stream) if mr.book_header.exth is None: mi = MetaInformation(mr.name, [_('Unknown')]) else: mi = mr.create_opf('dummy.html') try: if hasattr(mr.book_header.exth, 'cover_offset'): cover_index = mr.book_header.first_image_index + mr.book_header.exth.cover_offset data = mr.sections[int(cover_index)][0] else: data = mr.sections[mr.book_header.first_image_index][0] buf = cStringIO.StringIO(data) im = PILImage.open(buf) obuf = cStringIO.StringIO() im.convert('RGBA').save(obuf, format='JPEG') mi.cover_data = ('jpg', obuf.getvalue()) except: import traceback traceback.print_exc()
def get_metadata(stream): mi = MetaInformation(os.path.basename(stream.name), [_('Unknown')]) try: mh = MetadataHeader(stream) if mh.exth is not None: if mh.exth.mi is not None: mi = mh.exth.mi else: with TemporaryDirectory('_mobi_meta_reader') as tdir: mr = MobiReader(stream) mr.extract_content(tdir) if mr.embedded_mi is not None: mi = mr.embedded_mi if hasattr(mh.exth, 'cover_offset'): cover_index = mh.first_image_index + mh.exth.cover_offset data = mh.section_data(int(cover_index)) else: data = mh.section_data(mh.first_image_index) buf = cStringIO.StringIO(data) im = PILImage.open(buf) obuf = cStringIO.StringIO() im.convert('RGBA').save(obuf, format='JPEG') mi.cover_data = ('jpg', obuf.getvalue()) except: import traceback traceback.print_exc()
def get_metadata(stream): mr = MobiReader(stream) if mr.book_header.exth is None: mi = MetaInformation(mr.name, [_('Unknown')]) else: mi = mr.create_opf('dummy.html') try: if hasattr(mr.book_header.exth, 'cover_offset'): cover_index = mr.book_header.first_image_index + mr.book_header.exth.cover_offset data = mr.sections[int(cover_index)][0] else: data = mr.sections[mr.book_header.first_image_index][0] buf = cStringIO.StringIO(data) im = PILImage.open(buf) obuf = cStringIO.StringIO() im.convert('RGBA').save(obuf, format='JPEG') mi.cover_data = ('jpg', obuf.getvalue()) except: import traceback traceback.print_exc() return mi
3c70e352df9eb25eb23ab6ae6718245d83fa857f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/3c70e352df9eb25eb23ab6ae6718245d83fa857f/reader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4165, 12, 3256, 4672, 12837, 273, 6565, 5369, 12, 538, 18, 803, 18, 13909, 12, 3256, 18, 529, 3631, 306, 67, 2668, 4874, 6134, 5717, 775, 30, 17819, 273, 6912, 1864, 12, 3256,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4165, 12, 3256, 4672, 12837, 273, 6565, 5369, 12, 538, 18, 803, 18, 13909, 12, 3256, 18, 529, 3631, 306, 67, 2668, 4874, 6134, 5717, 775, 30, 17819, 273, 6912, 1864, 12, 3256,...
ForeignKey('users.username', onupdate="cascade")))
ForeignKey('users.username', onupdate="cascade")), test_needs_fk=True )
def define_tables(self, metadata): Table('users', metadata, Column('id', Integer, primary_key=True), Column('username', String(50), unique=True), Column('fullname', String(100)))
6515e84d4c7084d9276922786291f6e047b70b84 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1074/6515e84d4c7084d9276922786291f6e047b70b84/naturalpks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4426, 67, 9373, 12, 2890, 16, 1982, 4672, 3555, 2668, 5577, 2187, 1982, 16, 4753, 2668, 350, 2187, 2144, 16, 3354, 67, 856, 33, 5510, 3631, 4753, 2668, 5053, 2187, 514, 12, 3361, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4426, 67, 9373, 12, 2890, 16, 1982, 4672, 3555, 2668, 5577, 2187, 1982, 16, 4753, 2668, 350, 2187, 2144, 16, 3354, 67, 856, 33, 5510, 3631, 4753, 2668, 5053, 2187, 514, 12, 3361, 3631, ...
elif user.posts.count() >= settings.FORUM_STAR_3:
elif user.posts.count() >= forum_settings.FORUM_STAR_3:
def forum_stars(user): if user.posts.count() >= settings.FORUM_STAR_5: return mark_safe('<img src="%sforum/img/stars/Star_5.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_4_HALF: return mark_safe('<img src="%sforum/img/stars/Star_4_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_4: return mark_safe('<img src="%sforum/img/stars/Star_4.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_3_HALF: return mark_safe('<img src="%sforum/img/stars/Star_3_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_3: return mark_safe('<img src="%sforum/img/stars/Star_3.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_2_HALF: return mark_safe('<img src="%sforum/img/stars/Star_2_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_2: return mark_safe('<img src="%sforum/img/stars/Star_2.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_1_HALF: return mark_safe('<img src="%sforum/img/stars/Star_1_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_1: return mark_safe('<img src="%sforum/img/stars/Star_1.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_0_HALF: return mark_safe('<img src="%sforum/img/stars/Star_0_Half.gif" alt="" >' % (settings.MEDIA_URL)) else: return mark_safe('<img src="%sforum/img/stars/Star_0.gif" alt="" >' % (settings.MEDIA_URL))
b430105a803716ef07bbc496453cb34df28616a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13701/b430105a803716ef07bbc496453cb34df28616a9/forum_extras.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11283, 67, 334, 5913, 12, 1355, 4672, 309, 729, 18, 11660, 18, 1883, 1435, 1545, 1947, 18, 7473, 2799, 67, 20943, 67, 25, 30, 327, 2267, 67, 4626, 2668, 32, 6081, 1705, 11613, 87, 1172...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11283, 67, 334, 5913, 12, 1355, 4672, 309, 729, 18, 11660, 18, 1883, 1435, 1545, 1947, 18, 7473, 2799, 67, 20943, 67, 25, 30, 327, 2267, 67, 4626, 2668, 32, 6081, 1705, 11613, 87, 1172...
namespace['title'] = self.get_property('dc:title') or self.name
namespace['title'] = self.get_title_or_name()
def profile(self, context): root = context.root user = context.user
2ccbdf323709f4bf1fb1045f3d06d314e3776c4c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/2ccbdf323709f4bf1fb1045f3d06d314e3776c4c/users.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3042, 12, 2890, 16, 819, 4672, 1365, 273, 819, 18, 3085, 729, 273, 819, 18, 1355, 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, 3042, 12, 2890, 16, 819, 4672, 1365, 273, 819, 18, 3085, 729, 273, 819, 18, 1355, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
B = [2,3] for p in self.E.galois_representation().non_surjective():
B = [2, 3] for p in self.E.galois_representation().non_surjective():
def bound_kato(self): r""" Returns a list `p` of primes such that the theorems of Kato's [Ka] and others (e.g., as explained in a paper/thesis of Grigor Grigorov [Gri]) imply that if `p` divides the order of Sha(E) then `p` is in the list.
a65589b424a4f170a5aece0d1b80690d7bdd7d29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/a65589b424a4f170a5aece0d1b80690d7bdd7d29/sha_tate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2489, 67, 79, 31093, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 1375, 84, 68, 434, 846, 4485, 4123, 716, 326, 326, 479, 959, 434, 1475, 31093, 1807, 306, 47, 69, 65, 471, 10654, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2489, 67, 79, 31093, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 1375, 84, 68, 434, 846, 4485, 4123, 716, 326, 326, 479, 959, 434, 1475, 31093, 1807, 306, 47, 69, 65, 471, 10654, 261, ...
result = self.listDirectory(dirList,credDict) if not result['OK']: return result
result = self.listDirectory( dirList, credDict ) if not result['OK']: return result
def findFilesByMetadata(self,metaDict,credDict): """ Find Files satisfying the given metadata """ result = self.findDirectoriesByMetadata(metaDict,credDict) if not result['OK']: return result dirList = result['Value'] fileList = [] result = self.listDirectory(dirList,credDict) if not result['OK']: return result for dir in result['Value']['Successful']: for fname in result['Value']['Successful'][dir]['Files']: fileList.append(dir+'/'+os.path.basename(fname)) return S_OK(fileList)
127f98379e5064d0a5d5df2ba7ce74c780770faa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/127f98379e5064d0a5d5df2ba7ce74c780770faa/DirectoryMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 2697, 858, 2277, 12, 2890, 16, 3901, 5014, 16, 20610, 5014, 4672, 3536, 4163, 6471, 9281, 14946, 326, 864, 1982, 3536, 225, 563, 273, 365, 18, 4720, 13071, 858, 2277, 12, 3901, 501...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 2697, 858, 2277, 12, 2890, 16, 3901, 5014, 16, 20610, 5014, 4672, 3536, 4163, 6471, 9281, 14946, 326, 864, 1982, 3536, 225, 563, 273, 365, 18, 4720, 13071, 858, 2277, 12, 3901, 501...
def declare_ring(blocks,context):
def declare_ring(blocks,context=None):
def declare_ring(blocks,context): """Declare Ring is the preferred function to create a ring and declare a variable scheme, the number of variables is automatically determined, usually you pass globals() as context argument to store the ring and the variable mapping. Example declare_ring([Block("x",10),Block("y",5)],globals()) gives a ring with x(0..9),y(0..4) and registers the ring as r, and the variable blocks x and y in the context dictionary globals(), which consists of the global variables of the python module """ n=0 for b in blocks: if isinstance(b,str): n=n+1 else: n=n+len(b) #n=sum([len(b) for b in blocks]) r=Ring(n) declare_block_scheme(blocks,context) context["r"]=r return r
98565da462f398075511a910bd7063dffe22c4e1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2046/98565da462f398075511a910bd7063dffe22c4e1/blocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14196, 67, 8022, 12, 7996, 16, 2472, 33, 7036, 4672, 3536, 3456, 834, 25463, 353, 326, 9119, 445, 358, 752, 279, 9221, 471, 14196, 279, 2190, 4355, 16, 326, 1300, 434, 3152, 353, 6635, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14196, 67, 8022, 12, 7996, 16, 2472, 33, 7036, 4672, 3536, 3456, 834, 25463, 353, 326, 9119, 445, 358, 752, 279, 9221, 471, 14196, 279, 2190, 4355, 16, 326, 1300, 434, 3152, 353, 6635, ...
prefFile='%s/Library/Preferences/com.apple.mail.plist' % NSHomeDirectory()
prefFile='%s/Desktop/com.apple.mail.plist' % NSHomeDirectory()
def awakeFromNib(self): # Clean up Pop Up self.accountList.removeAllItems()
57ab6bef5efa47b78e83a444732ea9cdacaf9295 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4895/57ab6bef5efa47b78e83a444732ea9cdacaf9295/mailVirtualAppDelegate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1690, 911, 1265, 50, 495, 12, 2890, 4672, 468, 9645, 731, 10264, 1948, 365, 18, 4631, 682, 18, 4479, 1595, 3126, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1690, 911, 1265, 50, 495, 12, 2890, 4672, 468, 9645, 731, 10264, 1948, 365, 18, 4631, 682, 18, 4479, 1595, 3126, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return "%s_%sx%s.jpg" % (file, config.CONF.width, config.CONF.height) if config.CONF.width == 720 and os.path.isfile("%s_768x576.png" % file): return "%s_768x576.png" % file if config.CONF.width == 720 and os.path.isfile("%s_768x576.jpg" % file): return "%s_768x576.jpg" % file if os.path.isfile("%s_800x600.png" % file): return "%s_800x600.png" % file if os.path.isfile("%s_800x600.jpg" % file): return "%s_800x600.jpg" % file
return "%s_%sx%s.jpg" % (dfile, config.CONF.width, config.CONF.height) if config.CONF.width == 720 and os.path.isfile("%s_768x576.png" % dfile): return "%s_768x576.png" % dfile if config.CONF.width == 720 and os.path.isfile("%s_768x576.jpg" % dfile): return "%s_768x576.jpg" % dfile if os.path.isfile("%s_800x600.png" % dfile): return "%s_800x600.png" % dfile if os.path.isfile("%s_800x600.jpg" % dfile): return "%s_800x600.jpg" % dfile
def attr_file(node, attr, default, c_dir): if node.attrs.has_key(('', attr)): file = node.attrs[('', attr)].encode('latin-1') if file: file=os.path.join(c_dir, file) if os.path.isfile(file): return file if os.path.isfile("%s_%sx%s.png" % (file, config.CONF.width, config.CONF.height)): return "%s_%sx%s.png" % (file, config.CONF.width, config.CONF.height) if os.path.isfile("%s_%sx%s.jpg" % (file, config.CONF.width, config.CONF.height)): return "%s_%sx%s.jpg" % (file, config.CONF.width, config.CONF.height) if config.CONF.width == 720 and os.path.isfile("%s_768x576.png" % file): return "%s_768x576.png" % file if config.CONF.width == 720 and os.path.isfile("%s_768x576.jpg" % file): return "%s_768x576.jpg" % file if os.path.isfile("%s_800x600.png" % file): return "%s_800x600.png" % file if os.path.isfile("%s_800x600.jpg" % file): return "%s_800x600.jpg" % file return file return default
5b00e18952b799bcb6428c0d98ce150703eb2055 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/5b00e18952b799bcb6428c0d98ce150703eb2055/xml_skin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1604, 67, 768, 12, 2159, 16, 1604, 16, 805, 16, 276, 67, 1214, 4672, 309, 756, 18, 7039, 18, 5332, 67, 856, 12, 2668, 2187, 1604, 3719, 30, 585, 273, 756, 18, 7039, 63, 2668, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1604, 67, 768, 12, 2159, 16, 1604, 16, 805, 16, 276, 67, 1214, 4672, 309, 756, 18, 7039, 18, 5332, 67, 856, 12, 2668, 2187, 1604, 3719, 30, 585, 273, 756, 18, 7039, 63, 2668, 2187, ...
raise
wikipedia.stopme()
def main(): # How we want to retrieve information on which pages need to be changed. # Can either be 'sqldump', 'textfile' or 'userinput'. source = None # Array which will collect commandline parameters. # First element is original text, second element is replacement text. commandline_replacements = [] # A dictionary where keys are original texts and values are replacement texts. replacements = {} # Don't edit pages which contain certain texts. exceptions = [] # Should the elements of 'replacements' and 'exceptions' be interpreted # as regular expressions? regex = False # Predefined fixes from dictionary 'fixes' (see above). fix = None # the dump's path, either absolute or relative, which will be used when source # is 'sqldump'. sqlfilename = '' # the textfile's path, either absolute or relative, which will be used when # source is 'textfile'. textfilename = '' # a list of pages which will be used when source is 'userinput'. pagenames = [] # will become True when the user presses a ('yes to all') or uses the -always # commandline paramater. acceptall = False # Which namespace should be processed when using a SQL dump # default to -1 which means all namespaces will be processed namespace = -1 # Load default summary message. wikipedia.setAction(wikipedia.translate(wikipedia.getSite(), msg)) # Read commandline parameters. for arg in sys.argv[1:]: arg = wikipedia.argHandler(arg) if arg: if arg == '-regex': regex = True elif arg.startswith('-file'): if len(arg) == 5: textfilename = wikipedia.input(u'Please enter the filename:') else: textfilename = arg[6:] source = 'textfile' elif arg.startswith('-sql'): if len(arg) == 4: sqlfilename = wikipedia.input(u'Please enter the SQL dump\'s filename:') else: sqlfilename = arg[5:] source = 'sqldump' elif arg.startswith('-page'): if len(arg) == 5: pagenames.append(wikipedia.input(u'Which page do you want to chage?')) else: pagenames.append(arg[6:]) source = 'userinput' elif arg.startswith('-except:'): exceptions.append(arg[8:]) elif arg.startswith('-fix:'): fix = arg[5:] elif arg == '-always': acceptall = True elif arg.startswith('-namespace:'): namespace = int(arg[11:]) else: commandline_replacements.append(arg) if source == None or len(commandline_replacements) not in [0, 2]: # syntax error, show help text from the top of this file wikipedia.output(__doc__, 'utf-8') wikipedia.stopme() sys.exit() if (len(commandline_replacements) == 2 and fix == None): replacements[commandline_replacements[0]] = commandline_replacements[1] wikipedia.setAction(wikipedia.translate(wikipedia.getSite(), msg ) % ' (-' + commandline_replacements[0] + ' +' + commandline_replacements[1] + ')') elif fix == None: old = wikipedia.input(u'Please enter the text that should be replaced:') new = wikipedia.input(u'Please enter the new text:') change = '(-' + old + ' +' + new replacements[old] = new while True: old = wikipedia.input(u'Please enter another text that should be replaced, or press Enter to start:') if old == '': change = change + ')' break new = wikipedia.input(u'Please enter the new text:') change = change + ' & -' + old + ' +' + new replacements[old] = new default_summary_message = wikipedia.translate(wikipedia.getSite(), msg) % change wikipedia.output(u'The summary message will default to: %s' % default_summary_message) summary_message = wikipedia.input(u'Press Enter to use this default message, or enter a description of the changes your bot will make:') if summary_message == '': summary_message = default_summary_message wikipedia.setAction(summary_message) else: # Perform one of the predefined actions. try: fix = fixes[fix] except KeyError: wikipedia.output(u'Available predefined fixes are: %s' % fixes.keys()) wikipedia.stopme() sys.exit() if fix.has_key('regex'): regex = fix['regex'] if fix.has_key('msg'): wikipedia.setAction(wikipedia.translate(wikipedia.getSite(), fix['msg'])) if fix.has_key('exceptions'): exceptions = fix['exceptions'] replacements = fix['replacements'] # Run the generator which will yield PageLinks to pages which might need to be # changed. for pl in generator(source, replacements, exceptions, regex, namespace, textfilename, sqlfilename, pagenames): print '' try: # Load the page's text from the wiki original_text = pl.get() except wikipedia.NoPage: wikipedia.output(u'Page %s not found' % pl.linkname()) continue except wikipedia.LockedPage: wikipedia.output(u'Skipping locked page %s' % pl.linkname()) continue except wikipedia.IsRedirectPage: continue skip_page = False # skip all pages that contain certain texts for exception in exceptions: if regex: exception = re.compile(exception) hit = exception.search(original_text) if hit: wikipedia.output(u'Skipping %s because it contains %s' % (pl.linkname(), hit.group(0))) # Does anyone know how to break out of the _outer_ loop? # Then we wouldn't need the skip_page variable. skip_page = True break else: hit = original_text.find(exception) if hit != -1: wikipedia.output(u'Skipping %s because it contains %s' % (pl.linkname(), original_text[hit:hit + len(exception)])) skip_page = True break if not skip_page: # create a copy of the original text to work on, so we can later compare # if any changes were made new_text = original_text for old, new in replacements.items(): if regex: # TODO: compiling the regex each time might be inefficient old = re.compile(old) new_text = old.sub(new, new_text) else: new_text = new_text.replace(old, new) if new_text == original_text: try: # Sometime the bot crashes when it can't decode a character. # Let's not let it crash print 'No changes were necessary in %s' % pl.linkname() except UnicodeEncodeError: print 'Error decoding pl.linkname()' continue else: #wikipedia.showDiff(original_text, new_text) wikipedia.showColorDiff(original_text, new_text, replacements) if not acceptall: choice = wikipedia.input(u'Do you want to accept these changes? [y|n|a(ll)]') if choice in ['a', 'A']: acceptall = True if acceptall or choice in ['y', 'Y']: pl.put(new_text)
0f6111967a56439243352b05e70f6ac2ae37f280 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/0f6111967a56439243352b05e70f6ac2ae37f280/replace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 9017, 732, 2545, 358, 4614, 1779, 603, 1492, 4689, 1608, 358, 506, 3550, 18, 468, 4480, 3344, 506, 296, 4669, 8481, 2187, 296, 955, 768, 11, 578, 296, 1355, 2630, 10332...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 468, 9017, 732, 2545, 358, 4614, 1779, 603, 1492, 4689, 1608, 358, 506, 3550, 18, 468, 4480, 3344, 506, 296, 4669, 8481, 2187, 296, 955, 768, 11, 578, 296, 1355, 2630, 10332...
return (for_score - against_score) / max_score * 100
if max_score > 0: return (for_score - against_score) / max_score * 100 else: return 0.0
def party_score(self, party): # party_members_ids = party.members.all().values_list('id',flat=True) for_score = AgendaVote.objects.filter(agenda=self,vote__voteaction__member__in=party.members.all(),vote__voteaction__type="for").aggregate(Sum('score'))['score__sum'] or 0 against_score = AgendaVote.objects.filter(agenda=self,vote__voteaction__member__in=party.members.all(),vote__voteaction__type="against").aggregate(Sum('score'))['score__sum'] or 0 max_score = sum([abs(x) for x in self.agendavote_set.values_list('score', flat=True)]) * party.members.count() return (for_score - against_score) / max_score * 100
4ea3e0289657f924ee8a6bae7b5ed49dff14768b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1866/4ea3e0289657f924ee8a6bae7b5ed49dff14768b/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18285, 67, 6355, 12, 2890, 16, 18285, 4672, 468, 18285, 67, 7640, 67, 2232, 273, 18285, 18, 7640, 18, 454, 7675, 2372, 67, 1098, 2668, 350, 2187, 15401, 33, 5510, 13, 364, 67, 6355, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18285, 67, 6355, 12, 2890, 16, 18285, 4672, 468, 18285, 67, 7640, 67, 2232, 273, 18285, 18, 7640, 18, 454, 7675, 2372, 67, 1098, 2668, 350, 2187, 15401, 33, 5510, 13, 364, 67, 6355, 42...
(oldNode != source.getNode or oldEnabled != item.enabled)):
(oldNode != item.getNode or oldEnabled != item.enabled)):
def api_updateItem(self, request): """ Edit the contents of an item. {id} is the id of the item; other args are treated as updates to the item. """ item = self.api_getItem(request) args = dict(request.args) del args['id'] schema = dict(item.__class__.getSchema())
cabd2b02d4092f006ed0f458c7246acd2b40480f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11015/cabd2b02d4092f006ed0f458c7246acd2b40480f/web.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1536, 67, 2725, 1180, 12, 2890, 16, 590, 4672, 3536, 15328, 326, 2939, 434, 392, 761, 18, 288, 350, 97, 353, 326, 612, 434, 326, 761, 31, 1308, 833, 854, 13974, 487, 4533, 358, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1536, 67, 2725, 1180, 12, 2890, 16, 590, 4672, 3536, 15328, 326, 2939, 434, 392, 761, 18, 288, 350, 97, 353, 326, 612, 434, 326, 761, 31, 1308, 833, 854, 13974, 487, 4533, 358, 326, ...
self.album = vc['ALBUM'][0]
self.album = str(vc['ALBUM'][0])
def set_info_ogg( self, file ): """ Sets all the info variables with useful info from the oggfile.
0da363e44f41820457a5f385cbc8673190f46f40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/0da363e44f41820457a5f385cbc8673190f46f40/audioinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1376, 67, 23972, 12, 365, 16, 585, 262, 30, 3536, 11511, 777, 326, 1123, 3152, 598, 5301, 1123, 628, 326, 320, 14253, 768, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1376, 67, 23972, 12, 365, 16, 585, 262, 30, 3536, 11511, 777, 326, 1123, 3152, 598, 5301, 1123, 628, 326, 320, 14253, 768, 18, 2, -100, -100, -100, -100, -100, -100, -100, -10...
(wxMenuBar, 'wx.MenuBar', MenuBarDTC), (wxMenu, 'wx.Menu', MenuDTC), (wxImageList, 'wx.ImageList', ImageListDTC), (wxTimer, 'wx.Timer', TimerDTC), (wxStockCursor, 'wx.StockCursor', StockCursorDTC),
(wx.MenuBar, 'wx.MenuBar', MenuBarDTC), (wx.Menu, 'wx.Menu', MenuDTC), (wx.ImageList, 'wx.ImageList', ImageListDTC), (wx.Timer, 'wx.Timer', TimerDTC), (wx.StockCursor, 'wx.StockCursor', StockCursorDTC),
def designTimeSource(self, position='wx.DefaultPosition', size='wx.DefaultSize'): return {'id': 'wx.CURSOR_ARROW'}
fe776dc2ca0742866f15794198b01bacb2b96bb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/fe776dc2ca0742866f15794198b01bacb2b96bb2/UtilCompanions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8281, 950, 1830, 12, 2890, 16, 1754, 2218, 27226, 18, 1868, 2555, 2187, 963, 2218, 27226, 18, 1868, 1225, 11, 4672, 327, 13666, 350, 4278, 296, 27226, 18, 7509, 55, 916, 67, 985, 11226, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8281, 950, 1830, 12, 2890, 16, 1754, 2218, 27226, 18, 1868, 2555, 2187, 963, 2218, 27226, 18, 1868, 1225, 11, 4672, 327, 13666, 350, 4278, 296, 27226, 18, 7509, 55, 916, 67, 985, 11226, ...
callable = handler, args = ('registerAdapter', instance, (self.for_, self.request_type),
callable = gsm.registerAdapter, args = (instance, (self.for_, self.request_type),
def __call__(self, event=None, context=None, force_reload=False): if force_reload is False: settings = get_settings() auto_reload = settings and settings['reload_templates'] if not auto_reload: return
ec04d4c589ff5b72803d7cd07e58c9f7604c1358 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12476/ec04d4c589ff5b72803d7cd07e58c9f7604c1358/zcml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 871, 33, 7036, 16, 819, 33, 7036, 16, 2944, 67, 17517, 33, 8381, 4672, 309, 2944, 67, 17517, 353, 1083, 30, 1947, 273, 336, 67, 4272, 1435, 3656, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 871, 33, 7036, 16, 819, 33, 7036, 16, 2944, 67, 17517, 33, 8381, 4672, 309, 2944, 67, 17517, 353, 1083, 30, 1947, 273, 336, 67, 4272, 1435, 3656, 67, 1...
if model not in frozen_models: frozen_models[model] = last_models if field.rel.to not in last_models: frozen_models[field.rel.to] = last_models
"\n ".join(["('%s', orm[%r])," % (fname, mkey + ":" + fname) for fname, fdef in fields.items()]),
3d9dd56093a6f204e365347772658d2386226edf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/3d9dd56093a6f204e365347772658d2386226edf/startmigration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1548, 82, 5411, 3552, 5701, 3816, 6, 29909, 87, 2187, 13969, 14451, 86, 65, 3631, 6, 738, 261, 12749, 16, 312, 856, 397, 6153, 397, 5299, 13, 364, 5299, 16, 284, 536, 316, 1466, 18, 3319, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1548, 82, 5411, 3552, 5701, 3816, 6, 29909, 87, 2187, 13969, 14451, 86, 65, 3631, 6, 738, 261, 12749, 16, 312, 856, 397, 6153, 397, 5299, 13, 364, 5299, 16, 284, 536, 316, 1466, 18, 3319, ...
rsync_filenames_client += "tcos_share/%s " %( os.path.basename(filename) ) rsync_filenames_server += "%s " %( filename )
rsync_filenames_client += "tcos_share/%s " %( os.path.basename(filename).replace(" ", "\ ") ) rsync_filenames_server += "%s " %( filename.replace(" ", "\ ") )
def menu_event_one(self, action): start1=time() (model, iter) = self.main.tabla.get_selection().get_selected() if iter == None: print_debug( "menu_event_one() not selected thin client !!!" ) return self.main.selected_host=model.get_value(iter,0) self.main.selected_ip=model.get_value(iter, 1) if not self.doaction_onthisclient(action, self.main.selected_ip): # show a msg shared.info_msg ( _("Can't exec this action because you are connected at this host!") ) return if action == 0: # refresh terminal # call to read remote info self.main.xmlrpc.newhost(self.main.selected_ip) self.main.xmlrpc.ip=self.main.selected_ip self.main.worker=shared.Workers( self.main,\ target=self.populate_datatxt, args=([self.main.selected_ip]) ).start() if action == 1: # clean datatxtbuffer self.main.datatxt.clean() if action == 2: # Ask for reboot reboot ip=self.main.selected_ip msg=_( _("Do you want to reboot %s?" ) %(self.main.selected_ip) ) if shared.ask_msg ( msg ): self.main.xmlrpc.Exe("reboot") if action == 3: # Ask for poweroff reboot msg=_( _("Do you want to poweroff %s?" ) %(self.main.selected_ip) ) if shared.ask_msg ( msg ): self.main.xmlrpc.Exe("poweroff") if action == 4: # lock screen if not self.main.xmlrpc.lockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 5: # unlock screen if not self.main.xmlrpc.unlockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 6: # start ivs self.main.worker=shared.Workers(self.main, target=self.start_ivs, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 7: # start vnc self.main.worker=shared.Workers(self.main, target=self.start_vnc, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 8: # screenshot !!! self.main.worker=shared.Workers(self.main, target=self.get_screenshot, args=[self.main.selected_ip]) self.main.worker.start() if action == 9: # give a remote xterm throught SSH pass_msg=_("Enter password of remote thin client (if asked for it)") cmd="xterm -e \"echo '%s'; ssh root@%s\"" %(pass_msg, self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.exe_cmd( cmd ) if action == 10: # launch personalize settings if client is TCOS (PXES and LTSP not supported) client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": cmd="gksu \"tcospersonalize --host=%s\"" %(self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.exe_cmd( cmd ) else: shared.info_msg( _("%s is not supported to personalize!") %(client_type) )
4f60148a6b13d1d26b8eb734c605d0156a49db1b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13520/4f60148a6b13d1d26b8eb734c605d0156a49db1b/TcosActions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 476, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 261, 2284, 16, 1400, 13, 273, 365, 18, 5254, 18, 7032, 11821, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 476, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 261, 2284, 16, 1400, 13, 273, 365, 18, 5254, 18, 7032, 11821, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435...
userGroup)
userGroup )
def storeProxy(self, userDN, userGroup, chain ): """ Store user proxy into the Proxy repository for a user specified by his DN and group. """ #Get remaining secs retVal = chain.getRemainingSecs() if not retVal[ 'OK' ]: return retVal remainingSecs = retVal[ 'Value' ] if remainingSecs < self._minSecsToAllowStore: return S_ERROR( "Cannot store proxy, remaining secs %s is less than %s" %( remainingSecs, self._minSecsToAllowStore ) )
71763bc5d615265855ff68fdb1be8903192a3f1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/71763bc5d615265855ff68fdb1be8903192a3f1b/ProxyDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 3886, 12, 2890, 16, 729, 8609, 16, 26205, 16, 2687, 262, 30, 3536, 4994, 729, 2889, 1368, 326, 7659, 3352, 364, 279, 729, 1269, 635, 18423, 18001, 471, 1041, 18, 3536, 468, 967, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 3886, 12, 2890, 16, 729, 8609, 16, 26205, 16, 2687, 262, 30, 3536, 4994, 729, 2889, 1368, 326, 7659, 3352, 364, 279, 729, 1269, 635, 18423, 18001, 471, 1041, 18, 3536, 468, 967, ...
version = '0.13',
version = '0.14s1',
def swig_sources (self, sources):
bc3bdcaed68bb8c46fc6a468f34c2ec50a14082e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/bc3bdcaed68bb8c46fc6a468f34c2ec50a14082e/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1352, 360, 67, 10141, 261, 2890, 16, 5550, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1352, 360, 67, 10141, 261, 2890, 16, 5550, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.shape = (1,self.shape[0])
self.shape = (1,newshape[0])
def __array_finalize__(self, obj): ndim = self.ndim if (ndim == 2): return if (ndim > 2): newshape = tuple([x for x in self.shape if x > 1]) ndim = len(newshape) if ndim == 2: self.shape = newshape return elif (ndim > 2): raise ValueError, "shape too large to be a matrix." if ndim == 0: self.shape = (1,1) elif ndim == 1: self.shape = (1,self.shape[0]) return
59ae2e878fa70c47e7df5b948934aafb26ddd022 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/59ae2e878fa70c47e7df5b948934aafb26ddd022/defmatrix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1126, 67, 30343, 972, 12, 2890, 16, 1081, 4672, 9209, 273, 365, 18, 82, 3509, 309, 261, 82, 3509, 422, 576, 4672, 327, 309, 261, 82, 3509, 405, 576, 4672, 394, 4867, 273, 3193, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1126, 67, 30343, 972, 12, 2890, 16, 1081, 4672, 9209, 273, 365, 18, 82, 3509, 309, 261, 82, 3509, 422, 576, 4672, 327, 309, 261, 82, 3509, 405, 576, 4672, 394, 4867, 273, 3193, ...
elif song.type == TYPE_WAV and HAVE_WAV:
elif song.type in TYPE_WAV and HAVE_WAV:
def get_info(song): if song.type == TYPE_MP3 and HAVE_MP3: _mp3.get_info(song) elif song.type == TYPE_OGG and HAVE_OGG: _ogg.get_info(song) elif song.type == TYPE_FLAC and HAVE_FLAC: _flac.get_info(song) elif song.type == TYPE_WAV and HAVE_WAV: _wav.get_info(song) else: raise ValueError, 'Unsupported file %s (type: %s).' % (song.filename, song.type)
19bf661e3f8e021ce679f6ca2fd84c4584e3083c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4997/19bf661e3f8e021ce679f6ca2fd84c4584e3083c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 12, 816, 75, 4672, 309, 17180, 18, 723, 422, 3463, 67, 4566, 23, 471, 21926, 3412, 67, 4566, 23, 30, 389, 1291, 23, 18, 588, 67, 1376, 12, 816, 75, 13, 1327, 17180, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1376, 12, 816, 75, 4672, 309, 17180, 18, 723, 422, 3463, 67, 4566, 23, 471, 21926, 3412, 67, 4566, 23, 30, 389, 1291, 23, 18, 588, 67, 1376, 12, 816, 75, 13, 1327, 17180, ...
raise DistutilsFileErorr, \
raise DistutilsFileError, \
def check_package (self, package, package_dir):
183cbe21fb39b87f6a432c9a7349a8bf69f10559 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/183cbe21fb39b87f6a432c9a7349a8bf69f10559/build_py.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 5610, 261, 2890, 16, 2181, 16, 2181, 67, 1214, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 5610, 261, 2890, 16, 2181, 16, 2181, 67, 1214, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.assertRaises(TypeError, list, izip(N(s)))
self.assertRaises(TypeError, izip, N(s))
def test_izip(self): for s in ("123", "", range(1000), ('do', 1.2), xrange(2000,2200,5)): for g in (G, I, Ig, S, L, R): self.assertEqual(list(izip(g(s))), zip(g(s))) self.assertEqual(list(izip(g(s), g(s))), zip(g(s), g(s))) self.assertRaises(TypeError, izip, X(s)) self.assertRaises(TypeError, list, izip(N(s))) self.assertRaises(ZeroDivisionError, list, izip(E(s)))
a054d9d4712dd15c52c12516940f4c1810e1552d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a054d9d4712dd15c52c12516940f4c1810e1552d/test_itertools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 452, 625, 12, 2890, 4672, 364, 272, 316, 7566, 12936, 3113, 23453, 1048, 12, 18088, 3631, 7707, 2896, 2187, 404, 18, 22, 3631, 12314, 12, 17172, 16, 3787, 713, 16, 25, 3719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 452, 625, 12, 2890, 4672, 364, 272, 316, 7566, 12936, 3113, 23453, 1048, 12, 18088, 3631, 7707, 2896, 2187, 404, 18, 22, 3631, 12314, 12, 17172, 16, 3787, 713, 16, 25, 3719, ...
dir_path = self.__resolveFileID(dirName)
dir_path = self.__resolveFileID( dirName )
def transfer_bulkFromClient( self, fileID, token, ignoredSize, fileHelper ): """ Receive files packed into a tar archive by the fileHelper logic. token is used for access rights confirmation. """ if not self.__checkForDiskSpace( base_path, 10 * 1024 * 1024 ): return S_ERROR( 'Less than 10MB remaining' ) dirName = fileID.replace( '.bz2', '' ).replace( '.tar', '' ) dir_path = self.__resolveFileID(dirName) res = fileHelper.networkToBulk( dir_path ) if not res['OK']: errStr = 'Failed to receive network to bulk.' gLogger.error( 'Failed to receive network to bulk.', res['Message'] ) return res if not os.path.exists( dir_path ): return S_ERROR( 'Failed to receive data' ) try: os.chmod( dir_path, 0755 ) except Exception, x: gLogger.exception( 'Could not set permissions of destination directory.', dir_path, x ) return S_OK()
9f0650a3e23eb441883664794fa6606e35b7f93c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9f0650a3e23eb441883664794fa6606e35b7f93c/StorageElementHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7412, 67, 14597, 1265, 1227, 12, 365, 16, 585, 734, 16, 1147, 16, 5455, 1225, 16, 585, 2276, 262, 30, 3536, 17046, 1390, 12456, 1368, 279, 8232, 5052, 635, 326, 585, 2276, 4058, 18, 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, 7412, 67, 14597, 1265, 1227, 12, 365, 16, 585, 734, 16, 1147, 16, 5455, 1225, 16, 585, 2276, 262, 30, 3536, 17046, 1390, 12456, 1368, 279, 8232, 5052, 635, 326, 585, 2276, 4058, 18, 11...
p = reactor.listenTCP(0, AServerFactory(self, IPv4Address('TCP', '127.0.0.1', portno)))
f = AServerFactory(self, IPv4Address('TCP', '127.0.0.1', portno)) p = reactor.listenTCP(0, f)
def testBuildProtocol(self): portno = self.getFreePort()
68998e21ef533677da748f03432912990acb38b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/68998e21ef533677da748f03432912990acb38b1/test_tcp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3116, 5752, 12, 2890, 4672, 1756, 2135, 273, 365, 18, 588, 9194, 2617, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3116, 5752, 12, 2890, 4672, 1756, 2135, 273, 365, 18, 588, 9194, 2617, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
@unittest2.expectedFailure
def test_break_with_dwarf(self): """Test setting objc breakpoints using 'regexp-break' and 'breakpoint set'.""" self.buildDwarf() self.break_on_objc_methods()
177666049311be451493ddf58c47b916f47a452e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/177666049311be451493ddf58c47b916f47a452e/TestObjCMethods.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8820, 67, 1918, 67, 72, 905, 74, 12, 2890, 4672, 3536, 4709, 3637, 1081, 71, 23416, 1450, 296, 17745, 17, 8820, 11, 471, 296, 8820, 1153, 444, 11, 12123, 365, 18, 3510, 40, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 8820, 67, 1918, 67, 72, 905, 74, 12, 2890, 4672, 3536, 4709, 3637, 1081, 71, 23416, 1450, 296, 17745, 17, 8820, 11, 471, 296, 8820, 1153, 444, 11, 12123, 365, 18, 3510, 40, ...
print `para`
def filterMakefile (p, item, tag): filename = os.path.join (p.contents.basedir, item.files[0]) words = string.split (tag.content[0].text, ',') parts = [] for word in words: parts.append (string.strip (word)) list = [] mode = 'search' for line in fileinput.input (filename): if mode == 'search': if line[:12] == '# BEGIN_DESC': pos = string.index (line, '{') pos2 = string.index (line, '}', pos) part = line[pos+1:pos2] #print part if part in parts: mode = 'found' text = '' elif mode == 'found': if line[:10] == '# END_DESC': list.append ((part, text)) mode = 'search' else: text = text + string.rstrip (line[2:]) + '\n' result = xmlsupport.Tag ('p') #print 'list:',list dl = None for part, text in list: paras = string.split (string.rstrip (text), '\n\n') for para in paras: print `para` if para[:5] == '\\item': pos = string.index (para, '{') pos2 = string.index (para, '}', pos) name = para[pos+1:pos2] para = string.lstrip (para[pos2+1:]) print 'item:',name,`para` liElement = xmlsupport.Tag ('li') itemElement = xmlsupport.Tag ('item') textElement = xmlsupport.Text (para) itemElement.append (xmlsupport.Text (name)) liElement.append (itemElement, textElement) if dl: dl.append (liElement) else: dl = xmlsupport.Tag ('description') result.append (dl) else: dl = None pElement = xmlsupport.Tag ('p') textElement = xmlsupport.Text (para) pElement.append (textElement) result.append (pElement) result.dump (0) return result
606ac9a1ef5174c0193769a62ba9853fa2a962bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12443/606ac9a1ef5174c0193769a62ba9853fa2a962bb/contents.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 6464, 768, 261, 84, 16, 761, 16, 1047, 4672, 1544, 273, 1140, 18, 803, 18, 5701, 261, 84, 18, 3980, 18, 31722, 16, 761, 18, 2354, 63, 20, 5717, 225, 4511, 273, 533, 18, 4939, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 6464, 768, 261, 84, 16, 761, 16, 1047, 4672, 1544, 273, 1140, 18, 803, 18, 5701, 261, 84, 18, 3980, 18, 31722, 16, 761, 18, 2354, 63, 20, 5717, 225, 4511, 273, 533, 18, 4939, ...
if isinstance(obj, Tensor): return obj else: return tinit(obj)
return _as_tensor(obj)
def input_wrapper(cls, obj): if isinstance(obj, Tensor): return obj else: return tinit(obj)
0597b14ae2bc399d19eed4cf02af0a93d74f1379 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12438/0597b14ae2bc399d19eed4cf02af0a93d74f1379/tensor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 810, 67, 8376, 12, 6429, 16, 1081, 4672, 309, 1549, 12, 2603, 16, 13422, 4672, 327, 1081, 469, 30, 327, 268, 2738, 12, 2603, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 810, 67, 8376, 12, 6429, 16, 1081, 4672, 309, 1549, 12, 2603, 16, 13422, 4672, 327, 1081, 469, 30, 327, 268, 2738, 12, 2603, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
define = self.prefix + 'ERROR_' + name.replace(' ', '_').replace('.', '_').upper() self.h("""\
if self.define_prefix: define = self.define_prefix + 'ERROR_' + name.replace(' ', '_').replace('.', '_').upper() self.h("""\
#ifndef %s
78883759218488c6c51b43db3259b8dda944ce93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7593/78883759218488c6c51b43db3259b8dda944ce93/qt4-constants-gen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 82, 536, 738, 87, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 82, 536, 738, 87, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
n=n.next
empty=0 n=n.next if empty: raise Empty,"Empty N value"
def __init__(self,name,value,rfc2425parameters={}): self.name=name if self.name.upper()!="N": raise RuntimeError,"VCardName handles only 'N' type" if isinstance(value,libxml2.xmlNode): self.family,self.given,self.middle,self.prefix,self.suffix=[u""]*5 n=value.children vns=get_node_ns(value) while n: if n.type!='element': n=n.next continue ns=get_node_ns(n) if (ns and vns and ns.getContent()!=vns.getContent()): n=n.next continue if n.name=='FAMILY': self.family=unicode(n.getContent(),"utf-8") if n.name=='GIVEN': self.given=unicode(n.getContent(),"utf-8") if n.name=='MIDDLE': self.middle=unicode(n.getContent(),"utf-8") if n.name=='PREFIX': self.prefix=unicode(n.getContent(),"utf-8") if n.name=='SUFFIX': self.suffix=unicode(n.getContent(),"utf-8") n=n.next else: v=value.split(";") value=[u""]*5 value[:len(v)]=v self.family,self.given,self.middle,self.prefix,self.suffix=value
8c6f1bf79fd2c6da637f442661b1da2d525517ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/8c6f1bf79fd2c6da637f442661b1da2d525517ae/vcard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 529, 16, 1132, 16, 16784, 3247, 2947, 3977, 12938, 4672, 365, 18, 529, 33, 529, 309, 365, 18, 529, 18, 5797, 1435, 5, 1546, 50, 6877, 1002, 7265, 10837, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 529, 16, 1132, 16, 16784, 3247, 2947, 3977, 12938, 4672, 365, 18, 529, 33, 529, 309, 365, 18, 529, 18, 5797, 1435, 5, 1546, 50, 6877, 1002, 7265, 10837, ...
result = failoverTransfer.transferAndRegisterFileFailover(localFile,outputFilePath,lfn,targetSE,failoverSEs,fileGUID,self.defaultCatalog)
result = failoverTransfer.transferAndRegisterFileFailover(localfile,outputFilePath,lfn,targetSE,failoverSEs,fileGUID,self.defaultCatalog)
def __transferOutputDataFiles(self,owner,outputData,outputSE,outputPath): """Performs the upload and registration in the LFC """ self.log.verbose('Uploading output data files') self.__report('Completed','Uploading Output Data') self.log.verbose('Output data files %s to be uploaded to %s SE' %(string.join(outputData,', '),outputSE)) missing = [] uploaded = []
104cb9632bc3b5543dbcbce5a35dbc3ae6cdedfd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/104cb9632bc3b5543dbcbce5a35dbc3ae6cdedfd/JobWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 13866, 1447, 751, 2697, 12, 2890, 16, 8443, 16, 2844, 751, 16, 2844, 1090, 16, 2844, 743, 4672, 3536, 9409, 326, 3617, 471, 7914, 316, 326, 511, 4488, 3536, 365, 18, 1330, 18, 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, 1001, 13866, 1447, 751, 2697, 12, 2890, 16, 8443, 16, 2844, 751, 16, 2844, 1090, 16, 2844, 743, 4672, 3536, 9409, 326, 3617, 471, 7914, 316, 326, 511, 4488, 3536, 365, 18, 1330, 18, 11...
myNDVs=zeros(myBufSize)
myNDVs=numpy.zeros(myBufSize)
def doit(opts, args): if opts.debug: print "gdal_calc.py starting calculation %s" %(opts.calc) ################################################################ # fetch details of input layers ################################################################ # set up some lists to store data for each band myFiles=[] myBands=[] myAlphaList=[] myDataType=[] myDataTypeNum=[] myNDV=[] DimensionsCheck=None # loop through input files - checking dimensions for i,myI in enumerate(AlphaList[0:len(sys.argv)-1]): myF = eval("opts.%s" %(myI)) myBand = eval("opts.%s_band" %(myI)) if myF: myFiles.append(gdal.Open(myF, gdal.GA_ReadOnly)) # check if we have asked for a specific band... if myBand: myBands.append(myBand) else: myBands.append(1) myAlphaList.append(myI) myDataType.append(gdal.GetDataTypeName(myFiles[i].GetRasterBand(myBands[i]).DataType)) myDataTypeNum.append(myFiles[i].GetRasterBand(myBands[i]).DataType) myNDV.append(myFiles[i].GetRasterBand(myBands[i]).GetNoDataValue()) # check that the dimensions of each layer are the same if DimensionsCheck: if DimensionsCheck!=[myFiles[i].RasterXSize, myFiles[i].RasterYSize]: print "Error! Dimensions of file %s (%i, %i) are different from file %s (%i, %i). Cannot proceed" return else: DimensionsCheck=[myFiles[i].RasterXSize, myFiles[i].RasterYSize] if opts.debug: print "file %s: %s, dimensions: %s, %s, type: %s" %(myI,myF,DimensionsCheck[0],DimensionsCheck[1],myDataType[i]) ################################################################ # set up output file ################################################################ # open output file exists if os.path.isfile(opts.outF) and not opts.overwrite: if opts.debug: print "Output file %s exists - filling in results into file" %(opts.outF) myOut=gdal.Open(opts.outF, gdal.GA_Update) if [myOut.RasterXSize,myOut.RasterYSize] != DimensionsCheck: print "Error! Output exists, but is the wrong size. Use the --overwrite option to automatically overwrite the existing file" return myOutB=myOut.GetRasterBand(1) myOutNDV=myOutB.GetNoDataValue() myOutType=gdal.GetDataTypeName(myOutB.DataType) else: # remove existing file and regenerate if os.path.isfile(opts.outF): os.remove(opts.outF) # create a new file if opts.debug: print "Generating output file %s" %(opts.outF) # find data type to use if not opts.type: # use the largest type of the input files myOutType=gdal.GetDataTypeName(max(myDataTypeNum)) else: myOutType=opts.type # create file myOutDrv = gdal.GetDriverByName(opts.format) myOut=myOutDrv.Create(opts.outF, DimensionsCheck[0], DimensionsCheck[1], 1, gdal.GetDataTypeByName(myOutType)) # set output geo info based on first input layer myOut.SetGeoTransform(myFiles[0].GetGeoTransform()) myOut.SetProjection(myFiles[0].GetProjection()) myOutB=myOut.GetRasterBand(1) if opts.NoDataValue!=None: myOutNDV=opts.NoDataValue else: myOutNDV=DefaultNDVLookup[myOutType] myOutB.SetNoDataValue(myOutNDV) # write to band myOutB=None # refetch band myOutB=myOut.GetRasterBand(1) if opts.debug: print "output file: %s, dimensions: %s, %s, type: %s" %(opts.outF,myOut.RasterXSize,myOut.RasterYSize,gdal.GetDataTypeName(myOutB.DataType)) ################################################################ # find block size to chop grids into bite-sized chunks ################################################################ # use the block size of the first layer to read efficiently myBlockSize=myFiles[0].GetRasterBand(myBands[0]).GetBlockSize(); # store these numbers in variables that may change later nXValid = myBlockSize[0] nYValid = myBlockSize[1] # find total x and y blocks to be read nXBlocks = (DimensionsCheck[0] + myBlockSize[0] - 1) / myBlockSize[0]; nYBlocks = (DimensionsCheck[1] + myBlockSize[1] - 1) / myBlockSize[1]; myBufSize = myBlockSize[0]*myBlockSize[1] if opts.debug: print "using blocksize %s x %s" %(myBlockSize[0], myBlockSize[1]) # variables for displaying progress ProgressCt=-1 ProgressMk=-1 ProgressEnd=nXBlocks*nYBlocks ################################################################ # start looping through blocks of data ################################################################ # loop through X-lines for X in range(0,nXBlocks): # in the rare (impossible?) case that the blocks don't fit perfectly # change the block size of the final piece if X==nXBlocks-1: nXValid = DimensionsCheck[0] - X * myBlockSize[0] myBufSize = nXValid*nYValid # find X offset myX=X*myBlockSize[0] # reset buffer size for start of Y loop nYValid = myBlockSize[1] myBufSize = nXValid*nYValid # loop through Y lines for Y in range(0,nYBlocks): ProgressCt+=1 if 10*ProgressCt/ProgressEnd%10!=ProgressMk: ProgressMk=10*ProgressCt/ProgressEnd%10 print 10*ProgressMk, "..", # change the block size of the final piece if Y==nYBlocks-1: nYValid = DimensionsCheck[1] - Y * myBlockSize[1] myBufSize = nXValid*nYValid # find Y offset myY=Y*myBlockSize[1] # create empty buffer to mark where nodata occurs myNDVs=zeros(myBufSize) myNDVs.shape=(nYValid,nXValid) # fetch data for each input layer for i,Alpha in enumerate(myAlphaList): # populate lettered arrays with values myval=BandReadAsArray(myFiles[i].GetRasterBand(myBands[i]), xoff=myX, yoff=myY, win_xsize=nXValid, win_ysize=nYValid) # fill in nodata values myNDVs=1*logical_or(myNDVs==1, myval==myNDV[i]) # create an array of values for this block exec("%s=myval" %Alpha) myval=None # try the calculation on the array blocks try: myResult = eval(opts.calc) except: print "evaluation of calculation %s failed" %(opts.calc) raise # propogate nodata values # (set nodata cells to zero then add nodata value to these cells) myResult = ((1*(myNDVs==0))*myResult) + (myOutNDV*myNDVs) # write data block to the output file BandWriteArray(myOutB, myResult, xoff=myX, yoff=myY) print "100 - Done" #print "Finished - Results written to %s" %opts.outF return
ac160e22187f4c00e013af415ee2cf81dece60a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10289/ac160e22187f4c00e013af415ee2cf81dece60a8/gdal_calc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 305, 12, 4952, 16, 833, 4672, 225, 309, 1500, 18, 4148, 30, 1172, 315, 19016, 287, 67, 12448, 18, 2074, 5023, 11096, 738, 87, 6, 8975, 4952, 18, 12448, 13, 225, 19709, 5516, 26487...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 305, 12, 4952, 16, 833, 4672, 225, 309, 1500, 18, 4148, 30, 1172, 315, 19016, 287, 67, 12448, 18, 2074, 5023, 11096, 738, 87, 6, 8975, 4952, 18, 12448, 13, 225, 19709, 5516, 26487...
TixSubWidget.__init__(self, master, name, destroy_physically)
TixSubWidget.__init__(self, master, name, destroy_physically)
def __init__(self, master, name, destroy_physically=1):
22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 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, ...
[ 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.fields.remove(field)
self._get_table_info()
def drop_field(self,field): if field in ["__id__","__version__"]: raise ValueError,"Can't delete field %s" %field if not field in self.fields: raise ValueError,"Field %s not found in base" %field sql = "ALTER TABLE %s DROP %s" %(self.name,field) self.cursor.execute(sql) self.fields.remove(field)
afe7a8711786ae2a72bb9dc64c8a6f84af89b5ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6310/afe7a8711786ae2a72bb9dc64c8a6f84af89b5ab/PyDbLite_MySQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 67, 1518, 12, 2890, 16, 1518, 4672, 309, 652, 316, 8247, 972, 350, 972, 15937, 972, 1589, 972, 11929, 30, 1002, 2068, 10837, 2568, 1404, 1430, 652, 738, 87, 6, 738, 1518, 309, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 67, 1518, 12, 2890, 16, 1518, 4672, 309, 652, 316, 8247, 972, 350, 972, 15937, 972, 1589, 972, 11929, 30, 1002, 2068, 10837, 2568, 1404, 1430, 652, 738, 87, 6, 738, 1518, 309, 48...
print "Not Ready %d,%d has %s in %s" % ( taskrow, linenum, concretename, state)
def initMakeReady(self, taskrow): """Find all ready jobs and put them on the readylist Warning: logic duplication between this and makeReady. Refactoring these two is a priority. """ sql = """select linenum,output,concretename,state from cmds LEFT JOIN cmdFileRelation USING (taskrow,linenum) LEFT JOIN fileState USING (concretename) WHERE taskrow=%d""" ## this SQL command is not appropriate!!! fix! cur = self.cursor() cur.execute(sql % taskrow) readyCmds = {} f = cur.fetchall() for (linenum, output,concretename, state) in f: print "cmdList: %d,%d has %s in %s" % ( taskrow, linenum, concretename, state) ready = readyCmds.get(linenum, (True,None)) if not output: #output is either missing or false(input) if (state is not None) and (state != 3): #if not saved? readyCmds[linenum] = (False,ready[1]) print "Not Ready %d,%d has %s in %s" % ( taskrow, linenum, concretename, state) else: readyCmds[linenum] = (ready[0],concretename) i = readyCmds.items() # filter for only the true values, and then pick the first # half of the tuple i = map(lambda x:(taskrow,x[0],x[1][1]), filter(lambda x: x[1][0], i)) i.sort() sql = "insert into readyList VALUES(?,?,?)" cur.executemany(sql,i) pass
5b6a02c82a858db1229fd5d4d621cd3d16fd2060 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5203/5b6a02c82a858db1229fd5d4d621cd3d16fd2060/ssdap_dbutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 6464, 8367, 12, 2890, 16, 1562, 492, 4672, 3536, 3125, 777, 5695, 6550, 471, 1378, 2182, 603, 326, 5695, 1098, 9728, 30, 4058, 31201, 3086, 333, 471, 1221, 8367, 18, 868, 3493, 605...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 6464, 8367, 12, 2890, 16, 1562, 492, 4672, 3536, 3125, 777, 5695, 6550, 471, 1378, 2182, 603, 326, 5695, 1098, 9728, 30, 4058, 31201, 3086, 333, 471, 1221, 8367, 18, 868, 3493, 605...
self.langname = langname
self.langname = langname.strip('"')
def __init__(self, langname, primary): self.langname = langname # string of language name self.primary = primary # boolean of whether or not the language is the primary name
680a1970ded88c9b811352ffe3294937ba89f6e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8937/680a1970ded88c9b811352ffe3294937ba89f6e6/iso_extract_modeler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3303, 529, 16, 3354, 4672, 365, 18, 4936, 529, 273, 3303, 529, 18, 6406, 2668, 5187, 13, 468, 533, 434, 2653, 508, 365, 18, 8258, 273, 3354, 468, 1250, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3303, 529, 16, 3354, 4672, 365, 18, 4936, 529, 273, 3303, 529, 18, 6406, 2668, 5187, 13, 468, 533, 434, 2653, 508, 365, 18, 8258, 273, 3354, 468, 1250, ...
}})
}, })
def dueller_fled(self, event): if event.state == 'offline' and (event.source, event.channel) in duels: duel = duels[(event.source, event.channel)] fleer = event.sender['nick'].lower() if fleer in duel.names: if hasattr(event, 'othername'): for key in ('hp', 'names', 'drawn'): getattr(duel, key)[event.othername.lower()] = getattr(duel, key)[fleer] del getattr(duel, key)[fleer] if duel.aggressor == fleer: duel.agressor = event.othername.lower() else: duel.recipient = event.othername.lower()
f8c71df5f33a333412927b027c6d43892e2c111d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/f8c71df5f33a333412927b027c6d43892e2c111d/games.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9978, 292, 749, 67, 74, 1259, 12, 2890, 16, 871, 4672, 309, 871, 18, 2019, 422, 296, 23787, 11, 471, 261, 2575, 18, 3168, 16, 871, 18, 4327, 13, 316, 9978, 10558, 30, 9978, 292, 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, 9978, 292, 749, 67, 74, 1259, 12, 2890, 16, 871, 4672, 309, 871, 18, 2019, 422, 296, 23787, 11, 471, 261, 2575, 18, 3168, 16, 871, 18, 4327, 13, 316, 9978, 10558, 30, 9978, 292, 273,...
if not buddyID:
if buddyID is None:
def modifyItemSSI(self, item, groupID = None, buddyID = None): if not groupID: groupID = item.group.group.findIDFor(item.group) if not buddyID: buddyID = item.group.findIDFor(item) return self.sendSNAC(0x13,0x09, item.oscarRep(groupID, buddyID))
5dba0eba9ad679b5e21261a0576b4eeef14b42aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5dba0eba9ad679b5e21261a0576b4eeef14b42aa/oscar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5612, 1180, 1260, 45, 12, 2890, 16, 761, 16, 30365, 273, 599, 16, 324, 29017, 734, 273, 599, 4672, 309, 486, 30365, 30, 30365, 273, 761, 18, 1655, 18, 1655, 18, 4720, 734, 1290, 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, 5612, 1180, 1260, 45, 12, 2890, 16, 761, 16, 30365, 273, 599, 16, 324, 29017, 734, 273, 599, 4672, 309, 486, 30365, 30, 30365, 273, 761, 18, 1655, 18, 1655, 18, 4720, 734, 1290, 12, ...
print i.sprintf("%TCP.dport% & ? & unanswered \\\\") print "\\hline\n\\end{tabular}"
rep += i.sprintf("%TCP.dport% & ? & unanswered \\\\\n") rep += "\\hline\n\\end{tabular}\n" return rep
def report_ports(target, ports): ans,unans = sr(IP(dst=target)/TCP(dport=ports),timeout=5) print "\\begin{tabular}{|l|l|l|}\n\\hline" for s,r in ans: if not r.haslayer(ICMP): if r.payload.flags == 0x12: print r.sprintf("%TCP.sport% & open & SA \\\\") print "\\hline" for s,r in ans: if r.haslayer(ICMP): print r.sprintf("%TCPerror.dport% & closed & ICMP type %ICMP.type%/%ICMP.code% from %IP.src% \\\\") elif r.payload.flags != 0x12: print r.sprintf("%TCP.sport% & closed & TCP %TCP.flags% \\\\") print "\\hline" for i in unans: print i.sprintf("%TCP.dport% & ? & unanswered \\\\") print "\\hline\n\\end{tabular}"
c8613d965bb56b5c623eed7b046d4fb0ec01da00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/c8613d965bb56b5c623eed7b046d4fb0ec01da00/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 4363, 12, 3299, 16, 9048, 4672, 4152, 16, 318, 634, 273, 9133, 12, 2579, 12, 11057, 33, 3299, 13176, 13891, 12, 72, 655, 33, 4363, 3631, 4538, 33, 25, 13, 1172, 8422, 10086, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 4363, 12, 3299, 16, 9048, 4672, 4152, 16, 318, 634, 273, 9133, 12, 2579, 12, 11057, 33, 3299, 13176, 13891, 12, 72, 655, 33, 4363, 3631, 4538, 33, 25, 13, 1172, 8422, 10086, ...
tab = [ [self[0]] ] for i in range(1,len(self)): if self[i-1].value > self[i].value: tab.append([self[i]]) else: l = len(tab)-1 tab[l].append(self[i]) return Tableau(tab)
shape = self.parent().shape.conjugate() tab = [] s = 0 for i in range(len(shape)): col = [ self[s+k] for k in range(shape[i]) ] col.reverse() s += shape[i] tab.append(col) tab = Tableau(tab) return(tab.conjugate())
def to_tableau(self):
77181f8acf62542547672f093817935975325633 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/77181f8acf62542547672f093817935975325633/tensor_product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 2121, 8377, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 2121, 8377, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def notify_add(self, opt, callback):
def __notify(self, opt, type): try: for callback in self.notify[opt]: try: callback(self, 0, Entry(self.opts[opt], type), 0) except AttributeError: pass except KeyError: pass
def set_bool(self, opt, value): return
423582e18ca3c6045556c68a07ce0f5f2333730d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6425/423582e18ca3c6045556c68a07ce0f5f2333730d/gconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6430, 12, 2890, 16, 2153, 16, 460, 4672, 327, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 444, 67, 6430, 12, 2890, 16, 2153, 16, 460, 4672, 327, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def testLoadPNG( self ):
def testLoadPNG(self):
def testLoadPNG( self ): """ see if we can load a png. """ f = os.path.join("examples", "data", "alien1.png") surf = pygame.image.load(f)
72035ccf36592238ec60d9d9936f42a901b9ebe0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1298/72035ccf36592238ec60d9d9936f42a901b9ebe0/image_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2563, 23092, 12, 2890, 4672, 3536, 2621, 309, 732, 848, 1262, 279, 14476, 18, 3536, 284, 273, 1140, 18, 803, 18, 5701, 2932, 16858, 3113, 315, 892, 3113, 315, 18083, 275, 21, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2563, 23092, 12, 2890, 4672, 3536, 2621, 309, 732, 848, 1262, 279, 14476, 18, 3536, 284, 273, 1140, 18, 803, 18, 5701, 2932, 16858, 3113, 315, 892, 3113, 315, 18083, 275, 21, 18, ...
os.mkdir(dst)
os.makedirs(dst) copystat(src, dst)
def copytree(src, dst, symlinks=False): """Recursively copy a directory tree using copy2(). The destination directory must not already exist. If exception(s) occur, an Error is raised with a list of reasons. If the optional symlinks flag is true, symbolic links in the source tree result in symbolic links in the destination tree; if it is false, the contents of the files pointed to by symbolic links are copied. XXX Consider this example code rather than the ultimate tool. """ names = os.listdir(src) os.mkdir(dst) errors = [] for name in names: srcname = os.path.join(src, name) dstname = os.path.join(dst, name) try: if symlinks and os.path.islink(srcname): linkto = os.readlink(srcname) os.symlink(linkto, dstname) elif os.path.isdir(srcname): copytree(srcname, dstname, symlinks) else: copy2(srcname, dstname) # XXX What about devices, sockets etc.? except (IOError, os.error), why: errors.append((srcname, dstname, why)) if errors: raise Error, errors
48f3ea9a2c4d1cbade55a9ebfa99ff213338f948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/48f3ea9a2c4d1cbade55a9ebfa99ff213338f948/shutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 3413, 12, 4816, 16, 3046, 16, 23146, 33, 8381, 4672, 3536, 12474, 1610, 279, 1867, 2151, 1450, 1610, 22, 7675, 225, 1021, 2929, 1867, 1297, 486, 1818, 1005, 18, 971, 1520, 12, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 3413, 12, 4816, 16, 3046, 16, 23146, 33, 8381, 4672, 3536, 12474, 1610, 279, 1867, 2151, 1450, 1610, 22, 7675, 225, 1021, 2929, 1867, 1297, 486, 1818, 1005, 18, 971, 1520, 12, 87, ...
far = Ray2( Point2(*bottom), prev.direction ).intersect(Ray2( Point2(*top), -current.direction ))
if bottom == top: far = Point2(*bottom) else: far = Ray2( Point2(*bottom), prev.direction ).intersect(Ray2( Point2(*top), -current.direction ))
def build_vbo(self): strip = [] colors = [] texcoord = [] for ctx, parts in self._parts: start_len = len(strip) for line in parts:
046ccf3bf5335b783983b34fbc635917b0901b3e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7473/046ccf3bf5335b783983b34fbc635917b0901b3e/draw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 90, 1075, 12, 2890, 4672, 2569, 273, 5378, 5740, 273, 5378, 16573, 5732, 273, 5378, 364, 1103, 16, 2140, 316, 365, 6315, 6019, 30, 787, 67, 1897, 273, 562, 12, 6406, 13, 364,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 90, 1075, 12, 2890, 4672, 2569, 273, 5378, 5740, 273, 5378, 16573, 5732, 273, 5378, 364, 1103, 16, 2140, 316, 365, 6315, 6019, 30, 787, 67, 1897, 273, 562, 12, 6406, 13, 364,...
"", "", "dvn",
self._last_fileselector_dir, "", "dvn",
def _helper_file_save(self, always_ask=True): """Save current network to file.
1f20840b07ede703da0177ec1a21cff6547f16b4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4494/1f20840b07ede703da0177ec1a21cff6547f16b4/graph_editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4759, 67, 768, 67, 5688, 12, 2890, 16, 3712, 67, 835, 33, 5510, 4672, 3536, 4755, 783, 2483, 358, 585, 18, 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, 389, 4759, 67, 768, 67, 5688, 12, 2890, 16, 3712, 67, 835, 33, 5510, 4672, 3536, 4755, 783, 2483, 358, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...