rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if object.im_self:
if object.im_self is not None:
def docroutine(self, object, name=None, mod=None, cl=None): """Produce text documentation for a function or method object.""" realname = object.__name__ name = name or realname note = '' skipdocs = 0 if inspect.ismethod(object): imclass = object.im_class if cl: if imclass is not cl: note = ' from ' + classname(imclass, mod) else: if object.im_self: note = ' method of %s instance' % classname( object.im_self.__class__, mod) else: note = ' unbound %s method' % classname(imclass,mod) object = object.im_func
ed1d2715c2cd936173dce2c3a6044b91e9fde604 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/ed1d2715c2cd936173dce2c3a6044b91e9fde604/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 16, 927, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 445, 578, 707, 733, 12123, 2863, 529, 273, 733, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 16, 927, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 445, 578, 707, 733, 12123, 2863, 529, 273, 733, 16186, ...
tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True, ssl.CERT_OPTIONAL) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_OPTIONAL) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True, ssl.CERT_OPTIONAL) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True, ssl.CERT_REQUIRED) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_REQUIRED) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True, ssl.CERT_REQUIRED) def testProtocolSSL3(self):
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True) try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True) try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True) try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True, ssl.CERT_OPTIONAL) try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_OPTIONAL) try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True, ssl.CERT_OPTIONAL) try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True, ssl.CERT_REQUIRED) try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_REQUIRED) try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True, ssl.CERT_REQUIRED) def test_protocol_sslv3(self): """Connecting to an SSLv3 server with various client options"""
def testProtocolSSL23(self): if test_support.verbose: sys.stdout.write("\n") try: tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv2, True) except (ssl.SSLError, socket.error), x: # this fails on some older versions of OpenSSL (0.9.7l, for instance) if test_support.verbose: sys.stdout.write( " SSL2 client to SSL23 server test unexpectedly failed:\n %s\n" % str(x)) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True) tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True)
f08683542eada763321715f558eac5b2baec28e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f08683542eada763321715f558eac5b2baec28e9/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5752, 6745, 4366, 12, 2890, 4672, 309, 1842, 67, 13261, 18, 11369, 30, 2589, 18, 10283, 18, 2626, 31458, 82, 7923, 775, 30, 775, 5752, 16156, 12, 8157, 18, 16850, 67, 6745, 90, 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, 1842, 5752, 6745, 4366, 12, 2890, 4672, 309, 1842, 67, 13261, 18, 11369, 30, 2589, 18, 10283, 18, 2626, 31458, 82, 7923, 775, 30, 775, 5752, 16156, 12, 8157, 18, 16850, 67, 6745, 90, 4...
a vertical border strip to self.
a vertical border strip of length k to self.
def add_vertical_border_strip(self, k): """ Returns a list of all the partitions that can be obtained by adding a vertical border strip to self.
7896fee27ebd1c280842dcd38fb5539dd2c77a15 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7896fee27ebd1c280842dcd38fb5539dd2c77a15/partition.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 17824, 67, 8815, 67, 6406, 12, 2890, 16, 417, 4672, 3536, 2860, 279, 666, 434, 777, 326, 10060, 716, 848, 506, 12700, 635, 6534, 279, 9768, 5795, 2569, 358, 365, 18, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 17824, 67, 8815, 67, 6406, 12, 2890, 16, 417, 4672, 3536, 2860, 279, 666, 434, 777, 326, 10060, 716, 848, 506, 12700, 635, 6534, 279, 9768, 5795, 2569, 358, 365, 18, 2, -100, ...
return self.setFieldId('cast', cast_name)
return self.getFieldId('cast', cast_name)
def getCastId(self, cast_name): """ Find the id of the given cast from MythDB.
cbd031af868a22b20efa5009641d2f15a4d893ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/cbd031af868a22b20efa5009641d2f15a4d893ba/MythVideo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1927, 689, 548, 12, 2890, 16, 4812, 67, 529, 4672, 3536, 4163, 326, 612, 434, 326, 864, 4812, 628, 8005, 451, 2290, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1927, 689, 548, 12, 2890, 16, 4812, 67, 529, 4672, 3536, 4163, 326, 612, 434, 326, 864, 4812, 628, 8005, 451, 2290, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
vals.get('_parent_invoice.currency', vals.get('currency')), context=context) if vals.get('_parent_invoice.type', vals.get('invoice_type')) \
vals.get('_parent_invoice.currency') or vals.get('currency'), context=context) if (vals.get('_parent_invoice.type') or vals.get('invoice_type')) \
def on_change_product(self, cursor, user, ids, vals, context=None): product_obj = self.pool.get('product.product') party_obj = self.pool.get('party.party') account_obj = self.pool.get('account.account') uom_obj = self.pool.get('product.uom') company_obj = self.pool.get('company.company') currency_obj = self.pool.get('currency.currency') tax_rule_obj = self.pool.get('account.tax.rule')
3cd1dc2cc617e0d597a6b45b5338be7def434193 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9267/3cd1dc2cc617e0d597a6b45b5338be7def434193/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 3017, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 5896, 6134, 18285, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 3017, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 5896, 6134, 18285, 67,...
self.conn = self.connect(invalidate = True)
self.conn = self.connect()
def eraseDB(self): """ __eraseDB__ Erase all contents of MergeSensor DB in a single transaction (all tables are deleted or none at all) Arguments: none Return: none
f6d38da4b0910650112bd5df8a6e148fb35b760b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/f6d38da4b0910650112bd5df8a6e148fb35b760b/MergeSensorDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22038, 2290, 12, 2890, 4672, 3536, 1001, 264, 448, 2290, 972, 225, 512, 5648, 777, 2939, 434, 8964, 22294, 2383, 316, 279, 2202, 2492, 261, 454, 4606, 854, 4282, 578, 6555, 622, 777, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22038, 2290, 12, 2890, 4672, 3536, 1001, 264, 448, 2290, 972, 225, 512, 5648, 777, 2939, 434, 8964, 22294, 2383, 316, 279, 2202, 2492, 261, 454, 4606, 854, 4282, 578, 6555, 622, 777, 13,...
self.modifyHydrogenateAction.setIconSet(QIconSet(self.image32))
self.modifyHydrogenateAction.setIconSet(QIconSet(self.image26))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
2bdc60455ab85cd2792604c15ae9034d3632b0df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/2bdc60455ab85cd2792604c15ae9034d3632b0df/MainWindowUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 23...
except IOError: logger.verbose("%s (%s): using fallback vrefname 'default'"%(name,vref))
except IOError: logger.verbose("%s (%s): using fallback vrefname 'default'"%(name,vref))
def create(name, vref = None): logger.verbose('Sliver_VS:create - name=%s'%name) if vref is None: vref='default' try: ### locating the right slicefamily # this is a first draft, and more a proof of concept thing # the idea is to parse vref for dash-separated wishes, # and to project these against the defaults # however for cases like when vref is 'planetflow', if we do not understand # any of the wishes we take vref as is # this could be improved by having the vserver-reference init script be a bit smarter # so we could take planetflow as the pldistro part here as_is=None # defaults default=file("/etc/planetlab/defaultvref").read() (pldistro,fcdistro,arch) = default.split("-") # from the slice attribute: cut dashes and try to figure the meaning slice_wishes = vref.split("-") for wish in slice_wishes: if wish == "i386" or wish == "x86_64": arch=wish elif wish == "planetlab" or wish == "onelab" or wish == "vini": pldistro=wish elif wish == "f8" or wish == "centos5" : fcdistro=wish else: # if we find something like e.g. planetflow, use it as-is as_is=vref break if as_is: refname=as_is else: refname="-".join( (pldistro,fcdistro,arch) ) # check the templates exists -- there's probably a better way.. if not os.path.isdir ("/vservers/.vref/%s"%refname): log.verbose("%s (%s) : vref %s not found, using default %s"%( name,vref,refname,default)) refname=default except IOError: # have not found defaultvref logger.verbose("%s (%s): using fallback vrefname 'default'"%(name,vref)) # for legacy nodes refname="default" except: import traceback logger.log("%s (%s) : unexpected error follows - using 'default'"%( name,vref)) logger.log(traceback.format_exc()) logger.log_call('/usr/sbin/vuseradd', '-t', refname, name) open('/vservers/%s/etc/slicename' % name, 'w').write(name)
673e1ce1fc12e96341f12d9cd45efd280569c38d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6995/673e1ce1fc12e96341f12d9cd45efd280569c38d/sliver_vs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 529, 16, 331, 1734, 273, 599, 4672, 1194, 18, 11369, 2668, 3738, 1667, 67, 14640, 30, 2640, 300, 508, 5095, 87, 11, 9, 529, 13, 309, 331, 1734, 353, 599, 30, 331, 1734, 2218...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 529, 16, 331, 1734, 273, 599, 4672, 1194, 18, 11369, 2668, 3738, 1667, 67, 14640, 30, 2640, 300, 508, 5095, 87, 11, 9, 529, 13, 309, 331, 1734, 353, 599, 30, 331, 1734, 2218...
mock = self.mocker({name: 'path/to/mod'})
mock = self.mocker({name: os.path.join('path', 'to', 'mod')})
def test_state_after_failure(self): name = "mod" module = imp.new_module(name) module.blah = None mock = self.mocker({name: 'path/to/mod'}) mock.source = b"1/0" with util.uncache(name): sys.modules[name] = module self.assertRaises(ZeroDivisionError, mock.load_module, name) self.assert_(sys.modules[name] is module) self.assert_(hasattr(module, 'blah')) return mock
3714e816446d00f205edc184db1f131faf6bf12b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/3714e816446d00f205edc184db1f131faf6bf12b/test_abc_loader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2019, 67, 5205, 67, 12251, 12, 2890, 4672, 508, 273, 315, 1711, 6, 1605, 273, 1646, 18, 2704, 67, 2978, 12, 529, 13, 1605, 18, 3083, 9795, 273, 599, 5416, 273, 365, 18, 81,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2019, 67, 5205, 67, 12251, 12, 2890, 4672, 508, 273, 315, 1711, 6, 1605, 273, 1646, 18, 2704, 67, 2978, 12, 529, 13, 1605, 18, 3083, 9795, 273, 599, 5416, 273, 365, 18, 81,...
cr.execute("ALTER TABLE %s ADD FOREIGN KEY (%s) REFERENCES %s ON DELETE SET NULL" % (self._obj, f._fields_id, f._table))
cr.execute("ALTER TABLE \"%s\" ADD FOREIGN KEY (%s) REFERENCES \"%s\" ON DELETE SET NULL" % (self._obj, f._fields_id, f._table))
def _auto_init(self, cr): logger = netsvc.Logger() create = False self._field_create(cr) if not hasattr(self, "_auto") or self._auto: cr.execute("SELECT relname FROM pg_class WHERE relkind in ('r','v') AND relname='%s'" % self._table) if not cr.rowcount: cr.execute("CREATE TABLE %s(id SERIAL NOT NULL, perm_id INTEGER, PRIMARY KEY(id)) WITH OIDS" % self._table) create = True cr.commit() if self._log_access: logs = { 'create_uid': 'INTEGER REFERENCES res_users ON DELETE SET NULL', 'create_date': 'TIMESTAMP', 'write_uid': 'INTEGER REFERENCES res_users ON DELETE SET NULL', 'write_date': 'TIMESTAMP' } for k in logs: cr.execute( """ SELECT c.relname FROM pg_class c, pg_attribute a WHERE c.relname='%s' AND a.attname='%s' AND c.oid=a.attrelid """ % (self._table, k)) if not cr.rowcount: cr.execute("ALTER TABLE %s ADD COLUMN %s %s" % (self._table, k, logs[k])) cr.commit()
21e2436edcfd48b26e17230380299a3196aac8b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/21e2436edcfd48b26e17230380299a3196aac8b0/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6079, 67, 2738, 12, 2890, 16, 4422, 4672, 1194, 273, 21954, 4227, 18, 3328, 1435, 752, 273, 1083, 365, 6315, 1518, 67, 2640, 12, 3353, 13, 309, 486, 3859, 12, 2890, 16, 4192, 6079...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6079, 67, 2738, 12, 2890, 16, 4422, 4672, 1194, 273, 21954, 4227, 18, 3328, 1435, 752, 273, 1083, 365, 6315, 1518, 67, 2640, 12, 3353, 13, 309, 486, 3859, 12, 2890, 16, 4192, 6079...
parent_element = list_data = []
parent_element = [] list_data = []
def get_kml(self, cr, uid, context={}): partner_obj = self.pool.get('res.partner') partner_ids = partner_obj.search(cr, uid, []) partner_data = partner_obj.browse(cr, uid, partner_ids, context) address_obj= self.pool.get('res.partner.address') res = {} number_customer_inv = number_supplier_inv = 0 cr.execute(''' select count(i.id),i.type, i.partner_id from account_invoice as i left join res_partner_address as a on i.partner_id=a.partner_id where i.type in ('out_invoice','in_invoice') group by i.type, i.partner_id ''') invoice_partner = cr.fetchall()
aaaffb7a7ee3c7d260a070bf8a5e141e1c996850 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/aaaffb7a7ee3c7d260a070bf8a5e141e1c996850/google_earth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 79, 781, 12, 2890, 16, 4422, 16, 4555, 16, 819, 12938, 4672, 19170, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 455, 18, 31993, 6134, 19170, 67, 2232, 273, 19170, 67, 2603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 79, 781, 12, 2890, 16, 4422, 16, 4555, 16, 819, 12938, 4672, 19170, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 455, 18, 31993, 6134, 19170, 67, 2232, 273, 19170, 67, 2603, ...
self.tag_ts.append([tag, color, tag.get_name()[1:], str(count), False])
self.tag_ts.append( [tag, color, tag.get_name()[1:], str(count), False])
def refresh_tags(self): select = self.tag_tview.get_selection() t_path = None if select: t_model, t_path = select.get_selected_rows() #pylint: disable-msg=W0612 self.tag_ts.clear() alltag = self.req.get_alltag_tag() notag = self.req.get_notag_tag() if self.workview: count_all_task = len(self.req.get_active_tasks_list(workable=True)) count_no_tags = len(self.req.get_active_tasks_list(notag_only=True,\ workable=True)) else: count_all_task = len(self.req.get_tasks_list(started_only=False)) count_no_tags = len(self.req.get_tasks_list(notag_only=True,\ started_only=False))
451ea29e3924785bc6c6b8648aa6459b292a0db4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/451ea29e3924785bc6c6b8648aa6459b292a0db4/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 4156, 12, 2890, 4672, 2027, 273, 365, 18, 2692, 67, 88, 1945, 18, 588, 67, 10705, 1435, 268, 67, 803, 273, 599, 309, 2027, 30, 268, 67, 2284, 16, 268, 67, 803, 273, 2027, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 4156, 12, 2890, 4672, 2027, 273, 365, 18, 2692, 67, 88, 1945, 18, 588, 67, 10705, 1435, 268, 67, 803, 273, 599, 309, 2027, 30, 268, 67, 2284, 16, 268, 67, 803, 273, 2027, ...
def AppendClass(self, cls):
def appendClass(self, cls):
def AppendClass(self, cls): dprint("class=%s mro=%s" % (cls, cls.classprefs._getMRO())) mro = cls.classprefs._getMRO() parent = self.FindParent(mro[1:]) if parent is not None: dprint(" found parent = %s" % self.GetItemText(parent)) item = self.AppendItem(parent, mro[0].__name__) self.setIconForItem(item, cls) self.SetPyData(item, cls)
e529bf7052e4d682be76cb28de0c6a80688a2b73 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/e529bf7052e4d682be76cb28de0c6a80688a2b73/userparams.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 797, 12, 2890, 16, 2028, 4672, 302, 1188, 2932, 1106, 5095, 87, 312, 303, 5095, 87, 6, 738, 261, 6429, 16, 2028, 18, 1106, 1484, 2556, 6315, 588, 49, 1457, 1435, 3719, 312, 303, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 797, 12, 2890, 16, 2028, 4672, 302, 1188, 2932, 1106, 5095, 87, 312, 303, 5095, 87, 6, 738, 261, 6429, 16, 2028, 18, 1106, 1484, 2556, 6315, 588, 49, 1457, 1435, 3719, 312, 303, ...
row = CoincDef()
row = self.RowType()
def get_coinc_def_id(self, table_names, create_new = True): """ Return the coinc_def_id corresponding to coincidences consisting exclusively of events from the given table names. If no matching coinc_def_id is found, then a new one is created and the ID returned, unless create_new is False in which case the KeyError is raised. """ # sort the contribuor table names table_names = list(table_names) table_names.sort()
8d8df5b03519a1249b8d3c947c190b39b2f0631a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/8d8df5b03519a1249b8d3c947c190b39b2f0631a/lsctables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12645, 71, 67, 536, 67, 350, 12, 2890, 16, 1014, 67, 1973, 16, 752, 67, 2704, 273, 1053, 4672, 3536, 2000, 326, 13170, 71, 67, 536, 67, 350, 4656, 358, 13170, 13478, 2369, 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, 336, 67, 12645, 71, 67, 536, 67, 350, 12, 2890, 16, 1014, 67, 1973, 16, 752, 67, 2704, 273, 1053, 4672, 3536, 2000, 326, 13170, 71, 67, 536, 67, 350, 4656, 358, 13170, 13478, 2369, 2...
(self.__class__, self.__testMethodName)
(_strclass(self.__class__), self.__testMethodName)
def __repr__(self): return "<%s testMethod=%s>" % \ (self.__class__, self.__testMethodName)
354caa7b7fd7762f667ff41d2bbe285b693c40dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/354caa7b7fd7762f667ff41d2bbe285b693c40dc/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 3532, 9, 87, 1842, 1305, 5095, 87, 2984, 738, 521, 261, 2890, 16186, 1106, 972, 16, 365, 16186, 3813, 11666, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 3532, 9, 87, 1842, 1305, 5095, 87, 2984, 738, 521, 261, 2890, 16186, 1106, 972, 16, 365, 16186, 3813, 11666, 13, 2, -100, -100, -100, -100, -100, ...
self.task_labels = [s.strip() for s in self.preferences['labels'].split(',')]
string = self.preferences['labels'].strip(' ,') if string: self.task_labels = [s.strip() for s in self.preferences['labels'].split(',')] else: self.task_labels = []
def _set_preferences(self): self.all_checkboxes = self.preferences['all_checkboxes'] self.task_labels = [s.strip() for s in self.preferences['labels'].split(',')] regex = '(' + '|'.join(map(re.escape, self.task_labels)) + ')' self.task_label_re = re.compile(regex)
ee60171ca8637065e638ed49dc8f94ecc7824569 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4103/ee60171ca8637065e638ed49dc8f94ecc7824569/tasklist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 23219, 12, 2890, 4672, 365, 18, 454, 67, 12017, 281, 273, 365, 18, 23219, 3292, 454, 67, 12017, 281, 3546, 533, 273, 365, 18, 23219, 3292, 5336, 29489, 6406, 2668, 269, 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, 389, 542, 67, 23219, 12, 2890, 4672, 365, 18, 454, 67, 12017, 281, 273, 365, 18, 23219, 3292, 454, 67, 12017, 281, 3546, 533, 273, 365, 18, 23219, 3292, 5336, 29489, 6406, 2668, 269, 6...
log_filter = _config.get('log_filter', None) if log_filter: orig_log = logger._log def _log(self, level, msg, args, exc_info=None): if log_name in log_filter or (log_name == "" and 'root' in log_filter): orig_log(level, msg, args, exc_info) import new logger._log = new.instancemethod(_log, logger, logger.__class__)
if not custom_log_file: log_filter = _config.get('log_filter', None) if log_filter: filter = LogFilter(log_filter) logger.addFilter(filter)
def getLogger(log_file=None): """ Creates and retuns a log channel. If no log_file is given the system-wide logfile as defined in config.py is used. If a log_file is given that's where the created logger logs to. @param log_file: optional, the file to log to. @type log_file: C{str} @return: a log channel (Logger instance) @rtype: L{logging.Logger} for Python >=2.3, L{Pyblosxom._logging.Logger} for Python <2.3 """ if log_file == None: log_file = _config.get('log_file', 'stderr') f = sys._getframe(1) filename = f.f_code.co_filename module = f.f_globals["__name__"] # by default use the root logger log_name = "" for path in _config['plugin_dirs']: if filename.startswith(path): # if it's a plugin use the module name as the log channels name log_name = module break # default to log level WARNING if it's not defined in config.py log_level = _config.get('log_level', 'warning') else: # handle custom log_file # there's only a single log channel, so make that be the root logger log_name = "" # assume log_level debug (show everything) log_level = "debug" global _loghandler_registry # get the logger for this channel logger = logging.getLogger(log_name) # don't propagate messages up the logger hierarchy logger.propagate = 0 # setup the handler if it doesn't allready exist. # only add one handler per log channel. key = "%s|%s" % (log_file, log_name) if not key in _loghandler_registry: # create the handler if log_file == "stderr": hdlr = logging.StreamHandler(sys.stderr) else: if log_file == "NONE": # user disabled logging if os.name == 'nt': # windoze log_file = "NUL" else: # assume *nix log_file = "/dev/null" try: hdlr = logging.FileHandler(log_file) except IOError: # couldn't open logfile, fallback to stderr hdlr = logging.StreamHandler(sys.stderr) # create and set the formatter if log_name: # plugin hdlr.setFormatter(logging.Formatter('%(asctime)s [%(levelname)s] %(name)s: %(message)s')) else: # root logger hdlr.setFormatter(logging.Formatter('%(asctime)s [%(levelname)s]: %(message)s')) logger.addHandler(hdlr) int_level = getattr(logging, log_level.upper()) logger.setLevel(int_level) # only log messages from plugins listed in log_filter. # add 'root' to the log_filter list to still allow application level messages. log_filter = _config.get('log_filter', None) if log_filter: orig_log = logger._log def _log(self, level, msg, args, exc_info=None): if log_name in log_filter or (log_name == "" and 'root' in log_filter): orig_log(level, msg, args, exc_info) import new logger._log = new.instancemethod(_log, logger, logger.__class__) # remember that we've seen this handler _loghandler_registry[key] = True return logger
78d2ec3a4d74338aeaef4daf74f3d0dec9040d0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/78d2ec3a4d74338aeaef4daf74f3d0dec9040d0a/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7156, 12, 1330, 67, 768, 33, 7036, 4672, 3536, 10210, 471, 325, 27595, 279, 613, 1904, 18, 971, 1158, 613, 67, 768, 353, 864, 326, 2619, 17, 26767, 15204, 487, 2553, 316, 642, 18, 2074...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7156, 12, 1330, 67, 768, 33, 7036, 4672, 3536, 10210, 471, 325, 27595, 279, 613, 1904, 18, 971, 1158, 613, 67, 768, 353, 864, 326, 2619, 17, 26767, 15204, 487, 2553, 316, 642, 18, 2074...
'error_msg': str(err),
'error_msg': err.args[0],
def execute(self, macro_name, args): """ Get and execute a macro
3f5a5cff9de7ca3b78370573acfa7b6484fac466 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/3f5a5cff9de7ca3b78370573acfa7b6484fac466/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11522, 67, 529, 16, 833, 4672, 3536, 968, 471, 1836, 279, 11522, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11522, 67, 529, 16, 833, 4672, 3536, 968, 471, 1836, 279, 11522, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if line.strip() != '':
if not self.quiet and line.strip() != '':
def generator(self): """Provides the dictionary entries.""" a = 0 for line in self.fileHandle: # ignore comments if line.lstrip().startswith('#'): continue # parse line matchObj = self.entryRegex.match(line) if not matchObj: if line.strip() != '': warn("error reading line '" + line + "'") continue # get entries entry = matchObj.groups() if self.columns: entry = dict([(self.columns[idx], cell) for idx, cell \ in enumerate(entry)]) if self.filterFunc: entry = self.filterFunc(entry) yield entry
dec8906e07681ee925caef6e895971c9e8464f07 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11128/dec8906e07681ee925caef6e895971c9e8464f07/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4456, 12, 2890, 4672, 3536, 17727, 326, 3880, 3222, 12123, 279, 273, 374, 364, 980, 316, 365, 18, 768, 3259, 30, 468, 2305, 5678, 309, 980, 18, 80, 6406, 7675, 17514, 1918, 2668, 10038, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4456, 12, 2890, 4672, 3536, 17727, 326, 3880, 3222, 12123, 279, 273, 374, 364, 980, 316, 365, 18, 768, 3259, 30, 468, 2305, 5678, 309, 980, 18, 80, 6406, 7675, 17514, 1918, 2668, 10038, ...
trace(1, depth, "_pending.final updown: %s", (pkg) )
self.trace(1, "_pending.final updown: %s", (pkg) )
def _pending(self, pending): trans = self._trans changeset = self._changeset locked = self._locked depth = self._depth if traceVerbosity<4: trace(1, depth, "_pending(pw=%f, yw=%f)", (self._pruneweight, self._yieldweight)) else: trace(4, depth, "_pending(%s, pw=%f, yw=%f)", (pending, self._pruneweight, self._yieldweight))
b26ec53d5174d18eebf24ded272ad218fb19d0b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/b26ec53d5174d18eebf24ded272ad218fb19d0b4/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9561, 12, 2890, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 309, 2606, 30594, 32, 24, 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, 389, 9561, 12, 2890, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 309, 2606, 30594, 32, 24, 30, ...
pdu = v2c.InformRequestPDU()
raise RuntimeError()
def sendNotification( self, snmpEngine, notificationTarget, notificationName, additionalVarBinds=None, contextName='' ): # 3.3 ( notifyTag, notifyType ) = config.getNotificationInfo( snmpEngine, notificationTarget ) contextMibInstrumCtl = self.__context.getMibInstrum( contextName ) for targetAddrName in config.getTargetNames(snmpEngine, notifyTag): ( transportDomain, transportAddress, timeout, retryCount, params ) = config.getTargetAddr(snmpEngine, targetAddrName) ( messageProcessingModel, securityModel, securityName, securityLevel ) = config.getTargetParams(snmpEngine, params)
beac2b8a85446ea9e67020370cf82edea825ab65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/beac2b8a85446ea9e67020370cf82edea825ab65/ntforg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4386, 12, 365, 16, 15366, 4410, 16, 3851, 2326, 16, 3851, 461, 16, 3312, 1537, 17856, 33, 7036, 16, 819, 461, 2218, 11, 262, 30, 468, 890, 18, 23, 261, 5066, 1805, 16, 5066, 55...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4386, 12, 365, 16, 15366, 4410, 16, 3851, 2326, 16, 3851, 461, 16, 3312, 1537, 17856, 33, 7036, 16, 819, 461, 2218, 11, 262, 30, 468, 890, 18, 23, 261, 5066, 1805, 16, 5066, 55...
def sprites(self):
def sprites(self):
def sprites(self): return list(self._spritelist)
d9760f3e4782abb02dd98080337626eefdad67ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/d9760f3e4782abb02dd98080337626eefdad67ee/sprite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1694, 24047, 12, 2890, 4672, 327, 666, 12, 2890, 6315, 1752, 583, 5449, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1694, 24047, 12, 2890, 4672, 327, 666, 12, 2890, 6315, 1752, 583, 5449, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
class ListWithParent: pass class TensorProductOfCrystalElement(ListWithParent, CrystalElement): r""" A class for tensor products of crystals """ def e(self, i): r""" TEST: sage: C = CrystalOfLetters(['A',5]) sage: T = TensorProductOfCrystalElement(C,C) sage: T(C(1),C(2)).e(1) == T(C(1),C(1)) True sage: T(C(2),C(1)).e(1) == None True sage: T(C(2),C(2)).e(1) == T(C(1),C(2)) True """ assert i in self.index_set() position = self.positionsOfUnmatchedOpening(i) if position == []: return None k = position[0] self[k] = self[k].e(i) return self def f(self, i): r""" TEST: sage: C = CrystalOfLetters(['A',5]) sage: T = TensorProductOfCrystalElement(C,C)
class TensorProductOfCrystals(Crystal): r""" Tensor product of crystals TESTS: sage: from sage.combinat.crystals import TensorProductOfCrystals sage: C = CrystalOfLetters(['A',5]) sage: T = TensorProductOfCrystals(C,C) sage: T(C(1),C(2)).e(1) == T(C(1),C(1)) True sage: T(C(2),C(1)).e(1) == None True sage: T(C(2),C(2)).e(1) == T(C(1),C(2)) True
def f(self, i): r""" TEST:
86f8b046baa1b812c5700aa92e7e982a05a6888a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/86f8b046baa1b812c5700aa92e7e982a05a6888a/crystals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 12, 2890, 16, 277, 4672, 436, 8395, 22130, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 12, 2890, 16, 277, 4672, 436, 8395, 22130, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "\tCodec :", self.tags.pop("audio-codec")
print "\tCodec :", self.tags["audio-codec"]
def print_info(self): """prints out the information on the given file""" if not self.finished: return if not self.mimetype: print "Unknown media type" return print "Mime Type :\t", self.mimetype if not self.is_video and not self.is_audio: return print "Length :\t", self._time_to_string(max(self.audiolength, self.videolength)) print "\tAudio:", self._time_to_string(self.audiolength), "\tVideo:", self._time_to_string(self.videolength) if self.is_video and self.videorate: print "Video :" print "\t%d x %d @ %d/%d fps" % (self.videowidth, self.videoheight, self.videorate.num, self.videorate.denom) if self.tags.has_key("video-codec"): print "\tCodec :", self.tags.pop("video-codec") if self.is_audio: print "Audio :" if self.audiofloat: print "\t%d channels(s) : %dHz @ %dbits (float)" % (self.audiochannels, self.audiorate, self.audiowidth) else: print "\t%d channels(s) : %dHz @ %dbits (int)" % (self.audiochannels, self.audiorate, self.audiodepth) if self.tags.has_key("audio-codec"): print "\tCodec :", self.tags.pop("audio-codec") for stream in self.otherstreams: if not stream == self.mimetype: print "Other unsuported Multimedia stream :", stream if self.tags: print "Additional information :" for tag in self.tags.keys(): print "%20s :\t" % tag, self.tags[tag]
64e9d7f25b15e085ba0de6081d0c325a0d5facba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1020/64e9d7f25b15e085ba0de6081d0c325a0d5facba/discoverer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 1376, 12, 2890, 4672, 3536, 1188, 87, 596, 326, 1779, 603, 326, 864, 585, 8395, 309, 486, 365, 18, 13527, 30, 327, 309, 486, 365, 18, 22571, 30, 1172, 315, 4874, 3539, 618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 1376, 12, 2890, 4672, 3536, 1188, 87, 596, 326, 1779, 603, 326, 864, 585, 8395, 309, 486, 365, 18, 13527, 30, 327, 309, 486, 365, 18, 22571, 30, 1172, 315, 4874, 3539, 618, ...
noheaders(), 'file:'+file)
headers, 'file:'+file)
def open_local_file(self, url): host, file = splithost(url) if not host: return addinfourl( open(url2pathname(file), 'rb'), noheaders(), 'file:'+file) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfourl( open(url2pathname(file), 'rb'), noheaders(), 'file:'+file) raise IOError, ('local file error', 'not on local host')
e9a8940e275731d0de26af6b1360453333f2a907 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e9a8940e275731d0de26af6b1360453333f2a907/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 10625, 477, 80, 12, 1696, 12, 718, 22, 28336, 12, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 10625, 477, 80, 12, 1696, 12, 718, 22, 28336, 12, 7...
with io.open(support.TESTFN, "rb", buffering=0) as f:
with self.open(support.TESTFN, "rb", buffering=0) as f:
def test_truncate(self): # Truncate implicitly flushes the buffer. with io.open(support.TESTFN, self.write_mode, buffering=0) as raw: bufio = self.tp(raw, 8) bufio.write(b"abcdef") self.assertEqual(bufio.truncate(3), 3) self.assertEqual(bufio.tell(), 3) with io.open(support.TESTFN, "rb", buffering=0) as f: self.assertEqual(f.read(), b"abc")
cdcd4bff129f84e10e493782d319cea1a31f9162 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/cdcd4bff129f84e10e493782d319cea1a31f9162/test_io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 27201, 12, 2890, 4672, 468, 25869, 24682, 3663, 281, 326, 1613, 18, 598, 2527, 18, 3190, 12, 13261, 18, 16961, 19793, 16, 365, 18, 2626, 67, 3188, 16, 25056, 33, 20, 13, 487,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27201, 12, 2890, 4672, 468, 25869, 24682, 3663, 281, 326, 1613, 18, 598, 2527, 18, 3190, 12, 13261, 18, 16961, 19793, 16, 365, 18, 2626, 67, 3188, 16, 25056, 33, 20, 13, 487,...
self.run_test_targets = []
def __init__(self, gyp_path, path, build_file_dict): self.gyp_path = gyp_path self.path = path self.project = gyp.xcodeproj_file.PBXProject(path=path) self.project_file = \ gyp.xcodeproj_file.XCProjectFile({'rootObject': self.project}) self.build_file_dict = build_file_dict self.run_test_targets = []
8e1f5ce7f6c632cd6d0065dd8411588c6d1580c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/8e1f5ce7f6c632cd6d0065dd8411588c6d1580c2/xcode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 879, 67, 803, 16, 589, 16, 1361, 67, 768, 67, 1576, 4672, 365, 18, 75, 879, 67, 803, 273, 314, 879, 67, 803, 365, 18, 803, 273, 589, 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, 1001, 2738, 972, 12, 2890, 16, 314, 879, 67, 803, 16, 589, 16, 1361, 67, 768, 67, 1576, 4672, 365, 18, 75, 879, 67, 803, 273, 314, 879, 67, 803, 365, 18, 803, 273, 589, 365, 18, ...
rm_rf(exe_path)
try: rm_rf(exe_path) except WindowsError: pass
def create(egg, conf): for script_type in ['gui_scripts', 'console_scripts']: if script_type not in conf.sections(): continue for name, entry_pt in conf.items(script_type): fname = name if on_win: exe_path = join(sys.prefix, r'Scripts\%s.exe' % name) rm_rf(exe_path) write_exe(exe_path, script_type) egg.files.append(exe_path) fname += '-script.py' if script_type == 'gui_scripts': fname += 'w' path = join(bin_dir, fname) write_script(path, entry_pt, basename(egg.fpath)) egg.files.append(path)
c9ece7137b3224d98daa7d66bd7cf408d399b52c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7707/c9ece7137b3224d98daa7d66bd7cf408d399b52c/scripts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 23171, 16, 2195, 4672, 364, 2728, 67, 723, 316, 10228, 20292, 67, 12827, 2187, 296, 8698, 67, 12827, 3546, 30, 309, 2728, 67, 723, 486, 316, 2195, 18, 11657, 13332, 1324, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 23171, 16, 2195, 4672, 364, 2728, 67, 723, 316, 10228, 20292, 67, 12827, 2187, 296, 8698, 67, 12827, 3546, 30, 309, 2728, 67, 723, 486, 316, 2195, 18, 11657, 13332, 1324, 364, ...
myf.write("\n"+x)
myf.write("\nblacklist "+x)
def run_local(self): # what modules do we want to blacklist? if self.settings.has_key("livecd/modblacklist"): try: myf=open(self.settings["chroot_path"]+"/etc/hotplug/blacklist","a") except: self.unbind() raise CatalystError,"Couldn't open "+self.settings["chroot_path"]+"/etc/hotplug/blacklist." myf.write("\n#Added by Catalyst:") for x in self.settings["livecd/modblacklist"]: myf.write("\n"+x) myf.close()
9bc21e7c2d528338f99774ecfe42e1844e464e73 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7327/9bc21e7c2d528338f99774ecfe42e1844e464e73/livecd_stage2_target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3729, 12, 2890, 4672, 468, 4121, 4381, 741, 732, 2545, 358, 11709, 35, 309, 365, 18, 4272, 18, 5332, 67, 856, 2932, 80, 427, 557, 72, 19, 1711, 22491, 6, 4672, 775, 30, 339...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3729, 12, 2890, 4672, 468, 4121, 4381, 741, 732, 2545, 358, 11709, 35, 309, 365, 18, 4272, 18, 5332, 67, 856, 2932, 80, 427, 557, 72, 19, 1711, 22491, 6, 4672, 775, 30, 339...
This is the product of all (finite) primes where the hilbert symbol is -1.
This is the product of all (finite) primes where the Hilbert symbol is -1.
def hilbert_conductor(a, b): """ This is the product of all (finite) primes where the hilbert symbol is -1. What is the same, this is the (reduced) discriminant of the quaternion algebra (a,b) over Q. INPUT: a, b -- integers OUTPUT: squarefree positive integer EXAMPLES: sage: hilbert_conductor(-1, -1) 2 sage: hilbert_conductor(-1, -11) 11 sage: hilbert_conductor(-2, -5) 5 sage: hilbert_conductor(-3, -17) 17 AUTHOR: -- Gonzalo Tornaria (2009-03-02) """ a, b = ZZ(a), ZZ(b) d = ZZ(1) for p in union(union( [2], prime_divisors(a) ), prime_divisors(b) ): if hilbert_symbol(a, b, p) == -1: d *= p return d
c5cc436e94fabaa9fa38f5732aff2c6f8ca3be27 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/c5cc436e94fabaa9fa38f5732aff2c6f8ca3be27/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 330, 25925, 67, 591, 1828, 280, 12, 69, 16, 324, 4672, 3536, 1220, 353, 326, 3017, 434, 777, 261, 9551, 13, 846, 4485, 1625, 326, 670, 330, 25925, 3273, 353, 300, 21, 18, 18734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 330, 25925, 67, 591, 1828, 280, 12, 69, 16, 324, 4672, 3536, 1220, 353, 326, 3017, 434, 777, 261, 9551, 13, 846, 4485, 1625, 326, 670, 330, 25925, 3273, 353, 300, 21, 18, 18734, ...
return os.path.join(modulePath, path[4:])
return modulePath
def getB3Path(): if main_is_frozen(): # which happens when running from the py2exe build return os.path.dirname(sys.executable) return os.path.join(modulePath, path[4:])
862885a890f01d3cf6b6e67f7b91ef9a05db4434 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12909/862885a890f01d3cf6b6e67f7b91ef9a05db4434/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2882, 23, 743, 13332, 309, 2774, 67, 291, 67, 28138, 13332, 468, 1492, 10555, 1347, 3549, 628, 326, 2395, 22, 14880, 1361, 327, 1140, 18, 803, 18, 12287, 12, 9499, 18, 17751, 13, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2882, 23, 743, 13332, 309, 2774, 67, 291, 67, 28138, 13332, 468, 1492, 10555, 1347, 3549, 628, 326, 2395, 22, 14880, 1361, 327, 1140, 18, 803, 18, 12287, 12, 9499, 18, 17751, 13, 327, ...
print repr(line)
def MemoryInfo( self ): """Returns the content of /proc/meminfo as a dictionary 'key' -> 'value' where value is in kB""" res = {} for line in cat("/proc/meminfo").split("\n")[:-1]: line = RE_SPACES.sub(" ", line).strip().split(" ") print repr(line) name, value = line[:2] res[name.replace("(","_").replace(")","_").replace(":","")] = int(value) return res
7ed6110d37a914d582e30fbe68bf4f3906cfd610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13002/7ed6110d37a914d582e30fbe68bf4f3906cfd610/watchdog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9251, 966, 12, 365, 262, 30, 3536, 1356, 326, 913, 434, 342, 9381, 19, 3917, 1376, 487, 279, 3880, 296, 856, 11, 317, 296, 1132, 11, 1625, 460, 353, 316, 417, 38, 8395, 400, 273, 261...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9251, 966, 12, 365, 262, 30, 3536, 1356, 326, 913, 434, 342, 9381, 19, 3917, 1376, 487, 279, 3880, 296, 856, 11, 317, 296, 1132, 11, 1625, 460, 353, 316, 417, 38, 8395, 400, 273, 261...
getGWConfig().boolmaps = escape(safe_unicode(value))
getGWConfig().boolmaps = value
def set(self, value): getGWConfig().boolmaps = escape(safe_unicode(value))
070938d23071aedec649c8a62af7f37abc39f9d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13072/070938d23071aedec649c8a62af7f37abc39f9d9/controlpanel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 460, 4672, 7162, 59, 809, 7675, 6430, 10711, 273, 4114, 12, 4626, 67, 9124, 12, 1132, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 460, 4672, 7162, 59, 809, 7675, 6430, 10711, 273, 4114, 12, 4626, 67, 9124, 12, 1132, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
raise ValueError, "local port must be an integer number"
raise ValueError, "Local port must be an integer number"
def usage(): print >>sys.stderr, """USAGE: %s [options] Simple Terminal Programm for the serial port. options: -p, --port=PORT: serial port, a number, defualt = 0 or a device name -b, --baud=BAUD: baudrate, default 9600 -r, --rtscts: enable RTS/CTS flow control (default off) -x, --xonxoff: enable software flow control (default off) -P, --localport: TCP/IP port on which to run the server (default 7777) """ % sys.argv[0]
56d976500e8cfd13cd4ccd05f7bf15d8572b5335 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/56d976500e8cfd13cd4ccd05f7bf15d8572b5335/tcp_serial_redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
if self.value is None:
if self._value is None:
def plain(self): ''' Render a "plain" representation of the property ''' if self.value is None: return '' return self._value and "Yes" or "No"
a797d6a5da539310c944d735a37637ed45c2b978 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a797d6a5da539310c944d735a37637ed45c2b978/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7351, 12, 2890, 4672, 9163, 6987, 279, 315, 7446, 6, 4335, 434, 326, 1272, 9163, 309, 365, 6315, 1132, 353, 599, 30, 327, 875, 327, 365, 6315, 1132, 471, 315, 22352, 6, 578, 315, 2279,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7351, 12, 2890, 4672, 9163, 6987, 279, 315, 7446, 6, 4335, 434, 326, 1272, 9163, 309, 365, 6315, 1132, 353, 599, 30, 327, 875, 327, 365, 6315, 1132, 471, 315, 22352, 6, 578, 315, 2279,...
table_name = 'Table%d' % self.table_count
table_name = '%s%d' % (TableStylePrefix, self.table_count, )
def visit_table(self, node): #self.trace_visit_node(node) #ipshell('At visit_table') self.table_count += 1 table_name = 'Table%d' % self.table_count el1 = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s' % table_name, 'style:family': 'table', }) el1_1 = etree.SubElement(el1, 'style:table-properties', attrib={ #'style:width': '17.59cm', 'table:align': 'margins', }) el2 = etree.SubElement(self.current_element, 'table:table', attrib={ 'table:name': '%s' % table_name, 'table:style-name': '%s' % table_name, }) self.set_current_element(el2) self.current_table_style = el1 self.table_width = 0
d8b6d322f3002654ec1b2fae8db0c143d53ae12e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/d8b6d322f3002654ec1b2fae8db0c143d53ae12e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2121, 12, 2890, 16, 756, 4672, 468, 2890, 18, 5129, 67, 11658, 67, 2159, 12, 2159, 13, 468, 625, 10304, 2668, 861, 3757, 67, 2121, 6134, 365, 18, 2121, 67, 1883, 1011, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2121, 12, 2890, 16, 756, 4672, 468, 2890, 18, 5129, 67, 11658, 67, 2159, 12, 2159, 13, 468, 625, 10304, 2668, 861, 3757, 67, 2121, 6134, 365, 18, 2121, 67, 1883, 1011, 404, ...
if iconv_incs: if iconv_libs:
if platform not in ['darwin'] and iconv_incs is not None: if iconv_libs is not None:
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
82b299ba30852d56cb437aadd37ef1123041f964 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/82b299ba30852d56cb437aadd37ef1123041f964/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
str += self._seealso(doc.seealsos())
str += self._seealso(doc.seealsos(), uid)
def _module_to_html(self, uid): 'Return an HTML page for a Module' doc = self._docmap[uid] descr = doc.descr() if uid.is_package(): moduletype = 'package' else: moduletype = 'module' str = self._header(`uid`) str += self._navbar(moduletype, uid) if self._show_both: str += self._public_private_link(uid)
b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2978, 67, 869, 67, 2620, 12, 2890, 16, 4555, 4672, 296, 990, 392, 3982, 1363, 364, 279, 5924, 11, 997, 273, 365, 6315, 2434, 1458, 63, 1911, 65, 18426, 273, 997, 18, 28313, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2978, 67, 869, 67, 2620, 12, 2890, 16, 4555, 4672, 296, 990, 392, 3982, 1363, 364, 279, 5924, 11, 997, 273, 365, 6315, 2434, 1458, 63, 1911, 65, 18426, 273, 997, 18, 28313, 1435, ...
servers = self._extract_addresses(servers)
servers = self._extract_addresses_from_srv(servers)
def _detect_site(self, domain): """Detect our site using the netlogon protocol.""" self.m_logger.debug('detecting site') query = '_ldap._tcp.%s' % domain.lower() answer = self._dns_query(query, 'SRV') servers = self._order_dns_srv(answer) servers = self._extract_addresses(servers) replies = [] netlogon = NetlogonClient() for i in range(0, len(servers), 3): for addr in servers[i:i+3]: self.m_logger.debug('NetLogon query to %s' % addr[0]) netlogon.query(addr, domain) replies += netlogon.call() self.m_logger.debug('%d replies' % len(replies)) if replies >= 3: break if not replies: self.m_logger.error('could not detect site') return sites = {} for reply in replies: try: sites[reply.client_site] += 1 except KeyError: sites[reply.client_site] = 1 sites = [ (value, key) for key,value in sites.items() ] sites.sort() self.m_logger.debug('site detected as %s' % sites[-1][1]) return sites[0][1]
1f31875b375a727ea2ac5ba10ad373ec993c6c5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11970/1f31875b375a727ea2ac5ba10ad373ec993c6c5e/locate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16518, 67, 4256, 12, 2890, 16, 2461, 4672, 3536, 12081, 3134, 2834, 1450, 326, 2901, 1330, 265, 1771, 12123, 365, 18, 81, 67, 4901, 18, 4148, 2668, 16518, 310, 2834, 6134, 843, 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, 389, 16518, 67, 4256, 12, 2890, 16, 2461, 4672, 3536, 12081, 3134, 2834, 1450, 326, 2901, 1330, 265, 1771, 12123, 365, 18, 81, 67, 4901, 18, 4148, 2668, 16518, 310, 2834, 6134, 843, 273,...
self.rexec = rexec
self.rexec = rexec
def set_rexec(self, rexec):
ca6ae39a786f3d7535cba0f2aef10692eb750051 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ca6ae39a786f3d7535cba0f2aef10692eb750051/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 266, 92, 557, 12, 2890, 16, 28929, 557, 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, 444, 67, 266, 92, 557, 12, 2890, 16, 28929, 557, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
maximized = get_main_window_maximized()
maximized = self.get_main_window_maximized()
def build_window(self): Application.build_window(self) self.window.connect('save-dimensions', self.set_main_window_dimensions) self.window.connect('save-maximized', self.set_main_window_maximized)
596ff4987387ef2e9fc99901afde8c67d0894a50 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/596ff4987387ef2e9fc99901afde8c67d0894a50/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5668, 12, 2890, 4672, 4257, 18, 3510, 67, 5668, 12, 2890, 13, 365, 18, 5668, 18, 3612, 2668, 5688, 17, 14797, 2187, 365, 18, 542, 67, 5254, 67, 5668, 67, 14797, 13, 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, 1361, 67, 5668, 12, 2890, 4672, 4257, 18, 3510, 67, 5668, 12, 2890, 13, 365, 18, 5668, 18, 3612, 2668, 5688, 17, 14797, 2187, 365, 18, 542, 67, 5254, 67, 5668, 67, 14797, 13, 365, 18...
import nose nose.run(argv=["", "--with-nosexunit", "--source-folder=src", "--where=test/springpythontest", "--xml-report-folder=%s" % dir, "checkin"])
_run_nose(argv=["", "--with-nosexunit", "--source-folder=src", "--where=test/springpythontest", "--xml-report-folder=%s" % dir, "checkin"])
def test(dir): """ Run nose programmatically, so that it uses the same python version as this script uses Nose expects to receive a sys.argv, of which the first arg is the script path (usually nosetests). Since this isn't being run that way, a filler entry was created to satisfy the library's needs. """ if not os.path.exists(dir): os.makedirs(dir) import nose nose.run(argv=["", "--with-nosexunit", "--source-folder=src", "--where=test/springpythontest", "--xml-report-folder=%s" % dir, "checkin"])
6e01a029e4a83192652ef3ec835a46bcbbb8ef96 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7713/6e01a029e4a83192652ef3ec835a46bcbbb8ef96/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 1214, 4672, 3536, 1939, 1158, 307, 5402, 26500, 1230, 16, 1427, 716, 518, 4692, 326, 1967, 5790, 1177, 487, 333, 2728, 4692, 225, 423, 2584, 10999, 358, 6798, 279, 2589, 18, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 1214, 4672, 3536, 1939, 1158, 307, 5402, 26500, 1230, 16, 1427, 716, 518, 4692, 326, 1967, 5790, 1177, 487, 333, 2728, 4692, 225, 423, 2584, 10999, 358, 6798, 279, 2589, 18, 19...
mail = Mail(mfrom, mto, messageText, smtp_host=self.smtp_host, smtp_port=self.smtp_port, userid=self._smtp_userid, password=self._smtp_pass
if not isistance(messageText, email.MIMEText.MIMEText): message = email.message_from_string(messageText) else: message = messageText mail = Mail(mfrom, mto, message, smtp_host=self.smtp_host, smtp_port=self.smtp_port, userid=self._smtp_userid, password=self._smtp_pass
def __SYNC_send( self, mfrom, mto, messageText, debug=False): """Send the message """ mail = Mail(mfrom, mto, messageText, smtp_host=self.smtp_host, smtp_port=self.smtp_port, userid=self._smtp_userid, password=self._smtp_pass ) if debug: return mail else: mail.send()
c14e02c9d59300e97d0befc9cc4d44552c31cb2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/c14e02c9d59300e97d0befc9cc4d44552c31cb2e/SecureMailHost.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 25142, 67, 4661, 12, 365, 16, 312, 2080, 16, 312, 869, 16, 883, 1528, 16, 1198, 33, 8381, 4672, 3536, 3826, 326, 883, 3536, 309, 486, 353, 13145, 12, 2150, 1528, 16, 2699, 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, 1001, 25142, 67, 4661, 12, 365, 16, 312, 2080, 16, 312, 869, 16, 883, 1528, 16, 1198, 33, 8381, 4672, 3536, 3826, 326, 883, 3536, 309, 486, 353, 13145, 12, 2150, 1528, 16, 2699, 18, ...
sage: [ value, edges, [ setA, setB ]] = g.edge_connectivity(vertices=True) sage: print value
sage: [ value, edges, [ setA, setB ]] = g.edge_connectivity(vertices=True) sage: print value
def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT:
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, 3591, 67, 3612, 2818, 12, 2890, 16, 460, 67, 3700, 33, 5510, 16, 999, 67, 7126, 67, 5336, 33, 8381, 16, 6928, 33, 8381, 16, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3591, 67, 3612, 2818, 12, 2890, 16, 460, 67, 3700, 33, 5510, 16, 999, 67, 7126, 67, 5336, 33, 8381, 16, 6928, 33, 8381, 16, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, ...
def register(request, template=None):
def register(request, template='authopenid/complete.html'):
def register(request, template=None): """ register an openid. If user is already a member he can associate its openid with its account. A new account could also be created and automaticaly associated to the openid. url : /complete/ template : authopenid/complete.html """ if not template: template = 'authopenid/complete.html' is_redirect = False next = clean_next(request.GET.get('next')) openid_ = request.session.get('openid', None) if not openid_: return HttpResponseRedirect(reverse('user_signin') + next) nickname = openid_.sreg.get('nickname', '') email = openid_.sreg.get('email', '') form1 = OpenidRegisterForm(initial={ 'next': next, 'username': nickname, 'email': email, }) form2 = OpenidVerifyForm(initial={ 'next': next, 'username': nickname, }) if request.POST: just_completed = False if 'bnewaccount' in request.POST.keys(): form1 = OpenidRegisterForm(request.POST) if form1.is_valid(): next = clean_next(form1.cleaned_data.get('next')) is_redirect = True tmp_pwd = User.objects.make_random_password() user_ = User.objects.create_user(form1.cleaned_data['username'], form1.cleaned_data['email'], tmp_pwd) # make association with openid uassoc = UserAssociation(openid_url=str(openid_), user_id=user_.id) uassoc.save() # login user_.backend = "django.contrib.auth.backends.ModelBackend" login(request, user_) elif 'bverify' in request.POST.keys(): form2 = OpenidVerifyForm(request.POST) if form2.is_valid(): is_redirect = True next = clean_next(form2.cleaned_data.get('next')) user_ = form2.get_user() uassoc = UserAssociation(openid_url=str(openid_), user_id=user_.id) uassoc.save() login(request, user_) # redirect, can redirect only if forms are valid. if is_redirect: return HttpResponseRedirect(next) return render(template, { 'form1': form1, 'form2': form2, 'nickname': nickname, 'email': email }, context_instance=RequestContext(request))
c0c6ac4f7a9013b71b5aa4062a75f9831810b063 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5675/c0c6ac4f7a9013b71b5aa4062a75f9831810b063/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2293, 16, 1542, 2218, 1944, 20619, 19, 6226, 18, 2620, 11, 4672, 3536, 1744, 392, 21629, 18, 225, 971, 729, 353, 1818, 279, 3140, 3904, 848, 13251, 2097, 21629, 598, 2097, 2236...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2293, 16, 1542, 2218, 1944, 20619, 19, 6226, 18, 2620, 11, 4672, 3536, 1744, 392, 21629, 18, 225, 971, 729, 353, 1818, 279, 3140, 3904, 848, 13251, 2097, 21629, 598, 2097, 2236...
self.resp_body = resp_body
self.body = resp_body
def __init__(self, title, resp_code, check_cseq=True, include=[], exclude=[], cmds=[], resp_hdr=[], resp_body=None, expect=""): self.title = title self.cmds = cmds self.include = include self.exclude = exclude self.resp_code = resp_code self.resp_hdr = resp_hdr self.resp_body = resp_body self.expect = expect
b6a817fac5564b3f25a52568fd1e052f5736679e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1549/b6a817fac5564b3f25a52568fd1e052f5736679e/inc_sip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2077, 16, 1718, 67, 710, 16, 866, 67, 71, 5436, 33, 5510, 16, 2341, 22850, 6487, 4433, 22850, 6487, 13446, 22850, 6487, 1718, 67, 16587, 22850, 6487, 1718,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2077, 16, 1718, 67, 710, 16, 866, 67, 71, 5436, 33, 5510, 16, 2341, 22850, 6487, 4433, 22850, 6487, 13446, 22850, 6487, 1718, 67, 16587, 22850, 6487, 1718,...
self.delayDelete() self._deactivateDO()
if len(self._token2delayDeleteName) > 0: self.delayDelete() if len(self._token2delayDeleteName) > 0: self._deactivateDO()
def deleteOrDelay(self): if len(self._token2delayDeleteName) > 0: if not self._delayDeleted: self._delayDeleted = 1 # Object is delayDeleted. Clean up DistributedObject state, # remove from repository tables, so that we won't crash if # another instance of the same object gets generated while # this instance is still delayDeleted. messenger.send(self.getDelayDeleteEvent()) self.delayDelete() self._deactivateDO() else: self.disableAnnounceAndDelete()
08671872785fac53af05231e4176520f2bd52638 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/08671872785fac53af05231e4176520f2bd52638/DistributedObject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 1162, 6763, 12, 2890, 4672, 309, 562, 12, 2890, 6315, 2316, 22, 10790, 2613, 461, 13, 405, 374, 30, 309, 486, 365, 6315, 10790, 7977, 30, 365, 6315, 10790, 7977, 273, 404, 468, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 1162, 6763, 12, 2890, 4672, 309, 562, 12, 2890, 6315, 2316, 22, 10790, 2613, 461, 13, 405, 374, 30, 309, 486, 365, 6315, 10790, 7977, 30, 365, 6315, 10790, 7977, 273, 404, 468, 1...
PPATH=get_python_lib(1) PEXEC=os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
PPATH = get_python_lib(1) if os.path.islink(sys.executable): PEXEC = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) else: PEXEC = sys.executable
def InstallPanda(destdir="", prefix="/usr", outputdir="built"): if (not prefix.startswith("/")): prefix = "/" + prefix PPATH=get_python_lib(1) PEXEC=os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) oscmd("mkdir -p "+destdir+prefix+"/bin") oscmd("mkdir -p "+destdir+prefix+"/include") oscmd("mkdir -p "+destdir+prefix+"/share/panda3d") oscmd("mkdir -p "+destdir+prefix+"/share/panda3d/direct") oscmd("mkdir -p "+destdir+prefix+"/share/mime-info") oscmd("mkdir -p "+destdir+prefix+"/share/mime/packages") oscmd("mkdir -p "+destdir+prefix+"/share/application-registry") oscmd("mkdir -p "+destdir+prefix+"/share/applications") oscmd("mkdir -p "+destdir+prefix+libdir+"/panda3d") oscmd("mkdir -p "+destdir+PPATH) oscmd("mkdir -p "+destdir+"/etc/ld.so.conf.d") WriteFile(destdir+prefix+"/share/panda3d/direct/__init__.py", "") Configrc = ReadFile(outputdir+"/etc/Config.prc") Configrc = Configrc.replace("model-path $THIS_PRC_DIR/..", "model-path "+prefix+"/share/panda3d") WriteFile(destdir+"/etc/Config.prc", Configrc) oscmd("cp "+outputdir+"/etc/Confauto.prc "+destdir+"/etc/Confauto.prc") oscmd("cp -R "+outputdir+"/include "+destdir+prefix+"/include/panda3d") oscmd("cp -R direct/src/* "+destdir+prefix+"/share/panda3d/direct") oscmd("cp -R "+outputdir+"/pandac "+destdir+prefix+"/share/panda3d/pandac") oscmd("cp -R "+outputdir+"/models "+destdir+prefix+"/share/panda3d/models") oscmd("cp direct/src/ffi/panda3d.py "+destdir+prefix+"/share/panda3d/panda3d.py") if os.path.isdir("samples"): oscmd("cp -R samples "+destdir+prefix+"/share/panda3d/samples") if os.path.isdir(outputdir+"/Pmw"): oscmd("cp -R "+outputdir+"/Pmw "+destdir+prefix+"/share/panda3d/Pmw") if os.path.isdir(outputdir+"/plugins"): oscmd("cp -R "+outputdir+"/plugins "+destdir+prefix+"/share/panda3d/plugins") WriteMimeFile(destdir+prefix+"/share/mime-info/panda3d.mime", MIME_INFO) WriteKeysFile(destdir+prefix+"/share/mime-info/panda3d.keys", MIME_INFO) WriteMimeXMLFile(destdir+prefix+"/share/mime/packages/panda3d.xml", MIME_INFO) WriteApplicationsFile(destdir+prefix+"/share/application-registry/panda3d.applications", APP_INFO, MIME_INFO) oscmd("cp makepanda/pview.desktop "+destdir+prefix+"/share/applications/pview.desktop") oscmd("cp doc/LICENSE "+destdir+prefix+"/share/panda3d/LICENSE") oscmd("cp doc/LICENSE "+destdir+prefix+"/include/panda3d/LICENSE") oscmd("cp doc/ReleaseNotes "+destdir+prefix+"/share/panda3d/ReleaseNotes") oscmd("echo '"+prefix+libdir+"/panda3d'> "+destdir+"/etc/ld.so.conf.d/panda3d.conf") oscmd("echo '"+prefix+"/share/panda3d' > "+destdir+PPATH+"/panda3d.pth") oscmd("echo '"+prefix+libdir+"/panda3d'>> "+destdir+PPATH+"/panda3d.pth") oscmd("chmod +x "+destdir+"/etc/ld.so.conf.d/panda3d.conf") oscmd("ln -s "+PEXEC+" "+destdir+prefix+"/bin/ppython") oscmd("cp "+outputdir+"/bin/* "+destdir+prefix+"/bin/") for base in os.listdir(outputdir+"/lib"): if (not base.endswith(".a")): oscmd("cp -d "+outputdir+"/lib/"+base+" "+destdir+prefix+libdir+"/panda3d/"+base) # rpmlint doesn't like it if we compile pyc. #for base in os.listdir(destdir+prefix+"/share/panda3d/direct"): # if ((base != "extensions") and (base != "extensions_native")): # compileall.compile_dir(destdir+prefix+"/share/panda3d/direct/"+base) #compileall.compile_dir(destdir+prefix+"/share/panda3d/Pmw") DeleteCVS(destdir+prefix+"/include/panda3d") DeleteCVS(destdir+prefix+"/share/panda3d") # rpmlint doesn't like these files, for some reason. DeleteBuildFiles(destdir+prefix+"/share/panda3d") if (os.path.isfile(destdir+prefix+"/share/panda3d/direct/leveleditor/copyfiles.pl")): os.remove(destdir+prefix+"/share/panda3d/direct/leveleditor/copyfiles.pl")
26283cc78c4e7bcd80e07a268ec75389eb69840b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/26283cc78c4e7bcd80e07a268ec75389eb69840b/installpanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 52, 464, 69, 12, 10488, 1214, 1546, 3113, 1633, 1546, 19, 13640, 3113, 876, 1214, 1546, 12406, 6, 4672, 309, 261, 902, 1633, 18, 17514, 1918, 2932, 4898, 3719, 30, 1633, 273, 4016...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 52, 464, 69, 12, 10488, 1214, 1546, 3113, 1633, 1546, 19, 13640, 3113, 876, 1214, 1546, 12406, 6, 4672, 309, 261, 902, 1633, 18, 17514, 1918, 2932, 4898, 3719, 30, 1633, 273, 4016...
arg_emsg = 'Sound takes either 1 positional or 1 keywork argument'
arg_emsg = 'Sound takes either 1 positional or 1 keyword argument' try: mixer.Sound() except TypeError: self.assert_(str(geterror()) == arg_emsg) else: self.fail("no exception")
def get_bytes(snd): return snd.get_buffer().raw
cca350a787002043c7797ee595284c498d8edf04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/cca350a787002043c7797ee595284c498d8edf04/mixer_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3890, 12, 87, 4880, 4672, 327, 31158, 18, 588, 67, 4106, 7675, 1899, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 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, 336, 67, 3890, 12, 87, 4880, 4672, 327, 31158, 18, 588, 67, 4106, 7675, 1899, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if key not in self.cfg:
if key not in cfg:
def configure(self): try: self.cfg = self.ud.getSection('noip') except EC2DataRetrievalError: return
9318eb56e356ed43d46dfcb46c8a883c30dd2aa5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7645/9318eb56e356ed43d46dfcb46c8a883c30dd2aa5/noip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 4672, 775, 30, 365, 18, 7066, 273, 365, 18, 1100, 18, 588, 5285, 2668, 2135, 625, 6134, 1335, 7773, 22, 751, 27356, 668, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 4672, 775, 30, 365, 18, 7066, 273, 365, 18, 1100, 18, 588, 5285, 2668, 2135, 625, 6134, 1335, 7773, 22, 751, 27356, 668, 30, 327, 2, -100, -100, -100, -100, -100, -100,...
args = [opt] if not flag:
if flag: if value: args = [opt] else: args = [] else:
def _get_override(self, opt, name, svalue=None, flag=0): value = getattr(self.options, name) if value is None: return [] configroot = self.options.configroot if configroot is not None: for n, cn in self.options.names_list: if n == name and cn: v = configroot for p in cn.split("."): v = getattr(v, p, None) if v is None: break if v == value: # We didn't override anything return [] break args = [opt] if not flag: if svalue is None: svalue = str(value) args.append(svalue) return args
37e1b6be6fa2b41b27ea3ec552e43be1a8a0b1d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9782/37e1b6be6fa2b41b27ea3ec552e43be1a8a0b1d9/zdctl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 10601, 12, 2890, 16, 2153, 16, 508, 16, 272, 1132, 33, 7036, 16, 2982, 33, 20, 4672, 460, 273, 3869, 12, 2890, 18, 2116, 16, 508, 13, 309, 460, 353, 599, 30, 327, 537...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 10601, 12, 2890, 16, 2153, 16, 508, 16, 272, 1132, 33, 7036, 16, 2982, 33, 20, 4672, 460, 273, 3869, 12, 2890, 18, 2116, 16, 508, 13, 309, 460, 353, 599, 30, 327, 537...
total+=count created = statusDict.get('Created',0)
total += count created = statusDict.get( 'Created', 0 )
def getTransformationTaskStats(self,transName='',connection=False): """ Returns dictionary with number of jobs per status for the given production. """ connection = self.__getConnection(connection) if transName: res = self._getTransformationID(transName,connection=connection) if not res['OK']: gLogger.error("Failed to get ID for transformation",res['Message']) return res res = self.getCounters('TransformationTasks',['ExternalStatus'],{'TransformationID':res['Value']},connection=connection) else: res = self.getCounters('TransformationTasks',['ExternalStatus','TransformationID'],{},connection=connection) if not res['OK']: return res if not res['Value']: return S_ERROR('No records found') statusDict = {} total = 0 for attrDict,count in res['Value']: status = attrDict['ExternalStatus'] statusDict[status] = count total+=count created = statusDict.get('Created',0) statusDict['Created'] = total statusDict['Submitted'] = (total-created) return S_OK(statusDict)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 15292, 2174, 4195, 12, 2890, 16, 2338, 461, 2218, 2187, 4071, 33, 8381, 4672, 3536, 2860, 3880, 598, 1300, 434, 6550, 1534, 1267, 364, 326, 864, 12449, 18, 3536, 1459, 273, 365, 161...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15292, 2174, 4195, 12, 2890, 16, 2338, 461, 2218, 2187, 4071, 33, 8381, 4672, 3536, 2860, 3880, 598, 1300, 434, 6550, 1534, 1267, 364, 326, 864, 12449, 18, 3536, 1459, 273, 365, 161...
print 'mouseDown: upper'
def mouseDown(self, event): event_coords = event.x, event.y xcell, ycell = event.x / self.xsize - 1, 7 - (event.y / self.ysize - 1) loc = self.getLoc(event.x, event.y) if loc: piece = self.board[loc] print loc, piece if piece == None: print 'mouseDown: empty' self.selected = None elif piece.ishybrid(): img1, img2 = self.boardDrawn[loc] # check event.y more precisely threshold = (event.y - (7-ycell+1)*self.ysize) assert 0 <= threshold <= self.ysize threshold *= 3 if threshold < self.ysize: # upper chosen print 'mouseDown: upper' self.selected = (loc, piece.p2, ((img2, sub2(self.upperField(loc), event_coords)), )) elif threshold > 2*self.ysize: # lower chosen print 'mouseDown: lower' self.selected = (loc, piece.p1, ((img1, sub2(self.lowerField(loc), event_coords)), )) else: # both chosen print 'mouseDown: both' self.selected = (loc, piece, ((img1, sub2(self.lowerField(loc), event_coords)), (img2, sub2(self.upperField(loc), event_coords)))) else: # not hybrid print 'mouseDown: not hybrid' (img, ) = self.boardDrawn[loc] self.selected = (loc, piece, ((img, sub2(self.centerField(loc), event_coords)), )) else: print 'mouseDown: out of range' self.selected = None
62c88dc184b9451cbab757871822ad8127d8ecc6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5164/62c88dc184b9451cbab757871822ad8127d8ecc6/gboard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 4164, 12, 2890, 16, 871, 4672, 871, 67, 9076, 273, 871, 18, 92, 16, 871, 18, 93, 619, 3855, 16, 677, 3855, 273, 871, 18, 92, 342, 365, 18, 92, 1467, 300, 404, 16, 2371, 300, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 4164, 12, 2890, 16, 871, 4672, 871, 67, 9076, 273, 871, 18, 92, 16, 871, 18, 93, 619, 3855, 16, 677, 3855, 273, 871, 18, 92, 342, 365, 18, 92, 1467, 300, 404, 16, 2371, 300, ...
self.ok = wx.Button(self, wx.ID_OK)
if changing: message = _(u'Change Master Passw&ord') else: message = _(u'Pr&otect Passwords') self.ok = wx.Button(self, wx.ID_OK, message)
def __init__(self, changing, view, size=wx.DefaultSize, pos=wx.DefaultPosition, style=wx.DEFAULT_DIALOG_STYLE): """ constructor @param changing: Should be true if you are changing the master password. Otherwise you will be creating the master password. """ # Instead of calling wx.Dialog.__init__ we precreate the dialog # so we can set an extra style that must be set before # creation, and then we create the GUI dialog using the Create # method. pre = wx.PreDialog() self.view = view if changing: title = _(u'Change Master Password') else: title = _(u'Set Master Password') pre.Create(None, -1, title, pos, size, style)
1045d21bb69ccefdda66fd64d096e18194acc1b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/1045d21bb69ccefdda66fd64d096e18194acc1b0/MasterPassword.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 12770, 16, 1476, 16, 963, 33, 27226, 18, 1868, 1225, 16, 949, 33, 27226, 18, 1868, 2555, 16, 2154, 33, 27226, 18, 5280, 67, 2565, 18683, 67, 15066, 4672,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 12770, 16, 1476, 16, 963, 33, 27226, 18, 1868, 1225, 16, 949, 33, 27226, 18, 1868, 2555, 16, 2154, 33, 27226, 18, 5280, 67, 2565, 18683, 67, 15066, 4672,...
Sub(quality, "P_usedPhaseCount").text = "7" Sub(quality, "S_usedPhaseCount").text = "7" Sub(quality, "usedPhaseCount").text = "14" Sub(quality, "associatedPhaseCount").text = "14" Sub(quality, "associatedStationCount").text = "14"
Sub(quality, "P_usedPhaseCount").text = '%i' % self.threeDlocPCount Sub(quality, "S_usedPhaseCount").text = '%i' % self.threeDlocSCount Sub(quality, "usedPhaseCount").text = '%i' % (self.threeDlocPCount + self.threeDlocSCount) Sub(quality, "usedStationCount").text = '%i' % self.threeDlocUsedStationsCount Sub(quality, "associatedPhaseCount").text = '%i' % (self.threeDlocPCount + self.threeDlocSCount) Sub(quality, "associatedStationCount").text = '%i' % self.threeDlocUsedStationsCount
def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i in range(len(self.streams)): if self.dicts[i].has_key('P'): pick = Sub(xml, "pick") wave = Sub(pick, "waveform") wave.set("networkCode", self.streams[i][0].stats.network) wave.set("stationCode", self.streams[i][0].stats.station) wave.set("channelCode", self.streams[i][0].stats.channel) wave.set("locationCode", "") date = Sub(pick, "time") # prepare time of pick picktime = self.streams[i][0].stats.starttime picktime += (self.dicts[i]['P'] / self.streams[i][0].stats.sampling_rate) Sub(date, "value").text = (picktime.isoformat() + '.%06i' % picktime.microsecond) if self.dicts[i].has_key('PErr1') and self.dicts[i].has_key('PErr2'): temp = float(self.dicts[i].has_key('PErr2') - self.dicts[i].has_key('PErr1')) temp /= self.streams[i][0].stats.sampling_rate Sub(date, "uncertainty").text = str(temp) else: Sub(date, "uncertainty") Sub(pick, "phaseHint").text = "P" if self.dicts[i].has_key('POnset'): if self.dicts[i]['POnset'] == 'impulsive': Sub(pick, "onset").text = 'impulsive' elif self.dicts[i]['POnset'] == 'emergent': Sub(pick, "onset").text = 'emergent' else: Sub(pick, "onset") if self.dicts[i].has_key('PPol'): if self.dicts[i]['PPol'] == 'Up' or self.dicts[i]['PPol'] == 'PoorUp': Sub(pick, "polarity").text = 'positive' elif self.dicts[i]['PPol'] == 'Down' or self.dicts[i]['PPol'] == 'PoorDown': Sub(pick, "polarity").text = 'negative' else: Sub(pick, "polarity") if self.dicts[i].has_key('PWeight'): Sub(pick, "weight").text = '%i' % self.dicts[i]['PWeight'] else: Sub(pick, "weight") Sub(Sub(pick, "min_amp"), "value").text = "0.00000" #XXX what is min_amp??? Sub(pick, "phase_compu").text = "IPU0" Sub(Sub(pick, "phase_res"), "value").text = "0.17000" Sub(Sub(pick, "phase_weight"), "value").text = "1.00000" Sub(Sub(pick, "phase_delay"), "value").text = "0.00000" Sub(Sub(pick, "azimuth"), "value").text = "1.922043" Sub(Sub(pick, "incident"), "value").text = "96.00000" Sub(Sub(pick, "epi_dist"), "value").text = "44.938843" Sub(Sub(pick, "hyp_dist"), "value").text = "45.30929"
74f68db5096834aa7cf8785b28082e2c08e155f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/74f68db5096834aa7cf8785b28082e2c08e155f2/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8925, 40, 1333, 22, 4201, 12, 2890, 4672, 3536, 2860, 876, 434, 890, 72, 1829, 487, 2025, 585, 3536, 2025, 273, 225, 3010, 2932, 2575, 7923, 2592, 12, 1676, 12, 2902, 16, 315, 2575, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8925, 40, 1333, 22, 4201, 12, 2890, 4672, 3536, 2860, 876, 434, 890, 72, 1829, 487, 2025, 585, 3536, 2025, 273, 225, 3010, 2932, 2575, 7923, 2592, 12, 1676, 12, 2902, 16, 315, 2575, 67...
raise exceptions.Exception( _("no such handle %s") % handle)
raise exceptions.IndexError( _("No SMBIOS structure found with handle %s") % handle)
def getStructureByHandle(self, handle): cur = ctypes.POINTER(SmbiosStructure)() cur =_libsmbios_c.smbios_table_get_next_struct_by_handle( self._tableobj, cur, handle ) if not bool(cur): raise exceptions.Exception( _("no such handle %s") % handle) return cur.contents
bbacbb6956bc8829b39d091ca0d609c97edd215e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/40/bbacbb6956bc8829b39d091ca0d609c97edd215e/smbios.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18730, 858, 3259, 12, 2890, 16, 1640, 4672, 662, 273, 6983, 18, 2419, 9125, 12, 55, 1627, 7441, 6999, 13, 1435, 662, 273, 67, 21571, 1627, 7441, 67, 71, 18, 87, 1627, 7441, 67, 2121, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18730, 858, 3259, 12, 2890, 16, 1640, 4672, 662, 273, 6983, 18, 2419, 9125, 12, 55, 1627, 7441, 6999, 13, 1435, 662, 273, 67, 21571, 1627, 7441, 67, 71, 18, 87, 1627, 7441, 67, 2121, ...
title="O&range Widget",
title="Qt Orange Widget",
def __init__(
bab4a1297a9af00f4f88ffcb39bdc0d24b6e9c83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/bab4a1297a9af00f4f88ffcb39bdc0d24b6e9c83/OWWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def _blit(self, img, r): pos, size = r
def _blit(self, img, r): pos, size = r
def _blit(self, img, r): pos, size = r
3baa904cdd4dd10aa19295c591c9d5e7529a2962 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/3baa904cdd4dd10aa19295c591c9d5e7529a2962/directfbcanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3083, 305, 12, 2890, 16, 3774, 16, 436, 4672, 949, 16, 963, 273, 436, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3083, 305, 12, 2890, 16, 3774, 16, 436, 4672, 949, 16, 963, 273, 436, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.setDefaultValuesFromMetadata()
self._setDefaultValuesFromMetadata()
def resetModel(self): """ Reset the initial values to the states when the model was loaded into memory. """ self.setDefaultValuesFromMetadata()
994a49a3b1843315c806826b0822b035401a40c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/994a49a3b1843315c806826b0822b035401a40c0/jmi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 1488, 12, 2890, 4672, 3536, 7151, 326, 2172, 924, 358, 326, 5493, 1347, 326, 938, 1703, 4203, 1368, 3778, 18, 3536, 365, 6315, 542, 1868, 1972, 1265, 2277, 1435, 225, 2, 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, 2715, 1488, 12, 2890, 4672, 3536, 7151, 326, 2172, 924, 358, 326, 5493, 1347, 326, 938, 1703, 4203, 1368, 3778, 18, 3536, 365, 6315, 542, 1868, 1972, 1265, 2277, 1435, 225, 2, -100, -100...
1/0
1./0
def f(): 1/0
bb86314d227aa1b695b7c968a2cdf42146cacf29 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/bb86314d227aa1b695b7c968a2cdf42146cacf29/test_profilehooks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 13332, 404, 19, 20, 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, 1652, 284, 13332, 404, 19, 20, 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...
def test_build_directory__debug(self): e = MockExecutive(output="debug") c = config.Config(e) self.assertEqual(c.build_directory('Debug'), 'debug')
Returns the value set by 'set-webkit-configuration', or "Release" if that has not been set. This mirrors the logic in webkitdirs.pm.""" if not self._default_configuration: self._default_configuration = self._determine_configuration() if not self._default_configuration: self._default_configuration = 'Release' if self._default_configuration not in self._FLAGS_FROM_CONFIGURATIONS: _log.warn("Configuration \"%s\" is not a recognized value.\n" % self._default_configuration) _log.warn("Scripts may fail. " "See 'set-webkit-configuration --help'.") return self._default_configuration
def test_build_directory__debug(self): e = MockExecutive(output="debug") c = config.Config(e) self.assertEqual(c.build_directory('Debug'), 'debug')
25feeb24a1118a6fb28d036358303ac956f0d038 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/25feeb24a1118a6fb28d036358303ac956f0d038/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3510, 67, 5149, 972, 4148, 12, 2890, 4672, 425, 273, 7867, 1905, 322, 688, 12, 2844, 1546, 4148, 7923, 276, 273, 642, 18, 809, 12, 73, 13, 365, 18, 11231, 5812, 12, 71, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3510, 67, 5149, 972, 4148, 12, 2890, 4672, 425, 273, 7867, 1905, 322, 688, 12, 2844, 1546, 4148, 7923, 276, 273, 642, 18, 809, 12, 73, 13, 365, 18, 11231, 5812, 12, 71, 18,...
if config.has_section("input"): config.set("input", ifo.lower() + "-segments", "../segments/" + segFile)
def findSegmentsToAnalyze(config,ifo,generate_segments=True,\ use_available_data=False,data_quality_vetoes=False): """ generate segments for the given ifo @param ifo : name of the ifo @param config : the configParser object with analysis details @param generate_segments: whether the segment files should be generated @param use_available_data: restrict segments to data which actually available @param data_quality_vetoes: generate the cat2,3,4 DQ veto segments """ # file names segFile = ifo + "-SELECTED_SEGS.txt" missedFile = ifo + "-MISSED_SEGS.txt" dqSegFile = ifo + "-DQ_SEGMENTS.txt" if config.has_section("input"): config.set("input", ifo.lower() + "-segments", "../segments/" + segFile) if generate_segments: print "Generating science segments for " + ifo + " ...", sys.stdout.flush() sciSegFile = science_segments(ifo, config, generate_segments) if generate_segments: sciSegs = segmentsUtils.fromsegwizard(file(sciSegFile)).coalesce() print " done." # download the dq segments to generate the veto files if generate_segments: # XXX FIXME:hard coded path to get the dq-segments from: dq_url_pattern = \ "http://ldas-cit.ligo.caltech.edu/segments/S5/%s/dq_segments.txt" print "Downloading the latest daily dump of segment database to " \ + dqSegFile + " ...", sys.stdout.flush() dqSegFile, info = urllib.urlretrieve(dq_url_pattern % ifo, dqSegFile) print "done" print "Generating cat 1 veto segments for " + ifo + " ...", sys.stdout.flush() vetoFiles = veto_segments(ifo, config, sciSegFile, dqSegFile, [1], \ generate_segments ) print "done" # remove cat 1 veto times vetoSegs = segmentsUtils.fromsegwizard(open(vetoFiles[1])).coalesce() sciSegs = sciSegs.__and__(vetoSegs.__invert__()) if use_available_data: dfSegs = datafind_segments(ifo, config) analyzedSegs = sciSegs.__and__(dfSegs) missedSegs = sciSegs.__and__(dfSegs.__invert__()) segmentsUtils.tosegwizard(file(missedFile,"w"), missedSegs) print "Writing " + ifo + " segments which cannot be analyzed to file " \ + missedFile print "Not analyzing %d s, representing %.2f percent of time" % \ (missedSegs.__abs__(), 100. * missedSegs.__abs__() / analyzedSegs.__abs__() ) else: analyzedSegs = sciSegs segmentsUtils.tosegwizard(file(segFile,"w"), analyzedSegs) print "Writing " + ifo + " segments of total time " + \ str(analyzedSegs.__abs__()) + "s to file: " + segFile print "done" if data_quality_vetoes: print "Generating veto segments for " + ifo + "..." sys.stdout.flush() dqVetoes = veto_segments(ifo, config, segFile, dqSegFile, [2,3,4], data_quality_vetoes ) if data_quality_vetoes: print "done" return tuple([segFile, dqVetoes])
4d5bc7d20ce7aa2ca87c3893583c4b5798a2d5bf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/4d5bc7d20ce7aa2ca87c3893583c4b5798a2d5bf/inspiralutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 7946, 774, 31984, 12, 1425, 16, 20299, 16, 7163, 67, 12838, 33, 5510, 17211, 999, 67, 5699, 67, 892, 33, 8381, 16, 892, 67, 16495, 67, 90, 11453, 281, 33, 8381, 4672, 3536, 2103,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 7946, 774, 31984, 12, 1425, 16, 20299, 16, 7163, 67, 12838, 33, 5510, 17211, 999, 67, 5699, 67, 892, 33, 8381, 16, 892, 67, 16495, 67, 90, 11453, 281, 33, 8381, 4672, 3536, 2103,...
if myf.has_key('casa') and myf['casa'].has_key('helpers') and myf['casa']['helpers'].has_key('viewer'):
if type(myf) == dict and myf.has_key('casa') and type(myf['casa']) == dict and myf['casa'].has_key('helpers') \ and type(myf['casa']['helpers']) == dict and myf['casa']['helpers'].has_key('viewer'):
def __launch( self ):
77393ac9c9066879098df9a0aae15adf5ec67797 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/77393ac9c9066879098df9a0aae15adf5ec67797/viewertool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 20738, 12, 365, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 20738, 12, 365, 262, 30, 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...
'%.2f' % nice_stats[node_type]['percent_documented'], '%.2f' % nice_stats[node_type]['percent_badname'])
nice_stats[node_type].get('percent_documented', '0'), nice_stats[node_type].get('percent_badname', '0'))
def report_by_type_stats(sect, stats, old_stats): """make a report of * percentage of different types documented * percentage of different types with a bad name """ # percentage of different types documented and/or with a bad name nice_stats = {} for node_type in ('module', 'class', 'method', 'function'): nice_stats[node_type] = {} total = stats[node_type] if total == 0: doc_percent = 0 badname_percent = 0 else: documented = total - stats['undocumented_'+node_type] doc_percent = float((documented)*100) / total badname_percent = (float((stats['badname_'+node_type])*100) / total) nice_stats[node_type]['percent_documented'] = doc_percent nice_stats[node_type]['percent_badname'] = badname_percent lines = ('type', 'number', 'old number', 'difference', '%documented', '%badname') for node_type in ('module', 'class', 'method', 'function'): new = stats[node_type] old = old_stats.get(node_type, None) if old is not None: diff_str = diff_string(old, new) else: old, diff_str = 'NC', 'NC' lines += (node_type, str(new), str(old), diff_str, '%.2f' % nice_stats[node_type]['percent_documented'], '%.2f' % nice_stats[node_type]['percent_badname']) sect.append(Table(children=lines, cols=6, rheaders=1))
014473260689ff2b0e04fc91992adce3d66cfd93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/928/014473260689ff2b0e04fc91992adce3d66cfd93/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 1637, 67, 723, 67, 5296, 12, 5709, 16, 3177, 16, 1592, 67, 5296, 4672, 3536, 6540, 279, 2605, 434, 225, 380, 11622, 434, 3775, 1953, 23051, 380, 11622, 434, 3775, 1953, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 1637, 67, 723, 67, 5296, 12, 5709, 16, 3177, 16, 1592, 67, 5296, 4672, 3536, 6540, 279, 2605, 434, 225, 380, 11622, 434, 3775, 1953, 23051, 380, 11622, 434, 3775, 1953, 598, ...
import os,sys
import os,sys,copy
# dlltool --dllname python15.dll --def python15.def \
9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 2398, 302, 2906, 6738, 1493, 27670, 529, 5790, 3600, 18, 27670, 1493, 536, 5790, 3600, 18, 536, 521, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 2398, 302, 2906, 6738, 1493, 27670, 529, 5790, 3600, 18, 27670, 1493, 536, 5790, 3600, 18, 536, 521, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
old = url.byClean(clean)
try: old = url.select(url.q.clean == clean)[0] except: raise SQLObjectNotFound
def response(self, nick, args, **kwargs): nick = nick.lower() chan = kwargs['channel'].lower() addressed = kwargs['addressed'] message = args[0]
576e5bfe765ffe248fe628b59b6ba83b30965bfb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10942/576e5bfe765ffe248fe628b59b6ba83b30965bfb/memebot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 766, 12, 2890, 16, 10909, 16, 833, 16, 2826, 4333, 4672, 10909, 273, 10909, 18, 8167, 1435, 3861, 273, 1205, 3292, 4327, 29489, 8167, 1435, 527, 4638, 273, 1205, 3292, 1289, 4638, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 766, 12, 2890, 16, 10909, 16, 833, 16, 2826, 4333, 4672, 10909, 273, 10909, 18, 8167, 1435, 3861, 273, 1205, 3292, 4327, 29489, 8167, 1435, 527, 4638, 273, 1205, 3292, 1289, 4638, 3546, ...
- An iterator through a list of invertible residues modulo self and modulo the group generated by the given units, i.e. a list of elements in the ring of integers `R`represnting the elements of (R/self)^*/U, where U is the subgroup of (R/self)^* generated by the given units.
- An iterator through a list of representatives for the invertible residues modulo self and modulo the group generated by ``subgp_gens``, i.e. a list of elements in the ring of integers `R` representing the elements of `(R/I)^*/U`, where `I` is this ideal and `U` is the subgroup of `(R/I)^*` generated by ``subgp_gens``.
def invertible_residues_mod_units(self, units=[], reduce=True): """ Returns a iterator through a list of invertible residues modulo this integral ideal and modulo the group generated by the given units.
d0ab72dbf17c21c4fbc66f87d618d5a5ad1469d7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d0ab72dbf17c21c4fbc66f87d618d5a5ad1469d7/number_field_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9848, 1523, 67, 15567, 3610, 67, 1711, 67, 7705, 12, 2890, 16, 4971, 22850, 6487, 5459, 33, 5510, 4672, 3536, 2860, 279, 2775, 3059, 279, 666, 434, 9848, 1523, 25435, 26109, 333, 21423, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9848, 1523, 67, 15567, 3610, 67, 1711, 67, 7705, 12, 2890, 16, 4971, 22850, 6487, 5459, 33, 5510, 4672, 3536, 2860, 279, 2775, 3059, 279, 666, 434, 9848, 1523, 25435, 26109, 333, 21423, ...
s.putS(faMap, dims, org, i2r, 'fa')
tmp= 'fa_' + dateT s.putS(faMap, dims, org, i2r, tmp) if traceEnabled: trMap = trMap.swapaxes(2,0) tmp= 'trace_' + dateT s.putS(trMap, dims, org, i2r, tmp) if modeEnabled: moMap = moMap.swapaxes(2,0) tmp= 'mode_' + dateT s.putS(moMap, dims, org, i2r, tmp)
def pipeline(self, data):
ceadca5dbd9521ee74d7149cac4f8ecaae8eecbc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12580/ceadca5dbd9521ee74d7149cac4f8ecaae8eecbc/PyPipelineServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5873, 12, 2890, 16, 501, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5873, 12, 2890, 16, 501, 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...
module.__name__+'.test_'+short_module_name, f, test_file,('.py', 'r', 1))
module.__name__+'.test_'+short_module_name+pref, f, test_file+pref,('.py', 'r', 1))
def _get_module_tests(self,module,level): mstr = self._module_str d,f = os.path.split(module.__file__)
81d8c691f1da9cd488ab381e85218c42c42d3ba6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/81d8c691f1da9cd488ab381e85218c42c42d3ba6/testing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2978, 67, 16341, 12, 2890, 16, 2978, 16, 2815, 4672, 312, 701, 273, 365, 6315, 2978, 67, 701, 302, 16, 74, 273, 1140, 18, 803, 18, 4939, 12, 2978, 16186, 768, 972, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2978, 67, 16341, 12, 2890, 16, 2978, 16, 2815, 4672, 312, 701, 273, 365, 6315, 2978, 67, 701, 302, 16, 74, 273, 1140, 18, 803, 18, 4939, 12, 2978, 16186, 768, 972, 13, ...
>>> dump_tokens("x = 0L") NAME 'x' (1, 0) (1, 1) OP '=' (1, 2) (1, 3) NUMBER '0L' (1, 4) (1, 6)
>>> dump_tokens("x = 0") NAME 'x' (1, 0) (1, 1) OP '=' (1, 2) (1, 3) NUMBER '0' (1, 4) (1, 5)
... " def y(m): # A whitespace after the colon\\n"
1fbae9878cfa20d661d49e29e47c6085f32923a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/1fbae9878cfa20d661d49e29e47c6085f32923a3/test_tokenize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 6647, 315, 225, 1652, 677, 12, 81, 4672, 468, 432, 7983, 1839, 326, 13336, 1695, 82, 6, 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, 1372, 6647, 315, 225, 1652, 677, 12, 81, 4672, 468, 432, 7983, 1839, 326, 13336, 1695, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def _parse_query_value_range(self, name, value, value_no):
def _parse_query_value_range(self, name, info, value):
def _parse_query_value_range(self, name, value, value_no): if len(value) != 2: raise TypeError( 'Only tuples of size 2 have a defined meaning. ' 'Did you mean to pass a list instead?')
f3d3e1ecf17aceb7cbdf29b0ef14a7c970db14f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9394/f3d3e1ecf17aceb7cbdf29b0ef14a7c970db14f3/indexstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 2271, 67, 1132, 67, 3676, 12, 2890, 16, 508, 16, 1123, 16, 460, 4672, 309, 562, 12, 1132, 13, 480, 576, 30, 1002, 3580, 12, 296, 3386, 10384, 434, 963, 576, 1240, 279,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 2271, 67, 1132, 67, 3676, 12, 2890, 16, 508, 16, 1123, 16, 460, 4672, 309, 562, 12, 1132, 13, 480, 576, 30, 1002, 3580, 12, 296, 3386, 10384, 434, 963, 576, 1240, 279,...
return self.connection.identity
return self.connection().identity
def __unicode__(self): return self.connection.identity
51b72d5de89650bf1c3b968529584a42d23364c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/51b72d5de89650bf1c3b968529584a42d23364c2/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9124, 972, 12, 2890, 4672, 327, 365, 18, 4071, 7675, 10781, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1001, 9124, 972, 12, 2890, 4672, 327, 365, 18, 4071, 7675, 10781, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
iq.query.addElement("error")["code"] = "405"
e = iq.addElement("error") e["code"] = "405" e["type"] = "cancel" c = e.addElement("condition") c["xmlns"] = "urn:ietf:params:xml:ns:xmpp-stanzas" c.addElement("not-allowed")
def onActivateStream(self, iq): sid = hashSID(iq.query["sid"], iq["from"], str(iq.query.activate))
210c80bbc412bb8a329b96ed20bd3411bfc2e5af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3999/210c80bbc412bb8a329b96ed20bd3411bfc2e5af/proxy65.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 21370, 1228, 12, 2890, 16, 24288, 4672, 7348, 273, 1651, 30287, 12, 18638, 18, 2271, 9614, 7453, 6, 6487, 24288, 9614, 2080, 6, 6487, 609, 12, 18638, 18, 2271, 18, 10014, 3719, 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, 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, 21370, 1228, 12, 2890, 16, 24288, 4672, 7348, 273, 1651, 30287, 12, 18638, 18, 2271, 9614, 7453, 6, 6487, 24288, 9614, 2080, 6, 6487, 609, 12, 18638, 18, 2271, 18, 10014, 3719, 2, ...
interval = int(lines.pop(0).split()[1])
try: interval = int(lines.pop(0).split()[1]) except: interval = 0
def send_handshake(self): # construct url url = "http://post.audioscrobbler.com/?hs=true&p=%s&c=%s&v=%s&u=%s" % ( self.PROTOCOL_VERSION, self.CLIENT, self.PLUGIN_VERSION, self.username ) print "Sending handshake to Audioscrobbler."
6e4212ffedef737cf3136bb4edfb23f0dcd6c108 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/6e4212ffedef737cf3136bb4edfb23f0dcd6c108/qlscrobbler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2349, 7478, 12, 2890, 4672, 468, 4872, 880, 880, 273, 315, 2505, 2207, 2767, 18, 24901, 7441, 71, 303, 9897, 749, 18, 832, 23239, 4487, 33, 3767, 10, 84, 5095, 87, 10, 71, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2349, 7478, 12, 2890, 4672, 468, 4872, 880, 880, 273, 315, 2505, 2207, 2767, 18, 24901, 7441, 71, 303, 9897, 749, 18, 832, 23239, 4487, 33, 3767, 10, 84, 5095, 87, 10, 71, ...
raise EPG_TIME_EXC
tval = timestr tz = str(-time.timezone/3600)
def timestr2secs_utc(str): # This is either something like 'EDT', or '+1' try: tval, tz = str.split() except ValueError: # The time value couldn't be decoded raise EPG_TIME_EXC if tz == 'CET': tz='+1' # Is it the '+1' format? if tz[0] == '+' or tz[0] == '-': tmTuple = ( int(tval[0:4]), int(tval[4:6]), int(tval[6:8]), int(tval[8:10]), int(tval[10:12]), 0, -1, -1, -1 ) secs = calendar.timegm( tmTuple ) adj_neg = int(tz) >= 0 try: min = int(tz[3:5]) except ValueError: # sometimes the mins are missing :-( min = 0 adj_secs = int(tz[1:3])*3600+ min*60 if adj_neg: secs -= adj_secs else: secs += adj_secs else: # No, use the regular conversion ## WARNING! BUG HERE! # The line below is incorrect; the strptime.strptime function doesn't # handle time zones. There is no obvious function that does. Therefore # this bug is left in for someone else to solve. try: secs = time.mktime(strptime.strptime(str, xmltv.date_format)) except ValueError: str = str.replace('EST', '') secs = time.mktime(strptime.strptime(str, xmltv.date_format)) return secs
9c727b3ec8228c31e68fbae72bcfc1e4784edb28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/9c727b3ec8228c31e68fbae72bcfc1e4784edb28/epg_xmltv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4124, 313, 22, 21317, 67, 17892, 12, 701, 4672, 468, 1220, 353, 3344, 5943, 3007, 296, 2056, 56, 2187, 578, 15126, 21, 11, 775, 30, 268, 1125, 16, 6016, 273, 609, 18, 4939, 1435, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4124, 313, 22, 21317, 67, 17892, 12, 701, 4672, 468, 1220, 353, 3344, 5943, 3007, 296, 2056, 56, 2187, 578, 15126, 21, 11, 775, 30, 268, 1125, 16, 6016, 273, 609, 18, 4939, 1435, 1335,...
html = html.replace('\n',' ')
def html2plaintext(html, body_id=None, encoding='utf-8'): ## (c) Fry-IT, www.fry-it.com, 2007 ## <peter@fry-it.com> ## download here: http://www.peterbe.com/plog/html2plaintext """ from an HTML text, convert the HTML to plain text. If @body_id is provided then this is the tag where the body (not necessarily <body>) starts. """ html = ustr(html) try: from BeautifulSoup import BeautifulSoup, SoupStrainer, Comment except: return html urls = [] if body_id is not None: strainer = SoupStrainer(id=body_id) else: strainer = SoupStrainer('body') soup = BeautifulSoup(html, parseOnlyThese=strainer, fromEncoding=encoding) for link in soup.findAll('a'): title = link.renderContents() for url in [x[1] for x in link.attrs if x[0]=='href']: urls.append(dict(url=ustr(url), tag=ustr(link), title=ustr(title))) html = ustr(soup.__str__()) url_index = [] i = 0 for d in urls: if d['title'] == d['url'] or 'http://'+d['title'] == d['url']: html = html.replace(d['tag'], d['url']) else: i += 1 html = html.replace(d['tag'], '%s [%s]' % (d['title'], i)) url_index.append(d['url']) html = html.replace('<strong>','*').replace('</strong>','*') html = html.replace('<b>','*').replace('</b>','*') html = html.replace('<h3>','*').replace('</h3>','*') html = html.replace('<h2>','**').replace('</h2>','**') html = html.replace('<h1>','**').replace('</h1>','**') html = html.replace('<em>','/').replace('</em>','/') # the only line breaks we respect is those of ending tags and # breaks html = html.replace('\n',' ') html = html.replace('<br>', '\n') html = html.replace('<tr>', '\n') html = html.replace('</p>', '\n\n') html = re.sub('<br\s*/>', '\n', html) html = html.replace(' ' * 2, ' ') # for all other tags we failed to clean up, just remove then and # complain about them on the stderr def desperate_fixer(g): #print >>sys.stderr, "failed to clean up %s" % str(g.group()) return ' ' html = re.sub('<.*?>', desperate_fixer, html) # lstrip all lines html = '\n'.join([x.lstrip() for x in html.splitlines()]) for i, url in enumerate(url_index): if i == 0: html += '\n\n' html += ustr('[%s] %s\n') % (i+1, url) return html
81e3a72e9a5bd4c211a4ee8f56e17c4bdc12bb4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/81e3a72e9a5bd4c211a4ee8f56e17c4bdc12bb4c/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 22, 412, 10133, 12, 2620, 16, 1417, 67, 350, 33, 7036, 16, 2688, 2218, 3158, 17, 28, 11, 4672, 7541, 261, 71, 13, 478, 1176, 17, 1285, 16, 8765, 18, 74, 1176, 17, 305, 18, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 22, 412, 10133, 12, 2620, 16, 1417, 67, 350, 33, 7036, 16, 2688, 2218, 3158, 17, 28, 11, 4672, 7541, 261, 71, 13, 478, 1176, 17, 1285, 16, 8765, 18, 74, 1176, 17, 305, 18, 83...
sage: print T1 [ 0 -1 3 1] [-1 1 0 2]
sage: T1 [ 0 2 -1 1] [-1 0 1 3] [ 3 -1 0 2]
def alternating_group_bitrade_generators(m): """ Construct generators a, b, c for the alternating group on 3m+1 points, such that a*b*c = 1. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: a, b, c, G = alternating_group_bitrade_generators(1) ((1,2,3), (1,4,2), (2,4,3), Permutation Group with generators [(1,2,3), (1,4,2)]) sage: a*b*c () sage: (T1, T2) = bitrade_from_group(a, b, c, G) sage: print T1 [ 0 -1 3 1] [-1 1 0 2] [ 1 3 2 -1] [ 2 0 -1 3] sage: print T2 [ 1 -1 0 3] [-1 0 2 1] [ 2 1 3 -1] [ 0 3 -1 2] """ assert m >= 1 a = tuple(range(1, 2*m+1 + 1)) b = tuple(range(m+1, 0, -1) + range(2*m+2, 3*m+1 + 1)) a = PermutationGroupElement(a) b = PermutationGroupElement(b) c = PermutationGroupElement((a*b)**(-1)) G = PermutationGroup([a, b]) return (a, b, c, G)
0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6416, 1776, 67, 1655, 67, 3682, 354, 323, 67, 25959, 12, 81, 4672, 3536, 14291, 13327, 279, 16, 324, 16, 276, 364, 326, 6416, 1776, 1041, 603, 890, 81, 15, 21, 3143, 16, 4123, 716, 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, 6416, 1776, 67, 1655, 67, 3682, 354, 323, 67, 25959, 12, 81, 4672, 3536, 14291, 13327, 279, 16, 324, 16, 276, 364, 326, 6416, 1776, 1041, 603, 890, 81, 15, 21, 3143, 16, 4123, 716, 2...
result = self.getTransformation(name) if not res['OK']: return S_ERROR("Transformation is not found") transID = result['Value']['TransID'] fids = self.__getFileIDsForLfns(lfns).keys() if fids: s_fids = string.join(fids,",") req = "UPDATE T_"+str(transID)+" SET FileSE='"+se+"' WHERE FileID IN ( "+ \ s_fids+" ) " print req result = self._update(req) return result return S_ERROR('Files not found') def setFileStatusForTransformation(self,name,status,lfns):
res = self.getTransformation(transName) if not res['OK']: return res transID = res['Value']['TransID'] fileIDs = self.__getFileIDsForLfns(lfns).keys() if not fileIDs: return S_ERROR('TransformationDB.setFileSEForTransformation: No files found.') else: req = "UPDATE T_%s SET UsedSE='%s' WHERE FileID IN (%s);" % (transID,se,intListToString(fileIDs)) return self._update(req) def setFileStatusForTransformation(self,transName,status,lfns):
def setFileSEForTransformation(self,name,se,lfns): """ Set file SE for the given transformation identified by transID for files in the list of lfns """
d1afb271a8b0ccf92b67dfa3afc748418f55f0ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/d1afb271a8b0ccf92b67dfa3afc748418f55f0ce/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19658, 1090, 1290, 15292, 12, 2890, 16, 529, 16, 307, 16, 20850, 2387, 4672, 3536, 1000, 585, 3174, 364, 326, 864, 8620, 9283, 635, 906, 734, 364, 1390, 316, 326, 666, 434, 18594, 2387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19658, 1090, 1290, 15292, 12, 2890, 16, 529, 16, 307, 16, 20850, 2387, 4672, 3536, 1000, 585, 3174, 364, 326, 864, 8620, 9283, 635, 906, 734, 364, 1390, 316, 326, 666, 434, 18594, 2387, ...
del self.unapplied[self.unapplied.index(pn)]
if pn in self.hidden: x = self.hidden else: x = self.unapplied del x[x.index(pn)]
def push_patch(self, pn, iw = None): """Attempt to push the named patch. If this results in conflicts, halts the transaction. If index+worktree are given, spill any conflicts to them.""" orig_cd = self.patches[pn].data cd = orig_cd.set_committer(None) s = ['', ' (empty)'][cd.is_nochange()] oldparent = cd.parent cd = cd.set_parent(self.__head) base = oldparent.data.tree ours = cd.parent.data.tree theirs = cd.tree tree, self.temp_index_tree = self.temp_index.merge( base, ours, theirs, self.temp_index_tree) merge_conflict = False if not tree: if iw == None: self.__halt('%s does not apply cleanly' % pn) try: self.__checkout(ours, iw) except git.CheckoutException: self.__halt('Index/worktree dirty') try: iw.merge(base, ours, theirs) tree = iw.index.write_tree() self.__current_tree = tree s = ' (modified)' except git.MergeConflictException: tree = ours merge_conflict = True s = ' (conflict)' except git.MergeException, e: self.__halt(str(e)) cd = cd.set_tree(tree) if any(getattr(cd, a) != getattr(orig_cd, a) for a in ['parent', 'tree', 'author', 'message']): self.patches[pn] = self.__stack.repository.commit(cd) else: s = ' (unmodified)' del self.unapplied[self.unapplied.index(pn)] self.applied.append(pn) out.info('Pushed %s%s' % (pn, s)) if merge_conflict: # We've just caused conflicts, so we must allow them in # the final checkout. self.__allow_conflicts = lambda trans: True
dcd2e3dae5143447dae09c2953dc6fae29a31794 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12366/dcd2e3dae5143447dae09c2953dc6fae29a31794/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 67, 2272, 12, 2890, 16, 11059, 16, 25522, 273, 599, 4672, 3536, 7744, 358, 1817, 326, 4141, 4729, 18, 971, 333, 1686, 316, 14450, 16, 18389, 87, 326, 2492, 18, 971, 770, 15, 1252...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 67, 2272, 12, 2890, 16, 11059, 16, 25522, 273, 599, 4672, 3536, 7744, 358, 1817, 326, 4141, 4729, 18, 971, 333, 1686, 316, 14450, 16, 18389, 87, 326, 2492, 18, 971, 770, 15, 1252...
offset += result.getLength()
offset += l
def testRealign(self): """test realignment.""" mali, seqs = self.constructMali() v = AlignandumVector() seqs = [ "IIACDIIEFG" , "IAILCDEFGI" , "KALKCDEFGK" , ] for x in seqs: v.append( makeSequence(x) ) counts = mali.getGapCounts( v, AggCount ) ma = makeMultipleAlignatorSimple( makeAlignatorDPFull( ALIGNMENT_LOCAL, 0, 0 ) ) map_old2new = makeAlignmentVector() offset = 0 fragments = [] for col in range(len(counts)): if counts[col] > 1: print "realignment of column", col, counts[col] to_align_seqs, to_align_parts, to_align_dump = StringVector(), [], [] for s in range(len(seqs)): ali = mali.getRow( s ) y = col - 1 while y >= 0 and ali.mapRowToCol( y ) < 0: y -= 1 if y < 0: start = 0 else: start = ali.mapRowToCol( y ) + 1 if col == mali.getLength(): end = len(seqs[s]) else: end = ali.mapRowToCol( col ) to_align_seqs.append( seqs[s][start:end] ) to_align_dump.append( seqs[s][start:end] ) to_align_parts.append( (start, end ) ) v[s].useSegment( start, end ) print "to_align=", to_align_parts, to_align_seqs, to_align_dump result = makeMultAlignment() ma.align( result, v ) print "partial alignment\n", str(MultAlignmentFormatPlain( result, v ) )
0c2849879addbe35983ed4ea29681eb835dfd701 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8012/0c2849879addbe35983ed4ea29681eb835dfd701/test_MultAlignment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6955, 724, 12, 2890, 4672, 3536, 3813, 2863, 3515, 12123, 312, 18083, 16, 19472, 273, 365, 18, 10062, 49, 18083, 1435, 331, 273, 19317, 464, 379, 5018, 1435, 19472, 273, 306, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6955, 724, 12, 2890, 4672, 3536, 3813, 2863, 3515, 12123, 312, 18083, 16, 19472, 273, 365, 18, 10062, 49, 18083, 1435, 331, 273, 19317, 464, 379, 5018, 1435, 19472, 273, 306, 315, ...
log.log( "<eddieElvin>eddieElvin.notify(), notify failed: %s, %s, %s." % (e[0], e[1], tb), 3 )
log.log( "<eddieElvin4>eddieElvin.notify(), notify failed: %s, %s, %s." % (e[0], e[1], tb), 3 )
def notify(self, msg): """Send an Elvin notification. msg must be a dictionary."""
aa32b1c20f46510b6908631b429ef7410713743a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/aa32b1c20f46510b6908631b429ef7410713743a/eddieElvin4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 2890, 16, 1234, 4672, 3536, 3826, 392, 512, 3070, 267, 3851, 18, 225, 1234, 1297, 506, 279, 3880, 12123, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5066, 12, 2890, 16, 1234, 4672, 3536, 3826, 392, 512, 3070, 267, 3851, 18, 225, 1234, 1297, 506, 279, 3880, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
""" Get metadata for the directory usage: get metadata <directory>
""" Get metadata definitions and values usage: getting metadata for the given directory: get metadata <directory> getting values of a given metadata tag compatible with the given selection get tags [ where <tagname>=<tagvalue> [<tagname>=<tagvalue>] ]
def do_get(self,args): """ Get metadata for the directory
4e9355f1e4d9d4e6acac1a2fac367016f26ecd4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/4e9355f1e4d9d4e6acac1a2fac367016f26ecd4b/FileCatalogClientCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 588, 12, 2890, 16, 1968, 4672, 3536, 968, 1982, 364, 326, 1867, 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, 741, 67, 588, 12, 2890, 16, 1968, 4672, 3536, 968, 1982, 364, 326, 1867, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
except http.client.BadStatusLine:
except httplib.BadStatusLine:
def request(self, host, handler, request_body, verbose=0): #retry request once if cached connection has gone cold for i in (0, 1): try: return self.single_request(host, handler, request_body, verbose) except socket.error, e: if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED): raise except http.client.BadStatusLine: #close after we sent request if i: raise
e5445da6318d35be797e0b52d666aed2382daab1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/e5445da6318d35be797e0b52d666aed2382daab1/xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 12, 2890, 16, 1479, 16, 1838, 16, 590, 67, 3432, 16, 3988, 33, 20, 4672, 468, 9620, 590, 3647, 309, 3472, 1459, 711, 22296, 645, 72, 364, 277, 316, 261, 20, 16, 404, 4672, 775, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 12, 2890, 16, 1479, 16, 1838, 16, 590, 67, 3432, 16, 3988, 33, 20, 4672, 468, 9620, 590, 3647, 309, 3472, 1459, 711, 22296, 645, 72, 364, 277, 316, 261, 20, 16, 404, 4672, 775, ...
logger.notify('Successfully downloaded %s' % requirement_set)
logger.notify('Successfully downloaded')
def run(self, options, args): if not options.build_dir: options.build_dir = base_prefix if not options.src_dir: options.src_dir = base_src_prefix options.build_dir = os.path.abspath(options.build_dir) options.src_dir = os.path.abspath(options.src_dir) options.upgrade = True install_options = options.install_options or [] index_urls = [options.index_url] + options.extra_index_urls finder = PackageFinder( find_links=options.find_links, index_urls=index_urls) requirement_set = RequirementSet( build_dir=options.build_dir, src_dir=options.src_dir, upgrade=options.upgrade, ignore_installed=options.ignore_installed) for name in args: requirement_set.add_requirement( InstallRequirement.from_line(name, None)) for name in options.editables: requirement_set.add_requirement( InstallRequirement.from_editable(name)) for filename in options.requirements: for req in parse_requirements(filename, finder=finder): requirement_set.add_requirement(req) requirement_set.download_files(finder) logger.notify('Successfully downloaded %s' % requirement_set) return requirement_set
e31ac7ac2258ce75d7f609f382b5d7829a8c9ac2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12982/e31ac7ac2258ce75d7f609f382b5d7829a8c9ac2/pip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 702, 16, 833, 4672, 309, 486, 702, 18, 3510, 67, 1214, 30, 702, 18, 3510, 67, 1214, 273, 1026, 67, 3239, 309, 486, 702, 18, 4816, 67, 1214, 30, 702, 18, 4816, 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, 1086, 12, 2890, 16, 702, 16, 833, 4672, 309, 486, 702, 18, 3510, 67, 1214, 30, 702, 18, 3510, 67, 1214, 273, 1026, 67, 3239, 309, 486, 702, 18, 4816, 67, 1214, 30, 702, 18, 4816, 6...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 532) else quickfix.CharField.__init__(self, 532, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 1578, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 1578, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
if histogram[currentID]['totalHits'] >= self.minimumHitsOnTimeout:
if histogram[currentID]['totalHits'] >= self._minimumHitsOnTimeout:
def TIMEOUT(self, event): histogram = self.ai.data['binData']['histogram'] currentID = self.ai.data['binData'].get('currentID', None)
b82d1dc1d83cade3dd762e551ffe085a0fc415d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10608/b82d1dc1d83cade3dd762e551ffe085a0fc415d2/bin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24374, 12, 2890, 16, 871, 4672, 8892, 273, 365, 18, 10658, 18, 892, 3292, 4757, 751, 21712, 22702, 3546, 783, 734, 273, 365, 18, 10658, 18, 892, 3292, 4757, 751, 29489, 588, 2668, 2972, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24374, 12, 2890, 16, 871, 4672, 8892, 273, 365, 18, 10658, 18, 892, 3292, 4757, 751, 21712, 22702, 3546, 783, 734, 273, 365, 18, 10658, 18, 892, 3292, 4757, 751, 29489, 588, 2668, 2972, ...
'ch': u'Muna'sesetbi',
'ch': u'Muna\'sesetbi',
def __init__(self): self.name = None # Updated from http://meta.wikimedia.org/wiki/Interwiki_sorting_order self.alphabetic = [ 'aa', 'af', 'ak', 'als', 'am', 'ang', 'ab', 'ar', 'an', 'arc', 'arz', 'roa-rup', 'frp', 'as', 'ast', 'gn', 'av', 'ay', 'az', 'bm', 'bn', 'zh-min-nan', 'map-bms', 'ba', 'be', 'be-x-old', 'bh', 'bcl', 'bi', 'bar', 'bo', 'bs', 'br', 'bg', 'bxr', 'ca', 'cv', 'ceb', 'cs', 'ch', 'ny', 'sn', 'tum', 'cho', 'co', 'za', 'cy', 'da', 'pdc', 'de', 'dv', 'nv', 'dsb', 'dz', 'mh', 'et', 'el', 'eml', 'en', 'myv', 'es', 'eo', 'ext', 'eu', 'ee', 'fa', 'fo', 'hif', 'fr', 'fy', 'ff', 'fur', 'ga', 'gan', 'gv', 'gd', 'gl', 'ki', 'glk', 'gu', 'got', 'zh-classical', 'hak', 'xal', 'ko', 'ha', 'haw', 'hy', 'hi', 'ho', 'hsb', 'hr', 'io', 'ig', 'ilo', 'bpy', 'id', 'ia', 'ie', 'iu', 'ik', 'os', 'xh', 'zu', 'is', 'it', 'he', 'jv', 'kl', 'pam', 'kn', 'kr', 'ka', 'ks', 'csb', 'kk', 'kw', 'rw', 'ky', 'rn', 'sw', 'kv', 'kg', 'ht', 'kj', 'ku', 'lad', 'lbe', 'lo', 'la', 'lv', 'lb', 'lt', 'lij', 'li', 'ln', 'jbo', 'lg', 'lmo', 'hu', 'mk', 'mg', 'ml', 'mt', 'mi', 'mr', 'mzn', 'ms', 'cdo', 'mdf', 'mo', 'mn', 'mus', 'my', 'nah', 'na', 'fj', 'nl', 'nds-nl', 'cr', 'ne', 'new', 'ja', 'nap', 'ce', 'pih', 'no', 'nn', 'nrm', 'nov', 'oc', 'or', 'om', 'ng', 'hz', 'ug', 'uz', 'pa', 'pi', 'pag', 'pap', 'ps', 'km', 'pms', 'nds', 'pl', 'pt', 'kaa', 'crh', 'ty', 'ksh', 'ro', 'rmy', 'rm', 'qu', 'ru', 'sah', 'se', 'sm', 'sa', 'sg', 'sc', 'sco', 'stq', 'st', 'tn', 'sq', 'scn', 'si', 'simple', 'sd', 'ss', 'sk', 'cu', 'sl', 'szl', 'so', 'sr', 'sh', 'srn', 'su', 'fi', 'sv', 'tl', 'ta', 'kab', 'roa-tara', 'tt', 'te', 'tet', 'th', 'vi', 'ti', 'tg', 'tpi', 'to', 'chr', 'chy', 've', 'tr', 'tk', 'tw', 'udm', 'bug', 'uk', 'ur', 'vec', 'vo', 'fiu-vro', 'wa', 'vls', 'war', 'wo', 'wuu', 'ts', 'ii', 'yi', 'yo', 'zh-yue', 'cbk-zam', 'diq', 'zea', 'bat-smg', 'zh', ]
76fd38d02894b540c78432d1fe4de721470968ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/76fd38d02894b540c78432d1fe4de721470968ec/family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 529, 273, 599, 468, 19301, 628, 1062, 2207, 3901, 18, 11999, 381, 1980, 18, 3341, 19, 13044, 19, 2465, 13044, 67, 28751, 67, 1019, 365, 18, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 365, 18, 529, 273, 599, 468, 19301, 628, 1062, 2207, 3901, 18, 11999, 381, 1980, 18, 3341, 19, 13044, 19, 2465, 13044, 67, 28751, 67, 1019, 365, 18, 28...
saRelPage = idaapi.saRelPage
saRelPage = idaapi.saRelPage
def SegAlign(ea, alignment): """ Change alignment of the segment @param ea: any address in the segment @param alignment: new alignment of the segment (one of the sa... constants) @return: success (boolean) """ return SetSegmentAttr(ea, SEGATTR_ALIGN, alignment)
507ea15b7a89e88e413b47a9fe03b571d956c14a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4773/507ea15b7a89e88e413b47a9fe03b571d956c14a/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 1332, 10044, 12, 24852, 16, 8710, 4672, 3536, 7576, 8710, 434, 326, 3267, 225, 632, 891, 24164, 30, 1281, 1758, 316, 326, 3267, 632, 891, 8710, 30, 394, 8710, 434, 326, 3267, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 1332, 10044, 12, 24852, 16, 8710, 4672, 3536, 7576, 8710, 434, 326, 3267, 225, 632, 891, 24164, 30, 1281, 1758, 316, 326, 3267, 632, 891, 8710, 30, 394, 8710, 434, 326, 3267, 261, ...
objectNumber=str(objectsList.index(listener))
objectNumber=str(listeners.index(listener))
def GenerateNetworkOSCReceiver(filename): liblos="" connections="" printers="" argumentNumbers=3 xPosition=50 yPosition=150 path="/SpatDIF/sources/%(objectNumber)s/xyz/location" port=7000
deb14107a583f046c0d70d47e8c05a2bc6aa51de /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1456/deb14107a583f046c0d70d47e8c05a2bc6aa51de/network_scene_exporter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 3906, 51, 2312, 12952, 12, 3459, 4672, 2561, 383, 87, 1546, 6, 5921, 1546, 6, 12539, 87, 1546, 6, 1237, 10072, 33, 23, 619, 2555, 33, 3361, 677, 2555, 33, 23014, 589, 1546, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 3906, 51, 2312, 12952, 12, 3459, 4672, 2561, 383, 87, 1546, 6, 5921, 1546, 6, 12539, 87, 1546, 6, 1237, 10072, 33, 23, 619, 2555, 33, 3361, 677, 2555, 33, 23014, 589, 1546, 19, ...
tarf.add(tmp_file_graph.name, arcname= module.name + '_module.png')
def _generate(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) module_model = pool.get('ir.module.module') module_ids = data['ids']
7b6d0d4c98cebebfedcd2c913f72c983460aa3dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/7b6d0d4c98cebebfedcd2c913f72c983460aa3dc/wizard_tech_guide_rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 1605, 67, 2284, 273, 2845, 18, 588, 2668, 481, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 1605, 67, 2284, 273, 2845, 18, 588, 2668, 481, 18, ...
if (not mult and prevExp > 0) or (mult and prevExp < 0):
if not mult:
def addOper(self, mult): """Add new operator & blank unit after current, * if mult is true""" if self.unitList: self.completePartial() prevExp = self.currentUnit().exp group, pos = self.currentGroupPos() self.currentNum += 1 group.unitList.insert(pos + 1, UnitAtom(u'')) # TODO: Check if prevExp is required if (not mult and prevExp > 0) or (mult and prevExp < 0): self.currentUnit().exp = -1
94385c7b12190e0205ade5d367aff4e47b867836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3070/94385c7b12190e0205ade5d367aff4e47b867836/unitgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 3542, 12, 2890, 16, 1778, 4672, 3536, 986, 394, 3726, 473, 7052, 2836, 1839, 783, 16, 380, 309, 1778, 353, 638, 8395, 309, 365, 18, 4873, 682, 30, 365, 18, 6226, 9447, 1435, 2807,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3542, 12, 2890, 16, 1778, 4672, 3536, 986, 394, 3726, 473, 7052, 2836, 1839, 783, 16, 380, 309, 1778, 353, 638, 8395, 309, 365, 18, 4873, 682, 30, 365, 18, 6226, 9447, 1435, 2807,...
index.add_item(fileobj)
index.add_item(fileobj, text.name)
def do_search(self, line): self._register_config() import shakespeare.search index = shakespeare.search.SearchIndex.default_index()
01459742a09b0ad5a6e3163276cf1eea14becdd0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9817/01459742a09b0ad5a6e3163276cf1eea14becdd0/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3072, 12, 2890, 16, 980, 4672, 365, 6315, 4861, 67, 1425, 1435, 1930, 699, 3223, 347, 834, 18, 3072, 770, 273, 699, 3223, 347, 834, 18, 3072, 18, 2979, 1016, 18, 1886, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3072, 12, 2890, 16, 980, 4672, 365, 6315, 4861, 67, 1425, 1435, 1930, 699, 3223, 347, 834, 18, 3072, 770, 273, 699, 3223, 347, 834, 18, 3072, 18, 2979, 1016, 18, 1886, 67, 1...
Viewer.frameGL.setSize(w, w)
Viewer.frameGL.setSize(w, h)
def test_image(): w = 300 h = 408 Viewer.frameGL.maximize() Viewer.frameGL.setSize(w, w) fname = 'test_framegl.png' Viewer.frameGL.saveImage(fname,'PNG') Viewer.frameGL.maximize(False) assert os.path.exists(fname), "Viewer.frameGL.saveImage failed" try: #if True: from PIL import Image q = Image.open(fname) rw, rh = q.size[0], q.size[1] imgsizetest = (rw == w and rh == h) del q except: imgsizetest = True assert imgsizetest and "Viewer.frameGL.setSize failed %s" % str((rw,rh)) os.remove(fname)
5e1a591f53257e07de33fcd9dcfe52e363eb8a4e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/799/5e1a591f53257e07de33fcd9dcfe52e363eb8a4e/test_viewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2730, 13332, 341, 273, 11631, 366, 273, 1059, 6840, 4441, 264, 18, 3789, 11261, 18, 1896, 10153, 1435, 4441, 264, 18, 3789, 11261, 18, 542, 1225, 12, 91, 16, 366, 13, 5299, 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, 1842, 67, 2730, 13332, 341, 273, 11631, 366, 273, 1059, 6840, 4441, 264, 18, 3789, 11261, 18, 1896, 10153, 1435, 4441, 264, 18, 3789, 11261, 18, 542, 1225, 12, 91, 16, 366, 13, 5299, 2...
raise self.failureException, \ (msg or '%r == %r within %r places' % (first, second, places))
raise self.failureException( msg or '%r == %r within %r places' % (first, second, places))
def failIfAlmostEqual(self, first, second, places=7, msg=None): """Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
dae1a6a4889a67d29c7e1638472625cc4ca3cdf3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/dae1a6a4889a67d29c7e1638472625cc4ca3cdf3/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 2047, 1067, 10329, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 12576, 33, 27, 16, 1234, 33, 7036, 4672, 3536, 3754, 309, 326, 2795, 2184, 854, 3959, 487, 11383, 635, 3675, 7114, 16729,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 2047, 1067, 10329, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 12576, 33, 27, 16, 1234, 33, 7036, 4672, 3536, 3754, 309, 326, 2795, 2184, 854, 3959, 487, 11383, 635, 3675, 7114, 16729,...
def drawGeneModel(self, fig, snps_within_this_region, gene_annotation, candidate_gene_set, gene_width=1.0):
def drawGeneModel(self, ax, snps_within_this_region, gene_annotation, candidate_gene_set, gene_width=1.0):
def drawGeneModel(self, fig, snps_within_this_region, gene_annotation, candidate_gene_set, gene_width=1.0): """ 2008-09-24 """ sys.stderr.write("\t Drawing gene model ...") left_chr, left_pos = snps_within_this_region.chr_pos_ls[0] right_chr, right_pos = snps_within_this_region.chr_pos_ls[-1] no_of_genes_drawn = 0 gca = fig.gca() for gene_id in gene_annotation.chr_id2gene_id_ls[left_chr]: gene_model = gene_annotation.gene_id2model[gene_id] if gene_model.start!=None and gene_model.stop!=None and gene_model.stop>left_pos: if left_chr==right_chr: #same chromosome if gene_model.start>right_pos: #totally out of range, skip it continue y_value = no_of_genes_drawn%3 #cycling through the y position to avoid clogging self.plot_one_gene(gca, gene_id, gene_annotation.gene_id2model, candidate_gene_set, y_value=-1-y_value, gene_width=gene_width) no_of_genes_drawn += 1 if left_chr!=right_chr: for gene_id in gene_annotation.chr_id2gene_id_ls[right_chr]: gene_model = gene_annotation.gene_id2model[gene_id] if gene_model.start!=None and gene_model.stop!=None and gene_model.start<right_pos: y_value = no_of_genes_drawn%3 #cycling through the y position to avoid clogging self.plot_one_gene(gca, gene_id, gene_annotation.gene_id2model, candidate_gene_set, y_value=-1-y_value, gene_width=gene_width) no_of_genes_drawn += 1 sys.stderr.write("Done.\n")
7d2fce961a1455fa62f12c44842e84c05fb5b474 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/7d2fce961a1455fa62f12c44842e84c05fb5b474/DrawSNPRegion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 24442, 1488, 12, 2890, 16, 1740, 16, 4556, 1121, 67, 25850, 67, 2211, 67, 6858, 16, 7529, 67, 11495, 16, 5500, 67, 11857, 67, 542, 16, 7529, 67, 2819, 33, 21, 18, 20, 4672, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 24442, 1488, 12, 2890, 16, 1740, 16, 4556, 1121, 67, 25850, 67, 2211, 67, 6858, 16, 7529, 67, 11495, 16, 5500, 67, 11857, 67, 542, 16, 7529, 67, 2819, 33, 21, 18, 20, 4672, 353...
def update_nicks(channel, event="Marc Didn't know how you planned to not need this"):
def update_nicks(network, channel):
def update_nicks(channel, event="Marc Didn't know how you planned to not need this"): import ui for window in ui.get_window_for(network=event.network, type="channel", id=channel.name): window.set_nicklist(channel.nicks)
bdc0ff081ef8cbd77d3b4fdb061972ea575f07e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/bdc0ff081ef8cbd77d3b4fdb061972ea575f07e7/irc_basicinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 17091, 87, 12, 5185, 16, 1904, 4672, 1930, 5915, 225, 364, 2742, 316, 5915, 18, 588, 67, 5668, 67, 1884, 12, 5185, 33, 2575, 18, 5185, 16, 618, 1546, 4327, 3113, 612, 33, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 17091, 87, 12, 5185, 16, 1904, 4672, 1930, 5915, 225, 364, 2742, 316, 5915, 18, 588, 67, 5668, 67, 1884, 12, 5185, 33, 2575, 18, 5185, 16, 618, 1546, 4327, 3113, 612, 33, 4...
return {}
return {}
def _send_report(self, cr, uid, data , context): # {{{
c4b3f8fbfd260b59e6476663f0fbd313179a12b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/c4b3f8fbfd260b59e6476663f0fbd313179a12b3/dm_document_report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 67, 6006, 12, 2890, 16, 4422, 16, 4555, 16, 501, 269, 819, 4672, 468, 10179, 95, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 67, 6006, 12, 2890, 16, 4422, 16, 4555, 16, 501, 269, 819, 4672, 468, 10179, 95, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
gLogger.info( dummy ) gLogger.info( "Options:" )
gLogger.notice( dummy ) gLogger.notice( "Options:" )
def showHelp( self, dummy = False ): if self.__usageMessage: gLogger.info( self.__usageMessage ) else: gLogger.info( "Usage:" ) gLogger.info( " %s (<options>|<cfgFile>)*" % sys.argv[0] ) if dummy: gLogger.info( dummy )
195f360e788d46e95e6946ec17059f81d5f4002c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/195f360e788d46e95e6946ec17059f81d5f4002c/LocalConfiguration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 6696, 12, 365, 16, 9609, 273, 1083, 262, 30, 309, 365, 16186, 9167, 1079, 30, 314, 3328, 18, 1376, 12, 365, 16186, 9167, 1079, 262, 469, 30, 314, 3328, 18, 1376, 12, 315, 5357, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 6696, 12, 365, 16, 9609, 273, 1083, 262, 30, 309, 365, 16186, 9167, 1079, 30, 314, 3328, 18, 1376, 12, 365, 16186, 9167, 1079, 262, 469, 30, 314, 3328, 18, 1376, 12, 315, 5357, ...
self._mwi_handler.subscribe()
self._mwi_handler.activate()
def _NH_CFGSettingsObjectDidChangeID(self, notification): if self._started and self.enabled: if self.sip.register: self._registrar.reload_settings() if self.message_summary.enabled: self._mwi_handler.subscribe()
2a3e2ff3c435c7cdb6d4fd6ae678fa3aea76ae62 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/2a3e2ff3c435c7cdb6d4fd6ae678fa3aea76ae62/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 50, 44, 67, 19727, 2628, 921, 18250, 3043, 734, 12, 2890, 16, 3851, 4672, 309, 365, 6315, 14561, 471, 365, 18, 5745, 30, 309, 365, 18, 28477, 18, 4861, 30, 365, 6315, 1574, 3337, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 50, 44, 67, 19727, 2628, 921, 18250, 3043, 734, 12, 2890, 16, 3851, 4672, 309, 365, 6315, 14561, 471, 365, 18, 5745, 30, 309, 365, 18, 28477, 18, 4861, 30, 365, 6315, 1574, 3337, ...
if os.system('bjam boost=source link=static boost-link=static release msvc-7.1 optimization=space') != 0:
if os.system('bjam boost=source link=static geoip=static boost-link=static release msvc-7.1 optimization=space') != 0:
def arch(): if platform.system() != 'Darwin': return [] a = os.uname()[4] if a == 'Power Macintosh': a = 'ppc' return ['-arch', a]
ad07c38a7724b1f90007bc3b3b7990fed4fadfd1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/ad07c38a7724b1f90007bc3b3b7990fed4fadfd1/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6637, 13332, 309, 4072, 18, 4299, 1435, 480, 296, 40, 19992, 4278, 327, 5378, 279, 273, 1140, 18, 318, 339, 1435, 63, 24, 65, 309, 279, 422, 296, 13788, 13217, 474, 17636, 4278, 279, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6637, 13332, 309, 4072, 18, 4299, 1435, 480, 296, 40, 19992, 4278, 327, 5378, 279, 273, 1140, 18, 318, 339, 1435, 63, 24, 65, 309, 279, 422, 296, 13788, 13217, 474, 17636, 4278, 279, 2...