rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
def generateItemsInRange(date, nextDate):
def generateItemsInRange(self, date, nextDate):
def generateItemsInRange(date, nextDate):
f9498f620986808f9202f0acd457ca3f5519ff68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/f9498f620986808f9202f0acd457ca3f5519ff68/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 3126, 25277, 12, 712, 16, 1024, 1626, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 3126, 25277, 12, 712, 16, 1024, 1626, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
'[-k 0-3] [-m max_ctime] [-A 0-2]'
'[-k 0-3] [-m max_ctime] [-A 0-2] [-F pt1[,..[,ptN]]]'
def usage(): print 'usage: b2bua.py [-fDS] [-l addr] [-p port] [-P pidfile] [-L logfile] ' \ '[-s static_route] [-a ip1[,..[,ipN]]] [-t static_tr_in] [-T static_tr_out]' \ '[-r rtp_proxy_contact1] [-r rtp_proxy_contact2] [-r rtp_proxy_contactN] ' \ '[-k 0-3] [-m max_ctime] [-A 0-2]' sys.exit(1)
89af75556ea1752c7859ead993c7b7b2d12143aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8853/89af75556ea1752c7859ead993c7b7b2d12143aa/b2bua_radius.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 9167, 30, 324, 22, 70, 11886, 18, 2074, 23059, 74, 3948, 65, 23059, 80, 3091, 65, 23059, 84, 1756, 65, 23059, 52, 27656, 65, 23059, 48, 15204, 65, 296, 521, 527...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 9167, 30, 324, 22, 70, 11886, 18, 2074, 23059, 74, 3948, 65, 23059, 80, 3091, 65, 23059, 84, 1756, 65, 23059, 52, 27656, 65, 23059, 48, 15204, 65, 296, 521, 527...
coords_to_zeobuilder(org_coords, opt_coords, graph, parent)
coords_to_zeobuilder(org_coords, opt_coords, graph.molecule.atoms, parent, graph)
def do(self): # Get the molecular graph of the molecule in the selection parent = context.application.cache.node graph = create_molecular_graph([parent], parent)
5aba4ea5a83cb7df0d12a959b02762d6543c411b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11052/5aba4ea5a83cb7df0d12a959b02762d6543c411b/geometry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 4672, 468, 968, 326, 312, 23693, 2667, 434, 326, 13661, 316, 326, 4421, 982, 273, 819, 18, 3685, 18, 2493, 18, 2159, 2667, 273, 752, 67, 81, 23693, 67, 4660, 3816, 2938,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 4672, 468, 968, 326, 312, 23693, 2667, 434, 326, 13661, 316, 326, 4421, 982, 273, 819, 18, 3685, 18, 2493, 18, 2159, 2667, 273, 752, 67, 81, 23693, 67, 4660, 3816, 2938,...
mb = self.GetTopLevelParent().GetMenuBar()
mb = self._mw.GetMenuBar()
def __init__(self, parent, id, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.NO_BORDER): wx.Panel.__init__(self, parent, id, pos, size, style) # Attributes self._sizer = wx.BoxSizer(wx.VERTICAL) ff = "".join(syntax.syntax.GenFileFilters()) self._menbar = BrowserMenuBar(self, self.ID_BROWSE_MENU) self._browser = FileBrowser(self, ID_FILEBROWSE, dir = wx.GetHomeDir(), size = (200,-1), style = wx.DIRCTRL_SHOW_FILTERS | wx.BORDER_SUNKEN, filter = ff) self._config = PathMarkConfig(ed_glob.CONFIG['CACHE_DIR']) for item in self._config.GetItemLabels(): self._menbar.AddItem(item) self._showh_cb = wx.CheckBox(self, self.ID_SHOW_HIDDEN, _("Show Hidden Files")) self._showh_cb.SetValue(False)
5bf57fd6853665d43a5aaec102303912fafa0ce2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/5bf57fd6853665d43a5aaec102303912fafa0ce2/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 949, 33, 27226, 18, 1868, 2555, 16, 963, 33, 27226, 18, 1868, 1225, 16, 2154, 33, 27226, 18, 3417, 67, 38, 7954, 4672, 7075, 18, 5537...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16, 612, 16, 949, 33, 27226, 18, 1868, 2555, 16, 963, 33, 27226, 18, 1868, 1225, 16, 2154, 33, 27226, 18, 3417, 67, 38, 7954, 4672, 7075, 18, 5537...
fields[field].update(fields_def[field])
if field in fields_def: fields[field].update(fields_def[field])
fields_def = self.__view_look_dom(cr, user, node, context=context)
4c0e97eb2cf2b4e643426822165e53bd735ca29b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/4c0e97eb2cf2b4e643426822165e53bd735ca29b/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1466, 67, 536, 273, 365, 16186, 1945, 67, 7330, 67, 9859, 12, 3353, 16, 729, 16, 756, 16, 819, 33, 2472, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1466, 67, 536, 273, 365, 16186, 1945, 67, 7330, 67, 9859, 12, 3353, 16, 729, 16, 756, 16, 819, 33, 2472, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
(epoch == 0 and installed_entry.get('epoch', 0) == None)) and \
(epoch == 0 and installed_entry.get('epoch', 0) == None) or \ (epoch == None and installed_entry.get('epoch', 0) == 0)) and \
def inst_evra_equal(self, config_entry, installed_entry): ''' Compare new style instance to installed entry. '''
ce781647f7576c3cf4bf0f209f93a6e20d340e57 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11867/ce781647f7576c3cf4bf0f209f93a6e20d340e57/RPMng.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1804, 67, 14965, 354, 67, 9729, 12, 2890, 16, 642, 67, 4099, 16, 5876, 67, 4099, 4672, 9163, 11051, 394, 2154, 791, 358, 5876, 1241, 18, 9163, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 1804, 67, 14965, 354, 67, 9729, 12, 2890, 16, 642, 67, 4099, 16, 5876, 67, 4099, 4672, 9163, 11051, 394, 2154, 791, 358, 5876, 1241, 18, 9163, 2, -100, -100, -100, -100, -100, -100, -1...
fobj.seek(-len(frontbuf), 1)
fobj.seek(offset)
def insert_bytes(fobj, size, offset): """Insert size bytes of empty space starting at offset. fobj must be an open file object, open rb+ or equivalent. Mutagen tries to use mmap to resize the file, but falls back to a significantly slower method if mmap fails. """ assert 0 < size assert 0 <= offset fobj.seek(0, 2) filesize = fobj.tell() movesize = filesize - offset fobj.write('\x00' * size) fobj.flush() map = mmap.mmap(fobj.fileno(), filesize + size) try: map.move(offset + size, offset, movesize) map.close() except ValueError: # handle broken python on 64bit map.close() fobj.truncate(filesize) fobj.seek(offset) backbuf = fobj.read(size) if len(backbuf) < size: fobj.write('\x00' * (size - len(backbuf))) while len(backbuf) == size: frontbuf = fobj.read(size) fobj.seek(-len(frontbuf), 1) fobj.write(backbuf) backbuf = frontbuf fobj.write(backbuf)
9ecf49cd771d6167567fe3137cabeb27d31dc315 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/9ecf49cd771d6167567fe3137cabeb27d31dc315/_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 3890, 12, 27936, 16, 963, 16, 1384, 4672, 3536, 4600, 963, 1731, 434, 1008, 3476, 5023, 622, 1384, 18, 225, 24705, 1297, 506, 392, 1696, 585, 733, 16, 1696, 7138, 15, 578, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 3890, 12, 27936, 16, 963, 16, 1384, 4672, 3536, 4600, 963, 1731, 434, 1008, 3476, 5023, 622, 1384, 18, 225, 24705, 1297, 506, 392, 1696, 585, 733, 16, 1696, 7138, 15, 578, 76...
if idx > 0:
if idx + 1 < len(self.history):
def previous_rev(self, rev): rev = int(rev) if rev == 0: return None if self.scope == '/': return rev - 1 idx = self.history.index(rev) if idx > 0: return self.history[idx + 1] return None
2fb8de4db57c76b9210af8ff7dbff465687b07ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2fb8de4db57c76b9210af8ff7dbff465687b07ec/svn_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2416, 67, 9083, 12, 2890, 16, 5588, 4672, 5588, 273, 509, 12, 9083, 13, 309, 5588, 422, 374, 30, 327, 599, 309, 365, 18, 4887, 422, 2023, 30, 327, 5588, 300, 404, 2067, 273, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2416, 67, 9083, 12, 2890, 16, 5588, 4672, 5588, 273, 509, 12, 9083, 13, 309, 5588, 422, 374, 30, 327, 599, 309, 365, 18, 4887, 422, 2023, 30, 327, 5588, 300, 404, 2067, 273, 365, 18,...
attrs['selection'] = self.pool.get(relation)._name_search(cr, user, '', dom, context=context,limit=None,name_get_uid=1)
attrs['selection'] = self.pool.get(relation)._name_search(cr, user, '', dom, context=context, limit=None, name_get_uid=1)
def check_group(node): if node.get('groups'): groups = node.get('groups').split(',') readonly = False access_pool = self.pool.get('ir.model.access') for group in groups: readonly = readonly or access_pool.check_groups(cr, user, group) if not readonly: node.set('invisible', '1') del(node.attrib['groups'])
da17e9c16111f90886f68e1db761e6673b89fa21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da17e9c16111f90886f68e1db761e6673b89fa21/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1655, 12, 2159, 4672, 309, 756, 18, 588, 2668, 4650, 11, 4672, 3252, 273, 756, 18, 588, 2668, 4650, 16063, 4939, 12, 2187, 6134, 17102, 273, 1083, 2006, 67, 6011, 273, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1655, 12, 2159, 4672, 309, 756, 18, 588, 2668, 4650, 11, 4672, 3252, 273, 756, 18, 588, 2668, 4650, 16063, 4939, 12, 2187, 6134, 17102, 273, 1083, 2006, 67, 6011, 273, 365, 18...
'zope.app.zcmlfiles',
'zope.app.i18n',
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
88851191f235e858903c12927e32b63dd0783f70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9628/88851191f235e858903c12927e32b63dd0783f70/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
('localhost', 8080, '/cosmo')
('localhost', 8080, '/cosmo', False)
def parseURL(url): """ Parse URL to host, port, path. >>> print parseURL('http://localhost:8080/cosmo') ('localhost', 8080, '/cosmo') >>> print parseURL('https://localhost') ('localhost', 443, '') >>> print parseURL('localhost') ('localhost', 80, '') >>> print parseURL('localhost/') ('localhost', 80, '') """ import urlparse parsed = urlparse.urlparse(url, scheme="http", allow_fragments=0) if parsed[0] == "http": port = 80 tls = False elif parsed[0] == "https": port = 443 tls = True else: raise Exception("Unknown protocol") host = parsed[1] colon = host.rfind(":") if colon != -1: port = int(host[colon + 1:]) host = host[:colon] path = parsed[2] # Work around some urlparse bugs if host == "": host = path slash = host.rfind("/") if slash != -1: host = host[:slash] path = "" return host, port, path, tls
f2615c778cf7373b4c9e3ffc4cf9921b37fba7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9939/f2615c778cf7373b4c9e3ffc4cf9921b37fba7c7/createaccounts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1785, 12, 718, 4672, 3536, 2884, 1976, 358, 1479, 16, 1756, 16, 589, 18, 225, 4080, 1172, 1109, 1785, 2668, 2505, 2207, 13014, 30, 3672, 3672, 19, 14445, 8683, 6134, 7707, 13014, 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, 1109, 1785, 12, 718, 4672, 3536, 2884, 1976, 358, 1479, 16, 1756, 16, 589, 18, 225, 4080, 1172, 1109, 1785, 2668, 2505, 2207, 13014, 30, 3672, 3672, 19, 14445, 8683, 6134, 7707, 13014, 2...
def fl_set_xyplot_xtics(ob, major, minor): """ fl_set_xyplot_xtics(ob, major, minor) """ _fl_set_xyplot_xtics(ob, major, minor)
def fl_set_xyplot_xtics(obj, major, minor): """ fl_set_xyplot_xtics(obj, major, minor) """ _fl_set_xyplot_xtics(obj, major, minor)
def fl_set_xyplot_xtics(ob, major, minor): """ fl_set_xyplot_xtics(ob, major, minor) """ _fl_set_xyplot_xtics(ob, major, minor)
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1698, 4032, 67, 15239, 2102, 12, 2603, 16, 7888, 16, 8439, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 15239, 2102, 12, 2603, 16, 7888, 16, 8439, 13, 3536, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1698, 4032, 67, 15239, 2102, 12, 2603, 16, 7888, 16, 8439, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 15239, 2102, 12, 2603, 16, 7888, 16, 8439, 13, 3536, 225, ...
os.symlink(DIRACROOT+'/runit/%s/%s' % (system,component), DIRACROOT+'/startup/%s_%s' % (system,component) )
linkName = DIRACROOT+'/startup/%s_%s' % (system,component) if not os.path.lexists(linkName): os.symlink(DIRACROOT+'/runit/%s/%s' % (system,component), linkName )
def export_setupComponent(self,system,component): """ Setup the specified component for running with the runsv daemon """ # Check that the runit directory is there and sain runitDir = DIRACROOT+'/runit/%s/%s' % (system,component) if not os.path.exists(runitDir): # Check that the software for the component is installed result = self.__installComponent(system,component) if not result['OK']: return result sainCheck = True message = '' if not os.path.exists(runitDir+'/run'): sainCheck = False message += ' No run script;' if not os.path.exists(runitDir+'/log'): sainCheck = False message += ' No log directory;' if not os.path.exists(runitDir+'/log/run'): sainCheck = False message += ' No log run script' if not sainCheck: return S_ERROR('No sain installation: %s' % message ) # Create the startup entry now os.symlink(DIRACROOT+'/runit/%s/%s' % (system,component), DIRACROOT+'/startup/%s_%s' % (system,component) ) # Check the runsv status start = time.time() while (time.time()-10) < start: result = self.__getRunitComponentStatus(['%s_%s' % (system,component)]) if not result['OK']: return S_ERROR('Failed to start the component %s_%s' % (system,component) ) if result['Value']['%s_%s' % (system,component)]['RunitStatus'] == "Run": return S_OK("Run") time.sleep(1) # Final check result = self.__getRunitComponentStatus(['%s_%s' % (system,component)]) if not result['OK']: return S_ERROR('Failed to start the component %s_%s' % (system,component) ) return S_OK(result['Value']['%s_%s' % (system,component)]['RunitStatus'])
0de98dd4dbd644d0526d05f1d541804cf16ccb12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/0de98dd4dbd644d0526d05f1d541804cf16ccb12/SystemAdministratorHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 8401, 1841, 12, 2890, 16, 4299, 16, 4652, 4672, 3536, 10939, 326, 1269, 1794, 364, 3549, 598, 326, 1086, 5751, 8131, 3536, 225, 468, 2073, 716, 326, 1086, 305, 1867, 353, 1915,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 8401, 1841, 12, 2890, 16, 4299, 16, 4652, 4672, 3536, 10939, 326, 1269, 1794, 364, 3549, 598, 326, 1086, 5751, 8131, 3536, 225, 468, 2073, 716, 326, 1086, 305, 1867, 353, 1915,...
raise yum.Errors.YumGPGCheckError, errmsg
raise Errors.YumGPGCheckError, errmsg
def _checkSignatures(self,pkgs,callback): ''' The the signatures of the downloaded packages ''' # This can be overloaded by a subclass. for po in pkgs: result, errmsg = self.sigCheckPkg(po) if result == 0: # Verified ok, or verify not req'd continue elif result == 1: self.getKeyForPackage(po, self._askForGPGKeyImport) else: raise yum.Errors.YumGPGCheckError, errmsg
4cf258968a109cd03de2ae7a078ff0e8e6760cea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5445/4cf258968a109cd03de2ae7a078ff0e8e6760cea/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 23918, 12, 2890, 16, 25376, 16, 3394, 4672, 9163, 1021, 326, 14862, 434, 326, 13549, 5907, 9163, 468, 1220, 848, 506, 1879, 4230, 635, 279, 10177, 18, 364, 8275, 316, 16922, 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, 1893, 23918, 12, 2890, 16, 25376, 16, 3394, 4672, 9163, 1021, 326, 14862, 434, 326, 13549, 5907, 9163, 468, 1220, 848, 506, 1879, 4230, 635, 279, 10177, 18, 364, 8275, 316, 16922, 3...
raise Exception("Image %d of %s failed (no output while executing '%s' process)" % (self.index, self.filename, errcode, cmd))
raise Exception("Image %d of %s failed (no output while executing '%s' process)" % (self.index, self.filename, cmd))
def system(self, cmd, result, accept_fail = False): self.log.write(">>>>>>>>>>>>>>>> Executing %s\n" % cmd) self.log.flush() o = subprocess.Popen(cmd, shell=True, stdout=self.log, stderr=subprocess.STDOUT) errcode = o.wait() self.log.write("<<<<<<<<<<<<<<<< Result : %d, %s is %s \n" % (errcode, result, os.path.exists(result))) if errcode != 0 and not accept_fail: raise Exception("Image %d of %s failed (%d while executing '%s' process)" % (self.index, self.filename, errcode, cmd)) if not os.path.exists(result): raise Exception("Image %d of %s failed (no output while executing '%s' process)" % (self.index, self.filename, errcode, cmd))
a41574736a3c305ac73aadae9f125127fad11c3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5321/a41574736a3c305ac73aadae9f125127fad11c3d/lxirimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2619, 12, 2890, 16, 1797, 16, 563, 16, 2791, 67, 6870, 273, 1083, 4672, 365, 18, 1330, 18, 2626, 2932, 9778, 9778, 9778, 9778, 9778, 9778, 9778, 9778, 3889, 8490, 738, 87, 64, 82, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2619, 12, 2890, 16, 1797, 16, 563, 16, 2791, 67, 6870, 273, 1083, 4672, 365, 18, 1330, 18, 2626, 2932, 9778, 9778, 9778, 9778, 9778, 9778, 9778, 9778, 3889, 8490, 738, 87, 64, 82, 6, ...
arg = arg.replace('\\', '\\\\') arg = arg.replace('"', '\\"') return '"%s"' % arg
arg = arg.replace(b'\\', b'\\\\') arg = arg.replace(b'"', b'\\"') return b'"' + arg + b'"'
def _quote(self, arg):
94448afc2448648679db2638ebbc3bbbee6f391a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/94448afc2448648679db2638ebbc3bbbee6f391a/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6889, 12, 2890, 16, 1501, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6889, 12, 2890, 16, 1501, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
default_language = languages[0] kw = {} kw['dc:title'] = {default_language: context.get_form_value('dc:title')} self.set_handler(name, handler, **kw)
title = context.get_form_value('dc:title') handler.set_property('dc:title', title, languages[0])
def new_resource(self, context): class_id = context.get_form_value('class_id') name = context.get_form_value('name')
a896ac23bcd2e69b2e9a6525d182735565c96ea9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/a896ac23bcd2e69b2e9a6525d182735565c96ea9/Folder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 3146, 12, 2890, 16, 819, 4672, 667, 67, 350, 273, 819, 18, 588, 67, 687, 67, 1132, 2668, 1106, 67, 350, 6134, 508, 273, 819, 18, 588, 67, 687, 67, 1132, 2668, 529, 6134, 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, 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, 394, 67, 3146, 12, 2890, 16, 819, 4672, 667, 67, 350, 273, 819, 18, 588, 67, 687, 67, 1132, 2668, 1106, 67, 350, 6134, 508, 273, 819, 18, 588, 67, 687, 67, 1132, 2668, 529, 6134, 2...
else:
elif self.log.getLogPath() == self.oldLogPath:
def getColorizedMessage(self): '''it returns a tuple, first element the pause associated with the level found and second element the colorized message This method is mainly used by the PrintAction action'''
204df6577936487096f527d8e1c670b19db555dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5602/204df6577936487096f527d8e1c670b19db555dc/Message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15672, 1235, 1079, 12, 2890, 4672, 9163, 305, 1135, 279, 3193, 16, 1122, 930, 326, 11722, 3627, 598, 326, 1801, 1392, 471, 2205, 930, 326, 2036, 1235, 883, 1220, 707, 353, 31457, 1399, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15672, 1235, 1079, 12, 2890, 4672, 9163, 305, 1135, 279, 3193, 16, 1122, 930, 326, 11722, 3627, 598, 326, 1801, 1392, 471, 2205, 930, 326, 2036, 1235, 883, 1220, 707, 353, 31457, 1399, 6...
fh = open(os.path.join(path, "FATAL.ERROR");
fh = open(os.path.join(path, "FATAL.ERROR"), "w")
def runTask(taskDef): (task, path, host) = taskDef print "runTask:\n - command='%s'\n - directory='%s'\n - host='%s'" % taskDef os.chdir(path) exitCode = os.system(task) if exitCode: fh = open(os.path.join(path, "FATAL.ERROR"); fh.write("Exit code: %d\n" % exitCode) fh.close() resultZipFile = path + ".zip" pkgutil.compress(resultZipFile, path) pkgutil.sendDataFileToHost(host, pkgutil.PORT_CREATOR, resultZipFile) try: os.chdir(startDir) os.remove(resultZipFile) shutil.rmtree(path) except OSError: print " - runTask: failed to clean up, cause='%s'" % OSError
f53b564e8094ffec55756180f02ff6929fdd2dd7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4229/f53b564e8094ffec55756180f02ff6929fdd2dd7/package_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 2174, 12, 4146, 3262, 4672, 261, 4146, 16, 589, 16, 1479, 13, 273, 1562, 3262, 225, 1172, 315, 2681, 2174, 5581, 82, 300, 1296, 28713, 87, 8314, 82, 300, 1867, 28713, 87, 8314, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2174, 12, 4146, 3262, 4672, 261, 4146, 16, 589, 16, 1479, 13, 273, 1562, 3262, 225, 1172, 315, 2681, 2174, 5581, 82, 300, 1296, 28713, 87, 8314, 82, 300, 1867, 28713, 87, 8314, 8...
self.enddata = self.enddata[-len(data):] + data
self.enddata = self.enddata[len(data)-8:] + data
def __del__(self): data = self.fd.read(8) if len(data) >= 8: self.enddata = data[-8:] else: self.enddata = self.enddata[-len(data):] + data (crc32, isize) = unpack("<iI", self.enddata) if crc32 != self.crcval: print self.filename, "CRC check failed:", crc32, self.crcval if isize != self.length: print self.filename, "Incorrect length of data produced:", \ isize, self.length if isize != self.length2 and self.length2 != None: print self.filename, "Incorrect length of data produced:", \ self.length2
e330f2eacc46ad1d65a18b3dfd497cca0f80a860 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/e330f2eacc46ad1d65a18b3dfd497cca0f80a860/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 501, 273, 365, 18, 8313, 18, 896, 12, 28, 13, 309, 562, 12, 892, 13, 1545, 1725, 30, 365, 18, 409, 892, 273, 501, 18919, 28, 26894, 469, 30, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 501, 273, 365, 18, 8313, 18, 896, 12, 28, 13, 309, 562, 12, 892, 13, 1545, 1725, 30, 365, 18, 409, 892, 273, 501, 18919, 28, 26894, 469, 30, 365, 1...
(recruit.name, speed, defense, aggression, resistance)
(recruit.name, speed, defense, aggression, resistance))
def recruit_score(recruit, speed, defense, aggression, resistance): """Score for recruiting the given unit type.""" need_for_speed = 3 * (villages / self.scout_villages - units_recruited) if need_for_speed < 0: need_for_speed = 0 v = speed * need_for_speed + defense * 0.1 + aggression + resistance v += 1 if v < 1: v = 1 return v
b92010a028b43f9d2771ff8b91004cc33dfd0c79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9355/b92010a028b43f9d2771ff8b91004cc33dfd0c79/sample.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1950, 8653, 305, 67, 6355, 12, 266, 3353, 14945, 16, 8632, 16, 1652, 3558, 16, 1737, 2329, 285, 16, 400, 13145, 4672, 3536, 7295, 364, 1950, 8653, 305, 310, 326, 864, 2836, 618, 12123, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1950, 8653, 305, 67, 6355, 12, 266, 3353, 14945, 16, 8632, 16, 1652, 3558, 16, 1737, 2329, 285, 16, 400, 13145, 4672, 3536, 7295, 364, 1950, 8653, 305, 310, 326, 864, 2836, 618, 12123, ...
href = '/browse/matches/%s/%s'%(category, id_)
q = i.category if not q: q = category href = '/browse/matches/%s/%s'%(q, id_)
def item(i): templ = (u'<div title="{4}" class="category-item">' '<div class="category-name">{0}</div><div>{1}</div>' '<div>{2}' '<span class="href">{3}</span></div></div>') rating, rstring = render_rating(i.avg_rating) name = xml(i.name) if datatype == 'rating': name = xml(_('%d stars')%int(i.avg_rating)) id_ = i.id if id_ is None: id_ = hexlify(force_unicode(name).encode('utf-8')) id_ = xml(str(id_)) desc = '' if i.count > 0: desc += '[' + _('%d books')%i.count + ']' href = '/browse/matches/%s/%s'%(category, id_) return templ.format(xml(name), rating, xml(desc), xml(href), rstring)
7f3212585a7b9da896663c0a3cb5e2b835408c55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/7f3212585a7b9da896663c0a3cb5e2b835408c55/browse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 761, 12, 77, 4672, 13988, 273, 261, 89, 11, 32, 2892, 2077, 21928, 24, 1532, 667, 1546, 4743, 17, 1726, 7918, 2368, 2892, 667, 1546, 4743, 17, 529, 6441, 95, 20, 12863, 2892, 4438, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 761, 12, 77, 4672, 13988, 273, 261, 89, 11, 32, 2892, 2077, 21928, 24, 1532, 667, 1546, 4743, 17, 1726, 7918, 2368, 2892, 667, 1546, 4743, 17, 529, 6441, 95, 20, 12863, 2892, 4438, 289...
try: in_file = open(filename,"r") xmlData = in_file.read() in_file.close() except: DebugPrint(1, 'Processing bundle failure: unable to read file' + filename) responseString = responseString + '\nUnable to read from ' + filename failedBundleCount += 1 continue
try: in_file = open(filename,"r") xmlData = in_file.read() in_file.close() except: DebugPrint(1, 'Processing bundle failure: unable to read file' + filename) responseString = responseString + '\nUnable to read from ' + filename failedBundleCount += 1 continue
def ProcessBundle(bundle): global failedSendCount global suppressedCount global successfulSendCount global successfulReprocessCount global successfulHandshakes global failedHandshakes global failedReprocessCount global successfulBundleCount global failedBundleCount global BundleSize responseString = "" # Loop through and try to send any outstanding records bundleData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \ "<RecordEnvelope>\n" for item in bundle.content: if __connectionError: # Fail record without attempting to send. failedBundleCount += 1 continue xmlData = None filename = item[0] xmlData = item[1] DebugPrint(1, 'Processing bundle file: ' + filename) if ( xmlData == ''): # Read the contents of the file into a string of xml try: in_file = open(filename,"r") xmlData = in_file.read() in_file.close() except: DebugPrint(1, 'Processing bundle failure: unable to read file' + filename) responseString = responseString + '\nUnable to read from ' + filename failedBundleCount += 1 continue if not xmlData: DebugPrint(1, 'Processing bundle failure: ' + filename + ' was empty: skip send') responseString = responseString + '\nEmpty file ' + filename + ': XML not sent' failedBundleCount += 1 continue xmlData = __xmlintroRemove.sub('',xmlData) bundleData = bundleData + xmlData + "\n"; #if (len(bundleData)==0): # bundleData = xmlData #else: # bundleData = bundleData + '|' + xmlData bundleData = bundleData + "</RecordEnvelope>" # Send the xml to the collector for processing response = __sendUsageXML(Config.get_ProbeName(), bundleData, "multiupdate") DebugPrint(1, 'Processing bundle Response: ' + response.get_message()) if (response.get_message() == "Error: Unknown Command: multiupdate or Invalid Arg Count: 1"): DebugPrint(0, "Collector is too old to handle 'bundles', reverting to sending individual records.") BundleSize = 0 bundle.clear() if (bundle.nHandshakes > 0): Handshake() else: SearchOutstandingRecord() Reprocess() return "Bundling has been canceled." responseString = 'Processed bundle with ' + str(bundle.nItems) + ' records: ' + response.get_message() # Determine if the call succeeded, and remove the file if it did if response.get_code() == 0: successfulSendCount += bundle.nRecords successfulHandshakes += bundle.nHandshakes successfulReprocessCount += bundle.nReprocessed successfulBundleCount += 1 for item in bundle.content: filename = item[0] if (filename != ''): os.remove(filename) else: DebugPrint(1, 'Response indicates failure, the following files will not be deleted:') for item in bundle.content: filename = item[0] if (filename != ''): DebugPrint(1, ' ' + filename) failedSendCount += bundle.nRecords failedHandshakes += bundle.nHandshakes failedReprocessCount += bundle.nReprocessed failedBundleCount += 1 bundle.clear() #if responseString != "": # DebugPrint(0, responseString) return responseString
637869f92a8322c20ea53836dc7393fc485f077a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/637869f92a8322c20ea53836dc7393fc485f077a/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 3405, 12, 9991, 4672, 2552, 2535, 3826, 1380, 2552, 24448, 1380, 2552, 6873, 3826, 1380, 2552, 6873, 426, 2567, 1380, 2552, 6873, 1144, 674, 3223, 2552, 2535, 1144, 674, 3223, 2552, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 3405, 12, 9991, 4672, 2552, 2535, 3826, 1380, 2552, 24448, 1380, 2552, 6873, 3826, 1380, 2552, 6873, 426, 2567, 1380, 2552, 6873, 1144, 674, 3223, 2552, 2535, 1144, 674, 3223, 2552, ...
_logger.info("storing computed values of field '%s.%s'" % (self._name, k,))
_logger.debug("storing computed values of field '%s.%s'" % (self._name, k,))
def _update_store(self, cr, f, k): _logger.info("storing computed values of field '%s.%s'" % (self._name, k,)) ss = self._columns[k]._symbol_set update_query = 'UPDATE "%s" SET "%s"=%s WHERE id=%%s' % (self._table, k, ss[0]) cr.execute('select id from '+self._table, debug=self._debug) ids_lst = map(lambda x: x[0], cr.fetchall()) while ids_lst: iids = ids_lst[:40] ids_lst = ids_lst[40:] res = f.get(cr, self, iids, k, 1, {}) for key,val in res.items(): if f._multi: val = val[k] # if val is a many2one, just write the ID if type(val)==tuple: val = val[0] if (val<>False) or (type(val)<>bool): cr.execute(update_query, (ss[1](val), key), debug=self._debug)
8c691d386b851142000a75e0e21d201957a3fdfc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/8c691d386b851142000a75e0e21d201957a3fdfc/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 2233, 12, 2890, 16, 4422, 16, 284, 16, 417, 4672, 389, 4901, 18, 4148, 2932, 334, 6053, 8470, 924, 434, 652, 1995, 87, 7866, 87, 4970, 738, 261, 2890, 6315, 529, 16, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 2233, 12, 2890, 16, 4422, 16, 284, 16, 417, 4672, 389, 4901, 18, 4148, 2932, 334, 6053, 8470, 924, 434, 652, 1995, 87, 7866, 87, 4970, 738, 261, 2890, 6315, 529, 16, 4...
sys.setfilesystemencoding("iso-8859-1") self.assertEqual(sys.getfilesystemencoding(), "iso-8859-1") self.assertRaises(LookupError, sys.setfilesystemencoding, "xxx") sys.setfilesystemencoding(old)
try: sys.setfilesystemencoding("iso-8859-1") self.assertEqual(sys.getfilesystemencoding(), "iso-8859-1") finally: sys.setfilesystemencoding(old) try: self.assertRaises(LookupError, sys.setfilesystemencoding, "xxx") finally: sys.setfilesystemencoding(old)
def test_setfilesystemencoding(self): old = sys.getfilesystemencoding() sys.setfilesystemencoding("iso-8859-1") self.assertEqual(sys.getfilesystemencoding(), "iso-8859-1") self.assertRaises(LookupError, sys.setfilesystemencoding, "xxx") sys.setfilesystemencoding(old)
4ce881e928fc2dfd15a4ffafcf59ed71e51f2d24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/4ce881e928fc2dfd15a4ffafcf59ed71e51f2d24/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 17846, 5999, 12, 2890, 4672, 1592, 273, 2589, 18, 588, 17846, 5999, 1435, 2589, 18, 542, 17846, 5999, 2932, 9699, 17, 17258, 17, 21, 7923, 365, 18, 11231, 5812, 12, 9499, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 17846, 5999, 12, 2890, 4672, 1592, 273, 2589, 18, 588, 17846, 5999, 1435, 2589, 18, 542, 17846, 5999, 2932, 9699, 17, 17258, 17, 21, 7923, 365, 18, 11231, 5812, 12, 9499, ...
out = '<tr><td>%s</td></tr>' % citationhistory
out = '<!--citation history--><tr><td>%s</td></tr>' % citationhistory else: out = "<!--not showing citation history. CFG_BIBRANK_SHOW_CITATION_GRAPHS:" out+= str(CFG_BIBRANK_SHOW_CITATION_GRAPHS)+" citationhistory " out+= str(len(citationhistory))+"-->"
def tmpl_detailed_record_citations_citation_history(self, recID, ln, citationhistory): """Returns the citations history graph of this record
ca7e76ae553715b35359f1f28794b4d89387dfb5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/ca7e76ae553715b35359f1f28794b4d89387dfb5/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 72, 6372, 67, 3366, 67, 71, 18282, 67, 71, 8773, 67, 8189, 12, 2890, 16, 1950, 734, 16, 7211, 16, 21145, 8189, 4672, 3536, 1356, 326, 276, 18282, 4927, 2667, 434, 333, 1409,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 72, 6372, 67, 3366, 67, 71, 18282, 67, 71, 8773, 67, 8189, 12, 2890, 16, 1950, 734, 16, 7211, 16, 21145, 8189, 4672, 3536, 1356, 326, 276, 18282, 4927, 2667, 434, 333, 1409,...
def on_default_head(self, as_text, word_pair=None, tag=None, type='
def on_default_head_tag(self, as_text, word_pair=None, tag=None, type='
def on_default_head(self, as_text, word_pair=None, tag=None, type='#'): self._fout.write(as_text)
519b341e7f8b574728c95d48c2947f353de79259 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2313/519b341e7f8b574728c95d48c2947f353de79259/builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1886, 67, 1978, 12, 2890, 16, 487, 67, 955, 16, 2076, 67, 6017, 33, 7036, 16, 1047, 33, 7036, 16, 618, 2218, 10038, 4672, 365, 6315, 617, 322, 18, 2626, 12, 345, 67, 955, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 67, 1886, 67, 1978, 12, 2890, 16, 487, 67, 955, 16, 2076, 67, 6017, 33, 7036, 16, 1047, 33, 7036, 16, 618, 2218, 10038, 4672, 365, 6315, 617, 322, 18, 2626, 12, 345, 67, 955, ...
if os.path.normpath(i.getDir()).split(os.sep)[0] == "framework": rcs = i.getRCS() if os.path.exists(os.path.join("sandbox", "default", "doc", rcs.getVersion())): listOfProjects.append('<li><a target="body" href="'+rcs.getVersion()+'/index.htm">'+rcs.getVersion()+'</a>\n')
if not isinstance(i, wnsbase.playground.Project.AddOn): if os.path.normpath(i.getDir()).split(os.sep)[0] == "framework": rcs = i.getRCS() if os.path.exists(os.path.join("sandbox", "default", "doc", rcs.getVersion())): listOfProjects.append('<li><a target="body" href="'+rcs.getVersion()+'/index.htm">'+rcs.getVersion()+'</a>\n')
def writeDoxygenHeader(self): projects = core.getProjects()
82865c0736fa0fec05265e89885beee6b1a4d2b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8259/82865c0736fa0fec05265e89885beee6b1a4d2b2/Documentation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3244, 1698, 4507, 1864, 12, 2890, 4672, 10137, 273, 2922, 18, 588, 15298, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3244, 1698, 4507, 1864, 12, 2890, 4672, 10137, 273, 2922, 18, 588, 15298, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
>>> for i in range(100): ... print(i**2, end=' ') 0 1...4...9 16 ... 36 49 64 ... 9801
>>> if 1: ... for i in range(100): ... print(i**2, end=' ') ... print('!') 0 1...4...9 16 ... 36 49 64 ... 9801 !
>>> def f(x):
d5c9c6f929123bf058238049eb301fb654b9f9fe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/d5c9c6f929123bf058238049eb301fb654b9f9fe/test_doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 92, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 4080, 1652, 284, 12, 92, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
prefix+'class_size': cls.class_size_max,
prefix+'class_size': csm ,
def load_data(self, cls, prefix=''): self.initial = {prefix+'status': cls.status, prefix+'reg_status': None, prefix+'min_grade': cls.grade_min, prefix+'max_grade': cls.grade_max, prefix+'notes': cls.directors_notes, prefix+'class_size': cls.class_size_max, prefix+'clsid': cls.id, prefix+'progress': [cm.id for cm in cls.checklist_progress.all()]} return self.initial
dd203271d5dd3877e6d72e68afa34a4a5162bf7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/dd203271d5dd3877e6d72e68afa34a4a5162bf7e/management.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 892, 12, 2890, 16, 2028, 16, 1633, 2218, 11, 4672, 365, 18, 6769, 273, 288, 3239, 6797, 2327, 4278, 2028, 18, 2327, 16, 1633, 6797, 1574, 67, 2327, 4278, 599, 16, 1633, 6797,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 892, 12, 2890, 16, 2028, 16, 1633, 2218, 11, 4672, 365, 18, 6769, 273, 288, 3239, 6797, 2327, 4278, 2028, 18, 2327, 16, 1633, 6797, 1574, 67, 2327, 4278, 599, 16, 1633, 6797,...
<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor=" <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor=" <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor=" <widget source="listlabel" render="Label" position="16,44" size="200,21" valign="center" font="Regular;18" />
<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor=" <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor=" <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor=" <widget source="listlabel" render="Label" position="10,44" size="250,20" font="Regular;16" />
def setText(self, text): self["content"].setText(text)
04d23246dd5c88df949d523e0c149be8070a0a96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/04d23246dd5c88df949d523e0c149be8070a0a96/flasher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7883, 12, 2890, 16, 977, 4672, 365, 9614, 1745, 6, 8009, 542, 1528, 12, 955, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 7883, 12, 2890, 16, 977, 4672, 365, 9614, 1745, 6, 8009, 542, 1528, 12, 955, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
include the keyed node.
include the keyed vertex.
def clustering_coeff(self, nbunch=None, with_labels=False, weights=False): r""" Returns the clustering coefficient for each node in nbunch as an ordered list. The clustering coefficient of a graph is the fraction of possible triangles that are triangles, c_i = triangles_i / (k_i*(k_i-1)/2) where k_i is the degree of node i, [1]. A coefficient for the whole graph is the average of the c_i. Transitivity is the fraction of all possible triangles which are triangles, T = 3*triangles/triads, [1]. INPUT: -- nbunch - the nodes to inspect (default None returns data on all nodes in graph) -- with_labels - (boolean) default False returns list as above True returns dict keyed by node labels. -- weights - default is False. If both with_labels and weights are True, then returns a clustering coefficient dict and a dict of weights based on degree. Weights are the fraction of connected triples in the graph that include the keyed node. REFERENCE: [1] Aric Hagberg, Dan Schult and Pieter Swart. NetworkX documentation. [Online] Available: https://networkx.lanl.gov/reference/networkx/ EXAMPLES: sage: (graphs.FruchtGraph()).clustering_coeff() [0.33333333333333331, 0.33333333333333331, 0.0, 0.33333333333333331, 0.33333333333333331, 0.33333333333333331, 0.33333333333333331, 0.33333333333333331, 0.0, 0.33333333333333331, 0.33333333333333331, 0.0] sage: (graphs.FruchtGraph()).clustering_coeff(with_labels=True) {0: 0.33333333333333331, 1: 0.33333333333333331, 2: 0.0, 3: 0.33333333333333331, 4: 0.33333333333333331, 5: 0.33333333333333331, 6: 0.33333333333333331, 7: 0.33333333333333331, 8: 0.0, 9: 0.33333333333333331, 10: 0.33333333333333331, 11: 0.0} sage: (graphs.FruchtGraph()).clustering_coeff(with_labels=True,weights=True) ({0: 0.33333333333333331, 1: 0.33333333333333331, 2: 0.0, 3: 0.33333333333333331, 4: 0.33333333333333331, 5: 0.33333333333333331, 6: 0.33333333333333331, 7: 0.33333333333333331, 8: 0.0, 9: 0.33333333333333331, 10: 0.33333333333333331, 11: 0.0}, {0: 0.083333333333333329, 1: 0.083333333333333329, 2: 0.083333333333333329, 3: 0.083333333333333329, 4: 0.083333333333333329, 5: 0.083333333333333329, 6: 0.083333333333333329, 7: 0.083333333333333329, 8: 0.083333333333333329, 9: 0.083333333333333329, 10: 0.083333333333333329, 11: 0.083333333333333329}) sage: (graphs.FruchtGraph()).clustering_coeff(nbunch=[0,1,2]) [0.33333333333333331, 0.33333333333333331, 0.0] sage: (graphs.FruchtGraph()).clustering_coeff(nbunch=[0,1,2],with_labels=True,weights=True) ({0: 0.33333333333333331, 1: 0.33333333333333331, 2: 0.0}, {0: 0.083333333333333329, 1: 0.083333333333333329, 2: 0.083333333333333329}) """ import networkx return networkx.clustering(self._nxg, nbunch, with_labels, weights)
a520fa15cff86fbbd1335f8b6f9d36203c74d574 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a520fa15cff86fbbd1335f8b6f9d36203c74d574/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18743, 67, 18132, 12, 2890, 16, 4264, 4384, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 5376, 33, 8381, 4672, 436, 8395, 2860, 326, 18743, 16554, 364, 1517, 756, 316, 4264, 4384, 487, 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, 18743, 67, 18132, 12, 2890, 16, 4264, 4384, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 5376, 33, 8381, 4672, 436, 8395, 2860, 326, 18743, 16554, 364, 1517, 756, 316, 4264, 4384, 487, 3...
subpaths = path.split('/') subpaths.pop(0) base = './src' for subpath in subpaths: base += '/' + subpath if not os.path.exists(base): command = ('svn update --depth empty ' + base) print command os.system(command) else: print "Found " + base files = getFilesInRevision(url, revision) for file in files:
subpaths = path.split('/') subpaths.pop(0) base = './src' for subpath in subpaths: base += '/' + subpath if not os.path.exists(base): command = ('svn update --depth empty ' + base) print command os.system(command) else: print "Found " + base for file in getFilesInRevision(url, revision):
def checkoutRevision(url, revision, branch_url): paths = getBestMergePaths(url, revision) deltree('./src') if not os.path.exists('./src'): command = 'svn checkout -N ' + branch_url print command os.system(command) #This line is extremely important due to the way svn behaves in the set-depths #action. If parents aren't handled before children, the child directories get #clobbered and the merge step fails. paths.sort() for path in paths: subpaths = path.split('/') subpaths.pop(0) base = './src' for subpath in subpaths: base += '/' + subpath if not os.path.exists(base): command = ('svn update --depth empty ' + base) print command os.system(command) else: print "Found " + base files = getFilesInRevision(url, revision) for file in files: #Prevent the tool from clobbering the src directory if (file == ""): continue command = ('svn up ./src' + file) print command os.system(command)
44364270024fa1f0c4c0875635e210722b0d4b26 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/44364270024fa1f0c4c0875635e210722b0d4b26/drover.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13926, 7939, 12, 718, 16, 6350, 16, 3803, 67, 718, 4672, 2953, 273, 28782, 6786, 4466, 12, 718, 16, 6350, 13, 225, 1464, 3413, 2668, 18, 19, 4816, 6134, 225, 309, 486, 1140, 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, 13926, 7939, 12, 718, 16, 6350, 16, 3803, 67, 718, 4672, 2953, 273, 28782, 6786, 4466, 12, 718, 16, 6350, 13, 225, 1464, 3413, 2668, 18, 19, 4816, 6134, 225, 309, 486, 1140, 18, 803, ...
if t - self.local_wm_publish_time >= self.local_wm_publish_period: return
if t - self.local_wm_publish_time < self.local_wm_publish_period: return self.log.debug("Publishing local watermark: %d" % st.local_watermark)
def publish_local_wm(self, src_db): """Send local watermark to provider. """ if not self.main_worker: return t = time.time() if t - self.local_wm_publish_time >= self.local_wm_publish_period: return
0801a025297e412cc142680798bdd01d2d887f88 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14597/0801a025297e412cc142680798bdd01d2d887f88/worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 67, 3729, 67, 91, 81, 12, 2890, 16, 1705, 67, 1966, 4672, 3536, 3826, 1191, 14377, 358, 2893, 18, 3536, 309, 486, 365, 18, 5254, 67, 10124, 30, 327, 268, 273, 813, 18, 957, 143...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 67, 3729, 67, 91, 81, 12, 2890, 16, 1705, 67, 1966, 4672, 3536, 3826, 1191, 14377, 358, 2893, 18, 3536, 309, 486, 365, 18, 5254, 67, 10124, 30, 327, 268, 273, 813, 18, 957, 143...
try: if not JobStateInfoAPI.isRegistered(jobname): JobStateChangeAPI.register(jobname, 'Processing', int(self.args['maxRetries']), 1) JobStateChangeAPI.create(jobname, jobCache) JobStateChangeAPI.inProgress(jobname) logging.debug( " Adding cleanup triggers for %s" % self.cleanupFlags ) except Exception, ex: logging.error("JobState Error:%s" % str(ex)) return try: cleanFlags = [] cleanFlags.extend(self.cleanupFlags) if jobType == "Merge": logging.debug( "Adding MergeSensor Cleanup Flag to Merge type job") cleanFlags.append("MergeSensor") for component in cleanFlags: logging.debug("trigger.addFlag(cleanup, %s, %s" % ( jobname, component) ) self.trigger.addFlag("cleanup", jobname, component)
if self.job_state: try: if not JobStateInfoAPI.isRegistered(jobname): JobStateChangeAPI.register(jobname, 'Processing', int(self.args['maxRetries']), 1) JobStateChangeAPI.create(jobname, cacheArea) JobStateChangeAPI.inProgress(jobname) logging.debug(" Adding cleanup triggers for %s" % self.cleanupFlags) cleanFlags = [] cleanFlags.extend(self.cleanupFlags) if jobType == "Merge": logging.debug("Adding MergeSensor Cleanup Flag to Merge type job") cleanFlags.append("MergeSensor") for component in cleanFlags: logging.debug("trigger.addFlag(cleanup, %s, %s" % ( jobname, component) ) self.trigger.addFlag("cleanup", jobname, component)
def createJob(self, jobSpecFile): """ _createJob_
99bb77efa308d529b7632609530971c4910a44bc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/99bb77efa308d529b7632609530971c4910a44bc/JobCreatorComponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2278, 12, 2890, 16, 1719, 1990, 812, 4672, 3536, 389, 2640, 2278, 67, 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, 752, 2278, 12, 2890, 16, 1719, 1990, 812, 4672, 3536, 389, 2640, 2278, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
data_obj = self.pool.get('ir.model.data')
def make_action(self, cr, uid, id, context=None): """ If action doesn't exists we must create it """ data_obj = self.pool.get('ir.model.data') b = self.browse(cr, uid, id, context=context) wiz_name = 'jasper.%s' % b.service res = { 'name': b.name, 'wiz_name': wiz_name, 'multi': False, 'model': b.model_id.model, 'jasper': True, } xml_id = 'wizard_jasper_%s' % b.service
c7e0b98c27d00ec08b98d85d9ed006a56fd8bce5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6641/c7e0b98c27d00ec08b98d85d9ed006a56fd8bce5/jasper_document.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 1128, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 819, 33, 7036, 4672, 3536, 971, 1301, 3302, 1404, 1704, 732, 1297, 752, 518, 3536, 324, 273, 365, 18, 25731, 12, 3353, 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, 1221, 67, 1128, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 819, 33, 7036, 4672, 3536, 971, 1301, 3302, 1404, 1704, 732, 1297, 752, 518, 3536, 324, 273, 365, 18, 25731, 12, 3353, 16, ...
trailing_dot = ''
trailing_dot = b''
def encode(self,input,errors='strict'):
cc8c2fe72be08080ce95434d60e82e08cbffb739 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/cc8c2fe72be08080ce95434d60e82e08cbffb739/idna.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2890, 16, 2630, 16, 4324, 2218, 13948, 11, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2017, 12, 2890, 16, 2630, 16, 4324, 2218, 13948, 11, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
o.signal_emit("activated_key", subpart)
def on_edje_signal_mouse_up_key(self, emission, source):
04beadb3a2448f743700fd95e08f9c0f757090f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4058/04beadb3a2448f743700fd95e08f9c0f757090f8/bluemaemo_keyboard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 329, 78, 73, 67, 10420, 67, 11697, 67, 416, 67, 856, 12, 2890, 16, 801, 19710, 16, 1084, 4672, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 329, 78, 73, 67, 10420, 67, 11697, 67, 416, 67, 856, 12, 2890, 16, 801, 19710, 16, 1084, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
bt = customs.models.BugzillaTracker.all_trackers.get(project_name=tracker_name)
bt = mysite.customs.models.BugzillaTracker.all_trackers.get(project_name=tracker_name)
def generate_bugzilla_tracker_classes(tracker_name=None): # If a tracker name was passed in then return the # specific sub-class for that tracker. if tracker_name: try: bt = customs.models.BugzillaTracker.all_trackers.get(project_name=tracker_name) bt_class = bugzilla_tracker_factory(bt) except mysite.customs.models.BugzillaTracker.DoesNotExist: bt_class = None yield bt_class return else: # Create a generator that yields all sub-classes. for bt in mysite.customs.models.BugzillaTracker.all_trackers.all(): yield bugzilla_tracker_factory(bt)
6cd56a3a63a5a0393babac9e396d57f7629caa2f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/6cd56a3a63a5a0393babac9e396d57f7629caa2f/bugzilla.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 925, 15990, 67, 16543, 67, 4701, 12, 16543, 67, 529, 33, 7036, 4672, 468, 971, 279, 9745, 508, 1703, 2275, 316, 1508, 327, 326, 468, 2923, 720, 17, 1106, 364, 716, 9745, 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, 2103, 67, 925, 15990, 67, 16543, 67, 4701, 12, 16543, 67, 529, 33, 7036, 4672, 468, 971, 279, 9745, 508, 1703, 2275, 316, 1508, 327, 326, 468, 2923, 720, 17, 1106, 364, 716, 9745, 18, ...
querystr = "calparms=%s,%d,%d,%d,%%d,%s" % (qpagenames, parmyear, parmmonth, parmoffset, qtemplate) prevlink = p.url(request, querystr % (parmoffset2 - 1), 0) nextlink = p.url(request, querystr % (parmoffset2 + 1), 0) prevylink = p.url(request, querystr % (parmoffset2 - 12), 0) nextylink = p.url(request, querystr % (parmoffset2 + 12), 0)
querystr = "calparms=%%s,%d,%d,%d,%%d,%%s" % (parmyear, parmmonth, parmoffset) prevlink = p.url(request, querystr % (qpagenames, parmoffset2 - 1, qtemplate), 0) nextlink = p.url(request, querystr % (qpagenames, parmoffset2 + 1, qtemplate), 0) prevylink = p.url(request, querystr % (qpagenames, parmoffset2 - 12, qtemplate), 0) nextylink = p.url(request, querystr % (qpagenames, parmoffset2 + 12, qtemplate), 0)
def execute(macro, text): request = macro.request formatter = macro.formatter _ = request.getText # return immediately if getting links for the current page if request.mode_getpagelinks: return '' args_re = re.compile(_args_re_pattern) currentyear, currentmonth, currentday, h, m, s, wd, yd, ds = request.user.getTime(time.time()) thispage = formatter.page.page_name # does the url have calendar params (= somebody has clicked on prev/next links in calendar) ? if macro.form.has_key('calparms'): text2 = macro.form['calparms'][0] args2 = args_re.match(text2) if not args2: return ('<p><strong class="error">%s</strong></p>' % _('Invalid MonthCalendar calparms "%s"!')) % (text2,) else: has_calparms = 1 # yes! cparmpagename, cparmyear, cparmmonth, cparmoffset, cparmoffset2, cparmheight6, cparmanniversary, cparmtemplate = \ parseargs(args2, thispage, currentyear, currentmonth, 0, 0, 0, 0, '') else: has_calparms = 0 if text is None: # macro call without parameters parmpagename, parmyear, parmmonth, parmoffset, parmoffset2, parmheight6, anniversary, parmtemplate = \ [thispage], currentyear, currentmonth, 0, 0, 0, 0, '' else: # parse and check arguments args = args_re.match(text) if not args: return ('<p><strong class="error">%s</strong></p>' % _('Invalid MonthCalendar arguments "%s"!')) % (text,) else: parmpagename, parmyear, parmmonth, parmoffset, parmoffset2, parmheight6, anniversary, parmtemplate = \ parseargs(args, thispage, currentyear, currentmonth, 0, 0, 0, 0, '') # does url have calendar params and is THIS the right calendar to modify (we can have multiple # calendars on the same page)? #if has_calparms and (cparmpagename,cparmyear,cparmmonth,cparmoffset) == (parmpagename,parmyear,parmmonth,parmoffset): # move all calendars when using the navigation: if has_calparms and cparmpagename == parmpagename: year,month = yearmonthplusoffset(parmyear, parmmonth, parmoffset + cparmoffset2) parmoffset2 = cparmoffset2 parmtemplate = cparmtemplate else: year,month = yearmonthplusoffset(parmyear, parmmonth, parmoffset) # get the calendar monthcal = calendar.monthcalendar(year, month) # european / US differences months = ('January','February','March','April','May','June','July','August','September','October','November','December') # Set things up for Monday or Sunday as the first day of the week if calendar.firstweekday() == calendar.MONDAY: wkend = (5, 6) wkdays = ('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun') if calendar.firstweekday() == calendar.SUNDAY: wkend = (0, 6) wkdays = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat') colorstep = 85 p = Page(request, thispage) qpagenames = '*'.join(map(wikiutil.quoteWikinameURL, parmpagename)) qtemplate = wikiutil.quoteWikinameURL(parmtemplate) querystr = "calparms=%s,%d,%d,%d,%%d,%s" % (qpagenames, parmyear, parmmonth, parmoffset, qtemplate) prevlink = p.url(request, querystr % (parmoffset2 - 1), 0) nextlink = p.url(request, querystr % (parmoffset2 + 1), 0) prevylink = p.url(request, querystr % (parmoffset2 - 12), 0) nextylink = p.url(request, querystr % (parmoffset2 + 12), 0) prevmonth = formatter.url(1, prevlink, 'cal-link') + '&lt;' + formatter.url(0) nextmonth = formatter.url(1, nextlink, 'cal-link') + '&gt;' + formatter.url(0) prevyear = formatter.url(1, prevylink, 'cal-link') + '&lt;&lt;' + formatter.url(0) nextyear = formatter.url(1, nextylink, 'cal-link') + '&gt;&gt;' + formatter.url(0) if parmpagename != [thispage]: pagelinks = '' r, g, b = (255, 0, 0) l = len(parmpagename[0]) steps = len(parmpagename) maxsteps = (255 / colorstep) if steps > maxsteps: steps = maxsteps chstep = int(l / steps) st = 0 while st < l: ch = parmpagename[0][st:st+chstep] r, g, b = cliprgb(r, g, b) pagelinks = pagelinks + '<a style="%s" href="%s">%s</a>' % \ ('background-color:#%02x%02x%02x;color:#000000;text-decoration:none' % \ (r,g,b), Page(request, parmpagename[0]).url(request), ch) r, g, b = (r, g+colorstep, b) st = st + chstep r, g, b = (255-colorstep, 255, 255-colorstep) for page in parmpagename[1:]: pagelinks = pagelinks + '*<a style="%s" href="%s">%s</a>' % \ ('background-color:#%02x%02x%02x;color:#000000;text-decoration:none' % \ (r,g,b), Page(request, page).url(request), page) showpagename = ' %s<BR>\n' % pagelinks else: showpagename = '' if calendar.firstweekday() == calendar.SUNDAY: resth1 = ' <th colspan="7" class="cal-header">\n' \ '%s' \ ' %s&nbsp;%s&nbsp;<b>&nbsp;%s&nbsp;%s</b>&nbsp;%s\n&nbsp;%s\n' \ ' </th>\n' % (showpagename, prevyear, prevmonth, months[month-1], str(year), nextmonth, nextyear) if calendar.firstweekday() == calendar.MONDAY: resth1 = ' <th colspan="7" class="cal-header">\n' \ '%s' \ ' %s&nbsp;%s&nbsp;<b>&nbsp;%s&nbsp;/&nbsp;%s</b>&nbsp;%s\n&nbsp;%s\n' \ ' </th>\n' % (showpagename, prevyear, prevmonth, str(year), month, nextmonth, nextyear) restr1 = ' <tr>\n%s </tr>\n' % resth1 r7 = range(7) restd2 = [] for wkday in r7: wday = _(wkdays[wkday]) if wkday in wkend: cssday = "cal-weekend" else: cssday = "cal-workday" restd2.append(' <td class="%s" width="14%%">%s</td>\n' % (cssday, wday)) restr2 = ' <tr>\n%s </tr>\n' % "".join(restd2) if parmheight6: while len(monthcal) < 6: monthcal = monthcal + [[0,0,0,0,0,0,0]] maketip_js = [] restrn = [] for week in monthcal: restdn = [] for wkday in r7: day = week[wkday] if not day: restdn.append(' <td class="cal-invalidday">&nbsp;</td>\n') else: page = parmpagename[0] if anniversary: link = "%s/%02d-%02d" % (page, month, day) else: link = "%s/%4d-%02d-%02d" % (page, year, month, day) daypage = Page(request, link) if daypage.exists(): csslink = "cal-usedday" query = {} r, g, b, u = (255, 0, 0, 1) daycontent = daypage.get_raw_body() header1_re = re.compile(r'^\s*=\s(.*)\s=$', re.MULTILINE) # re.UNICODE titletext = [] for match in header1_re.finditer(daycontent): if match: title = match.group(1) title = wikiutil.escape(title).replace("'","\\'") titletext.append(title) tipname = link tiptitle = link tiptext = '<br>'.join(titletext) maketip_js.append("maketip('%s','%s','%s');" % (tipname, tiptitle, tiptext)) onmouse = {'onMouseOver': "tip('%s')" % tipname, 'onMouseOut': "untip()"} else: csslink = "cal-emptyday" if parmtemplate: query = {'action': 'edit', 'template': parmtemplate} else: query = {} r, g, b, u = (255, 255, 255, 0) if wkday in wkend: csslink = "cal-weekend" onmouse = {} for otherpage in parmpagename[1:]: otherlink = "%s/%4d-%02d-%02d" % (otherpage, year, month, day) otherdaypage = Page(request, otherlink) if otherdaypage.exists(): csslink = "cal-usedday" if u == 0: r, g, b = (r-colorstep, g, b-colorstep) else: r, g, b = (r, g+colorstep, b) r, g, b = cliprgb(r, g, b) style = 'background-color:#%02x%02x%02x' % (r, g, b) fmtlink = formatter.url(1, daypage.url(request, query), csslink, **onmouse) + str(day) + formatter.url(0) if day == currentday and month == currentmonth and year == currentyear: cssday = "cal-today" fmtlink = "<b>%s</b>" % fmtlink # for browser with CSS probs else: cssday = "cal-nottoday" restdn.append(' <td style="%s" class="%s">%s</td>\n' % (style, cssday, fmtlink)) restrn.append(' <tr>\n%s </tr>\n' % "".join(restdn)) restable = '<table border="2" cellspacing="2" cellpadding="2">\n%s%s%s</table>\n' restable = restable % (restr1, restr2, "".join(restrn)) result = """\
cea15359efe56c1b1fe2e50ac1fac71fea730ce0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/cea15359efe56c1b1fe2e50ac1fac71fea730ce0/MonthCalendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 26448, 16, 977, 4672, 590, 273, 11522, 18, 2293, 4453, 273, 11522, 18, 12354, 389, 273, 590, 18, 588, 1528, 225, 468, 327, 7636, 309, 8742, 4716, 364, 326, 783, 1363, 309, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 26448, 16, 977, 4672, 590, 273, 11522, 18, 2293, 4453, 273, 11522, 18, 12354, 389, 273, 590, 18, 588, 1528, 225, 468, 327, 7636, 309, 8742, 4716, 364, 326, 783, 1363, 309, 59...
def parse_search_html(lang_id, search, start):
def parse_search_html(lang_id, msgctxt, msgid, start):
def parse_search_html(lang_id, search, start): param = urlencode( { 'show' : 'all', \ 'search' : search, \ 'start' : start } ) url = 'https://translations.launchpad.net/bleachbit/trunk/+pots/bleachbit/%s/+translate?%s' \ % (lang_id, param) print 'debug: fetch url %s ' % url doc = urlopen(url).read() soup = BeautifulSoup(doc) for tr in soup.findAll('tr', attrs={'class': 'translation'}): div = tr.find('div', attrs={'id' : re.compile("^msgset_[0-9]+_")}) english = div.text for attr in tr.find('a').attrs: if attr[0] == 'href': href = attr[1] translations[lang_id][english] = href ret = re.search('rel="next".*start=([0-9]+)"', doc, re.MULTILINE & re.DOTALL) if ret: # more results next_n = ret.groups(0) return int(next_n) else: # no more results return None
c2f547f3c6ace311de05d04bd710af853a4691fb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7852/c2f547f3c6ace311de05d04bd710af853a4691fb/lp2svn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 3072, 67, 2620, 12, 4936, 67, 350, 16, 1234, 20364, 16, 24389, 16, 787, 4672, 579, 273, 9922, 12, 288, 296, 4500, 11, 294, 296, 454, 2187, 521, 296, 3072, 11, 294, 1623, 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, 1109, 67, 3072, 67, 2620, 12, 4936, 67, 350, 16, 1234, 20364, 16, 24389, 16, 787, 4672, 579, 273, 9922, 12, 288, 296, 4500, 11, 294, 296, 454, 2187, 521, 296, 3072, 11, 294, 1623, 16...
code = """%(return_type)s %(name)s(%(typed_args)s) { if (%(count_name)s < 0) { SetGLError(GL_INVALID_VALUE, "gl%(name)s: n < 0"); return; } %(resource_type)s_id_handler_->MakeIds(0, %(args)s); helper_->%(name)sImmediate(%(args)s); } """ file.Write(code % {
args = {
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(name)s(%(typed_args)s) {
dd338377948baa4520f90f4c2447926216be4728 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dd338377948baa4520f90f4c2447926216be4728/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 981, 273, 3536, 17105, 2463, 67, 723, 13, 87, 8975, 529, 13, 87, 92...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 981, 273, 3536, 17105, 2463, 67, 723, 13, 87, 8975, 529, 13, 87, 92...
b = bytearray()
b = self.type2test()
def test_empty_sequence(self): b = bytearray() self.assertEqual(len(b), 0) self.assertRaises(IndexError, lambda: b[0]) self.assertRaises(IndexError, lambda: b[1]) self.assertRaises(IndexError, lambda: b[sys.maxsize]) self.assertRaises(IndexError, lambda: b[sys.maxsize+1]) self.assertRaises(IndexError, lambda: b[10**100]) self.assertRaises(IndexError, lambda: b[-1]) self.assertRaises(IndexError, lambda: b[-2]) self.assertRaises(IndexError, lambda: b[-sys.maxsize]) self.assertRaises(IndexError, lambda: b[-sys.maxsize-1]) self.assertRaises(IndexError, lambda: b[-sys.maxsize-2]) self.assertRaises(IndexError, lambda: b[-10**100])
510711d598f1432afb021a01c2457b14334c6157 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/510711d598f1432afb021a01c2457b14334c6157/test_bytes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5531, 67, 6178, 12, 2890, 4672, 324, 273, 365, 18, 723, 22, 3813, 1435, 365, 18, 11231, 5812, 12, 1897, 12, 70, 3631, 374, 13, 365, 18, 11231, 12649, 6141, 12, 1016, 668, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5531, 67, 6178, 12, 2890, 4672, 324, 273, 365, 18, 723, 22, 3813, 1435, 365, 18, 11231, 5812, 12, 1897, 12, 70, 3631, 374, 13, 365, 18, 11231, 12649, 6141, 12, 1016, 668, 1...
if bestMatch is None: installed = _find_installed() if installed: if installed[0] >= minv: bestMatch = installed[0]
def ensureMinimal(minVersion): """ Checks to see if the default version of wxPython is greater-than or equal to `minVersion`. If not then it will try to find an installed version that is >= minVersion. If none are available then a message is displayed that will inform the user and will offer to open their web browser to the wxPython downloads page, and will then exit the application. """ assert type(minVersion) == str # ensure that wxPython hasn't been imported yet. if sys.modules.has_key('wx') or sys.modules.has_key('wxPython'): raise VersionError("wxversion.ensureMinimal() must be called before wxPython is imported") bestMatch = None minv = _wxPackageInfo(minVersion) defaultPath = _find_default() if defaultPath: defv = _wxPackageInfo(defaultPath, True) if defv >= minv: bestMatch = defv if bestMatch is None: installed = _find_installed() if installed: # The list is in reverse sorted order, so if the first one is # big enough then choose it if installed[0] >= minv: bestMatch = installed[0] if bestMatch is None: import wx, webbrowser versions = "\n".join([" "+ver for ver in getInstalled()]) app = wx.PySimpleApp() result = wx.MessageBox("This application requires a version of wxPython " "greater than or equal to %s, but a matching version " "was not found.\n\n" "You currently have these version(s) installed:\n%s\n\n" "Would you like to download a new version of wxPython?\n" % (minVersion, versions), "wxPython Upgrade Needed", style=wx.YES_NO) if result == wx.YES: webbrowser.open(UPDATE_URL) app.MainLoop() sys.exit() sys.path.insert(0, bestMatch.pathname) _selected = bestMatch
d27da8a5c14b0d12b001e49aceb463cfeaf4acc6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9957/d27da8a5c14b0d12b001e49aceb463cfeaf4acc6/wxpy-config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 2930, 2840, 12, 1154, 1444, 4672, 3536, 13074, 358, 2621, 309, 326, 805, 1177, 434, 7075, 15774, 353, 6802, 17, 23483, 578, 3959, 358, 1375, 1154, 1444, 8338, 225, 971, 486, 1508, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 2930, 2840, 12, 1154, 1444, 4672, 3536, 13074, 358, 2621, 309, 326, 805, 1177, 434, 7075, 15774, 353, 6802, 17, 23483, 578, 3959, 358, 1375, 1154, 1444, 8338, 225, 971, 486, 1508, ...
'groupdesc' in req.args, 'verbose' in req.args, req.args.get('limit'))
'groupdesc' in req.args, 'verbose' in req.args, req.args.get('limit'))
def process_request(self, req): req.perm.assert_permission('TICKET_VIEW')
5a19c15e0154fc41d4f3c7296deda7a057f1a26a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/5a19c15e0154fc41d4f3c7296deda7a057f1a26a/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 1111, 18, 12160, 18, 11231, 67, 9827, 2668, 56, 16656, 1584, 67, 12145, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 1111, 18, 12160, 18, 11231, 67, 9827, 2668, 56, 16656, 1584, 67, 12145, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if not self._dirty:
if not self._dirty and hasattr(self, '_domain'):
def update(self): if not self._dirty: return self.exampleTable self.exampleTable = None try: curs = self.conn.cursor() curs.execute(self.query) desc = curs.description if not self.classVarName: classVarName = desc[0][0] else: classVarName = self.classVarName attrNames = [] if not self.discreteNames: discreteNames = [] else: discreteNames = self.discreteNames if not self.metaNames: metaNames = [] else: metaNames = self.metaNames for i in desc: name = i[0] typ = i[1] if name in discreteNames: attrName = 'D#' + name elif typ == self.dbmod.STRING: attrName = 'S#' + name elif typ == self.dbmod.DATETIME: attrName = 'S#' + name else: attrName = 'C#' + name if name == classVarName: attrName = "c" + attrName elif name in metaNames: attrName = "m" + attrName attrNames.append(attrName) (self.domain, self.metaIDs, dummy) = self.domainDepot.prepareDomain(attrNames) del dummy # for reasons unknown, the attributes get reordered. domainIndexes = [0] * len(desc) for i, name in enumerate(desc): # print name[0], '->', self.domain.index(name[0]) domainIndexes[self.domain.index(name[0])] = i self.exampleTable = orange.ExampleTable(self.domain) r = curs.fetchone() while r: # for reasons unknown, domain rearranges the properties example = orange.Example(self.domain, [str(r[domainIndexes[i]]) for i in xrange(len(r))]) self.exampleTable.append(example) r = curs.fetchone() self._dirty = False except Exception, e: raise e self.domain = None
914335463cf95b57b6ce129d8bf6106fa5882b1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/914335463cf95b57b6ce129d8bf6106fa5882b1d/orngSQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 309, 486, 365, 6315, 18013, 471, 3859, 12, 2890, 16, 2070, 4308, 11, 4672, 327, 365, 18, 8236, 1388, 365, 18, 8236, 1388, 273, 599, 775, 30, 25326, 273, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 309, 486, 365, 6315, 18013, 471, 3859, 12, 2890, 16, 2070, 4308, 11, 4672, 327, 365, 18, 8236, 1388, 365, 18, 8236, 1388, 273, 599, 775, 30, 25326, 273, 365, 18, ...
class StringItem:
class StringItem(object):
def __setattr__(self, name, value): #print "cpu.set(%s)"%name return idc.SetRegValue(value, name)
2edeeae88be12a9af5f5492091a214899ae83dd6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4773/2edeeae88be12a9af5f5492091a214899ae83dd6/idautils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 4672, 468, 1188, 315, 11447, 18, 542, 9275, 87, 2225, 9, 529, 327, 612, 71, 18, 694, 1617, 620, 12, 1132, 16, 508, 13, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 4672, 468, 1188, 315, 11447, 18, 542, 9275, 87, 2225, 9, 529, 327, 612, 71, 18, 694, 1617, 620, 12, 1132, 16, 508, 13, 2, -100, -1...
handle = ctypes.windll.kernel32.OpenProcess(1, False, self.s.pid) ctypes.windll.kernel32.TerminateProcess(handle, -1) ctypes.windll.kernel32.CloseHandle(handle)
subprocess.TerminateProcess(int(self.s._handle), -1)
def shutdown(self): self.keepServing = False if not self.s: return if sys.platform == "win32": handle = ctypes.windll.kernel32.OpenProcess(1, False, self.s.pid) ctypes.windll.kernel32.TerminateProcess(handle, -1) ctypes.windll.kernel32.CloseHandle(handle) else: os.kill(self.s.pid, 15)
06c6579036a193c84bdc1f8c7de92680f8c13e5d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/06c6579036a193c84bdc1f8c7de92680f8c13e5d/test_socket_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5731, 12, 2890, 4672, 365, 18, 10102, 25721, 273, 1083, 309, 486, 365, 18, 87, 30, 327, 309, 2589, 18, 9898, 422, 315, 8082, 1578, 6877, 6652, 18, 26106, 2227, 12, 474, 12, 2890, 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, 5731, 12, 2890, 4672, 365, 18, 10102, 25721, 273, 1083, 309, 486, 365, 18, 87, 30, 327, 309, 2589, 18, 9898, 422, 315, 8082, 1578, 6877, 6652, 18, 26106, 2227, 12, 474, 12, 2890, 18, ...
return S_ERROR('No such file or directory') res = self.__getPathStat(path)
return S_ERROR( 'No such file or directory' ) res = self.__getPathStat( path )
def __getDirectorySize(self,path): res = self.__executeOperation(path,'exists') if not res['OK']: return res if not res['Value']: return S_ERROR('No such file or directory')
6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 2853, 1225, 12, 2890, 16, 803, 4672, 400, 273, 365, 16186, 8837, 2988, 12, 803, 11189, 1808, 6134, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 309, 486, 400, 3292, 620, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 2853, 1225, 12, 2890, 16, 803, 4672, 400, 273, 365, 16186, 8837, 2988, 12, 803, 11189, 1808, 6134, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 309, 486, 400, 3292, 620, 3...
try: ob.reindexObject(idxs=['allowedRolesAndUsers']) except TypeError: pass
ob.reindexObject(idxs=['allowedRolesAndUsers'])
def _recursiveUpdateRoleMappings(self, ob, wfs):
11b1e7edaf17b81d45cfaf1d685b851192ed8811 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/11b1e7edaf17b81d45cfaf1d685b851192ed8811/WorkflowTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10543, 1891, 2996, 7742, 12, 2890, 16, 3768, 16, 341, 2556, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10543, 1891, 2996, 7742, 12, 2890, 16, 3768, 16, 341, 2556, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
help="Names of packages to scan for classes and generate " "output for (can specify as comma-separated list, or specify " "several times). Leaving this empty means that all packages "
help="Names of packages to scan for classes and generate " + \ "output for (can specify as comma-separated list, or specify " + \ "several times). Leaving this empty means that all packages " + \
def handle_option_from_file(self, option_in_file, value_in_file, settings):
cacab32c75a9d0e2e8a9dee563435a30963a6eb9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11941/cacab32c75a9d0e2e8a9dee563435a30963a6eb9/OptionParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 3482, 67, 2080, 67, 768, 12, 2890, 16, 1456, 67, 267, 67, 768, 16, 460, 67, 267, 67, 768, 16, 1947, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 3482, 67, 2080, 67, 768, 12, 2890, 16, 1456, 67, 267, 67, 768, 16, 460, 67, 267, 67, 768, 16, 1947, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
test_web_page_content("http://localhost/",
test_web_page_content(weburl,
def test_twpc_expected_link_arg(self): """testutils - test_web_page_content() and expected_link argument""" # should find link to ALEPH: self.assertEqual([], test_web_page_content(weburl, expected_link_target=weburl+"/collection/ALEPH")) # should find link entitled ISOLDE: self.assertEqual([], test_web_page_content(weburl, expected_link_label="ISOLDE")) # should find link to ISOLDE entitled ISOLDE: self.assertEqual([], test_web_page_content("http://localhost/", expected_link_target=weburl+"/collection/ISOLDE", expected_link_label="ISOLDE")) # should not find link to ALEPH entitled ISOLDE: errmsgs = test_web_page_content(weburl, expected_link_target=weburl+"/collection/ALEPH", expected_link_label="ISOLDE") if errmsgs[0].find(" does not contain link to ") > -1: pass else: self.fail("Should not find link to ALEPH entitled ISOLDE.") return
251468a2d58e2624a6faba03a7088347ee01dd2d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1780/251468a2d58e2624a6faba03a7088347ee01dd2d/testutils_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11246, 2436, 67, 3825, 67, 1232, 67, 3175, 12, 2890, 4672, 3536, 3813, 5471, 300, 1842, 67, 4875, 67, 2433, 67, 1745, 1435, 471, 2665, 67, 1232, 1237, 8395, 468, 1410, 1104, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11246, 2436, 67, 3825, 67, 1232, 67, 3175, 12, 2890, 4672, 3536, 3813, 5471, 300, 1842, 67, 4875, 67, 2433, 67, 1745, 1435, 471, 2665, 67, 1232, 1237, 8395, 468, 1410, 1104, ...
print "done"
def _createAllCs(q, cs, uJob, lock):
7029a2ca4e4f47b2cfa75a8e0400354396c3fa54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/7029a2ca4e4f47b2cfa75a8e0400354396c3fa54/conaryclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 1595, 14272, 12, 85, 16, 2873, 16, 582, 2278, 16, 2176, 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, 389, 2640, 1595, 14272, 12, 85, 16, 2873, 16, 582, 2278, 16, 2176, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
ydot = ida.NVector(N.append(model.dx.copy(),model.w.copy()))
ydot = ida.NVector(N.append(model.dx.copy(),[0]*len(model.w)))
def __init__(self): self.parameters = None self.model = None self.t_sim_start = None self.t_sim_end = None self.t_sim_duration = None
26b0aa38aeeb109238a70ccc5a2a24aa83f45669 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/26b0aa38aeeb109238a70ccc5a2a24aa83f45669/sundials.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 3977, 273, 599, 365, 18, 2284, 273, 599, 365, 18, 88, 67, 9812, 67, 1937, 273, 599, 365, 18, 88, 67, 9812, 67, 409, 273, 599, 365, 18, 88,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 3977, 273, 599, 365, 18, 2284, 273, 599, 365, 18, 88, 67, 9812, 67, 1937, 273, 599, 365, 18, 88, 67, 9812, 67, 409, 273, 599, 365, 18, 88,...
if not send_content: return if filesize <= self.blocksize: handler.wfile.write(f.read()) else:
if send_content:
def Reply(self, handler, send_content=True, post_data=None): """Return file contents to the client. Optionally display progress."""
d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16202, 12, 2890, 16, 1838, 16, 1366, 67, 1745, 33, 5510, 16, 1603, 67, 892, 33, 7036, 4672, 3536, 990, 585, 2939, 358, 326, 1004, 18, 225, 20720, 2562, 4007, 12123, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16202, 12, 2890, 16, 1838, 16, 1366, 67, 1745, 33, 5510, 16, 1603, 67, 892, 33, 7036, 4672, 3536, 990, 585, 2939, 358, 326, 1004, 18, 225, 20720, 2562, 4007, 12123, 2, -100, -100, -100...
aa_seq = re.sub('(.{50})','\\1\n',aa_seq.data)
aa_seq = re.sub('(.{50})','\\1\n',str(aa_seq))
def extract(self, frame = 1): seq = self.get_selection_or_sequence() if not seq: return aa_seq = self.translator.frame(seq, frame, self.current_codon_table_id) print '>%s<' % aa_seq aa_seq = re.sub('(.{50})','\\1\n',aa_seq.data) np = NotePad() tid = np.text_id() tid.insert(END,'>frame%d\n%s' % (frame,aa_seq))
8f7ec98fed848eab7f99d1256fc4b0bf3736f00a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/8f7ec98fed848eab7f99d1256fc4b0bf3736f00a/xbb_widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 12, 2890, 16, 2623, 273, 404, 4672, 3833, 273, 365, 18, 588, 67, 10705, 67, 280, 67, 6178, 1435, 309, 486, 3833, 30, 327, 12391, 67, 5436, 273, 365, 18, 17879, 18, 3789, 12, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 12, 2890, 16, 2623, 273, 404, 4672, 3833, 273, 365, 18, 588, 67, 10705, 67, 280, 67, 6178, 1435, 309, 486, 3833, 30, 327, 12391, 67, 5436, 273, 365, 18, 17879, 18, 3789, 12, 54...
edit_expr="g"))
edit_expr="g"), self)
def edit_graph_property(self, property, type="double", expr=None): """Edit the selected graph property""" self.__graph.EditGraphProperty(property, type, _eval_expr(expr, edit_expr="g"))
db440664dccaec43243687f2708ed653a82fa8b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3516/db440664dccaec43243687f2708ed653a82fa8b3/graph_tool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 4660, 67, 4468, 12, 2890, 16, 1272, 16, 618, 1546, 9056, 3113, 3065, 33, 7036, 4672, 3536, 4666, 326, 3170, 2667, 1272, 8395, 365, 16186, 4660, 18, 4666, 4137, 1396, 12, 4468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 4660, 67, 4468, 12, 2890, 16, 1272, 16, 618, 1546, 9056, 3113, 3065, 33, 7036, 4672, 3536, 4666, 326, 3170, 2667, 1272, 8395, 365, 16186, 4660, 18, 4666, 4137, 1396, 12, 4468, ...
if not hasattr(self, '_pipeline') or self._pipeline == None: self._pipeline = vtkPipelineBrowser(parent, renwin, objects) self._pipeline.show()
if not hasattr(self, '_vtk_pipeline_cfs'): self._vtk_pipeline_cfs = {} this_key = (renwin,) if objects: this_key = this_key + objects if not self._vtk_pipeline_cfs.has_key(this_key): self._vtk_pipeline_cfs[this_key] = vtkPipelineBrowser( parent, renwin, objects) self._vtk_pipeline_cfs[this_key].show()
def vtk_pipeline_configure(self, parent, renwin, objects=None): """This will instantiate and show only one pipeline config per module instance.
059d61b95cc4be743f567bfa798935dba2dedc0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/059d61b95cc4be743f567bfa798935dba2dedc0a/module_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13659, 67, 14511, 67, 14895, 12, 2890, 16, 982, 16, 1654, 8082, 16, 2184, 33, 7036, 4672, 3536, 2503, 903, 10275, 471, 2405, 1338, 1245, 5873, 642, 1534, 1605, 791, 18, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13659, 67, 14511, 67, 14895, 12, 2890, 16, 982, 16, 1654, 8082, 16, 2184, 33, 7036, 4672, 3536, 2503, 903, 10275, 471, 2405, 1338, 1245, 5873, 642, 1534, 1605, 791, 18, 2, -100, -100, ...
for pattern in ["%Y%m%d %H%M%S", "%Y%m%d"]:
for pattern in ["%Y%m%d%H%M%S", "%Y%m%d"]:
def __new__(cls, *args, **kwargs): if len(args) == 1: arg = args[0] if type(arg) in [int, long, float]: dt = datetime.datetime.utcfromtimestamp(arg) elif isinstance(arg, datetime.datetime): dt = arg elif isinstance(arg, basestring): arg = arg.replace('T', ' ') arg = arg.replace('-', '') arg = arg.replace(':', '') ms = 0 if '.' in arg: parts = arg.split('.') arg = parts[0].strip() try: ms = int(parts[1].strip()) except: pass for pattern in ["%Y%m%d %H%M%S", "%Y%m%d"]: try: dt = datetime.datetime.strptime(arg, pattern) except: continue else: break return datetime.datetime.__new__(cls, dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, ms) return datetime.datetime.__new__(cls, dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond) elif len(args) == 0: dt = datetime.datetime.utcnow() return datetime.datetime.__new__(cls, dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond) return datetime.datetime.__new__(cls, *args, **kwargs)
578bc2f09c20e4659da192683b47f16c44b7dc63 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/578bc2f09c20e4659da192683b47f16c44b7dc63/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 562, 12, 1968, 13, 422, 404, 30, 1501, 273, 833, 63, 20, 65, 309, 618, 12, 3175, 13, 316, 306, 474, 16, 1525, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2704, 972, 12, 6429, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 562, 12, 1968, 13, 422, 404, 30, 1501, 273, 833, 63, 20, 65, 309, 618, 12, 3175, 13, 316, 306, 474, 16, 1525, 1...
"""
r"""
def b_statistic(self): """ Returns the b-statistic for the Dyck word.
592f92010ec1fb3a6e0baa8f63e0dd9f380d60af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/592f92010ec1fb3a6e0baa8f63e0dd9f380d60af/dyck_word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 67, 5642, 5846, 12, 2890, 4672, 436, 8395, 2860, 326, 324, 17, 5642, 5846, 364, 326, 463, 93, 363, 2076, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 67, 5642, 5846, 12, 2890, 4672, 436, 8395, 2860, 326, 324, 17, 5642, 5846, 364, 326, 463, 93, 363, 2076, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
lastColumnWidth = lastColumnWidth - wx.SystemSettings_GetMetric(wx.SYS_VSCROLL_X)
if (self.GetSize() == self.GetVirtualSize()): lastColumnWidth = lastColumnWidth - 2 else: lastColumnWidth = lastColumnWidth - wx.SystemSettings_GetMetric(wx.SYS_VSCROLL_X)
def OnSize(self, event): if not wx.GetApp().ignoreSynchronizeWidget: size = event.GetSize() widthMinusLastColumn = 0
d26cfedd5c3227fdd33d13a2015f29c3aa497af4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d26cfedd5c3227fdd33d13a2015f29c3aa497af4/ControlBlocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1225, 12, 2890, 16, 871, 4672, 309, 486, 7075, 18, 967, 3371, 7675, 6185, 19298, 554, 4609, 30, 963, 273, 871, 18, 967, 1225, 1435, 1835, 18434, 3024, 1494, 273, 374, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1225, 12, 2890, 16, 871, 4672, 309, 486, 7075, 18, 967, 3371, 7675, 6185, 19298, 554, 4609, 30, 963, 273, 871, 18, 967, 1225, 1435, 1835, 18434, 3024, 1494, 273, 374, 2, -100, -1...
password: Password used to authenticate the account given by 'email'.
password: Password used to authenticate the account given by email.
def try_login(client, email=None, password=None): """Try to log into a service via the client. Keyword arguments: client: Client for the service. email: E-mail used to log in. If '@my-mail.com' is not included, the domain is inferred. (Default None - will first check for a file containing email/password, or prompt for one) password: Password used to authenticate the account given by 'email'. (Default None - will first check for a file containing email/password, or prompt for one) """ if not email: (email, password) = read_creds() if not email: email = raw_input('Enter your username: ') if not password: password = getpass.getpass('Enter your password: ') client.Login(email, password) cred_path = os.path.join(_google_cl_dir, _login_filename) if os.path.exists(cred_path) and not client.logged_in: os.remove(cred_path) elif not os.path.exists(cred_path) and client.logged_in: write_creds(email, password, cred_path)
dd21f5240f2a64dd1adfaca79c9129f277445fa0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/dd21f5240f2a64dd1adfaca79c9129f277445fa0/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 5819, 12, 2625, 16, 2699, 33, 7036, 16, 2201, 33, 7036, 4672, 3536, 7833, 358, 613, 1368, 279, 1156, 3970, 326, 1004, 18, 225, 18317, 1775, 30, 1004, 30, 2445, 364, 326, 1156,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 5819, 12, 2625, 16, 2699, 33, 7036, 16, 2201, 33, 7036, 4672, 3536, 7833, 358, 613, 1368, 279, 1156, 3970, 326, 1004, 18, 225, 18317, 1775, 30, 1004, 30, 2445, 364, 326, 1156,...
self('import "%s" %s'%(os.path.abspath(filename),options))
self('import %s "%s"'%(options, os.path.abspath(filename)))
def import_patch(self, filename, options=''): """ Import an ordered set of patches from patch file, i.e., a plain text file created using the export command.
9aedfb7c4571e74bf23bd0a573539917ff5f655f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/9aedfb7c4571e74bf23bd0a573539917ff5f655f/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 2272, 12, 2890, 16, 1544, 16, 702, 2218, 11, 4672, 3536, 6164, 392, 5901, 444, 434, 16482, 628, 4729, 585, 16, 277, 18, 73, 12990, 279, 7351, 977, 585, 2522, 1450, 326, 3359,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1930, 67, 2272, 12, 2890, 16, 1544, 16, 702, 2218, 11, 4672, 3536, 6164, 392, 5901, 444, 434, 16482, 628, 4729, 585, 16, 277, 18, 73, 12990, 279, 7351, 977, 585, 2522, 1450, 326, 3359,...
if self.CommitOnChange and self.dendrogram.cutOffLineDragged==False: self.commitData() def selectionChange(self):
if self.dendrogram.cutOffLineDragged==False: self.commitDataIf() def commitDataIf(self):
def updateSelection(self, selection): if self.matrixSource=="Attribute Distance": return self.selectionList=selection if self.CommitOnChange and self.dendrogram.cutOffLineDragged==False: self.commitData()
e75d3f4822d22f5bb58797e9030f0f6891a29f5c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/e75d3f4822d22f5bb58797e9030f0f6891a29f5c/OWHierarchicalClustering.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 6233, 12, 2890, 16, 4421, 4672, 309, 365, 18, 5667, 1830, 31713, 1499, 20335, 6877, 327, 365, 18, 10705, 682, 33, 10705, 309, 365, 18, 5580, 1398, 3043, 471, 365, 18, 72, 409, 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, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 6233, 12, 2890, 16, 4421, 4672, 309, 365, 18, 5667, 1830, 31713, 1499, 20335, 6877, 327, 365, 18, 10705, 682, 33, 10705, 309, 365, 18, 5580, 1398, 3043, 471, 365, 18, 72, 409, 21...
if self.ANONYMOUS_REGISTER == 'deny' and self.user is None: return self.login()
def main(self, dre=re.compile(r'([^\d]+)(\d+)'), nre=re.compile(r'new(\w+)')):
d8fdd05fd133bc265c9bbd84b89aed3fedf2c085 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8fdd05fd133bc265c9bbd84b89aed3fedf2c085/cgi_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 16, 302, 266, 33, 266, 18, 11100, 12, 86, 11, 19042, 72, 7941, 4713, 72, 29169, 3631, 290, 266, 33, 266, 18, 11100, 12, 86, 11, 2704, 4713, 91, 29169, 3719, 30, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 16, 302, 266, 33, 266, 18, 11100, 12, 86, 11, 19042, 72, 7941, 4713, 72, 29169, 3631, 290, 266, 33, 266, 18, 11100, 12, 86, 11, 2704, 4713, 91, 29169, 3719, 30, 2, ...
(self['id'], when, self['id'], when))
(self['id'], when, self['id'], when, self['id'], when))
def get_changelog(self, db, when=0): """ Returns the changelog as a list of tuples of the form (time, author, field, oldvalue, newvalue). """ cursor = db.cursor() if when: cursor.execute("SELECT time,author,field,oldvalue,newvalue " "FROM ticket_change " "WHERE ticket=%s AND time=%s " "UNION " "SELECT time, author, 'attachment', null, filename " "FROM attachment " "WHERE id=%s AND time=%s " "ORDER BY time", (self['id'], when, self['id'], when)) else: cursor.execute("SELECT time,author,field,oldvalue,newvalue " "FROM ticket_change WHERE ticket=%s " "UNION " "SELECT time, author, 'attachment', null,filename " "FROM attachment WHERE id = %s " "ORDER BY time", (self['id'], self['id'])) log = [] while 1: row = cursor.fetchone() if not row: break log.append((int(row[0]), row[1], row[2], row[3] or '', row[4] or '')) return log
f8a5132dbed742f2b79fc3631356a46a973d2ec8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f8a5132dbed742f2b79fc3631356a46a973d2ec8/Ticket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 24083, 12970, 12, 2890, 16, 1319, 16, 1347, 33, 20, 4672, 3536, 2860, 326, 21182, 487, 279, 666, 434, 10384, 434, 326, 646, 261, 957, 16, 2869, 16, 652, 16, 1592, 1132, 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, 336, 67, 24083, 12970, 12, 2890, 16, 1319, 16, 1347, 33, 20, 4672, 3536, 2860, 326, 21182, 487, 279, 666, 434, 10384, 434, 326, 646, 261, 957, 16, 2869, 16, 652, 16, 1592, 1132, 16, ...
"'ascii' codec can't encode character '\\uffff' in position 0: ouch"
"'ascii' codec can't encode character u'\\uffff' in position 0: ouch"
def test_unicodeencodeerror(self): self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", u"g\xfcrk", 1, 2, "ouch"], "'ascii' codec can't encode character '\\xfc' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", u"g\xfcrk", 1, 4, "ouch"], "'ascii' codec can't encode characters in position 1-3: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", u"\xfcx", 0, 1, "ouch"], "'ascii' codec can't encode character '\\xfc' in position 0: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", u"\u0100x", 0, 1, "ouch"], "'ascii' codec can't encode character '\\u0100' in position 0: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", u"\uffffx", 0, 1, "ouch"], "'ascii' codec can't encode character '\\uffff' in position 0: ouch" ) if sys.maxunicode > 0xffff: self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", u"\U00010000x", 0, 1, "ouch"], "'ascii' codec can't encode character '\\U00010000' in position 0: ouch" )
5b1315e0b5291104300eddeb6d475db15c7081b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5b1315e0b5291104300eddeb6d475db15c7081b7/test_codeccallbacks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9124, 3015, 1636, 12, 2890, 4672, 365, 18, 1893, 67, 4064, 1612, 1968, 12, 9633, 5509, 668, 16, 8247, 9184, 3113, 582, 6, 75, 64, 5841, 3353, 79, 3113, 404, 16, 576, 16, 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, 1842, 67, 9124, 3015, 1636, 12, 2890, 4672, 365, 18, 1893, 67, 4064, 1612, 1968, 12, 9633, 5509, 668, 16, 8247, 9184, 3113, 582, 6, 75, 64, 5841, 3353, 79, 3113, 404, 16, 576, 16, 31...
sage: print T1.filled_cells_map() {1: (0, 0), 2: (0, 2), 3: (0, 3), 4: (1, 1), 5: (1, 2), 6: (1, 3), 7: (2, 0), 8: (2, 1), 9: (2, 2), 10: (3, 0), 11: (3, 1), 12: (3, 3), (2, 1): 8, (1, 3): 6, (0, 3): 3, (1, 2): 5, (3, 3): 12, (3, 0): 10, (2, 2): 9, (1, 1): 4, (0, 0): 1, (3, 1): 11, (2, 0): 7, (0, 2): 2}
sage: T1.filled_cells_map() {1: (0, 0), 2: (0, 1), 3: (0, 3), 4: (1, 1), 5: (1, 2), 6: (1, 3), 7: (2, 0), 8: (2, 2), 9: (2, 3), 10: (3, 0), 11: (3, 1), 12: (3, 2), (1, 3): 6, (0, 3): 3, (1, 2): 5, (3, 0): 10, (2, 2): 8, (1, 1): 4, (3, 2): 12, (0, 0): 1, (2, 3): 9, (0, 1): 2, (3, 1): 11, (2, 0): 7}
def filled_cells_map(self): """ Number the filled cells of self with integers from {1, 2, 3, ...}.
79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6300, 67, 14741, 67, 1458, 12, 2890, 4672, 3536, 3588, 326, 6300, 5983, 434, 365, 598, 12321, 628, 288, 21, 16, 576, 16, 890, 16, 1372, 5496, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6300, 67, 14741, 67, 1458, 12, 2890, 4672, 3536, 3588, 326, 6300, 5983, 434, 365, 598, 12321, 628, 288, 21, 16, 576, 16, 890, 16, 1372, 5496, 2, -100, -100, -100, -100, -100, -100, -10...
print "Generating", mofile os.system("msgfmt %s -o %s" % (pofile, mofile))
if op == "install" or op == "build": print "Generating", mofile os.system("msgfmt %s -o %s" % (pofile, mofile))
def RemoveDir (d): for root, dirs, files in os.walk (d, topdown=False): for name in files: os.remove (os.path.join (root, name)) for name in dirs: os.rmdir (os.path.join (root, name)) os.rmdir (d)
5b64746c2f4b3644867f8beef9440c46e80c9c71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2524/5b64746c2f4b3644867f8beef9440c46e80c9c71/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3581, 1621, 261, 72, 4672, 364, 1365, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 261, 72, 16, 1760, 2378, 33, 8381, 4672, 364, 508, 316, 1390, 30, 1140, 18, 4479, 261, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3581, 1621, 261, 72, 4672, 364, 1365, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 261, 72, 16, 1760, 2378, 33, 8381, 4672, 364, 508, 316, 1390, 30, 1140, 18, 4479, 261, 538, 18, 803, 1...
"string", [sq3string, dq3string, sqstring, dqstring])
"string", [rope.base.codeanalyze.get_string_pattern()])
def _make_pattern(self): keyword_pattern = r"\b" + PythonHighlighting.any("keyword", keyword.kwlist) + r"\b" import __builtin__ builtinlist = [str(name) for name in dir(__builtin__) if not name.startswith('_')] builtin_pattern = r"([^.'\"\\]\b|^)" + \ PythonHighlighting.any("builtin", builtinlist) + r"\b" comment_pattern = PythonHighlighting.any("comment", [r"#[^\n]*"]) sqstring = r"(\b[rR])?'[^'\\\n]*(\\.[^'\\\n]*)*'?" dqstring = r'(\b[rR])?"[^"\\\n]*(\\.[^"\\\n]*)*"?' sq3string = r"(\b[rR])?'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?" dq3string = r'(\b[rR])?"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?' string_pattern = PythonHighlighting.any( "string", [sq3string, dq3string, sqstring, dqstring]) definition_pattern = r'^\s*(?P<defkeyword>def|class)\s+(?P<definition>\w+)' all_patterns = definition_pattern + '|' + keyword_pattern + '|' + \ builtin_pattern + '|' + comment_pattern + '|' + string_pattern return re.compile(all_patterns, re.S | re.M)
af5ba2713ea2bda1a116078d87b576411e830b95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8274/af5ba2713ea2bda1a116078d87b576411e830b95/highlighter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 4951, 12, 2890, 4672, 4932, 67, 4951, 273, 436, 12691, 70, 6, 397, 6600, 16205, 310, 18, 2273, 2932, 11041, 3113, 4932, 18, 9987, 1098, 13, 397, 436, 12691, 70, 6, 1930,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 4951, 12, 2890, 4672, 4932, 67, 4951, 273, 436, 12691, 70, 6, 397, 6600, 16205, 310, 18, 2273, 2932, 11041, 3113, 4932, 18, 9987, 1098, 13, 397, 436, 12691, 70, 6, 1930,...
pkg.append((name, contents))
pkg.append((name.lower(), contents))
def __iter__(self): line = self.file.readline() self.lineno += 1 pkg = [] while line: if line == '\n': if len(pkg) == 0: self.raiseSyntaxError('expected package record') yield pkg pkg = [] line = self.file.readline() self.lineno += 1 continue match = self.re_field.match(line) if not match: self.raiseSyntaxError("expected package field") (name, contents) = match.groups() contents = contents or ''
aecfde8399323dd0888e57a4b6b7c16401ee270a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12282/aecfde8399323dd0888e57a4b6b7c16401ee270a/debian_support.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 980, 273, 365, 18, 768, 18, 896, 1369, 1435, 365, 18, 17782, 1011, 404, 3475, 273, 5378, 1323, 980, 30, 309, 980, 422, 2337, 82, 4278, 309, 562, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 980, 273, 365, 18, 768, 18, 896, 1369, 1435, 365, 18, 17782, 1011, 404, 3475, 273, 5378, 1323, 980, 30, 309, 980, 422, 2337, 82, 4278, 309, 562, 12, ...
func(child, cur)
func(child, cur, size)
def _do(self, func): cur = [0, 0] max_len = 0 padding = self.padding if self.draw_rect else 0 cur[0] += padding cur[1] += padding for child in self.child_list: size = child.size() func(child, cur) max_len = max(max_len, size[self.direction.oaxis]) cur[self.direction.axis] += size[self.direction.axis] + padding total = [None, None] total[self.direction.axis] = cur[self.direction.axis] total[self.direction.oaxis] = max_len+padding*2 return tuple(total)
1519d15b2c4d33d337c85fb7237e78275b96f003 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5406/1519d15b2c4d33d337c85fb7237e78275b96f003/Box.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 12, 2890, 16, 1326, 4672, 662, 273, 306, 20, 16, 374, 65, 943, 67, 1897, 273, 374, 4992, 273, 365, 18, 9598, 309, 365, 18, 9446, 67, 2607, 469, 374, 662, 63, 20, 65, 101...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 12, 2890, 16, 1326, 4672, 662, 273, 306, 20, 16, 374, 65, 943, 67, 1897, 273, 374, 4992, 273, 365, 18, 9598, 309, 365, 18, 9446, 67, 2607, 469, 374, 662, 63, 20, 65, 101...
rml = report_xml.report_rml_content
def create_single(self, cr, uid, ids, data, report_xml, context={}): logo = None context = context.copy() pool = pooler.get_pool(cr.dbname) want_header = self.header title = report_xml.name attach = report_xml.attachment rml = report_xml.report_rml_content report_type = report_xml.report_type want_header = report_xml.header
b2152a9d3a969ea5711a27eb725f2119d3526bfe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/b2152a9d3a969ea5711a27eb725f2119d3526bfe/report_sxw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7526, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 501, 16, 2605, 67, 2902, 16, 819, 12938, 4672, 19128, 273, 599, 819, 273, 819, 18, 3530, 1435, 2845, 273, 2845, 264, 18, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7526, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 501, 16, 2605, 67, 2902, 16, 819, 12938, 4672, 19128, 273, 599, 819, 273, 819, 18, 3530, 1435, 2845, 273, 2845, 264, 18, 58...
elif operand.startswith('-'):
elif operands[0].startswith('-'):
def __init__(self, context, operands, addressExpr=False): self.complete = False # Expression complete, all references resolved. self.operands = operands # List of operand fields. self.value = None # If complete, calculated result of the expression. self.addressExpr = addressExpr # Indicates that the expression is an Address Expression.
3ac17fbfdda4050f99ff2560bf200e8022079a54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/3ac17fbfdda4050f99ff2560bf200e8022079a54/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 819, 16, 14883, 16, 1758, 4742, 33, 8381, 4672, 365, 18, 6226, 273, 1083, 9079, 468, 5371, 3912, 16, 777, 5351, 4640, 18, 365, 18, 4063, 5708, 273, 14883...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 819, 16, 14883, 16, 1758, 4742, 33, 8381, 4672, 365, 18, 6226, 273, 1083, 9079, 468, 5371, 3912, 16, 777, 5351, 4640, 18, 365, 18, 4063, 5708, 273, 14883...
definition(html_quote(getFieldValue(issue, 'description')))
definition(html_quote(getFieldValue(issue, 'description')), PreStyle)
def getFieldValue(issue, field): v = issue.Schema()[field].get(issue) if isinstance(v, StringType): return unicode(v, collector.getSiteEncoding()) return v
32bd94b7b560715fb17149623edd0c255ca7781e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/32bd94b7b560715fb17149623edd0c255ca7781e/pdfwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26126, 12, 13882, 16, 652, 4672, 331, 273, 5672, 18, 3078, 1435, 63, 1518, 8009, 588, 12, 13882, 13, 309, 1549, 12, 90, 16, 31570, 4672, 327, 5252, 12, 90, 16, 8543, 18, 588, 4956, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26126, 12, 13882, 16, 652, 4672, 331, 273, 5672, 18, 3078, 1435, 63, 1518, 8009, 588, 12, 13882, 13, 309, 1549, 12, 90, 16, 31570, 4672, 327, 5252, 12, 90, 16, 8543, 18, 588, 4956, 4...
newcell = np.dot(cell, np.array([a, b, c]))
newcell = np.dot(np.array([a, b, c]), cell)
def cut(atoms, a=(1,0,0), b=(0,1,0), c=(0,0,1), origo=(0,0,0), nlayers=None, extend=1.0, tolerance=0.001): """Cuts out a cell defined by *a*, *b*, *c* and *origo* from a sufficiently repeated copy of *atoms*. Typically, this function is used to create slabs of different sizes and orientations. The vectors *a*, *b* and *c* are in scaled coordinates and defines the returned cell and should normally be integer-valued in order to end up with a periodic structure. However, for systems with sub-translations, like fcc, integer multiples of 1/2 or 1/3 might also make sence for some directions (and will be treated correctly). Parameters: atoms: Atoms instance This should correspond to a repeatable unit cell. a: int | 3 floats The a-vector in scaled coordinates of the cell to cut out. If integer, the a-vector will be the scaled vector from *origo* to the atom with index *a*. b: int | 3 floats The b-vector in scaled coordinates of the cell to cut out. If integer, the b-vector will be the scaled vector from *origo* to the atom with index *b*. c: int | 3 floats The c-vector in scaled coordinates of the cell to cut out. If integer, the c-vector will be the scaled vector from *origo* to the atom with index *c*. Not used if *nlayers* is given. origo: int | 3 floats Position of origo of the new cell in scaled coordinates. If integer, the position of the atom with index *origo* is used. nlayers: int If *nlayers* is not *None*, the returned cell will have *nlayers* atomic layers in the c-direction. The direction of the c-vector will be along cross(a, b) converted to real space, i.e. normal to the plane spanned by a and b in orthorombic systems. extend: 1 or 3 floats The *extend* argument scales the effective cell in which atoms will be included. It must either be three floats or a single float scaling all 3 directions. By setting to a value just above one, e.g. 1.05, it is possible to all the corner and edge atoms in the returned cell. This will of cause make the returned cell non-repeatable, but is very usefull for visualisation. tolerance: float Determines what is defined as a plane. All atoms within *tolerance* Angstroms from a given plane will be considered to belong to that plane. Example: >>> import ase >>> from ase.lattice.spacegroup import crystal >>> # Create an aluminium (111) slab with three layers # # First an unit cell of Al >>> a = 4.05 >>> aluminium = crystal('Al', [(0,0,0)], spacegroup=225, ... cellpar=[a, a, a, 90, 90, 90]) >>> # Then cut out the slab >>> al111 = cut(aluminium, (1,-1,0), (0,1,-1), nlayers=3) >>> # Visualisation of the skutterudite unit cell # # Again, create a skutterudite unit cell >>> a = 9.04 >>> skutterudite = crystal( ... ('Co', 'Sb'), ... basis=[(0.25,0.25,0.25), (0.0, 0.335, 0.158)], ... spacegroup=204, ... cellpar=[a, a, a, 90, 90, 90]) >>> # Then use *origo* to put 'Co' at the corners and *extend* to # include all corner and edge atoms. >>> s = cut(skutterudite, origo=(0.25, 0.25, 0.25), extend=1.01) >>> ase.view(s) # doctest: +SKIP """ atoms = atoms.copy() cell = atoms.cell if isinstance(origo, int): origo = atoms.get_scaled_positions()[origo] scaled = (atoms.get_scaled_positions() - origo)%1.0 scaled %= 1.0 # needed to ensure that all numbers are *less* than one atoms.set_scaled_positions(scaled) if isinstance(a, int): a = scaled[a] - origo if isinstance(b, int): b = scaled[b] - origo if isinstance(c, int): c = scaled[c] - origo a = np.array(a, dtype=float) b = np.array(b, dtype=float) origo = np.array(origo, dtype=float) if nlayers: miller = np.cross(a, b) # surface normal # The factor 36 = 2*2*3*3 is because the elements of a and b # might be multiples of 1/2 or 1/3 because of lattice # subtranslations if np.all(36*miller - np.rint(36*miller)) < 1e-5: miller = np.rint(36*miller) miller /= gcd(miller) tags, layers = get_layers(atoms, miller, tolerance) while tags.max() < nlayers: atoms = atoms.repeat(2) tags, layers = get_layers(atoms, miller, tolerance) # Convert surface normal in reciprocal space to direction in # real space metric = np.dot(cell, cell.T) c = np.linalg.solve(metric.T, miller.T).T c *= layers[nlayers]/np.sqrt(np.dot(c, miller)) newcell = np.dot(cell, np.array([a, b, c])) # Create a new atoms object, repeated and translated such that # it completely covers the new cell scorners_newcell = np.array([[0., 0., 0.], [0., 0., 1.], [0., 1., 0.], [0., 1., 1.], [1., 0., 0.], [1., 0., 1.], [1., 1., 0.], [1., 1., 1.]]) corners = np.dot(scorners_newcell, newcell*extend) scorners = np.linalg.solve(cell.T, corners.T).T rep = np.ceil(scorners.ptp(axis=0)).astype('int') + 1 trans = np.dot(np.floor(scorners.min(axis=0)), cell) atoms = atoms.repeat(rep) atoms.translate(trans) atoms.set_cell(newcell) # Mask out atoms outside new cell stol = tolerance # scaled tolerance, XXX maskcell = atoms.cell*extend sp = np.linalg.solve(maskcell.T, (atoms.positions).T).T mask = np.all(np.logical_and(-stol <= sp, sp < 1-stol), axis=1) atoms = atoms[mask] return atoms
8332e0f37617b8f5273551408a17a3f144776258 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/8332e0f37617b8f5273551408a17a3f144776258/geometry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6391, 12, 14937, 16, 279, 28657, 21, 16, 20, 16, 20, 3631, 324, 28657, 20, 16, 21, 16, 20, 3631, 276, 28657, 20, 16, 20, 16, 21, 3631, 1647, 83, 28657, 20, 16, 20, 16, 20, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6391, 12, 14937, 16, 279, 28657, 21, 16, 20, 16, 20, 3631, 324, 28657, 20, 16, 21, 16, 20, 3631, 276, 28657, 20, 16, 20, 16, 21, 3631, 1647, 83, 28657, 20, 16, 20, 16, 20, 3631, ...
'Xi'
'Xi',
def _sys_init_(self, system): return self._name
631b754625caff2d26d2c6f0c51c000b669102c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/631b754625caff2d26d2c6f0c51c000b669102c3/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 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, 389, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self._playDelay = self._configParser.get("GUI", "playDelay")
self._playDelay = self._configParser.getint("GUI", "playDelay")
def loadSettings(self): try: self._configParser.add_section("GUI") except ConfigParser.DuplicateSectionError: pass try: self._playDelay = self._configParser.get("GUI", "playDelay") except ConfigParser.NoOptionError: self._playDelay = self._defaultPlayDelay try: self._inactivityTime = self._configParser.get("GUI", "inactivityTime") except ConfigParser.NoOptionError: self._inactivityTime = self._defaultInactivityTime
cd8bacc0e853b1f218d9531736cb92241623b207 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8545/cd8bacc0e853b1f218d9531736cb92241623b207/GUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 2628, 12, 2890, 4672, 775, 30, 365, 6315, 1425, 2678, 18, 1289, 67, 3464, 2932, 43, 5370, 7923, 1335, 25076, 18, 11826, 5285, 668, 30, 1342, 775, 30, 365, 6315, 1601, 6763, 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, 1262, 2628, 12, 2890, 4672, 775, 30, 365, 6315, 1425, 2678, 18, 1289, 67, 3464, 2932, 43, 5370, 7923, 1335, 25076, 18, 11826, 5285, 668, 30, 1342, 775, 30, 365, 6315, 1601, 6763, 273, ...
if status_lib.is_worse_than_or_equal_to(stack.current_status(),
if status_lib.is_worse_than_or_equal_to(line.status,
def state_iterator(self, buffer): line = None new_tests = [] job_count, boot_count = 0, 0 min_stack_size = 0 stack = status_lib.status_stack() current_kernel = kernel("", []) # UNKNOWN current_status = status_lib.statuses[-1] current_reason = None started_time_stack = [None] subdir_stack = [None] running_test = None running_reasons = [] yield [] # we're ready to start running
56d1791fb99261b67e48905109fd7aac79bd547b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/56d1791fb99261b67e48905109fd7aac79bd547b/version_1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 919, 67, 9838, 12, 2890, 16, 1613, 4672, 980, 273, 599, 394, 67, 16341, 273, 5378, 1719, 67, 1883, 16, 4835, 67, 1883, 273, 374, 16, 374, 1131, 67, 3772, 67, 1467, 273, 374, 2110, 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, 919, 67, 9838, 12, 2890, 16, 1613, 4672, 980, 273, 599, 394, 67, 16341, 273, 5378, 1719, 67, 1883, 16, 4835, 67, 1883, 273, 374, 16, 374, 1131, 67, 3772, 67, 1467, 273, 374, 2110, 27...
res[line.id]['price_subtotal']= round(res[line.id]['price_subtotal'], int(config['price_accuracy'])) res[line.id]['price_subtotal_incl']= round(res[line.id]['price_subtotal_incl'], int(config['price_accuracy']))
res[line.id]['price_subtotal']= round(res[line.id]['price_subtotal'], int(config['price_accuracy'])) res[line.id]['price_subtotal_incl']= round(res[line.id]['price_subtotal_incl'], int(config['price_accuracy']))
def _amount_line2(self, cr, uid, ids, name, args, context=None): """ Return the subtotal excluding taxes with respect to price_type. """ res = {} tax_obj = self.pool.get('account.tax') cur_obj = self.pool.get('res.currency') for line in self.browse(cr, uid, ids): cur = line.invoice_id and line.invoice_id.currency_id or False res_init = super(account_invoice_line, self)._amount_line(cr, uid, [line.id], name, args, context) res[line.id] = { 'price_subtotal': 0.0, 'price_subtotal_incl': 0.0, 'data': [] } if not line.quantity: continue if line.invoice_id: product_taxes = [] if line.product_id: if line.invoice_id.type in ('out_invoice', 'out_refund'): product_taxes = filter(lambda x: x.price_include, line.product_id.taxes_id) else: product_taxes = filter(lambda x: x.price_include, line.product_id.supplier_taxes_id)
00064d587f4deedf05f2d56e698b374d48290692 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/00064d587f4deedf05f2d56e698b374d48290692/invoice_tax_incl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8949, 67, 1369, 22, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 3536, 2000, 326, 720, 4963, 19560, 5320, 281, 598, 8762, 358, 6205, 67, 72...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8949, 67, 1369, 22, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 3536, 2000, 326, 720, 4963, 19560, 5320, 281, 598, 8762, 358, 6205, 67, 72...
return d
def _cb(r): self.factory.contacts.version = r[0] self.factory.contacts.setGroup(r[1], r[2]) return r return d.addCallback(_cb)
def addListGroup(self, name): """ used to create a new list group.
9b2b7163e441396d9e5e7f46775cd7809b4655be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b2b7163e441396d9e5e7f46775cd7809b4655be/msn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 682, 1114, 12, 2890, 16, 508, 4672, 3536, 1399, 358, 752, 279, 394, 666, 1041, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 682, 1114, 12, 2890, 16, 508, 4672, 3536, 1399, 358, 752, 279, 394, 666, 1041, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
_GLOBAL_DEFAULT_TIMEOUT = object()
def _ssl_wrap_socket(sock, key_file, cert_file, cert_reqs=CERT_REQUIRED, ca_certs=None): if ca_certs: raise util.Abort(_( 'certificate checking requires Python 2.6'))
10df8532431af5e71117f2779bfbcc802a0faab5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/10df8532431af5e71117f2779bfbcc802a0faab5/url.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8157, 67, 4113, 67, 7814, 12, 15031, 16, 498, 67, 768, 16, 3320, 67, 768, 16, 3320, 67, 25782, 33, 22367, 67, 14977, 16, 3474, 67, 24596, 33, 7036, 4672, 309, 3474, 67, 24596, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8157, 67, 4113, 67, 7814, 12, 15031, 16, 498, 67, 768, 16, 3320, 67, 768, 16, 3320, 67, 25782, 33, 22367, 67, 14977, 16, 3474, 67, 24596, 33, 7036, 4672, 309, 3474, 67, 24596, 3...
count = 1
def sqrt(self, context=None): """Return the square root of self.
1ed35120311fad235121c44f5d777a7f152b6bc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1ed35120311fad235121c44f5d777a7f152b6bc9/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5700, 12, 2890, 16, 819, 33, 7036, 4672, 3536, 990, 326, 8576, 1365, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5700, 12, 2890, 16, 819, 33, 7036, 4672, 3536, 990, 326, 8576, 1365, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return {field_name: value}, errors
return {context.name: value}, errors
def accept(self, context, form): if not context.value.has_key(context.name): new_context = context.branch(self.schema) context.value.update(self.getDefault(new_context)) new_context = context.branch(self.schema, context.scalar) if not new_context.acFilter.accept: return {}, {} value, errors = self.schema.accept(new_context, form) return {field_name: value}, errors
e930a2c066401b60fac31b9f62f39a982dd65d02 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1872/e930a2c066401b60fac31b9f62f39a982dd65d02/Fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2791, 12, 2890, 16, 819, 16, 646, 4672, 309, 486, 819, 18, 1132, 18, 5332, 67, 856, 12, 2472, 18, 529, 4672, 394, 67, 2472, 273, 819, 18, 7500, 12, 2890, 18, 4821, 13, 819, 18, 113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2791, 12, 2890, 16, 819, 16, 646, 4672, 309, 486, 819, 18, 1132, 18, 5332, 67, 856, 12, 2472, 18, 529, 4672, 394, 67, 2472, 273, 819, 18, 7500, 12, 2890, 18, 4821, 13, 819, 18, 113...
if config.DEBUG: print 'addFavorites: actually adding "%s"' % fav.name
if config.DEBUG: print 'addFavorites: actually adding "%s"' % String(fav.name)
def addFavorite(self, fav): if not self.favorites.has_key(fav.name): if config.DEBUG: print 'addFavorites: actually adding "%s"' % fav.name self.favorites[fav.name] = fav else: if config.DEBUG: print 'We already have a favorite called "%s".' % fav.name
9448b3e738d7f2ffb365b419d50ae9aa9c535463 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/9448b3e738d7f2ffb365b419d50ae9aa9c535463/record_types.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 31745, 1137, 12, 2890, 16, 18180, 4672, 309, 486, 365, 18, 19731, 280, 2997, 18, 5332, 67, 856, 12, 19731, 18, 529, 4672, 309, 642, 18, 9394, 30, 1172, 296, 1289, 31745, 2997, 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, 527, 31745, 1137, 12, 2890, 16, 18180, 4672, 309, 486, 365, 18, 19731, 280, 2997, 18, 5332, 67, 856, 12, 19731, 18, 529, 4672, 309, 642, 18, 9394, 30, 1172, 296, 1289, 31745, 2997, 30,...
def fl_create_dial(type, x, y, w, h, label): """ fl_create_dial(type, x, y, w, h, label) -> object """ retval = _fl_create_dial(type, x, y, w, h, label)
def fl_create_dial(dial_type, x, y, w, h, label): """ fl_create_dial(dial_type, x, y, w, h, label) -> pObject """ retval = _fl_create_dial(dial_type, x, y, w, h, label)
def fl_create_dial(type, x, y, w, h, label): """ fl_create_dial(type, x, y, w, h, label) -> object """ retval = _fl_create_dial(type, x, y, w, h, label) 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, 2640, 67, 25909, 12, 25909, 67, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 25909, 12, 25909, 67, 723, 16, 619, 16, 677, 16, 341, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2640, 67, 25909, 12, 25909, 67, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 25909, 12, 25909, 67, 723, 16, 619, 16, 677, 16, 341, 1...
cert = self.build_cert(entry, metadata)
cert = self.build_cert(key_filename, entry, metadata)
def get_cert(self, entry, metadata): """ either grabs a prexisting cert hostfile, or triggers the generation of a new cert if one doesn't exist. """ # set path type and permissions, otherwise bcfg2 won't bind the file permdata = {'owner':'root', 'group':'root', 'type':'file', 'perms':'644'} [entry.attrib.__setitem__(key, permdata[key]) for key in permdata]
3d10ec2113ab4df5e93419a83129f5820cfa2644 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/3d10ec2113ab4df5e93419a83129f5820cfa2644/SSLCA.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7593, 12, 2890, 16, 1241, 16, 1982, 4672, 3536, 3344, 3087, 2038, 279, 675, 92, 376, 310, 3320, 1479, 768, 16, 578, 11752, 326, 9377, 434, 279, 394, 3320, 309, 1245, 3302, 140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7593, 12, 2890, 16, 1241, 16, 1982, 4672, 3536, 3344, 3087, 2038, 279, 675, 92, 376, 310, 3320, 1479, 768, 16, 578, 11752, 326, 9377, 434, 279, 394, 3320, 309, 1245, 3302, 140...
sage: len(g.dominating_set())
sage: len(g.dominating_set())
def dominating_set(self, independent=False, value_only=False, solver=None, verbose=0): r""" Returns a minimum dominating set of the graph represented by the list of its vertices. For more information, see the `Wikipedia article on dominating sets <http://en.wikipedia.org/wiki/Dominating_set>`_.
5e5675fbbda4b56d6c68a34b01203655c16cdb9e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5e5675fbbda4b56d6c68a34b01203655c16cdb9e/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4092, 267, 1776, 67, 542, 12, 2890, 16, 14807, 33, 8381, 16, 460, 67, 3700, 33, 8381, 16, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 279, 5224, 4092, 267, 1776, 444, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4092, 267, 1776, 67, 542, 12, 2890, 16, 14807, 33, 8381, 16, 460, 67, 3700, 33, 8381, 16, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 279, 5224, 4092, 267, 1776, 444, 4...
'set pm3d',
'set pm3d corners2color c1',
def _get_temp_file(self): return '/tmp/qtgnuplot.tmp.%d' % random.random()
5c6ae24863fd74b13079b939ab15616079c33531 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6471/5c6ae24863fd74b13079b939ab15616079c33531/qtgnuplot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5814, 67, 768, 12, 2890, 4672, 327, 1173, 5645, 19, 23311, 1600, 89, 4032, 18, 5645, 7866, 72, 11, 738, 2744, 18, 9188, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5814, 67, 768, 12, 2890, 4672, 327, 1173, 5645, 19, 23311, 1600, 89, 4032, 18, 5645, 7866, 72, 11, 738, 2744, 18, 9188, 1435, 2, -100, -100, -100, -100, -100, -100, -100,...
self.allowTypes("instance", "class", "module")
self.allowTypes("instance", "class", "classobj", "module")
def allowInstancesOf(self, *classes): """SecurityOptions.allowInstances(klass, klass, ...): allow instances of the specified classes This will also allow the 'instance', 'class', and 'module' types, as well as basic types. """ self.allowBasicTypes() self.allowTypes("instance", "class", "module") for klass in classes: self.allowTypes(qual(klass)) self.allowModules(klass.__module__) self.allowedClasses[klass] = 1
aee4c355fff6a99f4d555845274bb87564808f86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/aee4c355fff6a99f4d555845274bb87564808f86/jelly.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1699, 5361, 951, 12, 2890, 16, 380, 4701, 4672, 3536, 4368, 1320, 18, 5965, 5361, 12, 22626, 16, 7352, 16, 1372, 4672, 1699, 3884, 434, 326, 1269, 3318, 1220, 903, 2546, 1699, 326, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1699, 5361, 951, 12, 2890, 16, 380, 4701, 4672, 3536, 4368, 1320, 18, 5965, 5361, 12, 22626, 16, 7352, 16, 1372, 4672, 1699, 3884, 434, 326, 1269, 3318, 1220, 903, 2546, 1699, 326, 296, ...
Cuspidal subgroup with invariants [2, 2] over QQ of Abelian variety factor of dimension 1 of J0(33)
Finite subgroup with invariants [5] over QQbar of Abelian variety J0(33) of dimension 3
def lattice(self): """ Return the lattice in the homology the modular Jacobian product corresponding to this subgroup. The elements of the subgroup are represented by vecotrs in the ambient vector space (the rational homology), and this returns the lattice they span.
d54847b81567aa533334316a466ed6bddbc8638c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d54847b81567aa533334316a466ed6bddbc8638c/finite_subgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16690, 12, 2890, 4672, 3536, 2000, 326, 16690, 316, 326, 13995, 4676, 326, 681, 2490, 804, 1077, 26968, 3017, 4656, 358, 333, 720, 1655, 18, 225, 1021, 2186, 434, 326, 720, 1655, 854, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16690, 12, 2890, 4672, 3536, 2000, 326, 16690, 316, 326, 13995, 4676, 326, 681, 2490, 804, 1077, 26968, 3017, 4656, 358, 333, 720, 1655, 18, 225, 1021, 2186, 434, 326, 720, 1655, 854, 10...
logging.error("Possible indentation and spacing issues on " "file %s" % self.path)
def _check_indent(self): """ Verifies the file with reindent.py. This tool performs the following checks on python files:
1e6d79b59c5d2f2d575968a6350c0b4097c6d380 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/1e6d79b59c5d2f2d575968a6350c0b4097c6d380/check_patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 9355, 12, 2890, 4672, 3536, 6160, 5032, 326, 585, 598, 283, 9355, 18, 2074, 18, 1220, 5226, 11199, 326, 3751, 4271, 603, 5790, 1390, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 9355, 12, 2890, 4672, 3536, 6160, 5032, 326, 585, 598, 283, 9355, 18, 2074, 18, 1220, 5226, 11199, 326, 3751, 4271, 603, 5790, 1390, 30, 2, -100, -100, -100, -100, -100, ...
seen = {}
bonusvalue = {} bonusdeps = {}
def runStarting(self): Policy.runStarting(self) self._upgrading = upgrading = {} self._upgraded = upgraded = {} self._sortbonus = sortbonus = {} self._stablebonus = stablebonus = {} queue = self._trans.getQueue() for pkg in self._trans.getCache().getPackages(): # Precompute upgrade relations. for upg in pkg.upgrades: for prv in upg.providedby: for prvpkg in prv.packages: if (prvpkg.installed and self.getPriority(pkg) >= self.getPriority(prvpkg)): dct = upgrading.get(pkg) if dct: dct[prvpkg] = True else: upgrading[pkg] = {prvpkg: True} lst = upgraded.get(prvpkg) if lst: lst.append(pkg) else: upgraded[prvpkg] = [pkg] # Downgrades are upgrades if they have a higher priority. for prv in pkg.provides: for upg in prv.upgradedby: for upgpkg in upg.packages: if (upgpkg.installed and self.getPriority(pkg) > self.getPriority(upgpkg)): dct = upgrading.get(pkg) if dct: dct[upgpkg] = True else: upgrading[pkg] = {upgpkg: True} lst = upgraded.get(upgpkg) if lst: lst.append(pkg) else: upgraded[upgpkg] = [pkg]
175e46e5ec75d1c6145e1b9c41650cbed6959bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/175e46e5ec75d1c6145e1b9c41650cbed6959bf0/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 11715, 12, 2890, 4672, 7436, 18, 2681, 11715, 12, 2890, 13, 365, 6315, 416, 15210, 273, 731, 15210, 273, 2618, 365, 6315, 416, 19305, 273, 31049, 273, 2618, 365, 6315, 3804, 18688, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11715, 12, 2890, 4672, 7436, 18, 2681, 11715, 12, 2890, 13, 365, 6315, 416, 15210, 273, 731, 15210, 273, 2618, 365, 6315, 416, 19305, 273, 31049, 273, 2618, 365, 6315, 3804, 18688, ...
def __button(self, parent, default, evt_handler, id, container): """Convenience method for creating a control"""
def __button(self, parent, evt_handler, id, container): """Convenience method for creating a button control"""
def __button(self, parent, default, evt_handler, id, container): """Convenience method for creating a control""" btn = wx.Button(self, id) wx.EVT_BUTTON(parent, btn.GetId(), evt_handler) if default: self.SetDefaultItem(btn) container.Add(btn, 0)
01f62a12ca8547e7a54951a0e67c95aa57328a81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/01f62a12ca8547e7a54951a0e67c95aa57328a81/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5391, 12, 2890, 16, 982, 16, 6324, 67, 4176, 16, 612, 16, 1478, 4672, 3536, 14700, 707, 364, 4979, 279, 3568, 3325, 8395, 10638, 273, 7075, 18, 3616, 12, 2890, 16, 612, 13, 7075,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5391, 12, 2890, 16, 982, 16, 6324, 67, 4176, 16, 612, 16, 1478, 4672, 3536, 14700, 707, 364, 4979, 279, 3568, 3325, 8395, 10638, 273, 7075, 18, 3616, 12, 2890, 16, 612, 13, 7075,...
this = apply(_quickfix.new_LegIndividualAllocID, args)
this = _quickfix.new_LegIndividualAllocID(*args)
def __init__(self, *args): this = apply(_quickfix.new_LegIndividualAllocID, 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, 8329, 29834, 8763, 734, 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, 8329, 29834, 8763, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
capisuite.audio_receive(call,filename,int(length), int(silence_timeout),1)
msg_length=capisuite.audio_receive(call,filename,int(length), int(silence_timeout),1)
def voiceIncoming(call,call_from,call_to,curr_user,config): try: udir=cs_helpers.getOption(config,"","voice_user_dir") if (udir==None): capisuite.error("global option voice_user_dir not found! -> rejecting call") capisuite.reject(call,0x34A9) return udir=os.path.join(udir,curr_user)+"/" if (not os.access(udir,os.F_OK)): userdata=pwd.getpwnam(curr_user) os.mkdir(udir,0700) os.chown(udir,userdata[2],userdata[3]) if (not os.access(udir+"received/",os.F_OK)): userdata=pwd.getpwnam(curr_user) os.mkdir(udir+"received/",0700) os.chown(udir+"received/",userdata[2],userdata[3]) except KeyError: capisuite.error("user "+curr_user+" is not a valid system user. Disconnecting",call) capisuite.reject(call,0x34A9) return filename=cs_helpers.uniqueName(udir+"received/","voice","la") action=cs_helpers.getOption(config,curr_user,"voice_action","").lower() if (action not in ("mailandsave","saveonly","none")): capisuite.error("Warning: No valid voice_action definition found for user "+curr_user+" -> assuming SaveOnly") action="saveonly" try: capisuite.enable_DTMF(call) userannouncement=udir+cs_helpers.getOption(config,curr_user,"announcement","announcement.la") pin=cs_helpers.getOption(config,curr_user,"pin","") if (os.access(userannouncement,os.R_OK)): capisuite.audio_send(call,userannouncement,1) else: if (call_to!="-"): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"anrufbeantworter-von.la"),1) cs_helpers.sayNumber(call,call_to,curr_user,config) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"bitte-nachricht.la"),1) if (action!="none"): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"beep.la"),1) length=cs_helpers.getOption(config,curr_user,"record_length","60") silence_timeout=cs_helpers.getOption(config,curr_user,"record_silence_timeout","5") capisuite.audio_receive(call,filename,int(length), int(silence_timeout),1) dtmf_list=capisuite.read_DTMF(call,0) if (dtmf_list=="X"): if (os.access(filename,os.R_OK)): os.unlink(filename) faxIncoming(call,call_from,call_to,curr_user,config,1) elif (dtmf_list!="" and pin!=""): dtmf_list+=capisuite.read_DTMF(call,3) # wait 5 seconds for input count=1 while (count<3 and pin!=dtmf_list): # try again if input was wrong capisuite.log("wrong PIN entered...",1,call) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"beep.la")) dtmf_list=capisuite.read_DTMF(call,3) count+=1 if (pin==dtmf_list): if (os.access(filename,os.R_OK)): os.unlink(filename) capisuite.log("Starting remote inquiry...",1,call) remoteInquiry(call,udir,curr_user,config) (cause,causeB3)=capisuite.disconnect(call) capisuite.log("connection finished with cause 0x%x,0x%x" % (cause,causeB3),1,call) except capisuite.CallGoneError: # catch this here to get the cause info in the mail (cause,causeB3)=capisuite.disconnect(call) capisuite.log("connection lost with cause 0x%x,0x%x" % (cause,causeB3),1,call) if (os.access(filename,os.R_OK)): cs_helpers.writeDescription(filename, "call_from=\""+call_from+"\"\ncall_to=\""+call_to+"\"\ntime=\"" +time.ctime()+"\"\ncause=\"0x%x/0x%x\"\n" % (cause,causeB3)) userdata=pwd.getpwnam(curr_user) os.chmod(filename,0600) os.chown(filename,userdata[2],userdata[3]) os.chmod(filename[:-2]+"txt",0600) os.chown(filename[:-2]+"txt",userdata[2],userdata[3]) fromaddress=cs_helpers.getOption(config,curr_user,"voice_email_from","") if (fromaddress==""): fromaddress=curr_user mailaddress=cs_helpers.getOption(config,curr_user,"voice_email","") if (mailaddress==""): mailaddress=curr_user if (action=="mailandsave"): cs_helpers.sendMIMEMail(fromaddress, mailaddress, "Voice call received from "+call_from+" to "+call_to, "la", "You got a voice call from "+call_from+" to "+call_to+"\nDate: "+time.ctime()+"\n\n" +"See attached file.\nThe original file was saved to file://"+filename+"\n\n", filename)
5114194087643106afaf38f35e9201e46a1c58ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3251/5114194087643106afaf38f35e9201e46a1c58ce/incoming.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15063, 20370, 12, 1991, 16, 1991, 67, 2080, 16, 1991, 67, 869, 16, 17016, 67, 1355, 16, 1425, 4672, 775, 30, 582, 1214, 33, 2143, 67, 11397, 18, 588, 1895, 12, 1425, 10837, 15937, 2599...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15063, 20370, 12, 1991, 16, 1991, 67, 2080, 16, 1991, 67, 869, 16, 17016, 67, 1355, 16, 1425, 4672, 775, 30, 582, 1214, 33, 2143, 67, 11397, 18, 588, 1895, 12, 1425, 10837, 15937, 2599...
PangoLayout = struct__PangoLayout
PangoLayout = struct__PangoLayout
def load_lib(name): libname = ctypes.util.find_library(name) if not libname: raise OSError("Could not find library '%s'" % name) else: return CDLL(libname)
92bb4862df49194567fad21ea00d921ffc62dd6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10761/92bb4862df49194567fad21ea00d921ffc62dd6a/pango.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2941, 12, 529, 4672, 2561, 529, 273, 6983, 18, 1367, 18, 4720, 67, 12083, 12, 529, 13, 309, 486, 2561, 529, 30, 1002, 10002, 2932, 4445, 486, 1104, 5313, 1995, 87, 4970, 738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1262, 67, 2941, 12, 529, 4672, 2561, 529, 273, 6983, 18, 1367, 18, 4720, 67, 12083, 12, 529, 13, 309, 486, 2561, 529, 30, 1002, 10002, 2932, 4445, 486, 1104, 5313, 1995, 87, 4970, 738,...
pattern = pattern.replace("{Total}", "%(track-total)02d")
pattern = pattern.replace("{Total}", "%(track-count)02d")
def process_custom_pattern(self, pattern): pattern = pattern.replace("{Artist}", "%(artist)s") pattern = pattern.replace("{Album}", "%(album)s") pattern = pattern.replace("{Title}", "%(title)s") pattern = pattern.replace("{Track}", "%(track-number)02d") pattern = pattern.replace("{Total}", "%(track-total)02d") return pattern
e0946cac71dc0cf0c55dadf72cef603da7d7360a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2369/e0946cac71dc0cf0c55dadf72cef603da7d7360a/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 3662, 67, 4951, 12, 2890, 16, 1936, 4672, 1936, 273, 1936, 18, 2079, 2932, 95, 4411, 376, 1532, 16, 22061, 25737, 13, 87, 7923, 1936, 273, 1936, 18, 2079, 2932, 95, 30330, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 3662, 67, 4951, 12, 2890, 16, 1936, 4672, 1936, 273, 1936, 18, 2079, 2932, 95, 4411, 376, 1532, 16, 22061, 25737, 13, 87, 7923, 1936, 273, 1936, 18, 2079, 2932, 95, 30330, 15...
file.Write(" FreeIds(&%s_id_allocator_, %s);\n" %
file.Write(" %s_id_handler_->FreeIds(%s);\n" %
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(&%s_id_allocator_, %s);\n" % (func.name[6:-1].lower(), func.MakeOriginalArgString(""))) file.Write(" helper_->%sImmediate(%s);\n" % (func.name, func.MakeOriginalArgString(""))) file.Write("}\n") file.Write("\n")
066849e369dae48bf61ae0cf70c9e9acaf9f1045 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/066849e369dae48bf61ae0cf70c9e9acaf9f1045/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 9380, 67, 8840, 273, 1326, 18, 967, 966, 2668, 11299, 67, 8840, 6134,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 9380, 67, 8840, 273, 1326, 18, 967, 966, 2668, 11299, 67, 8840, 6134,...
self.request.log("Can't acquire write lock in %s", self.lock_dir)
self.request.log("Can't acquire write lock in %s" % self.lock_dir)
def copyto(self, filename): import shutil if not locking or locking and self.wlock.acquire(1.0): try: shutil.copyfile(filename, self._filename()) try: os.chmod(self._filename(), 0666 & config.umask) except OSError: pass finally: if locking: self.wlock.release() else: self.request.log("Can't acquire write lock in %s", self.lock_dir)
bd19f5fd9260a5523a37d7d11adffa6c667b2e83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/bd19f5fd9260a5523a37d7d11adffa6c667b2e83/caching.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 869, 12, 2890, 16, 1544, 4672, 1930, 11060, 309, 486, 18887, 578, 18887, 471, 365, 18, 91, 739, 18, 1077, 1039, 12, 21, 18, 20, 4672, 775, 30, 11060, 18, 3530, 768, 12, 3459, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 869, 12, 2890, 16, 1544, 4672, 1930, 11060, 309, 486, 18887, 578, 18887, 471, 365, 18, 91, 739, 18, 1077, 1039, 12, 21, 18, 20, 4672, 775, 30, 11060, 18, 3530, 768, 12, 3459, 1...