rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
for inj in injcache: for cat in cats:
p_nodes[cat].append(sqliteNodeCluster[type+cat]) for injnum, inj in enumerate(injcache): print >> sys.stderr, "processing injection %f %%\r" % (float(injnum) / len(injcache) * 100.00,),
def grep_pieces_and_append(string, inname, outname, append_cache=None): expr = re.compile(string) new_list = filter(expr.search,open(inname).readlines()) new_list.sort() print len(new_list) outnames = [] try: os.mkdir(outname) except: pass # To make sure that includes slides and zero lag for i in range(len(new_list)): if not i % 10: outnames.append(outname+"/"+outname+"_"+str(i)) o = open(outnames[-1]+".cache", "w") if append_cache: o.write(''.join(append_cache)) print "grepping " + inname + " for " + string + " and sending it to " + outnames[-1] + ".cache" o.write(new_list[i]) o.write(new_list[i].replace('THINCA_SECOND','THINCA_SLIDE_SECOND')) return outnames
0b97313a1079214d63930999cbf916815e37ccaf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/0b97313a1079214d63930999cbf916815e37ccaf/highmass_post_process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23366, 67, 31016, 67, 464, 67, 6923, 12, 1080, 16, 316, 529, 16, 596, 529, 16, 714, 67, 2493, 33, 7036, 4672, 3065, 273, 283, 18, 11100, 12, 1080, 13, 394, 67, 1098, 273, 1034, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23366, 67, 31016, 67, 464, 67, 6923, 12, 1080, 16, 316, 529, 16, 596, 529, 16, 714, 67, 2493, 33, 7036, 4672, 3065, 273, 283, 18, 11100, 12, 1080, 13, 394, 67, 1098, 273, 1034, 12, ...
<unauthenticatedPrincipal id="zope.anybody" title="%(unauth_user)s" /> <unauthenticatedGroup id="zope.Anybody" title="%(unauth_users)s" /> <authenticatedGroup id="zope.Authenticated" title="%(auth_users)s" /> <everybodyGroup id="zope.Everybody" title="%(all_users)s" />
<unauthenticatedPrincipal id="zope.anybody" title="Unauthenticated User" /> <unauthenticatedGroup id="zope.Anybody" title="Unauthenticated Users" /> <authenticatedGroup id="zope.Authenticated" title="Authenticated Users" /> <everybodyGroup id="zope.Everybody" title="All Users" />
def daemonize(): """Daemonize with a double fork and close the standard IO.""" pid = os.fork() if pid: sys.exit(0) os.setsid() os.umask(077) pid = os.fork() if pid: print _("Going to background, daemon pid %d" % pid) sys.exit(0) os.close(0) os.close(1) os.close(2) os.open('/dev/null', os.O_RDWR) os.dup(0) os.dup(0)
a708cee44de40541d269aefab88cd57d5268996f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/a708cee44de40541d269aefab88cd57d5268996f/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8131, 554, 13332, 3536, 12858, 554, 598, 279, 1645, 12515, 471, 1746, 326, 4529, 1665, 12123, 4231, 273, 1140, 18, 23335, 1435, 309, 4231, 30, 2589, 18, 8593, 12, 20, 13, 1140, 18, 4424,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8131, 554, 13332, 3536, 12858, 554, 598, 279, 1645, 12515, 471, 1746, 326, 4529, 1665, 12123, 4231, 273, 1140, 18, 23335, 1435, 309, 4231, 30, 2589, 18, 8593, 12, 20, 13, 1140, 18, 4424,...
ainv = _sqrt(2.0 * alpha - 1.0) return beta * self.stdgamma(alpha, ainv, alpha - LOG4, alpha + ainv) def stdgamma(self, alpha, ainv, bbb, ccc):
return beta * self.stdgamma(alpha) def stdgamma(self, alpha, *args):
def gammavariate(self, alpha, beta): # beta times standard gamma ainv = _sqrt(2.0 * alpha - 1.0) return beta * self.stdgamma(alpha, ainv, alpha - LOG4, alpha + ainv)
ca6cdc2c0259b1b74a3f4c2d29a35e76617a3019 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ca6cdc2c0259b1b74a3f4c2d29a35e76617a3019/random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23411, 20689, 297, 3840, 12, 2890, 16, 4190, 16, 6796, 4672, 468, 6796, 4124, 4529, 9601, 279, 5768, 273, 389, 24492, 12, 22, 18, 20, 380, 4190, 300, 404, 18, 20, 13, 327, 6796, 380, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23411, 20689, 297, 3840, 12, 2890, 16, 4190, 16, 6796, 4672, 468, 6796, 4124, 4529, 9601, 279, 5768, 273, 389, 24492, 12, 22, 18, 20, 380, 4190, 300, 404, 18, 20, 13, 327, 6796, 380, ...
def doctree(self, tree, modname, classes={}, parent=None):
def formattree(self, tree, modname, classes={}, parent=None):
def doctree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, classes) if bases and bases != (parent,): parents = [] for base in bases: parents.append(self.classlink(base, modname, classes)) result = result + '(' + join(parents, ', ') + ')' result = result + '\n</small></font></dt>' elif type(entry) is type([]): result = result + \ '<dd>\n%s</dd>\n' % self.doctree(entry, modname, classes, c) return '<dl>\n%s</dl>\n' % result
54a838fe1421d6e6829cabc42e7f398722140804 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/54a838fe1421d6e6829cabc42e7f398722140804/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 3413, 12, 2890, 16, 2151, 16, 16037, 16, 3318, 28793, 982, 33, 7036, 4672, 3536, 25884, 3982, 364, 279, 667, 2151, 487, 864, 635, 5334, 18, 588, 830, 345, 334, 992, 1435, 12123, 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, 740, 3413, 12, 2890, 16, 2151, 16, 16037, 16, 3318, 28793, 982, 33, 7036, 4672, 3536, 25884, 3982, 364, 279, 667, 2151, 487, 864, 635, 5334, 18, 588, 830, 345, 334, 992, 1435, 12123, 5...
setattr(self.shader.shader, "shadowname", params["shadow"]["shadowName"])
self.shader.setParamValue("shadowname", params["shadow"]["shadowName"])
def setShadowParms(self, params): shadername = self.shader.shader.shadername if shadername == "shadowpoint": setattr(self.shader.shader, "sfpx", params["px"]["shadowName"]) #print "Shadowmap: ", getattr(self.shader.shader, "sfpx") setattr(self.shader.shader, "sfpy", params["py"]["shadowName"]) #print "Shadowmap: ", getattr(self.shader.shader, "sfpy") setattr(self.shader.shader, "sfpz", params["pz"]["shadowName"]) #print "Shadowmap: ", getattr(self.shader.shader, "sfpz") setattr(self.shader.shader, "sfnx", params["nx"]["shadowName"]) #print "Shadowmap: ", getattr(self.shader.shader, "sfnx") setattr(self.shader.shader, "sfny", params["ny"]["shadowName"]) #print "Shadowmap: ", getattr(self.shader.shader, "sfny") setattr(self.shader.shader, "sfnz", params["nz"]["shadowName"]) #print "Shadowmap: ", getattr(self.shader.shader, "sfnz") elif shadername == "shadowspot" or shadername == "shadowdistant" or shadername == "bml": setattr(self.shader.shader, "shadowname", params["shadow"]["shadowName"])
363dd9868541cf56e099d664af09ec8be926ffc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11560/363dd9868541cf56e099d664af09ec8be926ffc1/BtoRAdapterClasses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12957, 28572, 12, 2890, 16, 859, 4672, 16700, 529, 273, 365, 18, 674, 1143, 18, 674, 1143, 18, 674, 1143, 529, 309, 16700, 529, 422, 315, 19119, 1153, 6877, 9241, 12, 2890, 18, 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, 444, 12957, 28572, 12, 2890, 16, 859, 4672, 16700, 529, 273, 365, 18, 674, 1143, 18, 674, 1143, 18, 674, 1143, 529, 309, 16700, 529, 422, 315, 19119, 1153, 6877, 9241, 12, 2890, 18, 67...
default=False, help="enable xmlrpc")
help="enable xmlrpc")
def __init__(self, fname=None): self.options = { 'interface': '', 'netrpc': True, 'netport': '8070', 'xmlrpc': False, 'xmlport': '8069', 'webdav': False, 'webdavport': '8080', 'soap': False, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'pg_path': None, 'admin_passwd': 'admin', 'verbose': False, 'debug_mode': False, 'pidfile': None, 'logfile': None, 'secure': False, 'smtp_server': 'localhost', 'smtp_user': False, 'smtp_password': False, 'stop_after_init': False, 'data_path': '/var/lib/trytond', }
b5cebcba6e2c93354148fdb6d3407093b6d2dd03 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/b5cebcba6e2c93354148fdb6d3407093b6d2dd03/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5299, 33, 7036, 4672, 365, 18, 2116, 273, 288, 296, 5831, 4278, 10226, 296, 2758, 7452, 4278, 1053, 16, 296, 2758, 655, 4278, 296, 3672, 7301, 2187, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5299, 33, 7036, 4672, 365, 18, 2116, 273, 288, 296, 5831, 4278, 10226, 296, 2758, 7452, 4278, 1053, 16, 296, 2758, 655, 4278, 296, 3672, 7301, 2187, 296, ...
T = self.frametypes[key] it = iter(T._names[1:]) rfieldnames = [] for name in fieldnames: if name is None: rfieldnames.append(None) else: rfieldnames.append(it.next()) try: it.next() except StopIteration: pass else: assert False, "field name count mismatch" return T, rfieldnames else: fields = [] for t in STORAGE_TYPES: for j in range(key.get(t, 0)): fields.append(('state_%s_%d' % (STORAGE_FIELDS[t], j), t)) T = frame.make_state_header_type("FrameState", *fields) self.frametypes[key] = T return T, fieldnames def ensure_frame_type_for_types(self, frame_type): key, fieldnames = self._key_fieldnames_for_types( [frame_type._flds[n] for n in frame_type._names[1:]]) assert len(fieldnames) <= 1, "nasty field ordering issues need to be solved XXX mwh, pedronis" if key in self.frametypes: assert self.frametypes[key] is frame_type self.frametypes[key] = frame_type
assert self.frametypes[key][0] is frame_type self.frametypes[key] = (frame_type, fieldsbytype)
def frame_type_for_vars(self, vars): key, fieldnames = self._key_fieldnames_for_types([v.concretetype for v in vars]) if key in self.frametypes: T = self.frametypes[key] it = iter(T._names[1:]) rfieldnames = [] for name in fieldnames: if name is None: rfieldnames.append(None) else: rfieldnames.append(it.next()) try: it.next() except StopIteration: pass else: assert False, "field name count mismatch" return T, rfieldnames else: fields = [] for t in STORAGE_TYPES: for j in range(key.get(t, 0)): fields.append(('state_%s_%d' % (STORAGE_FIELDS[t], j), t)) T = frame.make_state_header_type("FrameState", *fields) self.frametypes[key] = T return T, fieldnames
15f04e6b641cf653f925f296af5deeaf7f6340fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/15f04e6b641cf653f925f296af5deeaf7f6340fa/transform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2623, 67, 723, 67, 1884, 67, 4699, 12, 2890, 16, 4153, 4672, 498, 16, 25051, 273, 365, 6315, 856, 67, 1518, 1973, 67, 1884, 67, 2352, 3816, 90, 18, 11504, 1349, 5872, 364, 331, 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, 2623, 67, 723, 67, 1884, 67, 4699, 12, 2890, 16, 4153, 4672, 498, 16, 25051, 273, 365, 6315, 856, 67, 1518, 1973, 67, 1884, 67, 2352, 3816, 90, 18, 11504, 1349, 5872, 364, 331, 316, ...
valid = 0 if valid and not item.hastag('spawntype') or not item.hastag('spawndef'): valid = 0
valid = False if valid and (not item.hastag('spawntype') or not item.hastag('spawndef')): valid = False
def processSpawns(process): # Process the designated partition for i in range(0, len(process)): item = wolfpack.finditem(process[i]) # Check if the spawn is valid. valid = item != None if valid and not item.hasscript( 'spawngem' ): valid = 0 if valid and not item.hastag('spawntype') or not item.hastag('spawndef'): valid = 0 if not valid: if DEBUG_SPAWNS == 1: console.log(LOG_WARNING, "Invalid spawn item: 0x%x.\n" % item.serial) pass else: spawntype = int(item.gettag('spawntype')) # 0: Items, 1: NPCs spawndef = str(item.gettag('spawndef')) # Definition # This is either how far the npcs will wander # or how far from the spawn the items will be spawned. area = 0 if item.hastag('area'): area = int(item.gettag('area')) # This is a minimum/maximum spawn interval in minutes mininterval = 1 maxinterval = 1 if item.hastag('interval'): interval = item.gettag('interval') if ',' in interval: (mininterval, maxinterval) = interval.split(',', 1) try: mininterval = max(1, int(mininterval)) maxinterval = max(1, int(maxinterval)) if maxinterval < mininterval: temp = mininterval mininterval = maxinterval maxinterval = temp except: mininterval = 1 maxinterval = 1 # Currently / Maximimum spawned by this gem current = 0 if item.hastag('current'): try: current = int(item.gettag('current')) except: current = 0 maximum = 1 if item.hastag('maximum'): try: maximum = int(item.gettag('maximum')) except: maximum = 1 nextspawn = 0 if item.hastag('nextspawn'): try: nextspawn = int(item.gettag('nextspawn')) except: nextspawn = 0 currenttime = wolfpack.tickcount() # It's possible that the spawntime got too far into the future (server-reload etc.) # reset it here. if nextspawn - currenttime > maxinterval * 60 * 1000: nextspawn = 0 # If we didn't have a spawntime set yet. if nextspawn == 0 and current < maximum: item.settag('nextspawn', currenttime + random.randint(mininterval, maxinterval) * 60 * 1000) continue elif current >= maximum: item.deltag('nextspawn') continue if nextspawn <= currenttime: spawn(item, spawntype, spawndef, current, area) #console.log(LOG_MESSAGE, "SPAWNTIME REACHED!") item.deltag('nextspawn') if DEBUG_SPAWNS == 1: console.log(LOG_MESSAGE, "Valid Spawnpoint: %x, Cur/Max: %u/%u, Def: %s, Type: %u, Interval: %u,%u, Time: %d/%d" % \ (item.serial, current, maximum, spawndef, spawntype, mininterval, maxinterval, currenttime, nextspawn))
54a1f1818e5511f522b9e86d7e44dbde33773e22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/54a1f1818e5511f522b9e86d7e44dbde33773e22/spawns.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3389, 2219, 2387, 12, 2567, 4672, 468, 4389, 326, 25264, 3590, 364, 277, 316, 1048, 12, 20, 16, 562, 12, 2567, 3719, 30, 761, 273, 341, 355, 74, 2920, 18, 4720, 1726, 12, 2567, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3389, 2219, 2387, 12, 2567, 4672, 468, 4389, 326, 25264, 3590, 364, 277, 316, 1048, 12, 20, 16, 562, 12, 2567, 3719, 30, 761, 273, 341, 355, 74, 2920, 18, 4720, 1726, 12, 2567, ...
contentLength = 0
try: contentLength = os.stat(sourceFSfullPath)[6] except: contentLength = 0
def addFile(self, sourceFSfullPath, destPLFNGrelativePath='', destBasename=None, moveFile=0, inputMD5=None): """ add a file """
c6bc9553ed5360092abb504eda0dae11a0fca1dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/c6bc9553ed5360092abb504eda0dae11a0fca1dc/PloneLocalFolderNG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18671, 12, 2890, 16, 1084, 4931, 2854, 743, 16, 1570, 6253, 42, 4960, 11626, 743, 2218, 2187, 1570, 11494, 1069, 33, 7036, 16, 3635, 812, 33, 20, 16, 810, 6188, 25, 33, 7036, 4672, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18671, 12, 2890, 16, 1084, 4931, 2854, 743, 16, 1570, 6253, 42, 4960, 11626, 743, 2218, 2187, 1570, 11494, 1069, 33, 7036, 16, 3635, 812, 33, 20, 16, 810, 6188, 25, 33, 7036, 4672, 353...
output_url = opts.page + '/' + opts.page_rel_path
if opts.page_rel_path: output_url = opts.page + '/' + opts.page_rel_path else: output_url = opts.page + '/'
def plotHistogram(chan,opts,distribution,histoList,binList,figNumber,percentiles=None,candidate=None,candidateRank=None,output=None): parameter = distribution.split('-')[0] step = binList[1] - binList[0] counter = sum(histoList) xlimInf = min(binList) if candidate and not parameter == 'dt': xlimSup = max(max(binList),candidate + 2.0) else: xlimSup = max(binList) figure(figNumber) # semilogy(bins + step/2., z_dist+0.0001, 'r^',markerfacecolor="b",markersize=12) # plot(bins + step/2., z_dist) bar(binList, histoList, width=step, bottom=0) if percentiles: axvline(x=percentiles[0], ymin=0, ymax=max(histoList), color='g', label='50th percentile', linewidth=2, linestyle='--') axvline(x=percentiles[1], ymin=0, ymax=max(histoList), color='m', label='90th percentile', linewidth=2, linestyle='--') axvline(x=percentiles[2], ymin=0, ymax=max(histoList), color='r', label='97th percentile', linewidth=2, linestyle='--') if parameter == 'dt': axvline(x=-percentiles[0], ymin=0, ymax=max(histoList), color='g', label='50th percentile', linewidth=2, linestyle='--') axvline(x=-percentiles[1], ymin=0, ymax=max(histoList), color='m', label='90th percentile', linewidth=2, linestyle='--') axvline(x=-percentiles[2], ymin=0, ymax=max(histoList), color='r', label='97th percentile', linewidth=2, linestyle='--') if candidate: axvline(x=candidate, ymin=0, ymax=max(histoList), color='k', label='candidate value (%s percentile)' % (candidateRank), linewidth=2, linestyle='-') xlim(xlimInf,xlimSup) xlabel(parameter + ' value',size='large') # ylabel(r'#',size='x-large') grid() title("Histogram of the " + parameter + " value for " + chan + ', Statistics = ' + str(counter)) figName = chan.split(':')[0] + '-' + chan.split(':')[1] + '-' + parameter + '-distribution.png' if output: figFileName = output + '/' + figName else: figFileName = opts.output_path + '/' + figName savefig(figFileName) return figName
0f2d88bdd449edd32158857431134c6ffb999051 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/0f2d88bdd449edd32158857431134c6ffb999051/analyseQscan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12874, 12, 7472, 16, 4952, 16, 16279, 16, 11488, 83, 682, 16, 4757, 682, 16, 470, 1854, 16, 8849, 1449, 33, 7036, 16, 19188, 33, 7036, 16, 19188, 12925, 33, 7036, 16, 2844, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12874, 12, 7472, 16, 4952, 16, 16279, 16, 11488, 83, 682, 16, 4757, 682, 16, 470, 1854, 16, 8849, 1449, 33, 7036, 16, 19188, 33, 7036, 16, 19188, 12925, 33, 7036, 16, 2844, 33, ...
headers, 'file:'+file)
headers, urlfile)
def open_local_file(self, url): import mimetypes, mimetools, StringIO mtype = mimetypes.guess_type(url)[0] headers = mimetools.Message(StringIO.StringIO( 'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url) if not host: return addinfourl(open(url2pathname(file), 'rb'), headers, 'file:'+file) host, port = splitport(host) if not port \ and socket.gethostbyname(host) in (localhost(), thishost()): return addinfourl(open(url2pathname(file), 'rb'), headers, 'file:'+file) raise IOError, ('local file error', 'not on local host')
9bdb07b6f6ad9c61c14726dcd6f7082349fe2586 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9bdb07b6f6ad9c61c14726dcd6f7082349fe2586/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1930, 20369, 15180, 16, 20369, 278, 8192, 16, 15777, 22189, 273, 20369, 15180, 18, 20885, 67, 723, 12, 718, 25146, 20, 65, 1607, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1930, 20369, 15180, 16, 20369, 278, 8192, 16, 15777, 22189, 273, 20369, 15180, 18, 20885, 67, 723, 12, 718, 25146, 20, 65, 1607, 273, ...
print "** in _previewStructure, self.struct = ", self.struct print "***self.struct.members ", self.struct.members
def _previewStructure(self): """ Preview the structure and update the previous parameters attr (self.previousParams) @see: self.preview_or_finalize_structure """ #For certain edit commands, it is possible that self.struct is #not created. If so simply return (don't use assert self.struct) ##This is a commented out stub code for the edit controllers ##such as DNAEditCommand which take input from the user before ##creating the struct. TO BE REVISED -- Ninad20071009 #The following code is now used. Need to improve comments and # some refactoring -- Ninad 2007-10-24 if self.struct is None: self.struct = self._createStructure() print "** in _previewStructure, self.struct = ", self.struct print "***self.struct.members ", self.struct.members self.previousParams = self._gatherParameters() return self.win.assy.current_command_info(cmdname = self.cmdname) params = self._gatherParameters() if not same_vals( params, self.previousParams): self._modifyStructure(params) self.logMessage = str(self.cmd + "Previewing " + self.struct.name) self.previousParams = params self.win.assy.changed() self.win.win_update()
a3d4bd53539933fb0562e211a1470618b1789deb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/a3d4bd53539933fb0562e211a1470618b1789deb/EditCommand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12102, 6999, 12, 2890, 4672, 3536, 22289, 326, 3695, 471, 1089, 326, 2416, 1472, 1604, 261, 2890, 18, 11515, 1370, 13, 632, 5946, 30, 365, 18, 12102, 67, 280, 67, 30343, 67, 7627, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12102, 6999, 12, 2890, 4672, 3536, 22289, 326, 3695, 471, 1089, 326, 2416, 1472, 1604, 261, 2890, 18, 11515, 1370, 13, 632, 5946, 30, 365, 18, 12102, 67, 280, 67, 30343, 67, 7627, ...
if cnf is None: return _lst2dict( self.tk.split( self.tk.call(self._w, 'header', 'configure', col))) apply(self.tk.call, (self._w, 'header', 'configure', col) + self._options(cnf, kw))
if cnf is None: return _lst2dict( self.tk.split( self.tk.call(self._w, 'header', 'configure', col))) apply(self.tk.call, (self._w, 'header', 'configure', col) + self._options(cnf, kw))
def header_configure(self, col, cnf={}, **kw):
b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1446, 67, 14895, 12, 2890, 16, 645, 16, 23118, 28793, 2826, 9987, 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, ...
[ 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, 1446, 67, 14895, 12, 2890, 16, 645, 16, 23118, 28793, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
dbaddr = s._home + s._dbName
dbaddr = s._base
def getView(self): self.send_response(200, "@@not sure you're winning yet, actually") self.send_header("Content-type", RDF_MediaType) self.end_headers()
e4ef2ab1dda4edd6758ff396a1c154316ae73725 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/e4ef2ab1dda4edd6758ff396a1c154316ae73725/dbview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8893, 12, 2890, 4672, 365, 18, 4661, 67, 2740, 12, 6976, 16, 8787, 36, 902, 3071, 1846, 4565, 5657, 2093, 4671, 16, 6013, 7923, 365, 18, 4661, 67, 3374, 2932, 1350, 17, 723, 3113, 1353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8893, 12, 2890, 4672, 365, 18, 4661, 67, 2740, 12, 6976, 16, 8787, 36, 902, 3071, 1846, 4565, 5657, 2093, 4671, 16, 6013, 7923, 365, 18, 4661, 67, 3374, 2932, 1350, 17, 723, 3113, 1353...
from spambayes.Options import options
from spambayes.Options import options, get_pathname_option
def bool(val): return not not val
d5ad9ecc648d6b41a9922b1bfababb3e49ac1618 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/d5ad9ecc648d6b41a9922b1bfababb3e49ac1618/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1426, 12, 1125, 4672, 327, 486, 486, 1244, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1426, 12, 1125, 4672, 327, 486, 486, 1244, 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...
for category in pool.get('product.category').browse(cr, uid, categ_ids, context=context):
categories=pool.get('product.category').browse(cr, uid, categ_ids, context=context) categories.sort(lambda x, y : (int(x.parent_id) or 0) - int(y.parent_id)) for category in categories :
def do_export(self, cr, uid, data, context): #=============================================================================== # Init #=============================================================================== categ_new = 0 categ_update = 0 logger = netsvc.Logger() pool = pooler.get_pool(cr.dbname) if data['model'] == 'ir.ui.menu': categ_ids = pool.get('product.category').search(cr, uid, [('exportable','=',True)]) else: categ_ids=[] categ_not=[] for id in data['ids']: exportable_category=pool.get('product.category').search(cr, uid, [('id','=',id),('exportable','=',True)]) if len(exportable_category)==1: categ_ids.append(exportable_category[0]) else : categ_not.append(id) if len(categ_not) > 0: raise wizard.except_wizard("Error", "you asked to export non-exportable categories : IDs %s" % categ_not) #=============================================================================== # Server communication #=============================================================================== magento_web_id=pool.get('magento.web').search(cr,uid,[('magento_id','=',1)]) try: magento_web=pool.get('magento.web').browse(cr,uid,magento_web_id[0]) server = xmlrpclib.ServerProxy("%sindex.php/api/xmlrpc" % magento_web.magento_url) except: raise wizard.except_wizard("UserError", "You must have a declared website with a valid URL, a Magento username and password") try: try: session=server.login(magento_web.api_user, magento_web.api_pwd) except xmlrpclib.Fault,error: raise wizard.except_wizard("MagentoError", "Magento returned %s" % error) except: raise wizard.except_wizard("ConnectionError", "Couldn't connect to Magento with URL %sindex.php/api/xmlrpc" % magento_web.magento_url) #=============================================================================== # Category packaging #=============================================================================== for category in pool.get('product.category').browse(cr, uid, categ_ids, context=context): path='' #construct path magento_parent_id=1 #root catalog if(type(category.parent_id.id)== (int)): #if not root category last_parent=pool.get('product.category').browse(cr, uid, category.parent_id.id) magento_parent_id=last_parent.magento_id path= str(last_parent.magento_id) while(type(last_parent.parent_id.id) == (int)): last_parent=pool.get('product.category').browse(cr, uid, last_parent.parent_id.id) path=str(last_parent.magento_id)+'/'+path path='1/'+path path=path.replace("//","/") if path.endswith('/'): path=path[0:-1] category_data={ 'name' : category.name, 'path' : path, 'is_active' : 1, } #=============================================================================== # Category upload to Magento #=============================================================================== try: if(category.magento_id == 0): new_id=server.call(session,'category.create',[magento_parent_id, category_data]) pool.get('product.category').write_magento_id(cr, uid, category.id, {'magento_id': new_id}) categ_new += 1 else: category_data['path']=category_data['path']+"/"+str(category.magento_id) server.call(session,'category.update',[category.magento_id, category_data]) categ_update += 1 except xmlrpclib.Fault,error: logger.notifyChannel("Magento Export", netsvc.LOG_ERROR, "Magento API return an error on category id %s . Error %s" % (category.id,error)) server.endSession(session) return {'categ_new':categ_new, 'categ_update':categ_update }
cdf6090d877d7411648bc774e4f4277721731471 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/cdf6090d877d7411648bc774e4f4277721731471/magento_category_synchronize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6530, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 225, 468, 9917, 14468, 12275, 468, 225, 4378, 468, 9917, 14468, 12275, 276, 1287, 67, 2704, 273, 374, 276, 1287, 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, 741, 67, 6530, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 225, 468, 9917, 14468, 12275, 468, 225, 4378, 468, 9917, 14468, 12275, 276, 1287, 67, 2704, 273, 374, 276, 1287, 67...
fdel=lambda self: delattr(self, "_comps"))
fdel=lambda self: setattr(self, "_comps", None))
def _getGroups(self): """create the groups object that will store the comps metadata finds the repos with groups, gets their comps data and merge it into the group object""" if self._comps: return self._comps self.verbose_logger.debug('Getting group metadata') reposWithGroups = [] for repo in self.repos.listGroupsEnabled(): if repo.groups_added: # already added the groups from this repo reposWithGroups.append(repo) continue if not repo.ready(): raise Errors.RepoError, "Repository '%s' not yet setup" % repo try: groupremote = repo.getGroupLocation() except Errors.RepoMDError, e: pass else: reposWithGroups.append(repo) # now we know which repos actually have groups files. overwrite = self.conf.overwrite_groups self._comps = comps.Comps(overwrite_groups = overwrite)
8b5338bcd619ce0be5d3762af0205cbe071e8881 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5445/8b5338bcd619ce0be5d3762af0205cbe071e8881/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 3621, 12, 2890, 4672, 3536, 2640, 326, 3252, 733, 716, 903, 1707, 326, 13979, 1982, 13094, 326, 13686, 598, 3252, 16, 5571, 3675, 13979, 501, 471, 2691, 518, 1368, 326, 1041, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 3621, 12, 2890, 4672, 3536, 2640, 326, 3252, 733, 716, 903, 1707, 326, 13979, 1982, 13094, 326, 13686, 598, 3252, 16, 5571, 3675, 13979, 501, 471, 2691, 518, 1368, 326, 1041, 7...
print "clush: %s: exited with exit code %s" % (ns, rc)
print >>sys.stderr, "clush: %s: exited with exit code %s" % (ns, rc)
def ev_close(self, worker): # Worker is closing -- it's time to gather results... if self._runtimer: self._runtimer.eh.finalize(worker.task.info("USER_interactive"))
8d4826c99ac3e77899532cb1f0d53c5830ae09c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11479/8d4826c99ac3e77899532cb1f0d53c5830ae09c2/clush.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2113, 67, 4412, 12, 2890, 16, 4322, 4672, 468, 11016, 353, 7647, 1493, 518, 1807, 813, 358, 11090, 1686, 2777, 309, 365, 6315, 2681, 12542, 30, 365, 6315, 2681, 12542, 18, 73, 76, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2113, 67, 4412, 12, 2890, 16, 4322, 4672, 468, 11016, 353, 7647, 1493, 518, 1807, 813, 358, 11090, 1686, 2777, 309, 365, 6315, 2681, 12542, 30, 365, 6315, 2681, 12542, 18, 73, 76, 18, ...
except EOFError or PickleError or PicklingError:
except (EOFError, cPickle.PickleError, cPickle.PicklingError):
def storeCache(cachePath, data): try: cPickle.dump(data, open(cachePath, 'wb'), 2) except EOFError or PickleError or PicklingError: print " * Could not store cache to %s" % cachePath sys.exit(1)
302cdd602d78cf31bde9fafa5758554628d0229b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/302cdd602d78cf31bde9fafa5758554628d0229b/filetool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 1649, 12, 2493, 743, 16, 501, 4672, 775, 30, 276, 17968, 298, 18, 8481, 12, 892, 16, 1696, 12, 2493, 743, 16, 296, 9464, 19899, 576, 13, 225, 1335, 261, 12706, 668, 16, 276, 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, 1707, 1649, 12, 2493, 743, 16, 501, 4672, 775, 30, 276, 17968, 298, 18, 8481, 12, 892, 16, 1696, 12, 2493, 743, 16, 296, 9464, 19899, 576, 13, 225, 1335, 261, 12706, 668, 16, 276, 17...
if caption == "Minimize":
if caption.startswith("Minimize"):
def launch( self , nsteps, filename = '', caption = "Progress", message = "Calculating...", dflag = 0): """Launch a progress bar dialog and update while a file is being written. nsteps - total steps for the progress bar (final size in bytes of filename) filename - name of file we are waiting for. caption - dialog caption message - text that appears above the progress bar dflag - if True, display duration (in seconds) below progressbar """ self.abort = False filesize = 0 sinc = .1 self.stime = time.time() # This is a temporary fix for bug #490. Mark 050325 if caption == "Minimize": self.progress.hide() else: self.progress.show()
6e1c14795243d66eb59048b7f96f992d0197cf29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/6e1c14795243d66eb59048b7f96f992d0197cf29/ProgressBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8037, 12, 365, 269, 290, 8986, 16, 1544, 273, 10226, 11006, 273, 315, 5491, 3113, 883, 273, 315, 30238, 7070, 16, 302, 6420, 273, 374, 4672, 3536, 9569, 279, 4007, 4653, 6176, 471, 1089,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8037, 12, 365, 269, 290, 8986, 16, 1544, 273, 10226, 11006, 273, 315, 5491, 3113, 883, 273, 315, 30238, 7070, 16, 302, 6420, 273, 374, 4672, 3536, 9569, 279, 4007, 4653, 6176, 471, 1089,...
if object.__name__ == '<lambda>': decl = '<em>lambda</em> ' + argspec[1:-1] else: anchor = clname + '-' + object.__name__ decl = '<a name="%s"\n><strong>%s</strong>%s</a>\n' % ( anchor, object.__name__, argspec) doc = self.markup(getdoc(object), self.preformat, funcs, classes, methods)
if realname == '<lambda>': decl = '<em>lambda</em>' argspec = argspec[1:-1] decl = title + argspec + note doc = self.markup( getdoc(object), self.preformat, funcs, classes, methods)
def docroutine(self, object, funcs={}, classes={}, methods={}, clname=''): """Produce HTML documentation for a function or method object.""" if inspect.ismethod(object): object = object.im_func if inspect.isbuiltin(object): decl = '<a name="%s"><strong>%s</strong>(...)</a>\n' % ( clname + '-' + object.__name__, object.__name__) else: args, varargs, varkw, defaults = inspect.getargspec(object) argspec = inspect.formatargspec( args, varargs, varkw, defaults, formatvalue=self.formatvalue)
37f7b38eb6247564c00c8a355ab12268e8486c4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/37f7b38eb6247564c00c8a355ab12268e8486c4e/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 15630, 28793, 3318, 28793, 2590, 28793, 927, 529, 2218, 11, 4672, 3536, 25884, 3982, 7323, 364, 279, 445, 578, 707, 733, 12123, 309, 5334, 18, 291, 203...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 15630, 28793, 3318, 28793, 2590, 28793, 927, 529, 2218, 11, 4672, 3536, 25884, 3982, 7323, 364, 279, 445, 578, 707, 733, 12123, 309, 5334, 18, 291, 203...
print d1,d2
def write(self, cr, user, ids, vals, context=None): readonly = None for field in vals.copy(): fobj = None if field in self._columns: fobj = self._columns[field] else: fobj = self._inherit_fields[field][2] if not fobj: continue groups = fobj.write
d3b9efd21a394fb4dea0279727775b3e474361af /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d3b9efd21a394fb4dea0279727775b3e474361af/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 17102, 273, 599, 364, 652, 316, 5773, 18, 3530, 13332, 24705, 273, 599, 309, 652, 316, 365, 6315, 5112, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 17102, 273, 599, 364, 652, 316, 5773, 18, 3530, 13332, 24705, 273, 599, 309, 652, 316, 365, 6315, 5112, ...
config.load_theme(struct, TEST_THEME_PATH, "test.ini", defaults)
config.load_gtk_theme(struct, TEST_THEME_PATH, "test.ini", defaults)
def test_load_gtk_scheme(self): struct = config.Struct() config.load_gtk_theme(struct, TEST_THEME_PATH, "test.ini", dict()) expected = {"keyword": "y"} self.assertEquals(struct.color_gtk_scheme, expected)
66ba483684d7b3d922f5b9a6f69301b8c11bfcc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6932/66ba483684d7b3d922f5b9a6f69301b8c11bfcc7/test_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 945, 67, 4521, 79, 67, 9068, 12, 2890, 4672, 1958, 273, 642, 18, 3823, 1435, 642, 18, 945, 67, 4521, 79, 67, 7997, 12, 1697, 16, 22130, 67, 24644, 958, 67, 4211, 16, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 945, 67, 4521, 79, 67, 9068, 12, 2890, 4672, 1958, 273, 642, 18, 3823, 1435, 642, 18, 945, 67, 4521, 79, 67, 7997, 12, 1697, 16, 22130, 67, 24644, 958, 67, 4211, 16, 315, ...
def _dispatch(self, method, params): """Dispatches the XML-RPC method. XML-RPC calls are forwarded to a registered function that matches the called XML-RPC method name. If no such function exists then the call is forwarded to the registered instance, if available. If the registered instance has a _dispatch method then that method will be called with the name of the XML-RPC method and it's parameters as a tuple e.g. instance._dispatch('add',(2,3)) If the registered instance does not have a _dispatch method then the instance will be searched to find a matching method and, if found, will be called. Methods beginning with an '_' are considered private and will not be called by SimpleXMLRPCServer. """ func = None try: func = self.server.funcs[method] except KeyError: if self.server.instance is not None: if hasattr(self.server.instance, '_dispatch'): return self.server.instance._dispatch(method, params) else: try: func = _resolve_dotted_attribute( self.server.instance, method ) except AttributeError: pass if func is not None: return apply(func, params) else: raise Exception('method "%s" is not supported' % method)
def do_POST(self): """Handles the HTTP POST request.
d69663d3009b6718ed3fa27dec800d15c7d4babb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d69663d3009b6718ed3fa27dec800d15c7d4babb/SimpleXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3798, 12, 2890, 4672, 3536, 8788, 326, 2239, 5485, 590, 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, 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, 741, 67, 3798, 12, 2890, 4672, 3536, 8788, 326, 2239, 5485, 590, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
bug_status = ['New','Confirmed','In Progress','Fix Released']
bug_status = ['New','Confirmed','In Progress','Fix Released','Invalid','Incomplete']
def store_bugs(label='',r={},month=''): if label not in r: r[label] = {} r[label][str(date.year)] = {} r[label][str(date.year)][month] = 0 else: if str(date.year) not in r[label]: r[label][str(date.year)] = {} r[label][str(date.year)][month] = 0 else: if month not in r[label][str(date.year)]: r[label][str(date.year)][month] = 0 else: r[label][str(date.year)][month] += 1 return r
93d4ad8d03576fb70b91c53bb038420fb87f00e1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12355/93d4ad8d03576fb70b91c53bb038420fb87f00e1/lp_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 19381, 12, 1925, 2218, 2187, 86, 28793, 7496, 2218, 11, 4672, 309, 1433, 486, 316, 436, 30, 436, 63, 1925, 65, 273, 2618, 436, 63, 1925, 6362, 701, 12, 712, 18, 6874, 25887, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 19381, 12, 1925, 2218, 2187, 86, 28793, 7496, 2218, 11, 4672, 309, 1433, 486, 316, 436, 30, 436, 63, 1925, 65, 273, 2618, 436, 63, 1925, 6362, 701, 12, 712, 18, 6874, 25887, ...
bt.clicked = (hover_bt1_clicked, hv)
bt.clicked = (hover_bt1_clicked, (hv,))
def hover_clicked(obj, event, *args, **kargs): win = elementary.Window("hover", elementary.ELM_WIN_BASIC) win.title_set("Hover") win.autodel_set(True) bg = elementary.Background(win) win.resize_object_add(bg) bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bg.show() bx = elementary.Box(win) win.resize_object_add(bx) bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bx.show() hv = elementary.Hover(win) bt = elementary.Button(win) bt.label_set("Button") bt.clicked = (hover_bt1_clicked, hv) bx.pack_end(bt) bt.show() hv.parent_set(win) hv.target_set(bt) bt = elementary.Button(win) bt.label_set("Popup") hv.content_set("middle", bt) bt.show() bx = elementary.Box(win) ic = elementary.Icon(win) ic.file_set("images/logo_small.png") ic.scale_set(0, 0) bx.pack_end(ic) ic.show() bt = elementary.Button(win) bt.label_set("Top 1") bx.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Top 2") bx.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Top 3") bx.pack_end(bt) bt.show() bx.show() hv.content_set("top", bx) bt = elementary.Button(win) bt.label_set("Bottom") hv.content_set("bottom", bt) bt.show() bt = elementary.Button(win) bt.label_set("Left") hv.content_set("left", bt) bt.show() bt = elementary.Button(win) bt.label_set("Right") hv.content_set("right", bt) bt.show() bg.size_hint_min_set(160, 160) bg.size_hint_max_set(640, 640) win.resize(320, 320) win.show()
dff3caa2ec713908f112c4970120d3d880226170 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12343/dff3caa2ec713908f112c4970120d3d880226170/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15758, 67, 7475, 329, 12, 2603, 16, 871, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 5657, 273, 930, 814, 18, 3829, 2932, 24969, 3113, 930, 814, 18, 2247, 49, 67, 24572, 67, 25642, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15758, 67, 7475, 329, 12, 2603, 16, 871, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 5657, 273, 930, 814, 18, 3829, 2932, 24969, 3113, 930, 814, 18, 2247, 49, 67, 24572, 67, 25642, 13, ...
s += "%s %s\n" % (i, q[i].replace("\n", "\\n"))
s += "%s %s\n" % (i.encode('utf8'), q[i].replace("\n", "\\n"))
def dump(l, f): q = LANG[l+'.py'] s = '' x = q.keys() x.sort() for i in x: s += "%s %s\n" % (i, q[i].replace("\n", "\\n")) fp = file(f, 'w') fp.write(s) fp.close()
4560b615e146086961713e99b5865f199de9a43c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2729/4560b615e146086961713e99b5865f199de9a43c/lang.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 80, 16, 284, 4672, 1043, 273, 19913, 63, 80, 6797, 18, 2074, 3546, 272, 273, 875, 619, 273, 1043, 18, 2452, 1435, 619, 18, 3804, 1435, 364, 277, 316, 619, 30, 272, 1011, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 80, 16, 284, 4672, 1043, 273, 19913, 63, 80, 6797, 18, 2074, 3546, 272, 273, 875, 619, 273, 1043, 18, 2452, 1435, 619, 18, 3804, 1435, 364, 277, 316, 619, 30, 272, 1011, 22...
- ``gens`` - list of generators - ``gap_group`` - a gap permutation group - ``canonicalize`` - bool (default: True), if True
- ``gens`` - list of generators (default: ``None``) - ``gap_group`` - a gap permutation group (default: ``None``) - ``canonicalize`` - bool (default: ``True``); if ``True``,
def __init__(self, gens=None, gap_group=None, canonicalize=True): r""" INPUT: - ``gens`` - list of generators - ``gap_group`` - a gap permutation group - ``canonicalize`` - bool (default: True), if True sort generators and remove duplicates OUTPUT: a permutation group EXAMPLES: We explicitly construct the alternating group on four elements. :: sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(2,3,4), (1,2,3)] sage: A4.__init__([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(2,3,4), (1,2,3)] sage: A4.center() Permutation Group with generators [()] sage: loads(A4.dumps()) == A4 True """ if (gens is None and gap_group is None): raise ValueError, "you must specify gens or gap_group"
6ac30ecf5071d4fb909072e90d2311932d8c2165 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6ac30ecf5071d4fb909072e90d2311932d8c2165/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 773, 33, 7036, 16, 9300, 67, 1655, 33, 7036, 16, 25839, 33, 5510, 4672, 436, 8395, 12943, 30, 282, 300, 225, 12176, 23730, 10335, 300, 666, 434, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 773, 33, 7036, 16, 9300, 67, 1655, 33, 7036, 16, 25839, 33, 5510, 4672, 436, 8395, 12943, 30, 282, 300, 225, 12176, 23730, 10335, 300, 666, 434, 133...
def send (self, data, flags=0):
def send(self, data, flags=0):
def send (self, data, flags=0):
a3d48197605c87f8e6c78819021987edaa65b2ae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/a3d48197605c87f8e6c78819021987edaa65b2ae/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 261, 2890, 16, 501, 16, 2943, 33, 20, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1366, 261, 2890, 16, 501, 16, 2943, 33, 20, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
w = numpy.r_[w, w[::-1]]
w = r_[w, w[::-1]]
def triang(M,sym=1): """The M-point triangular window. """ if M < 1: return Numeric.array([]) if M == 1: return Numeric.ones(1,'d') odd = M % 2 if not sym and not odd: M = M + 1 n = arange(1,int((M+1)/2)+1) if M % 2 == 0: w = (2*n-1.0)/M w = numpy.r_[w, w[::-1]] else: w = 2*n/(M+1.0) w = numpy.r_[w, w[-2::-1]] if not sym and not odd: w = w[:-1] return w
936da8591e6b92539aeda1c0c884ca93d37a2754 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/936da8591e6b92539aeda1c0c884ca93d37a2754/signaltools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6882, 539, 12, 49, 16, 8117, 33, 21, 4672, 3536, 1986, 490, 17, 1153, 6882, 13077, 2742, 18, 3536, 309, 490, 411, 404, 30, 327, 16980, 18, 1126, 3816, 5717, 309, 490, 422, 404, 30, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6882, 539, 12, 49, 16, 8117, 33, 21, 4672, 3536, 1986, 490, 17, 1153, 6882, 13077, 2742, 18, 3536, 309, 490, 411, 404, 30, 327, 16980, 18, 1126, 3816, 5717, 309, 490, 422, 404, 30, 3...
print 'Warning: Can not find an appropriate boost library in %s.' % path print 'Allowed versions are ', ', '.join(versions)
if isDebug: print 'Failed to find the debug version of boost', ' or '.join(versions) else: print 'Failed to find the release version of boost', ' or '.join(versions)
def checkBoostLibraries(conf, libs, lib_paths, inc_paths, versions, isDebug): ''' look for boost libraries libs: library names lib_paths: try these paths for boost libraries inc_paths: try these paths for boost headers versions: supported boost versions isDebug: if true, use debug libraries ''' conf.Message('Checking for boost library %s... ' % ', '.join(libs)) found_lib = False found_inc = False lib_names = [] lib_path = None inc_path = None for path in lib_paths: # direct form: e.g. libboost_iostreams.a # ignore isDebug if False not in [os.path.isfile(os.path.join(path, 'libboost_%s.a' % lib)) for lib in libs]: conf.Result('yes') found_lib = True lib_path = path lib_names = libs break for lib in libs: # get all the libs, then filter for the right library files = glob.glob(os.path.join(path, 'libboost_%s-*.a' % lib)) # check things like libboost_iostreams-gcc-mt-d-1_33_1.a if len(files) > 0: # runtime code includes s,g,y,d,p,n, where we should look for # d,g,y for debug, s,p,n for release lib_files = [] if isDebug: for ver in versions: lib_files += filter(lambda x: re.search('libboost_%s-\w+-mt-[^spn]+-%s.a' % (lib, ver), x), files) else: for ver in versions: lib_files += filter(lambda x: re.search('libboost_%s-\w+-mt-([^dgy]+-)*%s.a' % (lib, ver), x), files) if len(lib_files) == 0: print 'Warning: Can not find an appropriate boost library in %s.' % path print 'Allowed versions are ', ', '.join(versions) for ver in versions: lib_files += filter(lambda x: re.search('libboost_%s-[\w-]+%s.a' % (lib, ver), x), files) if len(lib_files) > 0: print 'Use library %s' % lib_files[0] if len(lib_files) > 0: # get xxx-gcc-1_33_1 from /usr/local/lib/libboost_xxx-gcc-1_33_1.a lib_names.append(lib_files[0].split(os.sep)[-1][3:-2]) if len(lib_names) == len(libs): found_lib = True lib_path = path break if not found_lib: conf.Result('no') return (None, None, None) # check version number in boost/version.hpp def isValidBoostDir(dir): version_file = os.path.join(dir, 'boost', 'version.hpp') if not os.path.isfile(version_file): return False version_file_content = open(version_file).read() version_strings = ['#define BOOST_LIB_VERSION "%s"' % ver for ver in versions] return True in [x in version_file_content for x in version_strings] # check for boost header file for path in inc_paths: if isValidBoostDir(path): inc_path = path found_inc = True else: # check path/boost_1_xx_x/boost dirs = glob.glob(os.path.join(path, 'boost-*')) if len(dirs) > 0 and isValidBoostDir(dirs[0]): inc_path = dirs[0] found_inc = True # return result if found_inc: conf.Result('yes') print 'Using boost libraries', ', '.join(lib_names) return (lib_names, lib_path, inc_path) else: conf.Result('no') return (None, None, None)
cd43719f9600dfc72261ca40a59606ef7b92a2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/cd43719f9600dfc72261ca40a59606ef7b92a2c6/scons_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 26653, 31909, 12, 3923, 16, 15042, 16, 2561, 67, 4481, 16, 7290, 67, 4481, 16, 5244, 16, 4022, 4672, 9163, 2324, 364, 14994, 14732, 15042, 30, 5313, 1257, 2561, 67, 4481, 30, 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, 866, 26653, 31909, 12, 3923, 16, 15042, 16, 2561, 67, 4481, 16, 7290, 67, 4481, 16, 5244, 16, 4022, 4672, 9163, 2324, 364, 14994, 14732, 15042, 30, 5313, 1257, 2561, 67, 4481, 30, 775, ...
if GroupsController.groups[gid]['name'].startswith(GroupsController.configuration.groups.guest_prefix):
if GroupsController.groups[gid]['name'].startswith( GroupsController.configuration.groups.guest_prefix):
def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,adduser.conf} """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6766, 12, 2890, 16, 1034, 67, 1080, 4672, 3536, 4008, 1041, 9484, 603, 3775, 3582, 30, 300, 296, 4299, 3252, 4278, 2405, 1338, 225, 131, 109, 4299, 131, 124, 3252, 261, 3085, 16, 4158, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6766, 12, 2890, 16, 1034, 67, 1080, 4672, 3536, 4008, 1041, 9484, 603, 3775, 3582, 30, 300, 296, 4299, 3252, 4278, 2405, 1338, 225, 131, 109, 4299, 131, 124, 3252, 261, 3085, 16, 4158, ...
self.activeClipboard.put("wcsGuess", afwImage.Wcs(metadata))
self.activeClipboard.put(wcsKey, afwImage.Wcs(metadata))
def process(self): self.activeClipboard = self.inputQueue.getNextDataset() metadataPolicy = self._policy.getPolicy("metadata") datatypePolicy = self._policy.getPolicy("datatype") imageName = self._policy.get("imageName") metadataName = self._policy.get("metadataName") decoratedImage = self.activeClipboard.get(imageName) metadata = decoratedImage.getMetadata()
c93015c3e4a2e1f42e4b79359cff42cb3c8b7e02 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6553/c93015c3e4a2e1f42e4b79359cff42cb3c8b7e02/MetadataStages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 4672, 365, 18, 3535, 15339, 3752, 273, 365, 18, 2630, 3183, 18, 588, 2134, 10656, 1435, 1982, 2582, 273, 365, 6315, 5086, 18, 588, 2582, 2932, 4165, 7923, 11172, 2582, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 4672, 365, 18, 3535, 15339, 3752, 273, 365, 18, 2630, 3183, 18, 588, 2134, 10656, 1435, 1982, 2582, 273, 365, 6315, 5086, 18, 588, 2582, 2932, 4165, 7923, 11172, 2582, 27...
node = node[1].setdefault(segment, [None, {}])
if segment: node = node[1].setdefault(segment, [None, {}])
def component_files(self, element, args): """Format the contents of our <files> tag as a tree with nested lists""" from LibCIA.Web import Template
fbc489a696c91a6b7bde42c67db41ff14b8dbdca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/fbc489a696c91a6b7bde42c67db41ff14b8dbdca/Commit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1794, 67, 2354, 12, 2890, 16, 930, 16, 833, 4672, 3536, 1630, 326, 2939, 434, 3134, 411, 2354, 34, 1047, 487, 279, 2151, 598, 4764, 6035, 8395, 628, 10560, 7266, 37, 18, 4079, 1930, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1794, 67, 2354, 12, 2890, 16, 930, 16, 833, 4672, 3536, 1630, 326, 2939, 434, 3134, 411, 2354, 34, 1047, 487, 279, 2151, 598, 4764, 6035, 8395, 628, 10560, 7266, 37, 18, 4079, 1930, 50...
def file_times(self, paths, depth=100, ignoreprefix='.'):
def file_times(self):
def file_times(self, paths, depth=100, ignoreprefix='.'): """ Return a dict of "filepath: (atime, mtime)" entries for each file in given paths list. "filepath" is the absolute path, "atime" is the access time, "mtime" the modification time. Recurse directories that don't start with ignoreprefix """
24c80eaef07fc9120855d96de23dbb14b5ce3fa8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7381/24c80eaef07fc9120855d96de23dbb14b5ce3fa8/fabricate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 8293, 12, 2890, 4672, 3536, 2000, 279, 2065, 434, 315, 10561, 30, 261, 270, 494, 16, 13158, 2225, 3222, 364, 1517, 585, 316, 864, 2953, 666, 18, 315, 10561, 6, 353, 326, 4967,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 8293, 12, 2890, 4672, 3536, 2000, 279, 2065, 434, 315, 10561, 30, 261, 270, 494, 16, 13158, 2225, 3222, 364, 1517, 585, 316, 864, 2953, 666, 18, 315, 10561, 6, 353, 326, 4967,...
res = diracAPI.getJobInputData(jobs)
res = self.diracAPI.getJobInputData(jobs)
def selectAndSetFileStatus(self,productionID,selectStatus,selectMinorStatus='',site='',setFlag=1,setStatus='Unused',printOutput=False): """ Set status for the given files in the lfns list for production specified by its ID """ if type(productionID)==type(2): productionID=long(productionID) if not type(productionID)==type(long(1)): if not type(productionID) == type(" "): return self.__errorReport('Expected string, long or int for production ID')
507f440b00b2788d18721a3e654b593a8a0cc7e8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/507f440b00b2788d18721a3e654b593a8a0cc7e8/DiracProduction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 13152, 812, 1482, 12, 2890, 16, 17273, 734, 16, 4025, 1482, 16, 4025, 19549, 1482, 2218, 2187, 4256, 2218, 2187, 542, 4678, 33, 21, 16, 542, 1482, 2218, 21106, 2187, 1188, 1447, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 13152, 812, 1482, 12, 2890, 16, 17273, 734, 16, 4025, 1482, 16, 4025, 19549, 1482, 2218, 2187, 4256, 2218, 2187, 542, 4678, 33, 21, 16, 542, 1482, 2218, 21106, 2187, 1188, 1447, 33...
fx.ringmaster.set_clean_status() fx.ringmaster._open_files() fx.ringmaster._initialise_presenter() fx.ringmaster._initialise_terminal_reader() job = fx.ringmaster.get_job()
job = fx.get_job()
def test_get_job(tc): vals = { 'cmdline1' : "", 'cmdline2' : "sing song", } fx = Ringmaster_fixture(tc, simple_ctl.substitute(vals)) fx.ringmaster.set_clean_status() fx.ringmaster._open_files() fx.ringmaster._initialise_presenter() fx.ringmaster._initialise_terminal_reader() job = fx.ringmaster.get_job() tc.assertEqual(job.game_id, "0_000") tc.assertEqual(job.game_data, ("0", 0)) tc.assertEqual(job.board_size, 9) tc.assertEqual(job.komi, 7.5) tc.assertEqual(job.move_limit, 400) tc.assertEqual(job.handicap, None) tc.assertIs(job.handicap_is_free, False) tc.assertIs(job.use_internal_scorer, True) tc.assertEqual(job.sgf_event, 'test') tc.assertIsNone(job.gtp_log_pathname) tc.assertIsNone(job.sgf_filename) tc.assertIsNone(job.sgf_dirname) tc.assertIsNone(job.void_sgf_dirname) tc.assertEqual(job.player_b.code, 'p1') tc.assertEqual(job.player_w.code, 'p2') tc.assertEqual(job.player_b.cmd_args, ['test']) tc.assertEqual(job.player_w.cmd_args, ['test', 'sing', 'song']) tc.assertDictEqual(job.player_b.gtp_translations, {}) tc.assertListEqual(job.player_b.startup_gtp_commands, []) tc.assertEqual(job.player_b.stderr_pathname, os.devnull) tc.assertIsNone(job.player_b.cwd) tc.assertIsNone(job.player_b.environ)
176deadc1d09166df08f052fbb062ced7f80a3b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6121/176deadc1d09166df08f052fbb062ced7f80a3b5/ringmaster_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 67, 4688, 12, 5111, 4672, 5773, 273, 288, 296, 4172, 1369, 21, 11, 294, 23453, 296, 4172, 1369, 22, 11, 294, 315, 2470, 17180, 3113, 289, 12661, 273, 25463, 7525, 67, 90...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 67, 4688, 12, 5111, 4672, 5773, 273, 288, 296, 4172, 1369, 21, 11, 294, 23453, 296, 4172, 1369, 22, 11, 294, 315, 2470, 17180, 3113, 289, 12661, 273, 25463, 7525, 67, 90...
self.initialize(0)
self.initialize(False)
def __init__(self): ScOptions() ScOptions.instance().load()
cdc9cf773cf0c254cf668f14ba48aa9d538724e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6671/cdc9cf773cf0c254cf668f14ba48aa9d538724e6/ScWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2850, 1320, 1435, 2850, 1320, 18, 1336, 7675, 945, 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, 1001, 2738, 972, 12, 2890, 4672, 2850, 1320, 1435, 2850, 1320, 18, 1336, 7675, 945, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
wkf_expr.execute(cursor, ident, workitem, activity)
wkf_expr.execute(cursor, ident, activity)
def _execute(cursor, workitem, activity, ident): "send a signal to parent workflow (signal: subflow.signal_name)" if (workitem['state'] == 'active') and activity['signal_send']: # TODO remove subquery cursor.execute("SELECT i.id, w.osv, i.res_id " \ "FROM wkf_instance i " \ "LEFT JOIN wkf w " \ "ON (i.workflow = w.id) " \ "WHERE i.id in (" \ "SELECT instance FROM wkf_workitem " \ "WHERE subflow = %s)", (workitem['inst_id'],)) for i in cursor.fetchall(): instance.validate(cursor, i[0], (ident[0], i[1], i[2]), activity['signal_send'], force_running=True) if activity['kind'] == 'dummy': if workitem['state'] == 'active': _state_set(cursor, workitem, 'complete') elif activity['kind'] == 'function': if workitem['state'] == 'active': _state_set(cursor, workitem, 'running') wkf_expr.execute(cursor, ident, workitem, activity) _state_set(cursor, workitem, 'complete') elif activity['kind'] == 'stopall': if workitem['state'] == 'active': _state_set(cursor, workitem, 'running') cursor.execute('DELETE FROM wkf_workitem ' \ 'WHERE instance = %s AND id <> %s', (workitem['inst_id'], workitem['id'])) if activity['action']: wkf_expr.execute(cursor, ident, workitem, activity) _state_set(cursor, workitem, 'complete') elif activity['kind'] == 'subflow': if workitem['state'] == 'active': _state_set(cursor, workitem, 'running') if activity.get('action', False): id_new = wkf_expr.execute(cursor, ident, workitem, activity) if not (id_new): cursor.execute('DELETE FROM wkf_workitem ' \ 'WHERE id = %s', (workitem['id'],)) return False assert type(id_new) == type(1) or type(id_new) == type(1L), \ 'Wrong return value: ' + str(id_new) + ' ' + \ str(type(id_new)) cursor.execute('SELECT id FROM wkf_instance ' \ 'WHERE res_id = %s AND workflow = %s', (id_new, activity['subflow_id'])) (id_new,) = cursor.fetchone() else: id_new = instance.create(cursor, ident, activity['subflow_id']) cursor.execute('UPDATE wkf_workitem ' \ 'SET subflow = %s WHERE id = %s', (id_new, workitem['id'])) workitem['subflow_id'] = id_new if workitem['state'] == 'running': cursor.execute("SELECT state FROM wkf_instance " \ "WHERE id = %s", (workitem['subflow_id'],)) (state,) = cursor.fetchone() if state == 'complete': _state_set(cursor, workitem, 'complete') return True
a4976ce20d655020a83ee313abdf699787a1d648 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/a4976ce20d655020a83ee313abdf699787a1d648/workitem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 9216, 16, 26409, 16, 5728, 16, 3390, 4672, 315, 4661, 279, 4277, 358, 982, 6095, 261, 10420, 30, 720, 2426, 18, 10420, 67, 529, 2225, 225, 309, 261, 1252, 1726, 3292, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 9216, 16, 26409, 16, 5728, 16, 3390, 4672, 315, 4661, 279, 4277, 358, 982, 6095, 261, 10420, 30, 720, 2426, 18, 10420, 67, 529, 2225, 225, 309, 261, 1252, 1726, 3292, 20...
notebook.quit_idle_worksheet_processes()
def notebook_idle_check(): notebook.quit_idle_worksheet_processes() global last_idle_time t = walltime() if t > last_idle_time + idle_interval: notebook.save() last_idle_time = t
97e41df74bc11e6a07770a464910d5dad31f5523 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/97e41df74bc11e6a07770a464910d5dad31f5523/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 20390, 67, 1893, 13332, 2552, 1142, 67, 20390, 67, 957, 268, 273, 17662, 957, 1435, 309, 268, 405, 1142, 67, 20390, 67, 957, 397, 12088, 67, 6624, 30, 14718, 18, 5688, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 20390, 67, 1893, 13332, 2552, 1142, 67, 20390, 67, 957, 268, 273, 17662, 957, 1435, 309, 268, 405, 1142, 67, 20390, 67, 957, 397, 12088, 67, 6624, 30, 14718, 18, 5688, 1435, ...
/.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfLargeDataSharing.py --restore=test_profile/__repository__.001
/.../chandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfLargeDataSharing.py --restore=test_profile/__repository__.001
def runSingles(options): """ Run the test(s) specified with the options.single parameter. >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> options.modes = ['release'] >>> options.single = 'ThisTestDoesNotExist' >>> runSingles(options) Test(s) not found False >>> options.modes = ['release', 'debug'] >>> options.single = 'TestCrypto.py' >>> runSingles(options) /.../release/RunPython... application/tests/TestCrypto.py -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /.../debug/RunPython... application/tests/TestCrypto.py -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False >>> options.modes = ['release'] >>> options.single = 'TestAllDayEvent.py' >>> runSingles(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --chandlerTests=TestAllDayEvent -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False >>> options.single = 'PerfLargeDataSharing.py' >>> runSingles(options) /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfLargeDataSharing.py --restore=test_profile/__repository__.001 PerfLargeDataSharing.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> options.single = 'startup_large.py' >>> runSingles(options) Creating repository for startup time tests /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --restore=test_profile/__repository__.001 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /...time... --format=%e -o test_profile/time.log .../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup_with_large_calendar ... ... False >>> options.single = 'TestCrypto.py,TestSchemaAPI.py' >>> runSingles(options) /.../RunPython... application/tests/TestCrypto.py -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /.../RunPython... application/tests/TestSchemaAPI.py -v ... """ failed = False tests = buildTestList(options, False) if not tests: log('Test(s) not found') else: for test in tests: dirname, name = os.path.split(test) if os.path.split(dirname)[1] == 'Functional': if runFuncTest(options, name[:-3]): failed = True elif name.startswith('Perf'): if runPerfTests(options, [test]): failed = True elif name in ('startup', 'startup_large'): if runPerfTests(options, [name]): failed = True else: if runUnitTests(options, [test]): failed = True if failed and not options.noStop: break return failed
2268248f0e4728b63ca1842648cbad866d679472 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/2268248f0e4728b63ca1842648cbad866d679472/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 55, 310, 1040, 12, 2116, 4672, 3536, 1939, 326, 1842, 12, 87, 13, 1269, 598, 326, 702, 18, 7526, 1569, 18, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 55, 310, 1040, 12, 2116, 4672, 3536, 1939, 326, 1842, 12, 87, 13, 1269, 598, 326, 702, 18, 7526, 1569, 18, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, ...
quotepost = Post.objects.get( pk = request.REQUEST['quote'] )
quotepost = get_object_or_404(Post, pk = request.REQUEST['quote'] )
def post(request, group = None, category_id = None, post_id = None, thread_id = None): """ View method to allow users to: - create new threads (post_id and thread_id is None) - reply to threads (post_id is None) - edit posts (post_id is the post which should be edited, thread_id is None) post_id and thread_id can either be passed in by URL (named parameters to this method) or by request.REQUEST parameters. """ if 'type' in request.REQUEST and request.REQUEST['type'] == 'preview': # If user just wants a preview, simply create a dummy post so it can be rendered. previewpost = Post( body = request.REQUEST['body'], markup = request.REQUEST.get('markup', None), ) return HttpResponse( unicode(previewpost.body_escaped()) ) # All available objects should be loaded from the _id variables. post = None thread = None category = None context = { 'bbcodewysiwyg': enable_wysiwyg_editor() \ or (get_sph_setting('board_wysiwyg_testing') \ and request.REQUEST.get('wysiwyg', False)) } if post_id is None and 'post_id' in request.REQUEST: # if no post_id is given take it from the request. post_id = request.REQUEST['post_id'] if post_id is not None: # User wants to edit a post .. try: post = Post.allobjects.get( pk = post_id ) except Post.DoesNotExist: raise Http404 if not post.allowEditing(): raise PermissionDenied() thread = post.thread category = post.category else: # User wants to create a new post (thread or reply) if 'thread' in request.REQUEST: thread_id = request.REQUEST['thread'] if thread_id is not None: # User is posting (replying) to a thread. try: thread = Post.allobjects.get( pk = thread_id ) except Post.DoesNotExist: raise Http404 category = thread.category if not thread.allowPosting( request.user ): raise PermissionDenied() else: # User is creating a new thread. category = get_object_or_404(Category, pk = category_id) if not category.allowPostThread( request.user ): raise PermissionDenied() context['thread'] = thread context['category'] = category category_type = category.get_category_type() MyPostForm = PostForm if category_type is not None: MyPostForm = category_type.get_post_form_class(thread, post) attachmentForm = None attachmentForms = list() allow_attachments = get_sph_setting('board_allow_attachments') allowedattachments = 0 if allow_attachments: allowedattachments = 1 if isinstance(allow_attachments, int): allowedattachments = allow_attachments if request.method == 'POST': postForm = MyPostForm(request.POST) postForm.init_for_category_type(category_type, post) pollForm = PostPollForm(request.POST) create_post = True #if allow_attachments: for i in range(allowedattachments): attachmentForm = PostAttachmentForm(request.POST, request.FILES, prefix = 'attachment%d' % i) attachmentForms.append(attachmentForm) if 'cmd_addfile' in request.POST: create_post = False if attachmentForm.is_valid(): attachment = attachmentForm.save(commit = False) if attachment.fileupload: # Only save attachments if there was an upload... # If the form is valid, store the attachment if not post: # if there is no post yet.. we need to create a draft post = Post( category = category, author = request.user, thread = thread, is_hidden = 1, ) post.set_new( True ) post.save() # Reference the post and save the attachment attachment.post = post attachment.save() if create_post \ and postForm.is_valid() \ and ('createpoll' not in request.POST \ or pollForm.is_valid()): data = postForm.cleaned_data if post: newpost = post newpost.subject = data['subject'] newpost.body = data['body'] # make post visible newpost.is_hidden = 0 if not post.is_new() and category_type.append_edit_message_to_post(post): newpost.body += "\n\n" + _(u'--- Last Edited by %(username)s at %(edit_date)s ---') % {'username':get_user_displayname( request.user ), 'edit_date':format_date( datetime.today())} else: user = request.user.is_authenticated() and request.user or None newpost = Post( category = category, subject = data['subject'], body = data['body'], author = user, thread = thread, ) if 'markup' in data: newpost.markup = data['markup'] elif len( POST_MARKUP_CHOICES ) == 1: newpost.markup = POST_MARKUP_CHOICES[0][0] newpost.save(additional_data = data) #category_type.save_post( newpost, data ) # Creating monitor if request.POST.get( 'addmonitor', False ): newpost.toggle_monitor() if 'createpoll' in request.POST and request.POST['createpoll'] == '1': newpost.set_poll( True ); newpost.save() # Creating poll... polldata = pollForm.cleaned_data newpoll = Poll( post = newpost, question = polldata['question'], choices_per_user = polldata['choicesPerUser']) newpoll.save() choices = polldata['answers'].splitlines() i=0 for choice in choices: pollchoice = PollChoice( poll = newpoll, choice = choice, count = 0, sortorder = i) i+=1 pollchoice.save() if request.user.is_authenticated(): request.user.message_set.create( message = ugettext(u'Vote created successfully.') ) if request.user.is_authenticated(): if post: request.user.message_set.create( message = ugettext(u'Post edited successfully.') ) else: request.user.message_set.create( message = ugettext(u'Post created successfully.') ) if thread == None: thread = newpost return HttpResponseRedirect( newpost.get_absolute_url() ) else: postForm = MyPostForm( ) postForm.init_for_category_type(category_type, post) pollForm = PostPollForm() for i in range(allowedattachments): attachmentForms.append(PostAttachmentForm(prefix = 'attachment%d' % i)) if attachmentForm is None: attachmentForm = attachmentForms[0] if post: postForm.fields['subject'].initial = post.subject postForm.fields['body'].initial = post.body if 'markup' in postForm.fields: postForm.fields['markup'].initial = post.markup context['post'] = post context['thread'] = post.thread or post elif 'quote' in request.REQUEST: quotepost = Post.objects.get( pk = request.REQUEST['quote'] ) postForm.fields['subject'].initial = 'Re: %s' % thread.subject if quotepost.author == None: username = 'anonymous' else: username = quotepost.author.username postForm.fields['body'].initial = '[quote=%s;%s]\n%s\n[/quote]\n' % (username, quotepost.id, quotepost.body) elif thread: postForm.fields['subject'].initial = 'Re: %s' % thread.subject context['form'] = postForm # Only allow polls if this is a new _thread_ (not a reply) if (not thread and not post) or (post and post.is_new() and post.thread is None): context['pollform'] = pollForm context['attachmentForm'] = attachmentForm context['attachmentForms'] = attachmentForms if 'createpoll' in request.REQUEST: context['createpoll'] = request.REQUEST['createpoll'] res = render_to_response( "sphene/sphboard/post.html", context, context_instance = RequestContext(request) ) # Maybe the user is in the 'edit' form, which should not be cached. res.sph_lastmodified = True return res
c9dff689095c0a3ea6e526ad339d208714d92a46 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11563/c9dff689095c0a3ea6e526ad339d208714d92a46/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2293, 16, 1041, 273, 599, 16, 3150, 67, 350, 273, 599, 16, 1603, 67, 350, 273, 599, 16, 2650, 67, 350, 273, 599, 4672, 3536, 4441, 707, 358, 1699, 3677, 358, 30, 300, 752, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2293, 16, 1041, 273, 599, 16, 3150, 67, 350, 273, 599, 16, 1603, 67, 350, 273, 599, 16, 2650, 67, 350, 273, 599, 4672, 3536, 4441, 707, 358, 1699, 3677, 358, 30, 300, 752, ...
'coinc_inspiral.ifos == "', ifos_from_instrument_set(coinc_instruments), '"', ' OR' ])
' coinc_inspiral.ifos == "', ifos_from_instrument_set(coinc_instruments), '"', ' OR' ])
def get_coinc_filters( self ): """ Converts self.coinc_types to a list of strings that can be used in a SQLite WHERE clause to filter coincs by coinc_type, by coinc_instruments (which is stored in the coinc_inspiral table) in instruments_on (which is stored in the experiment table). """ self.coinc_filters = [] # import ifos_from_instrument_set in lsctables for converting # instrument sets in self.coinc_types to strings from glue.ligolw.lsctables import ifos_from_instrument_set # cycle through instruments_on in coinc_types for instruments_on in self.coinc_types: this_coincfilter = '' if instruments_on != 'ALL': this_coincfilter = ''.join([ 'experiment.instruments == "', ifos_from_instrument_set(instruments_on), '"' ]) # now cycle through coinc_instruments in self.coinc_types[ instruments_on ], # concatenate each coinc_instruments set with an OR; # append the concatenated string this_coincfilter with an AND if 'ALL' not in self.coinc_types[ instruments_on ]: this_coincfilter = ' '.join([ this_coincfilter, 'AND (' ]) for coinc_instruments in self.coinc_types[ instruments_on ]: this_coincfilter = ''.join([ this_coincfilter, 'coinc_inspiral.ifos == "', ifos_from_instrument_set(coinc_instruments), '"', ' OR' ]) # strip the last 'OR' and replace with a ')' to close out the coinc_instruments this_coincfilter = this_coincfilter.rstrip('OR') + ')' # if instruments_on is 'ALL', just add what coincs to filter elif instruments_on == 'ALL' and 'ALL' not in self.coinc_types[ instruments_on ]: for coinc_instruments in self.coinc_types[ instruments_on ]: this_coincfilter = ''.join([ this_coincfilter, 'coinc_inspiral.ifos == "', ifos_from_instrument_set(coinc_instruments), '"', ' OR' ]) # strip the last 'OR' this_coincfilter = this_coincfilter.rstrip('OR')
aab6c9de8855f269daec4ed56ee7dcb2eec50efe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/aab6c9de8855f269daec4ed56ee7dcb2eec50efe/ligolw_sqlutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12645, 71, 67, 6348, 12, 365, 262, 30, 3536, 20377, 365, 18, 12645, 71, 67, 2352, 358, 279, 666, 434, 2064, 716, 848, 506, 1399, 316, 279, 16192, 4852, 6591, 358, 1034, 13170,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12645, 71, 67, 6348, 12, 365, 262, 30, 3536, 20377, 365, 18, 12645, 71, 67, 2352, 358, 279, 666, 434, 2064, 716, 848, 506, 1399, 316, 279, 16192, 4852, 6591, 358, 1034, 13170,...
time.sleep(0.5)
time.sleep(0.1)
def waitforcard( self ): """Wait for card insertion and returns a card service.""" AbstractCardRequest.waitforcard( self ) cardfound=False
bd906620dedf29f1dd4a18dfc01ad590122ac8b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3537/bd906620dedf29f1dd4a18dfc01ad590122ac8b1/PCSCCardRequest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 1884, 3327, 12, 365, 262, 30, 3536, 5480, 364, 5270, 12626, 471, 1135, 279, 5270, 1156, 12123, 4115, 6415, 691, 18, 7048, 1884, 3327, 12, 365, 262, 5270, 7015, 33, 8381, 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, 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, 2529, 1884, 3327, 12, 365, 262, 30, 3536, 5480, 364, 5270, 12626, 471, 1135, 279, 5270, 1156, 12123, 4115, 6415, 691, 18, 7048, 1884, 3327, 12, 365, 262, 5270, 7015, 33, 8381, 2, -100, ...
sys.exit(1)
sys.exit( 1 )
def debugMsg( self, msg ): if self.debug: print msg
729f7ec103fc9f6618f9ffcb968b17863321aa57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/729f7ec103fc9f6618f9ffcb968b17863321aa57/dirac-myproxy-upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 3332, 12, 365, 16, 1234, 262, 30, 309, 365, 18, 4148, 30, 1172, 1234, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 3332, 12, 365, 16, 1234, 262, 30, 309, 365, 18, 4148, 30, 1172, 1234, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if self._pool[tid] is txn:
if self._pool.get(tid) is txn:
def suspend(self, txn): tid = thread.get_ident() if self._pool[tid] is txn: self._suspend.add(txn) del self._pool[tid] else: raise TransactionError("txn %s not owned by thread %s" % (txn, tid))
fbc8326d16094b1c5281d42c2bcf4f150c2b854f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fbc8326d16094b1c5281d42c2bcf4f150c2b854f/manager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20413, 12, 2890, 16, 7827, 4672, 11594, 273, 2650, 18, 588, 67, 6392, 1435, 309, 365, 6315, 6011, 18, 588, 12, 18081, 13, 353, 7827, 30, 365, 6315, 87, 18815, 18, 1289, 12, 24790, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20413, 12, 2890, 16, 7827, 4672, 11594, 273, 2650, 18, 588, 67, 6392, 1435, 309, 365, 6315, 6011, 18, 588, 12, 18081, 13, 353, 7827, 30, 365, 6315, 87, 18815, 18, 1289, 12, 24790, 13, ...
strIndex = self._strIndexFromDict(index) return self._getStrIndex(strIndex)
numIndex = self._numIndexFromDict(index) return self._getNumItem(numIndex)
def __getitem__(self, index): """ Overload array-style indexing behaviour. Index can be a string as in PBNT ('1,:,1'), a dictionary of var name:value pairs, or pure numbers as in the standard way of accessing a numarray array array[1,:,1] """ if isinstance(index, types.DictType): strIndex = self._strIndexFromDict(index) return self._getStrIndex(strIndex) if isinstance(index, types.StringType): return self._getStrIndex(index) return self._getNumItem(index)
54fa01170520ca7d21c9970b6c99c295f335a77d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2438/54fa01170520ca7d21c9970b6c99c295f335a77d/bayesnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 770, 4672, 3536, 10752, 945, 526, 17, 4060, 14403, 14273, 18, 225, 3340, 848, 506, 279, 533, 487, 316, 20819, 1784, 7707, 21, 16, 30, 16, 21, 19899, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 770, 4672, 3536, 10752, 945, 526, 17, 4060, 14403, 14273, 18, 225, 3340, 848, 506, 279, 533, 487, 316, 20819, 1784, 7707, 21, 16, 30, 16, 21, 19899, 279...
def _setCcdDetection(self, item, dataId):
def _setCcdDetector(self, item, dataId):
def _setCcdDetection(self, item, dataId): ccdId = self._extractDetectorName(dataId) detector = cameraGeomUtils.findCcd( self.camera, afwCameraGeom.Id(ccdId)) item.setDetector(detector)
28ce54f57ebd75f20aafbe88ca15b06800b37eff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6940/28ce54f57ebd75f20aafbe88ca15b06800b37eff/cfhtMapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 39, 4315, 12594, 12, 2890, 16, 761, 16, 501, 548, 4672, 276, 4315, 548, 273, 365, 6315, 8004, 12594, 461, 12, 892, 548, 13, 13826, 273, 10836, 16972, 1989, 18, 4720, 39, 4315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 39, 4315, 12594, 12, 2890, 16, 761, 16, 501, 548, 4672, 276, 4315, 548, 273, 365, 6315, 8004, 12594, 461, 12, 892, 548, 13, 13826, 273, 10836, 16972, 1989, 18, 4720, 39, 4315...
y = y[0]
try: y = y[0] except IndexError: pass
def local_pow_specialize_device(node): """ This optimization is not the same on all device. We do it only on cpu here. """ if node.op == T.pow: #the idea here is that we have pow(x, y) odtype = node.outputs[0].dtype xsym = node.inputs[0] ysym = node.inputs[1] y = local_mul_canonizer.get_constant(ysym) #the next line is needed to fix a strange case that I don't know how to make a separate test. #That happen in the test_opt.py:test_log_erfc test. #y is a ndarray with dtype int8 and value 2,4 or 6. This make the abs(y) <= 512 fail! #taking the value outside ndarray solve the problem. #it could be that in that case, numpy make the comparaison into the wrong type(do in int8 that overflow.) if isinstance(y,numpy.ndarray): assert y.size==1 y = y[0] if (y is not None) \ and encompasses_broadcastable(xsym.type.broadcastable, ysym.type.broadcastable): rval = None # 512 is too small for the cpu and too big for some gpu! if abs(y)==int(abs(y)) and abs(y) <= 512: pow2 = [xsym] pow2_scal = [theano.scalar.Scalar(xsym.dtype)()] y_to_do = abs(y) for i in range(int(numpy.log2(y_to_do))): pow2.append(T.sqr(pow2[i])) pow2_scal.append(theano.scalar.sqr(pow2_scal[i])) rval1 = None rval1_scal = None while y_to_do>0: log_to_do = int(numpy.log2(y_to_do)) if rval1: rval1 *= pow2[log_to_do] rval1_scal *= pow2_scal[log_to_do] else: rval1 = pow2[log_to_do] rval1_scal = pow2_scal[log_to_do] y_to_do -= 2**log_to_do if abs(y)>2: #We fuse all the pow together here to make compilation faster rval1 = Elemwise(theano.scalar.Composite([pow2_scal[0]],[rval1_scal])).make_node(xsym) if y<0: rval = [T.inv(rval1)] else: rval = [rval1] if rval: rval[0] = T.cast(rval[0], odtype) assert rval[0].type == node.outputs[0].type, (rval, node.outputs) return rval
60f286bcd5076f86226556b9749a4adbc08cd617 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/60f286bcd5076f86226556b9749a4adbc08cd617/opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 23509, 67, 2793, 1710, 67, 5964, 12, 2159, 4672, 3536, 1220, 14850, 353, 486, 326, 1967, 603, 777, 2346, 18, 1660, 741, 518, 1338, 603, 8326, 2674, 18, 3536, 309, 756, 18, 55...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 23509, 67, 2793, 1710, 67, 5964, 12, 2159, 4672, 3536, 1220, 14850, 353, 486, 326, 1967, 603, 777, 2346, 18, 1660, 741, 518, 1338, 603, 8326, 2674, 18, 3536, 309, 756, 18, 55...
name = self.item.filename name = item.label
name = item.media.label
def imdb_get_disc_searchstring(self, item): name = self.item.filename name = item.label name = re.sub('([a-z])([A-Z])', point_maker, name) name = re.sub('([a-zA-Z])([0-9])', point_maker, name) name = re.sub('([0-9])([a-zA-Z])', point_maker, name.lower())
8cd928f1d2c18deeeedb5e299afe9f3670dbfc88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/8cd928f1d2c18deeeedb5e299afe9f3670dbfc88/imdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 709, 1966, 67, 588, 67, 2251, 71, 67, 3072, 1080, 12, 2890, 16, 761, 4672, 508, 225, 273, 761, 18, 5829, 18, 1925, 508, 225, 273, 283, 18, 1717, 2668, 3816, 69, 17, 94, 5717, 3816, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 709, 1966, 67, 588, 67, 2251, 71, 67, 3072, 1080, 12, 2890, 16, 761, 4672, 508, 225, 273, 761, 18, 5829, 18, 1925, 508, 225, 273, 283, 18, 1717, 2668, 3816, 69, 17, 94, 5717, 3816, ...
print "DTV: Scraping YouTube URL: %s" % url
def _scrapeYouTubeURL(url): print "DTV: Scraping YouTube URL: %s" % url videoIDPattern = re.compile('\?video_id=([^&]+)') paramPattern = re.compile('&t=([^&?]+)') scrapedURL = None try: status = 0 while status != 200: components = list(urlparse.urlsplit(url)) http = httplib.HTTPConnection(components[1]) http.request('HEAD', "%s?%s" % (components[2], components[3])) response = http.getresponse() status = response.status if status in (301, 302, 303, 307): location = response.getheader('location') if location.startswith('http://'): url = location else: components[2] = location url = urlparse.urlunsplit(components) elif status == 200: videoID = videoIDPattern.search(url).group(1) tParam = paramPattern.search(url).group(1) scrapedURL = "http://youtube.com/get_video.php?video_id=%s&t=%s" % (videoID, tParam) else: print "DTV: WARNING, unsupported HTTP status code %d" % status raise except: print "DTV: WARNING, unable to scrape YouTube URL: %s" % url return scrapedURL
c980f28dd98a04229130c4e558f3dcb36091b10f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/c980f28dd98a04229130c4e558f3dcb36091b10f/flashscraper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1017, 25360, 6225, 27195, 1785, 12, 718, 4672, 6191, 734, 3234, 273, 283, 18, 11100, 2668, 64, 35, 9115, 67, 350, 33, 8178, 10, 3737, 2506, 13, 579, 3234, 273, 283, 18, 11100, 266...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1017, 25360, 6225, 27195, 1785, 12, 718, 4672, 6191, 734, 3234, 273, 283, 18, 11100, 2668, 64, 35, 9115, 67, 350, 33, 8178, 10, 3737, 2506, 13, 579, 3234, 273, 283, 18, 11100, 266...
totlist |= condlist
totlist |= condlist[k]
def piecewise(x, condlist, funclist, *args, **kw): """Return a piecewise-defined function. x is the domain condlist is a list of boolean arrays or a single boolean array The length of the condition list must be n2 or n2-1 where n2 is the length of the function list. If len(condlist)==n2-1, then an 'otherwise' condition is formed by |'ing all the conditions and inverting. funclist is a list of functions to call of length (n2). Each function should return an array output for an array input Each function can take (the same set) of extra arguments and keyword arguments which are passed in after the function list. A constant may be used in funclist for a function that returns a constant (e.g. val and lambda x: val are equivalent in a funclist). The output is the same shape and type as x and is found by calling the functions on the appropriate portions of x. Note: This is similar to choose or select, except the the functions are only evaluated on elements of x that satisfy the corresponding condition. The result is |-- | f1(x) for condition1 y = --| f2(x) for condition2 | ... | fn(x) for conditionn |-- """ x = asanyarray(x) n2 = len(funclist) if not isinstance(condlist, type([])): condlist = [condlist] n = len(condlist) if n == n2-1: # compute the "otherwise" condition. totlist = condlist[0] for k in range(1, n): totlist |= condlist condlist.append(~totlist) n += 1 if (n != n2): raise ValueError, "function list and condition list must be the same" y = empty(x.shape, x.dtype) for k in range(n): item = funclist[k] if not callable(item): y[condlist[k]] = item else: y[condlist[k]] = item(x[condlist[k]], *args, **kw) return y
6627d4e993df8033d5e078f24d84cb028ba09d0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/6627d4e993df8033d5e078f24d84cb028ba09d0c/function_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11151, 2460, 12, 92, 16, 6941, 1098, 16, 1326, 1098, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 990, 279, 11151, 2460, 17, 2178, 445, 18, 225, 619, 353, 326, 2461, 225, 6941, 1098, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11151, 2460, 12, 92, 16, 6941, 1098, 16, 1326, 1098, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 990, 279, 11151, 2460, 17, 2178, 445, 18, 225, 619, 353, 326, 2461, 225, 6941, 1098, 353...
autotrace_font (basename, metric, glyph_range, encoding, magnification)
if not gf_fontname: base = gen_pixel_font (basename, metric, magnification) gf_fontname = base + 'gf' autotrace_font (basename, gf_fontname, metric, glyph_range, encoding, magnification)
def __getitem__ (self, key): return self.__dict__[key]
6261a7b0062c0861bc1125b26df3ac4d557024b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11856/6261a7b0062c0861bc1125b26df3ac4d557024b5/mftrace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 261, 2890, 16, 498, 4672, 327, 365, 16186, 1576, 972, 63, 856, 65, 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, 1001, 31571, 972, 261, 2890, 16, 498, 4672, 327, 365, 16186, 1576, 972, 63, 856, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
n = self.__g().num_edges()
n = self.__g()._Graph__graph.GetMaxEdgeIndex() + 1
def get_array(self): """Get an array with property values.
2baba488250af2c470829e18dcc89ffe896c04bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3516/2baba488250af2c470829e18dcc89ffe896c04bc/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1126, 12, 2890, 4672, 3536, 967, 392, 526, 598, 1272, 924, 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, 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, 336, 67, 1126, 12, 2890, 4672, 3536, 967, 392, 526, 598, 1272, 924, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
for sv in self._slice_viewers:
for sv in self.sync_slice_viewers.slice_viewers:
def _handler_slice2(self, e): for sv in self._slice_viewers: if e.IsChecked(): sv.activate_slice(1) else: sv.deactivate_slice(1)
5661425e274bfe75c0b12a364a539d75d273e068 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4494/5661425e274bfe75c0b12a364a539d75d273e068/CoMedI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4176, 67, 6665, 22, 12, 2890, 16, 425, 4672, 364, 5893, 316, 365, 18, 8389, 67, 6665, 67, 1945, 414, 18, 6665, 67, 1945, 414, 30, 309, 425, 18, 2520, 11454, 13332, 5893, 18, 100...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4176, 67, 6665, 22, 12, 2890, 16, 425, 4672, 364, 5893, 316, 365, 18, 8389, 67, 6665, 67, 1945, 414, 18, 6665, 67, 1945, 414, 30, 309, 425, 18, 2520, 11454, 13332, 5893, 18, 100...
if discount: total = Decimal('0.00')
total = Decimal('0.00')
def untaxed_discount_cart_total(cart, discount): """Returns the discounted total for this cart""" if discount: total = Decimal('0.00') for item in cart: total += untaxed_discount_line_total(item, discount) else: total = cart.total return total
fe32b754d38950cdd9305997818507102cf06fec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/171/fe32b754d38950cdd9305997818507102cf06fec/satchmo_discounts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 8066, 329, 67, 23650, 67, 11848, 67, 4963, 12, 11848, 16, 12137, 4672, 3536, 1356, 326, 12137, 329, 2078, 364, 333, 7035, 8395, 2078, 273, 11322, 2668, 20, 18, 713, 6134, 225, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 8066, 329, 67, 23650, 67, 11848, 67, 4963, 12, 11848, 16, 12137, 4672, 3536, 1356, 326, 12137, 329, 2078, 364, 333, 7035, 8395, 2078, 273, 11322, 2668, 20, 18, 713, 6134, 225, 364, ...
def historical(self,startdate='Jan+1,+1990'):
def google(self,startdate='Jan+1,+1900',enddate=date.today().strftime("%b+%d,+%Y"), histperiod='daily'):
def historical(self,startdate='Jan+1,+1990'): """ Return an immutable sequence of historical price data for this stock, obtained from Google.
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, 5200, 12, 2890, 16, 1937, 712, 2218, 46, 304, 15, 21, 16, 15, 3657, 713, 2187, 409, 712, 33, 712, 18, 30064, 7675, 701, 9982, 27188, 70, 15, 9, 72, 16, 15, 9, 61, 6, 3631, 5356, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5200, 12, 2890, 16, 1937, 712, 2218, 46, 304, 15, 21, 16, 15, 3657, 713, 2187, 409, 712, 33, 712, 18, 30064, 7675, 701, 9982, 27188, 70, 15, 9, 72, 16, 15, 9, 61, 6, 3631, 5356, ...
print "Reporting new bugs"
def reportnewbugs(self,irc): # Compile list of bugs print "Reporting new bugs" tracker = self.db['malone'] bugs = {} sc = imaplib.IMAP4_SSL(imap_server) sc.login(imap_user, imap_password) sc.select('INBOX') new_mail = sc.search(None, '(UNSEEN)')[1][0].split()[:20] for m in new_mail: print "Loading %s" % m msg = sc.fetch(m, 'RFC822')[1][0][1] #print msg fp = email.FeedParser.FeedParser() fp.feed(msg) bug = fp.close() #print "Mail parsed" # Determine bug number, component and tag try: id = int(bug['Reply-To'].split()[1]) except: continue tag = bug['Delivered-To'] tag = tag[tag.find('+')+1:tag.find('@')] component = bug['X-Launchpad-Bug'] if 'component' in component: component = component[component.find('component=')+10:] component = component[:component.find(';')].replace('None','') else: component = '' if tag not in bugs: bugs[tag] = {} #print "Data extracted" if id not in bugs[tag]: try: os.makedirs(os.path.join(bugreporter_base,tag,str(int(id/1000)))) except: pass print os.path.join(bugreporter_base,tag,str(int(id/1000)),str(id)) if id > 58184 and not os.path.exists(os.path.join(bugreporter_base,tag,str(int(id/1000)),str(id))): print "New bug: %d" % id fd2 = open(os.path.join(bugreporter_base,tag,str(int(id/1000)),str(id)),'w') fd2.close() try: if component: bugs[tag][id] = self.get_bug(tracker, id, False)[0].replace('"','(%s) "' % component, 1) else: bugs[tag][id] = self.get_bug(tracker, id, False)[0] except: print "Cannot get bug %d" % id for c in irc.state.channels: tag = self.registryValue('bugReporter', channel=c) if not tag: continue if tag not in bugs.keys(): print "No new bugs in %s" % tag continue print "New bugs in %s (%s): %s" % (c, tag, str(bugs[tag].keys())) for b in sorted(bugs[tag].keys()): irc.queueMsg(ircmsgs.privmsg(c,'New bug: #%s' % bugs[tag][b][bugs[tag][b].find('bug ')+4:]))
a1873865d09620ddbd225087a2af830e9d31df4a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3104/a1873865d09620ddbd225087a2af830e9d31df4a/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 2704, 19381, 12, 2890, 16, 481, 71, 4672, 468, 16143, 666, 434, 22398, 9745, 273, 365, 18, 1966, 3292, 81, 12451, 3546, 22398, 273, 2618, 888, 273, 709, 69, 6673, 18, 3445, 2203, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 2704, 19381, 12, 2890, 16, 481, 71, 4672, 468, 16143, 666, 434, 22398, 9745, 273, 365, 18, 1966, 3292, 81, 12451, 3546, 22398, 273, 2618, 888, 273, 709, 69, 6673, 18, 3445, 2203, ...
{'bag':'Defined to be 3 bushels.\nApproximately equal to 0.10572 cubic meters.', 'barrel':'Defined to be 42 gallons.\nApproximately equal to 0.15899 cubic meters.', 'board_foot':'Defined to be 144 cubic inches.\nApproximately equal to 0.0023597 cubic meters.', 'bucket':'Defined to be 4 gallons.\nApproximately equal to 0.0151416 cubic meters.', 'bushel':'Defined to be 2150.42 cubic inches.\nEquivalent to 4 pecks.\nApproximately equal to 0.035239 cubic meters.', 'butt':'Old English unit of wine casks defined to be 2 hogsheads or 126 gallons.\nApproximately equal to 0.476962 cubic meters.', 'cord':'Defined to be 8 feet x 8 feet x 4 feet.\nApproximately equal to 3.624556 cubic meters.', 'cubic_meter':'SI derived unit of volume.\nDefined to be meter^3.', 'cup':'Defined to be 8 fluid ounces.\nApproximately equal to 0.000236588 cubic meters.', 'ephah':'Ancient Hebrew unit of volume equal to 10 omers.\nApproximately equal to 0.03964 cubic meters.', 'fifth':'Defined to be 1/5 of a gallon.\nApproximately equal to 0.00075708 cubic meters.', 'firkin':'Defined to be 9 imperial gallons.\nApproximately equal to 0.04091 cubic meters.', 'fluid_dram':'Defined to be 1/8 of a fluid ounce.\nApproximately equal to 3.69669*10^-6 cubic meters.', 'fluid_ounce':'Defined to be 1/128 of a gallon.\nApproximately equal to 0.000029574 cubic meters.', 'gallon':'Defined to be 231 cubic inches.\nApproximately equal to 0.0037854 cubic meters.', 'gill':'Defined to be 4 fluid ounces.\nApproximately equal to 0.00011829 cubic meters.', 'hogshead':'Old English unit of wine casks defined to be 63 gallons.\nApproximately equal to 0.23848 cubic meters.', 'imperial_gallon':'Defined to be 4.54609 liters.\nEqual to 0.00454609 cubic meters.', 'imperial_pint':'Defined to be 1/8 of an imperial gallon.\nApproximately equal to 0.00056826 cubic meters.', 'jeroboam':'Defined to be 4/5 of a gallon.\nApproximately equal to 0.0030283 cubic meters.', 'jigger':'Defined to be 1 1/2 fluid ounces.\nApproximately equal to 0.00004436 cubic meters.', 'liter':'Defined to be 1 decimeter^3.\nEqual to 1/1000 of a cubic meter.', 'magnum':'Defined to be 1/2 a gallon.\nApproximately equal to 0.0018927 cubic meters.', 'minim':'Defined to be 1/480 of a fluid ounce.\nApproximately equal to 6.16115*10^-8 cubic meters.', 'noggin':'Equivalent to gill.\nDefined to be 4 fluid ounces.\nApproximately equal to 0.00011829 cubic meters.', 'omer':'Ancient Hebrew unit of volume equal to 9/20 of a peck.\nApproximately equal to 0.0039644 cubic meters.', 'peck':'Defined to be 1/4 of a bushel.\nApproximately equal to 0.0088098 cubic meters.', 'pint':'Defined to be 1/8 of a gallon.\nApproximately equal to 0.00047318 cubic meters.', 'pony':'Defined to be 3/4 of a fluid ounce.\nApproximately equal to 0.00002218 cubic meters.', 'puncheon':'Old English unit of wine casks defined to be 84 gallons.\nApproximately equal to 0.31797 cubic meters.', 'quart':'Defined to be 1/4 of a gallon.\nApproximately equal to 0.00094635 cubic meters.', 'register_ton':'Defined to be 100 cubic feet.\nApproximately equal to 2.83168 cubic meters.', 'seam':'Defined to be 8 bushels.\nApproximately equal to 0.281913 cubic meters.', 'shot':'Defined to be 1 fluid ounce.\nApproximately equal to 0.000029574 cubic meters.', 'stere':'Equivalent to cubic meter.', 'tablespoon':'Defined to be 1/2 of a fluid ounce.\nApproximately equal to 0.000014787 cubic meters.', 'teaspoon':'Defined to be 1/6 of a fluid ounce.\nEqual to 1/3 of a tablespoon.\nApproximately equal to 4.9289*10^-6 cubic meters.', 'tun':'Old English unit of wine casks defined to be 252 gallons.\nApproximately equal to 0.95392 cubic meters.', 'uk_gallon':'Equivalent to an imperial gallon.\nEqual to 0.00454609 cubic meters.', 'uk_pint':'Equivalent to and imperial pint.\nApproximately equal to 0.00056826 cubic meters.', 'wine_bottle':'Defined to be 750 milliliters.\nEqual to 0.00075 cubic meters.'}
{'bag':'Defined to be 3 bushels.\nApproximately equal to 0.10572 cubic meters.', 'barrel':'Defined to be 42 gallons.\nApproximately equal to 0.15899 cubic meters.', 'board_foot':'Defined to be 144 cubic inches.\nApproximately equal to 0.0023597 cubic meters.', 'bucket':'Defined to be 4 gallons.\nApproximately equal to 0.0151416 cubic meters.', 'bushel':'Defined to be 2150.42 cubic inches.\nEquivalent to 4 pecks.\nApproximately equal to 0.035239 cubic meters.', 'butt':'Old English unit of wine casks defined to be 2 hogsheads or 126 gallons.\nApproximately equal to 0.476962 cubic meters.', 'cord':'Defined to be 8 feet x 8 feet x 4 feet.\nApproximately equal to 3.624556 cubic meters.', 'cubic_meter':'SI derived unit of volume.\nDefined to be meter^3.', 'cup':'Defined to be 8 fluid ounces.\nApproximately equal to 0.000236588 cubic meters.', 'ephah':'Ancient Hebrew unit of volume equal to 10 omers.\nApproximately equal to 0.03964 cubic meters.', 'fifth':'Defined to be 1/5 of a gallon.\nApproximately equal to 0.00075708 cubic meters.', 'firkin':'Defined to be 9 imperial gallons.\nApproximately equal to 0.04091 cubic meters.', 'fluid_dram':'Defined to be 1/8 of a fluid ounce.\nApproximately equal to 3.69669*10^-6 cubic meters.', 'fluid_ounce':'Defined to be 1/128 of a gallon.\nApproximately equal to 0.000029574 cubic meters.', 'gallon':'Defined to be 231 cubic inches.\nApproximately equal to 0.0037854 cubic meters.', 'gill':'Defined to be 4 fluid ounces.\nApproximately equal to 0.00011829 cubic meters.', 'hogshead':'Old English unit of wine casks defined to be 63 gallons.\nApproximately equal to 0.23848 cubic meters.', 'imperial_gallon':'Defined to be 4.54609 liters.\nEqual to 0.00454609 cubic meters.', 'imperial_pint':'Defined to be 1/8 of an imperial gallon.\nApproximately equal to 0.00056826 cubic meters.', 'jeroboam':'Defined to be 4/5 of a gallon.\nApproximately equal to 0.0030283 cubic meters.', 'jigger':'Defined to be 1 1/2 fluid ounces.\nApproximately equal to 0.00004436 cubic meters.', 'liter':'Defined to be 1 decimeter^3.\nEqual to 1/1000 of a cubic meter.', 'magnum':'Defined to be 1/2 a gallon.\nApproximately equal to 0.0018927 cubic meters.', 'minim':'Defined to be 1/480 of a fluid ounce.\nApproximately equal to 6.16115*10^-8 cubic meters.', 'noggin':'Equivalent to gill.\nDefined to be 4 fluid ounces.\nApproximately equal to 0.00011829 cubic meters.', 'omer':'Ancient Hebrew unit of volume equal to 9/20 of a peck.\nApproximately equal to 0.0039644 cubic meters.', 'peck':'Defined to be 1/4 of a bushel.\nApproximately equal to 0.0088098 cubic meters.', 'pint':'Defined to be 1/8 of a gallon.\nApproximately equal to 0.00047318 cubic meters.', 'pony':'Defined to be 3/4 of a fluid ounce.\nApproximately equal to 0.00002218 cubic meters.', 'puncheon':'Old English unit of wine casks defined to be 84 gallons.\nApproximately equal to 0.31797 cubic meters.', 'quart':'Defined to be 1/4 of a gallon.\nApproximately equal to 0.00094635 cubic meters.', 'register_ton':'Defined to be 100 cubic feet.\nApproximately equal to 2.83168 cubic meters.', 'seam':'Defined to be 8 bushels.\nApproximately equal to 0.281913 cubic meters.', 'shot':'Defined to be 1 fluid ounce.\nApproximately equal to 0.000029574 cubic meters.', 'stere':'Equivalent to cubic meter.', 'tablespoon':'Defined to be 1/2 of a fluid ounce.\nApproximately equal to 0.000014787 cubic meters.', 'teaspoon':'Defined to be 1/6 of a fluid ounce.\nEqual to 1/3 of a tablespoon.\nApproximately equal to 4.9289*10^-6 cubic meters.', 'tun':'Old English unit of wine casks defined to be 252 gallons.\nApproximately equal to 0.95392 cubic meters.', 'uk_gallon':'Equivalent to an imperial gallon.\nEqual to 0.00454609 cubic meters.', 'uk_pint':'Equivalent to and imperial pint.\nApproximately equal to 0.00056826 cubic meters.', 'wine_bottle':'Defined to be 750 milliliters.\nEqual to 0.00075 cubic meters.'}
def evalunitdict(): """ Replace all the string values of the unitdict variable by their evaluated forms, and builds some other tables for ease of use. This function is mainly used internally, for efficiency (and flexibility) purposes, making it easier to describe the units. EXAMPLES:: sage: sage.symbolic.units.evalunitdict() """ from sage.misc.all import sage_eval for key, value in unitdict.iteritems(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.iteritems()]) # FEATURE IDEA: create a function that would allow users to add # new entries to the table without having to know anything about # how the table is stored internally. # # Format the table for easier use. # for k, v in unitdict.iteritems(): for a in v: unit_to_type[a] = k for w in unitdict.iterkeys(): for j in unitdict[w].iterkeys(): if type(unitdict[w][j]) == tuple: unitdict[w][j] = unitdict[w][j][0] value_to_unit[w] = dict(zip(unitdict[w].itervalues(), unitdict[w].iterkeys()))
ed891e5784edd8a5e4d544f1ef837edc82b93924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ed891e5784edd8a5e4d544f1ef837edc82b93924/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
return VideoDisplay.controller.rootView
return self.controller.rootView
def getView(self): return VideoDisplay.controller.rootView
026b23ece9ce4bc539dec6ff0c611972b67f2403 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/026b23ece9ce4bc539dec6ff0c611972b67f2403/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8893, 12, 2890, 4672, 327, 14030, 4236, 18, 5723, 18, 3085, 1767, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8893, 12, 2890, 4672, 327, 14030, 4236, 18, 5723, 18, 3085, 1767, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
DebugPrint(0, "Badly formed XML in " + xmlFilename + ": no UserIdentity block") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue elif len(UserIdentityNodes) > 1: DebugPrint(0, "Badly formed XML in " + xmlFilename + ": too many UserIdentity blocks") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue [VOName, ReportableVOName] = \ CheckAndExtendUserIdentity(xmlDoc, UserIdentityNodes[0], namespace, prefix)
[jobIdType, jobId] = FindBestJobId(usageRecord, namespace, prefix) DebugPrint(0, "Warning: no UserIdentity block in " + jobIdType + " " + jobId + "(" + xmlFilename + ")") else: if len(UserIdentityNodes) > 1: [jobIdType, jobId] = FindBestJobId(usageRecord, namespace, prefix) DebugPrint(0, "Warning: too many UserIdentity blocks in " + jobIdType + " " + jobId + "(" + xmlFilename + "): too many UserIdentity blocks") [VOName, ReportableVOName] = \ CheckAndExtendUserIdentity(xmlDoc, UserIdentityNodes[0], namespace, prefix)
def SendXMLFiles(fileDir, removeOriginal = False, resourceType = None): global Config global failedSendCount global suppressedCount global successfulSendCount path = os.path.join(fileDir, "*") files = glob.glob(path) responseString = "" for xmlFilename in files: DebugPrint(0, "***********************************************************") DebugPrint(1,"xmlFilename: ",xmlFilename) if (failedSendCount + len(OutstandingRecord)) >= Config.get_MaxPendingFiles(): responseString = "Fatal Error: too many pending files" DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString # Open the XML file xmlDoc = xml.dom.minidom.parse(xmlFilename) if not xmlDoc: DebugPrint(0, "Unable to parse XML in file " + xmlFilename) xmlDoc.unlink() continue xmlDoc.normalize() # Local namespace namespace = xmlDoc.documentElement.namespaceURI # Loop over (posibly multiple) jobUsageRecords for usageRecord in getUsageRecords(xmlDoc): # Local prefix, if any prefix = "" for child in usageRecord.childNodes: if child.nodeType == xml.dom.minidom.Node.ELEMENT_NODE and \ child.prefix: prefix = child.prefix + ":" break # ProbeName and SiteName? ProbeNameNodes = usageRecord.getElementsByTagNameNS(namespace, 'ProbeName') if not ProbeNameNodes: node = xmlDoc.createElementNS(namespace, prefix + 'ProbeName') textNode = xmlDoc.createTextNode(Config.get_MeterName()) node.appendChild(textNode) usageRecord.appendChild(node) elif len(ProbeNameNodes) > 1: DebugPrint(0, "Badly formed XML in " + xmlFilename + ": too many ProbeName entities") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue SiteNameNodes = usageRecord.getElementsByTagNameNS(namespace, 'SiteName') if not SiteNameNodes: node = xmlDoc.createElementNS(namespace, prefix + 'SiteName') textNode = xmlDoc.createTextNode(Config.get_SiteName()) node.appendChild(textNode) usageRecord.appendChild(node) elif len(SiteNameNodes) > 1: DebugPrint(0, "Badly formed XML in " + xmlFilename + ": too many SiteName entities") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue # VOName, ReportableVOName UserIdentityNodes = usageRecord.getElementsByTagNameNS(namespace, 'UserIdentity') if not UserIdentityNodes: DebugPrint(0, "Badly formed XML in " + xmlFilename + ": no UserIdentity block") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue elif len(UserIdentityNodes) > 1: DebugPrint(0, "Badly formed XML in " + xmlFilename + ": too many UserIdentity blocks") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue [VOName, ReportableVOName] = \ CheckAndExtendUserIdentity(xmlDoc, UserIdentityNodes[0], namespace, prefix) # If we are trying to handle only GRID jobs, suppress records # with a null or unknown VOName if Config.get_SuppressUnknownVORecords() and \ ((not VOName) or VOName == "Unknown"): [jobIdType, jobId] = FindBestJobId(usageRecord, namespace, prefix) DebugPrint(0, "Suppressing record with " + jobIdType + " " + jobId + "due to unknown or null VOName") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue # Add ResourceType if appropriate if resourceType != None: UpdateResource(xmlDoc, usageRecord, namespace, prefix, 'ResourceType', resourceType) if not len(getUsageRecords(xmlDoc)): xmlDoc.unlink() DebugPrint(0, "No unsuppressed usage records in " + \ xmlFilename + ": not sending") suppressedCount += 1 continue # Generate the XML xmlData = safeEncodeXML(xmlDoc) # Close and clean up the document xmlDoc.unlink() # Open the back up file # fill the back up file dirIndex = 0 recordIndex = 0 success = False ind = 0 f = 0 while not success: (f,dirIndex,recordIndex) = OpenNewRecordFile(dirIndex,recordIndex) DebugPrint(1,"Will save in the record in:",f.name) DebugPrint(3,"DirIndex=",dirIndex," RecordIndex=",recordIndex) if f.name == "<stdout>": responseString = "Fatal Error: unable to save record prior to send attempt" DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString else: try: for line in xmlData: f.write(line) f.flush() if f.tell() > 0: success = True DebugPrint(3,"suceeded to fill: ",f.name) else: DebugPrint(0,"failed to fill: ",f.name) if f.name != "<stdout>": os.remove(f.name) except: DebugPrint(0,"failed to fill with exception: ",f.name,"--", sys.exc_info(),"--",sys.exc_info()[0],"++",sys.exc_info()[1]) if f.name != "<stdout>": os.remove(f.name) if removeOriginal and f.name != "<stdout>": os.remove(xmlFilename) DebugPrint(0, 'Saved record to ' + f.name) # Currently, the recordXml is in a list format, with each # item being a line of xml. The collector web service # requires the xml to be sent as a string. This logic here # turns the xml list into a single xml string. usageXmlString = "" for line in xmlData: usageXmlString = usageXmlString + line DebugPrint(3, 'UsageXml: ' + usageXmlString) # Attempt to send the record to the collector response = __sendUsageXML(Config.get_MeterName(), usageXmlString) DebugPrint(0, 'Response code: ' + str(response.get_code())) DebugPrint(0, 'Response message: ' + response.get_message()) # Determine if the call was successful based on the # response code. Currently, 0 = success if response.get_code() == 0: DebugPrint(1, 'Response indicates success, ' + f.name + ' will be deleted') successfulSendCount += 1 os.remove(f.name) else: failedSendCount += 1 DebugPrint(1, 'Response indicates failure, ' + f.name + ' will not be deleted') DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString
82362dc0c1d2f5f0727670c6ff01b444853b1602 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/82362dc0c1d2f5f0727670c6ff01b444853b1602/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2479, 4201, 2697, 12, 768, 1621, 16, 1206, 8176, 273, 1083, 16, 14110, 273, 599, 4672, 2552, 1903, 2552, 2535, 3826, 1380, 2552, 24448, 1380, 2552, 6873, 3826, 1380, 225, 589, 273, 1140, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2479, 4201, 2697, 12, 768, 1621, 16, 1206, 8176, 273, 1083, 16, 14110, 273, 599, 4672, 2552, 1903, 2552, 2535, 3826, 1380, 2552, 24448, 1380, 2552, 6873, 3826, 1380, 225, 589, 273, 1140, ...
if new != old:
if new != oldlong and new != oldshort: print 'data changed for %s %s...' % (self.rec['Child'], self.rec['Last Name'])
def update(self, pid): """keepin' it real, y'know what i'm sayin'?""" new=[self.rec['DOB']] c.execute("""select * from kids where kid_id = %s""", (pid)) f=c.fetchall()[0] #assume only 1? XXX exept IndexError if wrong! try: old=[f['date_of_birth'].strftime('%m/%d/%y')] except AttributeError: old='' if new != old: n=raw_input('OLD [%s]\n NEW [%s]\n use new? y/n ' % (','.join(old), ','.join(new))) if n == 'y': c.execute("""update kids set date_of_birth = %s where kid_id = %s""", (self._human_to_dt(self.rec['DOB']), pid)) return
948600317a36a677d1264503e478b78c7b8da403 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/750/948600317a36a677d1264503e478b78c7b8da403/importrasta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 4231, 4672, 3536, 10102, 267, 11, 518, 2863, 16, 677, 11, 79, 3338, 4121, 277, 17784, 12532, 267, 11, 35, 8395, 394, 22850, 2890, 18, 3927, 3292, 3191, 38, 3546, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 4231, 4672, 3536, 10102, 267, 11, 518, 2863, 16, 677, 11, 79, 3338, 4121, 277, 17784, 12532, 267, 11, 35, 8395, 394, 22850, 2890, 18, 3927, 3292, 3191, 38, 3546, 65...
if (self.ca.m.MODE == self.ca.m.MODE_PHOTO): type = self.ca.m.TYPE_PHOTO if (self.ca.m.MODE == self.ca.m.MODE_VIDEO): type = self.ca.m.TYPE_VIDEO if (self.ca.m.MODE == self.ca.m.MODE_AUDIO): type = self.ca.m.TYPE_AUDIO
if (self.MODE == self.MODE_PHOTO): type = self.TYPE_PHOTO if (self.MODE == self.MODE_VIDEO): type = self.TYPE_VIDEO if (self.MODE == self.MODE_AUDIO): type = self.TYPE_AUDIO
def getHash( self ): type = -1 if (self.ca.m.MODE == self.ca.m.MODE_PHOTO): type = self.ca.m.TYPE_PHOTO if (self.ca.m.MODE == self.ca.m.MODE_VIDEO): type = self.ca.m.TYPE_VIDEO if (self.ca.m.MODE == self.ca.m.MODE_AUDIO): type = self.ca.m.TYPE_AUDIO
08f04b448b6088568e4abfe7225554a3aa26e98b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6451/08f04b448b6088568e4abfe7225554a3aa26e98b/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16075, 12, 365, 262, 30, 618, 273, 300, 21, 309, 261, 2890, 18, 5353, 18, 81, 18, 7038, 422, 365, 18, 5353, 18, 81, 18, 7038, 67, 8939, 27019, 4672, 618, 273, 365, 18, 5353, 18, 81...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16075, 12, 365, 262, 30, 618, 273, 300, 21, 309, 261, 2890, 18, 5353, 18, 81, 18, 7038, 422, 365, 18, 5353, 18, 81, 18, 7038, 67, 8939, 27019, 4672, 618, 273, 365, 18, 5353, 18, 81...
next_rev = c.repo.get_changeset(cur_rev).next().raw_id
next_rev = c.repo.get_changeset(cur_rev).next(c.branch).raw_id
def index(self, repo_name, revision, f_path): hg_model = ScmModel() c.repo = hg_model.get_repo(c.repo_name) revision = request.POST.get('at_rev', None) or revision
e385000c45d4058fc55f81b96f0db0973558bdcf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/e385000c45d4058fc55f81b96f0db0973558bdcf/files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 2890, 16, 3538, 67, 529, 16, 6350, 16, 284, 67, 803, 4672, 22576, 67, 2284, 273, 2850, 81, 1488, 1435, 276, 18, 7422, 273, 22576, 67, 2284, 18, 588, 67, 7422, 12, 71, 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, 770, 12, 2890, 16, 3538, 67, 529, 16, 6350, 16, 284, 67, 803, 4672, 22576, 67, 2284, 273, 2850, 81, 1488, 1435, 276, 18, 7422, 273, 22576, 67, 2284, 18, 588, 67, 7422, 12, 71, 18, ...
} while (i < input.length);
}
def notebook_lib(): s= r"""
3d36dffe41957f3c4bc2f2aa92a8f97c4079f5e7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/3d36dffe41957f3c4bc2f2aa92a8f97c4079f5e7/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tarfn = data.expand('%s_%s_%s_%s.tar.gz' % (module.replace('/', '.'), host, revision, date), localdata)
tarfn = data.expand('%s_%s_%s_%s_%s.tar.gz' % (module.replace('/', '.'), host, path.replace('/', '.'), revision, date), localdata)
def go(self, d, urls = []): """Fetch urls""" if not urls: urls = self.urls
e752d6f3aa7b0a93cc3af880bee7f88d778d1f67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8123/e752d6f3aa7b0a93cc3af880bee7f88d778d1f67/fetch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 12, 2890, 16, 302, 16, 6903, 273, 5378, 4672, 3536, 5005, 6903, 8395, 309, 486, 6903, 30, 6903, 273, 365, 18, 10518, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 12, 2890, 16, 302, 16, 6903, 273, 5378, 4672, 3536, 5005, 6903, 8395, 309, 486, 6903, 30, 6903, 273, 365, 18, 10518, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Return vector space with inner product associated to self.
Return the vector space associated to self with inner product given by the reduced norm.
def vector_space(self): """ Return vector space with inner product associated to self.
fe177d7e9e5b87a4c01b1082cf61c4d867951ed1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/fe177d7e9e5b87a4c01b1082cf61c4d867951ed1/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3806, 67, 2981, 12, 2890, 4672, 3536, 2000, 3806, 3476, 598, 3443, 3017, 3627, 358, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3806, 67, 2981, 12, 2890, 4672, 3536, 2000, 3806, 3476, 598, 3443, 3017, 3627, 358, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
atoms = self.execute("tr-filter", [os.path.join(input_dir, "thf01/init.psf"), "at", 'a.number==1'])[0]
def test_df(self): self.from_xyz("thf01", "pos") self.from_cp2k_ener("thf01") atoms = self.execute("tr-filter", [os.path.join(input_dir, "thf01/init.psf"), "at", 'a.number==1'])[0] self.execute("tr-ic-psf", ['tracks/atom.pos', 'bond', '1,2,3,4', '5,6,7,8,9,10,11,12', os.path.join(input_dir, "thf01/init.psf")]) # ordinary df, no error bars self.execute("tr-df", glob.glob("tracks/atom.pos.bond.???????.???????") + ["1.0*A", "1.2*A", "20", "tracks/atom.pos.bond.df"]) df_hist = load_track("tracks/atom.pos.bond.df.hist") self.assertAlmostEqual(df_hist.sum(), 1.0, 2) self.execute("tr-plot", [ "--title='C-H bond length distribution'", "--xlabel='C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency", ":bar", "tracks/atom.pos.bond.df.bins", "tracks/atom.pos.bond.df.hist", os.path.join(output_dir, "df_noerror.png"), ]) # cumulative df, no error bars self.execute("tr-df", glob.glob("tracks/atom.pos.bond.???????.???????") + ["-c", "1.0*A", "1.2*A", "20", "tracks/atom.pos.bond.cdf"]) cdf_hist = load_track("tracks/atom.pos.bond.cdf.hist") self.assertAlmostEqual(cdf_hist[-1], 1.0, 2) self.execute("tr-plot", [ "--title='Cumulative C-H bond length distribution'", "--xlabel='C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency", ":bar", "tracks/atom.pos.bond.cdf.bins", "tracks/atom.pos.bond.cdf.hist", os.path.join(output_dir, "df_cumul_noerror.png"), ]) # ordinary df, with error bars self.execute("tr-df", glob.glob("tracks/atom.pos.bond.???????.???????") + ["--bin-tracks", "1.0*A", "1.2*A", "20", "tracks/atom.pos.bond.df"]) lines = [] for bin_filename in sorted(glob.glob("tracks/atom.pos.bond.df.bin.???????")): output = self.execute("tr-blav", [bin_filename, "tracks/time"]) lines.append(output[0]) self.execute("tr-write", ["tracks/atom.pos.bond.df.hist", "tracks/atom.pos.bond.df.hist.error"], stdin=lines) df_hist_bis = load_track("tracks/atom.pos.bond.df.hist") self.assertAlmostEqual(df_hist_bis.sum(), 1.0, 2) self.assertArraysAlmostEqual(df_hist, df_hist_bis, 1e-5) self.execute("tr-plot", [ "--title='C-H bond length distribution'", "--xlabel=C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency", ":bar", "tracks/atom.pos.bond.df.bins", "tracks/atom.pos.bond.df.hist", "tracks/atom.pos.bond.df.hist.error", os.path.join(output_dir, "df_error.png"), ]) # cumulative df, with error bars self.execute("tr-df", glob.glob("tracks/atom.pos.bond.???????.???????") + ["-c", "--bin-tracks", "1.0*A", "1.2*A", "20", "tracks/atom.pos.bond.cdf"]) lines = [] for bin_filename in sorted(glob.glob("tracks/atom.pos.bond.cdf.bin.???????")): output = self.execute("tr-blav", [bin_filename, "tracks/time"]) lines.append(output[0]) self.execute("tr-write", ["tracks/atom.pos.bond.cdf.hist", "tracks/atom.pos.bond.cdf.hist.error"], stdin=lines) cdf_hist_bis = load_track("tracks/atom.pos.bond.cdf.hist") self.assertAlmostEqual(cdf_hist_bis[-1], 1.0, 2) self.assertArraysAlmostEqual(cdf_hist, cdf_hist_bis, 1e-5) self.execute("tr-plot", [ "--title='C-H bond length distribution'", "--xlabel=C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency", ":bar", "tracks/atom.pos.bond.cdf.bins", "tracks/atom.pos.bond.cdf.hist", "tracks/atom.pos.bond.cdf.hist.error", os.path.join(output_dir, "df_cumul_error.png"), ])
531c390e8443aa7b555ec15409ea9f8c1393cd3f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11050/531c390e8443aa7b555ec15409ea9f8c1393cd3f/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2180, 12, 2890, 4672, 365, 18, 2080, 67, 17177, 2932, 451, 74, 1611, 3113, 315, 917, 7923, 365, 18, 2080, 67, 4057, 22, 79, 67, 708, 2932, 451, 74, 1611, 7923, 365, 18, 883...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2180, 12, 2890, 4672, 365, 18, 2080, 67, 17177, 2932, 451, 74, 1611, 3113, 315, 917, 7923, 365, 18, 2080, 67, 4057, 22, 79, 67, 708, 2932, 451, 74, 1611, 7923, 365, 18, 883...
self.getDB().associate(self.secDB, self.getGenre, txn=txn)
if db.version() >= (4,1): self.getDB().associate(self.secDB, self.getGenre, txn=txn) else: self.getDB().associate(self.secDB, self.getGenre)
def test13_associate_in_transaction(self): if verbose: print '\n', '-=' * 30 print "Running %s.test13_associateAutoCommit..." % \ self.__class__.__name__
753a3dbffb913be7cd1a7e76121a0d757773a93f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/753a3dbffb913be7cd1a7e76121a0d757773a93f/test_associate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3437, 67, 11577, 67, 267, 67, 7958, 12, 2890, 4672, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 3437, 67, 11577, 4965, 5580, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3437, 67, 11577, 67, 267, 67, 7958, 12, 2890, 4672, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 3437, 67, 11577, 4965, 5580, 7...
print "Ping timeout!"
LOG.error( "Ping timeout!" )
def cb(): self.ping_dcall = None
69835a631879faf4f1d962b8382f2deb518e961d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8524/69835a631879faf4f1d962b8382f2deb518e961d/dtella_bridgeserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 13332, 365, 18, 1382, 67, 72, 1991, 273, 599, 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, 2875, 13332, 365, 18, 1382, 67, 72, 1991, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
res = storage.getCurrentURL(fileName)
if alternativeFileName: res = storage.getCurrentURL(alternativeFileName) else: res = storage.getCurrentURL(fileName)
def putFile(self,file,alternativePath=None): """ This method will upload a local file to the SE
462dde553bb0e1ee27593b99359b316b766f389d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/462dde553bb0e1ee27593b99359b316b766f389d/StorageElement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 812, 12, 2890, 16, 768, 16, 27071, 743, 33, 7036, 4672, 3536, 1220, 707, 903, 3617, 279, 1191, 585, 358, 326, 3174, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 812, 12, 2890, 16, 768, 16, 27071, 743, 33, 7036, 4672, 3536, 1220, 707, 903, 3617, 279, 1191, 585, 358, 326, 3174, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
indice = y * ZONE_WIDTH + x
def put_tile(self, event): "placer une tile sur la carte" x = event.x / TILE_SIZE y = event.y / TILE_SIZE # si la nouvelle tile est différente de l'ancienne indice = y * ZONE_WIDTH + x
c6d45ecba662dee456bf54117dee5bbf06f8760d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3345/c6d45ecba662dee456bf54117dee5bbf06f8760d/editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 15368, 12, 2890, 16, 871, 4672, 315, 412, 10598, 21948, 4769, 5056, 7125, 7035, 73, 6, 225, 619, 273, 871, 18, 92, 342, 399, 13578, 67, 4574, 677, 273, 871, 18, 93, 342, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 15368, 12, 2890, 16, 871, 4672, 315, 412, 10598, 21948, 4769, 5056, 7125, 7035, 73, 6, 225, 619, 273, 871, 18, 92, 342, 399, 13578, 67, 4574, 677, 273, 871, 18, 93, 342, 39...
def getButtonImage (self, item, mouseOverFlag):
def getButtonImage (self, item, mouseOverFlag, isSelected):
def getButtonImage (self, item, mouseOverFlag): """ The rules for naming icons are complicated, which is a reflection of complexity of our sidebar design, so here is a summary of the rules:
a7d660997926d68263bc8b528332bdfd661eb200 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/a7d660997926d68263bc8b528332bdfd661eb200/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2882, 2644, 2040, 261, 2890, 16, 761, 16, 7644, 4851, 4678, 16, 20956, 4672, 3536, 1021, 2931, 364, 14634, 17455, 854, 31312, 16, 1492, 353, 279, 5463, 434, 21610, 434, 3134, 23364, 8281, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2882, 2644, 2040, 261, 2890, 16, 761, 16, 7644, 4851, 4678, 16, 20956, 4672, 3536, 1021, 2931, 364, 14634, 17455, 854, 31312, 16, 1492, 353, 279, 5463, 434, 21610, 434, 3134, 23364, 8281, ...
if self.values[5][0]>=0 and self.values[5][1]>=0 and self.values[5][2]>0 and self.values[5][3]>0:
if self.values[5][0]>0 :
def __execRMD__(self):
556d9ffae849975824b98efc4a1b66fc2ef1efed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9403/556d9ffae849975824b98efc4a1b66fc2ef1efed/rmdTrayIcon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4177, 54, 6188, 972, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4177, 54, 6188, 972, 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...
if not '.' in s and not '(' in s: v = [x for x in globs.keys() if x[:n] == s] else: if not ')' in s: i = s.rfind('.') method = s[i+1:] obj = s[:i] n = len(method) else: obj = preparse(s) method = '' try: O = eval(obj, globs) D = dir(O)
try: if not '.' in s and not '(' in s: v = [x for x in globs.keys() if x[:n] == s] + \ [x for x in __builtins__.keys() if x[:n] == s] else: if not ')' in s: i = s.rfind('.') method = s[i+1:] obj = s[:i] n = len(method) else: obj = preparse(s) method = ''
def completions(s, globs, format=False, width=90): """ Return a list of completions in the context of globs. """ n = len(s) if n == 0: return '(empty string)' if not '.' in s and not '(' in s: v = [x for x in globs.keys() if x[:n] == s] else: if not ')' in s: i = s.rfind('.') method = s[i+1:] obj = s[:i] n = len(method) else: obj = preparse(s) method = '' try: O = eval(obj, globs) D = dir(O) try: D += O.trait_names() except (AttributeError, TypeError): pass if method == '': v = [obj + '.'+x for x in D if x and x[0] != '_'] else: v = [obj + '.'+x for x in D if x[:n] == method] except Exception, msg: print msg v = [] v = list(set(v)) # make uniq v.sort() if format: if len(v) == 0: return "no completions of %s"%s else: return tabulate(v, width) return v
e1da9ba8eef28637d6919840deecddaae4ff42b5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e1da9ba8eef28637d6919840deecddaae4ff42b5/support.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23738, 12, 87, 16, 4715, 87, 16, 740, 33, 8381, 16, 1835, 33, 9349, 4672, 3536, 2000, 279, 666, 434, 23738, 316, 326, 819, 434, 4715, 87, 18, 3536, 290, 273, 562, 12, 87, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23738, 12, 87, 16, 4715, 87, 16, 740, 33, 8381, 16, 1835, 33, 9349, 4672, 3536, 2000, 279, 666, 434, 23738, 316, 326, 819, 434, 4715, 87, 18, 3536, 290, 273, 562, 12, 87, 13, 309, ...
sys.stderr.write("File metadata: %s\n" % repr(metadata))
def get_file_metadata(self, f): metadata = {} if f.read(3) != "aar": f.close() raise Exception(f.name + " is not a recognized aarddict dictionary file") if f.read(2) != "01": f.close() raise Exception(f.name + " is not compatible with this viewer") metadataLength = int(f.read(8)) metadataString = f.read(metadataLength) metadata = compactjson.loads(metadataString) sys.stderr.write("File metadata: %s\n" % repr(metadata)) return metadata
9fee2e53cf09a10d04e459fef8ce541e7710112f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14305/9fee2e53cf09a10d04e459fef8ce541e7710112f/dictionary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 67, 4165, 12, 2890, 16, 284, 4672, 1982, 273, 2618, 309, 284, 18, 896, 12, 23, 13, 480, 315, 69, 297, 6877, 284, 18, 4412, 1435, 1002, 1185, 12, 74, 18, 529, 397, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 67, 4165, 12, 2890, 16, 284, 4672, 1982, 273, 2618, 309, 284, 18, 896, 12, 23, 13, 480, 315, 69, 297, 6877, 284, 18, 4412, 1435, 1002, 1185, 12, 74, 18, 529, 397, 315...
f.write(get_time())
f.write(str(os.getpid()))
def set_lock(): """ Sets the lock file """ f = open(get_lockname(),'w') f.write(get_time()) f.close()
f67b360b87008c18913a89b815227b5ee40432fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/f67b360b87008c18913a89b815227b5ee40432fa/pylal_exttrig_llutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 739, 13332, 3536, 11511, 326, 2176, 585, 3536, 284, 273, 1696, 12, 588, 67, 739, 529, 9334, 11, 91, 6134, 284, 18, 2626, 12, 701, 12, 538, 18, 588, 6610, 1435, 3719, 284, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 739, 13332, 3536, 11511, 326, 2176, 585, 3536, 284, 273, 1696, 12, 588, 67, 739, 529, 9334, 11, 91, 6134, 284, 18, 2626, 12, 701, 12, 538, 18, 588, 6610, 1435, 3719, 284, 18...
this = apply(_quickfix.new_UnderlyingContractMultiplier, args)
this = _quickfix.new_UnderlyingContractMultiplier(*args)
def __init__(self, *args): this = apply(_quickfix.new_UnderlyingContractMultiplier, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 14655, 6291, 8924, 23365, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 14655, 6291, 8924, 23365, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335...
if node.children: inside = self.emit_children(node) else: inside = self.formatter.text(target)
def link_emit(self, node): target = node.content if node.children: inside = self.emit_children(node) else: inside = self.formatter.text(target) m = self.addr_re.match(target) if m: if m.group('page_name'): # link to a page word = m.group('page_name') if word.startswith(wikiutil.PARENT_PREFIX): word = word[wikiutil.PARENT_PREFIX_LEN:] elif word.startswith(wikiutil.CHILD_PREFIX): word = "%s/%s" % (self.formatter.page.page_name, word[wikiutil.CHILD_PREFIX_LEN:]) # handle anchors parts = rsplit(word, "#", 1) anchor = "" if len(parts) == 2: word, anchor = parts return ''.join([ self.formatter.pagelink(1, word, anchor=anchor), inside, self.formatter.pagelink(0, word), ]) elif m.group('extern_addr'): # external link address = m.group('extern_addr') proto = m.group('extern_proto') return ''.join([ self.formatter.url(1, address, css=proto), inside, self.formatter.url(0), ]) elif m.group('inter_wiki'): # interwiki link wiki = m.group('inter_wiki') page = m.group('inter_page') if not node.children: # interwiki links don't show the moniker inside = self.formatter.text(page) return ''.join([ self.formatter.interwikilink(1, wiki, page), inside, self.formatter.interwikilink(0), ]) elif m.group('attach_scheme'): # link to an attachment scheme = m.group('attach_scheme') attachment = m.group('attach_addr') url = wikiutil.url_unquote(attachment, want_unicode=True) text = self.get_text(node) return ''.join([ self.formatter.attachment_link(1, url), self.formatter.text(text), self.formatter.attachment_link(0) ]) return "".join(["[[", self.formatter.text(target), "]]"])
563eeb3e5c19f88beaa70ad4f52f1b2f0709782c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/563eeb3e5c19f88beaa70ad4f52f1b2f0709782c/text_creole.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 18356, 12, 2890, 16, 756, 4672, 1018, 273, 756, 18, 1745, 312, 273, 365, 18, 4793, 67, 266, 18, 1916, 12, 3299, 13, 309, 312, 30, 309, 312, 18, 1655, 2668, 2433, 67, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 18356, 12, 2890, 16, 756, 4672, 1018, 273, 756, 18, 1745, 312, 273, 365, 18, 4793, 67, 266, 18, 1916, 12, 3299, 13, 309, 312, 30, 309, 312, 18, 1655, 2668, 2433, 67, 529, ...
_exithandlers.remove(_exithandlers[-1])
def _run_exitfuncs(): """run any registered exit functions _exithandlers is traversed in reverse order so functions are executed last in, first out. """ while _exithandlers: func, targs, kargs = _exithandlers[-1] apply(func, targs, kargs) _exithandlers.remove(_exithandlers[-1])
b359f0e9713c1a2a24863ec79d3a9a2218bb7348 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b359f0e9713c1a2a24863ec79d3a9a2218bb7348/atexit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 8593, 17728, 13332, 3536, 2681, 1281, 4104, 2427, 4186, 225, 389, 338, 483, 464, 3135, 353, 29062, 316, 4219, 1353, 1427, 4186, 854, 7120, 1142, 316, 16, 1122, 596, 18, 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, 389, 2681, 67, 8593, 17728, 13332, 3536, 2681, 1281, 4104, 2427, 4186, 225, 389, 338, 483, 464, 3135, 353, 29062, 316, 4219, 1353, 1427, 4186, 854, 7120, 1142, 316, 16, 1122, 596, 18, 35...
self.inputwindow.set_icon_from_file("traduisons.png")
self.inputwindow.set_icon_from_file(os.path.join(appPath, "traduisons.png"))
def __init__(self, fromLang, toLang, dictLang):
af8d359a42dd607430d6caf202b28f739e919795 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9947/af8d359a42dd607430d6caf202b28f739e919795/traduisons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 628, 7275, 16, 358, 7275, 16, 2065, 7275, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 628, 7275, 16, 358, 7275, 16, 2065, 7275, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
outfile.write(" ")
outfile.write(" ")
def write_results_file(self, path, lines, lnotab, lines_hit): """Return a coverage results file in path."""
a2cee3dd88611ecd3deb74a9b127a67a1be9d5b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a2cee3dd88611ecd3deb74a9b127a67a1be9d5b4/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4717, 67, 768, 12, 2890, 16, 589, 16, 2362, 16, 328, 902, 378, 16, 2362, 67, 15989, 4672, 3536, 990, 279, 11196, 1686, 585, 316, 589, 12123, 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, 1045, 67, 4717, 67, 768, 12, 2890, 16, 589, 16, 2362, 16, 328, 902, 378, 16, 2362, 67, 15989, 4672, 3536, 990, 279, 11196, 1686, 585, 316, 589, 12123, 2, -100, -100, -100, -100, -100, ...
self.prop.window, _("Invalid tag"),
self.prop, _("Invalid tag"),
def add_tag(self, *args): add = AddTagDialog(self.prop.window, self.songinfo.can_change())
44deb3636adb3eb180d1cc44ce811a1cb782bb80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/44deb3636adb3eb180d1cc44ce811a1cb782bb80/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2692, 12, 2890, 16, 380, 1968, 4672, 527, 273, 1436, 1805, 6353, 12, 2890, 18, 5986, 18, 5668, 16, 365, 18, 816, 75, 1376, 18, 4169, 67, 3427, 10756, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2692, 12, 2890, 16, 380, 1968, 4672, 527, 273, 1436, 1805, 6353, 12, 2890, 18, 5986, 18, 5668, 16, 365, 18, 816, 75, 1376, 18, 4169, 67, 3427, 10756, 2, -100, -100, -100, -1...
f = function([n], tensor.max_and_argmax(n,0))
f = function([n], tensor.max_and_argmax(n,0), mode=mode)
def test_optimization(self): #If we use only the max output, we should replace this op with a faster one. data = numpy.asarray(numpy.random.rand(2,3),dtype=config.floatX) n = tensor.matrix()
c52d77ef0d0094629b359972e65182938100defb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/c52d77ef0d0094629b359972e65182938100defb/test_opt_uncanonicalize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16689, 1588, 12, 2890, 4672, 468, 2047, 732, 999, 1338, 326, 943, 876, 16, 732, 1410, 1453, 333, 1061, 598, 279, 12063, 1245, 18, 501, 273, 3972, 18, 345, 1126, 12, 15974, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16689, 1588, 12, 2890, 4672, 468, 2047, 732, 999, 1338, 326, 943, 876, 16, 732, 1410, 1453, 333, 1061, 598, 279, 12063, 1245, 18, 501, 273, 3972, 18, 345, 1126, 12, 15974, 18...
if __debug__ and self.mo is not None and self.debug >= 5: _mesg("\tmatched r'%s' => %s" % (cre.pattern, `self.mo.groups()`))
if __debug__: if self.mo is not None and self.debug >= 5: _mesg("\tmatched r'%s' => %s" % (cre.pattern, `self.mo.groups()`))
def _match(self, cre, s):
b7ea8daca8563042c122b826472f3e45d15d1c52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b7ea8daca8563042c122b826472f3e45d15d1c52/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1916, 12, 2890, 16, 1519, 16, 272, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1916, 12, 2890, 16, 1519, 16, 272, 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, ...
if os.path.sep != '/': directory = directory.replace('/', os.path.sep) self.root_directory = self.root_directory.replace('/', os.path.sep)
def __init__(self, directory, root_directory=None, cache_max_age=None): if os.path.sep != '/': directory = directory.replace(os.path.sep, '/') self.directory = directory self.root_directory = root_directory if root_directory is not None: self.root_directory = os.path.normpath(self.root_directory) else: self.root_directory = directory self.cache_max_age = cache_max_age if os.path.sep != '/': directory = directory.replace('/', os.path.sep) self.root_directory = self.root_directory.replace('/', os.path.sep)
905c1a25837b0d7bd4ba90a37b5e07557b476ba0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/905c1a25837b0d7bd4ba90a37b5e07557b476ba0/urlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1867, 16, 1365, 67, 5149, 33, 7036, 16, 1247, 67, 1896, 67, 410, 33, 7036, 4672, 309, 1140, 18, 803, 18, 10814, 480, 2023, 30, 1867, 273, 1867, 18, 207...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1867, 16, 1365, 67, 5149, 33, 7036, 16, 1247, 67, 1896, 67, 410, 33, 7036, 4672, 309, 1140, 18, 803, 18, 10814, 480, 2023, 30, 1867, 273, 1867, 18, 207...
return
return None
def dispatch_call(self, frame, arg): if self.botframe is None: self.botframe = frame return if not (self.stop_here(frame) or self.break_anywhere(frame)): return frame.f_locals['__args__'] = arg return self.dispatch
7ac1c81f4f4b45722a0589e3ff42861b7082835a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7ac1c81f4f4b45722a0589e3ff42861b7082835a/pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3435, 67, 1991, 12, 2890, 16, 2623, 16, 1501, 4672, 309, 365, 18, 4819, 3789, 353, 599, 30, 365, 18, 4819, 3789, 273, 2623, 327, 599, 309, 486, 261, 2890, 18, 5681, 67, 14852, 12, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3435, 67, 1991, 12, 2890, 16, 2623, 16, 1501, 4672, 309, 365, 18, 4819, 3789, 353, 599, 30, 365, 18, 4819, 3789, 273, 2623, 327, 599, 309, 486, 261, 2890, 18, 5681, 67, 14852, 12, 37...
if not self._isDeadEnd(child): self._curObjRef = ContainerRef(curObjRef, indirection=Indirection(evalStr='.%s' % childName))
if not self._isDeadEnd(child, childName): self._curObjRef = ContainerRef(Indirection(evalStr='.%s' % childName), curObjRef)
def run(self): taskMgr.doMethodLater(self._nextCheckDelay, self._checkForLeaks, self.getCheckTaskName())
bb22b15b9f0ccdc40e73d008896e3199a4fa2dc3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/bb22b15b9f0ccdc40e73d008896e3199a4fa2dc3/ContainerLeakDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1562, 9455, 18, 2896, 1305, 20607, 12, 2890, 6315, 4285, 1564, 6763, 16, 365, 6315, 1893, 1290, 1682, 581, 87, 16, 365, 18, 588, 1564, 2174, 461, 10756, 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, 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, 1562, 9455, 18, 2896, 1305, 20607, 12, 2890, 6315, 4285, 1564, 6763, 16, 365, 6315, 1893, 1290, 1682, 581, 87, 16, 365, 18, 588, 1564, 2174, 461, 10756, 2, -100, ...
return self.artcmd('BODY ' + id, file)
return self.artcmd('BODY {0}'.format(id), file)
def body(self, id, file=None): """Process a BODY command. Argument: - id: article number or message id - file: Filename string or file object to store the article in Returns: - resp: server response if successful - nr: article number - id: message id - list: the lines of the article's body or an empty list if file was used"""
17de0ac39e028b8777529030dfc984cdf592a543 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/17de0ac39e028b8777529030dfc984cdf592a543/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1417, 12, 2890, 16, 612, 16, 585, 33, 7036, 4672, 3536, 2227, 279, 30580, 1296, 18, 225, 5067, 30, 300, 612, 30, 7559, 1300, 578, 883, 612, 300, 585, 30, 16671, 533, 578, 585, 733, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1417, 12, 2890, 16, 612, 16, 585, 33, 7036, 4672, 3536, 2227, 279, 30580, 1296, 18, 225, 5067, 30, 300, 612, 30, 7559, 1300, 578, 883, 612, 300, 585, 30, 16671, 533, 578, 585, 733, 3...
for line in rawList.readlines():
lines = rawList.read() lines = re.sub( r'\n ', '', lines) lines = string.split(lines, '\n') for line in lines:
def collectData(self):
4e9fdfad97a99c24d089dee060345c2588b40cee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/4e9fdfad97a99c24d089dee060345c2588b40cee/df.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 751, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 751, 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, -1...
print pname.ljust(20),pvalue.ljust(30),str(timeStamp)
print pname.ljust(20),pvalue.ljust(30),timeStamp
def dump(self): """ Print out the contents of the internal cached information
c48197836d3a42ef2d691b4d6f40e4f4798ebd41 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/c48197836d3a42ef2d691b4d6f40e4f4798ebd41/JobReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 4672, 3536, 3038, 596, 326, 2939, 434, 326, 2713, 3472, 1779, 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, 4657, 12, 2890, 4672, 3536, 3038, 596, 326, 2939, 434, 326, 2713, 3472, 1779, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return (v is NotLoaded or isinstance(value, CapBaseObject) and not value.__iscomplete__())
return (v is NotLoaded or isinstance(v, CapBaseObject) and not v.__iscomplete__())
def not_loaded(v): return (v is NotLoaded or isinstance(value, CapBaseObject) and not value.__iscomplete__())
3102e79e510f3194e119a595bb787874e14b0648 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/3102e79e510f3194e119a595bb787874e14b0648/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 486, 67, 4230, 12, 90, 4672, 327, 261, 90, 353, 2288, 8835, 578, 1549, 12, 1132, 16, 11200, 2171, 921, 13, 471, 486, 460, 16186, 291, 6226, 972, 10756, 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, 486, 67, 4230, 12, 90, 4672, 327, 261, 90, 353, 2288, 8835, 578, 1549, 12, 1132, 16, 11200, 2171, 921, 13, 471, 486, 460, 16186, 291, 6226, 972, 10756, 2, -100, -100, -100, -100, -100,...
compileFlags = compileCmdParts[1 : ] + compileFlags
def fromLine(cls, compileCommandStr, compileFlagsStr): compileCmdParts = shsplit(compileCommandStr) compileFlags = shsplit(compileFlagsStr) compileEnv = {} while compileCmdParts: if '=' in compileCmdParts[0]: name, value = compileCmdParts[0].split('=', 1) del compileCmdParts[0] compileEnv[name] = value else: compileFlags = compileCmdParts[1 : ] + compileFlags return cls( compileEnv, compileCmdParts[0], compileFlags ) else: raise ValueError( 'No compiler specified in "%s"' % compileCommandStr )
be2cb1283a4005d9f6a9ee7ef7817439ff0d9760 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5450/be2cb1283a4005d9f6a9ee7ef7817439ff0d9760/compilers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 1670, 12, 6429, 16, 4074, 2189, 1585, 16, 4074, 5094, 1585, 4672, 4074, 5931, 4305, 273, 699, 4939, 12, 11100, 2189, 1585, 13, 4074, 5094, 273, 699, 4939, 12, 11100, 5094, 1585, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 1670, 12, 6429, 16, 4074, 2189, 1585, 16, 4074, 5094, 1585, 4672, 4074, 5931, 4305, 273, 699, 4939, 12, 11100, 2189, 1585, 13, 4074, 5094, 273, 699, 4939, 12, 11100, 5094, 1585, 13,...
self._pool_size=v
self._pool_size = v
def setPoolSize(self, v): self._pool_size=v
3f5dc8adcf31c234935a3c71325d44bf2f319df0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/3f5dc8adcf31c234935a3c71325d44bf2f319df0/DB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 18834, 12, 2890, 16, 331, 4672, 365, 6315, 6011, 67, 1467, 33, 90, 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, 444, 18834, 12, 2890, 16, 331, 4672, 365, 6315, 6011, 67, 1467, 33, 90, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def __init__(self):
max_login_attempts = 3 permit_ftp_proxying = False permit_privileged_port = False def __init__(self, conn, ftpd_instance): asynchat.async_chat.__init__(self, conn=conn) self.ftpd_instance = ftpd_instance self.remote_ip, self.remote_port = self.socket.getpeername() self.in_buffer = [] self.in_buffer_len = 0 self.set_terminator("\r\n")
def __init__(self):
8ef51c703167796e3adf0fd8fd5240b691e23538 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/8ef51c703167796e3adf0fd8fd5240b691e23538/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 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, 1001, 2738, 972, 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, -1...
self.send_body_chunks(DATA, '207','Multi-Status','Multiple responses')
self.send_body_chunks_if_http11(DATA, '207','Multi-Status','Multiple responses')
def do_PROPFIND(self): """ Retrieve properties on defined resource. """
4f242e327f854ce8e9a7948b0c108d14bc4b0624 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4009/4f242e327f854ce8e9a7948b0c108d14bc4b0624/WebDAVServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 15811, 42, 2356, 12, 2890, 4672, 3536, 10708, 1790, 603, 2553, 1058, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 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, 741, 67, 15811, 42, 2356, 12, 2890, 4672, 3536, 10708, 1790, 603, 2553, 1058, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
chr(idaapi.get_byte(ea+3))
chr(idaapi.get_byte(ea+3))
def GetFloat(ea): """ Get value of a floating point number (4 bytes) @param ea: linear address @return: float """ tmp = chr(idaapi.get_byte(ea)) + \ chr(idaapi.get_byte(ea+1)) + \ chr(idaapi.get_byte(ea+2)) + \ chr(idaapi.get_byte(ea+3)) return struct.unpack("f", tmp)[0]
bf1ab9894aabbc1bcdadb6513fc5ef25283e4f52 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3410/bf1ab9894aabbc1bcdadb6513fc5ef25283e4f52/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4723, 12, 24852, 4672, 3536, 968, 460, 434, 279, 13861, 1634, 1300, 261, 24, 1731, 13, 225, 632, 891, 24164, 30, 9103, 1758, 225, 632, 2463, 30, 1431, 3536, 1853, 273, 4513, 12, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4723, 12, 24852, 4672, 3536, 968, 460, 434, 279, 13861, 1634, 1300, 261, 24, 1731, 13, 225, 632, 891, 24164, 30, 9103, 1758, 225, 632, 2463, 30, 1431, 3536, 1853, 273, 4513, 12, 3...
widget=RichWidget(),
def generateFti(self,element,subtypes): ''' '''
f5e5b424a0e01e9a88492672f53fc4444f4bee7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/f5e5b424a0e01e9a88492672f53fc4444f4bee7f/ArchGenXML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 42, 9096, 12, 2890, 16, 2956, 16, 1717, 2352, 4672, 9163, 9163, 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, 2103, 42, 9096, 12, 2890, 16, 2956, 16, 1717, 2352, 4672, 9163, 9163, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if self._dec.attributes.has_key('name'): return self.mangle(self._dec.attributes['name']) else: return None
if hasattr( self._dec, 'attributes'): if self._dec.attributes.has_key('name'): return self.mangle(self._dec.attributes['name']) return None
def getName(self): """returns name """ if self._dec.attributes.has_key('name'): return self.mangle(self._dec.attributes['name']) else: return None
c1d67e766326dfaf38fb58f1ab6a983dfea28403 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c1d67e766326dfaf38fb58f1ab6a983dfea28403/wsdlInterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1723, 12, 2890, 4672, 3536, 6154, 508, 3536, 309, 365, 6315, 4924, 18, 4350, 18, 5332, 67, 856, 2668, 529, 11, 4672, 327, 365, 18, 81, 4341, 12, 2890, 6315, 4924, 18, 4350, 3292, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1723, 12, 2890, 4672, 3536, 6154, 508, 3536, 309, 365, 6315, 4924, 18, 4350, 18, 5332, 67, 856, 2668, 529, 11, 4672, 327, 365, 18, 81, 4341, 12, 2890, 6315, 4924, 18, 4350, 3292, 529, ...
self.escape_trailing_spaces)
self.escape_trailing_spaces),
def get_title_line(): """Add the first line, mostly for decoration""" read_string = self.read_only and "read only" or "read/write" if self.name: return ('Detected abilities for %s (%s) file system:' % (self.name, read_string)) else: return ('Detected abilities for %s file system' % (read_string,))
ae7b721d97152cc2e685db7237f20d89c83d4b6e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8033/ae7b721d97152cc2e685db7237f20d89c83d4b6e/fs_abilities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2649, 67, 1369, 13332, 3536, 986, 326, 1122, 980, 16, 23958, 364, 29217, 8395, 855, 67, 1080, 273, 365, 18, 896, 67, 3700, 471, 315, 896, 1338, 6, 578, 315, 896, 19, 2626, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2649, 67, 1369, 13332, 3536, 986, 326, 1122, 980, 16, 23958, 364, 29217, 8395, 855, 67, 1080, 273, 365, 18, 896, 67, 3700, 471, 315, 896, 1338, 6, 578, 315, 896, 19, 2626, 6...