rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
assert(allclose(desired,actual))
assert(numpy.allclose(desired,actual))
def check_skewing_matrix(self): val = agg.skewing_matrix(pi/4.,pi/4.) desired = array([ 1.0,1.0,1.0,1.0,0.0,0.0]) actual = val.asarray() assert(allclose(desired,actual))
c0f30ec18c196e2839d7133e04d7e6b9893240a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/c0f30ec18c196e2839d7133e04d7e6b9893240a8/test_arc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 7771, 359, 310, 67, 5667, 12, 2890, 4672, 1244, 273, 10421, 18, 7771, 359, 310, 67, 5667, 12, 7259, 19, 24, 12990, 7259, 19, 24, 12998, 6049, 273, 526, 3816, 404, 18, 20, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 7771, 359, 310, 67, 5667, 12, 2890, 4672, 1244, 273, 10421, 18, 7771, 359, 310, 67, 5667, 12, 7259, 19, 24, 12990, 7259, 19, 24, 12998, 6049, 273, 526, 3816, 404, 18, 20, 16...
sage: latex(FormalSum([(1,2), (5, 8/9), (-3, 7)]))
sage: latex(FormalSum([(1,2), (5, 8/9), (-3, 7)]))
def _latex_(self): """ EXAMPLES::
de385fa597d4eb00a76b423dcfb5c8c6ebf59257 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/de385fa597d4eb00a76b423dcfb5c8c6ebf59257/formal_sum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 26264, 67, 12, 2890, 4672, 3536, 5675, 8900, 11386, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 26264, 67, 12, 2890, 4672, 3536, 5675, 8900, 11386, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
append_when_current_valid(current, menu, (_("add service to favourites"), self.addServiceToBouquetSelected), level = 0)
if not inBouquet: append_when_current_valid(current, menu, (_("add service to favourites"), self.addServiceToBouquetSelected), level = 0)
def __init__(self, session, csel): Screen.__init__(self, session) #raise Exception("we need a better summary screen here") self.csel = csel self.bsel = None
9213e54544d3782b1a4766960146f95988c517ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/9213e54544d3782b1a4766960146f95988c517ed/ChannelSelection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 276, 1786, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 468, 11628, 1185, 2932, 1814, 1608, 279, 7844, 4916, 5518, 2674, 7923, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 276, 1786, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 468, 11628, 1185, 2932, 1814, 1608, 279, 7844, 4916, 5518, 2674, 7923, 365, 18,...
_base_super = super
def make_wrapper(inner_name, around_fn): return lambda self, *args, **kwargs: \ around_fn(self, getattr(self, inner_name), *args, **kwargs)
b8cea842407cd03626a4d527439c172e14899848 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9024/b8cea842407cd03626a4d527439c172e14899848/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 8376, 12, 7872, 67, 529, 16, 6740, 67, 4293, 4672, 327, 3195, 365, 16, 380, 1968, 16, 2826, 4333, 30, 521, 6740, 67, 4293, 12, 2890, 16, 3869, 12, 2890, 16, 3443, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 8376, 12, 7872, 67, 529, 16, 6740, 67, 4293, 4672, 327, 3195, 365, 16, 380, 1968, 16, 2826, 4333, 30, 521, 6740, 67, 4293, 12, 2890, 16, 3869, 12, 2890, 16, 3443, 67, 529, ...
status = state[0] st = self.stat(wfn) if status == 'r' and not st: self.updatestatus(wfn, st, status=status)
try: st = self.stat(wfn) except OSError: status = state[0] self.updatestatus(wfn, None, status=status)
def scan(self, topdir=''): self.handle_timeout() ds = self.repo.dirstate._map.copy() self.add_watch(join(self.repo.root, topdir), self.mask) for root, dirs, entries in walk(self.repo, topdir): for d in dirs: self.add_watch(join(root, d), self.mask) wroot = root[len(self.wprefix):] d = self.dir(self.tree, wroot) for fn, kind in entries: wfn = join(wroot, fn) self.updatestatus(wfn, self.getstat(wfn)) ds.pop(wfn, None) wtopdir = topdir if wtopdir and wtopdir[-1] != '/': wtopdir += '/' for wfn, state in ds.iteritems(): if not wfn.startswith(wtopdir): continue status = state[0] st = self.stat(wfn) if status == 'r' and not st: self.updatestatus(wfn, st, status=status) else: self.updatestatus(wfn, st) self.check_deleted('!') self.check_deleted('r')
d11a0879bc14802f0cf1167fa3d0113aa055656a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/d11a0879bc14802f0cf1167fa3d0113aa055656a/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 12, 2890, 16, 1760, 1214, 2218, 11, 4672, 365, 18, 4110, 67, 4538, 1435, 3780, 273, 365, 18, 7422, 18, 72, 920, 340, 6315, 1458, 18, 3530, 1435, 365, 18, 1289, 67, 7585, 12, 57...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 12, 2890, 16, 1760, 1214, 2218, 11, 4672, 365, 18, 4110, 67, 4538, 1435, 3780, 273, 365, 18, 7422, 18, 72, 920, 340, 6315, 1458, 18, 3530, 1435, 365, 18, 1289, 67, 7585, 12, 57...
proj, self.module, changesets, applyable=applyable, applied=self.applied, logger=self.logger, delayed_commit=single_commit)
repodir, self.source_module, changesets, applyable=applyable, applied=self.applied, logger=self.logger)
def do_update(self, arg): """ Usage: update [arg]
695d52e07ea2a81d85d2f2328c2a7a595082f0d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/695d52e07ea2a81d85d2f2328c2a7a595082f0d6/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2725, 12, 2890, 16, 1501, 4672, 3536, 10858, 30, 1089, 306, 3175, 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, 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, 741, 67, 2725, 12, 2890, 16, 1501, 4672, 3536, 10858, 30, 1089, 306, 3175, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
algebra. Thus are the numbers that are squares of the first two generators.
algebra: self is generated by i, j subject to i^2 = a, j^2 = b and j*i=-i*j.
def invariants(self): """ Return the structural invariants a, b of this quaternion algebra. Thus are the numbers that are squares of the first two generators. EXAMPLES::
d3c151fbb82f00af772a908259fff7e9b7e9c52f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d3c151fbb82f00af772a908259fff7e9b7e9c52f/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 15886, 12, 2890, 4672, 3536, 2000, 326, 1958, 3766, 316, 15886, 279, 16, 324, 434, 333, 26774, 524, 29087, 30, 365, 353, 4374, 635, 277, 16, 525, 3221, 358, 277, 66, 22, 273, 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, 316, 15886, 12, 2890, 4672, 3536, 2000, 326, 1958, 3766, 316, 15886, 279, 16, 324, 434, 333, 26774, 524, 29087, 30, 365, 353, 4374, 635, 277, 16, 525, 3221, 358, 277, 66, 22, 273, 279,...
self.encodeddata = urlencode(self.data, 1) self.headers = { "Content-type": "application/x-www-form-urlencoded", "User-agent": wiki.useragent, "Content-length": len(self.encodeddata) }
self.multipart = multipart if self.multipart: (datagen, self.headers) = multipart_encode(self.data) self.encodeddata = '' for singledata in datagen: self.encodeddata = self.encodeddata + singledata else: self.encodeddata = urlencode(self.data, 1) self.headers = { "Content-type": "application/x-www-form-urlencoded", "Content-length": len(self.encodeddata) } self.headers["User-agent"] = wiki.useragent,
def __init__(self, wiki, data, write=False): """ wiki - A Wiki object data - API parameters in the form of a dict write - set to True if doing a write query, so it won't try again on error maxlag is set by default to 5 but can be changed format is always set to json """ self.sleep = 5 self.data = data.copy() self.data['format'] = "json" self.iswrite = write if not 'maxlag' in self.data and not wiki.maxlag < 0: self.data['maxlag'] = wiki.maxlag self.encodeddata = urlencode(self.data, 1) self.headers = { "Content-type": "application/x-www-form-urlencoded", "User-agent": wiki.useragent, "Content-length": len(self.encodeddata) } if gzip: self.headers['Accept-Encoding'] = 'gzip' self.wiki = wiki self.response = False self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(wiki.cookies)) self.request = urllib2.Request(wiki.apibase, self.encodeddata, self.headers)
61cf75c6307f26aaba5a1770d6436fd24d194e1f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8398/61cf75c6307f26aaba5a1770d6436fd24d194e1f/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9050, 16, 501, 16, 1045, 33, 8381, 4672, 3536, 9050, 300, 432, 28268, 733, 501, 300, 1491, 1472, 316, 326, 646, 434, 279, 2065, 1045, 300, 444, 358, 1053...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9050, 16, 501, 16, 1045, 33, 8381, 4672, 3536, 9050, 300, 432, 28268, 733, 501, 300, 1491, 1472, 316, 326, 646, 434, 279, 2065, 1045, 300, 444, 358, 1053...
m=Rthis.search(reftxt) if not m: m=Rthis2.search(reftxt) if not m:
for Rthis in exps: m=Rthis.search(reftxt) if m: break else:
def getreferences(pl): host = wikipedia.langs[pl.code()] url="/w/wiki.phtml?title=Speciaal:Whatlinkshere&target=%s"%(pl.urlname()) txt,charset=wikipedia.getUrl(host,url) Rref=re.compile('<li><a href.* title="([^"]*)"') return Rref.findall(txt)
59bf8abbd7daa948ac378a8b3358372c9f8803cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/59bf8abbd7daa948ac378a8b3358372c9f8803cc/solve_disambiguation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 14353, 12, 412, 4672, 1479, 273, 21137, 18, 4936, 87, 63, 412, 18, 710, 1435, 65, 880, 1546, 19, 91, 19, 13044, 18, 84, 2620, 35, 2649, 33, 1990, 1155, 287, 30, 23801, 1232, 674...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14353, 12, 412, 4672, 1479, 273, 21137, 18, 4936, 87, 63, 412, 18, 710, 1435, 65, 880, 1546, 19, 91, 19, 13044, 18, 84, 2620, 35, 2649, 33, 1990, 1155, 287, 30, 23801, 1232, 674...
id = self.pool.get('ir.model.data')._update_dummy(self.cr, self.uid, record.model, self.module, record.id)
id = self.pool.get('ir.model.data')._update_dummy(self.cr, 1, record.model, self.module, record.id)
def process_record(self, node): import osv record, fields = node.items()[0] model = self.get_model(record.model) if isinstance(model, osv.osv.osv_memory): record_dict=self.create_osv_memory_record(record, fields) else: self.validate_xml_id(record.id) if self.isnoupdate(record) and self.mode != 'init': id = self.pool.get('ir.model.data')._update_dummy(self.cr, self.uid, record.model, self.module, record.id) # check if the resource already existed at the last update if id: self.id_map[record] = int(id) return None else: if not self._coerce_bool(record.forcecreate): return None
9ec0865f7c8ce62032212bcee73dc1b1f39c2b04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9ec0865f7c8ce62032212bcee73dc1b1f39c2b04/yaml_import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 3366, 12, 2890, 16, 756, 4672, 1930, 1140, 90, 1409, 16, 1466, 273, 756, 18, 3319, 1435, 63, 20, 65, 938, 273, 365, 18, 588, 67, 2284, 12, 3366, 18, 2284, 13, 309, 1549, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 3366, 12, 2890, 16, 756, 4672, 1930, 1140, 90, 1409, 16, 1466, 273, 756, 18, 3319, 1435, 63, 20, 65, 938, 273, 365, 18, 588, 67, 2284, 12, 3366, 18, 2284, 13, 309, 1549, ...
raise ValueError("Empty slice")
return slice(*bits)
def _select(b, d): try: return int(b) except ValueError: return d
e656d919379d3074385aaa63af99e11b9dbe59a2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4645/e656d919379d3074385aaa63af99e11b9dbe59a2/indexshell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4025, 12, 70, 16, 302, 4672, 775, 30, 327, 509, 12, 70, 13, 1335, 2068, 30, 327, 302, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4025, 12, 70, 16, 302, 4672, 775, 30, 327, 509, 12, 70, 13, 1335, 2068, 30, 327, 302, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Originally by Eric Koome license GPL http://code.activestate.com/recipes/305279/
def enumerate_processes(): """Return list of module names (e.g., firefox.exe) of running processes Originally by Eric Koome license GPL http://code.activestate.com/recipes/305279/ """ hModule = c_ulong() count = c_ulong() modname = c_buffer(30) PROCESS_QUERY_INFORMATION = 0x0400 PROCESS_VM_READ = 0x0010 modnames = [] for pid in win32process.EnumProcesses(): # Get handle to the process based on PID hProcess = kernel.OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, False, pid) if hProcess: psapi.EnumProcessModules(hProcess, byref(hModule), sizeof(hModule), byref(count)) psapi.GetModuleBaseNameA(hProcess, hModule.value, modname, sizeof(modname)) clean_modname = "".join([ i for i in modname if i != '\x00']).lower() if len(clean_modname) > 0: modnames.append(clean_modname) # Clean up for i in range(modname._length_): modname[i] = '\x00' kernel.CloseHandle(hProcess) return modnames
f364551140aa590b8e580257b18ae82b7d5dede4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/f364551140aa590b8e580257b18ae82b7d5dede4/Windows.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4241, 67, 18675, 13332, 3536, 990, 666, 434, 1605, 1257, 261, 73, 18, 75, 12990, 4452, 13873, 18, 14880, 13, 434, 3549, 8488, 3536, 225, 366, 3120, 273, 276, 67, 332, 932, 1435, 1056, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4241, 67, 18675, 13332, 3536, 990, 666, 434, 1605, 1257, 261, 73, 18, 75, 12990, 4452, 13873, 18, 14880, 13, 434, 3549, 8488, 3536, 225, 366, 3120, 273, 276, 67, 332, 932, 1435, 1056, ...
kit = dbus.SystemBus().get_object('org.freedesktop.PolicyKit','/')
kit = dbus.SessionBus().get_object('org.freedesktop.PolicyKit.AuthenticationAgent','/')
def __auth_perms(self, id):
704e07ba9563d52711076ee1730379a628cf2401 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11198/704e07ba9563d52711076ee1730379a628cf2401/dbushandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1944, 67, 15969, 12, 2890, 16, 612, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1944, 67, 15969, 12, 2890, 16, 612, 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,...
ocu=0 x=0
ocu = 0 x = 0
def overcount(st,p): """Returns how many p are on st, works even for overlapping""" ocu=0 x=0 while 1: try: i=st.index(p,x) except ValueError: break ocu=ocu+1 x=i+1 return ocu
9d20501f87a48e7d08b8c8ab193dd1ec8b75d714 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/9d20501f87a48e7d08b8c8ab193dd1ec8b75d714/MeltingTemp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1879, 1883, 12, 334, 16, 84, 4672, 3536, 1356, 3661, 4906, 293, 854, 603, 384, 16, 6330, 5456, 364, 18620, 8395, 320, 6319, 273, 374, 619, 273, 374, 1323, 404, 30, 775, 30, 277, 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, 1879, 1883, 12, 334, 16, 84, 4672, 3536, 1356, 3661, 4906, 293, 854, 603, 384, 16, 6330, 5456, 364, 18620, 8395, 320, 6319, 273, 374, 619, 273, 374, 1323, 404, 30, 775, 30, 277, 33, ...
self.buffer = self.buffer + data
self.buffer += data
def collect_incoming_data(self, data): self.buffer = self.buffer + data
9347fd3b7b57e7415ecff64950d99accfc0f5198 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/9347fd3b7b57e7415ecff64950d99accfc0f5198/test_asynchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 31033, 67, 892, 12, 2890, 16, 501, 4672, 365, 18, 4106, 273, 365, 18, 4106, 397, 501, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 31033, 67, 892, 12, 2890, 16, 501, 4672, 365, 18, 4106, 273, 365, 18, 4106, 397, 501, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
summary.append(str(exception.message))
summary.append(str(exception.message or type(exception)))
def formatException(exception): summary = [] extended = [] # Turn the stack and exception into a string stack = "".join(traceback.format_tb(sys.exc_info()[2])) stack += "%s %s" % sys.exc_info()[0:2] if hasattr(exception, 'annotations'): # This exception has been annotated along the way for brief, details in exception.annotations[::-1]: summary.append(brief) extended.append(details) else: summary.append(str(exception.message)) details = getattr(exception, 'debugMessage', None) if details: extended.append(str(details)) summary = " | ".join(summary) extended.append(stack) extended = "\n--\n".join(extended) return summary, extended
d047757d392bc6da8373116121f231fcf94752dd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/d047757d392bc6da8373116121f231fcf94752dd/errors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 503, 12, 4064, 4672, 4916, 273, 5378, 7021, 273, 5378, 225, 468, 22425, 326, 2110, 471, 1520, 1368, 279, 533, 2110, 273, 1408, 18, 5701, 12, 21696, 18, 2139, 67, 18587, 12, 9499, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 503, 12, 4064, 4672, 4916, 273, 5378, 7021, 273, 5378, 225, 468, 22425, 326, 2110, 471, 1520, 1368, 279, 533, 2110, 273, 1408, 18, 5701, 12, 21696, 18, 2139, 67, 18587, 12, 9499, ...
path = os.path.join(prefix, file[3:])
path = '/'.join((prefix, file[3:]))
def getdocinfo(file, prefix=''): path = os.path.join(prefix, file[3:]) prettyname = (os.path.splitext(os.path.split(file)[-1])[0]) prettyname = prettyname[0].capitalize() + prettyname[1:] if file.find('html') >= 0: info = open(file).readlines(2)[1] else: info = open(file).readline().strip().capitalize() return path, prettyname, info
4a9e5090fb22c5999513d6bc0959c91481956b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1298/4a9e5090fb22c5999513d6bc0959c91481956b59/makedocs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2434, 1376, 12, 768, 16, 1633, 2218, 11, 4672, 589, 273, 2023, 18, 5701, 12443, 3239, 16, 585, 63, 23, 30, 22643, 7517, 529, 273, 261, 538, 18, 803, 18, 4939, 408, 12, 538, 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, 336, 2434, 1376, 12, 768, 16, 1633, 2218, 11, 4672, 589, 273, 2023, 18, 5701, 12443, 3239, 16, 585, 63, 23, 30, 22643, 7517, 529, 273, 261, 538, 18, 803, 18, 4939, 408, 12, 538, 18, ...
raise "\nERROR: Invalid Tree Item. "
raise Exception("\nERROR: Invalid Tree Item. ")
def GetLastChild(self, item): """Gets the item last child."""
e1463b9df091ad0e9d76292564d4389882b28de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/e1463b9df091ad0e9d76292564d4389882b28de1/customtreectrl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 3024, 1763, 12, 2890, 16, 761, 4672, 3536, 3002, 326, 761, 1142, 1151, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 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, 968, 3024, 1763, 12, 2890, 16, 761, 4672, 3536, 3002, 326, 761, 1142, 1151, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.iacseq = ''
self.iacseq = b''
def process_rawq(self): """Transfer from raw queue to cooked queue.
3de7fb86fc9e053955dae144b4fe6e080f5a4d81 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/3de7fb86fc9e053955dae144b4fe6e080f5a4d81/telnetlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1899, 85, 12, 2890, 4672, 3536, 5912, 628, 1831, 2389, 358, 15860, 329, 2389, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1899, 85, 12, 2890, 4672, 3536, 5912, 628, 1831, 2389, 358, 15860, 329, 2389, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
this = apply(_quickfix.new_BasisFeaturePrice, args)
this = _quickfix.new_BasisFeaturePrice(*args)
def __init__(self, *args): this = apply(_quickfix.new_BasisFeaturePrice, 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, 11494, 291, 4595, 5147, 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, 11494, 291, 4595, 5147, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, unknow_dict): res = self.name_get(cr, uid, ids)
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): res = self.name_get(cr, uid, ids, context=context)
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, unknow_dict): res = self.name_get(cr, uid, ids) return dict(res)
fdbb578a32931b94e8c52224a86ff66ecd15aedb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fdbb578a32931b94e8c52224a86ff66ecd15aedb/partner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 529, 67, 588, 67, 4293, 71, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 2270, 16, 640, 79, 3338, 67, 6102, 16, 819, 33, 7036, 4672, 400, 273, 365, 18, 529, 67, 588, 12, 3353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 529, 67, 588, 67, 4293, 71, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 2270, 16, 640, 79, 3338, 67, 6102, 16, 819, 33, 7036, 4672, 400, 273, 365, 18, 529, 67, 588, 12, 3353, ...
makefile = get_file('Makefile.am')
try: makefile = get_file('Makefile.am') except IOError: return
def recurse(each): cwd = os.getcwd() makefile = get_file('Makefile.am') each(makefile) subdirs = get_list(makefile, 'SUBDIRS') for s in subdirs: os.chdir(s) recurse(each) os.chdir(cwd)
345401c0430655f777c1f694a7c0c737863130b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6176/345401c0430655f777c1f694a7c0c737863130b6/update-msvc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11502, 12, 13798, 4672, 7239, 273, 1140, 18, 588, 11089, 1435, 775, 30, 1221, 768, 273, 336, 67, 768, 2668, 6464, 768, 18, 301, 6134, 1335, 8340, 30, 327, 1517, 12, 6540, 768, 13, 720,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11502, 12, 13798, 4672, 7239, 273, 1140, 18, 588, 11089, 1435, 775, 30, 1221, 768, 273, 336, 67, 768, 2668, 6464, 768, 18, 301, 6134, 1335, 8340, 30, 327, 1517, 12, 6540, 768, 13, 720,...
self.textview = gtk.TextView(buffer=None)
self.textview = gtk.TextView(buffer=buff)
def __init__(self) : self.window = gtk.Window(type=gtk.WINDOW_TOPLEVEL) self.window.set_default_size(150,150) #We open the note file or create it if it doesn't exist if os.path.exists(zefile) : f = open(zefile,mode='r') # sanitize the pretty XML stringed = f.read().replace('\n','').replace('\t','') try : doc = xml.dom.minidom.parseString(stringed) except : return 0 #the file didn't exist, create it now else : doc = xml.dom.minidom.Document() content = doc.createElement("task") doc.appendChild(content) #then we create the file f = open(zefile, mode='a+') f.write(doc.toxml().encode("utf-8")) f.close() self.textview = gtk.TextView(buffer=None) self.window.add(self.textview) self.window.connect("destroy", self.close) self.window.show_all()
4112f42d8fe373bb5b16dfeee8c3d3e2d854aca3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7036/4112f42d8fe373bb5b16dfeee8c3d3e2d854aca3/textview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 13, 294, 365, 18, 5668, 273, 22718, 18, 3829, 12, 723, 33, 4521, 79, 18, 23407, 67, 10462, 10398, 13, 365, 18, 5668, 18, 542, 67, 1886, 67, 1467, 12, 23014...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13, 294, 365, 18, 5668, 273, 22718, 18, 3829, 12, 723, 33, 4521, 79, 18, 23407, 67, 10462, 10398, 13, 365, 18, 5668, 18, 542, 67, 1886, 67, 1467, 12, 23014...
execute(['rm', '/tmp/%s.bak.%s' % (file.replace('/', '_'), bkp_ext)])
execute(['sudo', 'rm', '/tmp/%s.bak.%s' % (file.replace('/', '_'), bkp_ext)])
def compare_delete_backups(mode): test_message('''comparing backups of system files after tests for side-effects alterations.''') if mode == 'unix': for file in system_files: if os.path.exists('/etc/%s' % file): log_and_exec(['/usr/bin/colordiff', '/etc/%s' % file, '/tmp/%s.bak.%s' % (file.replace('/', '_'), bkp_ext)], False, comment="should not display any diff (system has been cleaned).", verb = True) execute(['rm', '/tmp/%s.bak.%s' % (file.replace('/', '_'), bkp_ext)]) elif mode == 'ldap': execute(['slapcat', '-l', '/tmp/backup.2.ldif']) log_and_exec(['/usr/bin/colordiff', '/tmp/backup.1.ldif', '/tmp/backup.2.ldif'], False, comment="should not display any diff (system has been cleaned).", verb = True) execute(['rm', '/tmp/backup.1.ldif', '/tmp/backup.2.ldif']) else: logging.error('backup mode not understood.') test_message('''system config files backup comparison finished successfully.''')
07cb13c975b820cb15074a8378ec89357e5846f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/07cb13c975b820cb15074a8378ec89357e5846f4/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 3733, 67, 9572, 87, 12, 3188, 4672, 1842, 67, 2150, 2668, 6309, 832, 12583, 22091, 434, 2619, 1390, 1839, 7434, 364, 4889, 17, 13867, 87, 10182, 1012, 1093, 11, 6134, 225, 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, 3400, 67, 3733, 67, 9572, 87, 12, 3188, 4672, 1842, 67, 2150, 2668, 6309, 832, 12583, 22091, 434, 2619, 1390, 1839, 7434, 364, 4889, 17, 13867, 87, 10182, 1012, 1093, 11, 6134, 225, 309,...
page.nextId = lambda glViewPage: -1
page.nextId = MooseGLWizard.nextIdFinal page.setFinalPage(True)
def _makeGLViewPage(self): page = QtGui.QWizardPage() page.nextId = lambda glViewPage: -1 page.setTitle('Select GLView Target ') page.setSubTitle('Expand the model tree and select an element to observe in 3-D') tree = MooseTreeWidget() self.connect(tree, QtCore.SIGNAL('itemClicked(QTreeWidgetItem*, int)'), self._setTargetObject)
be3e58f7f4dd39482671059727fe5a19aec0e72f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/be3e58f7f4dd39482671059727fe5a19aec0e72f/glwizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 11261, 1767, 1964, 12, 2890, 4672, 1363, 273, 23425, 18, 53, 27130, 1964, 1435, 1363, 18, 4285, 548, 273, 14987, 2584, 11261, 27130, 18, 4285, 548, 7951, 1363, 18, 542, 7951, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 11261, 1767, 1964, 12, 2890, 4672, 1363, 273, 23425, 18, 53, 27130, 1964, 1435, 1363, 18, 4285, 548, 273, 14987, 2584, 11261, 27130, 18, 4285, 548, 7951, 1363, 18, 542, 7951, ...
self.setText("%dMB " + _("free diskspace") % (free))
self.setText(("%dMB " + _("free diskspace")) % (free))
def update(self): try: stat = os.statvfs(self.path) except OSError: return -1 if self.type == self.FREE: free = stat.f_bfree / 1000 * stat.f_bsize / 1000 self.setText("%dMB " + _("free diskspace") % (free))
a9f9792e9d271864182d32bfff58795690084cab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/a9f9792e9d271864182d32bfff58795690084cab/DiskInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 775, 30, 610, 273, 1140, 18, 5642, 90, 2556, 12, 2890, 18, 803, 13, 1335, 10002, 30, 327, 300, 21, 225, 309, 365, 18, 723, 422, 365, 18, 28104, 30, 4843, 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, 1089, 12, 2890, 4672, 775, 30, 610, 273, 1140, 18, 5642, 90, 2556, 12, 2890, 18, 803, 13, 1335, 10002, 30, 327, 300, 21, 225, 309, 365, 18, 723, 422, 365, 18, 28104, 30, 4843, 273, ...
self.log.error('Erros in the job submission: %s' % result['Message'])
self.log.error('Errors in the job submission: %s' % result['Message'])
def execute(self): """ Main execution method """
de53db04094ffe536f00b063457d17fbef5ab7b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/de53db04094ffe536f00b063457d17fbef5ab7b7/SiteDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 3536, 12740, 4588, 707, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1836, 12, 2890, 4672, 3536, 12740, 4588, 707, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
content_source()
def content_source(): global subject, errors try: url = 'http://localhost:7080/rhq-rhq-enterprise-server-ejb3/ContentSourceManagerBean?wsdl' start(url) client = Client(url) print client # # create a configuration # configuration = client.factory.create('configuration') entry = client.factory.create('configuration.tns:properties.tns:entry') simple = client.factory.create('propertySimple') entry.key = 'location' simple.name = 'location' simple.stringValue = 'http://download.skype.com/linux/repos/fedora/updates/i586' entry.value = simple configuration.properties.entry.append(entry) configuration.notes = 'SkipeAdapter' configuration.version = 1234 print configuration # # create: name, description and type. # name = 'SkipeAdapter' description = 'The skipe adapter' type = 'YumSource' # # create a content source. # print 'createContentSource()' result = client.service.createContentSource( subject, name, description, type, configuration, False) print 'createContentSource: ', str(result) except Exception, e: errors += 1 print e
2cb1c83f06fef913af0e0ba5179bb9d7bb0100f7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5930/2cb1c83f06fef913af0e0ba5179bb9d7bb0100f7/rhq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 67, 3168, 13332, 225, 2552, 3221, 16, 1334, 225, 775, 30, 880, 273, 296, 2505, 2207, 13014, 30, 7301, 3672, 19, 30138, 85, 17, 30138, 85, 17, 2328, 12113, 17, 3567, 17, 73, 10649,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 67, 3168, 13332, 225, 2552, 3221, 16, 1334, 225, 775, 30, 880, 273, 296, 2505, 2207, 13014, 30, 7301, 3672, 19, 30138, 85, 17, 30138, 85, 17, 2328, 12113, 17, 3567, 17, 73, 10649,...
def makegreylist(self): return []
/* For now we declare them forward here. They'll go to mactoolbox later */ staticforward PyObject *TXNObj_New(TXNObject); staticforward int TXNObj_Convert(PyObject *, TXNObject *); staticforward PyObject *TXNFontMenuObj_New(TXNFontMenuObject); staticforward int TXNFontMenuObj_Convert(PyObject *, TXNFontMenuObject *);
def makegreylist(self): return []
7cb7b5d4ad4ecc45411476c23090ffddbfcfa35e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7cb7b5d4ad4ecc45411476c23090ffddbfcfa35e/mltesupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 11556, 93, 1098, 12, 2890, 4672, 327, 5378, 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, 1221, 11556, 93, 1098, 12, 2890, 4672, 327, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
bestNode = None
bestNode = None
def _getBestOpenNode(self): bestNode = None for n in self.on: if not bestNode: bestNode = n else: if n.score<=bestNode.score: bestNode = n return bestNode
db5e486ce08d4d56bdca35160b820bcab1d43c7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4470/db5e486ce08d4d56bdca35160b820bcab1d43c7f/astar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 14173, 3678, 907, 12, 2890, 4672, 3796, 907, 273, 599, 364, 290, 316, 365, 18, 265, 30, 309, 486, 3796, 907, 30, 3796, 907, 273, 290, 469, 30, 309, 290, 18, 6355, 32, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 14173, 3678, 907, 12, 2890, 4672, 3796, 907, 273, 599, 364, 290, 316, 365, 18, 265, 30, 309, 486, 3796, 907, 30, 3796, 907, 273, 290, 469, 30, 309, 290, 18, 6355, 32, 33, ...
if arg is "--clean":
if "--clean" in arg:
def run_tests(argv): cleanval = 0 #scan for --help and --clean if len(argv) > 1: for arg in argv: if arg is "--help": do_help(); exit(0) if arg is "--clean": clean = 1 print("Starting autotest script") there_dir = os.getcwd() err_ct = 0 # determine where the script starts here_dir = os.getcwd() print("Starting from \'"+here_dir+"\'") #determine where we _want_ the script to start if len(argv) > 1: argn = 1 while argn < len(argv): if argv[argn][0] == '-': argn+=1 # ignore anything that looks like a flag else: there_dir = argv[argn] # take the first path and be done with it # poor form but we're not doing much complicated break #locate autotest dirs #autotestdirs = find_autotest_dirs(there_dir) autotestdirs = [] for path, dirs, files in os.walk(there_dir): if "autotest" in dirs: autotestdirs.append(os.path.abspath(os.path.join(path,"autotest"))) for path in autotestdirs: print("Found dir: \'"+path+"\'") #locate autotest test files #autotestfiles = find_autotest_files(autotestdirs) autotestfiles = [] for path in autotestdirs: for file in os.listdir(path): if "test_" in file and ".glm" in file: autotestfiles.append((path, file)) for path, file in autotestfiles: print("Found file: \'"+file+"\'") #build test dirs #for file in autotestfiles: errlist=[] cleanlist=[] errct = 0 for path, file in autotestfiles: err = False slice = file[:-4] currpath = os.getcwd() xpath = os.path.join(path,slice) # path/slice xfile = os.path.join(xpath,file) # path/slice/file.glm if not os.path.exists(xpath): os.mkdir(xpath) if os.path.exists(os.path.join(xpath,"gridlabd.xml")): os.remove(os.path.join(xpath,"gridlabd.xml")) shutil.copy2(os.path.join(path,file), xfile) # path/file to path/slice/file os.chdir(xpath) #print("cwd: "+xpath) # build conf files # moo? #run files with popen #run file with: outfile = open(os.path.join(xpath,"outfile.txt"), "w") errfile = open(os.path.join(xpath,"errfile.txt"), "w") #print("NOTICE: Running \'"+xfile+"\'") rv = subprocess.call(["gridlabd",xfile],stdout=outfile,stderr=errfile) outfile.close() errfile.close() if os.path.exists(os.path.join(xpath,"gridlabd.xml")): if rv == 0: # didn't succeed if gridlabd.xml exists rv = 1 # handle results if "err_" in file: if rv == 0: if "opt_" in file: print("WARNING: Optional file "+file+" converged when it shouldn't've!") cleanlist.append((path, file)) err = False else: print("ERROR: "+file+" converged when it shouldn't've!") errct += 1 err = True else: print("SUCCESS: File "+file+" failed to converge, as planned.") cleanlist.append((path, file)) else: if rv != 0: if "opt_" in file: print("WARNING: Optional file "+file+" failed to converge!") cleanlist.append((path, file)) err = False else: errct += 1 print("ERROR: "+file+" failed to converge!") err = True else: print("SUCCESS: File "+file+" converged successfully.") cleanlist.append((path, file)) if err: # zip target directory errlist.append((path,file)) os.chdir(currpath) #print("cwd: "+currpath) # end autotestfiles loop #cleanup as appropriate #for cleanfile, cleanpath in cleanlist: # for path, dirs, file in os.walk(cleanpath): # print("foo") #end #print("bar") #return success/failure print("Validation detected "+str(errct)+" models with errors.") for errpath, errfile in errlist: print(" * "+os.path.join(errpath, errfile)) #exit(errct) return errct
b8bb6a053429b059fc7bf3dbab0e6c3e17423b66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/43/b8bb6a053429b059fc7bf3dbab0e6c3e17423b66/validate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 12, 19485, 4672, 2721, 1125, 273, 374, 468, 9871, 364, 1493, 5201, 471, 1493, 6200, 309, 562, 12, 19485, 13, 405, 404, 30, 364, 1501, 316, 5261, 30, 309, 1501, 353, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 16341, 12, 19485, 4672, 2721, 1125, 273, 374, 468, 9871, 364, 1493, 5201, 471, 1493, 6200, 309, 562, 12, 19485, 13, 405, 404, 30, 364, 1501, 316, 5261, 30, 309, 1501, 353, 52...
opt['inline_threshold'] = 1
opt['inline_threshold'] = self.config.translation.backendopt.inline_threshold
def task_backendopt_ootype(self): from pypy.translator.backendopt.all import backend_optimizations opt = dict( raisingop2direct_call=False, inline_threshold=0, mallocs=False, merge_if_blocks=False, constfold=False, heap2stack=False, clever_malloc_removal=False) if self.config.translation.backend == 'cli': opt['merge_if_blocks'] = True opt['inline_threshold'] = 1 opt['mallocs'] = True if self.config.translation.backend == 'jvm': opt['inline_threshold'] = 1 opt['mallocs'] = True backend_optimizations(self.translator, **opt)
cbc689899310df24d3ed6d950e6d26cdd3b2fb1b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/cbc689899310df24d3ed6d950e6d26cdd3b2fb1b/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1562, 67, 9993, 3838, 67, 1632, 388, 12, 2890, 4672, 628, 18951, 93, 18, 17879, 18, 9993, 3838, 18, 454, 1930, 4221, 67, 16689, 7089, 2153, 273, 2065, 12, 28014, 556, 22, 7205, 67, 199...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1562, 67, 9993, 3838, 67, 1632, 388, 12, 2890, 4672, 628, 18951, 93, 18, 17879, 18, 9993, 3838, 18, 454, 1930, 4221, 67, 16689, 7089, 2153, 273, 2065, 12, 28014, 556, 22, 7205, 67, 199...
EXECUTE IMMEDIATE 'CREATE SEQUENCE %(sq_name)s';
EXECUTE IMMEDIATE 'CREATE SEQUENCE "%(sq_name)s"';
def autoinc_sql(self, table, column):
e92f4ec1ffefa8a7b6284c26ce16a8b651469a1a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5285/e92f4ec1ffefa8a7b6284c26ce16a8b651469a1a/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2059, 885, 71, 67, 4669, 12, 2890, 16, 1014, 16, 1057, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2059, 885, 71, 67, 4669, 12, 2890, 16, 1014, 16, 1057, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def getTransformations(self):
def getTransformations( self ):
def getTransformations(self): # Obtain the transformations to be executed transName = self.am_getOption('Transformation','All') if transName == 'All': gLogger.info("%s.getTransformations: Initializing general purpose agent." % AGENT_NAME) res = self.transDB.getTransformations({'Status':['Active','Completing','Flush']},extraParams=True) if not res['OK']: gLogger.error("%s.getTransformations: Failed to get transformations." % AGENT_NAME, res['Message']) return res transformations = res['Value'] gLogger.info("%s.getTransformations: Obtained %d transformations to process" % (AGENT_NAME,len(transformations))) else: gLogger.info("%s.getTransformations: Initializing for transformation %s." % (AGENT_NAME,transName)) res = self.transDB.getTransformation(transName,extraParams=True) if not res['OK']: gLogger.error("%s.getTransformations: Failed to get transformation." % AGENT_NAME, res['Message']) return res transformations = [res['Value']] return S_OK(transformations)
5b98b3b45ce744b0fa8f66e9d9812d0b7910a0ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/5b98b3b45ce744b0fa8f66e9d9812d0b7910a0ab/TransformationAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 4059, 1012, 12, 365, 262, 30, 468, 24850, 326, 19245, 358, 506, 7120, 906, 461, 273, 365, 18, 301, 67, 588, 1895, 2668, 15292, 17023, 1595, 6134, 309, 906, 461, 422, 296, 1595, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 4059, 1012, 12, 365, 262, 30, 468, 24850, 326, 19245, 358, 506, 7120, 906, 461, 273, 365, 18, 301, 67, 588, 1895, 2668, 15292, 17023, 1595, 6134, 309, 906, 461, 422, 296, 1595, 42...
__metaclass__ = MetaMemoize _instances = weakref.WeakValueDictionary() def __new__(cls, connection, *args): key = cls, connection.username, args if key in cls._instances.keys(): return cls._instances[key], False else: instance = object.__new__(cls, connection, *args) cls._instances[key] = instance return instance, True
def __call__(cls, connection, *args): obj, newlyCreated = cls.__new__(cls, connection, *args) if newlyCreated: obj.__init__(connection, connection.get_handle_id(), *args) _moduleLogger.info("New Handle %r" % obj) return obj
662a95ad50d99c99e78b7e5207834c14ac91ec2c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13096/662a95ad50d99c99e78b7e5207834c14ac91ec2c/handle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 6429, 16, 1459, 16, 380, 1968, 4672, 1081, 16, 10894, 6119, 273, 2028, 16186, 2704, 972, 12, 6429, 16, 1459, 16, 380, 1968, 13, 309, 10894, 6119, 30, 1081, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 972, 12, 6429, 16, 1459, 16, 380, 1968, 4672, 1081, 16, 10894, 6119, 273, 2028, 16186, 2704, 972, 12, 6429, 16, 1459, 16, 380, 1968, 13, 309, 10894, 6119, 30, 1081, 16186, ...
"""PanedWindow - Multi-pane container widget. Panes are resizable.
"""PanedWindow - Multi-pane container widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.The user changes the sizes of the panes by dragging the resize handle between two panes.
def enable(self, name): self.tk.call(self._w, 'enable', name)
f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 12, 2890, 16, 508, 4672, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 7589, 2187, 508, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 12, 2890, 16, 508, 4672, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 7589, 2187, 508, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
format = logConf.get('format')
format = depsLogConf.get('format')
def depsToDotFile(logConf, gr): if logConf.get('format', None): format = mode = None format = logConf.get('format') if format.find('/')>-1: format, mode = format.split('/',1) # e.g. 'dot/span-tree-only' if format == 'dot': classRoot = logConf.get('root') # get the spanning tree from the root node st, op = gr.breadth_first_search(root=classRoot) # and create a new graph from it gr1 = graph.digraph() st_nodes = set(st.keys() + st.values()) # add nodes # - rather gr.add_nodes(st), go through indiviudal nodes for coloring for cid in st_nodes: if cid == None: # None is introduced in st continue fsize = self._classes[cid]['size'] if fsize > 20000: color = "red" elif fsize > 5000: color = "green" else: color = "blue" gr1.add_node(cid, attrs=[("color", color)]) # add edges # - rather gr.add_spanning_tree(st), go through individual edges for coloring for v in st.iteritems(): if None in v: # drop edges with a None node continue v2, v1 = v if gr.has_edge(v1,v2): gr1.add_edge(v1, v2, attrs=gr.get_edge_attributes(v1, v2)) else: gr1.add_edge(v1, v2, ) if not mode or not mode == "span-tree-only": # add additional dependencies for v1 in st_nodes: # that are not covered by the span tree for v2 in st_nodes: if gr.has_edge(v1, v2): gr1.add_edge(v1, v2, attrs=gr.get_edge_attributes(v1, v2)) # write dot file if dset == "loadtime": file = logConf.get('file', "loaddeps.dot") elif dset == "runtime": file = logConf.get('file', "rundeps.dot") else: file = logConf.get('file', "deps.dot") dot = gr1.write(fmt='dotwt') self._console.info("Writing dependency graph to file: %s" % file) open(file, 'w').write(dot) return
c18752e3a6a20f73f8cace28d0b3ee01558d13f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/c18752e3a6a20f73f8cace28d0b3ee01558d13f0/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8740, 774, 10412, 812, 12, 1330, 3976, 16, 3821, 4672, 309, 613, 3976, 18, 588, 2668, 2139, 2187, 599, 4672, 740, 273, 1965, 273, 599, 740, 273, 8740, 1343, 3976, 18, 588, 2668, 2139, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8740, 774, 10412, 812, 12, 1330, 3976, 16, 3821, 4672, 309, 613, 3976, 18, 588, 2668, 2139, 2187, 599, 4672, 740, 273, 1965, 273, 599, 740, 273, 8740, 1343, 3976, 18, 588, 2668, 2139, ...
if isInt(regT) or regT[0:2] == "0x": imm = hexorint(regT)
if isInt(regT) or isHex(regT):
def parse_alu(instruc = "", word_buf = ""): if instruc == "" or word_buf == "": print "ERROR: someone accidentally the code in parse_alu" return "-1" instruc = sanitize(instruc) ins = instruc[0] regD = instruc[1] regS = instruc[2] regT = instruc[3] regD = reg2bin(regD) regS = reg2bin(regS) word_buf += regD word_buf += regS if ins == "add": if isInt(regT) or regT[0:2] == "0x": imm = hexorint(regT) word_buf += "1" word_buf += int2bin(imm, 5) else: word_buf += "000" word_buf += reg2bin(regT) elif ins == "mul": word_buf += "001" word_buf += reg2bin(regT) elif ins == "sub": word_buf += "010" word_buf += reg2bin(regT) elif ins == "div": word_buf += "011" word_buf += reg2bin(regT) else: print "ERROR: someone accidentally'd the parse_alu method" return "-1" return word_buf
3544f255124af0db34ea242b135b6b6390308500 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4891/3544f255124af0db34ea242b135b6b6390308500/assembler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 700, 12, 267, 701, 5286, 273, 23453, 2076, 67, 4385, 273, 1408, 4672, 309, 16170, 5286, 422, 1408, 578, 2076, 67, 4385, 422, 1408, 30, 1172, 315, 3589, 30, 18626, 25961, 1230, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 700, 12, 267, 701, 5286, 273, 23453, 2076, 67, 4385, 273, 1408, 4672, 309, 16170, 5286, 422, 1408, 578, 2076, 67, 4385, 422, 1408, 30, 1172, 315, 3589, 30, 18626, 25961, 1230, ...
c.execute("""UPDATE settings SET data=%s WHERE value=%s AND hostname=%s""", (value, key, self._host))
query = """UPDATE settings SET data=%s WHERE value=%s AND""" dat = [value, key] if self._host == 'NULL': query += ' hostname IS NULL' else: query += ' hostname=%s' dat.append(self._host) c.execute(query, dat)
def __setitem__(self, key, value): if key not in self._db.settings[self._host]: self.__getitem__(key) c = self._db.cursor(self._log) if key not in self._db.settings[self._host]: c.execute("""INSERT INTO settings (value,data,hostname) (%s,%s,%s)""", (key, value, self._host)) else: c.execute("""UPDATE settings SET data=%s WHERE value=%s AND hostname=%s""", (value, key, self._host)) self._db.settings[self._host][key] = value
25c51a0b9ec8ec8dc662aac413c324972b539d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/25c51a0b9ec8ec8dc662aac413c324972b539d4a/MythBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 309, 498, 486, 316, 365, 6315, 1966, 18, 4272, 63, 2890, 6315, 2564, 14542, 365, 16186, 31571, 972, 12, 856, 13, 276, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 309, 498, 486, 316, 365, 6315, 1966, 18, 4272, 63, 2890, 6315, 2564, 14542, 365, 16186, 31571, 972, 12, 856, 13, 276, 273, 365, ...
self.modified = 1 self.nocalc = 0
self.modified = True self.nocalc = False
def openOptions(self): self.nocalc = 1 self.saveOptions() res = Options.Options(self).exec_() if res == 1: self.loadOptions() self.showcapmenuid.setChecked(self.capDistance) self.realmChanged(self.Realm.currentIndex()) self.modified = 1 self.nocalc = 0 self.restoreItem(self.itemattrlist[self.currentTabLabel]) else: self.nocalc = 0 self.calculate()
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, 1696, 1320, 12, 2890, 4672, 365, 18, 82, 23735, 71, 273, 404, 365, 18, 5688, 1320, 1435, 400, 273, 5087, 18, 1320, 12, 2890, 2934, 4177, 67, 1435, 309, 400, 422, 404, 30, 365, 18, 94...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1320, 12, 2890, 4672, 365, 18, 82, 23735, 71, 273, 404, 365, 18, 5688, 1320, 1435, 400, 273, 5087, 18, 1320, 12, 2890, 2934, 4177, 67, 1435, 309, 400, 422, 404, 30, 365, 18, 94...
security.declarePrivate('getCharset')
security.declareProtected(CMFCorePermissions.View, 'getCharset')
def SearchableText(self): """All fields marked as 'searchable' are concatenated together here for indexing purpose""" data = [] charset = self.getCharset() for field in self.Schema().fields(): if not field.searchable: continue method = getattr(self, field.accessor) try: datum = method(mimetype="text/plain") except TypeError: # retry in case typeerror was raised because accessor doesn't # handle the mimetype argument try: datum = method() except: continue if datum: type_datum = type(datum) if type_datum is type([]) or type_datum is type(()): datum = ' '.join(datum) # FIXME: we really need an unicode policy ! if type_datum is type(u''): datum = datum.encode(charset) data.append(str(datum))
553359c0bfff285f8558ea2b33e1d90aacd9bf9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/553359c0bfff285f8558ea2b33e1d90aacd9bf9a/BaseObject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5167, 429, 1528, 12, 2890, 4672, 3536, 1595, 1466, 9350, 487, 296, 3072, 429, 11, 854, 22080, 9475, 2674, 364, 14403, 13115, 8395, 501, 273, 5378, 4856, 273, 365, 18, 588, 9652, 1435, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5167, 429, 1528, 12, 2890, 4672, 3536, 1595, 1466, 9350, 487, 296, 3072, 429, 11, 854, 22080, 9475, 2674, 364, 14403, 13115, 8395, 501, 273, 5378, 4856, 273, 365, 18, 588, 9652, 1435, 36...
self.jobDicts[job] = jobDict
self.jobDicts[job] = dict(jobDict)
def __getJobDict(self, job): """ Get job constant Properties and keep them local to avoid quering the DB each time """ result = jobDB.getJobJDL(job) if not result['OK']: self.log.error(result['Message']) updateJobStatus( self.log, AGENT_NAME, job, 'Failed', 'No Job JDL Available', logRecord=True) return False
a64cbcca66884316b0b3c40c7a98bca2801cce6d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/a64cbcca66884316b0b3c40c7a98bca2801cce6d/Director.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 2278, 5014, 12, 2890, 16, 1719, 4672, 3536, 968, 1719, 5381, 6183, 471, 3455, 2182, 1191, 358, 4543, 21287, 310, 326, 2383, 1517, 813, 3536, 563, 273, 1719, 2290, 18, 588, 227...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 2278, 5014, 12, 2890, 16, 1719, 4672, 3536, 968, 1719, 5381, 6183, 471, 3455, 2182, 1191, 358, 4543, 21287, 310, 326, 2383, 1517, 813, 3536, 563, 273, 1719, 2290, 18, 588, 227...
else: try: idents = _descr_to_identifiers(descr) except ValueError, e: warnings.append('Bad group identifier list') return self._tmp_groups[arg] = idents self._tmp_group_order.append(arg)
return try: idents = _descr_to_identifiers(descr) except ValueError, e: warnings.append('Bad group identifier list') return self._tmp_groups[arg] = idents self._tmp_group_order.append(arg)
def _process_field(self, tag, arg, descr, warnings): if tag == 'group': if arg is None: warnings.append(tag+' expected an argument (group name)') else: try: idents = _descr_to_identifiers(descr) except ValueError, e: warnings.append('Bad group identifier list') return self._tmp_groups[arg] = idents self._tmp_group_order.append(arg) elif tag in ('variable', 'var'): if arg is None: warnings.append(tag+' expected a single argument') return if self._tmp_var.has_key(arg): warnings.append('Redefinition of @%s %s' % (tag, arg)) self._tmp_var[arg] = descr elif tag == 'type': if arg is None: warnings.append(tag+' expected a single argument') return if self._tmp_type.has_key(arg): warnings.append('Redefinition of @%s %s' % (tag, arg)) self._tmp_type[arg] = descr else: ObjDoc._process_field(self, tag, arg, descr, warnings)
1bdcaa661906ee198f52b061b725c621ba0ae305 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1bdcaa661906ee198f52b061b725c621ba0ae305/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 1518, 12, 2890, 16, 1047, 16, 1501, 16, 18426, 16, 5599, 4672, 309, 1047, 422, 296, 1655, 4278, 309, 1501, 353, 599, 30, 5599, 18, 6923, 12, 2692, 6797, 2665, 392, 1237,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2567, 67, 1518, 12, 2890, 16, 1047, 16, 1501, 16, 18426, 16, 5599, 4672, 309, 1047, 422, 296, 1655, 4278, 309, 1501, 353, 599, 30, 5599, 18, 6923, 12, 2692, 6797, 2665, 392, 1237,...
for key, dataset in self.datasets.items():
for number, dataset in self.datasets.items():
def _get_errors(self): errors = ErrorDict() errors.update(self.experiment.errors)
3a005105925cab60c4c84280ed5d3831b06dec8f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11933/3a005105925cab60c4c84280ed5d3831b06dec8f/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4324, 12, 2890, 4672, 1334, 273, 1068, 5014, 1435, 1334, 18, 2725, 12, 2890, 18, 18142, 18, 4324, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4324, 12, 2890, 4672, 1334, 273, 1068, 5014, 1435, 1334, 18, 2725, 12, 2890, 18, 18142, 18, 4324, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self._mergeDefaultsKw(kw)
self._mergeDefaultsKw(**kw)
def mergeDefaults(self, *args, **kw): """ added for compatibility with the config object used by SkunkWeb """ self._mergeDefaultsKw(kw) for dict in args: self._mergeDict(dict)
a9082d8573a9d8707983624969ee80c90d94dbf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/a9082d8573a9d8707983624969ee80c90d94dbf5/cfg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 7019, 12, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 3096, 364, 8926, 598, 326, 642, 733, 1399, 635, 10362, 1683, 4079, 3536, 365, 6315, 2702, 7019, 31833, 12, 636, 9987, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 7019, 12, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 3096, 364, 8926, 598, 326, 642, 733, 1399, 635, 10362, 1683, 4079, 3536, 365, 6315, 2702, 7019, 31833, 12, 636, 9987, 13,...
r""" Central binomial coefficients: $2n \choose n = \frac {(2n)!} {(n!)^2}$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000984;a Central binomial coefficients: C(2n,n) = (2n)!/(n!)^2 sage: a(0) 1 sage: a(2) 6 sage: a(8) 12870 sage: a.list(9) [1, 2, 6, 20, 70, 252, 924, 3432, 12870] AUTHOR: -- Jaap Spies (2007-01-26) """ def __init__(self):
def __init__(self): r""" Central binomial coefficients: $2n \choose n = \frac {(2n)!} {(n!)^2}$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000984;a Central binomial coefficients: C(2n,n) = (2n)!/(n!)^2 sage: a(0) 1 sage: a(2) 6 sage: a(8) 12870 sage: a.list(9) [1, 2, 6, 20, 70, 252, 924, 3432, 12870] AUTHOR: -- Jaap Spies (2007-01-26) """
def list(self, n): self._eval(n) # force computation return self._b[:n]
7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 16, 290, 4672, 365, 6315, 8622, 12, 82, 13, 282, 468, 2944, 16039, 327, 365, 6315, 70, 10531, 82, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 666, 12, 2890, 16, 290, 4672, 365, 6315, 8622, 12, 82, 13, 282, 468, 2944, 16039, 327, 365, 6315, 70, 10531, 82, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if name == 'license': log.debug("Skipping over multi-line license. Need to figure out how to deal with that.") continue
def sample_config(self): """Print sample config file. """
0ddb6fd27c124f6f8c0f0bcd640a4ba83ae1a9db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/0ddb6fd27c124f6f8c0f0bcd640a4ba83ae1a9db/OptionParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 67, 1425, 12, 2890, 4672, 3536, 5108, 3296, 642, 585, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 3296, 67, 1425, 12, 2890, 4672, 3536, 5108, 3296, 642, 585, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
nodes = [] nodes.extend(flatten_nodes(self.nodes)) return tuple(nodes)
nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelist)
def getChildNodes(self): nodes = [] nodes.extend(flatten_nodes(self.nodes)) return tuple(nodes)
101b9307b0d9de62f324ef9ffa6e83f8040af642 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/101b9307b0d9de62f324ef9ffa6e83f8040af642/ast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23895, 12, 2890, 4672, 2199, 273, 5378, 2199, 18, 14313, 12, 16940, 67, 4690, 12, 2890, 18, 4690, 3719, 327, 3193, 12, 4690, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23895, 12, 2890, 4672, 2199, 273, 5378, 2199, 18, 14313, 12, 16940, 67, 4690, 12, 2890, 18, 4690, 3719, 327, 3193, 12, 4690, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
parent = self.aq_inner.aq_parent if not parent or parent.portal_type != self.portal_type:
if not parentPortalTypeEqual(self):
def getLocallyAllowedTypes(self): """If enableTypeRestrictions is ENABLE, return the list of types set. If it is ACQUIRE, get the types set on the parent so long as the parent is of the same type - if not, use the same behaviuor as DISABLE: return the types allowable in the item. """ mode = self.getConstrainTypesMode()
5cf8f18365073b8b94cd0c4082f557fae5c1f16e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/5cf8f18365073b8b94cd0c4082f557fae5c1f16e/constraintypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1333, 1230, 5042, 2016, 12, 2890, 4672, 3536, 2047, 4237, 559, 26175, 353, 6693, 2782, 16, 327, 326, 666, 434, 1953, 444, 18, 971, 518, 353, 12048, 28689, 16, 336, 326, 1953, 444, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1333, 1230, 5042, 2016, 12, 2890, 4672, 3536, 2047, 4237, 559, 26175, 353, 6693, 2782, 16, 327, 326, 666, 434, 1953, 444, 18, 971, 518, 353, 12048, 28689, 16, 336, 326, 1953, 444, ...
itemref = self.data.pop()
try: itemref = self.data.pop() except KeyError: raise KeyError('pop from empty WeakSet')
def pop(self): while True: itemref = self.data.pop() item = itemref() if item is not None: return item
ee207d83e7f3e0863a23f8fc51946b8330a7604c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/ee207d83e7f3e0863a23f8fc51946b8330a7604c/_weakrefset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1843, 12, 2890, 4672, 1323, 1053, 30, 775, 30, 761, 1734, 273, 365, 18, 892, 18, 5120, 1435, 1335, 4999, 30, 1002, 4999, 2668, 5120, 628, 1008, 23632, 694, 6134, 761, 273, 761, 1734, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1843, 12, 2890, 4672, 1323, 1053, 30, 775, 30, 761, 1734, 273, 365, 18, 892, 18, 5120, 1435, 1335, 4999, 30, 1002, 4999, 2668, 5120, 628, 1008, 23632, 694, 6134, 761, 273, 761, 1734, 1...
index = unicode(index, ENCODING, 'r')
index = unicode(index, ENCODING, 'replace')
def __setitem__(self, index, value): if not isinstance(index, self._type): # this could crash, we don't care. if self._type == unicode and type(index) == str: index = unicode(index, ENCODING, 'r') elif self._type == str and type(index) == unicode: index = index.encode(ENCODING, 'r') index = self._type(index) if not index in self._dict: self._dict[index] = copy.deepcopy(self._schema) self._dict[index]._cfg_set(value)
72f191e6b0c25ad05258ef892d178d64a5aedee4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/72f191e6b0c25ad05258ef892d178d64a5aedee4/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 770, 16, 460, 4672, 309, 486, 1549, 12, 1615, 16, 365, 6315, 723, 4672, 468, 333, 3377, 17053, 16, 732, 2727, 1404, 7671, 18, 309, 365, 6315, 723, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 1726, 972, 12, 2890, 16, 770, 16, 460, 4672, 309, 486, 1549, 12, 1615, 16, 365, 6315, 723, 4672, 468, 333, 3377, 17053, 16, 732, 2727, 1404, 7671, 18, 309, 365, 6315, 723, ...
raise TestFailed
raise TestFailed, "didn't find obj in garbage (saveall)"
def test_saveall(): # Verify that cyclic garbage like lists show up in gc.garbage if the # SAVEALL option is enabled. debug = gc.get_debug() gc.set_debug(debug | gc.DEBUG_SAVEALL) l = [] l.append(l) id_l = id(l) del l gc.collect() try: for obj in gc.garbage: if id(obj) == id_l: del obj[:] break else: raise TestFailed gc.garbage.remove(obj) finally: gc.set_debug(debug)
e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5688, 454, 13332, 468, 8553, 716, 30383, 15340, 3007, 6035, 2405, 731, 316, 8859, 18, 75, 12332, 309, 326, 468, 17127, 3412, 4685, 1456, 353, 3696, 18, 1198, 273, 8859, 18, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5688, 454, 13332, 468, 8553, 716, 30383, 15340, 3007, 6035, 2405, 731, 316, 8859, 18, 75, 12332, 309, 326, 468, 17127, 3412, 4685, 1456, 353, 3696, 18, 1198, 273, 8859, 18, 588...
if template_string in template_defaults.keys(): template_string = template_defaults[template_string] edit_template = Template(template_string) def edit(obj, bg=False, editor=None):
if not(isinstance(template_string,Template)): template_string = Template(template_string) fields = set(template_fields(template_string)) if not(fields <= set(['file','line']) and ('file' in fields)): raise ValueError, "Only ${file} and ${line} are allowed as template variables, and ${file} must occur." edit_template = template_string def set_editor(editor_name,opts=''): r""" Sets the editor to be used by the edit command by basic editor name. Currently, the system only knows appropriate call strings for a limited number of editors. If you want to use another editor, you should set the whole edit template via set_edit_template. AUTHOR: Nils Bruin (2007-10-05) EXAMPLE: sage: from sage.misc.edit_module import set_editor sage: set_editor('vi') sage: sage.misc.edit_module.edit_template.template 'vi -c ${line} ${file}' """ if sage.misc.edit_module.template_defaults.has_key(editor_name): set_edit_template(Template(template_defaults[editor_name].safe_substitute(opts=opts))) else: raise ValueError, "editor_name not known. Try set_edit_template(<template_string>) instead." def edit(obj, editor=None, bg=None):
def set_edit_template(template_string): r""" Sets default edit template string. It should reference ${file} and ${line}. This routine normally needs to be called prior to using 'edit'. However, if the editor set in the shell variable EDITOR is known, then the system will substitute an appropriate template for you. See edit_module.template_defaults for the recognised templates. AUTHOR: Nils Bruin (2007-10-03) EXAMPLE: sage: from sage.misc.edit_module import set_edit_template sage: set_edit_template("echo EDIT ${file}:${line}") sage: edit(sage) # not tested EDIT /usr/local/sage/default/devel/sage/sage/__init__.py:1 """ global edit_template if template_string in template_defaults.keys(): template_string = template_defaults[template_string] edit_template = Template(template_string)
c5c86c494ff2abfe7e70af553b7f14151b54c3f1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c5c86c494ff2abfe7e70af553b7f14151b54c3f1/edit_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4619, 67, 3202, 12, 3202, 67, 1080, 4672, 436, 8395, 11511, 805, 3874, 1542, 533, 18, 225, 2597, 1410, 2114, 3531, 768, 97, 471, 3531, 1369, 5496, 1220, 12245, 15849, 4260, 358,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4619, 67, 3202, 12, 3202, 67, 1080, 4672, 436, 8395, 11511, 805, 3874, 1542, 533, 18, 225, 2597, 1410, 2114, 3531, 768, 97, 471, 3531, 1369, 5496, 1220, 12245, 15849, 4260, 358,...
logo_alt = Option('header_logo', 'alt', '',
logo_alt = Option('header_logo', 'alt', "(please configure the [header_logo] section in trac.ini)",
def get_templates_dirs(): """Return a list of directories containing the provided template files. """
8e47014d1f1ad00a2e9d79ced3fddb4fa8a7c57e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9317/8e47014d1f1ad00a2e9d79ced3fddb4fa8a7c57e/chrome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8502, 67, 8291, 13332, 3536, 990, 279, 666, 434, 6402, 4191, 326, 2112, 1542, 1390, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8502, 67, 8291, 13332, 3536, 990, 279, 666, 434, 6402, 4191, 326, 2112, 1542, 1390, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print "login! %r" % username print request['environ'].keys()
def do_process(self, request): """Handle the redirect from the OpenID server. """ oidconsumer = self.oidconsumer
827af4508a3662167554a248ae53a51d9c75b96c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/827af4508a3662167554a248ae53a51d9c75b96c/open_id.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2567, 12, 2890, 16, 590, 4672, 3536, 3259, 326, 3136, 628, 326, 25781, 1438, 18, 3536, 7764, 13230, 273, 365, 18, 839, 13230, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2567, 12, 2890, 16, 590, 4672, 3536, 3259, 326, 3136, 628, 326, 25781, 1438, 18, 3536, 7764, 13230, 273, 365, 18, 839, 13230, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
- `s` -- string
- `s` -- string
def vars_in_str(s): """ Given a string like 'mass/(length*time)', return the list ['mass', 'length', 'time']. INPUT: - `s` -- string OUTPUT: - list of strings (unit names) EXAMPLES:: sage: sage.symbolic.units.vars_in_str('mass/(length*time)') ['mass', 'length', 'time'] """ return re.findall('[a-z|_]+', s)
36d2f28c044694ad73a4a70a9d869366d0e39ec4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/36d2f28c044694ad73a4a70a9d869366d0e39ec4/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4153, 67, 267, 67, 701, 12, 87, 4672, 3536, 16803, 279, 533, 3007, 296, 10424, 19, 12, 2469, 14, 957, 13, 2187, 327, 326, 666, 10228, 10424, 2187, 296, 2469, 2187, 296, 957, 29489, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4153, 67, 267, 67, 701, 12, 87, 4672, 3536, 16803, 279, 533, 3007, 296, 10424, 19, 12, 2469, 14, 957, 13, 2187, 327, 326, 666, 10228, 10424, 2187, 296, 2469, 2187, 296, 957, 29489, 225...
self._debug(NIGHTMARE, "JS: jsScript", ver, `script`)
def jsScript (self, script, ver, item): """execute given script with javascript version ver""" self._debug(NIGHTMARE, "JS: jsScript", ver, `script`) assert self.state == 'parse' assert len(self.buf) >= 2 self.js_output = 0 self.js_env.attachListener(self) # start recursive html filter (used by jsProcessData) self.js_html = HtmlFilter(self.rules, self.url, comments=self.comments, javascript=self.js_filter, level=self.level+1) # execute self.js_env.executeScript(script, ver) self.js_env.detachListener(self) # wait for recursive filter to finish self.jsEndScript(item)
b6cdd9629ec41bf387c3e531943b23aec78afb66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/b6cdd9629ec41bf387c3e531943b23aec78afb66/Rewriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 3651, 261, 2890, 16, 2728, 16, 1924, 16, 761, 4672, 3536, 8837, 864, 2728, 598, 11341, 1177, 1924, 8395, 225, 1815, 365, 18, 2019, 422, 296, 2670, 11, 1815, 562, 12, 2890, 18, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 3651, 261, 2890, 16, 2728, 16, 1924, 16, 761, 4672, 3536, 8837, 864, 2728, 598, 11341, 1177, 1924, 8395, 225, 1815, 365, 18, 2019, 422, 296, 2670, 11, 1815, 562, 12, 2890, 18, 43...
y = self.__submodule(x) else: y = x return self.ambient_hecke_module()(y)
if not z.element() in self.__submodule: raise TypeError, "x does not coerce to an element of this Hecke module" return z
def __call__(self, x, check=False): """ Coerce x into the ambient module and checks that x is in this submodule. """ if check: y = self.__submodule(x) else: y = x return self.ambient_hecke_module()(y)
0da0158b33fec244d2848981a7cd7a748c19f415 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/0da0158b33fec244d2848981a7cd7a748c19f415/submodule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 866, 33, 8381, 4672, 3536, 7695, 2765, 619, 1368, 326, 13232, 1979, 1605, 471, 4271, 716, 619, 353, 316, 333, 27314, 18, 3536, 309, 866, 30, 677...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 972, 12, 2890, 16, 619, 16, 866, 33, 8381, 4672, 3536, 7695, 2765, 619, 1368, 326, 13232, 1979, 1605, 471, 4271, 716, 619, 353, 316, 333, 27314, 18, 3536, 309, 866, 30, 677...
TargetAdd('libp3glstuff.dll', opts=['ADVAPI', 'OPENGL', 'NVIDIACG', 'CGGL'])
TargetAdd('libp3glstuff.dll', opts=['ADVAPI', 'GL', 'NVIDIACG', 'CGGL'])
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
397a7f9736d1ffe1daf985de6c0bb8e5fc4b1c61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8543/397a7f9736d1ffe1daf985de6c0bb8e5fc4b1c61/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 293, 464, 842, 722, 67, 76, 1011, 1548, 82, 7, 318, 536, 225, 453, 4307, 37, 67, 3932, 1653, 39, 6365, 67, 5757, 64, 82, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 293, 464, 842, 722, 67, 76, 1011, 1548, 82, 7, 318, 536, 225, 453, 4307, 37, 67, 3932, 1653, 39, 6365, 67, 5757, 64, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.logger.debug( "Initializing Monitoring Client")
self.logger.debug( "Initializing Monitoring Client" )
def initialize( self ): self.logger = gLogger.getSubLogger( "Monitoring" ) self.logger.debug( "Initializing Monitoring Client") self.sourceDict[ 'setup' ] = gConfig.getValue( "/DIRAC/Setup" ) self.sourceDict[ 'site' ] = DIRAC.siteName() if self.sourceDict[ 'componentType' ] == self.COMPONENT_SERVICE: self.cfgSection = PathFinder.getSystemSection( self.sourceDict[ 'componentName' ] ) elif self.sourceDict[ 'componentType' ] == self.COMPONENT_AGENT: self.cfgSection = PathFinder.getAgentSection( self.sourceDict[ 'componentName' ] ) self.setComponentLocation( Network.getFQDN() ) elif self.sourceDict[ 'componentType' ] == self.COMPONENT_WEB: self.cfgSection = "/Website" self.setComponentLocation( 'http://%s' % Network.getFQDN() ) self.setComponentName( 'Web' ) elif self.sourceDict[ 'componentType' ] == self.COMPONENT_SCRIPT: self.cfgSection = "/Script" else: raise Exception( "Component type has not been defined" ) gMonitoringFlusher.registerMonitoringClient( self ) #ExitCallback.registerExitCallback( self.forceFlush ) self.__initialized = True
8fb9b92ed5b05b25cf0b23c6b3ceefbecf505a45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8fb9b92ed5b05b25cf0b23c6b3ceefbecf505a45/MonitoringClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 365, 262, 30, 365, 18, 4901, 273, 314, 3328, 18, 588, 1676, 3328, 12, 315, 18410, 6, 262, 365, 18, 4901, 18, 4148, 12, 315, 29782, 29135, 2445, 6, 262, 365, 18, 3168, 5014,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 365, 262, 30, 365, 18, 4901, 273, 314, 3328, 18, 588, 1676, 3328, 12, 315, 18410, 6, 262, 365, 18, 4901, 18, 4148, 12, 315, 29782, 29135, 2445, 6, 262, 365, 18, 3168, 5014,...
raise CfgEnvironmentError(val, err.reason.args[1])
raise CfgEnvironmentError(url, err.reason.args[1])
def _openUrl(self, url): try: return urllib2.urlopen(val) except urllib2.HTTPError, err: raise CfgEnvironmentError(err.filename, err.msg) except urllib2.URLError, err: raise CfgEnvironmentError(val, err.reason.args[1]) except EnvironmentError, err: raise CfgEnvironmentError(err.filename, err.msg)
2d7f0353429a9acb713bda742ba99dc31ad10d96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/2d7f0353429a9acb713bda742ba99dc31ad10d96/cfg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3190, 1489, 12, 2890, 16, 880, 4672, 775, 30, 327, 11527, 22, 18, 295, 18589, 12, 1125, 13, 1335, 11527, 22, 18, 3693, 668, 16, 393, 30, 1002, 24631, 5494, 668, 12, 370, 18, 345...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3190, 1489, 12, 2890, 16, 880, 4672, 775, 30, 327, 11527, 22, 18, 295, 18589, 12, 1125, 13, 1335, 11527, 22, 18, 3693, 668, 16, 393, 30, 1002, 24631, 5494, 668, 12, 370, 18, 345...
except: raise RethrownException("Broker %s failed ready test %s"%self.name)
except: raise RethrownException("Broker %s failed ready test"%self.name)
def ready(self): """Wait till broker is ready to serve clients""" # First make sure the broker is listening by checking the log. if not retry(self.log_ready): raise Exception("Timed out waiting for broker %s" % self.name) # Make a connection, this will wait for extended cluster init to finish. try: self.connect().close() except: raise RethrownException("Broker %s failed ready test %s"%self.name)
3dee3bcd4a2dadd7a02186c3c4dfc0114714ae11 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/197/3dee3bcd4a2dadd7a02186c3c4dfc0114714ae11/brokertest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5695, 12, 2890, 4672, 3536, 5480, 21364, 8625, 353, 5695, 358, 12175, 7712, 8395, 468, 5783, 1221, 3071, 326, 8625, 353, 13895, 635, 6728, 326, 613, 18, 309, 486, 3300, 12, 2890, 18, 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, 5695, 12, 2890, 4672, 3536, 5480, 21364, 8625, 353, 5695, 358, 12175, 7712, 8395, 468, 5783, 1221, 3071, 326, 8625, 353, 13895, 635, 6728, 326, 613, 18, 309, 486, 3300, 12, 2890, 18, 133...
if base[0] == '/':
if len(base > 0) and base[0] == '/':
def resolveFilename(scope, base = ""): path = defaultPaths[scope] if path[1] == PATH_CREATE: if (not pathExists(defaultPaths[scope][0])): os.mkdir(path[0]) if base[0] == '/': path = "" if not fileExists(path[0] + base): #try: if fallbackPaths.has_key(scope): for x in fallbackPaths[scope]: if x[1] == FILE_COPY: if fileExists(x[0] + base): os.system("cp " + x[0] + base + " " + path[0] + base) break elif x[1] == FILE_MOVE: if fileExists(x[0] + base): os.system("mv " + x[0] + base + " " + path[0] + base) break elif x[1] == PATH_COPY: if pathExists(x[0]): if not pathExists(defaultPaths[scope][0]): os.mkdir(path[0]) os.system("cp -a " + x[0] + "* " + path[0]) break elif x[1] == PATH_MOVE: if pathExists(x[0]): os.system("mv " + x[0] + " " + path[0]) break # FIXME: we also have to handle DATADIR etc. here. return path[0] + base # this is only the BASE - an extension must be added later.
e9db1fd8163a6a18c9e9f8a4c0319e2985cba03e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/e9db1fd8163a6a18c9e9f8a4c0319e2985cba03e/Directories.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 5359, 12, 4887, 16, 1026, 273, 1408, 4672, 589, 273, 805, 4466, 63, 4887, 65, 225, 309, 589, 63, 21, 65, 422, 7767, 67, 9344, 30, 309, 261, 902, 589, 4002, 12, 1886, 4466, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 5359, 12, 4887, 16, 1026, 273, 1408, 4672, 589, 273, 805, 4466, 63, 4887, 65, 225, 309, 589, 63, 21, 65, 422, 7767, 67, 9344, 30, 309, 261, 902, 589, 4002, 12, 1886, 4466, 63, ...
SELECT build.rev, SUM(item_lines.value) AS loc, SUM(item_lines.value * item_percentage.value / 100) AS cov
SELECT build.rev, SUM(%s) AS loc, SUM(%s * %s / 100) AS cov
def generate_chart_data(self, req, config, category): assert category == 'coverage'
7691c7cdcd681e003e427cd68dcc1ffb489b9354 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4547/7691c7cdcd681e003e427cd68dcc1ffb489b9354/charts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 11563, 67, 892, 12, 2890, 16, 1111, 16, 642, 16, 3150, 4672, 1815, 3150, 422, 296, 16356, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 11563, 67, 892, 12, 2890, 16, 1111, 16, 642, 16, 3150, 4672, 1815, 3150, 422, 296, 16356, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print lines[index]
foundTypedef = False
8e70c1b6b39d392864421dc70c60335e2d5fd855 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/8e70c1b6b39d392864421dc70c60335e2d5fd855/TrimPreprocessedFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1392, 559, 536, 273, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1392, 559, 536, 273, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
url = self.location try: if '://' not in url: url = urljoin(self.schema.baseurl, url) root = Parser().parse(url=url).root() root.set('url', url) return self.schema.instance(root, url) except (URLError, HTTPError): msg = 'imported schema (%s) at (%s), failed' % (self.ns[1], url) log.error('%s, %s', self.id, msg, exc_info=True) raise Exception(msg)
url = self.location try: if '://' not in url: url = urljoin(self.schema.baseurl, url) root = Parser().parse(url=url).root() root.set('url', url) return self.schema.instance(root, url) except (URLError, HTTPError): msg = 'imported schema (%s) at (%s), failed' % (self.ns[1], url) log.error('%s, %s', self.id, msg, exc_info=True) raise Exception(msg)
def download(self): url = self.location try: if '://' not in url: url = urljoin(self.schema.baseurl, url) root = Parser().parse(url=url).root() root.set('url', url) return self.schema.instance(root, url) except (URLError, HTTPError): msg = 'imported schema (%s) at (%s), failed' % (self.ns[1], url) log.error('%s, %s', self.id, msg, exc_info=True) raise Exception(msg)
fb2c648db37b4a784d3341f3374da4632fe00cc9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1242/fb2c648db37b4a784d3341f3374da4632fe00cc9/sxbasic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 4672, 880, 273, 365, 18, 3562, 775, 30, 309, 18397, 486, 316, 880, 30, 880, 273, 25447, 12, 2890, 18, 4821, 18, 1969, 718, 16, 880, 13, 1365, 273, 6783, 7675, 2670, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 4672, 880, 273, 365, 18, 3562, 775, 30, 309, 18397, 486, 316, 880, 30, 880, 273, 25447, 12, 2890, 18, 4821, 18, 1969, 718, 16, 880, 13, 1365, 273, 6783, 7675, 2670, 1...
planar if it has a planar embedding in which all boundary nodes
planar if it has a planar embedding in which all boundary vertices
def is_circular_planar(self, ordered=True): """ Returns True if a graph with boundary is circular planar, and False otherwise. A graph (with nonempty boundary) is circular planar if it has a planar embedding in which all boundary nodes can be drawn in order on a disc boundary, with all the interior nodes drawn inside the disc. Note -- This function assumes that the graph has nonempty boundary. (Circular Planarity has no definition for graphs without boundary). -- The current version relies on computing the genus of a slightly modified graph so it is time-expensive and not reasonable to use for graphs with > 12 vertices. -- Also since the current version relies on computing the genus, it is necessary that the graph be connected in order to use Euler's formula. INPUT: ordered -- whether or not to consider the order of the boundary (set ordered=False to see if there is any possible boundary order that will satisfy circular planarity) EXAMPLES: sage: g439 = Graph({1:[5,7], 2:[5,6], 3:[6,7], 4:[5,6,7]}) sage: g439.set_boundary([1,2,3,4]) sage.: g439.show(figsize=[2,2], vertex_labels=True, vertex_size=175) sage: g439.is_circular_planar() False sage: g439.set_boundary([1,2,3]) sage: g439.is_circular_planar() True Order matters: sage: K23 = graphs.CompleteBipartiteGraph(2,3) sage: K23.set_boundary([0,1,2,3]) sage: K23.is_circular_planar() False sage: K23.set_boundary([0,2,1,3]) # Diff Order! sage: K23.is_circular_planar() True sage: K23.is_circular_planar(ordered=False) True """ if not self.is_connected(): raise TypeError("Graph must be connected to use Euler's Formula to compute minimal genus.") from sage.rings.infinity import Infinity from sage.combinat.all import CyclicPermutationsOfPartition from sage.graphs.graph_genus1 import trace_faces, nice_copy
a520fa15cff86fbbd1335f8b6f9d36203c74d574 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a520fa15cff86fbbd1335f8b6f9d36203c74d574/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 11614, 9559, 67, 7088, 297, 12, 2890, 16, 5901, 33, 5510, 4672, 3536, 2860, 1053, 309, 279, 2667, 598, 7679, 353, 15302, 4995, 297, 16, 471, 1083, 3541, 18, 225, 432, 2667, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 11614, 9559, 67, 7088, 297, 12, 2890, 16, 5901, 33, 5510, 4672, 3536, 2860, 1053, 309, 279, 2667, 598, 7679, 353, 15302, 4995, 297, 16, 471, 1083, 3541, 18, 225, 432, 2667, 26...
""" Set the trig start time of the analysis node by setting a --trig-start-time option to the node when it is executed. @param time: trig start time of job. """ self.add_var_opt('trig-start-time',time) self.__trig_start = time def get_trig_start(self): """ Get the trig start time of the node. """ return self.__trig_start def set_trig_end(self,time): """ Set the trig end time of the analysis node by setting a --trig-end-time option to the node when it is executed. @param time: trig end time of job. """ self.add_var_opt('trig-end-time',time) self.__trig_end = time def get_trig_end(self): """ Get the trig end time of the node. """ return self.__trig_end
""" Set the trig start time of the analysis node by setting a --trig-start-time option to the node when it is executed. @param time: trig start time of job. """ self.add_var_opt('trig-start-time',time) self.__trig_start = time def get_trig_start(self): """ Get the trig start time of the node. """ return self.__trig_start def set_trig_end(self,time): """ Set the trig end time of the analysis node by setting a --trig-end-time option to the node when it is executed. @param time: trig end time of job. """ self.add_var_opt('trig-end-time',time) self.__trig_end = time def get_trig_end(self): """ Get the trig end time of the node. """ return self.__trig_end
def set_trig_start(self,time): """ Set the trig start time of the analysis node by setting a --trig-start-time option to the node when it is executed. @param time: trig start time of job. """ self.add_var_opt('trig-start-time',time) self.__trig_start = time
b6f97163685811d18c92b1acbfd3d8b0a1a51b35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/b6f97163685811d18c92b1acbfd3d8b0a1a51b35/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 313, 360, 67, 1937, 12, 2890, 16, 957, 4672, 3536, 1000, 326, 23142, 787, 813, 434, 326, 6285, 756, 635, 3637, 279, 1493, 313, 360, 17, 1937, 17, 957, 1456, 358, 326, 756, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 313, 360, 67, 1937, 12, 2890, 16, 957, 4672, 3536, 1000, 326, 23142, 787, 813, 434, 326, 6285, 756, 635, 3637, 279, 1493, 313, 360, 17, 1937, 17, 957, 1456, 358, 326, 756, 1...
clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close()
if not self.selection.selCompn.container: self.selectParent(self.selection.selection)
def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close()
2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 52, 14725, 7416, 12, 2890, 16, 871, 4672, 309, 365, 18, 10705, 30, 6807, 273, 7075, 1986, 15339, 3752, 6807, 18, 3678, 1435, 775, 30, 501, 273, 7075, 1528, 21881, 1435, 6807, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 52, 14725, 7416, 12, 2890, 16, 871, 4672, 309, 365, 18, 10705, 30, 6807, 273, 7075, 1986, 15339, 3752, 6807, 18, 3678, 1435, 775, 30, 501, 273, 7075, 1528, 21881, 1435, 6807, 18, ...
extract(server, addon, target)
extract(server, addon, temp_dir)
def download(server, addon, temp_dir, svn_dir, password, stamp = None):
ba0f1625a581763dee9eb22ec970ffa68a2a18da /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9355/ba0f1625a581763dee9eb22ec970ffa68a2a18da/wescamp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 3567, 16, 15466, 16, 1906, 67, 1214, 16, 5893, 82, 67, 1214, 16, 2201, 16, 14429, 273, 599, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 3567, 16, 15466, 16, 1906, 67, 1214, 16, 5893, 82, 67, 1214, 16, 2201, 16, 14429, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
('L,OriginalFirstThunk,Characteristics', 'L,TimeDateStamp', 'L,ForwarderChain', 'L,Name', 'L,FirstThunk'))
('I,OriginalFirstThunk,Characteristics', 'I,TimeDateStamp', 'I,ForwarderChain', 'I,Name', 'I,FirstThunk'))
def __init__(self, **args): for key, value in args.items(): setattr(self, key, value)
b1bfd27bf7c329d36f68dc5f4ed5adda7c025501 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4177/b1bfd27bf7c329d36f68dc5f4ed5adda7c025501/pefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 1968, 4672, 364, 498, 16, 460, 316, 833, 18, 3319, 13332, 9241, 12, 2890, 16, 498, 16, 460, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 1968, 4672, 364, 498, 16, 460, 316, 833, 18, 3319, 13332, 9241, 12, 2890, 16, 498, 16, 460, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(self,cp,dir='',type='plot'): inspiral.InspiralJob.__init__(self,cp) if type == 'head': self.set_executable(string.strip(cp.get('fu-condor','inspiral_head'))) self.name = 'followUpInspJob' + type self.setupJob(self.name, dir=dir, cp=cp)
def __init__(self,cp,dir='',type='plot'): inspiral.InspiralJob.__init__(self,cp) if type == 'head': self.set_executable(string.strip(cp.get('fu-condor','inspiral_head'))) self.name = 'followUpInspJob' + type self.setupJob(self.name, dir=dir, cp=cp)
def __init__(self,cp,dir='',type='plot'):
a2bbfd42c8ab7fadc011df769e183127e596cd3e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/a2bbfd42c8ab7fadc011df769e183127e596cd3e/stfu_pipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4057, 16, 1214, 2218, 2187, 723, 2218, 4032, 11, 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, ...
[ 1, 1, 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, 16, 4057, 16, 1214, 2218, 2187, 723, 2218, 4032, 11, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
t.xUnlock(-1)
def __init__(self): apsw.VFS.__init__(self, "apswtest2", "apswtest")
f0f139ca1c73176ffc374f8eb6f63ed6e2cd34b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/993/f0f139ca1c73176ffc374f8eb6f63ed6e2cd34b3/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 513, 5328, 18, 58, 4931, 16186, 2738, 972, 12, 2890, 16, 315, 438, 5328, 3813, 22, 3113, 315, 438, 5328, 3813, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 513, 5328, 18, 58, 4931, 16186, 2738, 972, 12, 2890, 16, 315, 438, 5328, 3813, 22, 3113, 315, 438, 5328, 3813, 7923, 2, -100, -100, -100, -100, -100, -...
fill_frame["style"]='ColorWatchNormal' fillcolor=rgb_to_tk(properties.fill_pattern.Color().RGB()) fill_frame["background"]=fillcolor filltxt=_('Fill:')+' ' + properties.fill_pattern.Color().toString()
fill_frame["style"] = 'ColorWatchNormal' fillcolor = rgb_to_tk(properties.fill_pattern.Color().RGB()) fill_frame["background"] = fillcolor filltxt = _('Fill:') + ' ' + properties.fill_pattern.Color().toString()
def ColorInfo(): if len(self.document.selection) != 1 or self.document.CanUngroup(): fill_frame["style"]='ColorWatchDisabled' outline_frame["style"]='ColorWatchDisabled' fill_frame['background']=app.uimanager.currentColorTheme.bg outline_frame['background']=app.uimanager.currentColorTheme.bg return "" properties = self.document.CurrentProperties() filltxt='' outlinetxt='' try: fill_frame["style"]='ColorWatchNormal' fillcolor=rgb_to_tk(properties.fill_pattern.Color().RGB()) fill_frame["background"]=fillcolor filltxt=_('Fill:')+' ' + properties.fill_pattern.Color().toString() except: fill_frame["style"]='ColorWatchTransp' filltxt=_('Fill: None') try: outline_frame["style"]='ColorWatchNormal' outline_frame["background"]=rgb_to_tk(properties.line_pattern.Color().RGB()) outlinetxt=_('Outline:')+' '+ str(math.ceil(math.floor(10**4*properties.line_width/2.83465)/10)/1000) +' mm' except: outline_frame["style"]='ColorWatchTransp' outlinetxt=_('Outline: None') return filltxt + "\n" + outlinetxt
5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5563, 966, 13332, 309, 562, 12, 2890, 18, 5457, 18, 10705, 13, 480, 404, 578, 365, 18, 5457, 18, 2568, 984, 1655, 13332, 3636, 67, 3789, 9614, 4060, 11929, 2218, 2957, 5234, 8853, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5563, 966, 13332, 309, 562, 12, 2890, 18, 5457, 18, 10705, 13, 480, 404, 578, 365, 18, 5457, 18, 2568, 984, 1655, 13332, 3636, 67, 3789, 9614, 4060, 11929, 2218, 2957, 5234, 8853, 11, ...
sage: E.padic_height_pairing_matrix(5, 10)
def padic_height_pairing_matrix(self, p, prec=20, height=None, check_hypotheses=True): r""" Computes the cyclotomic $p$-adic height pairing matrix of this curve with respect to the basis self.gens() for the Mordell-Weil group.
7882ef22a93306fe14c9f8d38bded6c7e1e2109a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/7882ef22a93306fe14c9f8d38bded6c7e1e2109a/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 4210, 67, 6017, 310, 67, 5667, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 2072, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 4210, 67, 6017, 310, 67, 5667, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 2072, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281...
res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_collection, type, score) values (%s,%s,'%s',%s)" % (fldID, colID, type, (score + 1)))
res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_collection, type, score,score_fieldvalue) values (%s,%s,'%s',%s, 0)" % (fldID, colID, type, (score + 1)))
def add_col_fld(colID, fldID, type, fldvID=''): """Add a sort/search/field to the collection. colID - the id of the collection involved fmtID - the id of the format. score - the score of the format, decides sorting, if not given, place the format on top""" try: if fldvID and fldvID not in [-1, "-1"]: res = run_sql("SELECT score, score_fieldvalue FROM collection_field_fieldvalue WHERE id_collection=%s AND id_field=%s ORDER BY score desc, score_fieldvalue desc" % (colID, fldID)) if res: score = int(res[0][0]) v_score = int(res[0][1]) else: score = 0 v_score = 0 res = run_sql("SELECT * FROM collection_field_fieldvalue where id_field=%s and id_collection=%s and type='%s' and id_fieldvalue=%s" % (fldID, colID, type, fldvID)) if not res: res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_fieldvalue, id_collection, type, score, score_fieldvalue) values (%s,%s,%s,'%s',%s,%s)" % (fldID, fldvID, colID, type, score, (v_score + 1))) else: raise StandardError else: res = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s AND id_field=%s ORDER BY score desc" % (colID, fldID)) if res: score = int(res[0][0]) else: score = 0 res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_collection, type, score) values (%s,%s,'%s',%s)" % (fldID, colID, type, (score + 1))) return "true" except StandardError, e: return ""
6befe5242f9eb7b0ab45f13d8f331e14eff6cef5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/6befe5242f9eb7b0ab45f13d8f331e14eff6cef5/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1293, 67, 19794, 12, 1293, 734, 16, 9880, 734, 16, 618, 16, 9880, 90, 734, 2218, 11, 4672, 3536, 986, 279, 1524, 19, 3072, 19, 1518, 358, 326, 1849, 18, 645, 734, 300, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1293, 67, 19794, 12, 1293, 734, 16, 9880, 734, 16, 618, 16, 9880, 90, 734, 2218, 11, 4672, 3536, 986, 279, 1524, 19, 3072, 19, 1518, 358, 326, 1849, 18, 645, 734, 300, 326, ...
u"""find a filename in the given directory that isn't already taken. adds '.1' before the file extension, or just .1 on the end if no file extension"""
u"""find a filename in the given directory that isn't already taken. adds '.1' before the file extension, or just .1 on the end if no file extension"""
def findNewFile(filename, directory): u"""find a filename in the given directory that isn't already taken. adds '.1' before the file extension, or just .1 on the end if no file extension""" if os.path.isfile( os.path.join(directory, filename) ): logStatusMsg(u"filename already taken, looking for another: %s" % filename, 2) filenameList = filename.split(u'.') if len( filenameList ) >1: try: num = u'.' + unicodeC( int( filenameList[-2] ) +1) del filenameList[-2] filename = u'.'.join( filenameList[:-1] ) + num + u'.' + filenameList[-1] except (ValueError, IndexError, UnicodeEncodeError): try: num = u'.' + unicodeC( int( filenameList[-1] ) + 1 ) del filenameList[-1] filename = u'.'.join( filenameList ) + num except (ValueError, IndexError, UnicodeEncodeError) : num = u'.' + unicodeC( 1 ) filename = u'.'.join( filenameList[:-1] ) + num + '.' + filenameList[-1] else: filename += u'.1' return findNewFile( filename, directory ) else: return unicodeC(directory), unicodeC(filename)
633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 1908, 812, 12, 3459, 16, 1867, 4672, 582, 8395, 4720, 279, 1544, 316, 326, 864, 1867, 716, 5177, 1404, 1818, 9830, 18, 4831, 2418, 21, 11, 1865, 326, 585, 2710, 16, 578, 2537, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 1908, 812, 12, 3459, 16, 1867, 4672, 582, 8395, 4720, 279, 1544, 316, 326, 864, 1867, 716, 5177, 1404, 1818, 9830, 18, 4831, 2418, 21, 11, 1865, 326, 585, 2710, 16, 578, 2537, 26...
hb = gtk.HBox()
bb = gtk.HButtonBox() bb.set_layout(gtk.BUTTONBOX_END)
def cb_cancel_clicked(self): record.args[2](False)
a8c2edc09d07d2894c71210dc6abea06c13b427e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/a8c2edc09d07d2894c71210dc6abea06c13b427e/logmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 67, 10996, 67, 7475, 329, 12, 2890, 4672, 1409, 18, 1968, 63, 22, 29955, 8381, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 2875, 67, 10996, 67, 7475, 329, 12, 2890, 4672, 1409, 18, 1968, 63, 22, 29955, 8381, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def fl_get_canvas_id(ob): """ fl_get_canvas_id(ob) -> window """ retval = _fl_get_canvas_id(ob) return retval _fl_get_canvas_colormap = cfuncproto(so_libforms, "fl_get_canvas_colormap", Colormap, [cty.POINTER(FL_OBJECT)],
def fl_get_canvas_id(pObject): """ fl_get_canvas_id(pObject) -> window """ retval = _fl_get_canvas_id(pObject) return retval _fl_get_canvas_colormap = cfuncproto(so_libforms, "fl_get_canvas_colormap", Colormap, [cty.POINTER(FL_OBJECT)],
def fl_get_canvas_id(ob): """ fl_get_canvas_id(ob) -> window """ retval = _fl_get_canvas_id(ob) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 15424, 67, 350, 12, 947, 4672, 3536, 1183, 67, 588, 67, 15424, 67, 350, 12, 947, 13, 317, 2742, 3536, 225, 5221, 273, 389, 2242, 67, 588, 67, 15424, 67, 350, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 15424, 67, 350, 12, 947, 4672, 3536, 1183, 67, 588, 67, 15424, 67, 350, 12, 947, 13, 317, 2742, 3536, 225, 5221, 273, 389, 2242, 67, 588, 67, 15424, 67, 350, 12, ...
if (tob is not InstanceType) or (tob is InstanceType and object.__class__ is PDFObjectReference):
idToObject = self.idToObject if name is None and ( (tob is not InstanceType) or (tob is InstanceType and object.__class__ is PDFObjectReference)):
def Reference(self, object, name=None): ### note references may "grow" during the final formatting pass: don't use d.keys()! # don't make references to other references, or non instances from types import InstanceType #print"object type is ", type(object) tob = type(object) if (tob is not InstanceType) or (tob is InstanceType and object.__class__ is PDFObjectReference): return object idToObject = self.idToObject if hasattr(object, __InternalName__): # already registered intname = object.__InternalName__ if name is not None and name!=intname: raise ValueError, "attempt to reregister object %s with new name %s" % ( repr(intname), repr(name)) if not idToObject.has_key(intname): raise ValueError, "object named but not registered" return PDFObjectReference(intname) # otherwise register the new object objectcounter = self.objectcounter = self.objectcounter+1 if name is None: name = "R"+repr(objectcounter) if idToObject.has_key(name): raise ValueError, "redefining named object: "+repr(name) object.__InternalName__ = name #print "name", name, "counter", objectcounter self.idToObjectNumberAndVersion[name] = (objectcounter, 0) self.numberToId[objectcounter] = name idToObject[name] = object return PDFObjectReference(name)
9b6beedc20061b71788dcd79d00e41359a368de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/9b6beedc20061b71788dcd79d00e41359a368de4/pdfdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6268, 12, 2890, 16, 733, 16, 508, 33, 7036, 4672, 11849, 4721, 5351, 2026, 315, 75, 492, 6, 4982, 326, 727, 10407, 1342, 30, 2727, 1404, 999, 302, 18, 2452, 1435, 5, 468, 2727, 1404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6268, 12, 2890, 16, 733, 16, 508, 33, 7036, 4672, 11849, 4721, 5351, 2026, 315, 75, 492, 6, 4982, 326, 727, 10407, 1342, 30, 2727, 1404, 999, 302, 18, 2452, 1435, 5, 468, 2727, 1404, ...
os.mkdir(self.workdir)
if not os.path.exists(self.workdir): os.mkdir(self.workdir)
def rm(self, names): self.wait_for_time_change() if not type(names) == types.ListType: names = [names]
71e8e39f36b5cbbcd208731be86df9a57e8063bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9981/71e8e39f36b5cbbcd208731be86df9a57e8063bb/BoostBuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6692, 12, 2890, 16, 1257, 4672, 365, 18, 7048, 67, 1884, 67, 957, 67, 3427, 1435, 309, 486, 618, 12, 1973, 13, 422, 1953, 18, 19366, 30, 1257, 273, 306, 1973, 65, 2, 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, 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, 6692, 12, 2890, 16, 1257, 4672, 365, 18, 7048, 67, 1884, 67, 957, 67, 3427, 1435, 309, 486, 618, 12, 1973, 13, 422, 1953, 18, 19366, 30, 1257, 273, 306, 1973, 65, 2, -100, -100, -100...
sorted(request.graphdata.keys_on_pages.get(tag[2])), key=unicode.lower)
sorted(request.graphdata.keys_on_pages.get(tag[2]), key=unicode.lower))
def sort(t): return t[1]
ec118ff72306dc27a9d6f5f6b68fbc7ee5d6aac7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/ec118ff72306dc27a9d6f5f6b68fbc7ee5d6aac7/MetaTagCloud.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 12, 88, 4672, 327, 268, 63, 21, 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, 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, 1524, 12, 88, 4672, 327, 268, 63, 21, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.assertEquals(unittest.deferredResult(client.getPage(self.getHTTP("cookiemirror"), cookies={'foo': 'bar', 'baz': 'quux'})), "[('baz', 'quux'), ('foo', 'bar')]")
cookies = {'foo': 'bar', 'baz': 'quux'} return client.getPage(self.getHTTP("cookiemirror"), cookies=cookies ).addCallback(self.assertEquals, "[('baz', 'quux'), ('foo', 'bar')]" )
def testSomeCookies(self): self.assertEquals(unittest.deferredResult(client.getPage(self.getHTTP("cookiemirror"), cookies={'foo': 'bar', 'baz': 'quux'})), "[('baz', 'quux'), ('foo', 'bar')]")
60726ead410a7bda89f85958b7518c30bf949fc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/60726ead410a7bda89f85958b7518c30bf949fc0/test_webclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 17358, 16089, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 4873, 3813, 18, 26622, 1253, 12, 2625, 18, 588, 1964, 12, 2890, 18, 588, 3693, 2932, 29854, 77, 351, 8299, 6, 3631, 7237, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17358, 16089, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 4873, 3813, 18, 26622, 1253, 12, 2625, 18, 588, 1964, 12, 2890, 18, 588, 3693, 2932, 29854, 77, 351, 8299, 6, 3631, 7237, ...
saved = no_magic() try: f1 = getcompiled(testfn, [int]) res = f1(0) assert res is None, repr(res) res = f1(42) assert res is None, repr(res) py.test.raises(AssertionError, f1, -2) finally: restore_magic(saved) def no_magic(): import __builtin__ try: py.magic.revert(__builtin__, 'AssertionError') return True except ValueError: return False def restore_magic(saved): if saved: py.magic.invoke(assertion=True)
f1 = getcompiled(testfn, [int]) res = f1(0) assert res is None, repr(res) res = f1(42) assert res is None, repr(res) e = py.test.raises(Exception, f1, -2) assert e.type.__name__ == 'AssertionError'
def testfn(n): assert n >= 0
314f607a5b2454f009dadd79fd466622d85bf9cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/314f607a5b2454f009dadd79fd466622d85bf9cd/test_exception.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4293, 12, 82, 4672, 1815, 290, 1545, 374, 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, 1842, 4293, 12, 82, 4672, 1815, 290, 1545, 374, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
for key, value in entries:
for key, value in entries.iteritems():
def apply_theme(self, widget, data=None): if self.currItr is not None: index = self.model.get_path(self.currItr)[0] name = self.theme_list[index]['name'] version = self.theme_list[index]['version'] directory = self.theme_list[index]['dir']
976076d1a373fac7281a6cdaa3af30455c0ead28 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8416/976076d1a373fac7281a6cdaa3af30455c0ead28/awnTheme.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 7997, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 309, 365, 18, 17016, 28984, 353, 486, 599, 30, 770, 273, 365, 18, 2284, 18, 588, 67, 803, 12, 2890, 18, 17016, 28984, 251...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 7997, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 309, 365, 18, 17016, 28984, 353, 486, 599, 30, 770, 273, 365, 18, 2284, 18, 588, 67, 803, 12, 2890, 18, 17016, 28984, 251...
run(1)
main()
def run(change): fss, ok = macfs.GetDirectory() if not ok: sys.exit(0) walktree(fss.as_pathname(), change)
14842d631807964ee4e0c5633be5723b57b8f135 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/14842d631807964ee4e0c5633be5723b57b8f135/ConfigurePython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 3427, 4672, 284, 1049, 16, 1529, 273, 5318, 2556, 18, 967, 2853, 1435, 309, 486, 1529, 30, 2589, 18, 8593, 12, 20, 13, 5442, 3413, 12, 74, 1049, 18, 345, 67, 28336, 9334, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3427, 4672, 284, 1049, 16, 1529, 273, 5318, 2556, 18, 967, 2853, 1435, 309, 486, 1529, 30, 2589, 18, 8593, 12, 20, 13, 5442, 3413, 12, 74, 1049, 18, 345, 67, 28336, 9334, 2...
logging.info(" theme")
logging.info("setup theme...")
def finish_startup(obj, thread): database.set_thread(thread) logging.info("Restoring database...") start = time.time() app.db = storedatabase.LiveStorage() try: app.db.upgrade_database() except databaseupgrade.DatabaseTooNewError: summary = _("Database too new") description = _( "You have a database that was saved with a newer version of " "%(appname)s. You must download the latest version of " "%(appname)s and run that.", {"appname": config.get(prefs.SHORT_APP_NAME)}, ) raise StartupError(summary, description) except storedatabase.UpgradeDiskSpaceError: summary = _("Insufficient disk space") description = _( "Not enough disk space to upgrade your database from the previous " "version of %(appname)s. Please delete some files and try again.", {'appname': config.get(prefs.SHORT_APP_NAME)} ) raise StartupError(summary, description) database.update_last_id() end = time.time() logging.timing("Database upgrade time: %.3f", end - start) if app.db.startup_version != app.db.current_version: databaselog.info("Upgraded database from version %s to %s", app.db.startup_version, app.db.current_version) databaselog.print_old_log_entries() models.initialize() if DEBUG_DB_MEM_USAGE: util.db_mem_usage_test() mem_usage_test_event.set() searchengines.create_engines() setup_global_feeds() # call move_orphaned_items() ASAP after the manual feed is set up item.move_orphaned_items() logging.info("setup tabs") setup_tabs() logging.info(" theme") setup_theme() install_message_handler() eventloop.addUrgentCall(check_firsttime, "check first time")
4bb9e7b4acfb528617c122f889eba1b64429b31f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/4bb9e7b4acfb528617c122f889eba1b64429b31f/startup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 23939, 12, 2603, 16, 2650, 4672, 2063, 18, 542, 67, 5930, 12, 5930, 13, 2907, 18, 1376, 2932, 5188, 6053, 2063, 7070, 13, 787, 273, 813, 18, 957, 1435, 595, 18, 1966, 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, 4076, 67, 23939, 12, 2603, 16, 2650, 4672, 2063, 18, 542, 67, 5930, 12, 5930, 13, 2907, 18, 1376, 2932, 5188, 6053, 2063, 7070, 13, 787, 273, 813, 18, 957, 1435, 595, 18, 1966, 273, ...
def _inherit_apply(src, inherit):
def raise_view_error(error_msg, child_view_id): view, child_view = self.pool.get('ir.ui.view').browse(cr, user, [view_id, child_view_id], context) raise AttributeError(("View definition error for inherited view '%(xml_id)s' on '%(model)s' model: " + error_msg) % { 'xml_id': child_view.xml_id, 'parent_xml_id': view.xml_id, 'model': self._name, }) def _inherit_apply(src, inherit, inherit_id=None):
def _inherit_apply(src, inherit): def _find(node, node2): if node2.tag == 'xpath': res = node.xpath(node2.get('expr')) if res: return res[0] else: return None else: for n in node.getiterator(node2.tag): res = True if node2.tag == 'field': # only compare field names, a field can be only once in a given view # at a given level (and for multilevel expressions, we should use xpath # inheritance spec anyway) if node2.get('name') == n.get('name'): return n else: continue for attr in node2.attrib: if attr == 'position': continue if n.get(attr): if n.get(attr) == node2.get(attr): continue res = False if res: return n return None
5b67a3154e0e02212c6bd648ed6a5ebf91dc831e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5b67a3154e0e02212c6bd648ed6a5ebf91dc831e/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1002, 67, 1945, 67, 1636, 12, 1636, 67, 3576, 16, 1151, 67, 1945, 67, 350, 4672, 1476, 16, 1151, 67, 1945, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 4881, 18, 1945, 16063, 25731, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1002, 67, 1945, 67, 1636, 12, 1636, 67, 3576, 16, 1151, 67, 1945, 67, 350, 4672, 1476, 16, 1151, 67, 1945, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 4881, 18, 1945, 16063, 25731, 1...
if component == 'all': self.content = All(self) elif component == 'choice': self.content = Choice(self) elif component == 'sequence': self.content = Sequence(self) elif component == 'group': self.content = ModelGroupReference(self) else: raise SchemaError, 'Unknown component (%s)' %(contents[indx].getTagName()) self.content.fromDom(contents[indx]) indx += 1 self.attr_content = []
content = []
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 8832, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 628, 8832, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def recv (self, buflen=1024, flags=0):
def recv(self, buflen=1024, flags=0):
def recv (self, buflen=1024, flags=0): self._checkClosed() if self._sslobj: if flags != 0: raise ValueError( "non-zero flags not allowed in calls to recv_into() on %s" % self.__class__) while True: try: return self.read(buflen) except SSLError as x: if x.args[0] == SSL_ERROR_WANT_READ: continue else: raise x else: return socket.recv(self, buflen, flags)
80e3b731afdd5339bee603af01a80f172af03c74 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/80e3b731afdd5339bee603af01a80f172af03c74/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 12, 2890, 16, 1681, 1897, 33, 2163, 3247, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 309, 2943, 480, 374, 30, 1002, 2068, 12, 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, 10665, 12, 2890, 16, 1681, 1897, 33, 2163, 3247, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 309, 2943, 480, 374, 30, 1002, 2068, 12, 315, ...
self.setupJob(self.__prog__,tag_base=tag_base, dir=dir)
self.name = os.path.split(self.__executable.rstrip('/'))[1] self.setupJob(name=self.name,tag_base=tag_base, dir=dir)
def __init__(self, opts, cp, dir='', tag_base="DQFLAGS"): """ """ self.__conditionalLoadDefaults__(findFlagsJob.defaults,cp) self.__prog__ = 'findFlagsJob' self.__executable = string.strip(cp.get('fu-condor','dqflags')) self.__universe = string.strip(cp.get('fu-condor','universe')) pipeline.CondorDAGJob.__init__(self,self.__universe,self.__executable) self.add_condor_cmd('getenv','True') self.setupJob(self.__prog__,tag_base=tag_base, dir=dir)
4f059de02ba49cc10932529819f1976c7ed0ae64 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/4f059de02ba49cc10932529819f1976c7ed0ae64/stfu_pipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1500, 16, 3283, 16, 1577, 2218, 2187, 1047, 67, 1969, 1546, 40, 53, 17836, 6, 4672, 3536, 3536, 365, 16186, 22019, 2563, 7019, 972, 12, 4720, 5094, 2278, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1500, 16, 3283, 16, 1577, 2218, 2187, 1047, 67, 1969, 1546, 40, 53, 17836, 6, 4672, 3536, 3536, 365, 16186, 22019, 2563, 7019, 972, 12, 4720, 5094, 2278, ...
encoding = TextLine(title=u'path', required=False)
encoding = TextLine(title=u'encoding', required=False)
def route_requirement(context, attr, expr): route = context.context if attr in route.requirements: raise ValueError('Duplicate requirement', attr) route.requirements[attr] = expr
8d7bd500c1745005d8c4af284423b0547d8c7652 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14321/8d7bd500c1745005d8c4af284423b0547d8c7652/zcml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1946, 67, 30848, 12, 2472, 16, 1604, 16, 3065, 4672, 1946, 273, 819, 18, 2472, 309, 1604, 316, 1946, 18, 16175, 30, 1002, 2068, 2668, 11826, 12405, 2187, 1604, 13, 1946, 18, 16175, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1946, 67, 30848, 12, 2472, 16, 1604, 16, 3065, 4672, 1946, 273, 819, 18, 2472, 309, 1604, 316, 1946, 18, 16175, 30, 1002, 2068, 2668, 11826, 12405, 2187, 1604, 13, 1946, 18, 16175, 63, ...
Returns a graph constructed with maximal cliques as nodes,
Returns a graph constructed with maximal cliques as vertices,
def cliques_get_max_clique_graph(self, **kwds): """ Returns a graph constructed with maximal cliques as nodes, and edges between maximal cliques with common members in the original graph. Currently only implemented for undirected graphs. Use to_undirected to convert a digraph to an undirected graph. (See examples below).
e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 588, 67, 1896, 67, 4857, 1857, 67, 4660, 12, 2890, 16, 2826, 25577, 4672, 3536, 2860, 279, 2667, 15688, 598, 943, 2840, 4942, 29896, 487, 6928, 16, 471, 5231, 3086, 943,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 588, 67, 1896, 67, 4857, 1857, 67, 4660, 12, 2890, 16, 2826, 25577, 4672, 3536, 2860, 279, 2667, 15688, 598, 943, 2840, 4942, 29896, 487, 6928, 16, 471, 5231, 3086, 943,...
self.injection_rates[name] = make_interp(name, rate.centres(), rate.array)
self.injection_rates[name] = make_interp(rate.centres(), rate.array)
def __init__(self, coinc_param_distributions): # construct interpolators from the distribution data self.background_rates = {} self.injection_rates = {} for name, rate in coinc_param_distributions.background_rates.iteritems(): self.background_rates[name] = make_interp(name, rate.centres(), rate.array) for name, rate in coinc_param_distributions.injection_rates.iteritems(): self.injection_rates[name] = make_interp(name, rate.centres(), rate.array)
b9d2aeaa3d776b09f6a97421c9bb23cfe39408ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/b9d2aeaa3d776b09f6a97421c9bb23cfe39408ce/ligolw_burca2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13170, 71, 67, 891, 67, 2251, 15326, 4672, 468, 4872, 7326, 3062, 628, 326, 7006, 501, 365, 18, 9342, 67, 24285, 273, 2618, 365, 18, 31969, 67, 24285, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13170, 71, 67, 891, 67, 2251, 15326, 4672, 468, 4872, 7326, 3062, 628, 326, 7006, 501, 365, 18, 9342, 67, 24285, 273, 2618, 365, 18, 31969, 67, 24285, 27...
assert Version(1,2) < Version(1,3) assert Version(1,2,3) < Version(1,2,4) assert Version(1,2,3,'bar') < Version(1,2,3,'foo')
assert Version(1, 2) < Version(1, 3) assert Version(1, 2, 3) < Version(1, 2, 4) assert Version(1, 2, 3, 'bar') < Version(1, 2, 3, 'foo')
def test_Version(self): Version = wikiutil.Version # test properties assert Version(1,2,3).major == 1 assert Version(1,2,3).minor == 2 assert Version(1,2,3).release == 3 assert Version(1,2,3,'4.5alpha6').additional == '4.5alpha6' # test Version init and Version to str conversion assert str(Version(1)) == "1.0.0" assert str(Version(1,2)) == "1.2.0" assert str(Version(1,2,3)) == "1.2.3" assert str(Version(1,2,3,'4.5alpha6')) == "1.2.3-4.5alpha6" assert str(Version(version='1.2.3')) == "1.2.3" assert str(Version(version='1.2.3-4.5alpha6')) == "1.2.3-4.5alpha6" # test Version comparison, trivial cases assert Version() == Version() assert Version(1) == Version(1) assert Version(1,2) == Version(1,2) assert Version(1,2,3) == Version(1,2,3) assert Version(1,2,3,'foo') == Version(1,2,3,'foo') assert Version(1) != Version(2) assert Version(1,2) != Version(1,3) assert Version(1,2,3) != Version(1,2,4) assert Version(1,2,3,'foo') != Version(1,2,3,'bar') assert Version(1) < Version(2) assert Version(1,2) < Version(1,3) assert Version(1,2,3) < Version(1,2,4) assert Version(1,2,3,'bar') < Version(1,2,3,'foo') assert Version(2) > Version(1) assert Version(1,3) > Version(1,2) assert Version(1,2,4) > Version(1,2,3) assert Version(1,2,3,'foo') > Version(1,2,3,'bar') # test Version comparison, more delicate cases assert Version(1,12) > Version(1,9) assert Version(1,12) > Version(1,1,2) assert Version(1,0,0,'0.0a2') > Version(1,0,0,'0.0a1') assert Version(1,0,0,'0.0b1') > Version(1,0,0,'0.0a9') assert Version(1,0,0,'0.0b2') > Version(1,0,0,'0.0b1') assert Version(1,0,0,'0.0c1') > Version(1,0,0,'0.0b9') assert Version(1,0,0,'1') > Version(1,0,0,'0.0c9') # test Version playing nice with tuples assert Version(1,2,3) == (1,2,3,'') assert Version(1,2,4) > (1,2,3)
9a30ee6d15968be0116f26278c5d291b46fd6b24 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/9a30ee6d15968be0116f26278c5d291b46fd6b24/test_wikiutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1444, 12, 2890, 4672, 4049, 273, 9050, 1367, 18, 1444, 468, 1842, 1790, 1815, 4049, 12, 21, 16, 22, 16, 23, 2934, 14019, 422, 404, 1815, 4049, 12, 21, 16, 22, 16, 23, 2934,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1444, 12, 2890, 4672, 4049, 273, 9050, 1367, 18, 1444, 468, 1842, 1790, 1815, 4049, 12, 21, 16, 22, 16, 23, 2934, 14019, 422, 404, 1815, 4049, 12, 21, 16, 22, 16, 23, 2934,...
$X = u^2 x +r$ and $Y = u^3 y +s u^2 x +t$
$X = u^2 x +r$ and $Y = u^3 y +s u^2 x +t$.
def _isomorphism(self,prec=20): """ Returns the isomorphism between self.curve() and the given curve in the form of a vector $[u,r,s,t]$ of $p$-adic numbers. For this to exist the given curve has to have split multiplicative reduction over Q_p.
100c4751d7d02dd3f46744ed6504322763ea6da7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/100c4751d7d02dd3f46744ed6504322763ea6da7/ell_tate_curve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 362, 7657, 6228, 12, 2890, 16, 4036, 33, 3462, 4672, 3536, 2860, 326, 353, 362, 7657, 6228, 3086, 365, 18, 16683, 1435, 471, 326, 864, 8882, 316, 326, 646, 434, 279, 3806, 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, 389, 291, 362, 7657, 6228, 12, 2890, 16, 4036, 33, 3462, 4672, 3536, 2860, 326, 353, 362, 7657, 6228, 3086, 365, 18, 16683, 1435, 471, 326, 864, 8882, 316, 326, 646, 434, 279, 3806, 27...
return '/dev/com%d' % port
return '/dev/com%d' % (port + 1)
def device(port): return '/dev/com%d' % port
401345db048c3803a361ca7e0581ee129c56c23f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/401345db048c3803a361ca7e0581ee129c56c23f/serialposix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2346, 12, 655, 4672, 327, 1173, 5206, 19, 832, 9, 72, 11, 738, 1756, 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, 2346, 12, 655, 4672, 327, 1173, 5206, 19, 832, 9, 72, 11, 738, 1756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.reSeasonNumber = re.compile(r"^Season(\d+)$")
def __init__(self): #### Init Http.__init__(self)
7c744a2a10999159548599edc66e21a65c993fb6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/765/7c744a2a10999159548599edc66e21a65c993fb6/TvRage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 11849, 7, 4378, 2541, 16186, 2738, 972, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 11849, 7, 4378, 2541, 16186, 2738, 972, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
clean_line = trailing_dollars.sub("", line)
clean_line = trailing_dollars.sub("", trailing_dollars_phaser.sub("", line))
def import_loggraph (self, loggraph_lines) : sections_passed = 0 initial_spaces = re.compile("^\s*") trailing_spaces = re.compile("\s*$") trailing_dollars = re.compile("\$\$\ *$") graph_lines = None if isinstance(loggraph_lines, str) : lines = loggraph_lines.split("\n") else : lines = loggraph_lines for raw_line in lines : line = initial_spaces.sub("", raw_line) if line == "" : pass elif line[0:7] == "$TABLE:" : self.title = initial_spaces.sub("", re.sub("\ *:\ *$", "", line[8:])) elif line[0:7] == "$GRAPHS" : graph_lines = line[8:] elif graph_lines is not None and sections_passed == 0 : graph_lines += line elif sections_passed == 1 : clean_line = trailing_dollars.sub("", line) column_labels = clean_line.split() self.column_labels = [ re.sub("_", " ", lbl) for lbl in column_labels ] elif sections_passed == 3 and line[0:2] != "$$" : fields = [ _atof(x) for x in line.split() ] self.add_row(fields) if trailing_spaces.sub("", line)[-2:] == "$$" : sections_passed += 1 if sections_passed == 1 : if graph_lines is None : graph_lines = line[:-2] else : graph_lines += line[:-2] graph_string = re.sub(":\s*$", "", re.sub("^\s*:", "", graph_lines)) fields = graph_string.split(":") i = 0 while i < len(fields) : col_strs = fields[i+2].split(",") self.add_graph(name=fields[i], type=fields[i+1], columns=[ (_atoi(x_str)-1) for x_str in col_strs ]) i += 4 elif sections_passed == 4 : break for i, column in enumerate(self.data) : column_is_ints = [ x is None or int(x)==x for x in column ] if not False in column_is_ints : newcol = [] for x in column : if x is None : newcol.append(x) else : newcol.append(int(x)) self.data[i] = newcol
69b08eca070c48e652382e2e9e0c928314a47935 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/69b08eca070c48e652382e2e9e0c928314a47935/data_plots.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 1330, 4660, 261, 2890, 16, 613, 4660, 67, 3548, 13, 294, 7178, 67, 23603, 273, 374, 2172, 67, 9554, 273, 283, 18, 11100, 2932, 17134, 87, 7388, 13, 7341, 67, 9554, 273, 283, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 1330, 4660, 261, 2890, 16, 613, 4660, 67, 3548, 13, 294, 7178, 67, 23603, 273, 374, 2172, 67, 9554, 273, 283, 18, 11100, 2932, 17134, 87, 7388, 13, 7341, 67, 9554, 273, 283, ...
g.main() resp = reply.pop()
resp = box.run()
def response(box, resp): reply.append(resp) g.main_quit()
0aa7ff0ea91756e8d93eae83a95260ea2d713664 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4591/0aa7ff0ea91756e8d93eae83a95260ea2d713664/debug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 766, 12, 2147, 16, 1718, 4672, 4332, 18, 6923, 12, 12243, 13, 314, 18, 5254, 67, 27176, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 766, 12, 2147, 16, 1718, 4672, 4332, 18, 6923, 12, 12243, 13, 314, 18, 5254, 67, 27176, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...