rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
relPath = Path.rel_from_to(normalizePath(dir), FRAMEWORK_DIR)
relPath = Path.rel_from_to(normalizePath(dir), framework_dir)
def patchSkeleton(dir, name, namespace): absPath = normalizePath(FRAMEWORK_DIR) if absPath[-1] == "/": absPath = absPath[:-1] if sys.platform == 'cygwin': if re.match( r'^\.{1,2}\/', dir ): relPath = Path.rel_from_to(normalizePath(dir), FRAMEWORK_DIR) elif re.match( r'^/cygdrive\b', dir): relPath = Path.rel_from_to(dir, FRAMEWORK_DIR) else: relPath = Path.rel_from_to(normalizePath(dir), normalizePath(FRAMEWORK_DIR)) else: relPath = Path.rel_from_to(normalizePath(dir), normalizePath(FRAMEWORK_DIR)) relPath = re.sub(r'\\', "/", relPath) if relPath[-1] == "/": relPath = relPath[:-1] if not os.path.isdir(os.path.join(dir, relPath)): console.error("Relative path to qooxdoo directory is not correct: '%s'" % relPath) sys.exit(1) for root, dirs, files in os.walk(dir): for file in files: split = file.split(".") if len(split) >= 3 and split[1] == "tmpl": outFile = os.path.join(root, split[0] + "." + ".".join(split[2:])) inFile = os.path.join(root, file) console.log("Patching file '%s'" % outFile) config = Template(open(inFile).read()) out = open(outFile, "w") out.write( config.substitute({ "Name": name, "Namespace": namespace, "REL_QOOXDOO_PATH": relPath, "ABS_QOOXDOO_PATH": absPath, "QOOXDOO_VERSION": "0.8.2" }).encode('utf-8') ) out.close() os.remove(inFile) for root, dirs, files in os.walk(dir): for file in [file for file in files if file.endswith(".py")]: os.chmod(os.path.join(root, file), (stat.S_IRWXU |stat.S_IRGRP |stat.S_IXGRP |stat.S_IROTH |stat.S_IXOTH)) # 0755
9147a9ac90c662291742ddbed146c0b86318dbc6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/9147a9ac90c662291742ddbed146c0b86318dbc6/create-application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 28070, 12, 1214, 16, 508, 16, 1981, 4672, 24939, 273, 20551, 12, 15072, 10566, 67, 4537, 13, 309, 24939, 18919, 21, 65, 422, 4016, 30, 24939, 273, 24939, 10531, 17, 21, 65, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 28070, 12, 1214, 16, 508, 16, 1981, 4672, 24939, 273, 20551, 12, 15072, 10566, 67, 4537, 13, 309, 24939, 18919, 21, 65, 422, 4016, 30, 24939, 273, 24939, 10531, 17, 21, 65, 225, ...
if ( (not db_ver_inc_map.has_key(db_ver)) and
if ( (db_ver not in db_ver_inc_map) and
def gen_db_minor_ver_nums(major): if major == 4: for x in range(max_db_ver[1]+1): if allow_db_ver((4, x)): yield x elif major == 3: for x in (3,): if allow_db_ver((3, x)): yield x else: raise ValueError("unknown major BerkeleyDB version", major)
854f5ca0da2524f2188be35e07f7de571e75329f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/854f5ca0da2524f2188be35e07f7de571e75329f/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 1966, 67, 17364, 67, 502, 67, 21180, 12, 14019, 4672, 309, 7888, 422, 1059, 30, 364, 619, 316, 1048, 12, 1896, 67, 1966, 67, 502, 63, 21, 3737, 21, 4672, 309, 1699, 67, 196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 1966, 67, 17364, 67, 502, 67, 21180, 12, 14019, 4672, 309, 7888, 422, 1059, 30, 364, 619, 316, 1048, 12, 1896, 67, 1966, 67, 502, 63, 21, 3737, 21, 4672, 309, 1699, 67, 196...
d.result.apply(b)
assert d.result.apply(b)
def test_bbox_object(nbtest = 5): """ Simple test on Bounding Box Computation """ d = Discretizer() b = BBoxComputer(d) for i in xrange(nbtest): for geom in create_random_objects(): if not isinstance(geom,Text): geom.apply(b) b1 = b.result geom.apply(d) d.result.apply(b) b2 = b.result refv = b1.getSize() ref = 1 if refv.x != 0: ref *= refv.x if refv.y != 0: ref *= refv.y if refv.z != 0: ref *= refv.z dist = norm(b1.lowerLeftCorner-b2.lowerLeftCorner + b1.upperRightCorner - b2.upperRightCorner)/ref if dist > 0.1 : Scene([geom]).save('bboxerror.bgeom') print b1,b2,norm(b1.getSize()) raise Exception('Invalid BoundingBox Computation for object of type '+geom.__class__.__name__+' : '+str(dist))
aa61503ca0bbdd43a436f85277900ba41bcd44b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/799/aa61503ca0bbdd43a436f85277900ba41bcd44b0/test_bbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 20737, 67, 1612, 12, 6423, 3813, 273, 1381, 4672, 3536, 4477, 1842, 603, 12281, 310, 8549, 14169, 367, 3536, 302, 273, 3035, 71, 1349, 1824, 1435, 324, 273, 605, 3514, 7703, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 20737, 67, 1612, 12, 6423, 3813, 273, 1381, 4672, 3536, 4477, 1842, 603, 12281, 310, 8549, 14169, 367, 3536, 302, 273, 3035, 71, 1349, 1824, 1435, 324, 273, 605, 3514, 7703, 26...
self.wlesslb = self.no_wlan
self.wlessLB = self.no_wlan
def update_netlist(self,state=None, x=None, force_check=False,firstrun=False): # Don't even try to do this if we are running a dialog if self.diag: return # Run focus-collecting code if we are not running this for the first # time if not firstrun: self.update_focusloc() self.list_header.set_text(gen_list_header()) """ Updates the overall network list.""" if not state: state, x = daemon.GetConnectionStatus() if force_check or self.prev_state != state: wiredL,wlessL = gen_network_list() #self.wiredCB = urwid.Filler(ComboBox(wiredL,self.frame,ui,3, # use_enter=False)) self.wiredCB.get_body().set_list(wiredL) self.wiredCB.get_body().build_combobox(self.frame,ui,3) if len(wlessL) != 0: if self.wlessLB == self.no_wlan: self.wlessLB = urwid.ListBox(wlessL) else: self.wlessLB.body = urwid.SimpleListWalker(wlessL) else: self.wlesslb = self.no_wlan if daemon.GetAlwaysShowWiredInterface() or wired.CheckPluggedIn(): #if daemon.GetAlwaysShowWiredInterface(): #if firstrun: self.thePile = urwid.Pile([('fixed',1,self.wiredH), ('fixed',1,self.wiredCB), ('fixed',2,self.wlessH), self.wlessLB] ) if not firstrun: self.frame.body = self.thePile #self.focusloc = (self.thePile.get_focus(), # self.thePile.get_focus().get_focus()[1]) self.thePile.set_focus(self.focusloc[0]) if self.focusloc[0] == self.WIRED_IDX: self.thePile.get_focus().get_body().set_focus(self.focusloc[1]) else: if self.wlessLB != self.no_wlan: self.thePile.get_focus().set_focus(self.focusloc[1]) else: self.thePile.set_focus(self.wiredCB) else: self.thePile = urwid.Pile([('fixed',2,self.wlessH),self.wlessLB] ) if not firstrun: self.frame.body = self.thePile #if self.focusloc[0] == self.wlessLB: self.wlessLB.set_focus(self.focusloc[1]) #self.thePile.get_focus().set_focus(self.focusloc[1]) #self.always_show_wired = not self.always_show_wired self.prev_state = state if not firstrun: self.update_ui() if firstrun: if wired.GetDefaultWiredNetwork() != None: self.wiredCB.get_body().set_focus(wired.GetWiredProfileList().index(wired.GetDefaultWiredNetwork()))
b2cbaf957d205b2647b16f32210c28801bda2b80 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12280/b2cbaf957d205b2647b16f32210c28801bda2b80/wicd-curses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2758, 1098, 12, 2890, 16, 2019, 33, 7036, 16, 619, 33, 7036, 16, 2944, 67, 1893, 33, 8381, 16, 74, 481, 701, 318, 33, 8381, 4672, 468, 7615, 1404, 5456, 775, 358, 741, 333,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2758, 1098, 12, 2890, 16, 2019, 33, 7036, 16, 619, 33, 7036, 16, 2944, 67, 1893, 33, 8381, 16, 74, 481, 701, 318, 33, 8381, 4672, 468, 7615, 1404, 5456, 775, 358, 741, 333,...
ovr = mover(mo(chr))
ovr = mover(mo(chr), reversed=True)
def handle_keyword(name, node, string): skip = 0 if len(string) > 0 and string[0] == ' ': string = string[1:] skip = 1 if name == 'begin': if not string.startswith('{matrix}'): raise SyntaxError('Expected "\begin{matrix}"!') skip += 8 entry = mtd() table = mtable(mtr(entry)) node.append(table) node = entry elif name == 'end': if not string.startswith('{matrix}'): raise SyntaxError('Expected "\end{matrix}"!') skip += 8 node = node.close().close().close() elif name == 'text': if string[0] != '{': raise SyntaxError('Expected "\text{...}"!') i = string.find('}') if i == -1: raise SyntaxError('Expected "\text{...}"!') node = node.append(mtext(string[1:i])) skip += i + 1 elif name == 'sqrt': sqrt = msqrt() node.append(sqrt) node = sqrt elif name == 'frac': frac = mfrac() node.append(frac) node = frac elif name == 'left': for par in ['(', '[', '|', '\\{', '\\langle', '.']: if string.startswith(par): break else: raise SyntaxError('Missing left-brace!') fenced = mfenced(par) node.append(fenced) node = fenced skip += len(par) elif name == 'right': for par in [')', ']', '|', '\\}', '\\rangle', '.']: if string.startswith(par): break else: raise SyntaxError('Missing right-brace!') node.closepar = par node = node.close() skip += len(par) elif name == 'not': for operator in negatables: if string.startswith(operator): break else: raise SyntaxError('Expected something to negate: "\\not ..."!') node = node.append(mo(negatables[operator])) skip += len(operator) elif name == 'mathbf': style = mstyle(nchildren=1, fontweight='bold') node.append(style) node = style elif name == 'mathbb': if string[0] != '{' or not string[1].isupper() or string[2] != '}': raise SyntaxError('Expected something like "\mathbb{A}"!') node = node.append(mi(mathbb[string[1]])) skip += 3 elif name in greek: node = node.append(mi(greek[name])) elif name in Greek: node = node.append(mo(Greek[name])) elif name in special: node = node.append(mo(special[name])) elif name in functions: node = node.append(mo(name)) else: chr = over.get(name) if chr is not None: ovr = mover(mo(chr)) node.append(ovr) node = ovr else: raise SyntaxError('Unknown LaTeX command: ' + name) return node, skip
ef0e6cd67a7f15cddc167463eff87537f87e87a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1278/ef0e6cd67a7f15cddc167463eff87537f87e87a0/rst2mathml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 11041, 12, 529, 16, 756, 16, 533, 4672, 2488, 273, 374, 309, 562, 12, 1080, 13, 405, 374, 471, 533, 63, 20, 65, 422, 296, 4290, 533, 273, 533, 63, 21, 26894, 2488, 273, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 11041, 12, 529, 16, 756, 16, 533, 4672, 2488, 273, 374, 309, 562, 12, 1080, 13, 405, 374, 471, 533, 63, 20, 65, 422, 296, 4290, 533, 273, 533, 63, 21, 26894, 2488, 273, 4...
except _RegError:
except RegError:
def get_msvc_paths (path, version='6.0', platform='x86'): """Get a list of devstudio directories (include, lib or path). Return a list of strings; will be empty list if unable to access the registry or appropriate registry keys not found.""" if not _can_read_reg: return [] L = [] if path=='lib': path= 'Library' path = string.upper(path + ' Dirs') K = ('Software\\Microsoft\\Devstudio\\%s\\' + 'Build System\\Components\\Platforms\\Win32 (%s)\\Directories') % \ (version,platform) for base in (_HKEY_CLASSES_ROOT, _HKEY_LOCAL_MACHINE, _HKEY_CURRENT_USER, _HKEY_USERS): try: k = _RegOpenKeyEx(base,K) i = 0 while 1: try: (p,v,t) = _RegEnumValue(k,i) if string.upper(p) == path: V = string.split(v,';') for v in V: if v == '' or v in L: continue L.append(v) break i = i + 1 except _RegError: break except _RegError: pass return L
f524abb944b7edf65acd200dfe2f4076696b42e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f524abb944b7edf65acd200dfe2f4076696b42e3/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 959, 4227, 67, 4481, 261, 803, 16, 1177, 2218, 26, 18, 20, 2187, 4072, 2218, 92, 5292, 11, 4672, 3536, 967, 279, 666, 434, 4461, 334, 4484, 6402, 261, 6702, 16, 2561, 578, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 959, 4227, 67, 4481, 261, 803, 16, 1177, 2218, 26, 18, 20, 2187, 4072, 2218, 92, 5292, 11, 4672, 3536, 967, 279, 666, 434, 4461, 334, 4484, 6402, 261, 6702, 16, 2561, 578, 5...
doc.multiBuild(story, 'tocindex.pdf')
doc.multiBuild(story, 'tocindex.pdf')
def beforePage(self): """decorate the page""" self.canv.saveState() self.canv.setStrokeColor(colors.red) self.canv.setLineWidth(5) self.canv.line(66,72,66,PAGE_HEIGHT-72) self.canv.setFont('Times-Roman',12) self.canv.drawString(4 * inch, 0.75 * inch, "Page %d" % doc.page) self.canv.restoreState()
ea1ea227c935519449403e05cd102e07eb4538a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7053/ea1ea227c935519449403e05cd102e07eb4538a1/tocindex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1865, 1964, 12, 2890, 4672, 3536, 11880, 340, 326, 1363, 8395, 365, 18, 4169, 90, 18, 5688, 1119, 1435, 365, 18, 4169, 90, 18, 542, 14602, 2957, 12, 9724, 18, 1118, 13, 365, 18, 4169, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1865, 1964, 12, 2890, 4672, 3536, 11880, 340, 326, 1363, 8395, 365, 18, 4169, 90, 18, 5688, 1119, 1435, 365, 18, 4169, 90, 18, 542, 14602, 2957, 12, 9724, 18, 1118, 13, 365, 18, 4169, ...
for k in self.args.keys():
for k in self.commands['arg'].keys():
def generateFunction(self): """ generate documentation for a function """ docline = list() docline.append("== %s ==" % (self.name)) docline.append("=== Description ===") docline.extend(self.desc) docline.append("")
58e5719f8c1d5d076eb3b9af15ecc71594baba83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13121/58e5719f8c1d5d076eb3b9af15ecc71594baba83/generate_doc_from_cmake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 2083, 12, 2890, 4672, 3536, 2103, 7323, 364, 279, 445, 3536, 997, 1369, 273, 666, 1435, 997, 1369, 18, 6923, 2932, 631, 738, 87, 422, 6, 738, 261, 2890, 18, 529, 3719, 997, 1369,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 2083, 12, 2890, 4672, 3536, 2103, 7323, 364, 279, 445, 3536, 997, 1369, 273, 666, 1435, 997, 1369, 18, 6923, 2932, 631, 738, 87, 422, 6, 738, 261, 2890, 18, 529, 3719, 997, 1369,...
n = max(len(offset_vector) for offset_vector in offset_vectors) self.generations[n] = set(TimeSlideGraphNode(offset_vector) for offset_vector in time_slide_component_vectors((node.offset_vector for node in self.head), n)) for n in range(max(len(offset_vector) for offset_vector in offset_vectors), 2, -1):
n = max(len(offset_vector) for offset_vector in offset_vector_dict.values()) self.generations[n] = tuple(TimeSlideGraphNode(offset_vector) for offset_vector in time_slide_component_vectors((node.offset_vector for node in self.head), n)) for n in range(n, 2, -1):
def __init__(self, offset_vectors): self.head = set(TimeSlideGraphNode(offset_vector) for offset_vector in offset_vectors) self.generations = {}
602bb20f07221107abd463f1f997ff3cd558a7bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/602bb20f07221107abd463f1f997ff3cd558a7bd/snglcoinc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1384, 67, 18535, 4672, 365, 18, 1978, 273, 444, 12, 950, 21068, 4137, 907, 12, 3348, 67, 7737, 13, 364, 1384, 67, 7737, 316, 1384, 67, 18535, 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, 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, 1384, 67, 18535, 4672, 365, 18, 1978, 273, 444, 12, 950, 21068, 4137, 907, 12, 3348, 67, 7737, 13, 364, 1384, 67, 7737, 316, 1384, 67, 18535, 13, 365, ...
v = coeff_names[i][k+1]
v = tr_values[i][k]
def getBasis(self, total,xcoeffs,contins, coeff_names): # create the basis vectors for each attribute basis = Numeric.identity((total), Numeric.Float) # fix up the continuous attributes in coeffs (duplicate) and in basis (1.0 -> value[i]) x = Numeric.ones((total,), Numeric.Float) coeffs = [] lookup = [] conti = 0 j = 0 jj = 0 contins.append(-1) # sentry nlookup = [] for i in xrange(len(coeff_names)): nlookup.append(len(coeffs)) if i==contins[conti]: # continuous conti += 1 lookup.append(len(coeffs)) for k in xrange(len(coeff_names[i])-1): coeffs.append(xcoeffs[jj]) v = coeff_names[i][k+1] x[j] = v j += 1 jj += 1 else: # discrete for k in xrange(len(coeff_names[i])-1): lookup.append(len(coeffs)) coeffs.append(xcoeffs[jj]) j += 1 jj += 1 basis *= x return (basis,lookup,nlookup,coeffs)
d5d765a106ee2fda0789f07a6a122d52f838cef9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/d5d765a106ee2fda0789f07a6a122d52f838cef9/orngLinVis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2882, 17247, 12, 2890, 16, 2078, 16, 92, 30463, 16, 1213, 2679, 16, 11943, 67, 1973, 4672, 468, 752, 326, 10853, 10046, 364, 1517, 1566, 10853, 273, 16980, 18, 10781, 12443, 4963, 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, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2882, 17247, 12, 2890, 16, 2078, 16, 92, 30463, 16, 1213, 2679, 16, 11943, 67, 1973, 4672, 468, 752, 326, 10853, 10046, 364, 1517, 1566, 10853, 273, 16980, 18, 10781, 12443, 4963, 3631, ...
log.debug("client receive: type=%s object=%s" % (type, `obj`))
log.debug("client receive: type=%s object=%s" % (type, repr(obj)))
def _receiveobject(self):
e372d4eab1b2707019758a507219e13d190e810a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/348/e372d4eab1b2707019758a507219e13d190e810a/network.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 18149, 1612, 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, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 18149, 1612, 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, -...
text = context.get_form_value('site_search_text', default='').strip() text = Unicode.decode(text) namespace['site_search_text'] = text
text = context.get_form_value('site_search_text', type=Unicode).strip() namespace['text'] = text
def site_search(self, context): root = context.root
24090949bb274c4ec1fa4d25faeb978e740a7ce5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/24090949bb274c4ec1fa4d25faeb978e740a7ce5/website.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2834, 67, 3072, 12, 2890, 16, 819, 4672, 1365, 273, 819, 18, 3085, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2834, 67, 3072, 12, 2890, 16, 819, 4672, 1365, 273, 819, 18, 3085, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
The length of a path is assumed to be the number of its edges, or the sum of their labels.
The length of a path is assumed to be the number of its edges, or the sum of their labels.
def longest_path(self, s=None, t=None, weighted=False, algorithm="MILP", solver=None, verbose=0): r""" Returns a longest path of ``self``.
2844860c71e96d19faf73b53215f4ac4a13b1f2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/2844860c71e96d19faf73b53215f4ac4a13b1f2b/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 33, 7036, 16, 268, 33, 7036, 16, 13747, 33, 8381, 16, 4886, 1546, 49, 2627, 52, 3113, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 33, 7036, 16, 268, 33, 7036, 16, 13747, 33, 8381, 16, 4886, 1546, 49, 2627, 52, 3113, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 279...
if x: self._x0 -= x for child in self.children: child.x += x if y: self._y0 -= y for child in self.children: child.y += y
self.items.x -= x self.items.y -= y
def _scroll(self, x, y): """ Callback from the animation """ if x: self._x0 -= x for child in self.children: child.x += x if y: self._y0 -= y for child in self.children: child.y += y self._check_items() self._queue_sync(rendering=True)
b47bb145b9afab8cd03f9ba37d4dcd175be8f666 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11702/b47bb145b9afab8cd03f9ba37d4dcd175be8f666/grid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12033, 12, 2890, 16, 619, 16, 677, 4672, 3536, 8444, 628, 326, 8794, 3536, 365, 18, 3319, 18, 92, 3947, 619, 365, 18, 3319, 18, 93, 3947, 677, 365, 6315, 1893, 67, 3319, 1435, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12033, 12, 2890, 16, 619, 16, 677, 4672, 3536, 8444, 628, 326, 8794, 3536, 365, 18, 3319, 18, 92, 3947, 619, 365, 18, 3319, 18, 93, 3947, 677, 365, 6315, 1893, 67, 3319, 1435, 3...
return self.run_command('svn commit -F -', input=message)
return self.run_command(['svn', 'commit', '-m', message])
def commit_with_message(self, message): if self.dryrun: return "Dry run, no remote commit." return self.run_command('svn commit -F -', input=message)
47776b014bbf74781b60545bb5f16d07a3aa548e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/47776b014bbf74781b60545bb5f16d07a3aa548e/scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 67, 1918, 67, 2150, 12, 2890, 16, 883, 4672, 309, 365, 18, 25011, 2681, 30, 327, 315, 40, 1176, 1086, 16, 1158, 2632, 3294, 1199, 327, 365, 18, 2681, 67, 3076, 2668, 31505, 3294,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 67, 1918, 67, 2150, 12, 2890, 16, 883, 4672, 309, 365, 18, 25011, 2681, 30, 327, 315, 40, 1176, 1086, 16, 1158, 2632, 3294, 1199, 327, 365, 18, 2681, 67, 3076, 2668, 31505, 3294,...
member_line_obj.write(cr,uid,mlines, {'cancel_date':today}, context)
member_line_obj.write(cr,uid,mlines, {'date_cancel':today}, context)
def action_cancel(self, cr, uid, ids, context=None): '''Create a cancel_date on the membership_line object'''
d29c84f6a67089186a5558a2732c999630d7ee2c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/d29c84f6a67089186a5558a2732c999630d7ee2c/membership.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 9163, 1684, 279, 3755, 67, 712, 603, 326, 12459, 67, 1369, 733, 26418, 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, 1301, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 9163, 1684, 279, 3755, 67, 712, 603, 326, 12459, 67, 1369, 733, 26418, 2, -100, -100, -100, -100, -100...
pass
def __init__(self, package_name=None, **kwargs): if package_name: pkg = Package.by_name(package_name) assert pkg self.package_id = pkg.id for k,v in kwargs.items(): setattr(self, k, v)
def get_all(self): if not hasattr(self, '_all_items'): vals = [] for key, val in self.__dict__.items(): if not key.startswith('_'): vals.append(val) self._all_items = vals return self._all_items
6eca8f00efbbdf12538bf3d10633235e91fede58 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/265/6eca8f00efbbdf12538bf3d10633235e91fede58/authz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 454, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 454, 67, 3319, 11, 4672, 5773, 273, 5378, 364, 498, 16, 1244, 316, 365, 16186, 1576, 25648, 3319, 13332, 309, 486, 498...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 454, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 454, 67, 3319, 11, 4672, 5773, 273, 5378, 364, 498, 16, 1244, 316, 365, 16186, 1576, 25648, 3319, 13332, 309, 486, 498...
self.SetToolBitmapSize(wx.Size(16,16))
self._size = 16 self.SetToolBitmapSize(wx.Size(self._size,self._size))
def __init__(self, parent): wx.ToolBar.__init__(self, parent, -1, wx.DefaultPosition, wx.DefaultSize, wx.TB_FLAT|wx.TB_NODIVIDER) if sys.platform == 'darwin': self.SetToolBitmapSize(wx.Size(25,25)) else: self.SetToolBitmapSize(wx.Size(16,16)) self.parent = parent self.__init_items() self.__bind_events()
7b2c767a7799f85e09921f72c3bc22f8711533e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/7b2c767a7799f85e09921f72c3bc22f8711533e9/frame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 7075, 18, 6364, 5190, 16186, 2738, 972, 12, 2890, 16, 982, 16, 300, 21, 16, 7075, 18, 1868, 2555, 16, 7075, 18, 1868, 1225, 16, 7075, 18, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 982, 4672, 7075, 18, 6364, 5190, 16186, 2738, 972, 12, 2890, 16, 982, 16, 300, 21, 16, 7075, 18, 1868, 2555, 16, 7075, 18, 1868, 1225, 16, 7075, 18, 25...
def customize_ffmpeg_parameters(default_parameters):
def customize_ffmpeg_parameters(params):
def customize_ffmpeg_parameters(default_parameters): """Takes a list of parameters and modifies it based on platform-specific issues. Returns the newly modified list of parameters. :param default_parameters: list of parameters to modify :returns: list of modified parameters that will get passed to ffmpeg """ return default_parameters
49c62c8cea8f2fc504b9186cd04040eebe04679f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/49c62c8cea8f2fc504b9186cd04040eebe04679f/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20236, 67, 1403, 19951, 67, 3977, 12, 2010, 4672, 3536, 11524, 279, 666, 434, 1472, 471, 23934, 518, 2511, 603, 4072, 17, 12524, 8296, 18, 225, 2860, 326, 10894, 4358, 666, 434, 1472, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20236, 67, 1403, 19951, 67, 3977, 12, 2010, 4672, 3536, 11524, 279, 666, 434, 1472, 471, 23934, 518, 2511, 603, 4072, 17, 12524, 8296, 18, 225, 2860, 326, 10894, 4358, 666, 434, 1472, 18...
cli_diff_record_revisions(revid1, revid2)
cli_diff_revisions(revid1, revid2)
def main(): """Main entry point.""" if '--help' in sys.argv or \ '-h' in sys.argv: print_usage() elif '--version' in sys.argv or \ '-V' in sys.argv: print_version() else: try: cmd = sys.argv[1] opts = sys.argv[2:] if not opts: raise IndexError except IndexError: print_usage() sys.exit(1) if cmd == '--list-record-revisions': try: recid = opts[0] except IndexError: print_usage() sys.exit(1) cli_list_record_revisions(recid) elif cmd == '--get-record-revision': try: revid = opts[0] except IndexError: print_usage() sys.exit(1) cli_get_record_revision(revid) elif cmd == '--diff-record-revisions': try: revid1 = opts[0] revid2 = opts[1] except IndexError: print_usage() sys.exit(1) cli_diff_record_revisions(revid1, revid2) else: print """ERROR: Please specify a command. Please see '--help'.""" sys.exit(1)
5d0033cc591fb5ff8ff4c5c7a49b3713fde8478e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/5d0033cc591fb5ff8ff4c5c7a49b3713fde8478e/bibeditcli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 1241, 1634, 12123, 309, 3534, 5201, 11, 316, 2589, 18, 19485, 578, 521, 2400, 76, 11, 316, 2589, 18, 19485, 30, 1172, 67, 9167, 1435, 1327, 3534, 1589, 11, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 1241, 1634, 12123, 309, 3534, 5201, 11, 316, 2589, 18, 19485, 578, 521, 2400, 76, 11, 316, 2589, 18, 19485, 30, 1172, 67, 9167, 1435, 1327, 3534, 1589, 11, 316, ...
expectedExtensions = [ "exr", "pdc", "cin", "dpx", "cob", "obj", "sgi", "bw", "rgba", "rgb", "tdl" ]
expectedExtensions = [ "exr", "pdc", "cin", "dpx", "cob", "sgi", "bw", "rgba", "rgb", "tdl" ] if withASIO() : expectedExtensions += [ "obj" ]
def testSupportedExtensions( self ) :
7e97ff3a18f78e66a1b5fcdb8897728cddfde236 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9042/7e97ff3a18f78e66a1b5fcdb8897728cddfde236/Reader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 7223, 7513, 12, 365, 262, 294, 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, 1842, 7223, 7513, 12, 365, 262, 294, 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...
o.split(':')
o.split(':')[-1].strip() if 'InputFileError' in o: raise RuntimeError, 'indexing failed: %s' % \ o.split(':')[-1].strip()
def check_labelit_errors(self): '''Check through the standard output for error reports.'''
407d5a107786271dae2a0ce3810e712eb2fc5828 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/407d5a107786271dae2a0ce3810e712eb2fc5828/LabelitScreen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1925, 305, 67, 4324, 12, 2890, 4672, 9163, 1564, 3059, 326, 4529, 876, 364, 555, 10557, 1093, 6309, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1925, 305, 67, 4324, 12, 2890, 4672, 9163, 1564, 3059, 326, 4529, 876, 364, 555, 10557, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
perspectives = service.getPerspective("content")
perspectives = client.service.getPerspective("content")
def perspectives(): global subject, errors try: url = 'http://localhost:7080/rhq-rhq-enterprise-server-ejb3/PerspectiveManagerBean?wsdl' start(url) client = Client(url) print client # # get all (content) perspectives # print 'getPerspective()' perspectives = service.getPerspective("content") print 'perspectives: ', str(perspectives) # # get all perspectives # print 'getAllPerspective()' perspectives = service.getAllPerspectives() print 'perspectives: ', str(perspectives) except Exception, e: errors += 1 print e
bbf47852d5340bc61a13df1c466ebb90a12bec52 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1242/bbf47852d5340bc61a13df1c466ebb90a12bec52/rhq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13508, 1181, 3606, 13332, 225, 2552, 3221, 16, 1334, 225, 775, 30, 880, 273, 296, 2505, 2207, 13014, 30, 7301, 3672, 19, 30138, 85, 17, 30138, 85, 17, 2328, 12113, 17, 3567, 17, 73, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13508, 1181, 3606, 13332, 225, 2552, 3221, 16, 1334, 225, 775, 30, 880, 273, 296, 2505, 2207, 13014, 30, 7301, 3672, 19, 30138, 85, 17, 30138, 85, 17, 2328, 12113, 17, 3567, 17, 73, 10...
super(JsonFasVisitManager,self).__init__(self.fasURL, debug=debug)
self.debug = debug or False BaseVisitManager.__init__(self, timeout, debug=debug)
def __init__(self, timeout, debug=None): super(JsonFasVisitManager,self).__init__(self.fasURL, debug=debug)
89251d7d57c5642c0d3984777ffb3e442526d505 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9952/89251d7d57c5642c0d3984777ffb3e442526d505/jsonfasvisit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2021, 16, 1198, 33, 7036, 4672, 2240, 12, 3185, 42, 345, 10432, 1318, 16, 2890, 2934, 972, 2738, 972, 12, 2890, 18, 74, 345, 1785, 16, 1198, 33, 4148, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2021, 16, 1198, 33, 7036, 4672, 2240, 12, 3185, 42, 345, 10432, 1318, 16, 2890, 2934, 972, 2738, 972, 12, 2890, 18, 74, 345, 1785, 16, 1198, 33, 4148, ...
for mod, mod2 in modules:
for mod, _mod2 in modules:
def _readmodule(module, path, inpackage=None): '''Do the hard work for readmodule[_ex].''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initialize the dict for this module's contents dict = {} # Check if it is a built-in module; we don't do much for these if module in sys.builtin_module_names and not inpackage: _modules[module] = dict return dict # Check for a dotted module name i = module.rfind('.') if i >= 0: package = module[:i] submodule = module[i+1:] parent = _readmodule(package, path, inpackage) if inpackage: package = "%s.%s" % (inpackage, package) return _readmodule(submodule, parent['__path__'], package) # Search the path for the module f = None if inpackage: f, file, (suff, mode, type) = imp.find_module(module, path) else: f, file, (suff, mode, type) = imp.find_module(module, path + sys.path) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] path = [file] + path f, file, (suff, mode, type) = imp.find_module('__init__', [file]) _modules[fullmodule] = dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() return dict stack = [] # stack of (class, indent) pairs g = tokenize.generate_tokens(f.readline) try: for tokentype, token, start, end, line in g: if tokentype == DEDENT: lineno, thisindent = start # close nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] elif token == 'def': lineno, thisindent = start # close previous nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] tokentype, meth_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error if stack: cur_class = stack[-1][0] if isinstance(cur_class, Class): # it's a method cur_class._addmethod(meth_name, lineno) # else it's a nested def else: # it's a function dict[meth_name] = Function(fullmodule, meth_name, file, lineno) stack.append((None, thisindent)) # Marker for nested fns elif token == 'class': lineno, thisindent = start # close previous nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] tokentype, class_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # parse what follows the class name tokentype, token, start, end, line = g.next() inherit = None if token == '(': names = [] # List of superclasses # there's a list of superclasses level = 1 super = [] # Tokens making up current superclass while True: tokentype, token, start, end, line = g.next() if token in (')', ',') and level == 1: n = "".join(super) if n in dict: # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class is of the form # module.class: look in module for # class m = c[-2] c = c[-1] if m in _modules: d = _modules[m] if c in d: n = d[c] names.append(n) super = [] if token == '(': level += 1 elif token == ')': level -= 1 if level == 0: break elif token == ',' and level == 1: pass # only use NAME and OP (== dot) tokens for type name elif tokentype in (NAME, OP) and level == 1: super.append(token) # expressions in the base list are not supported inherit = names cur_class = Class(fullmodule, class_name, inherit, file, lineno) if not stack: dict[class_name] = cur_class stack.append((cur_class, thisindent)) elif token == 'import' and start[1] == 0: modules = _getnamelist(g) for mod, mod2 in modules: try: # Recursively read the imported module if not inpackage: _readmodule(mod, path) else: try: _readmodule(mod, path, inpackage) except ImportError: _readmodule(mod, []) except: # If we can't find or parse the imported module, # too bad -- don't die here. pass elif token == 'from' and start[1] == 0: mod, token = _getname(g) if not mod or token != "import": continue names = _getnamelist(g) try: # Recursively read the imported module d = _readmodule(mod, path, inpackage) except: # If we can't find or parse the imported module, # too bad -- don't die here. continue # add any classes that were defined in the imported module # to our name space if they were mentioned in the list for n, n2 in names: if n in d: dict[n2 or n] = d[n] elif n == '*': # don't add names that start with _ for n in d: if n[0] != '_': dict[n] = d[n] except StopIteration: pass f.close() return dict
fe1372c7d504075eedd3913f8cf33709b8f153a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/fe1372c7d504075eedd3913f8cf33709b8f153a5/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 2978, 12, 2978, 16, 589, 16, 316, 5610, 33, 7036, 4672, 9163, 3244, 326, 7877, 1440, 364, 855, 2978, 63, 67, 338, 65, 1093, 6309, 468, 8155, 326, 1983, 1605, 508, 261, 1484, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 896, 2978, 12, 2978, 16, 589, 16, 316, 5610, 33, 7036, 4672, 9163, 3244, 326, 7877, 1440, 364, 855, 2978, 63, 67, 338, 65, 1093, 6309, 468, 8155, 326, 1983, 1605, 508, 261, 1484, ...
"""Makes a variable available everywhere within the scope of the current suite.
"""Makes a variable available everywhere within the scope of the current suite.
def set_suite_variable(self, name, *values): """Makes a variable available everywhere within the scope of the current suite. Variables set with this keyword are available everywhere within the scope of the currently executed test suite. Setting variables with this keyword thus has the same effect as creating them using the Variable table in the test data file or importing them from variable files. Other test suites will not see variables set with this keyword. The variable name must be given either in the escaped format (e.g. \\${scalar} or \\@{list}) or without curly braces (e.g. $scalar or @list) to prevent it from being resolved. If a variable already exists within the new scope, its value will be overwritten. Otherwise a new variable is created. If a variable already exists within the current scope, the value can be left empty and the variable within the new scope gets the value within the current scope.
ef8b3c513c2fbfbe39dbbc410ee472d3b6ab88a2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/ef8b3c513c2fbfbe39dbbc410ee472d3b6ab88a2/BuiltIn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 30676, 67, 6105, 12, 2890, 16, 508, 16, 380, 2372, 4672, 3536, 14534, 279, 2190, 2319, 3614, 6051, 3470, 326, 2146, 434, 326, 783, 11371, 18, 225, 23536, 444, 598, 333, 4932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 30676, 67, 6105, 12, 2890, 16, 508, 16, 380, 2372, 4672, 3536, 14534, 279, 2190, 2319, 3614, 6051, 3470, 326, 2146, 434, 326, 783, 11371, 18, 225, 23536, 444, 598, 333, 4932, ...
pad.set_blocked_async(False, self.blockedCb, None)
def startRecordingVideo(self, quality): if not camera_presents: return
157adbc0cac15e60676d1733c49dfa163f8f8838 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6451/157adbc0cac15e60676d1733c49dfa163f8f8838/glive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 21037, 10083, 12, 2890, 16, 9312, 4672, 309, 486, 10836, 67, 6706, 87, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 21037, 10083, 12, 2890, 16, 9312, 4672, 309, 486, 10836, 67, 6706, 87, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
nodes = [] nodes.extend(flatten_nodes(self.nodes)) return tuple(nodes)
nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelist)
def getChildNodes(self): nodes = [] nodes.extend(flatten_nodes(self.nodes)) return tuple(nodes)
101b9307b0d9de62f324ef9ffa6e83f8040af642 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/101b9307b0d9de62f324ef9ffa6e83f8040af642/ast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23895, 12, 2890, 4672, 2199, 273, 5378, 2199, 18, 14313, 12, 16940, 67, 4690, 12, 2890, 18, 4690, 3719, 327, 3193, 12, 4690, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23895, 12, 2890, 4672, 2199, 273, 5378, 2199, 18, 14313, 12, 16940, 67, 4690, 12, 2890, 18, 4690, 3719, 327, 3193, 12, 4690, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
( "share/remoko/", ["themes/remoko.edj", "data/service_record.xml"] ), ( "share/pixmaps", ["images/remoko.png"] ), ( "share/applications", ["data/remoko.desktop"] ),
( "remoko", ["themes/remoko.edj", "data/service_record.xml", "data/settings.cfg"] ), ( "pixmaps", ["images/remoko.png"] ), ( "applications", ["data/remoko.desktop"] ),
def run(self): _clean.run(self)
f44dfea456c4495db7acc25631fab8b81c437564 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4221/f44dfea456c4495db7acc25631fab8b81c437564/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 389, 6200, 18, 2681, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 389, 6200, 18, 2681, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 944) else quickfix.IntField.__init__(self, 944, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 6334, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 6334, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
if not isinstance(halt, (int, long, Integer)): raise TypeError, "halt must be an integer" elif isinstance(halt, (int, long)): halt = Integer(halt)
def Zq(q, prec = 20, type = 'capped-abs', modulus = None, names=None, print_mode=None, halt = 40, zp_name = None, check = True): r""" Return an unramified extension of $\Z_p$. INPUT: q -- prime power prec -- integer (default: 20) type -- string (default: 'capped-abs'); see the documentation for Zp modulus -- polynomial (default: None) names -- tuple print_mode -- string (default: None); see the documentation for Zp halt -- integer (default: 40): only applicable for type='lazy' zp_name -- string (default: None): a name for the underlying Zp's prime check -- bool (default: True): whether to verify that the input is valid. OUTPUT: -- an unramified extension of Z_p EXAMPLES: sage: k.<a> = Zq(4); k Unramified Extension of 2-adic Ring with capped absolute precision 20 in a defined by (1 + O(2^20))*x^2 + (1 + O(2^20))*x + (1 + O(2^20)) sage: k.<a> = Zq(3^10); k Unramified Extension of 3-adic Ring with capped absolute precision 20 in a defined by (1 + O(3^20))*x^10 + (2 + O(3^20))*x^6 + (2 + O(3^20))*x^5 + (2 + O(3^20))*x^4 + (1 + O(3^20))*x + (2 + O(3^20)) """ if check: if names is None: raise TypeError, "You must specify the name of the generator." if isinstance(names, (list, tuple)): names = names[0] if not isinstance(prec, (int, long, Integer)): raise TypeError, "prec must be an integer" elif isinstance(prec, (int, long)): prec = Integer(prec) if not (modulus is None or isinstance(modulus, Polynomial)): raise TypeError, "modulus must be a polynomial" if not isinstance(names, str): names = str(names) #raise TypeError, "names must be a string" if not isinstance(halt, (int, long, Integer)): raise TypeError, "halt must be an integer" elif isinstance(halt, (int, long)): halt = Integer(halt) q = Integer(q) F = q.factor() if len(F) != 1: raise ValueError, "q must be a prime power" if F[0][1] == 1: return Zp(q, prec, type, print_mode, halt, names, check) base = Zp(F[0][0], prec, type, print_mode, halt, zp_name, check = False) if modulus is None: from sage.rings.finite_field import FiniteField as GF if zp_name is None: zp_name = (str(F[0][0]),) modulus = PolynomialRing(base, 'x')(GF(q, names).modulus().change_ring(ZZ)) return ExtensionFactory(base, modulus, prec, print_mode, halt, names, check, unram = True)
52b1691f211d5745f1620cd0a7f20ac04ca573c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/52b1691f211d5745f1620cd0a7f20ac04ca573c9/factory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2285, 85, 12, 85, 16, 13382, 273, 4200, 16, 618, 273, 296, 5909, 1845, 17, 5113, 2187, 24770, 273, 599, 16, 1257, 33, 7036, 16, 1172, 67, 3188, 33, 7036, 16, 18389, 273, 8063, 16, 99...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2285, 85, 12, 85, 16, 13382, 273, 4200, 16, 618, 273, 296, 5909, 1845, 17, 5113, 2187, 24770, 273, 599, 16, 1257, 33, 7036, 16, 1172, 67, 3188, 33, 7036, 16, 18389, 273, 8063, 16, 99...
config['user'] = user config['passwd'] = 'pass'
config['user'] = db_write_user config['passwd'] = db_write_pass
def remove_vt_from_db(self, host, port, db_name, user, vt_id): """remove_vt_from_db(host:str, port:int, db_name:str, user:str, vt_id:int) -> 0 or 1 Remove a vistrail from the repository """ config = {} config['host'] = host config['port'] = int(port) config['db'] = db_name config['user'] = user config['passwd'] = 'pass' try: conn = db.services.io.open_db_connection(config) db.services.io.delete_entity_from_db(conn,'vistrail', vt_id) db.services.io.close_db_connection(conn) return 1 except Exception, e: self.server_logger.info("Error: %s"%str(e)) if conn: db.services.io.close_db_connection(conn) return "FAILURE: %s" %str(e)
3ebd431b3e88347283e0d6f951c8fac25465a30e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/3ebd431b3e88347283e0d6f951c8fac25465a30e/application_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 11734, 67, 2080, 67, 1966, 12, 2890, 16, 1479, 16, 1756, 16, 1319, 67, 529, 16, 729, 16, 7966, 67, 350, 4672, 3536, 4479, 67, 11734, 67, 2080, 67, 1966, 12, 2564, 30, 701, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 11734, 67, 2080, 67, 1966, 12, 2890, 16, 1479, 16, 1756, 16, 1319, 67, 529, 16, 729, 16, 7966, 67, 350, 4672, 3536, 4479, 67, 11734, 67, 2080, 67, 1966, 12, 2564, 30, 701, ...
values = { 'result': result, 'errorStr': getFailureString(
values = { 'errorStr': getFailureString(
def writeTraceableResultConv(f, type, paramNum, result): typeName = getBuiltinOrNativeTypeName(type) if typeName is not None: template = traceableResultConvTemplates.get(typeName) if template is not None: values = { 'result': result, 'errorStr': getFailureString( getTraceInfoDefaultReturn(type), 2) } f.write(substitute(template, values)) return # else fall through; this type isn't supported yet elif isInterfaceType(type): if isVariantType(type): f.write(" JSBool ok = xpc_qsVariantToJsval(ccx, %s, %d, " "tvr.addr());\n" % (result, paramNum)) else: f.write(" AutoMarkingNativeInterfacePtr resultiface(ccx, " "%s_Interface(ccx));\n" % type.name) f.write(" JSBool ok = xpc_qsXPCOMObjectToJsval(ccx, %s, " "xpc_qsGetWrapperCache(%s), resultiface, tvr.addr());\n" % (result, result)) f.write(" if (!ok) {\n"); writeFailure(f, getTraceInfoDefaultReturn(type), 2) f.write(" return *tvr.addr();\n") return warn("Unable to convert result of type %s" % typeName) f.write(" !; // TODO - Convert `result` to jsval, store in rval.\n") f.write(" return xpc_qsThrow(cx, NS_ERROR_UNEXPECTED); // FIXME\n")
d4894752c17d8324526f58a8ae8c82f1bcfbecae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/d4894752c17d8324526f58a8ae8c82f1bcfbecae/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 1253, 17467, 12, 74, 16, 618, 16, 579, 2578, 16, 563, 4672, 8173, 273, 2882, 4853, 267, 1162, 9220, 7947, 12, 723, 13, 309, 8173, 353, 486, 599, 30, 1542, 273, 2606, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 1253, 17467, 12, 74, 16, 618, 16, 579, 2578, 16, 563, 4672, 8173, 273, 2882, 4853, 267, 1162, 9220, 7947, 12, 723, 13, 309, 8173, 353, 486, 599, 30, 1542, 273, 2606, ...
log.debug('here2')
def parse_configfiles(configfiles, options, names): configparser = ConfigParser.ConfigParser() # ConfigParser.read() silently ignores errors, so open the files # manually (since we want to notify the user of any errors). for configfile in configfiles: log.debug('here') fp = open(configfile, 'r') # may raise IOError. log.debug('here2') configparser.readfp(fp, configfile) for optname in configparser.options('epydoc'): val = configparser.get('epydoc', optname).strip() if optname in ('modules', 'objects', 'values', 'module', 'object', 'value'): names.extend(val.split()) elif optname in ('output', 'target'): options.target = val elif optname == 'inheritance': if val.lower() not in INHERITANCE_STYLES: raise ValueError('"inheritance" expected one of: %s.' % ', '.join(INHERITANCE_STYLES)) options.inerhitance = val.lower() elif optname == 'docformat': options.docformat = val elif optname == 'css': options.css = val elif optname == 'name': options.prj_name = val elif optname == 'url': options.prj_url = val elif optname == 'link': options.prj_link = val elif optname == 'top': options.top_page = val elif optname == 'help': options.help_file = val elif optname =='frames': options.frames = _str_to_bool(val, optname) elif optname =='private': options.private = _str_to_bool(val, optname) elif optname =='imports': options.imports = _str_to_bool(val, optname) elif optname == 'verbosity': try: options.verbosity = int(val) except ValueError: raise ValueError('"verbosity" expected an int') elif optname == 'parse': options.parse = _str_to_bool(val, optname) elif optname == 'introspect': options.introspect = _str_to_bool(val, optname) elif optname == 'profile': options.profile = _str_to_bool(val, optname) elif optname == 'dotpath': options.dotpath = val elif optname == 'graph': graphtypes = val.replace(',', '').split() for graphtype in graphtypes: if graphtype not in GRAPH_TYPES: raise ValueError('"graph" expected one of: %s.' % ', '.join(GRAPH_TYPES)) options.graphs.extend(graphtypes) else: raise ValueError('Unknown option %s' % optname)
50f3869ab640ffc9b6049e1967796fcfb7213ba1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/50f3869ab640ffc9b6049e1967796fcfb7213ba1/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1425, 2354, 12, 1425, 2354, 16, 702, 16, 1257, 4672, 642, 4288, 273, 25076, 18, 809, 2678, 1435, 468, 25076, 18, 896, 1435, 22274, 17868, 1334, 16, 1427, 1696, 326, 1390, 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, 1109, 67, 1425, 2354, 12, 1425, 2354, 16, 702, 16, 1257, 4672, 642, 4288, 273, 25076, 18, 809, 2678, 1435, 468, 25076, 18, 896, 1435, 22274, 17868, 1334, 16, 1427, 1696, 326, 1390, 468, ...
if self.debugging: print '--> file', `file`
print '!'*self.debugging, '--> file', `file`
def do_include(self, args): file = args file = os.path.join(self.includedir, file) try: fp = open(file, 'r') except IOError, msg: print '*** Can\'t open include file', `file` return if self.debugging: print '--> file', `file` save_done = self.done save_skip = self.skip save_stack = self.stack self.includedepth = self.includedepth + 1 self.parserest(fp, 0) self.includedepth = self.includedepth - 1 fp.close() self.done = save_done self.skip = save_skip self.stack = save_stack if self.debugging: print '<-- file', `file`
db6f5c4045c0343f80223a59ad6975c71dc11049 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/db6f5c4045c0343f80223a59ad6975c71dc11049/texi2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6702, 12, 2890, 16, 833, 4672, 585, 273, 833, 585, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 20405, 481, 16, 585, 13, 775, 30, 4253, 273, 1696, 12, 768, 16, 296, 86, 613...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6702, 12, 2890, 16, 833, 4672, 585, 273, 833, 585, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 20405, 481, 16, 585, 13, 775, 30, 4253, 273, 1696, 12, 768, 16, 296, 86, 613...
def RepositoryCommitWithStatus (self):
def RepositoryCommitWithStatus(self):
def RepositoryCommitWithStatus (self): """ Do a repository commit with notice posted in the Status bar. """ self.setStatusMessage (_(u"committing changes to the repository..."))
1482f1cf1f77ecd348ef320a23c16adfed920e12 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/1482f1cf1f77ecd348ef320a23c16adfed920e12/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6281, 5580, 1190, 1482, 12, 2890, 4672, 3536, 2256, 279, 3352, 3294, 598, 11690, 23082, 316, 326, 2685, 4653, 18, 3536, 365, 18, 542, 1482, 1079, 261, 67, 12, 89, 6, 7371, 1787, 3478, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6281, 5580, 1190, 1482, 12, 2890, 4672, 3536, 2256, 279, 3352, 3294, 598, 11690, 23082, 316, 326, 2685, 4653, 18, 3536, 365, 18, 542, 1482, 1079, 261, 67, 12, 89, 6, 7371, 1787, 3478, ...
self.debug_trace("singleValueType")
def singleValueType(self): self.debug_trace("singleValueType") if ( self.Tag_ubyte() or self.Tag_uint16() or self.Tag_uint32() or \ self.Tag_sint16() or self.Tag_sint32() or self.Tag_real32() ): self.pack(self.pack_string, self.next_num()), return 1 return 0
ecf78c969222f7513a2f516b0355728295fb546a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/ecf78c969222f7513a2f516b0355728295fb546a/pxlasm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2202, 17930, 12, 2890, 4672, 309, 261, 365, 18, 1805, 67, 10340, 736, 1435, 578, 365, 18, 1805, 67, 11890, 2313, 1435, 578, 365, 18, 1805, 67, 11890, 1578, 1435, 578, 521, 365, 18, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2202, 17930, 12, 2890, 4672, 309, 261, 365, 18, 1805, 67, 10340, 736, 1435, 578, 365, 18, 1805, 67, 11890, 2313, 1435, 578, 365, 18, 1805, 67, 11890, 1578, 1435, 578, 521, 365, 18, 180...
testflag = 'FALSE'
self.testflag = 'FALSE'
def __init__(self, settings): self.settings = settings self.contents = '' if settings.LIVE.value: testflag = 'FALSE' self.connection = settings.CONNECTION.value else: testflag = 'TRUE' self.connection = settings.CONNECTION_TEST.value self.configuration = { 'merchantID' : settings.MERCHANT_ID.value, 'password' : settings.TRANKEY.value, }
e67406586f3690bb12781847cad2215804eabfc2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13656/e67406586f3690bb12781847cad2215804eabfc2/processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1947, 4672, 365, 18, 4272, 273, 1947, 365, 18, 3980, 273, 875, 309, 1947, 18, 2053, 3412, 18, 1132, 30, 365, 18, 3813, 6420, 273, 296, 21053, 11, 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, 1001, 2738, 972, 12, 2890, 16, 1947, 4672, 365, 18, 4272, 273, 1947, 365, 18, 3980, 273, 875, 309, 1947, 18, 2053, 3412, 18, 1132, 30, 365, 18, 3813, 6420, 273, 296, 21053, 11, 365, ...
return cmp((self.date, self.open, self.high, self.low, self.close, self.volume), (other.date, other.open, other.high, other.low, other.close, other.volume))
return cmp((self.timestamp, self.open, self.high, self.low, self.close, self.volume), (other.timestamp, other.open, other.high, other.low, other.close, other.volume))
def __cmp__(self, other): """ Compare self and other.
28032c5a676d83867b6e4195ae449dd85507289d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/28032c5a676d83867b6e4195ae449dd85507289d/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 3536, 11051, 365, 471, 1308, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 3536, 11051, 365, 471, 1308, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print 'Check_buy parent'
def check_buy(self, cr, uid, ids, context=None): print 'Check_buy' for procurement in self.browse(cr, uid, ids): for line in procurement.product_id.flow_pull_ids: print line.location_src_id.name, line.location_id.name, line.type_proc if line.location_id==procurement.location_id: return line.type_proc=='buy' print 'Check_buy parent' return super(mrp_procurement, self).check_buy(cr, uid, ids)
08d47ef29ff511841dc03781ea6d891a014b3d39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/08d47ef29ff511841dc03781ea6d891a014b3d39/mrp_pull.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 70, 9835, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1172, 296, 1564, 67, 70, 9835, 11, 364, 5418, 594, 475, 316, 365, 18, 25731, 12, 3353, 16, 4555, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 70, 9835, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1172, 296, 1564, 67, 70, 9835, 11, 364, 5418, 594, 475, 316, 365, 18, 25731, 12, 3353, 16, 4555, ...
print>> self.file
print >> self.file
def do_gen_file_header(self): la = self.typelib.GetLibAttr() moduleDoc = self.typelib.GetDocumentation(-1) docDesc = "" if moduleDoc[1]: docDesc = moduleDoc[1]
cfd84d318292d699ca53899ee423b08bfb797445 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/cfd84d318292d699ca53899ee423b08bfb797445/genpy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4507, 67, 768, 67, 3374, 12, 2890, 4672, 7125, 273, 365, 18, 12846, 30575, 18, 967, 5664, 3843, 1435, 1605, 1759, 273, 365, 18, 12846, 30575, 18, 967, 18905, 19236, 21, 13, 99...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 67, 4507, 67, 768, 67, 3374, 12, 2890, 4672, 7125, 273, 365, 18, 12846, 30575, 18, 967, 5664, 3843, 1435, 1605, 1759, 273, 365, 18, 12846, 30575, 18, 967, 18905, 19236, 21, 13, 99...
if event.keyval == 65457:
if event.keyval == 65457:
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arrow
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1760, 5668, 67, 856, 1028, 12, 2890, 16, 3604, 16, 871, 4672, 309, 871, 18, 2019, 480, 22718, 18, 75, 2883, 18, 23191, 67, 11704, 471, 871, 18, 2019, 480, 22718, 18, 75, 2883, 18, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1760, 5668, 67, 856, 1028, 12, 2890, 16, 3604, 16, 871, 4672, 309, 871, 18, 2019, 480, 22718, 18, 75, 2883, 18, 23191, 67, 11704, 471, 871, 18, 2019, 480, 22718, 18, 75, 2883, 18, 18...
if other is None: other = ContainerRef.BaseRef
def __init__(self, other=None, indirection=None): self._indirections = [] # if no other passed in, try ContainerRef.BaseRef if other is None: other = ContainerRef.BaseRef if other is not None: for ind in other._indirections: self.addIndirection(ind) if indirection: self.addIndirection(indirection)
88950518abcce43f6828c7e417218c4bdb6988d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/88950518abcce43f6828c7e417218c4bdb6988d8/ContainerLeakDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1308, 33, 7036, 16, 1547, 2769, 33, 7036, 4672, 365, 6315, 728, 2769, 87, 273, 5378, 468, 309, 1158, 1308, 2275, 316, 16, 775, 4039, 1957, 18, 2171, 1957...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1308, 33, 7036, 16, 1547, 2769, 33, 7036, 4672, 365, 6315, 728, 2769, 87, 273, 5378, 468, 309, 1158, 1308, 2275, 316, 16, 775, 4039, 1957, 18, 2171, 1957...
if host_is_aggregated(hostname):
is_aggregated = host_is_aggregated(hostname) if is_aggregated:
def dump_host(hostname): print if is_cluster(hostname): color = tty_bgmagenta add_txt = " (cluster of " + (",".join(nodes_of(hostname))) + ")" else: color = tty_bgblue add_txt = "" print "%s%s%s%-78s %s" % (color, tty_bold, tty_white, hostname + add_txt, tty_normal) tags = tags_of_host(hostname) print tty_yellow + "Tags: " + tty_normal + ", ".join(tags) if is_cluster(hostname): parents_list = nodes_of(hostname) else: parents_list = parents_of(hostname) if len(parents_list) > 0: print tty_yellow + "Parents: " + tty_normal + ", ".join(parents_list) print tty_yellow + "Host groups: " + tty_normal + ", ".join(hostgroups_of(hostname)) print tty_yellow + "Contact groups: " + tty_normal + ", ".join(host_contactgroups_of([hostname])) notperiod = (host_extra_conf(hostname, host_notification_periods) + [""])[0] print tty_yellow + "Notification: " + tty_normal + notperiod agenttype = "TCP (port: %d)" % agent_port if is_snmp_host(hostname): community = get_snmp_community(hostname) if is_bulkwalk_host(hostname): bulk = "yes" else: bulk = "no" agenttype = "SNMP (community: '%s', bulk walk: %s)" % (community, bulk) print tty_yellow + "Type of agent: " + tty_normal + agenttype if host_is_aggregated(hostname): print tty_yellow + "Is aggregated: " + tty_normal + "yes" shn = summary_hostname(hostname) print tty_yellow + "Summary host: " + tty_normal + shn print tty_yellow + "Summary host groups: " + tty_normal + ", ".join(summary_hostgroups_of(hostname)) print tty_yellow + "Summary contact groups: " + tty_normal + ", ".join(host_contactgroups_of([shn])) notperiod = (host_extra_conf(hostname, summary_host_notification_periods) + [""])[0] print tty_yellow + "Summary notification: " + tty_normal + notperiod else: print tty_yellow + "Is aggregated: " + tty_normal + "no" format_string = " %-15s %s%-10s %s%-17s %s%-14s%s %s%-16s%s" print tty_yellow + "Services:" + tty_normal check_items = get_sorted_check_table(hostname) # check_items.sort() headers = ["checktype", "item", "params", "description", "groups", "summarized to", "groups"] colors = [ tty_normal, tty_blue, tty_normal, tty_green, tty_normal, tty_red, tty_white ] if service_dependencies != []: headers.append("depends on") colors.append(tty_magenta) print_table(headers, colors, [ [ checktype, item, params, description, ",".join(service_extra_conf(hostname, description, service_groups)), aggregated_service_name(hostname, description), ",".join(service_extra_conf(hostname, aggregated_service_name(hostname, description), summary_service_groups)), ",".join(deps) ] for checktype, item, params, description, deps in check_items ], " ")
0069022b2b45b5056524e5d8f699603187cab9cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/0069022b2b45b5056524e5d8f699603187cab9cb/check_mk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 2564, 12, 10358, 4672, 1172, 309, 353, 67, 7967, 12, 10358, 4672, 2036, 273, 21520, 67, 12370, 4527, 24066, 527, 67, 5830, 273, 315, 261, 7967, 434, 315, 397, 261, 3113, 9654, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 2564, 12, 10358, 4672, 1172, 309, 353, 67, 7967, 12, 10358, 4672, 2036, 273, 21520, 67, 12370, 4527, 24066, 527, 67, 5830, 273, 315, 261, 7967, 434, 315, 397, 261, 3113, 9654, ...
if not _default_root: _default_root = master
def _setup(self, master, cnf): if _support_default_root: global _default_root if not master: if not _default_root: _default_root = Tk() master = _default_root if not _default_root: _default_root = master self.master = master self.tk = master.tk name = None if cnf.has_key('name'): name = cnf['name'] del cnf['name'] if not name: name = `id(self)` self._name = name if master._w=='.': self._w = '.' + name else: self._w = master._w + '.' + name self.children = {} if self.master.children.has_key(self._name): self.master.children[self._name].destroy() self.master.children[self._name] = self
1ab27b91ff30a6035b9c74ca84f441f832a9a91c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1ab27b91ff30a6035b9c74ca84f441f832a9a91c/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 12, 2890, 16, 4171, 16, 23118, 4672, 309, 389, 13261, 67, 1886, 67, 3085, 30, 2552, 389, 1886, 67, 3085, 309, 486, 4171, 30, 309, 486, 389, 1886, 67, 3085, 30, 389, 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, 389, 8401, 12, 2890, 16, 4171, 16, 23118, 4672, 309, 389, 13261, 67, 1886, 67, 3085, 30, 2552, 389, 1886, 67, 3085, 309, 486, 4171, 30, 309, 486, 389, 1886, 67, 3085, 30, 389, 1886, ...
rcopy.type.ptrptr = True
rcopy.type.ptr = 0 rcopy.type.ptrptr = 1
def makeCxxDecl(decl): return cxx.Decl(canonicalType(decl.type), decl.progname)
3302a3e256184bcadbdf9fa2ed384cb879f1e610 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/3302a3e256184bcadbdf9fa2ed384cb879f1e610/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 39, 5279, 3456, 12, 8840, 4672, 327, 276, 5279, 18, 3456, 12, 18288, 559, 12, 8840, 18, 723, 3631, 3496, 18, 14654, 529, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1221, 39, 5279, 3456, 12, 8840, 4672, 327, 276, 5279, 18, 3456, 12, 18288, 559, 12, 8840, 18, 723, 3631, 3496, 18, 14654, 529, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.tz_offset = int(float(self._cfg.tz_offset) * 3600) self.language = "" self.date_fmt = "" self.datetime_fmt = "" self.quicklinks = [] self.subscribed_pages = [] self.theme_name = self._cfg.theme_default self.editor_default = self._cfg.editor_default self.editor_ui = self._cfg.editor_ui
self.tz_offset = int(float(self._cfg.tz_offset) * 3600) self.language = "" self.date_fmt = "" self.datetime_fmt = "" self.quicklinks = [] self.subscribed_pages = [] self.theme_name = self._cfg.theme_default self.editor_default = self._cfg.editor_default self.editor_ui = self._cfg.editor_ui
def __init__(self, request, id=None, name="", password=None, auth_username=""): """ Initialize user object @param request: the request object @param id: (optional) user ID @param name: (optional) user name @param password: (optional) user password @param auth_username: (optional) already authenticated user name (e.g. apache basic auth) """ self._cfg = request.cfg self.valid = 0 self.trusted = 0 self.id = id self.auth_username = auth_username
3f9a459d8ba3fe2d7fdf1722481efb7fad9b07a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/3f9a459d8ba3fe2d7fdf1722481efb7fad9b07a9/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 16, 612, 33, 7036, 16, 508, 1546, 3113, 2201, 33, 7036, 16, 1357, 67, 5053, 1546, 6, 4672, 3536, 9190, 729, 733, 225, 632, 891, 590, 30, 326, 590,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 16, 612, 33, 7036, 16, 508, 1546, 3113, 2201, 33, 7036, 16, 1357, 67, 5053, 1546, 6, 4672, 3536, 9190, 729, 733, 225, 632, 891, 590, 30, 326, 590,...
<unittest.TestResult run=3 errors=0 failures=2>
<unittest.TestResult run=3 errors=0 failures=1>
>>> def tearDown(t):
52e0ffbd344513640f66899b50d386f5e487dfb1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/52e0ffbd344513640f66899b50d386f5e487dfb1/test_doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 268, 2091, 4164, 12, 88, 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, 4080, 1652, 268, 2091, 4164, 12, 88, 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...
self.SetRepository (app.repository)
def __init__(self, **args): """ Create instances of other objects that belong to the application. Here are all the public attributes:
80d0fff1386ddc0e5c31832b59134e460bf62a27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/80d0fff1386ddc0e5c31832b59134e460bf62a27/Application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 1968, 4672, 3536, 1788, 3884, 434, 1308, 2184, 716, 10957, 358, 326, 2521, 18, 13743, 854, 777, 326, 1071, 1677, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 1968, 4672, 3536, 1788, 3884, 434, 1308, 2184, 716, 10957, 358, 326, 2521, 18, 13743, 854, 777, 326, 1071, 1677, 30, 2, -100, -100, -100, -100, -100,...
print "Multiple parameter "+res[0]+" in index.pro file..."
def __read_index(self): ''' Read index.pro file and write corresponding data Should only be called by set_param''' if self.__updating: print "Reading index.pro...", fpar=param_file(self.datadir+'index.pro',False,precision=self.precision) while True: (descr,res)=fpar.readline() if descr=='p': try: self.param['index'].create_dataset(res[0],data=res[1]) except(ValueError): print "Multiple parameter "+res[0]+" in index.pro file..." try: self.param['index'][res[0]][...]=res[1] except TypeError: print "Parameter "+res[0]+" defined with different multiplicty." del self.param['index/'+res[0]] self.param['index'].create_dataset(res[0],data=res[1]) elif descr=='e': break del(fpar) print "Done."
082bf2268d2d7b8de598296ccb109e521a6c42dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1377/082bf2268d2d7b8de598296ccb109e521a6c42dc/hdf5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 67, 1615, 12, 2890, 4672, 9163, 2720, 770, 18, 685, 585, 471, 1045, 4656, 501, 9363, 1338, 506, 2566, 635, 444, 67, 891, 26418, 309, 365, 16186, 5533, 1776, 30, 1172, 315, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 896, 67, 1615, 12, 2890, 4672, 9163, 2720, 770, 18, 685, 585, 471, 1045, 4656, 501, 9363, 1338, 506, 2566, 635, 444, 67, 891, 26418, 309, 365, 16186, 5533, 1776, 30, 1172, 315, 1...
TD(M, f='logical_not', out='?'),
TD(M, f='logical_not'),
def __init__(self, nin, nout, identity, docstring, *type_descriptions): self.nin = nin self.nout = nout if identity is None: identity = None_ self.identity = identity self.docstring = docstring self.type_descriptions = [] for td in type_descriptions: self.type_descriptions.extend(td) for td in self.type_descriptions: td.finish_signature(self.nin, self.nout)
772b0dab26370a36c3774049ad50315fc953c07a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/772b0dab26370a36c3774049ad50315fc953c07a/generate_umath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 267, 16, 290, 659, 16, 4215, 16, 14525, 16, 380, 723, 67, 30288, 4672, 365, 18, 82, 267, 273, 290, 267, 365, 18, 82, 659, 273, 290, 659, 309, 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, 1001, 2738, 972, 12, 2890, 16, 290, 267, 16, 290, 659, 16, 4215, 16, 14525, 16, 380, 723, 67, 30288, 4672, 365, 18, 82, 267, 273, 290, 267, 365, 18, 82, 659, 273, 290, 659, 309, 42...
vals += "'" + val + "',"
vals += "'" + str(val) + "',"
def _insert(self, table, **row):
0751f4d124560460eb1cf782caa72d4f7314d7d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8821/0751f4d124560460eb1cf782caa72d4f7314d7d8/MySQLStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6387, 12, 2890, 16, 1014, 16, 2826, 492, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6387, 12, 2890, 16, 1014, 16, 2826, 492, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
c()
rv = c()
def ExpectMissingValueInClosure(self, column_name, c): self.problems.AssertNoMoreExceptions() c() e = self.problems.PopException('MissingValue') self.assertEqual(column_name, e.column_name) # these should not throw any exceptions e.FormatProblem() e.FormatContext() self.problems.AssertNoMoreExceptions()
d569942b51c3d04c88b05f5087c12042e1af2eaf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6302/d569942b51c3d04c88b05f5087c12042e1af2eaf/testtransitfeed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15510, 4841, 620, 382, 10573, 12, 2890, 16, 1057, 67, 529, 16, 276, 4672, 365, 18, 29812, 18, 8213, 2279, 7417, 11416, 1435, 5633, 273, 276, 1435, 425, 273, 365, 18, 29812, 18, 7049, 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, 15510, 4841, 620, 382, 10573, 12, 2890, 16, 1057, 67, 529, 16, 276, 4672, 365, 18, 29812, 18, 8213, 2279, 7417, 11416, 1435, 5633, 273, 276, 1435, 425, 273, 365, 18, 29812, 18, 7049, 5...
takeSnapshot(self.win, frameName )
self.win.saveScreenshot(Filename(frameName))
def _movieTask(self, state): currT = globalClock.getFrameTime() if currT >= state.endT: return Task.done else: frameName = state.outputString % state.frameIndex self.notify.info("Capturing frame: " + frameName) takeSnapshot(self.win, frameName ) state.frameIndex += 1 return Task.cont
0de8ef7f7a6dd9b4c3f4827dde89364fa36e817f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/0de8ef7f7a6dd9b4c3f4827dde89364fa36e817f/ShowBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8683, 13120, 2174, 12, 2890, 16, 919, 4672, 4306, 56, 273, 2552, 14027, 18, 588, 3219, 950, 1435, 309, 4306, 56, 1545, 919, 18, 409, 56, 30, 327, 3837, 18, 8734, 469, 30, 2623, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8683, 13120, 2174, 12, 2890, 16, 919, 4672, 4306, 56, 273, 2552, 14027, 18, 588, 3219, 950, 1435, 309, 4306, 56, 1545, 919, 18, 409, 56, 30, 327, 3837, 18, 8734, 469, 30, 2623, ...
bb.msg.error(bb.msg.domain.Util, "Error in compiling python function in: ", realfile)
bb.msg.error(bb.msg.domain.Util, "Error in compiling python function in: %s" % (realfile))
def better_compile(text, file, realfile, mode = "exec"): """ A better compile method. This method will print the offending lines. """ try: return compile(text, file, mode) except Exception as e: # split the text into lines again body = text.split('\n') bb.msg.error(bb.msg.domain.Util, "Error in compiling python function in: ", realfile) bb.msg.error(bb.msg.domain.Util, "The lines leading to this error were:") bb.msg.error(bb.msg.domain.Util, "\t%d:%s:'%s'" % (e.lineno, e.__class__.__name__, body[e.lineno-1])) _print_trace(body, e.lineno) # exit now sys.exit(1)
ad8c5b61a44fee43e5c31579b6d6d0ca639c1bf4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/ad8c5b61a44fee43e5c31579b6d6d0ca639c1bf4/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7844, 67, 11100, 12, 955, 16, 585, 16, 2863, 768, 16, 1965, 273, 315, 4177, 6, 4672, 3536, 432, 7844, 4074, 707, 18, 1220, 707, 903, 1172, 225, 326, 3397, 2846, 2362, 18, 3536, 775, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7844, 67, 11100, 12, 955, 16, 585, 16, 2863, 768, 16, 1965, 273, 315, 4177, 6, 4672, 3536, 432, 7844, 4074, 707, 18, 1220, 707, 903, 1172, 225, 326, 3397, 2846, 2362, 18, 3536, 775, ...
<td colspan="3" height="3"> </td>
<th class="searchboxheader"> Added since: </th> <th class="searchboxheader"> until: </th>
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong class="headline"><span class="h1">%s</span></strong> <input type="hidden" name="cc" value="%s"> <input type="hidden" name="as" value="%s"> """ % (weburl, cc, cc, as) if ot: out += """<input type="hidden" name="ot" value="%s">""" % ot if sp: out += """<input type="hidden" name="sp" value="%s">""" % sp # possibly print external search engines links (Google box): if cfg_google_box: out += """<table align="right"><tr><td>%s</td></tr></table>""" % create_google_box(p, f, p1, p2, p3) out += "<table>" # firstly, print Query box: if as==1: # print Advanced Search form: # define search box elements: cell_1_left = "<small><strong>Search for:</strong></small><br>" + create_matchtype_box('m1', m1) + \ """<input type="text" name="p1" size="%d" value="%s">""" % (cfg_advancedsearch_pattern_box_width, cgi.escape(p1,1)) cell_1_right = "<small><strong>within:</strong></small><br>%s" % create_searchwithin_selection_box('f1', f1) cell_1_moreright = create_andornot_box('op1', op1) cell_1_farright = "" cell_2_left = create_matchtype_box('m2', m2) + """<input type="text" name="p2" size="%d" value="%s">""" % (cfg_advancedsearch_pattern_box_width, cgi.escape(p2,1)) cell_2_right = create_searchwithin_selection_box('f2', f2) cell_2_moreright = create_andornot_box('op2', op2) cell_2_farright = "" cell_3_left = create_matchtype_box('m3', m3) + """<input type="text" name="p3" size="%d" value="%s">""" % (cfg_advancedsearch_pattern_box_width, cgi.escape(p3,1)) cell_3_right = create_searchwithin_selection_box('f3', f3) cell_3_moreright = """<input type="submit" name="search" value="SEARCH"><input type="submit" name="search" value="Browse">&nbsp;""" cell_3_farright = """<small class="light"><a href="%s/search.py?p=%s&amp;f=%s&amp;cc=%s">Simple&nbsp;Search</a></small> <br><small><a href="%s/help/search/tips.html">Search&nbsp;Tips</a></small>""" % \ (weburl, urllib.quote(p1), urllib.quote(f1), urllib.quote(cc), weburl) # print them: out += """ <tr> <td valign="top" nowrap> <table> <tr valign="bottom"> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> <tr valign="bottom"> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> <tr valign="bottom"> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> </table> </td> </tr>""" % \ (cell_1_left, cell_1_right, cell_1_moreright, cell_1_farright, \ cell_2_left, cell_2_right, cell_2_moreright, cell_2_farright, \ cell_3_left, cell_3_right, cell_3_moreright, cell_3_farright) else: # print Simple Search form: cell_1_left = """<small><strong>Search for:</strong></small> <br><input type="text" name="p" size="%d" value="%s">""" % \ (cfg_simplesearch_pattern_box_width, cgi.escape(p, 1)) cell_1_middle = "<small><strong>within:</strong></small><br>%s" % create_searchwithin_selection_box('f', f) cell_1_right = """<input type="submit" name="search" value="SEARCH"><input type="submit" name="search" value="Browse">&nbsp;""" cell_1_farright = """<small class="light"><a href="%s/search.py?p1=%s&amp;f1=%s&amp;as=1&amp;cc=%s">Advanced&nbsp;Search</a></small> <br><small><a href="%s/help/search/tips.html">Search&nbsp;Tips</a></small>""" %\ (weburl, urllib.quote(p), urllib.quote(f), urllib.quote(cc), weburl) out += """ <tr> <td valign="top" nowrap> <table> <tr valign="bottom"> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> </table> </td> </tr> """ % (cell_1_left, cell_1_middle, cell_1_right, cell_1_farright) # secondly, print Collection(s) box: out += """ <tr> <td valign="top"> <small><strong>Search collections:</strong></small><br>""" colls_nicely_ordered = get_nicely_ordered_collection_list() if colls and colls[0] != cdsname: # some collections are defined, so print these first, and only then print 'add another collection' heading: for c in colls: if c: out += """<select name="c"><option value="">*** remove this collection ***""" for (cx, cx_printable) in colls_nicely_ordered: # print collection: if not cx.startswith("Unnamed collection"): out+= """<option value="%s"%s>%s""" % (cx, is_selected(c, re.sub("^[\s\-]*","",cx)), cx_printable) out += """</select>""" out += """<select name="c"><option value="">*** add another collection ***""" else: # we searched in CDSNAME, so print 'any collection' heading out += """<select name="c"><option value="">*** any collection ***""" for (cx, cx_printable) in colls_nicely_ordered: if not cx.startswith("Unnamed collection"): out += """<option value="%s">%s""" % (cx, cx_printable) out += """ </select> </td> </tr>""" # thirdly, print from/until date boxen, if applicable: if d1y=="" and d1m=="" and d1d=="" and d2y=="" and d2m=="" and d2d=="": pass # do not need it else: cell_6_a = create_inputdate_box("Added since", "d1", d1y, d1m, d1d) cell_6_b = create_inputdate_box("until", "d2", d2y, d2m, d2d) out += """<table cellpadding="3" cellspacing="0"> <tr> <td colspan="3" height="3"> </td> </tr> <tr valign="bottom"> <td>%s</td> <td>%s</td> </tr> </table>""" % \ (cell_6_a, cell_6_b) # fourthly, print Display/Sort box: cell_1_left = """<small><strong>Sort by:</strong></small><br> <select name="sf"> <option value="">- latest first -""" query = """SELECT DISTINCT(f.code),f.name FROM field AS f, collection_field_fieldvalue AS cff WHERE cff.type='soo' AND cff.id_field=f.id ORDER BY cff.score DESC, f.name ASC""" res = run_sql(query) for code, name in res: # propose found sort options: cell_1_left += """<option value="%s"%s>%s""" % (code, is_selected(sf,code), name) cell_1_left += """</select>""" cell_1_left += """<select name="so"> <option value="a"%s>asc. <option value="d"%s>desc. </select>""" % (is_selected(so,"a"),is_selected(so,"d")) cell_1_right = """<small><strong>Output format:</strong></small><br> <select name="of">""" query = """SELECT code,name FROM format ORDER BY name ASC""" res = run_sql(query) if res: # propose found formats: for code, name in res: cell_1_right += """<option value="%s"%s>%s""" % (code, is_selected(of,code), name) else: # no formats are found, so propose the default HTML one: cell_1_right += """<option value="hb"%s>HTML brief""" % (is_selected(of,"hb")) # is format made of numbers only? if yes, then propose it too: if of and str(of[0:3]).isdigit(): cell_1_right += """<option value="%s" selected>%s MARC tag""" % (of, of) cell_1_right += """</select>""" ## okay, formats ended cell_1_middle = """<small><strong>Display results:</strong></small><br> <select name="rg"> <option value="10"%s>10 results <option value="25"%s>25 results <option value="50"%s>50 results <option value="100"%s>100 results <option value="250"%s>250 results <option value="500"%s>500 results </select> <select name="sc"> <option value="0"%s>grouped together <option value="1"%s>split by collection </select> """ % (is_selected(rg,"10"), is_selected(rg,"25"), is_selected(rg,"50"), \ is_selected(rg,"100"), is_selected(rg,"250"), is_selected(rg,"500"),\ is_selected(sc,"0"), is_selected(sc,"1")) out += """ <tr> <td valign="top"> <table><tr valign="top"><td>%s</td><td>%s</td><td>%s</td></tr></table> </td> </tr>""" % (cell_1_left, cell_1_middle, cell_1_right) # print end of search box: out += """</table></form> """ return out
03e310531e299959e23e689e2221361a7aa1e6d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/03e310531e299959e23e689e2221361a7aa1e6d6/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3072, 67, 2147, 12, 952, 16, 645, 3251, 16, 293, 16, 284, 16, 14524, 16, 9033, 16, 1427, 16, 1694, 16, 434, 16, 15835, 16, 487, 16, 293, 21, 16, 284, 21, 16, 312, 21, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3072, 67, 2147, 12, 952, 16, 645, 3251, 16, 293, 16, 284, 16, 14524, 16, 9033, 16, 1427, 16, 1694, 16, 434, 16, 15835, 16, 487, 16, 293, 21, 16, 284, 21, 16, 312, 21, 16...
if c.logic == 2 or c.logic == 1:
if c.logic == 1 or c.logic == 2 :
def partselect(self, assy): """Loop thru all the atoms that are visible and select any that are 'in' the shape, ignoring the thickness parameter. pick the parts that contain them """ #---This function has been modified by Huaicai on 10/05/04 to fix bugs of shift & Ctrl drag #---selection of molecules #---Some very tricky bugs related to unpick, which will remove items from the looplist, so the #---next element in the looplist will not go into the loop c=self.curves[0] if c.logic == 2 or c.logic == 1: # drag selection for mol in assy.molecules: if mol.display == diINVISIBLE: continue for a in mol.atoms.itervalues(): if a.display == diINVISIBLE: continue if c.isin(a.posn()): a.molecule.pick() break if c.logic == 1: #ctrl drag selection, modified by Huaicai to fix the selection bug 10/05/04 for m in assy.selmols[:]: for a in m.atoms.values(): if not c.isin(a.posn()): m.unpick() break if c.logic == 0: # Shift drag slection --everything selected inside dragging area unselected for m in assy.selmols[:]: for a in m.atoms.values(): if c.isin(a.posn()): m.unpick() break
001551c928e1fea23a13f7c5f125da5c59f62390 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/001551c928e1fea23a13f7c5f125da5c59f62390/shape.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1087, 4025, 12, 2890, 16, 1551, 93, 4672, 3536, 6452, 286, 8653, 777, 326, 9006, 716, 854, 6021, 471, 2027, 1281, 716, 854, 296, 267, 11, 326, 2179, 16, 14398, 326, 27199, 1569, 18, 60...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1087, 4025, 12, 2890, 16, 1551, 93, 4672, 3536, 6452, 286, 8653, 777, 326, 9006, 716, 854, 6021, 471, 2027, 1281, 716, 854, 296, 267, 11, 326, 2179, 16, 14398, 326, 27199, 1569, 18, 60...
except ValueError:pass
except Exception:pass
def _decode_string(clazz, str): """ >>> decoder._decode_string(None) >>> decoder._decode_string('True') True >>> decoder._decode_string('False') False >>> decoder._decode_string('11') 11 >>> decoder._decode_string('12L') 12L >>> decoder._decode_string('11.') 11.0 >>> decoder._decode_string('some') u'some' >>> decoder._decode_string('"some"') u'"some"' >>> decoder._decode_string('"some') u'"some' """ if str is None: return None elif str == TRUE_LABEL: return True elif str == FALSE_LABEL: return False try: return int(str) except ValueError:pass try: return long(str) except ValueError:pass try: return float(str) except ValueError:pass str = unicode(str) if str[0] == '"' and str[-1] == '"': original = (str.replace('\\"', '"'))[1:-1] if encoder._escape_string(original) == str: return original return unicode(str)
aa701f9cc79648fdd166a7c1748b9a9fdf829398 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10801/aa701f9cc79648fdd166a7c1748b9a9fdf829398/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3922, 67, 1080, 12, 830, 3638, 16, 609, 4672, 3536, 4080, 8320, 6315, 3922, 67, 1080, 12, 7036, 13, 4080, 8320, 6315, 3922, 67, 1080, 2668, 5510, 6134, 1053, 4080, 8320, 6315, 3922,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3922, 67, 1080, 12, 830, 3638, 16, 609, 4672, 3536, 4080, 8320, 6315, 3922, 67, 1080, 12, 7036, 13, 4080, 8320, 6315, 3922, 67, 1080, 2668, 5510, 6134, 1053, 4080, 8320, 6315, 3922,...
def readReporter(self, line): self.addReporter(' '.join(line.split(' ')[:-1]))
if state == 'new': if cline.startswith("ReportedBy:"): self.addReporter(' '.join(cline.split(' ')[1:])) else: if cline.endswith("changed:"): self.addReporter(' '.join(cline.split(' ')[:-1]))
def readReporter(self, line): self.addReporter(' '.join(line.split(' ')[:-1]))
2cbfec2de3e39dd58134752802ab28616e2eb7f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/2cbfec2de3e39dd58134752802ab28616e2eb7f9/filter_gnomebugzilla.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 13289, 12, 2890, 16, 980, 4672, 365, 18, 1289, 13289, 2668, 2418, 5701, 12, 1369, 18, 4939, 2668, 8624, 10531, 17, 21, 22643, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 13289, 12, 2890, 16, 980, 4672, 365, 18, 1289, 13289, 2668, 2418, 5701, 12, 1369, 18, 4939, 2668, 8624, 10531, 17, 21, 22643, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.warning(0, "Examples with missing values were removed. Keeping %d of %d examples." % (len(data), len(self.originalData)))
self.warning(0, "Examples with missing values were removed. Keeping %d of %d examples." % (len(self.originalData), len(data))) if len(self.originalData) == 0: self.error(0, "All examples from the data set were removed!") return
def setData(self, data): self.warning([0,1])
e9b49da94273dcd5d7b8924c90f84ae707fb89d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/e9b49da94273dcd5d7b8924c90f84ae707fb89d4/OWInteractionGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 501, 4672, 365, 18, 8551, 3816, 20, 16, 21, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 501, 4672, 365, 18, 8551, 3816, 20, 16, 21, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
runner.setP3DFilename(*runner.parseSysArgs())
argv = runner.parseSysArgs() runner.setP3DFilename(argv[0], argv = argv)
def parseSysArgs(self): """ Converts sys.argv into (p3dFilename, tokens). """ import getopt opts, args = getopt.getopt(sys.argv[1:], 'h')
2dd92da38010783ab9ffdf8def1f761e1fbdb3f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/2dd92da38010783ab9ffdf8def1f761e1fbdb3f7/runp3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12712, 2615, 12, 2890, 4672, 3536, 20377, 2589, 18, 19485, 1368, 261, 84, 23, 72, 5359, 16, 2430, 2934, 3536, 1930, 336, 3838, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12712, 2615, 12, 2890, 4672, 3536, 20377, 2589, 18, 19485, 1368, 261, 84, 23, 72, 5359, 16, 2430, 2934, 3536, 1930, 336, 3838, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9...
logger.warning('Unexpected job status "%s"',info['status'])
logger.warning('Unexpected job status "%s"',status)
def updateGangaJobStatus(job,status): '''map backend job status to Ganga job status'''
a5c0016ffed0716d9f01060d9377cecf99d74cad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/a5c0016ffed0716d9f01060d9377cecf99d74cad/LCG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 43, 539, 69, 23422, 12, 4688, 16, 2327, 4672, 9163, 1458, 4221, 1719, 1267, 358, 611, 539, 69, 1719, 1267, 26418, 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, 1089, 43, 539, 69, 23422, 12, 4688, 16, 2327, 4672, 9163, 1458, 4221, 1719, 1267, 358, 611, 539, 69, 1719, 1267, 26418, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Attempt to yield a priority job
Attempt to yield a priority job
def incomingJobStream(self, databaseCursor): """ aJobTuple has this form: (jobId, jobUuid, jobPriority) ... of which jobPriority is pure excess, and should someday go away Yields the next job according to this pattern: START Attempt to yield a priority job If no priority job, attempt to yield a normal job If no priority or normal job, sleep self.processorLoopTime seconds loop back to START """ priorityJobIter = self.newPriorityJobsIter(databaseCursor) normalJobIter = self.newNormalJobsIter(databaseCursor) seenUuids = set() while (True): aJobType = 'priority' self.quitCheck() self.checkin() aJobTuple = priorityJobIter.next() if not aJobTuple: aJobTuple = normalJobIter.next() aJobType = 'standard' if aJobTuple: if not aJobTuple[1] in seenUuids: seenUuids.add(aJobTuple[1]) logger.debug("%s - incomingJobStream yielding %s job %s",threading.currentThread().getName(), aJobType, aJobTuple) yield aJobTuple else: logger.debug("Skipping already seen job %s",aJobTuple) else: logger.info("%s - no jobs to do - sleeping %d seconds", threading.currentThread().getName(), self.processorLoopTime) seenUuids = set() self.responsiveSleep(self.processorLoopTime)
764a50f48c86f020342dff6607d7010691af6e8e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12383/764a50f48c86f020342dff6607d7010691af6e8e/processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6935, 2278, 1228, 12, 2890, 16, 2063, 6688, 4672, 3536, 279, 2278, 9038, 711, 333, 646, 30, 261, 4688, 548, 16, 1719, 5897, 16, 1719, 8183, 13, 1372, 434, 1492, 1719, 8183, 353, 16618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6935, 2278, 1228, 12, 2890, 16, 2063, 6688, 4672, 3536, 279, 2278, 9038, 711, 333, 646, 30, 261, 4688, 548, 16, 1719, 5897, 16, 1719, 8183, 13, 1372, 434, 1492, 1719, 8183, 353, 16618, ...
for lang in langs: ob._setLocalPropValue(property, lang, langs[lang])
[ ob._setLocalPropValue(property, lang, langs[lang]) for lang in langs if langs[lang]!='' ]
def importNySMAPExpert(self, param, id, attrs, content, properties, discussion, objects): #this method is called during the import process try: param = abs(int(param)) except: param = 0 if param == 3: #just try to delete the object try: self.manage_delObjects([id]) except: pass else: ob = self._getOb(id, None) if param in [0, 1] or (param==2 and ob is None): if param == 1: #delete the object if exists try: self.manage_delObjects([id]) except: pass addNySMAPExpert(self, id=id, surname=attrs['surname'].encode('utf-8'), name=attrs['name'].encode('utf-8'), ref_lang=attrs['ref_lang'].encode('utf-8'), country=attrs['country'].encode('utf-8'), maintopics=attrs['maintopics'].encode('utf-8'), subtopics=attrs['subtopics'].encode('utf-8'), email=attrs['email'].encode('utf-8'), sortorder=attrs['sortorder'].encode('utf-8'), source='file', file=self.utBase64Decode(attrs['file'].encode('utf-8')), downloadfilename=attrs['downloadfilename'].encode('utf-8'), contributor=self.utEmptyToNone(attrs['contributor'].encode('utf-8')), discussion=abs(int(attrs['discussion'].encode('utf-8')))) ob = self._getOb(id) #set the real content_type and precondition ob.content_type = attrs['content_type'].encode('utf-8') ob.precondition = attrs['precondition'].encode('utf-8') ob._p_changed = 1 for property, langs in properties.items(): for lang in langs: ob._setLocalPropValue(property, lang, langs[lang]) ob.approveThis(approved=abs(int(attrs['approved'].encode('utf-8'))), approved_by=self.utEmptyToNone(attrs['approved_by'].encode('utf-8'))) if attrs['releasedate'].encode('utf-8') != '': ob.setReleaseDate(attrs['releasedate'].encode('utf-8')) ob.import_comments(discussion) self.recatalogNyObject(ob)
b8debc3e07e86b7d57d2f66a8f9684525b283b68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/b8debc3e07e86b7d57d2f66a8f9684525b283b68/NySMAPExpert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 50, 93, 7303, 2203, 424, 672, 12, 2890, 16, 579, 16, 612, 16, 3422, 16, 913, 16, 1790, 16, 14716, 16, 2184, 4672, 468, 2211, 707, 353, 2566, 4982, 326, 1930, 1207, 775, 30, 579...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 50, 93, 7303, 2203, 424, 672, 12, 2890, 16, 579, 16, 612, 16, 3422, 16, 913, 16, 1790, 16, 14716, 16, 2184, 4672, 468, 2211, 707, 353, 2566, 4982, 326, 1930, 1207, 775, 30, 579...
funcs = filter(callable,files) files = filter(lambda f:not callable(f), files)
funcs = filter(lambda f:hasattr(f, '__call__'), files) files = filter(lambda f:not hasattr(f, '__call__'), files)
def build_data_files_sources(self): if not self.data_files: return log.info('building data_files sources') from numpy.distutils.misc_util import get_data_files new_data_files = [] for data in self.data_files: if isinstance(data,str): new_data_files.append(data) elif isinstance(data,tuple): d,files = data if self.inplace: build_dir = self.get_package_dir('.'.join(d.split(os.sep))) else: build_dir = os.path.join(self.build_src,d) funcs = filter(callable,files) files = filter(lambda f:not callable(f), files) for f in funcs: if f.func_code.co_argcount==1: s = f(build_dir) else: s = f() if s is not None: if isinstance(s,list): files.extend(s) elif isinstance(s,str): files.append(s) else: raise TypeError(repr(s)) filenames = get_data_files((d,files)) new_data_files.append((d, filenames)) else: raise TypeError(repr(data)) self.data_files[:] = new_data_files
652cc7c0d2323ff42b9e96bbc50a1e300bcc2c25 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/652cc7c0d2323ff42b9e96bbc50a1e300bcc2c25/build_src.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 892, 67, 2354, 67, 10141, 12, 2890, 4672, 309, 486, 365, 18, 892, 67, 2354, 30, 327, 613, 18, 1376, 2668, 3510, 310, 501, 67, 2354, 5550, 6134, 628, 3972, 18, 4413, 5471, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 892, 67, 2354, 67, 10141, 12, 2890, 4672, 309, 486, 365, 18, 892, 67, 2354, 30, 327, 613, 18, 1376, 2668, 3510, 310, 501, 67, 2354, 5550, 6134, 628, 3972, 18, 4413, 5471, 1...
comfychair.runtests([TempCompile_Case])
case = TempCompile_Case() case.setup() try: case.runtest() finally: case.teardown()
def runtest(self): self.compile() glob_result = glob.glob(dep_glob) dotd_result.extend(glob_result)
f491fa9c9f91ce623a5dd849b0121f3323b83f71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7392/f491fa9c9f91ce623a5dd849b0121f3323b83f71/testdistcc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3813, 12, 2890, 4672, 365, 18, 11100, 1435, 4715, 67, 2088, 273, 4715, 18, 10581, 12, 15037, 67, 10581, 13, 3928, 72, 67, 2088, 18, 14313, 12, 10581, 67, 2088, 13, 225, 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, 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, 1086, 3813, 12, 2890, 4672, 365, 18, 11100, 1435, 4715, 67, 2088, 273, 4715, 18, 10581, 12, 15037, 67, 10581, 13, 3928, 72, 67, 2088, 18, 14313, 12, 10581, 67, 2088, 13, 225, 2, -100, ...
if arrows==1 or arrows==3: drawer.drawpolycone(colors[1], [points[1], points[1], 2.0*points[1]-points[2], 2.0*points[1]-points[2]], [radii[1]*2.0, radii[1]*2.0, 0.0, 0.0]) if arrows==2 or arrows==3: drawer.drawpolycone(colors[n-2], [points[n-2], points[n-2], 2.0*points[n-2]-points[n-3], 2.0*points[n-2]-points[n-3]], [radii[1]*2.0, radii[1]*2.0, 0.0, 0.0])
def drawStrand(points, colors, radii, color_style, shape, arrows): """ Renders a strand shape along points array using colors and radii arrays, optionally with arrows. """ n = len(points) if n>3: # copy colors and radii colors[0] = colors[1] colors[n-1] = colors[n-2] radii[0] = radii[1] radii[n-1] = radii[n-2] # draw the terminal spheres drawer.drawsphere(colors[1],points[1],radii[1],2) drawer.drawsphere(colors[n-2],points[n-2],radii[1],2) if shape==1: # draw cylinders gleSetJoinStyle(TUBE_JN_ROUND | TUBE_NORM_PATH_EDGE | TUBE_JN_CAP | TUBE_CONTOUR_CLOSED) #drawer.drawpolycone(colors[1], # points, # radii) if color_style==1: drawer.drawpolycone_multicolor(colors[1], points, colors, radii) else: drawer.drawpolycone(colors[1], points, radii) elif shape==2: # draw spline tube gleSetJoinStyle(TUBE_JN_ANGLE | TUBE_NORM_PATH_EDGE | TUBE_JN_CAP | TUBE_CONTOUR_CLOSED) new_points = zeros([4*(n-2)-1,3],Float) new_colors = zeros([4*(n-2)-1,3],Float) new_radii = zeros([4*(n-2)-1],Float) o = 1 for p in range (1,n-2): for m in range (0,4): t = float(m)/4.0 new_points[o] = self.spline(points, p, t) new_colors[o] = self.spline(colors, p, t) new_radii[o] = self.spline(radii, p, t) o += 1 new_points[o] = self.spline(points, p, 1.0) new_colors[o] = self.spline(colors, p, 1.0) new_radii[o] = self.spline(radii, p, 1.0) o += 1 new_points[0] = 3.0*new_points[1]-3.0*new_points[2]+new_points[3] new_points[o] = 3.0*new_points[o-1]-3.0*new_points[o-2]+new_points[o-3] # draw the tube if color_style==1: drawer.drawpolycone_multicolor( colors[1], new_points, new_colors, new_radii) else: drawer.drawpolycone( colors[1], new_points, new_radii) # draw the arrows if arrows==1 or arrows==3: # 5' drawer.drawpolycone(colors[1], [points[1], points[1], 2.0*points[1]-points[2], 2.0*points[1]-points[2]], [radii[1]*2.0, radii[1]*2.0, 0.0, 0.0]) if arrows==2 or arrows==3: # 3' drawer.drawpolycone(colors[n-2], [points[n-2], points[n-2], 2.0*points[n-2]-points[n-3], 2.0*points[n-2]-points[n-3]], [radii[1]*2.0, radii[1]*2.0, 0.0, 0.0])
1ea3d0895e8c6154e79ed08bf2c7d573e1a134cd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/1ea3d0895e8c6154e79ed08bf2c7d573e1a134cd/DnaCylinderChunks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1585, 464, 12, 4139, 16, 5740, 16, 28125, 16, 2036, 67, 4060, 16, 2179, 16, 419, 3870, 4672, 3536, 534, 10130, 279, 16706, 2179, 7563, 3143, 526, 1450, 5740, 471, 28125, 5352, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1585, 464, 12, 4139, 16, 5740, 16, 28125, 16, 2036, 67, 4060, 16, 2179, 16, 419, 3870, 4672, 3536, 534, 10130, 279, 16706, 2179, 7563, 3143, 526, 1450, 5740, 471, 28125, 5352, 16, ...
self.curl_obj.setopt(pycurl.CONNECTTIMEOUT, 30)
def _set_opts(self, opts={}): # XXX if not opts: opts = self.opts
81d5f0fe31eb840f5e9b49afbb319d80ab03d107 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7001/81d5f0fe31eb840f5e9b49afbb319d80ab03d107/grabber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 4952, 12, 2890, 16, 1500, 12938, 4672, 468, 11329, 309, 486, 1500, 30, 1500, 273, 365, 18, 4952, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 4952, 12, 2890, 16, 1500, 12938, 4672, 468, 11329, 309, 486, 1500, 30, 1500, 273, 365, 18, 4952, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
output.append(' %d files changed, %d insertions(+), %d deletions(-)\n'
output.append(_(' %d files changed, %d insertions(+), %d deletions(-)\n')
def scale(i): if maxtotal <= graphwidth: return i # If diffstat runs out of room it doesn't print anything, # which isn't very useful, so always print at least one + or - # if there were at least some changes. return max(i * graphwidth // maxtotal, int(bool(i)))
ef598ae4f0b210e47616d6b6143de8cbc8aff806 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/ef598ae4f0b210e47616d6b6143de8cbc8aff806/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3159, 12, 77, 4672, 309, 943, 4963, 1648, 2667, 2819, 30, 327, 277, 468, 971, 3122, 5642, 7597, 596, 434, 7725, 518, 3302, 1404, 1172, 6967, 16, 468, 1492, 5177, 1404, 8572, 5301, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3159, 12, 77, 4672, 309, 943, 4963, 1648, 2667, 2819, 30, 327, 277, 468, 971, 3122, 5642, 7597, 596, 434, 7725, 518, 3302, 1404, 1172, 6967, 16, 468, 1492, 5177, 1404, 8572, 5301, 16, ...
platform.python_implementation(),
getattr(platform, 'python_implementation', 'Python'),
def main(self):
019e9d730a0f4fa1ae5f4c68950680e5a6866169 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/019e9d730a0f4fa1ae5f4c68950680e5a6866169/pybench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 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, 0, 0, 0, 0,...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 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, -100, -100, -...
ProfilesController.configuration.users.base_path,
def ExportCLI(self): """ Export the user profiles list to human readable form. """ data = ""
05b33e0a707a748843b535af7ccbcba280a9447c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/05b33e0a707a748843b535af7ccbcba280a9447c/profiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11054, 7697, 12, 2890, 4672, 3536, 11054, 326, 729, 11788, 666, 358, 8672, 7471, 646, 18, 3536, 501, 273, 1408, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 11054, 7697, 12, 2890, 4672, 3536, 11054, 326, 729, 11788, 666, 358, 8672, 7471, 646, 18, 3536, 501, 273, 1408, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
result = result + " " + str(m.title) + str(sub_title) + " at " + \
result = result + "- " + str(m.title) + str(sub_title) + " at " + \
def comingup(items=None): import tv.record_client as ri import time result = '' cachefile = '%s/upsoon' % (config.FREEVO_CACHEDIR) if (os.path.exists(cachefile) and \ (abs(time.time() - os.path.getmtime(cachefile)) < 3600)): cache = open(cachefile,'r') for a in cache.readlines(): result = result + a cache.close() return result (status, recordings) = ri.getScheduledRecordings() if not status: result = _('The recordserver is down') return result progs = recordings.getProgramList() f = lambda a, b: cmp(a.start, b.start) progl = progs.values() progl.sort(f) today = [] tomorrow = [] later = [] for what in progl: if time.localtime(what.start)[2] == time.localtime()[2]: today.append(what) if time.localtime(what.start)[2] == (time.localtime()[2] + 1): tomorrow.append(what) if time.localtime(what.start)[2] > (time.localtime()[2] + 1): later.append(what) if len(today) > 0: result = result + 'Today:\n' for m in today: sub_title = '' if m.sub_title: sub_title = ' "' + m.sub_title + '" ' result = result + " " + str(m.title) + str(sub_title) + " at " + \ str(time.strftime('%I:%M%p',time.localtime(m.start))) + '\n' if len(tomorrow) > 0: result = result + 'Tomorrow:\n' for m in tomorrow: sub_title = '' if m.sub_title: sub_title = ' "' + m.sub_title + '" ' result = result + " " + str(m.title) + str(sub_title) + " at " + \ str(time.strftime('%I:%M%p',time.localtime(m.start))) + '\n' if len(later) > 0: for m in later: sub_title = '' if m.sub_title: sub_title = ' "' + m.sub_title + '" ' result = result + " " + str(m.title) + str(sub_title) + " at " + \ str(time.strftime('%I:%M%p',time.localtime(m.start))) + '\n' if not result: result = _('No recordings are scheduled') cache = open(cachefile,'w') cache.write(result) cache.close() return result
4c499a8790441aeae37f7795b8e6c08a8b23e39f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/4c499a8790441aeae37f7795b8e6c08a8b23e39f/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19283, 416, 12, 3319, 33, 7036, 4672, 1930, 13521, 18, 3366, 67, 2625, 487, 12347, 1930, 813, 225, 563, 273, 875, 225, 1247, 768, 273, 1995, 87, 19, 416, 2048, 265, 11, 738, 261, 1425,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19283, 416, 12, 3319, 33, 7036, 4672, 1930, 13521, 18, 3366, 67, 2625, 487, 12347, 1930, 813, 225, 563, 273, 875, 225, 1247, 768, 273, 1995, 87, 19, 416, 2048, 265, 11, 738, 261, 1425,...
def GetNumInvalidValues(self):
def GetNumInvalidValues(self, func):
def GetNumInvalidValues(self): """overridden from Argument.""" return 1
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2578, 1941, 1972, 12, 2890, 16, 1326, 4672, 3536, 83, 1107, 2794, 628, 5067, 12123, 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,...
[ 1, 1, 1, 1, 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, 968, 2578, 1941, 1972, 12, 2890, 16, 1326, 4672, 3536, 83, 1107, 2794, 628, 5067, 12123, 327, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
logger.notifyChannel("web-service", netsvc.LOG_ERROR,
logger.notifyChannel("web-services", netsvc.LOG_ERROR,
def dump(self, password, db_name): security.check_super(password) logger = netsvc.Logger()
a189e710acd510298fc51dbc769c8f915a928fa3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/a189e710acd510298fc51dbc769c8f915a928fa3/web_services.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 2201, 16, 1319, 67, 529, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 2201, 16, 1319, 67, 529, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
new_minor = iv_names[dev.iv_name][2]
def _ExecD8Secondary(self, feedback_fn): """Replace the secondary node for drbd8.
468b46f9258cc0753a66d6f643c8f930efdb23a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/468b46f9258cc0753a66d6f643c8f930efdb23a3/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 28, 14893, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 326, 9946, 756, 364, 5081, 16410, 28, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 28, 14893, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 326, 9946, 756, 364, 5081, 16410, 28, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
fh = file(fname, 'U')
fh = open(fname, 'U')
def loadtxt(fname, dtype=float, comments='#', delimiter=None, converters=None, skiprows=0, usecols=None, unpack=False): """ Load data from a text file. Each row in the text file must have the same number of values. Parameters ---------- fname : file or str File or filename to read. If the filename extension is ``.gz`` or ``.bz2``, the file is first decompressed. dtype : dtype, optional Data type of the resulting array. If this is a record data-type, the resulting array will be 1-dimensional, and each row will be interpreted as an element of the array. In this case, the number of columns used must match the number of fields in the data-type. comments : str, optional The character used to indicate the start of a comment. delimiter : str, optional The string used to separate values. By default, this is any whitespace. converters : dict, optional A dictionary mapping column number to a function that will convert that column to a float. E.g., if column 0 is a date string: ``converters = {0: datestr2num}``. Converters can also be used to provide a default value for missing data: ``converters = {3: lambda s: float(s or 0)}``. skiprows : int, optional Skip the first `skiprows` lines. usecols : sequence, optional Which columns to read, with 0 being the first. For example, ``usecols = (1,4,5)`` will extract the 2nd, 5th and 6th columns. unpack : bool, optional If True, the returned array is transposed, so that arguments may be unpacked using ``x, y, z = loadtxt(...)``. Default is False. Returns ------- out : ndarray Data read from the text file. See Also -------- load, fromstring, fromregex genfromtxt : Load data with missing values handled as specified. scipy.io.loadmat : reads Matlab(R) data files Notes ----- This function aims to be a fast reader for simply formatted files. The `genfromtxt` function provides more sophisticated handling of, e.g., lines with missing values. Examples -------- >>> from StringIO import StringIO # StringIO behaves like a file object >>> c = StringIO("0 1\\n2 3") >>> np.loadtxt(c) array([[ 0., 1.], [ 2., 3.]]) >>> d = StringIO("M 21 72\\nF 35 58") >>> np.loadtxt(d, dtype={'names': ('gender', 'age', 'weight'), ... 'formats': ('S1', 'i4', 'f4')}) array([('M', 21, 72.0), ('F', 35, 58.0)], dtype=[('gender', '|S1'), ('age', '<i4'), ('weight', '<f4')]) >>> c = StringIO("1,0,2\\n3,0,4") >>> x, y = np.loadtxt(c, delimiter=',', usecols=(0, 2), unpack=True) >>> x array([ 1., 3.]) >>> y array([ 2., 4.]) """ # Type conversions for Py3 convenience comments = asbytes(comments) if delimiter is not None: delimiter = asbytes(delimiter) user_converters = converters if usecols is not None: usecols = list(usecols) isstring = False if _is_string_like(fname): isstring = True if fname.endswith('.gz'): import gzip fh = seek_gzip_factory(fname) elif fname.endswith('.bz2'): import bz2 fh = bz2.BZ2File(fname) else: fh = file(fname, 'U') elif hasattr(fname, 'readline'): fh = fname else: raise ValueError('fname must be a string or file handle') X = [] def flatten_dtype(dt): """Unpack a structured data-type.""" if dt.names is None: # If the dtype is flattened, return. # If the dtype has a shape, the dtype occurs # in the list more than once. return [dt.base] * int(np.prod(dt.shape)) else: types = [] for field in dt.names: tp, bytes = dt.fields[field] flat_dt = flatten_dtype(tp) types.extend(flat_dt) return types def split_line(line): """Chop off comments, strip, and split at delimiter.""" line = line.split(comments)[0].strip() if line: return line.split(delimiter) else: return [] try: # Make sure we're dealing with a proper dtype dtype = np.dtype(dtype) defconv = _getconv(dtype) # Skip the first `skiprows` lines for i in xrange(skiprows): fh.readline() # Read until we find a line with some values, and use # it to estimate the number of columns, N. first_vals = None while not first_vals: first_line = fh.readline() if not first_line: # EOF reached raise IOError('End-of-file reached before encountering data.') first_vals = split_line(first_line) N = len(usecols or first_vals) dtype_types = flatten_dtype(dtype) if len(dtype_types) > 1: # We're dealing with a structured array, each field of # the dtype matches a column converters = [_getconv(dt) for dt in dtype_types] else: # All fields have the same dtype converters = [defconv for i in xrange(N)] # By preference, use the converters specified by the user for i, conv in (user_converters or {}).iteritems(): if usecols: try: i = usecols.index(i) except ValueError: # Unused converter specified continue converters[i] = conv # Parse each line, including the first for i, line in enumerate(itertools.chain([first_line], fh)): vals = split_line(line) if len(vals) == 0: continue if usecols: vals = [vals[i] for i in usecols] # Convert each value according to its column and store X.append(tuple([conv(val) for (conv, val) in zip(converters, vals)])) finally: if isstring: fh.close() if len(dtype_types) > 1: # We're dealing with a structured array, with a dtype such as # [('x', int), ('y', [('s', int), ('t', float)])] # # First, create the array using a flattened dtype: # [('x', int), ('s', int), ('t', float)] # # Then, view the array using the specified dtype. try: X = np.array(X, dtype=np.dtype([('', t) for t in dtype_types])) X = X.view(dtype) except TypeError: # In the case we have an object dtype X = np.array(X, dtype=dtype) else: X = np.array(X, dtype) X = np.squeeze(X) if unpack: return X.T else: return X
e670f5f69143dac918c6d36649180e2ea1f597a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/e670f5f69143dac918c6d36649180e2ea1f597a4/npyio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 5830, 12, 12749, 16, 3182, 33, 5659, 16, 5678, 2218, 7, 2187, 5654, 33, 7036, 16, 19414, 33, 7036, 16, 2488, 3870, 33, 20, 16, 999, 6842, 33, 7036, 16, 6167, 33, 8381, 4672, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 5830, 12, 12749, 16, 3182, 33, 5659, 16, 5678, 2218, 7, 2187, 5654, 33, 7036, 16, 19414, 33, 7036, 16, 2488, 3870, 33, 20, 16, 999, 6842, 33, 7036, 16, 6167, 33, 8381, 4672, 35...
numberOfBasePairsToSubtract)
numberOfBasePairsToRemove)
def modify(self, group, ladderEndAxisAtom, numberOfBasePairs, basesPerTurn, duplexRise, endPoint1, endPoint2 ): """ AVAILABLE AS A DEBUG PREFERENCE ONLY AS OF 2008-03-24. NEED CLEANUP , LOTS OF DOCUMENTATION AND RENAMING. """ self.assy = group.assy assy = group.assy #Make sure to clear self.baseList each time self.modify() is called self.baseList = []
6cd8c5aa68aea88b011fabfb012851fc655ef49c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/6cd8c5aa68aea88b011fabfb012851fc655ef49c/DnaDuplex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5612, 12, 2890, 16, 1041, 16, 328, 361, 765, 1638, 6558, 3641, 16, 7922, 2171, 10409, 16, 8337, 2173, 15858, 16, 302, 2268, 92, 54, 784, 16, 19849, 21, 16, 19849, 22, 262, 30, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5612, 12, 2890, 16, 1041, 16, 328, 361, 765, 1638, 6558, 3641, 16, 7922, 2171, 10409, 16, 8337, 2173, 15858, 16, 302, 2268, 92, 54, 784, 16, 19849, 21, 16, 19849, 22, 262, 30, 3536, ...
return " + ".join(str(m) for m in self.monomials) + " index_slots = " + str(self.index_slots)
return " + ".join(str(m) for m in self.monomials)
def __str__(self): return " + ".join(str(m) for m in self.monomials) + " index_slots = " + str(self.index_slots)
77f5b57aca0f4f80bf6d0d5a9436b738045bd57c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/624/77f5b57aca0f4f80bf6d0d5a9436b738045bd57c/monomials.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 315, 397, 3552, 5701, 12, 701, 12, 81, 13, 364, 312, 316, 365, 18, 2586, 11496, 87, 13, 397, 315, 770, 67, 18875, 273, 315, 397, 609, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 315, 397, 3552, 5701, 12, 701, 12, 81, 13, 364, 312, 316, 365, 18, 2586, 11496, 87, 13, 397, 315, 770, 67, 18875, 273, 315, 397, 609, 12, 2890, ...
if( self._state == 'chugging_along' ): if( dict.has_key( 'class' ) ): if( dict[ 'class' ] == 'tag' ):
if self._state == 'chugging_along': if dict.has_key( 'class' ): if dict[ 'class' ] == 'tag':
def start_td( self, attrs ): dict = pairlist_to_dict( attrs ) if( self._state == 'chugging_along' ): if( dict.has_key( 'class' ) ): if( dict[ 'class' ] == 'tag' ): self._state = 'waiting_tag' self._flush_text() elif( dict[ 'class' ] == 'inf' ): self._state = 'waiting_inf' self._flush_text()
057a42016586e300ec42f7a5a6468a5d7f6c179c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/057a42016586e300ec42f7a5a6468a5d7f6c179c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 4465, 12, 365, 16, 3422, 262, 30, 2065, 273, 3082, 1098, 67, 869, 67, 1576, 12, 3422, 262, 309, 365, 6315, 2019, 422, 296, 343, 637, 1998, 67, 287, 932, 4278, 309, 2065, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 4465, 12, 365, 16, 3422, 262, 30, 2065, 273, 3082, 1098, 67, 869, 67, 1576, 12, 3422, 262, 309, 365, 6315, 2019, 422, 296, 343, 637, 1998, 67, 287, 932, 4278, 309, 2065, 18,...
augdata = [strip(x) for x in _e(attrs[-1]).split(': ')]
augdata = [x.strip() for x in _e(attrs[-1]).split(': ')]
def _quotens(str): return ':'.join([_e(quote(x)) for x in str.split(':')])
b175cbe5fa46ac2aba0b26589b0cf0e7b4d47685 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/b175cbe5fa46ac2aba0b26589b0cf0e7b4d47685/savegraphdata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9270, 773, 12, 701, 4672, 327, 3921, 18, 5701, 3816, 67, 73, 12, 6889, 12, 92, 3719, 364, 619, 316, 609, 18, 4939, 2668, 2497, 13, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9270, 773, 12, 701, 4672, 327, 3921, 18, 5701, 3816, 67, 73, 12, 6889, 12, 92, 3719, 364, 619, 316, 609, 18, 4939, 2668, 2497, 13, 5717, 2, -100, -100, -100, -100, -100, -100, -...
child.setAttribute('id', name)
if name is not None: child.setAttribute('id', name) else: child.setAttribute('id', ofs_id)
def _extractUtilities(self): fragment = self._doc.createDocumentFragment()
c6b8e5670a62cccd95bda5dd675d2fe03cfe12a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3757/c6b8e5670a62cccd95bda5dd675d2fe03cfe12a9/components.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8004, 11864, 12, 2890, 4672, 5481, 273, 365, 6315, 2434, 18, 2640, 2519, 7456, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8004, 11864, 12, 2890, 4672, 5481, 273, 365, 6315, 2434, 18, 2640, 2519, 7456, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
error(t.lineno, "syntax error at '%s'" % t.value)
error(t.lexer.lineno, "syntax error at '%s'" % t.value)
def p_error(t): if t: error(t.lineno, "syntax error at '%s'" % t.value) else: error(0, "unknown syntax error", True)
afeef4c0622dd3b0d90a8446c97b6671679c1a82 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/afeef4c0622dd3b0d90a8446c97b6671679c1a82/isa_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 1636, 12, 88, 4672, 309, 268, 30, 555, 12, 88, 18, 31731, 18, 17782, 16, 315, 14308, 555, 622, 1995, 87, 4970, 738, 268, 18, 1132, 13, 469, 30, 555, 12, 20, 16, 315, 8172,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 1636, 12, 88, 4672, 309, 268, 30, 555, 12, 88, 18, 31731, 18, 17782, 16, 315, 14308, 555, 622, 1995, 87, 4970, 738, 268, 18, 1132, 13, 469, 30, 555, 12, 20, 16, 315, 8172,...
return Date(freq,tempDate.year) def prevbusday(day_end_hour=18,day_end_min=0):
return Date(freq, year=tempDate.year) def prevbusday(day_end_hour=18, day_end_min=0):
def thisday(freq): freq = corelib.fmtFreq(freq) tempDate = mx.DateTime.now() # if it is Saturday or Sunday currently, freq==B, then we want to use Friday if freq == 'B' and tempDate.day_of_week >= 5: tempDate -= (tempDate.day_of_week - 4) if freq == 'B' or freq == 'D' or freq == 'S': return Date(freq, date=tempDate) elif freq == 'M': return Date(freq,tempDate.year,tempDate.month) elif freq == 'Q': return Date(freq,tempDate.year,quarter=monthToQuarter(tempDate.month)) elif freq == 'A': return Date(freq,tempDate.year)
c207acc5c7f49d5bd86329331c20462583407dd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/c207acc5c7f49d5bd86329331c20462583407dd3/tsdate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 333, 2881, 12, 10212, 4672, 225, 7684, 273, 2922, 2941, 18, 8666, 14485, 12, 10212, 13, 225, 1906, 1626, 273, 7938, 18, 5096, 18, 3338, 1435, 225, 468, 309, 518, 353, 25793, 295, 2881, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 333, 2881, 12, 10212, 4672, 225, 7684, 273, 2922, 2941, 18, 8666, 14485, 12, 10212, 13, 225, 1906, 1626, 273, 7938, 18, 5096, 18, 3338, 1435, 225, 468, 309, 518, 353, 25793, 295, 2881, ...
curr = self.__get_field('top') self.__set_field('top.old', curr) self.__set_field('top', value)
curr = self._get_field('top') self._set_field('top.old', curr) self._set_field('top', value)
def set_top(self, value, backup = False): if backup: curr = self.__get_field('top') self.__set_field('top.old', curr) self.__set_field('top', value) self.__update_top_ref(value)
8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3669, 12, 2890, 16, 460, 16, 5114, 273, 1083, 4672, 309, 5114, 30, 4306, 273, 365, 6315, 588, 67, 1518, 2668, 3669, 6134, 365, 6315, 542, 67, 1518, 2668, 3669, 18, 1673, 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, 444, 67, 3669, 12, 2890, 16, 460, 16, 5114, 273, 1083, 4672, 309, 5114, 30, 4306, 273, 365, 6315, 588, 67, 1518, 2668, 3669, 6134, 365, 6315, 542, 67, 1518, 2668, 3669, 18, 1673, 2187,...
"""Constructor @param threshold: Minimum similarity (between 0 and 1) for a string to be considered a match. @param warp: Use warp greater than 1.0 (but less than 3.0) to increase the similarity assigned to short string pairs to imrpove recall. 0.0 < warp < 1. 0 is disallowed, because it reduces the similarity of short strings relative to long strings, which is not what you want (trust me). @param items: Iteration of items to index for N-gram search. @param N: Length of each n-gram, must be at least 2. @param pad_len: Length of string padding string, between 0 and N-1. None means to use the default of N-1. @param pad_char: Character to use for padding. The default is '$' for readability. If '$' occurs in the strings, try using the rare non-breaking space character, u'\0xa', instead. @param str_item: Function to convert items into strings, defaulting to lambda x:x. For example, lambda x: re.sub(r"[^a-z0-9]+", "", x) will index only alphanumeric characters for a string item and lambda x:string.lower(x[1]) case-insensitive indexes the second member of a tuple item. @param str_query: Function to convert query items into strings. Default of None indicates that str_item should be used. Set to lambda x:x for example if the items are tuples but you wish to query by string. """ assert 0 <= threshold <= 1 assert 1.0 <= warp <= 3.0 assert hasattr(str_item, "__call__") assert N >= 1
super(set, self).__init__() if not (0 <= threshold <= 1): raise ValueError("Threshold %s outside 0.0 to 1.0 range" % threshold) if not(1.0 <= warp <= 3.0): raise ValueError("Warp %s outside 1.0 to 3.0 range" % warp) if not N >= 1: raise ValueError("N of %s needs to be >= 1" % N)
def __init__(self, items=[], threshold=0.0, warp=1.0, str_item=lambda x:x, N=3, pad_len=None, pad_char='$', str_query=None): """Constructor @param threshold: Minimum similarity (between 0 and 1) for a string to be considered a match. @param warp: Use warp greater than 1.0 (but less than 3.0) to increase the similarity assigned to short string pairs to imrpove recall. 0.0 < warp < 1. 0 is disallowed, because it reduces the similarity of short strings relative to long strings, which is not what you want (trust me).
3494fa39678f2e5bc57cacb7df60645ab385db6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12095/3494fa39678f2e5bc57cacb7df60645ab385db6a/ngram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1516, 22850, 6487, 5573, 33, 20, 18, 20, 16, 341, 11441, 33, 21, 18, 20, 16, 609, 67, 1726, 33, 14661, 619, 30, 92, 16, 423, 33, 23, 16, 4627, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1516, 22850, 6487, 5573, 33, 20, 18, 20, 16, 341, 11441, 33, 21, 18, 20, 16, 609, 67, 1726, 33, 14661, 619, 30, 92, 16, 423, 33, 23, 16, 4627, 67, ...
@type nicparam: dict @param nicparam: the dict to fill
@type nicparams: dict @param nicparams: the dict to fill
def SimpleFillNIC(self, nicparams): """Fill a given nicparams dict with cluster defaults.
06596a60a613d8806c3ae260984f0bdba241d6de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/06596a60a613d8806c3ae260984f0bdba241d6de/objects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4477, 8026, 31883, 12, 2890, 16, 11562, 2010, 4672, 3536, 8026, 279, 864, 11562, 2010, 2065, 598, 2855, 3467, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4477, 8026, 31883, 12, 2890, 16, 11562, 2010, 4672, 3536, 8026, 279, 864, 11562, 2010, 2065, 598, 2855, 3467, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
excludes = getattr(field, "reservoir", []) if excludes and type(excludes) != list: excludes = [excludes]
def settingsToWidget(self, widget, context): ContextHandler.settingsToWidget(self, widget, context) excluded = {} for field in self.fields: name, flags = field.name, field.flags if not context.values.has_key(name): continue value = context.values[name] excludes = getattr(field, "reservoir", []) if excludes and type(excludes) != list: excludes = [excludes]
5782f02a6212390049929fec3fd22b858ce25d15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/5782f02a6212390049929fec3fd22b858ce25d15/OWBaseWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1947, 774, 4609, 12, 2890, 16, 3604, 16, 819, 4672, 1772, 1503, 18, 4272, 774, 4609, 12, 2890, 16, 3604, 16, 819, 13, 8845, 273, 2618, 364, 652, 316, 365, 18, 2821, 30, 508, 16, 2943...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1947, 774, 4609, 12, 2890, 16, 3604, 16, 819, 4672, 1772, 1503, 18, 4272, 774, 4609, 12, 2890, 16, 3604, 16, 819, 13, 8845, 273, 2618, 364, 652, 316, 365, 18, 2821, 30, 508, 16, 2943...
argNames.append(outParamForm(resultName, member.realtype))
argNames.append(outParamForm(resultname, member.realtype))
def writeTraceableQuickStub(f, member, stubName): assert member.traceable traceInfo = { 'type': getTraceInfoType(member.type) + "_FAIL", 'params': ["CONTEXT", "THIS"] } haveCcx = isInterfaceType(member.realtype) or anyParamRequiresCcx(member) # Write the function f.write("static %sFASTCALL\n" % getTraceType(member.type)) f.write("%s(JSContext *cx, JSObject *obj" % (stubName + "_tn")) if haveCcx: f.write(", JSObject *callee") traceInfo["params"].append("CALLEE") for i, param in enumerate(member.params): type = getBuiltinOrNativeTypeName(param.realtype) f.write(", %sarg%d" % (getTraceType(type), i)) traceInfo["params"].append(getTraceInfoType(type)) f.write(")\n{\n"); f.write(" XPC_QS_ASSERT_CONTEXT_OK(cx);\n") # Create ccx if needed. if haveCcx: f.write(" XPCCallContext ccx(JS_CALLER, cx, obj, callee);\n") # Get the 'self' pointer. selfName = "self" f.write(" %s *%s;\n" % (member.iface.name, selfName)) f.write(" xpc_qsSelfRef selfref;\n") f.write(" xpc_qsTempRoot tvr(cx);\n") if haveCcx: f.write(" if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, " "tvr.addr())) {\n") else: f.write(" if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, " "tvr.addr())) {\n") writeFailure(f, getTraceInfoDefaultReturn(member.type), 2) argNames = [] # Convert in-parameters. rvdeclared = False for i, param in enumerate(member.params): validateParam(member, param) type = unaliasType(param.realtype) argName = "_arg%d" % i rvdeclared = writeTraceableArgumentConversion(f, member, i, argName, param.realtype, haveCcx, rvdeclared) argNames.append(argName) # Prepare out-parameter. resultName = "_retval" writeResultDecl(f, member.realtype, resultName) # Call the method. comName = header.methodNativeName(member) if not isVoidType(member.realtype): argNames.append(outParamForm(resultName, member.realtype)) args = ', '.join(argNames) if not rvdeclared: f.write(" nsresult ") rvdeclared = True else: f.write(" ") f.write("rv = %s->%s(%s);\n" % (selfName, comName, args)) # Check for errors. f.write(" if (NS_FAILED(rv)) {\n") if haveCcx: f.write(" xpc_qsThrowMethodFailedWithCcx(ccx, rv);\n") else: # XXX Replace with a real error message! f.write(" xpc_qsThrowMethodFailedWithDetails(cx, rv, \"%s\", " "\"%s\");\n" % (member.iface.name, member.name)) writeFailure(f, getTraceInfoDefaultReturn(member.type), 2) # Convert the return value. writeTraceableResultConv(f, member.realtype, len(member.params) + 1, resultName) # Epilog. f.write("}\n\n") # Write the JS_DEFINE_TRCINFO block f.write("JS_DEFINE_TRCINFO_1(%s,\n" % stubName) f.write(" (%d, (static, %s, %s, %s, 0, 0)))\n\n" % (len(traceInfo["params"]), traceInfo["type"], stubName + "_tn", ", ".join(traceInfo["params"])))
d4894752c17d8324526f58a8ae8c82f1bcfbecae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/d4894752c17d8324526f58a8ae8c82f1bcfbecae/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 13663, 11974, 12, 74, 16, 3140, 16, 7168, 461, 4672, 1815, 3140, 18, 5129, 429, 225, 2606, 966, 273, 288, 296, 723, 4278, 18698, 966, 559, 12, 5990, 18, 723, 13, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 13663, 11974, 12, 74, 16, 3140, 16, 7168, 461, 4672, 1815, 3140, 18, 5129, 429, 225, 2606, 966, 273, 288, 296, 723, 4278, 18698, 966, 559, 12, 5990, 18, 723, 13, 397, ...
font_dir_path = os.path.join(os.environ['windir'], 'fonts')
font_dir_path = os.path.join(windir, 'fonts')
def initsysfonts_win32(): try: import _winreg except ImportError: import winreg as _winreg fonts = {} mods = 'demibold', 'narrow', 'light', 'unicode', 'bt', 'mt' fontdir = os.path.join(os.environ['WINDIR'], "Fonts") #this is a list of registry keys containing information #about fonts installed on the system. keys = [] #add recognized fonts from the fonts directory because the default #fonts may not be entered in the registry. win_font_files_mapping = dict( [(font.lower(), (_simplename(name), face)) for font, name, face in XP_default_font_files]) font_dir_path = os.path.join(os.environ['windir'], 'fonts') try: font_file_paths = glob.glob(os.path.join(font_dir_path, '*.tt?')) except Exception: pass else: for font in font_file_paths: file_name = os.path.basename(font) try: name, face = win_font_file_mapping[file_name] except KeyError: pass else: try: faces = fonts[name] except KeyError: _addfont(name, face[0], face[1], font, fonts) else: if face not in faces: _addfont(name, face[0], face[1], font, fonts) #add additional fonts entered in the registry. #find valid registry keys containing font information. possible_keys = [ r"SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts", r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", r"SOFTWARE\Microsoft\Windows[NT]\CurrentVersion\Fonts", ] for key_name in possible_keys: try: key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_name) keys.append(key) except WindowsError: pass for key in keys: fontdict = {} for i in range(_winreg.QueryInfoKey(key)[1]): try: name, font, t = _winreg.EnumValue(key,i) except EnvironmentError: break # try and handle windows unicode strings for some file names. # here are two documents with some information about it: # http://www.python.org/peps/pep-0277.html # https://www.microsoft.com/technet/archive/interopmigration/linux/mvc/lintowin.mspx#ECAA try: font = str(font) except UnicodeEncodeError: # MBCS is the windows encoding for unicode file names. try: font = font.encode('MBCS') except: # no goodness with str or MBCS encoding... skip this font. continue if font[-4:].lower() not in [".ttf", ".ttc"]: continue if os.sep not in font: font = os.path.join(fontdir, font) if name[-10:] == '(TrueType)': name = name[:-11] name = name.lower().split() bold = italic = 0 for m in mods: if m in name: name.remove(m) if 'bold' in name: name.remove('bold') bold = 1 if 'italic' in name: name.remove('italic') italic = 1 name = ''.join(name) name=_simplename(name) _addfont(name, bold, italic, font, fonts) return fonts
e9a92ee724290355f4b1d637f994ae0814b0ffbf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1298/e9a92ee724290355f4b1d637f994ae0814b0ffbf/sysfont.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 9499, 22052, 67, 8082, 1578, 13332, 775, 30, 1930, 389, 8082, 1574, 1335, 11308, 30, 1930, 5657, 1574, 487, 389, 8082, 1574, 16450, 273, 2618, 15546, 273, 296, 19117, 495, 1673, 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, 1208, 9499, 22052, 67, 8082, 1578, 13332, 775, 30, 1930, 389, 8082, 1574, 1335, 11308, 30, 1930, 5657, 1574, 487, 389, 8082, 1574, 16450, 273, 2618, 15546, 273, 296, 19117, 495, 1673, 2187...
self.songs_filter_rownums = []
prev_rownums = [] for song in self.filter_row_mapping: prev_rownums.append(song) self.filter_row_mapping = []
def searchfilter_loop(self): while self.filterbox_visible: # copy the last command or pattern safely self.filterbox_cond.acquire() try: while(self.filterbox_cmd_buf == '$$$DONE###'): self.filterbox_cond.wait() todo = self.filterbox_cmd_buf self.filterbox_cond.release() except: todo = self.filterbox_cmd_buf pass matches = gtk.ListStore(*([str] + [int] + [str] * len(self.columnformat))) matches.clear() filterposition = self.current.get_visible_rect()[1] model, selected = self.current_selection.get_selected_rows() filterselected = [] for path in selected: filterselected.append(path) rownum = 0 self.songs_filter_rownums = [] # Mapping between matches and self.currentdata if todo == '$$$QUIT###': gobject.idle_add(self.searchfilter_revert_model) return elif len(todo) == 0: for row in self.currentdata: self.songs_filter_rownums.append(rownum) rownum = rownum + 1 song_info = [row[0]] for i in range(len(self.columnformat)+1): song_info.append(make_unbold(row[i+1])) matches.append(song_info) else: # this make take some seconds... and we'll escape the search text because # we'll be searching for a match in items that are also escaped. todo = escape_html(todo) todo = '.*' + todo.replace(' ', ' .*').lower() regexp = re.compile(todo) rownum = 0 if self.prevtodo in todo and len(self.prevtodo) > 0: # If the user's current filter is a subset of the # previous selection (e.g. "h" -> "ha"), search # for files only in the current model, not the # entire self.currentdata use_data = self.current.get_model() else: use_data = self.currentdata for row in use_data: song_info = [row[0]] for i in range(len(self.columnformat)+1): song_info.append(make_unbold(row[i+1])) # Search for matches in all columns: for i in range(len(self.columnformat)+1): if regexp.match(str(song_info[i+1]).lower()): matches.append(song_info) self.songs_filter_rownums.append(rownum) break rownum = rownum + 1 if self.prevtodo == todo or self.prevtodo == "RETAIN_POS_AND_SEL": # mpd update, retain view of treeview: retain_position_and_selection = True else: retain_position_and_selection = False self.filterbox_cond.acquire() self.filterbox_cmd_buf='$$$DONE###' try: self.filterbox_cond.release() except: pass gobject.idle_add(self.searchfilter_set_matches, matches, filterposition, filterselected, retain_position_and_selection) self.prevtodo = todo
0edd2102de649a7465f806846ed54ad3a3a68a86 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/0edd2102de649a7465f806846ed54ad3a3a68a86/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 2188, 67, 6498, 12, 2890, 4672, 1323, 365, 18, 2188, 2147, 67, 8613, 30, 468, 1610, 326, 1142, 1296, 578, 1936, 15303, 365, 18, 2188, 2147, 67, 10013, 18, 1077, 1039, 1435, 775, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 2188, 67, 6498, 12, 2890, 4672, 1323, 365, 18, 2188, 2147, 67, 8613, 30, 468, 1610, 326, 1142, 1296, 578, 1936, 15303, 365, 18, 2188, 2147, 67, 10013, 18, 1077, 1039, 1435, 775, ...
Output("if (myPyMac_GetFSRef(v, &((%s *)self)->ob_itself)) return 0;", self.objecttype)
Output("if (PyMac_GetFSRef(v, &((%s *)self)->ob_itself)) return 0;", self.objecttype)
def output_tp_initBody(self): Output("PyObject *v = NULL;") Output("char *rawdata = NULL;") Output("int rawdatalen = 0;") Output("char *kw[] = {\"itself\", \"rawdata\", 0};") Output() Output("if (!PyArg_ParseTupleAndKeywords(args, kwds, \"|Os#\", kw, &v, &rawdata, &rawdatalen))") Output("return -1;") Output("if (v && rawdata)") OutLbrace() Output("PyErr_SetString(PyExc_TypeError, \"Only one of itself or rawdata may be specified\");") Output("return -1;") OutRbrace() Output("if (!v && !rawdata)") OutLbrace() Output("PyErr_SetString(PyExc_TypeError, \"One of itself or rawdata must be specified\");") Output("return -1;") OutRbrace() Output("if (rawdata)") OutLbrace() Output("if (rawdatalen != sizeof(%s))", self.itselftype) OutLbrace() Output("PyErr_SetString(PyExc_TypeError, \"%s rawdata incorrect size\");", self.itselftype) Output("return -1;") OutRbrace() Output("memcpy(&((%s *)self)->ob_itself, rawdata, rawdatalen);", self.objecttype) Output("return 0;") OutRbrace() Output("if (myPyMac_GetFSRef(v, &((%s *)self)->ob_itself)) return 0;", self.objecttype) Output("return -1;")
e87663306a989afea3a2ed3e245a6190fd9e1fa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e87663306a989afea3a2ed3e245a6190fd9e1fa9/filesupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 67, 6834, 67, 2738, 2250, 12, 2890, 4672, 3633, 2932, 9413, 921, 380, 90, 273, 3206, 4868, 13, 3633, 2932, 3001, 380, 1899, 892, 273, 3206, 4868, 13, 3633, 2932, 474, 1831, 72, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 67, 6834, 67, 2738, 2250, 12, 2890, 4672, 3633, 2932, 9413, 921, 380, 90, 273, 3206, 4868, 13, 3633, 2932, 3001, 380, 1899, 892, 273, 3206, 4868, 13, 3633, 2932, 474, 1831, 72, 31...
return(ret);
return(test_ret);
def generate_test(module, node): global test global nb_tests nb_cond = 0 no_gen = 0 name = node.xpathEval('string(@name)') if is_skipped_function(name): return # # check we know how to handle the args and return values # and store the informations for the generation # try: args = node.xpathEval("arg") except: args = [] t_args = [] n = 0 for arg in args: n = n + 1 rtype = arg.xpathEval("string(@type)") if rtype == 'void': break; info = arg.xpathEval("string(@info)") nam = arg.xpathEval("string(@name)") type = type_convert(rtype, nam, info, module, name, n) if is_known_param_type(type, rtype) == 0: add_missing_type(type, name); no_gen = 1 t_args.append((nam, type, rtype, info)) try: rets = node.xpathEval("return") except: rets = [] t_ret = None for ret in rets: rtype = ret.xpathEval("string(@type)") info = ret.xpathEval("string(@info)") type = type_convert(rtype, 'return', info, module, name, 0) if rtype == 'void': break if is_known_return_type(type) == 0: add_missing_type(type, name); no_gen = 1 t_ret = (type, rtype, info) break test.write("""
4259532303e96e089a185c6f55056cb7c4902d71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/4259532303e96e089a185c6f55056cb7c4902d71/gentest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3813, 12, 2978, 16, 756, 4672, 2552, 1842, 2552, 4264, 67, 16341, 4264, 67, 10013, 273, 374, 1158, 67, 4507, 273, 374, 225, 508, 273, 756, 18, 18644, 13904, 2668, 1080, 26964, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3813, 12, 2978, 16, 756, 4672, 2552, 1842, 2552, 4264, 67, 16341, 4264, 67, 10013, 273, 374, 1158, 67, 4507, 273, 374, 225, 508, 273, 756, 18, 18644, 13904, 2668, 1080, 26964, ...
combine_images(clips, "button/Button-Combined.png", False, config)
combine_images(clips, "button-tb-combined.png", False, config)
def process_buttons(config): files = [ "Button-Checked-Fokus", "Button-Checked", "Button-Default-Fokus", "Button-Default", "Button-Hover", "Button-Normal-Fokus", "Button-Normal", "Button-Pressed" ] for file in files: split_grid(file, "source", "button", 4) clips = [] for file in files: for suffix in ["tl", "t" , "tr", "bl", "b", "br"]: clips.append("button/%s-%s.png" % (file, suffix)) combine_images(clips, "button/Button-Combined.png", False, config) clips = [] for file in files: for suffix in ["l", "r"]: clips.append("button/%s-%s.png" % (file, suffix)) combine_images(clips, "button/Button-Combined-Center.png", True, config) for file in files: add_file("button/%s-c.png" % file, config)
b22d0db2222e531160880d72a8983e1303736195 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/b22d0db2222e531160880d72a8983e1303736195/combine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 16016, 12, 1425, 4672, 1390, 273, 306, 315, 3616, 17, 11454, 17, 42, 601, 407, 3113, 315, 3616, 17, 11454, 3113, 315, 3616, 17, 1868, 17, 42, 601, 407, 3113, 315, 3616, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 16016, 12, 1425, 4672, 1390, 273, 306, 315, 3616, 17, 11454, 17, 42, 601, 407, 3113, 315, 3616, 17, 11454, 3113, 315, 3616, 17, 1868, 17, 42, 601, 407, 3113, 315, 3616, 17, ...
if lx == ly: return lx[2] elif lx < ly: ly = y.next() elif lx > ly: lx = x.next()
if gx[0] == gy[0]: i = [ n for n in gx[1] if n in gy[1] ] if i: return i[0] else: gy = y.next() gx = x.next() elif gx[0] < gy[0]: gy = y.next() else: gx = x.next()
def ancestors(node): # we store negative distances because heap returns smallest member h = [(-dist[node], node)] seen = {} earliest = self.count() while h: d, n = heapq.heappop(h) if n not in seen: seen[n] = 1 r = self.rev(n) yield (-d, r, n) for p in self.parents(n): heapq.heappush(h, (-dist[p], p))
ca3931493ec9c7681961afeb6ca70c6144d35b81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/ca3931493ec9c7681961afeb6ca70c6144d35b81/revlog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14322, 12, 2159, 4672, 468, 732, 1707, 6092, 12491, 2724, 10500, 1135, 13541, 3140, 366, 273, 306, 19236, 4413, 63, 2159, 6487, 756, 25887, 5881, 273, 2618, 20674, 273, 365, 18, 1883, 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, 14322, 12, 2159, 4672, 468, 732, 1707, 6092, 12491, 2724, 10500, 1135, 13541, 3140, 366, 273, 306, 19236, 4413, 63, 2159, 6487, 756, 25887, 5881, 273, 2618, 20674, 273, 365, 18, 1883, 1435...
rules = [ ( (GeometryField, ), [], { "srid": ["_srid", {"default": 4326}], "spatial_index": ["_spatial_index", {"default": True}], "dim": ["_dim", {"default": 2}], }, ), ] add_introspection_rules(rules, ["^django\.contrib\.gis"])
if django.VERSION[0] == 1 and django.VERSION[1] >= 1: rules = [ ( (GeometryField, ), [], { "srid": ["srid", {"default": 4326}], "spatial_index": ["spatial_index", {"default": True}], "dim": ["dim", {"default": 2}], }, ), ] else: rules = [ ( (GeometryField, ), [], { "srid": ["_srid", {"default": 4326}], "spatial_index": ["_spatial_index", {"default": True}], "dim": ["_dim", {"default": 2}], }, ), ] add_introspection_rules(rules, ["^django\.contrib\.gis"])
def has_geos(): try: from django.contrib.gis.geos import libgeos except (ImportError, OSError): return False else: return True
094ee39c42dde28e19ef8e80ad08b2e26a850a45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/094ee39c42dde28e19ef8e80ad08b2e26a850a45/geodjango.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 908, 538, 13332, 775, 30, 628, 13710, 18, 26930, 18, 15761, 18, 908, 538, 1930, 2561, 908, 538, 1335, 261, 5010, 668, 16, 10002, 4672, 327, 1083, 469, 30, 327, 1053, 282, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 908, 538, 13332, 775, 30, 628, 13710, 18, 26930, 18, 15761, 18, 908, 538, 1930, 2561, 908, 538, 1335, 261, 5010, 668, 16, 10002, 4672, 327, 1083, 469, 30, 327, 1053, 282, 2, ...
def dynamic_substitution_list(self,ind_0=1,brackets=False,compact=True):
def dynamic_substitution_list(self,brackets=False,compact=True):
def dynamic_substitution_list(self,ind_0=1,brackets=False,compact=True): # Returns a dictionary mapping each symbol appearing in the model # to the string used in the dynamic file
59a2bf6050cc2c75016b9b792eaed3aedaeb1b92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10534/59a2bf6050cc2c75016b9b792eaed3aedaeb1b92/compiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5976, 67, 1717, 14278, 67, 1098, 12, 2890, 16, 21025, 87, 33, 8381, 16, 21038, 33, 5510, 4672, 468, 2860, 279, 3880, 2874, 1517, 3273, 7226, 5968, 316, 326, 938, 468, 358, 326, 533, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5976, 67, 1717, 14278, 67, 1098, 12, 2890, 16, 21025, 87, 33, 8381, 16, 21038, 33, 5510, 4672, 468, 2860, 279, 3880, 2874, 1517, 3273, 7226, 5968, 316, 326, 938, 468, 358, 326, 533, 13...
opts.append("NON_CONSOLE")
OPTS.append("NON_CONSOLE")
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
32c5b3b66d380b522f94ed5b4c1e319509bf283a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/32c5b3b66d380b522f94ed5b4c1e319509bf283a/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 293, 464, 842, 722, 67, 76, 1011, 1548, 82, 7, 318, 536, 225, 453, 4307, 37, 67, 3932, 1653, 39, 6365, 67, 5757, 64, 82, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 293, 464, 842, 722, 67, 76, 1011, 1548, 82, 7, 318, 536, 225, 453, 4307, 37, 67, 3932, 1653, 39, 6365, 67, 5757, 64, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.imap = IMAPSession("localhost", IMAP_PORT)
self.imap = IMAPSession("localhost:%d" % IMAP_PORT)
def setUp(self): # shorten for testing so we don't wait forever IMAPSession.timeout = 5 self.imap = IMAPSession("localhost", IMAP_PORT)
227d7a9b6acc7bbd13c20f8f07dd1793578beddc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6126/227d7a9b6acc7bbd13c20f8f07dd1793578beddc/test_sb_imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 468, 19651, 364, 7769, 1427, 732, 2727, 1404, 2529, 21238, 6246, 2203, 2157, 18, 4538, 273, 1381, 365, 18, 12161, 273, 6246, 2203, 2157, 2932, 13014, 3113, 6246, 220...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24292, 12, 2890, 4672, 468, 19651, 364, 7769, 1427, 732, 2727, 1404, 2529, 21238, 6246, 2203, 2157, 18, 4538, 273, 1381, 365, 18, 12161, 273, 6246, 2203, 2157, 2932, 13014, 3113, 6246, 220...
abortReq = testmsg("0500AB") abortReqObj = parser.parse(abortReq) assert(abortReqObj.opcode == MCAP_MD_ABORT_MDL_REQ) assert(abortReqObj.mdlid == 0x00AB)
msg = testmsg("0500AB") msgObj = parser.parse(msg) assert(msgObj.opcode == MCAP_MD_ABORT_MDL_REQ) assert(msgObj.mdlid == 0x00AB) assert(msgObj.encode() == msg)
def test(): createReq = CreateMDLRequest(0x01, 0x01, 0x0001) assert(createReq.mdlid == 0x01) assert(createReq.mdepid == 0x01) assert(createReq.opcode == MCAP_MD_CREATE_MDL_REQ) reconnectReq = ReconnectMDLRequest(0x01) assert(reconnectReq.mdlid == 0x01) assert(reconnectReq.opcode == MCAP_MD_RECONNECT_MDL_REQ) deleteReq = DeleteMDLRequest(0x02) assert(deleteReq.mdlid == 0x02) assert(deleteReq.opcode == MCAP_MD_DELETE_MDL_REQ) abortReq = AbortMDLRequest(0x03) assert(abortReq.mdlid == 0x03) assert(abortReq.opcode == MCAP_MD_ABORT_MDL_REQ) # TEST PARSER parser = MessageParser() # test CreateReq message parsing createReq = testmsg("0100230ABC") createReqObj = parser.parse(createReq) assert(createReqObj.opcode == MCAP_MD_CREATE_MDL_REQ) assert(createReqObj.mdlid == 0x0023) assert(createReqObj.mdepid == 0x0A) assert(createReqObj.conf == 0xBC) # test ReconnectReq message parsing reconnectReq = testmsg("0300AB") reconnectReqObj = parser.parse(reconnectReq) assert(reconnectReqObj.opcode == MCAP_MD_RECONNECT_MDL_REQ) assert(reconnectReqObj.mdlid == 0x00AB) # test AbortReq message parsing abortReq = testmsg("0500AB") abortReqObj = parser.parse(abortReq) assert(abortReqObj.opcode == MCAP_MD_ABORT_MDL_REQ) assert(abortReqObj.mdlid == 0x00AB) # test DeleteReq message parsing deleteReq = testmsg("0700CC") deleteReqObj = parser.parse(deleteReq) assert(deleteReqObj.opcode == MCAP_MD_DELETE_MDL_REQ) assert(deleteReqObj.mdlid == 0x00CC) # test CreateRsp message parsing createRsp = testmsg("0200002307") createRspObj = parser.parse(createRsp) assert(createRspObj.opcode == MCAP_MD_CREATE_MDL_RSP) assert(createRspObj.mdlid == 0x0023) assert(createRspObj.rspcode == MCAP_RSP_SUCCESS) assert(createRspObj.config == 0x07) # test ReconnectRsp message parsing reconnectRsp = testmsg("040200AB") reconnectRspObj = parser.parse(reconnectRsp) assert(reconnectRspObj.opcode == MCAP_MD_RECONNECT_MDL_RSP) assert(reconnectRspObj.mdlid == 0x00AB) assert(reconnectRspObj.rspcode == MCAP_RSP_INVALID_PARAMETER_VALUE) # test AbortRsp message parsing abortRsp = testmsg("0605FFFF") abortRspObj = parser.parse(abortRsp) assert(abortRspObj.opcode == MCAP_MD_ABORT_MDL_RSP) assert(abortRspObj.mdlid == 0xFFFF) assert(abortRspObj.rspcode == MCAP_RSP_INVALID_MDL) # test DeleteRsp message parsing deleteRsp = testmsg("080000CC") deleteRspObj = parser.parse(deleteRsp) assert(deleteRspObj.opcode == MCAP_MD_DELETE_MDL_RSP) assert(deleteRspObj.mdlid == 0x00CC) assert(deleteRspObj.rspcode == MCAP_RSP_SUCCESS) exc = None try: parser.parse(testmsg("8B003344")) except Exception, e: exc = e assert(isinstance(exc, InvalidMessage)) exc = None try: parser.parse(testmsg("01")) except Exception, e: exc = e assert(isinstance(exc, InvalidMessage)) exc = None try: parser.parse("") except Exception, e: exc = e assert(isinstance(exc, InvalidMessage)) print "TESTS OK"
5ab73709fd24f71f38fc2ed06c5d1fbb3996f217 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8028/5ab73709fd24f71f38fc2ed06c5d1fbb3996f217/mcap_defs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 752, 6113, 273, 1788, 6188, 48, 691, 12, 20, 92, 1611, 16, 374, 92, 1611, 16, 374, 92, 13304, 13, 1815, 12, 2640, 6113, 18, 1264, 80, 350, 422, 374, 92, 1611, 13, 1815, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 752, 6113, 273, 1788, 6188, 48, 691, 12, 20, 92, 1611, 16, 374, 92, 1611, 16, 374, 92, 13304, 13, 1815, 12, 2640, 6113, 18, 1264, 80, 350, 422, 374, 92, 1611, 13, 1815, ...
for key in Job.KEYS_WITH_JOB_REFS: if newJob.hasFeature(key): newlist = [] oldlist = newJob.getFeature(key) for jobname in oldlist: newlist.append(extConfig.getJob(jobname)) newJob.setFeature(key, newlist)
if namepfx: for key in Job.KEYS_WITH_JOB_REFS: if newJob.hasFeature(key): newlist = [] oldlist = newJob.getFeature(key) for jobname in oldlist: newlist.append(extConfig.getJob(jobname)) newJob.setFeature(key, newlist)
def _integrateExternalConfig(self, extConfig, namespace, importJobsList=None, blockJobsList=None): # jobs of external config are spliced into current job list if namespace: namepfx = namespace + self.COMPOSED_NAME_SEP # job names will be namespace'd else: namepfx = "" # job names will not be namespace'd
2323b6c72a27caaece3ec5416d70e66a00c9eb46 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/2323b6c72a27caaece3ec5416d70e66a00c9eb46/Config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14970, 5141, 6841, 809, 12, 2890, 16, 1110, 809, 16, 1981, 16, 1930, 7276, 682, 33, 7036, 16, 1203, 7276, 682, 33, 7036, 4672, 468, 6550, 434, 3903, 642, 854, 9628, 72, 1368, 783,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14970, 5141, 6841, 809, 12, 2890, 16, 1110, 809, 16, 1981, 16, 1930, 7276, 682, 33, 7036, 16, 1203, 7276, 682, 33, 7036, 4672, 468, 6550, 434, 3903, 642, 854, 9628, 72, 1368, 783,...