rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
for filter in filterlist: sedmag[sedfile][filter] = sed[sedfile].calcMag(bandpass[filter]) | for f in filterlist: sedmag[sedfile][f] = sed[sedfile].calcMag(bandpass[f]) sedcol[sedfile][f] = sedmag[sedfile][f] - sedmag[sedfile]['V'] | def calcAllMags(self, filt, mjdTaiList, rootSEDdir, withErrors=True, fiveSigmaLimitingMag=None): """ Calculate the magnitude of all objects in the movingObjectList """ """ - Given the filter, the mjd (to find the ephemeris info) and the root directory of SEDS/thruputs """ """ individual objects know their SED and their expected V magnitude """ # set up data needed to calculate magnitudes for each moving object # to calculate magnitudes, need info from sed/bandpass (lsst_mags) import lsst_mags as lm # read in and set up filter files if rootSEDdir != '': rootSEDdir = rootSEDdir + "/" bandpass = {} filterlist = [filt, 'V', 'imsim'] for filter in filterlist: if filter == 'V': filename = rootSEDdir + 'harris_V.dat' elif filter=='imsim': filename = 'imsim' else: filename = rootSEDdir + 'final_' + filt bandpass[filter] = lm.teleThruput(filename) # read in and set up sed files sedtypes = ('C.dat', 'S.dat') sed={} sedmag = {} for sedfile in sedtypes: # read sed files filename = rootSEDdir + sedfile sed[sedfile] = lm.simObj(filename) # set up magnitudes sedmag[sedfile] = {} for filter in filterlist: sedmag[sedfile][filter] = sed[sedfile].calcMag(bandpass[filter]) # BUT can improve this later if add phaseG(bandpass). | 649989e6c45a02c566ac9b33aee0267cb811b9a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/91/649989e6c45a02c566ac9b33aee0267cb811b9a9/movingObjectList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
1595,
49,
1341,
12,
2890,
16,
18553,
16,
312,
20769,
56,
10658,
682,
16,
1365,
18204,
1214,
16,
598,
4229,
33,
5510,
16,
23714,
24491,
3039,
310,
11372,
33,
7036,
4672,
3536,
9029,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
1595,
49,
1341,
12,
2890,
16,
18553,
16,
312,
20769,
56,
10658,
682,
16,
1365,
18204,
1214,
16,
598,
4229,
33,
5510,
16,
23714,
24491,
3039,
310,
11372,
33,
7036,
4672,
3536,
9029,... |
self.veto_definer = os.path.basename(definer_file) | def update_veto_lists(self, timeoffset, veto_definer = None): | 1e970725389ab6428d527ad9ebb1d1f3b0c5d669 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/1e970725389ab6428d527ad9ebb1d1f3b0c5d669/pylal_exttrig_llutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
90,
11453,
67,
9772,
12,
2890,
16,
813,
3348,
16,
331,
11453,
67,
5649,
264,
273,
599,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1089,
67,
90,
11453,
67,
9772,
12,
2890,
16,
813,
3348,
16,
331,
11453,
67,
5649,
264,
273,
599,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
return props.getProperty('showPlaylist') | return props.getProperty('showPlaylist') and 'flowPlaylistVisible' or 'flowPlaylistHidden' | def show_playlist(self): properties_tool = getToolByName(self.context, 'portal_properties') props = getattr(properties_tool, 'flowplayer_properties', None) return props.getProperty('showPlaylist') | 15077139cd9febae1eb944d5753e63893b5f35ef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10573/15077139cd9febae1eb944d5753e63893b5f35ef/view.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
1601,
1098,
12,
2890,
4672,
1790,
67,
6738,
273,
336,
6364,
5911,
12,
2890,
18,
2472,
16,
296,
24386,
67,
4738,
6134,
3458,
273,
3869,
12,
4738,
67,
6738,
16,
296,
2426,
1487... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
1601,
1098,
12,
2890,
4672,
1790,
67,
6738,
273,
336,
6364,
5911,
12,
2890,
18,
2472,
16,
296,
24386,
67,
4738,
6134,
3458,
273,
3869,
12,
4738,
67,
6738,
16,
296,
2426,
1487... |
self._evalwheredat(intid) | self._evalwheredat([intid]) | def _create_autoincrement(self, data=None): """ obj.create(data=None) -> self | 42f9d25588493f6ca5b43260e482e205e427a547 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/42f9d25588493f6ca5b43260e482e205e427a547/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
5854,
30033,
12,
2890,
16,
501,
33,
7036,
4672,
3536,
1081,
18,
2640,
12,
892,
33,
7036,
13,
317,
365,
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,
389,
2640,
67,
5854,
30033,
12,
2890,
16,
501,
33,
7036,
4672,
3536,
1081,
18,
2640,
12,
892,
33,
7036,
13,
317,
365,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if not self.field_id: | if not self.field_id.get(cr.dbname): | def _field_get(self, self2, cr, uid, prop): if not self.field_id: cr.execute('select id from ir_model_fields where name=%s and model=%s', (prop, self2._name)) res = cr.fetchone() self.field_id = res and res[0] return self.field_id | a230dfb364a5586ae582f6ae99d35a124c64e563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7397/a230dfb364a5586ae582f6ae99d35a124c64e563/fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1518,
67,
588,
12,
2890,
16,
365,
22,
16,
4422,
16,
4555,
16,
2270,
4672,
309,
486,
365,
18,
1518,
67,
350,
18,
588,
12,
3353,
18,
20979,
4672,
4422,
18,
8837,
2668,
4025,
612,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1518,
67,
588,
12,
2890,
16,
365,
22,
16,
4422,
16,
4555,
16,
2270,
4672,
309,
486,
365,
18,
1518,
67,
350,
18,
588,
12,
3353,
18,
20979,
4672,
4422,
18,
8837,
2668,
4025,
612,
... |
req = "%s AND AncestorDepth IN (%s);" % (req,intListToString(depths)) res = self.db._query(req,connection) | req = "%s AND AncestorDepth IN (%s);" % ( req, intListToString( depths ) ) res = self.db._query( req, connection ) | def _getFileAncestors(self,fileIDs,depths=[],connection=False): connection = self._getConnection(connection) req = "SELECT FileID,AncestorID,AncestorDepth FROM FC_FileAncestors WHERE FileID IN (%s)" % intListToString(fileIDs) if depths: req = "%s AND AncestorDepth IN (%s);" % (req,intListToString(depths)) res = self.db._query(req,connection) if not res['OK']: return res fileIDAncestors = {} for fileID,ancestorID,depth in res['Value']: if not fileIDAncestors.has_key(fileID): fileIDAncestors[fileID] = {} fileIDAncestors[fileID][ancestorID] = depth return S_OK(fileIDAncestors) | 26c5008a7adbc1c761e2409bed59b7710e5f2c74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/26c5008a7adbc1c761e2409bed59b7710e5f2c74/FileManagerBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29925,
28304,
12,
2890,
16,
768,
5103,
16,
5979,
87,
22850,
6487,
4071,
33,
8381,
4672,
1459,
273,
365,
6315,
588,
1952,
12,
4071,
13,
1111,
273,
315,
4803,
1387,
734,
16,
15637,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29925,
28304,
12,
2890,
16,
768,
5103,
16,
5979,
87,
22850,
6487,
4071,
33,
8381,
4672,
1459,
273,
365,
6315,
588,
1952,
12,
4071,
13,
1111,
273,
315,
4803,
1387,
734,
16,
15637,
... |
ALIASES: numerical_aproximation and numerical_approx are the same. | sage: (pi + e + sqrt(2)).numerical_approx(100) 7.2740880444219335226246195788 | def numerical_approximation(self, prec=53): """ Get a numerical approximation of self as either a real or complex number. | 620e070c69b2ba56d65f620b55649fc43ff77bab /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/620e070c69b2ba56d65f620b55649fc43ff77bab/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17409,
67,
26742,
5115,
12,
2890,
16,
13382,
33,
8643,
4672,
3536,
968,
279,
17409,
24769,
434,
365,
487,
3344,
279,
2863,
578,
7233,
1300,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
17409,
67,
26742,
5115,
12,
2890,
16,
13382,
33,
8643,
4672,
3536,
968,
279,
17409,
24769,
434,
365,
487,
3344,
279,
2863,
578,
7233,
1300,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
t = self.f.reduce(filled(t, self.filly), axis, dtype=dtype or t.dtype) | t = self.f.reduce(filled(t, self.filly), axis, dtype=dtype or t.dtype) | def reduce (self, target, axis=0, dtype=None): """Reduce target along the given axis with this function.""" m = getmask(target) t = filled(target, self.filly) if t.shape == (): t = t.reshape(1) if m is not nomask: m = make_mask(m, copy=1) m.shape = (1,) if m is nomask: return masked_array (self.f.reduce (t, axis)) else: t = masked_array (t, m) # XXX: "or t.dtype" below is a workaround for what appears # XXX: to be a bug in reduce. t = self.f.reduce(filled(t, self.filly), axis, dtype=dtype or t.dtype) m = umath.logical_and.reduce(m, axis) if isinstance(t, ndarray): return masked_array(t, m, get_fill_value(target)) elif m: return masked else: return t | cc3e7f3907f6c0621e5ff8866a078e4049fd2be8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/cc3e7f3907f6c0621e5ff8866a078e4049fd2be8/ma.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5459,
261,
2890,
16,
1018,
16,
2654,
33,
20,
16,
3182,
33,
7036,
4672,
3536,
12944,
1018,
7563,
326,
864,
2654,
598,
333,
445,
12123,
312,
273,
336,
4455,
12,
3299,
13,
268,
273,
6300,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5459,
261,
2890,
16,
1018,
16,
2654,
33,
20,
16,
3182,
33,
7036,
4672,
3536,
12944,
1018,
7563,
326,
864,
2654,
598,
333,
445,
12123,
312,
273,
336,
4455,
12,
3299,
13,
268,
273,
6300,... |
return {'value': result['value'], 'warning':warning} | return {'value': result.get('value',{}), 'warning':warning} | def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False): if not partner_id: return {'value': { 'address_contact_id': False , 'address_invoice_id': False, 'account_id': False, 'payment_term': False, } } warning = {} title = False message = False partner = self.pool.get('res.partner').browse(cr, uid, partner_id) if partner.invoice_warn != 'no-message': if partner.invoice_warn == 'block': raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.invoice_warn_msg) title = _("Warning for %s") % partner.name message = partner.invoice_warn_msg warning = { 'title': title, 'message': message } result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False) if result.get('warning',False): warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title'] warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message'] return {'value': result['value'], 'warning':warning} | 436cfd6954d5ed8e538ae3c4c141e9cf56f75bae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/436cfd6954d5ed8e538ae3c4c141e9cf56f75bae/warning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3427,
67,
31993,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
618,
16,
19170,
67,
350,
16,
1509,
67,
16119,
33,
8381,
16,
5184,
67,
6408,
33,
8381,
16,
19170,
67,
10546,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3427,
67,
31993,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
618,
16,
19170,
67,
350,
16,
1509,
67,
16119,
33,
8381,
16,
5184,
67,
6408,
33,
8381,
16,
19170,
67,
10546,... |
def isLogging(self, level): if level > self.INFO_MAX: if level-self.INFO_MAX > self._debug_level: return False else: if level > self._level: return False if not self._logging.has_key(level): return False if not self._domains.has_key(level) or len(self._domains[level]) < 1: return False return True | def delLogging(self, domain, target, level=ALL, format=None): """ Delete log target for domain and level. Level can be a single level or an array of levels. Use level ALL to set for all levels. If no format is specified, the default format will be used. """ levels = self._getLevels(level) for level in levels: if not self._logging.has_key(level): continue if (domain, target, format) in self._logging[level]: self._logging[level].remove( (domain, target, format) ) if len(self._logging[level]) == 0: del self._logging[level] return raise ValueError, "No mathing logging for " \ "level %d, domain %s, target %s and format %s." % \ (level, domain, target, format) self._genDomains() | 5e21eaf199cb2a3a81aefe5be1fd9cac8312f653 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/5e21eaf199cb2a3a81aefe5be1fd9cac8312f653/logger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
7735,
12,
2890,
16,
2461,
16,
1018,
16,
1801,
33,
4685,
16,
740,
33,
7036,
4672,
3536,
2504,
613,
1018,
364,
2461,
471,
1801,
18,
4557,
848,
506,
279,
2202,
1801,
578,
392,
526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
7735,
12,
2890,
16,
2461,
16,
1018,
16,
1801,
33,
4685,
16,
740,
33,
7036,
4672,
3536,
2504,
613,
1018,
364,
2461,
471,
1801,
18,
4557,
848,
506,
279,
2202,
1801,
578,
392,
526,
... | |
self.default_font.GetFamily(), self.default_font.GetStyle(), self.default_font.GetWeight()) | default_font.GetFamily(), default_font.GetStyle(), default_font.GetWeight()) | def __init__(self, mode, parent): wx.ListCtrl.__init__(self, parent, style=wx.LC_REPORT) self.mpd = mode.mpd self.createColumns() | dfc430bfbd215fb5641b5a8403f6a74ce6ee39f9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/dfc430bfbd215fb5641b5a8403f6a74ce6ee39f9/mpd_major_mode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1965,
16,
982,
4672,
7075,
18,
682,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
2154,
33,
27226,
18,
13394,
67,
22710,
13,
365,
18,
1291,
72,
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,
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,
1965,
16,
982,
4672,
7075,
18,
682,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
2154,
33,
27226,
18,
13394,
67,
22710,
13,
365,
18,
1291,
72,
273,
... |
if account.isSetUp(): | if account.isSetUp(ignorePassword): | def getCurrentOutgoingAccount(view): """ This function returns the default C{OutgoingAccount} account or the first C{OutgoingAccount} found if no default exists. @return C{OutgoingAccount} or None """ outgoingAccount = None # Get the current SMTP Account outgoingAccount = schema.ns('osaf.pim', view).currentOutgoingAccount.item if outgoingAccount is None or not outgoingAccount.isSetUp(): for account in OutgoingAccount.iterItems(view): if account.isSetUp(): return account return outgoingAccount | da69f378e03cd4ad2f57bb44acaad5e047e5bd57 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/da69f378e03cd4ad2f57bb44acaad5e047e5bd57/mail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5175,
24866,
3032,
12,
1945,
4672,
3536,
1220,
445,
1135,
326,
805,
385,
95,
24866,
3032,
97,
2236,
578,
326,
1122,
385,
95,
24866,
3032,
97,
1392,
309,
1158,
805,
1704,
18,
225,
632,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5175,
24866,
3032,
12,
1945,
4672,
3536,
1220,
445,
1135,
326,
805,
385,
95,
24866,
3032,
97,
2236,
578,
326,
1122,
385,
95,
24866,
3032,
97,
1392,
309,
1158,
805,
1704,
18,
225,
632,
... |
session = self.remote_login() if session: cmd = self.params.get("cpu_chk_cmd") s, count = session.get_command_status_output(cmd) if s == 0: return int(count) | cmd = self.params.get("cpu_chk_cmd") s, count = session.get_command_status_output(cmd) if s == 0: return int(count) | def get_cpu_count(self): """ Get the cpu count of the VM. """ try: session = self.remote_login() if session: cmd = self.params.get("cpu_chk_cmd") s, count = session.get_command_status_output(cmd) if s == 0: return int(count) return None finally: session.close() | f061a282f5ae3d1cb9059539cba533d8c19eb8d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/f061a282f5ae3d1cb9059539cba533d8c19eb8d1/kvm_vm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
11447,
67,
1883,
12,
2890,
4672,
3536,
968,
326,
8326,
1056,
434,
326,
8251,
18,
3536,
775,
30,
1797,
273,
365,
18,
2010,
18,
588,
2932,
11447,
67,
27038,
67,
4172,
7923,
272,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11447,
67,
1883,
12,
2890,
4672,
3536,
968,
326,
8326,
1056,
434,
326,
8251,
18,
3536,
775,
30,
1797,
273,
365,
18,
2010,
18,
588,
2932,
11447,
67,
27038,
67,
4172,
7923,
272,... |
for char in ',;:': if line[index] == char and line[index + 1] != ' ': return index, "E231 missing whitespace after '%s'" % char | char = line[index] if char in ',;:' and line[index + 1] != ' ': before = line[:index] if char == ':' and before.count('[') > before.count(']'): continue return index, "E231 missing whitespace after '%s'" % char | def missing_whitespace(logical_line): """ JCR: Each comma, semicolon or colon should be followed by whitespace. """ line = logical_line for index in range(len(line) - 1): for char in ',;:': if line[index] == char and line[index + 1] != ' ': return index, "E231 missing whitespace after '%s'" % char | 59be47b92a0b4bed0a72822fd35f9a8517f02b7d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3111/59be47b92a0b4bed0a72822fd35f9a8517f02b7d/pep8.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3315,
67,
18777,
12,
20300,
67,
1369,
4672,
3536,
17573,
30,
8315,
8716,
16,
23682,
578,
13336,
1410,
506,
10860,
635,
7983,
18,
3536,
980,
273,
6374,
67,
1369,
364,
770,
316,
1048,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3315,
67,
18777,
12,
20300,
67,
1369,
4672,
3536,
17573,
30,
8315,
8716,
16,
23682,
578,
13336,
1410,
506,
10860,
635,
7983,
18,
3536,
980,
273,
6374,
67,
1369,
364,
770,
316,
1048,
12,
... |
cflags = sysconfig.get_config_vars()['CFLAGS'] | try: cflags = sysconfig.get_config_vars()['CFLAGS'] except KeyError: return [] | def _c_arch_flags(self): """ Return detected arch flags from CFLAGS """ from distutils import sysconfig cflags = sysconfig.get_config_vars()['CFLAGS'] arch_re = re.compile(r"-arch\s+(\w+)") arch_flags = [] for arch in arch_re.findall(cflags): arch_flags += ['-arch', arch] return arch_flags | ba019417f66168b32357f397df7fd45808fd1ce4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/ba019417f66168b32357f397df7fd45808fd1ce4/gnu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
71,
67,
991,
67,
7133,
12,
2890,
4672,
3536,
2000,
8316,
6637,
2943,
628,
6123,
6552,
55,
3536,
628,
2411,
5471,
1930,
2589,
1425,
775,
30,
276,
7133,
273,
2589,
1425,
18,
588,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
71,
67,
991,
67,
7133,
12,
2890,
4672,
3536,
2000,
8316,
6637,
2943,
628,
6123,
6552,
55,
3536,
628,
2411,
5471,
1930,
2589,
1425,
775,
30,
276,
7133,
273,
2589,
1425,
18,
588,
67... |
sf += binomial(self.dfn, i) * scipy.stats.chi.sf(x, i) / N.power(2., self.dfn) | sf += binomial(self.dfn, i) * stats.chi.sf(x, i) / N.power(2., self.dfn) | def _getmu(self): x = N.linspace(0, 2 * self.dfn, 100) sf = 0. g = Gaussian() for i in range(1, self.dfn+1): sf += binomial(self.dfn, i) * scipy.stats.chi.sf(x, i) / N.power(2., self.dfn) | b251694b7d7fc8fce6e39eac693410d6577055a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12658/b251694b7d7fc8fce6e39eac693410d6577055a1/rft.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
13297,
12,
2890,
4672,
619,
273,
423,
18,
80,
15738,
12,
20,
16,
576,
380,
365,
18,
2180,
82,
16,
2130,
13,
9033,
273,
374,
18,
314,
273,
23079,
1435,
364,
277,
316,
1048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13297,
12,
2890,
4672,
619,
273,
423,
18,
80,
15738,
12,
20,
16,
576,
380,
365,
18,
2180,
82,
16,
2130,
13,
9033,
273,
374,
18,
314,
273,
23079,
1435,
364,
277,
316,
1048,
... |
contents = self.doctree( inspect.getclasstree(classes, 1), name, cdict) for item in classes: contents = contents + self.document(item, fdict, cdict) | classlist = map(lambda (key, value): value, classes) contents = [self.formattree( inspect.getclasstree(classlist, 1), name, cdict)] for key, value in classes: contents.append(self.document(value, key, fdict, cdict)) | def docmodule(self, object): """Produce HTML documentation for a module object.""" name = object.__name__ parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) filelink = '<a href="file:%s">%s</a>' % (path, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink) | 54a838fe1421d6e6829cabc42e7f398722140804 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/54a838fe1421d6e6829cabc42e7f398722140804/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
2140,
273,
1416,
12,
529,
16,
2611,
13,
4716,
273,
5378,
364,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
2140,
273,
1416,
12,
529,
16,
2611,
13,
4716,
273,
5378,
364,
2... |
yoffset += 65 | dialog.addResizeGump(65, 109 + yoffset, 9200, 405, 62) dialog.addText(76, 115 + yoffset, unicode( "Skill: %s (%i)" % (skillname, skill) ), 2100) dialog.addResizeGump(123, 135 + yoffset, 9300, 63, 26) dialog.addText(76, 137 + yoffset, unicode( "Value:" ), 2100) dialog.addText(187, 138 + yoffset, unicode( "%" ), 2100) dialog.addInputField(128, 138 + yoffset, 50, 20, 2100, 0x1000 | skill, unicode( "%0.1f" % skillvalue ) ) dialog.addText(232, 138 + yoffset, unicode( "Cap:" ), 2100) dialog.addText(329, 139 + yoffset, unicode( "%" ), 2100) dialog.addResizeGump(264, 135 + yoffset, 9300, 63, 26) dialog.addInputField(268, 139 + yoffset, 53, 20, 2100, 0x2000 | skill, unicode( "%0.1f" % skillcapvalue ) ) yoffset += 65 | def callback(player, arguments, target): if not target.char: return dialog = wolfpack.gumps.cGump() dialog.setCallback("commands.skillinfo.response") dialog.setArgs([target.char.serial]) dialog.startPage(0) dialog.addResizeGump(35, 12, 9260, 460, 504) dialog.addGump(1, 12, 10421, 0) dialog.addGump(30, -1, 10420, 0) dialog.addResizeGump(66, 40, 9200, 405, 65) dialog.addText(108, 52, unicode("Wolfpack Skillinfo Command"), 2100) dialog.addTiledGump(90, 11, 164, 17, 10250, 0) dialog.addGump(474, 12, 10431, 0) dialog.addGump(439, -1, 10430, 0) dialog.addGump(14, 200, 10422, 0) dialog.addGump(468, 200, 10432, 0) dialog.addGump(249, 11, 10254, 0) dialog.addGump(74, 45, 10464, 0) dialog.addGump(435, 45, 10464, 0) dialog.addGump(461, 408, 10412, 0) dialog.addGump(-15, 408, 10402, 0) dialog.addTiledGump(281, 11, 158, 17, 10250, 0) dialog.addGump(265, 11, 10252, 0) dialog.addButton(60, 476, 247, 248, 1) dialog.addButton(136, 476, 242, 241, 0) # 80 pixel diameter pages = int(ceil(ALLSKILLS / 5.0)) page = 0 while page <= pages: page += 1 dialog.startPage(page) if page > 1: dialog.addPageButton(60, 444, 9909, 9911, page - 1) dialog.addText(88, 444, unicode("Previous Page"), 2100) if page < pages: dialog.addPageButton(448, 444, 9903, 9905, page + 1) dialog.addText(376, 448, unicode("Next Page"), 2100) yoffset = 0 for i in range(0, 5): skill = int(((page - 1) * 5) + i) if skill >= ALLSKILLS: break skillname = SKILLNAMES[skill] skillname = str( skillname[0].upper() + skillname[1:] ) skillvalue = ( target.char.skill[skill] / 10.0 ) skillcapvalue = ( target.char.skillcap[skill] / 10.0 ) dialog.addResizeGump(65, 109 + yoffset, 9200, 405, 62) dialog.addText(76, 115 + yoffset, unicode( "Skill: %s (%i)" % (skillname, skill) ), 2100) dialog.addResizeGump(123, 135 + yoffset, 9300, 63, 26) dialog.addText(76, 137 + yoffset, unicode( "Value:" ), 2100) dialog.addText(187, 138 + yoffset, unicode( "%" ), 2100) dialog.addInputField(128, 138 + yoffset, 50, 20, 2100, 0x1000 | skill, unicode( "%0.1f" % skillvalue ) ) dialog.addText(232, 138 + yoffset, unicode( "Cap:" ), 2100) dialog.addText(329, 139 + yoffset, unicode( "%" ), 2100) dialog.addResizeGump(264, 135 + yoffset, 9300, 63, 26) dialog.addInputField(268, 139 + yoffset, 53, 20, 2100, 0x2000 | skill, unicode( "%0.1f" % skillcapvalue ) ) yoffset += 65 dialog.send(player) | 9552b6d4143c46cdc4a9033e72c472113180bf62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9552b6d4143c46cdc4a9033e72c472113180bf62/skillinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1348,
12,
14872,
16,
1775,
16,
1018,
4672,
309,
486,
1018,
18,
3001,
30,
327,
225,
6176,
273,
341,
355,
74,
2920,
18,
75,
23868,
18,
71,
43,
2801,
1435,
6176,
18,
542,
2428,
2932,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1348,
12,
14872,
16,
1775,
16,
1018,
4672,
309,
486,
1018,
18,
3001,
30,
327,
225,
6176,
273,
341,
355,
74,
2920,
18,
75,
23868,
18,
71,
43,
2801,
1435,
6176,
18,
542,
2428,
2932,
78... |
self.__read_file() | newUsers = self.__read_file() | def rebuild(self, force=False): self.mtx.acquire() try: if force: self.__read_file() else: mtime = os.path.getmtime(self.__user_db) if mtime > self.__mtime: self.__read_file() self.__mtime = mtime finally: self.mtx.release() | ce34a373ffb1d3f8a24bcc69ebb33cf62d9e8afa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2459/ce34a373ffb1d3f8a24bcc69ebb33cf62d9e8afa/user.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13419,
12,
2890,
16,
2944,
33,
8381,
4672,
365,
18,
81,
978,
18,
1077,
1039,
1435,
775,
30,
309,
2944,
30,
394,
6588,
273,
365,
16186,
896,
67,
768,
1435,
469,
30,
13158,
273,
1140,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13419,
12,
2890,
16,
2944,
33,
8381,
4672,
365,
18,
81,
978,
18,
1077,
1039,
1435,
775,
30,
309,
2944,
30,
394,
6588,
273,
365,
16186,
896,
67,
768,
1435,
469,
30,
13158,
273,
1140,
... |
def onSendChallengeButtonResponse (self, dialog, response): | def onChallengeDialogResponse (self, dialog, response): | def onSendChallengeButtonResponse (self, dialog, response): self.widgets["challengeDialog"].hide() if response is not 5: return if self.widgets["challenge3Radio"].get_active(): self.__loadSeekEditor(3) elif self.widgets["challenge2Radio"].get_active(): self.__loadSeekEditor(2) else: self.__loadSeekEditor(1) min, incr, variant, ratingrange, color, rated, manual = self.__getSeekEditorDialogValues() self.connection.om.challenge(self.challengee, min, incr, rated, color, variant) | a7c08490b6abd21967d9c19a31c4977f6e4ce49d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/a7c08490b6abd21967d9c19a31c4977f6e4ce49d/ICLounge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
18359,
6353,
1064,
261,
2890,
16,
6176,
16,
766,
4672,
365,
18,
18148,
9614,
25092,
6353,
6,
8009,
11248,
1435,
309,
766,
353,
486,
1381,
30,
327,
225,
309,
365,
18,
18148,
9614,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18359,
6353,
1064,
261,
2890,
16,
6176,
16,
766,
4672,
365,
18,
18148,
9614,
25092,
6353,
6,
8009,
11248,
1435,
309,
766,
353,
486,
1381,
30,
327,
225,
309,
365,
18,
18148,
9614,
... |
else: from cStringIO import StringIO fp = StringIO() image.save(fp, image_orig.format) fp.seek(0) return self._Image(self, item, fp.read(), getattr(getattr(item, name), 'path', None)) else: return self._Image(self, item) | from cStringIO import StringIO fp = StringIO() image.save(fp, image_orig.format) fp.seek(0) return self._Image(self, item, fp.read(), getattr(getattr(item, name), 'path', None)) else: return _image | def convertFromForm(self, form, name, item): if self.fieldToThumb: # we have field to thumbnail _image = getattr(item, self.fieldToThumb, None) image = image_orig = getattr(_image, '_image', None) else: # field thumbnails itself if form.has_key(name+'-delete'): old_path = getattr(getattr(item, name), 'path', None) return self._Image(self, item, '', old_path) | e0760c8ae0acae1b3ed3e3e4dc0e1b6c68663063 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1871/e0760c8ae0acae1b3ed3e3e4dc0e1b6c68663063/qFieldTypes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
1265,
1204,
12,
2890,
16,
646,
16,
508,
16,
761,
4672,
309,
365,
18,
1518,
774,
18922,
30,
468,
732,
1240,
652,
358,
9134,
389,
2730,
273,
3869,
12,
1726,
16,
365,
18,
1518,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
1265,
1204,
12,
2890,
16,
646,
16,
508,
16,
761,
4672,
309,
365,
18,
1518,
774,
18922,
30,
468,
732,
1240,
652,
358,
9134,
389,
2730,
273,
3869,
12,
1726,
16,
365,
18,
1518,
77... |
['Products/Five/doc', ['Products/ZReST/doc/*']], ['Products/Five/skel', ['Products/ZReST/skel/*']], ['Products/Five/tests', ['Products/ZReST/tests/*']], | ['Products/Five/doc', ['Products/Five/doc/*']], ['Products/Five/skel', ['Products/Five/skel/*']], ['Products/Five/tests', ['Products/Five/tests/*']], | def __init__(self, *attrs): Distribution.__init__(self, *attrs) self.cmdclass['build'] = MyBuilder self.cmdclass['build_ext'] = MyExtBuilder self.cmdclass['install_lib'] = MyLibInstaller | a6ae89ff7c1f501a5592e9d123362a4ad1a06e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a6ae89ff7c1f501a5592e9d123362a4ad1a06e37/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
7039,
4672,
17547,
16186,
2738,
972,
12,
2890,
16,
380,
7039,
13,
365,
18,
4172,
1106,
3292,
3510,
3546,
273,
8005,
1263,
365,
18,
4172,
1106,
3292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
7039,
4672,
17547,
16186,
2738,
972,
12,
2890,
16,
380,
7039,
13,
365,
18,
4172,
1106,
3292,
3510,
3546,
273,
8005,
1263,
365,
18,
4172,
1106,
3292,
... |
self.db.cursor().execute("create table foo(x)") | def testIssue31(self): # http://code.google.com/p/apsw/issues/detail?id=31 # The claim is that using the same connection in two threads # on Windows results in the main thread and the same # connection threads all hanging. | f0f139ca1c73176ffc374f8eb6f63ed6e2cd34b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/993/f0f139ca1c73176ffc374f8eb6f63ed6e2cd34b3/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12956,
6938,
12,
2890,
4672,
468,
1062,
2207,
710,
18,
9536,
18,
832,
19,
84,
19,
438,
5328,
19,
9618,
19,
8992,
35,
350,
33,
6938,
225,
468,
1021,
7516,
353,
716,
1450,
326,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12956,
6938,
12,
2890,
4672,
468,
1062,
2207,
710,
18,
9536,
18,
832,
19,
84,
19,
438,
5328,
19,
9618,
19,
8992,
35,
350,
33,
6938,
225,
468,
1021,
7516,
353,
716,
1450,
326,
1... | |
the normalized address as a 2-tuple. | the normalized address as a 4-tuple. | def _make_socket(self, addr=None, overwrite=False): """ Constructs a socket based on the given addr. Returns the socket and the normalized address as a 2-tuple. | 90682baa5ab5e105fb31ca84cac0f9a398304906 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11722/90682baa5ab5e105fb31ca84cac0f9a398304906/sockets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
7814,
12,
2890,
16,
3091,
33,
7036,
16,
6156,
33,
8381,
4672,
3536,
14291,
87,
279,
2987,
2511,
603,
326,
864,
3091,
18,
225,
2860,
326,
2987,
471,
326,
5640,
1758,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
7814,
12,
2890,
16,
3091,
33,
7036,
16,
6156,
33,
8381,
4672,
3536,
14291,
87,
279,
2987,
2511,
603,
326,
864,
3091,
18,
225,
2860,
326,
2987,
471,
326,
5640,
1758,
487,... |
if ids: | if ref_ids: | def _get_external_referential_id(self, cr, uid, ids, name, arg, context=None): res = {} for model_data in self.browse(cr, uid, ids, context): s = model_data.module.split('.') #we assume a module name with a '.' means external referential if len(s) > 1: ref_ids = self.pool.get('external.referential').search(cr, uid, [['name', '=', s[1]]]) if ids: res[model_data.id] = ref_ids[0] else: res[model_data.id] = False else: res[model_data.id] = False return res | d1f2c6fb773b58e149c1ad2413ee4d65b5702aa3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/d1f2c6fb773b58e149c1ad2413ee4d65b5702aa3/base_external_referentials.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
9375,
67,
266,
586,
2001,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
400,
273,
2618,
364,
938,
67,
892,
316,
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,
389,
588,
67,
9375,
67,
266,
586,
2001,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
400,
273,
2618,
364,
938,
67,
892,
316,
365,
18... |
self.CheckMenuBlock("EditRecurrence", "recurrence", dict[field]) | self.CheckMenuBlock("EditRecurrence", "recurrence", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() # call the check methods for field in dict.keys(): if field == "displayName": # display name checking self.CheckEditableBlock("HeadlineBlock", "display name", dict[field]) elif field == "startDate": # start date checking self.CheckEditableBlock("EditCalendarStartDate", "start date", self.formatDate(dict[field])) elif field == "startTime": # start time checking self.CheckEditableBlock("EditCalendarStartTime", "start time", dict[field]) elif field == "endDate": # end date checking self.CheckEditableBlock("EditCalendarEndDate", "end date", self.formatDate(dict[field])) elif field == "endTime": # end time checking self.CheckEditableBlock("EditCalendarEndTime", "end time", dict[field]) elif field == "location": # location checking self.CheckEditableBlock("CalendarLocation", "location", dict[field]) elif field == "body": # body checking self.CheckEditableBlock("NotesBlock", "body", dict[field]) elif field == "fromAddress": # from address checking self.CheckEditableBlock("EditMailFrom", "from address", dict[field]) elif field == "toAddress": # to address checking self.CheckEditableBlock("EditMailTo", "to address", dict[field]) elif field == "ccAddress": # cc address checking self.CheckEditableBlock("EditMailCc", "cc address", dict[field]) elif field == "bccAddress": # bcc address checking self.CheckEditableBlock("EditMailBcc", "bcc address", dict[field]) elif field == "status": # status checking self.CheckMenuBlock("EditTransparency", "status", dict[field]) elif field == "timeZone": # time zone checking self.CheckMenuBlock("EditTimeZone", "time-zone", dict[field]) elif field == "recurrence": # recurrence checking self.CheckMenuBlock("EditRecurrence", "recurrence", dict[field]) elif field == "recurrenceEnd": # recurrence end date checking self.CheckEditableBlock("EditRecurrenceEnd", "recurrence end", self.formatDate(dict[field])) elif field == "alarm": # status checking self.CheckMenuBlock("EditReminder", "alarm", dict[field]) elif field == "allDay": # status checking self.CheckEditableBlock("EditAllDay", "all-day", dict[field]) elif field == "stampMail": # Mail stamp checking self.CheckButton("MailMessageButton", "mail stamp", dict[field]) elif field == "stampTask": # Task stamp checking self.CheckButton("TaskStamp", "task stamp", dict[field]) elif field == "stampEvent": # Event stamp checking self.CheckButton("CalendarStamp", "calendar stamp", dict[field]) else: # Wrong check => set the report state to unchecked if self.logger: self.logger.SetChecked(False) #report the checkings if self.logger: self.logger.Report("Detail View") | 5c6ba404b99947f3210082287c79a9b81a402c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5c6ba404b99947f3210082287c79a9b81a402c26/QAUITestAppLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
67,
6109,
1767,
12,
2890,
16,
2065,
4672,
3536,
2073,
2665,
924,
635,
532,
20961,
358,
326,
501,
4314,
1601,
329,
316,
326,
7664,
1476,
632,
723,
2065,
294,
3880,
632,
891,
2065,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
67,
6109,
1767,
12,
2890,
16,
2065,
4672,
3536,
2073,
2665,
924,
635,
532,
20961,
358,
326,
501,
4314,
1601,
329,
316,
326,
7664,
1476,
632,
723,
2065,
294,
3880,
632,
891,
2065,
... |
while sections and level<sections[-1].level: | while sections and level<=sections[-1].level: | def create(): if current.start is None or current.endtitle is None: return False l1 = tokens[current.start].text.count("=") l2 = tokens[current.endtitle].text.count("=") level = min (l1, l2) | 935c3fb9132fb875d499bbbaaf7ddc22981e729b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12391/935c3fb9132fb875d499bbbaaf7ddc22981e729b/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
13332,
309,
783,
18,
1937,
353,
599,
578,
783,
18,
409,
2649,
353,
599,
30,
327,
1083,
225,
328,
21,
273,
2430,
63,
2972,
18,
1937,
8009,
955,
18,
1883,
2932,
1546,
13,
328,
22,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
13332,
309,
783,
18,
1937,
353,
599,
578,
783,
18,
409,
2649,
353,
599,
30,
327,
1083,
225,
328,
21,
273,
2430,
63,
2972,
18,
1937,
8009,
955,
18,
1883,
2932,
1546,
13,
328,
22,... |
relative importance of that node to its graph. Vertices that occur on more shortest paths between other nodes have higher betweenness than nodes that occur on less. | relative importance of that vertex to its graph. Vertices that occur on more shortest paths between other vertices have higher betweenness than vertices that occur on less. | def centrality_betweenness(self, normalized=True): r""" Returns the betweenness centrality (fraction of number of shortest paths that go through each node) as a dictionary keyed by vertices. The betweenness is normalized by default to be in range (0,1). This wraps Networkx's implementation of the algorithm described in [1]. Measures of the centrality of a vertex within a graph determine the relative importance of that node to its graph. Vertices that occur on more shortest paths between other nodes have higher betweenness than nodes that occur on less. INPUT: normalized -- boolean (default True) - if set to False, result is not normalized. REFERENCE: [1] Ulrik Brandes. (2003). Faster Evaluation of Shortest-Path Based Centrality Indices. [Online] Available: http://citeseer.nj.nec.com/brandes00faster.html EXAMPLES: sage: (graphs.ChvatalGraph()).centrality_betweenness() {0: 0.069696969696969688, 1: 0.069696969696969688, 2: 0.060606060606060601, 3: 0.060606060606060601, 4: 0.069696969696969688, 5: 0.069696969696969688, 6: 0.060606060606060601, 7: 0.060606060606060601, 8: 0.060606060606060601, 9: 0.060606060606060601, 10: 0.060606060606060601, 11: 0.060606060606060601} sage: (graphs.ChvatalGraph()).centrality_betweenness(normalized=False) {0: 7.6666666666666661, 1: 7.6666666666666661, 2: 6.6666666666666661, 3: 6.6666666666666661, 4: 7.6666666666666661, 5: 7.6666666666666661, 6: 6.6666666666666661, 7: 6.6666666666666661, 8: 6.6666666666666661, 9: 6.6666666666666661, 10: 6.6666666666666661, 11: 6.6666666666666661} sage: D = DiGraph({0:[1,2,3], 1:[2], 3:[0,1]}) sage.: D.show(figsize=[2,2]) sage: D = D.to_undirected() sage.: D.show(figsize=[2,2]) sage: D.centrality_betweenness() {0: 0.16666666666666666, 1: 0.16666666666666666, 2: 0.0, 3: 0.0} | 7d819cbf1df622e9f76b4801233dbb334f44d362 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7d819cbf1df622e9f76b4801233dbb334f44d362/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
8230,
7919,
67,
15019,
4496,
12,
2890,
16,
5640,
33,
5510,
4672,
436,
8395,
2860,
326,
3086,
4496,
276,
8230,
7919,
261,
16744,
434,
1300,
434,
20579,
2953,
716,
1960,
3059,
1517,
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,
276,
8230,
7919,
67,
15019,
4496,
12,
2890,
16,
5640,
33,
5510,
4672,
436,
8395,
2860,
326,
3086,
4496,
276,
8230,
7919,
261,
16744,
434,
1300,
434,
20579,
2953,
716,
1960,
3059,
1517,
7... |
if st.st_mode != change.mode: | if stat.S_IMODE(st.st_mode) != change.mode: | def __getitem__(self, key): if key in self: return dict.__getitem__(self, key) return key | 46628d63b0770d492a934b473c3dcbecd94e3a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10616/46628d63b0770d492a934b473c3dcbecd94e3a14/changes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
309,
498,
316,
365,
30,
327,
2065,
16186,
31571,
972,
12,
2890,
16,
498,
13,
327,
498,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
309,
498,
316,
365,
30,
327,
2065,
16186,
31571,
972,
12,
2890,
16,
498,
13,
327,
498,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
ec = g_self.space.getexecutioncontext() g_self.running = 1 | ec = self.space.getexecutioncontext() self.running = 1 | def next(g_self): if g_self.running: raise OperationError(self.w_ValueError, "generator already executing") ec = g_self.space.getexecutioncontext() | 8b87e80aa66eaef372ec7b69c8744ea46174e4bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/8b87e80aa66eaef372ec7b69c8744ea46174e4bf/trivial.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
75,
67,
2890,
4672,
309,
314,
67,
2890,
18,
8704,
30,
1002,
4189,
668,
12,
2890,
18,
91,
67,
23610,
16,
315,
8812,
1818,
11274,
7923,
6557,
273,
314,
67,
2890,
18,
2981,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
75,
67,
2890,
4672,
309,
314,
67,
2890,
18,
8704,
30,
1002,
4189,
668,
12,
2890,
18,
91,
67,
23610,
16,
315,
8812,
1818,
11274,
7923,
6557,
273,
314,
67,
2890,
18,
2981,
18... |
zinfo.CRC = crc32(bytes) | zinfo.CRC = crc32(bytes) & 0xffffffff | def writestr(self, zinfo_or_arcname, bytes): """Write a file into the archive. The contents is the string 'bytes'. 'zinfo_or_arcname' is either a ZipInfo instance or the name of the file in the archive.""" if not isinstance(zinfo_or_arcname, ZipInfo): zinfo = ZipInfo(filename=zinfo_or_arcname, date_time=time.localtime(time.time())[:6]) zinfo.compress_type = self.compression else: zinfo = zinfo_or_arcname | bf02e3bb21b2d75cba4ce409a14ae64dbc2dd6d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/bf02e3bb21b2d75cba4ce409a14ae64dbc2dd6d2/zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7262,
313,
12,
2890,
16,
998,
1376,
67,
280,
67,
11828,
529,
16,
1731,
4672,
3536,
3067,
279,
585,
1368,
326,
5052,
18,
225,
1021,
2939,
353,
326,
533,
296,
3890,
10332,
225,
296,
94,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7262,
313,
12,
2890,
16,
998,
1376,
67,
280,
67,
11828,
529,
16,
1731,
4672,
3536,
3067,
279,
585,
1368,
326,
5052,
18,
225,
1021,
2939,
353,
326,
533,
296,
3890,
10332,
225,
296,
94,
... |
purge): | purge, cache=cache): | def _getContentsAndSupercats(self, recurse=False, purge=False, startFrom=None, cache=[]): """ Cache results of _parseCategory for a second call. | 5afb2f2f9cd7b97e901eba042ad6c30778279e51 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/5afb2f2f9cd7b97e901eba042ad6c30778279e51/catlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
6323,
1876,
8051,
24750,
12,
2890,
16,
11502,
33,
8381,
16,
11668,
33,
8381,
16,
787,
1265,
33,
7036,
16,
1247,
33,
8526,
4672,
3536,
4379,
1686,
434,
389,
2670,
4457,
364,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6323,
1876,
8051,
24750,
12,
2890,
16,
11502,
33,
8381,
16,
11668,
33,
8381,
16,
787,
1265,
33,
7036,
16,
1247,
33,
8526,
4672,
3536,
4379,
1686,
434,
389,
2670,
4457,
364,
2... |
if milestone.has_key('date'): | if milestone.has_key('due'): | def write_utctime(name, value, params={}): write_prop(name, strftime('%Y%m%dT%H%M%SZ', value), params) | 4d2b3d40032e2ed086c9a6cc5b9c8cdae5a6c765 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4d2b3d40032e2ed086c9a6cc5b9c8cdae5a6c765/roadmap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
322,
21261,
12,
529,
16,
460,
16,
859,
12938,
4672,
1045,
67,
5986,
12,
529,
16,
10405,
29909,
61,
9,
81,
9,
23148,
9,
44,
9,
49,
9,
28830,
2187,
460,
3631,
859,
13,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
322,
21261,
12,
529,
16,
460,
16,
859,
12938,
4672,
1045,
67,
5986,
12,
529,
16,
10405,
29909,
61,
9,
81,
9,
23148,
9,
44,
9,
49,
9,
28830,
2187,
460,
3631,
859,
13,
2,
... |
if int(actual_size) == size: | if actual_size == size: | def is_uploaded(url, size): if url.startswith('http://TESTING/releases'): return True | 661e35ce029fd9f6319b4c73a431b8e13ac9521a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3006/661e35ce029fd9f6319b4c73a431b8e13ac9521a/release.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
23249,
12,
718,
16,
963,
4672,
309,
880,
18,
17514,
1918,
2668,
2505,
2207,
16961,
1360,
19,
28416,
11,
4672,
327,
1053,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
23249,
12,
718,
16,
963,
4672,
309,
880,
18,
17514,
1918,
2668,
2505,
2207,
16961,
1360,
19,
28416,
11,
4672,
327,
1053,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
s = shelve.open(self.fn, protocol=0) | def test_ascii_file_shelf(self): try: s = shelve.open(self.fn, protocol=0) s['key1'] = (1,2,3,4) self.assertEqual(s['key1'], (1,2,3,4)) s.close() finally: for f in glob.glob(self.fn+"*"): os.unlink(f) | dbb86a52dd4b50d221d9b67922e19b8215364f24 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/dbb86a52dd4b50d221d9b67922e19b8215364f24/test_shelve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9184,
67,
768,
67,
674,
19079,
12,
2890,
4672,
775,
30,
272,
3292,
856,
21,
3546,
273,
261,
21,
16,
22,
16,
23,
16,
24,
13,
365,
18,
11231,
5812,
12,
87,
3292,
856,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9184,
67,
768,
67,
674,
19079,
12,
2890,
4672,
775,
30,
272,
3292,
856,
21,
3546,
273,
261,
21,
16,
22,
16,
23,
16,
24,
13,
365,
18,
11231,
5812,
12,
87,
3292,
856,
21,
... | |
self.clockOffset = time.clock() - tele.timeStamp; | self.clockOffset = FOFilter(1.0, time.clock() - tele.timeStamp); self.avgReceptionLatency = FOFilter(0.1, 0.0) | def processTelemetry(self,tele): """message handler""" #update reception latency if self.clockOffset == None: self.clockOffset = time.clock() - tele.timeStamp; else: newOffset = time.clock() - tele.timeStamp diff = abs(self.clockOffset - newOffset) self.avgReceptionLatency = self.avgReceptionLatency * 0.9 + diff * 0.1 self.clockOffset = newOffset self.teles.append(tele) self.teles = self.teles[-3:] # keep last three tele's # so teles[-1] is current tele, # teles[-2] is previous one and so on self.numTeles += 1 if self.numTeles%20 == 0: self.printInfo() | 10ead6b4ff71585d050bce2c55777911a87c190e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5773/10ead6b4ff71585d050bce2c55777911a87c190e/cerebellum.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
56,
20483,
12,
2890,
16,
29170,
4672,
3536,
2150,
1838,
8395,
225,
468,
2725,
283,
472,
19518,
309,
365,
18,
18517,
2335,
422,
599,
30,
365,
18,
18517,
2335,
273,
17634,
1586,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
56,
20483,
12,
2890,
16,
29170,
4672,
3536,
2150,
1838,
8395,
225,
468,
2725,
283,
472,
19518,
309,
365,
18,
18517,
2335,
422,
599,
30,
365,
18,
18517,
2335,
273,
17634,
1586,
12,
... |
installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installable.png")) | def buildEntryComponent(self, name, details, description, packagename, state, selected = False): divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if state == 'installed': installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png")) return((name, details, description, packagename, state, installedpng, divpng, selected)) elif state == 'installable': installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installable.png")) return((name, details, description, packagename, state, installablepng, divpng, selected)) elif state == 'remove': removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) return((name, details, description, packagename, state, removepng, divpng, selected)) elif state == 'install': installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/install.png")) return((name, details, description, packagename, state, installpng, divpng, selected)) | 018534fa7bf9be0885b2ffc753d8d6fc5b56143c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/018534fa7bf9be0885b2ffc753d8d6fc5b56143c/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
1622,
1841,
12,
2890,
16,
508,
16,
3189,
16,
2477,
16,
2298,
346,
1069,
16,
919,
16,
3170,
273,
1083,
4672,
3739,
6446,
273,
4444,
21816,
1458,
12,
7097,
33,
5510,
16,
589,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
1622,
1841,
12,
2890,
16,
508,
16,
3189,
16,
2477,
16,
2298,
346,
1069,
16,
919,
16,
3170,
273,
1083,
4672,
3739,
6446,
273,
4444,
21816,
1458,
12,
7097,
33,
5510,
16,
589,
33,
... | |
'--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'quit.py') ] | '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'quit.py'),] | def runStartupPerfTests(options, timer, largeData=False, repeat=3, logger=log): """ Run startup time tests. >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', repeat=1) Creating repository for startup time tests /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log /.../RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', largeData=True) Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --restore=test_profile/__repository__.001 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup_with_large_calendar 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> options.tbox = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 <BLANKLINE> Startup [#TINDERBOX# Status = PASSED] OSAF_QA: Startup | ... | 0.00 #TINDERBOX# Testname = Startup #TINDERBOX# Status = PASSED #TINDERBOX# Time elapsed = 0.00 (seconds) - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ if repeat < 3: repeat = 3 # You can't get an accurate number otherwise # Create test repo if options.verbose: log('Creating repository for startup time tests') cmd = [ options.runchandler['release'], '--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'quit.py') ] if not largeData: cmd += ['--create'] timeout = 180 name = 'Startup' else: cmd += ['--restore=%s' % os.path.join(options.profileDir, '__repository__.001')] timeout = 600 name = 'Startup_with_large_calendar' if options.params: cmd += [ options.params ] if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=timeout, logger=logger) if result != 0: log('***Error exit code=%d, creating %s repository' % (result, name)) failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) # Time startup values = [] timeLog = os.path.join(options.profileDir, 'time.log') if not options.dryrun: if os.path.isfile(timeLog): os.remove(timeLog) cmd = [ timer, r'--format=%e', '-o', timeLog, options.runchandler['release'], '--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'end.py') ] if options.params: cmd += [ options.params ] if options.verbose: log(' '.join(cmd)) log(name.ljust(33), newline=' ') for _x in range(repeat): if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=180, logger=logger) if result == 0: if options.dryrun: line = '0.0' else: line = open(timeLog).readline()[:-1] try: value = float(line) except ValueError, e: log('| %s' % str(e)) failedTests.append(name) return True log(('%02.2f' % value).rjust(6), newline=' ') values.append(value) else: log('| failed') failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) else: values.sort() value = values[repeat/2] log(' | ', newline='') log(('%02.2f' % value).rjust(6) , newline='') log(u' \u00B1 '.encode('utf8'), newline='') # Unicode PLUS-MINUS SIGN log(('%02.2f' % stddev(values)).rjust(6)) if options.tbox: revision = getattr(build_lib.loadModuleFromFile(os.path.join(options.chandlerHome, 'version.py'), 'vmodule'), 'revision', '') log('') log('%s [#TINDERBOX# Status = PASSED]' % name) log('OSAF_QA: %s | %s | %02.2f' % (name, revision, value)) log('#TINDERBOX# Testname = %s' % name) log('#TINDERBOX# Status = PASSED') log('#TINDERBOX# Time elapsed = %02.2f (seconds)' % value) if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) return False | 134ce2a6ff32b988db479ade6fcf70a08aac23f5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/134ce2a6ff32b988db479ade6fcf70a08aac23f5/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
22178,
22016,
14650,
12,
2116,
16,
5441,
16,
7876,
751,
33,
8381,
16,
7666,
33,
23,
16,
1194,
33,
1330,
4672,
3536,
1939,
11850,
813,
7434,
18,
225,
4080,
702,
273,
1109,
1320,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22178,
22016,
14650,
12,
2116,
16,
5441,
16,
7876,
751,
33,
8381,
16,
7666,
33,
23,
16,
1194,
33,
1330,
4672,
3536,
1939,
11850,
813,
7434,
18,
225,
4080,
702,
273,
1109,
1320,
1... |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 523) else quickfix.StringField.__init__(self, 523, 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,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
4366,
13,
469,
30,
9549,
904,
18,
780,
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,
1,
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,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
4366,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738... |
>>> po = polib.pofile('tests/test_utf8.po') | >>> po = polib.pofile('tests/test_weird_occurrences.po') | def pofile(fpath, **kwargs): """ Convenience function that parse the po/pot file *fpath* and return a POFile instance. **Keyword arguments**: - *fpath*: string, full or relative path to the po/pot file to parse - *wrapwidth*: integer, the wrap width, only useful when -w option was passed to xgettext (optional, default to 78) - *autodetect_encoding*: boolean, if set to False the function will not try to detect the po file encoding (optional, default to True) - *encoding*: string, an encoding, only relevant if autodetect_encoding is set to False **Example**: >>> import polib >>> po = polib.pofile('tests/test_utf8.po') >>> po #doctest: +ELLIPSIS <POFile instance at ...> >>> import os, tempfile >>> for fname in ['test_iso-8859-15.po', 'test_utf8.po']: ... orig_po = polib.pofile('tests/'+fname) ... tmpf = tempfile.NamedTemporaryFile().name ... orig_po.save(tmpf) ... try: ... new_po = polib.pofile(tmpf) ... for old, new in zip(orig_po, new_po): ... if old.msgid != new.msgid: ... old.msgid ... new.msgid ... if old.msgstr != new.msgstr: ... old.msgid ... new.msgid ... finally: ... os.unlink(tmpf) """ if kwargs.get('autodetect_encoding', True) == True: enc = detect_encoding(fpath) else: enc = kwargs.get('encoding', default_encoding) parser = _POFileParser(fpath) instance = parser.parse() instance.wrapwidth = kwargs.get('wrapwidth', 78) instance.encoding = enc return instance | 5b72c6243b1389bfc8807cb9c9332502da07fe04 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9209/5b72c6243b1389bfc8807cb9c9332502da07fe04/polib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8275,
768,
12,
28900,
16,
2826,
4333,
4672,
3536,
735,
9080,
445,
716,
1109,
326,
8275,
19,
13130,
585,
380,
28900,
14,
471,
327,
279,
13803,
812,
791,
18,
225,
2826,
8736,
1775,
636,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8275,
768,
12,
28900,
16,
2826,
4333,
4672,
3536,
735,
9080,
445,
716,
1109,
326,
8275,
19,
13130,
585,
380,
28900,
14,
471,
327,
279,
13803,
812,
791,
18,
225,
2826,
8736,
1775,
636,
... |
from schooltool.basicperson.person import BasicPerson | def createPerson(self, data): from schooltool.basicperson.person import BasicPerson person = BasicPerson(data['__name__'], data['first_name'], data['last_name']) self.applyData(person, data) return person | e866f69737046ff6dd0ad5d28cbc44e235fb6cb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7127/e866f69737046ff6dd0ad5d28cbc44e235fb6cb3/importer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
8346,
12,
2890,
16,
501,
4672,
6175,
273,
7651,
8346,
12,
892,
3292,
972,
529,
972,
17337,
501,
3292,
3645,
67,
529,
17337,
501,
3292,
2722,
67,
529,
19486,
365,
18,
9010,
751,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
8346,
12,
2890,
16,
501,
4672,
6175,
273,
7651,
8346,
12,
892,
3292,
972,
529,
972,
17337,
501,
3292,
3645,
67,
529,
17337,
501,
3292,
2722,
67,
529,
19486,
365,
18,
9010,
751,
12... | |
self.__rows = rows self.__columns = columns | self.__rows = nrows self.__columns = ncols | def _(m = input_grid(2,2, default = [[1,7],[3,4]], label='M=', to_value=matrix), v = input_grid(2,1, default=[1,2], label='v=', to_value=matrix)): try: x = m\v html('$$%s %s = %s$$'%(latex(m), latex(x), latex(v))) except: html('There is no solution to $$%s x=%s$$'%(latex(m), latex(v))) | d309010c54ba9edf1e2bfc229ca66c5c4e85a709 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d309010c54ba9edf1e2bfc229ca66c5c4e85a709/interact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12,
81,
273,
810,
67,
5222,
12,
22,
16,
22,
16,
805,
273,
12167,
21,
16,
27,
6487,
63,
23,
16,
24,
65,
6487,
1433,
2218,
49,
33,
2187,
358,
67,
1132,
33,
5667,
3631,
331,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12,
81,
273,
810,
67,
5222,
12,
22,
16,
22,
16,
805,
273,
12167,
21,
16,
27,
6487,
63,
23,
16,
24,
65,
6487,
1433,
2218,
49,
33,
2187,
358,
67,
1132,
33,
5667,
3631,
331,
27... |
if not self.hook("changegroup"): | if not self.hook("changegroup", node=hex(self.changelog.node(cor+1))): self.ui.warn("abort: changegroup hook returned failure!\n") | def revmap(x): return self.changelog.rev(x) | 5bfe675dcfadeef7bc8562282f30b889984045b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/5bfe675dcfadeef7bc8562282f30b889984045b0/localrepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5588,
1458,
12,
92,
4672,
327,
365,
18,
24083,
12970,
18,
9083,
12,
92,
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,
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,
5588,
1458,
12,
92,
4672,
327,
365,
18,
24083,
12970,
18,
9083,
12,
92,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return string.replace(val, '%USERPROFILE%', os.environ['USERPROFILE']) | out = ctypes.create_string_buffer(4096) indata = ctypes.create_string_buffer(val) bytes = ctypes.windll.kernel32.ExpandEnvironmentStringsA(indata,out,4093) return out.value | def doExpand(val): # We can't use os.path.expandvars because that handles only # $foo and ${foo}-style vars, while Windows is lobbing us # %FOO%-style expansions. So just handle the special case of # %USERPROFILE%, which is what we'll be dealing with under normal # circumstances. # .. If USERPROFILE isn't defined, we're probably in a world of hurt # anyway. return string.replace(val, '%USERPROFILE%', os.environ['USERPROFILE']) | c80a4fa99544e1616bd94ccd13358a1eb891f62a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/c80a4fa99544e1616bd94ccd13358a1eb891f62a/platformcfg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
12271,
12,
1125,
4672,
468,
1660,
848,
1404,
999,
1140,
18,
803,
18,
12320,
4699,
2724,
716,
7372,
1338,
468,
271,
11351,
471,
3531,
11351,
14023,
4060,
4153,
16,
1323,
8202,
353,
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,
741,
12271,
12,
1125,
4672,
468,
1660,
848,
1404,
999,
1140,
18,
803,
18,
12320,
4699,
2724,
716,
7372,
1338,
468,
271,
11351,
471,
3531,
11351,
14023,
4060,
4153,
16,
1323,
8202,
353,
4... |
return paths_new, paths_edited, paths_stat | return files_new, files_edited, paths_stat | def attrs_equal(attrs, a, b): for attr in attrs: if getattr(a, attr) != getattr(b, attr): return False | 429032fa7a0adc75619ec1c9f5d039321108985f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10616/429032fa7a0adc75619ec1c9f5d039321108985f/dirindex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3422,
67,
9729,
12,
7039,
16,
279,
16,
324,
4672,
364,
1604,
316,
3422,
30,
309,
3869,
12,
69,
16,
1604,
13,
480,
3869,
12,
70,
16,
1604,
4672,
327,
1083,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3422,
67,
9729,
12,
7039,
16,
279,
16,
324,
4672,
364,
1604,
316,
3422,
30,
309,
3869,
12,
69,
16,
1604,
13,
480,
3869,
12,
70,
16,
1604,
4672,
327,
1083,
2,
-100,
-100,
-100,
-100,
... |
def _remove_empty_lines (text): """replace empty lines with lines of a single space. this works around a pango bug with wrong computation of line height for empty lines under cairo scales""" text = text.replace ("\n\n", "\n \n") if text.endswith ("\n"): text += " " return text | def _extents_intersect (ex1, ex2): if not ex1: return ex2 else: x1 = max (ex1[0], ex2[0]) y1 = max (ex1[1], ex2[1]) x2 = min (ex1[0] + ex1[2], ex2[0] + ex2[2]) y2 = min (ex1[1] + ex1[3], ex2[1] + ex2[3]) return [x1, y1, x2 - x1, y2 - y1] | 9fd84fa983fd32c081c9edfb2a02c844f13b0d49 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8139/9fd84fa983fd32c081c9edfb2a02c844f13b0d49/slippy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
408,
4877,
67,
12288,
261,
338,
21,
16,
431,
22,
4672,
225,
309,
486,
431,
21,
30,
327,
431,
22,
469,
30,
619,
21,
273,
943,
261,
338,
21,
63,
20,
6487,
431,
22,
63,
20,
571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
408,
4877,
67,
12288,
261,
338,
21,
16,
431,
22,
4672,
225,
309,
486,
431,
21,
30,
327,
431,
22,
469,
30,
619,
21,
273,
943,
261,
338,
21,
63,
20,
6487,
431,
22,
63,
20,
571... | |
__slots__ = ["kind", "name", "tags"] | __slots__ = OpCode.__slots__ + ["kind", "name", "tags"] | def Summary(self): """Generates a summary description of this opcode. | 4f05fd3bdb49a9f1628b9915afde3c0d83367f6d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/4f05fd3bdb49a9f1628b9915afde3c0d83367f6d/opcodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17967,
12,
2890,
4672,
3536,
6653,
279,
4916,
2477,
434,
333,
11396,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
17967,
12,
2890,
4672,
3536,
6653,
279,
4916,
2477,
434,
333,
11396,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
'zh': u'User', | def __init__(self): family.Family.__init__(self) self.name = 'uncyclopedia' | 5291e54d99c50e05679c62b06fbab03ab3f57e0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/5291e54d99c50e05679c62b06fbab03ab3f57e0d/uncyclopedia_family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
551,
93,
7550,
1845,
1155,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
551,
93,
7550,
1845,
1155,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
return UserBit.valid_objects().filter(user=self, verb__parent=GetNode("V/Flags/UserRole")).values_list('verb__name', flat=True).distinct() | retVal = UserBit.valid_objects().filter(user=self, verb__parent=GetNode("V/Flags/UserRole")).values_list('verb__name', flat=True).distinct() if len(retVal) == 0: UserBit.objects.create(user=self, verb=GetNode("V/Flags/UserRole/Student"), qsc=GetNode("Q")) retVal = UserBit.valid_objects().filter(user=self, verb__parent=GetNode("V/Flags/UserRole")).values_list('verb__name', flat=True).distinct() return retVal | def getUserTypes(self): """ Return the set of types for this user """ return UserBit.valid_objects().filter(user=self, verb__parent=GetNode("V/Flags/UserRole")).values_list('verb__name', flat=True).distinct() | 40cab0a387734eb4ad9775bce01083b94af16030 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/40cab0a387734eb4ad9775bce01083b94af16030/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4735,
2016,
12,
2890,
4672,
3536,
2000,
326,
444,
434,
1953,
364,
333,
729,
3536,
12197,
273,
2177,
5775,
18,
877,
67,
6911,
7675,
2188,
12,
1355,
33,
2890,
16,
6405,
972,
2938,
33,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4735,
2016,
12,
2890,
4672,
3536,
2000,
326,
444,
434,
1953,
364,
333,
729,
3536,
12197,
273,
2177,
5775,
18,
877,
67,
6911,
7675,
2188,
12,
1355,
33,
2890,
16,
6405,
972,
2938,
33,
96... |
temparray2 = Numeric.swapaxes(results,2,3) self.results = Numeric.swapaxes(temparray2,1,2) | temparray2 = Numeric.swapaxes(results[0],1,2) self.results = [ Numeric.swapaxes(temparray2,0,1) ] if unrestricted: temparray2 = Numeric.swapaxes(results[1],1,2) self.results.append(Numeric.swapaxes(temparray2, 0, 1)) | def calculate(self, indices=None, fupdate=0.05): """Perform an overlap population analysis given the results of a parser""" if not self.parser.parsed: self.parser.parse() | d4434ccfe35e2e0e1bfff88951117695a1323233 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/d4434ccfe35e2e0e1bfff88951117695a1323233/opa.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
12,
2890,
16,
4295,
33,
7036,
16,
284,
2725,
33,
20,
18,
6260,
4672,
3536,
4990,
392,
7227,
11209,
6285,
864,
326,
1686,
434,
279,
2082,
8395,
225,
309,
486,
365,
18,
4288,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
12,
2890,
16,
4295,
33,
7036,
16,
284,
2725,
33,
20,
18,
6260,
4672,
3536,
4990,
392,
7227,
11209,
6285,
864,
326,
1686,
434,
279,
2082,
8395,
225,
309,
486,
365,
18,
4288,
18,
... |
for ts,_ in testSuiteCache.values()]) | for ts,_ in testSuiteCache.values() if ts]) | def main(): global options from optparse import OptionParser, OptionGroup parser = OptionParser("usage: %prog [options] {file-or-path}") parser.add_option("-j", "--threads", dest="numThreads", metavar="N", help="Number of testing threads", type=int, action="store", default=None) group = OptionGroup(parser, "Output Format") # FIXME: I find these names very confusing, although I like the # functionality. group.add_option("-q", "--quiet", dest="quiet", help="Suppress no error output", action="store_true", default=False) group.add_option("-s", "--succinct", dest="succinct", help="Reduce amount of output", action="store_true", default=False) group.add_option("-v", "--verbose", dest="showOutput", help="Show all test output", action="store_true", default=False) group.add_option("", "--no-progress-bar", dest="useProgressBar", help="Do not use curses based progress bar", action="store_false", default=True) parser.add_option_group(group) group = OptionGroup(parser, "Test Execution") group.add_option("", "--path", dest="path", help="Additional paths to add to testing environment", action="append", type=str, default=[]) group.add_option("", "--vg", dest="useValgrind", help="Run tests under valgrind", action="store_true", default=False) group.add_option("", "--vg-arg", dest="valgrindArgs", metavar="ARG", help="Specify an extra argument for valgrind", type=str, action="append", default=[]) group.add_option("", "--time-tests", dest="timeTests", help="Track elapsed wall time for each test", action="store_true", default=False) group.add_option("", "--no-execute", dest="noExecute", help="Don't execute any tests (assume PASS)", action="store_true", default=False) parser.add_option_group(group) group = OptionGroup(parser, "Test Selection") group.add_option("", "--max-tests", dest="maxTests", metavar="N", help="Maximum number of tests to run", action="store", type=int, default=None) group.add_option("", "--max-time", dest="maxTime", metavar="N", help="Maximum time to spend testing (in seconds)", action="store", type=float, default=None) group.add_option("", "--shuffle", dest="shuffle", help="Run tests in random order", action="store_true", default=False) parser.add_option_group(group) group = OptionGroup(parser, "Debug and Experimental Options") group.add_option("", "--debug", dest="debug", help="Enable debugging (for 'lit' development)", action="store_true", default=False) group.add_option("", "--show-suites", dest="showSuites", help="Show discovered test suites", action="store_true", default=False) group.add_option("", "--no-tcl-as-sh", dest="useTclAsSh", help="Don't run Tcl scripts using 'sh'", action="store_false", default=True) parser.add_option_group(group) (opts, args) = parser.parse_args() if not args: parser.error('No inputs specified') if opts.numThreads is None: opts.numThreads = Util.detectCPUs() inputs = args # Create the global config object. litConfig = LitConfig.LitConfig(progname = os.path.basename(sys.argv[0]), path = opts.path, quiet = opts.quiet, useValgrind = opts.useValgrind, valgrindArgs = opts.valgrindArgs, useTclAsSh = opts.useTclAsSh, noExecute = opts.noExecute, debug = opts.debug, isWindows = (platform.system()=='Windows')) # Load the tests from the inputs. tests = [] testSuiteCache = {} localConfigCache = {} for input in inputs: prev = len(tests) tests.extend(getTests(input, litConfig, testSuiteCache, localConfigCache)) if prev == len(tests): litConfig.warning('input %r contained no tests' % input) # If there were any errors during test discovery, exit now. if litConfig.numErrors: print >>sys.stderr, '%d errors, exiting.' % litConfig.numErrors sys.exit(2) if opts.showSuites: suitesAndTests = dict([(ts,[]) for ts,_ in testSuiteCache.values()]) for t in tests: suitesAndTests[t.suite].append(t) print '-- Test Suites --' suitesAndTests = suitesAndTests.items() suitesAndTests.sort(key = lambda (ts,_): ts.name) for ts,tests in suitesAndTests: print ' %s - %d tests' %(ts.name, len(tests)) print ' Source Root: %s' % ts.source_root print ' Exec Root : %s' % ts.exec_root # Select and order the tests. numTotalTests = len(tests) if opts.shuffle: random.shuffle(tests) else: tests.sort(key = lambda t: t.getFullName()) if opts.maxTests is not None: tests = tests[:opts.maxTests] extra = '' if len(tests) != numTotalTests: extra = ' of %d' % numTotalTests header = '-- Testing: %d%s tests, %d threads --'%(len(tests),extra, opts.numThreads) progressBar = None if not opts.quiet: if opts.succinct and opts.useProgressBar: try: tc = ProgressBar.TerminalController() progressBar = ProgressBar.ProgressBar(tc, header) except ValueError: print header progressBar = ProgressBar.SimpleProgressBar('Testing: ') else: print header # Don't create more threads than tests. opts.numThreads = min(len(tests), opts.numThreads) startTime = time.time() display = TestingProgressDisplay(opts, len(tests), progressBar) provider = TestProvider(tests, opts.maxTime) runTests(opts.numThreads, litConfig, provider, display) display.finish() if not opts.quiet: print 'Testing Time: %.2fs'%(time.time() - startTime) # Update results for any tests which weren't run. for t in tests: if t.result is None: t.setResult(Test.UNRESOLVED, '', 0.0) # List test results organized by kind. hasFailures = False byCode = {} for t in tests: if t.result not in byCode: byCode[t.result] = [] byCode[t.result].append(t) if t.result.isFailure: hasFailures = True # FIXME: Show unresolved and (optionally) unsupported tests. for title,code in (('Unexpected Passing Tests', Test.XPASS), ('Failing Tests', Test.FAIL)): elts = byCode.get(code) if not elts: continue print '*'*20 print '%s (%d):' % (title, len(elts)) for t in elts: print ' %s' % t.getFullName() print if opts.timeTests: byTime = list(tests) byTime.sort(key = lambda t: t.elapsed) if byTime: Util.printHistogram([(t.getFullName(), t.elapsed) for t in byTime], title='Tests') for name,code in (('Expected Passes ', Test.PASS), ('Expected Failures ', Test.XFAIL), ('Unsupported Tests ', Test.UNSUPPORTED), ('Unresolved Tests ', Test.UNRESOLVED), ('Unexpected Passes ', Test.XPASS), ('Unexpected Failures', Test.FAIL),): if opts.quiet and not code.isFailure: continue N = len(byCode.get(code,[])) if N: print ' %s: %d' % (name,N) # If we encountered any additional errors, exit abnormally. if litConfig.numErrors: print >>sys.stderr, '\n%d error(s), exiting.' % litConfig.numErrors sys.exit(2) # Warn about warnings. if litConfig.numWarnings: print >>sys.stderr, '\n%d warning(s) in tests.' % litConfig.numWarnings if hasFailures: sys.exit(1) sys.exit(0) | 83410aa8c59837bafd2fcab76c33abd14e72b5c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6277/83410aa8c59837bafd2fcab76c33abd14e72b5c1/lit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
702,
628,
2153,
2670,
1930,
18862,
16,
2698,
1114,
2082,
273,
18862,
2932,
9167,
30,
738,
14654,
306,
2116,
65,
288,
768,
17,
280,
17,
803,
1532,
13,
225,
2082,
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,
2774,
13332,
2552,
702,
628,
2153,
2670,
1930,
18862,
16,
2698,
1114,
2082,
273,
18862,
2932,
9167,
30,
738,
14654,
306,
2116,
65,
288,
768,
17,
280,
17,
803,
1532,
13,
225,
2082,
18,
... |
def _youtube_get_first_successful(info, current_url, urls, callback, title): if isinstance(info, httpclient.UnexpectedStatusCode): if info.code != 404: _youtube_errback(info, callback) return if len(urls) == 0: callback(None) return current_url, urls = urls[0], urls[1:] logging.debug("youtube download: trying %s", current_url) httpclient.grab_headers( current_url, lambda x: _youtube_get_first_successful(x, current_url, urls, callback, title), lambda x: _youtube_get_first_successful(x, current_url, urls, callback, title)) return if info.get("content-type"): callback(current_url, unicode(info["content-type"]), title=title) else: callback(current_url, title=title) | def _youtube_get_first_successful(info, current_url, urls, callback, title): if isinstance(info, httpclient.UnexpectedStatusCode): if info.code != 404: _youtube_errback(info, callback) return if len(urls) == 0: callback(None) return current_url, urls = urls[0], urls[1:] logging.debug("youtube download: trying %s", current_url) httpclient.grab_headers( current_url, lambda x: _youtube_get_first_successful(x, current_url, urls, callback, title), lambda x: _youtube_get_first_successful(x, current_url, urls, callback, title)) return if info.get("content-type"): callback(current_url, unicode(info["content-type"]), title=title) else: callback(current_url, title=title) | 6ef78b0a872ee19d61d898e0f1e36c4c0b38a7bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/6ef78b0a872ee19d61d898e0f1e36c4c0b38a7bd/flashscraper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
31749,
67,
588,
67,
3645,
67,
18418,
12,
1376,
16,
783,
67,
718,
16,
6903,
16,
1348,
16,
2077,
4672,
309,
1549,
12,
1376,
16,
1062,
2625,
18,
7762,
14041,
4672,
309,
1123,
18,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
31749,
67,
588,
67,
3645,
67,
18418,
12,
1376,
16,
783,
67,
718,
16,
6903,
16,
1348,
16,
2077,
4672,
309,
1549,
12,
1376,
16,
1062,
2625,
18,
7762,
14041,
4672,
309,
1123,
18,
7... | |
inc_dir = base else: inc_dir = os.path.join(base, "Include") if not os.path.exists(inc_dir): inc_dir = os.path.join(os.path.dirname(base), "Include") return inc_dir | return base else: incdir = os.path.join(get_config_var('srcdir'), 'Include') return os.path.normpath(incdir) | def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pyconfig.h). If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: base = os.path.dirname(os.path.abspath(sys.executable)) if plat_specific: inc_dir = base else: inc_dir = os.path.join(base, "Include") if not os.path.exists(inc_dir): inc_dir = os.path.join(os.path.dirname(base), "Include") return inc_dir return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "mac": if plat_specific: return os.path.join(prefix, "Mac", "Include") else: return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: raise DistutilsPlatformError( "I don't know where Python installs its C header files " "on platform '%s'" % os.name) | 341b840382f386066571d3b6a6c0531bf68fc1ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/341b840382f386066571d3b6a6c0531bf68fc1ab/sysconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8103,
67,
9523,
12,
412,
270,
67,
12524,
33,
20,
16,
1633,
33,
7036,
4672,
3536,
990,
326,
1867,
4191,
5876,
6600,
1446,
1390,
18,
225,
971,
296,
412,
270,
67,
12524,
11,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8103,
67,
9523,
12,
412,
270,
67,
12524,
33,
20,
16,
1633,
33,
7036,
4672,
3536,
990,
326,
1867,
4191,
5876,
6600,
1446,
1390,
18,
225,
971,
296,
412,
270,
67,
12524,
11,
35... |
bss.anisotropic_scaling=save_bss_anisotropic_scaling | assert save_bss_anisotropic_scaling is not None bss.anisotropic_scaling = save_bss_anisotropic_scaling bss.minimization_b_cart = save_bss_anisotropic_scaling | def __init__(self, fmodel, selections = None, params = None, r_initial = None, t_initial = None, bss = None, log = None, monitors = None): global time_rigid_body_total self.params = params if(params is None): self.params = fmodel_from_xray_structure_master_params.extract() save_original_target_name = fmodel.target_name timer_rigid_body_total = user_plus_sys_time() save_r_work = fmodel.r_work() save_r_free = fmodel.r_free() save_xray_structure = fmodel.xray_structure.deep_copy_scatterers() if(log is None): log = sys.stdout if(selections is None): selections = [] selections.append(flex.bool( fmodel.xray_structure.scatterers().size(), True).iselection()) else: assert len(selections) > 0 fmodel.xray_structure.scatterers().flags_set_grads(state=False) fmodel.xray_structure.scatterers().flags_set_grad_site( iselection = flex.bool(fmodel.xray_structure.scatterers().size(), True ).iselection()) self.total_rotation = [] self.total_translation = [] for item in selections: self.total_rotation.append(flex.double(3,0)) self.total_translation.append(flex.double(3,0)) if(r_initial is None): r_initial = [] for item in selections: r_initial.append(flex.double(3,0)) if(t_initial is None): t_initial = [] for item in selections: t_initial.append(flex.double(3,0)) fmodel_copy = fmodel.deep_copy() if(fmodel_copy.mask_params is not None): fmodel_copy.mask_params.verbose = -1 d_mins, target_names = split_resolution_range( d_spacings = fmodel_copy.f_obs_w.d_spacings().data(), n_bodies = len(selections), target = params.target, target_auto_switch_resolution = params.target_auto_switch_resolution, n_ref_first = params.min_number_of_reflections, multi_body_factor_n_ref_first = params.multi_body_factor, d_low = params.max_low_high_res_limit, d_high = params.high_resolution, number_of_zones = params.number_of_zones, zone_exponent = params.zone_exponent, log = log) print >> log if (fmodel.target_name != target_names[0]): fmodel.update(target_name=target_names[0]) self.show(fmodel = fmodel, r_mat = self.total_rotation, t_vec = self.total_translation, header = "Start", out = log) if (params.number_of_zones == 1 or monitors is None): monitors_call_back_after_collect = None else: monitors_call_back_after_collect = monitors.call_back_after_collect if (monitors_call_back_after_collect is not None): monitors_call_back_after_collect( monitor=None, model=None, fmodel=fmodel) for res,target_name in zip(d_mins, target_names): xrs = fmodel_copy.xray_structure.deep_copy_scatterers() fmodel_copy = fmodel.resolution_filter(d_min = res) if (fmodel_copy.target_name != target_name): fmodel_copy.update(target_name=target_name) d_max_min = fmodel_copy.f_obs_w.d_max_min() line = "Refinement at resolution: "+\ str("%7.2f"%d_max_min[0]).strip() + " - " \ + str("%6.2f"%d_max_min[1]).strip() \ + " target=" + fmodel_copy.target_name print_statistics.make_sub_header(line, out = log) fmodel_copy.update_xray_structure(xray_structure = xrs, update_f_calc = True) rworks = flex.double() if(len(d_mins) == 1): n_rigid_body_minimizer_cycles = 1 else: n_rigid_body_minimizer_cycles = min(int(res),4) for i_macro_cycle in xrange(n_rigid_body_minimizer_cycles): if(bss is not None and params.bulk_solvent_and_scale): if(fmodel_copy.f_obs.d_min() > 3.0): save_bss_anisotropic_scaling = bss.anisotropic_scaling bss.anisotropic_scaling=False fmodel_copy.update_solvent_and_scale(params = bss, out = log, verbose = -1) if(fmodel_copy.f_obs.d_min() > 3.0): bss.anisotropic_scaling=save_bss_anisotropic_scaling minimized = rigid_body_minimizer( fmodel = fmodel_copy, selections = selections, r_initial = r_initial, t_initial = t_initial, refine_r = params.refine_rotation, refine_t = params.refine_translation, max_iterations = params.max_iterations, euler_angle_convention = params.euler_angle_convention, lbfgs_maxfev = params.lbfgs_line_search_max_function_evaluations) rotation_matrices = [] translation_vectors = [] for i in xrange(len(selections)): self.total_rotation[i] += flex.double(minimized.r_min[i]) self.total_translation[i] += flex.double(minimized.t_min[i]) rot_obj = euler(phi = minimized.r_min[i][0], psi = minimized.r_min[i][1], the = minimized.r_min[i][2], convention = params.euler_angle_convention) rotation_matrices.append(rot_obj.rot_mat()) translation_vectors.append(minimized.t_min[i]) new_xrs = apply_transformation( xray_structure = minimized.fmodel.xray_structure, rotation_matrices = rotation_matrices, translation_vectors = translation_vectors, selections = selections) fmodel_copy.update_xray_structure(xray_structure = new_xrs, update_f_calc = True, update_f_mask = True, out = log) rwork = minimized.fmodel.r_work() rfree = minimized.fmodel.r_free() assert approx_equal(rwork, fmodel_copy.r_work()) fmodel.update_xray_structure( xray_structure = fmodel_copy.xray_structure, update_f_calc = True, update_f_mask = True, out = log) if(bss is not None and params.bulk_solvent_and_scale): fmodel.update_solvent_and_scale(params = bss, out = log, verbose= -1) self.show(fmodel = fmodel, r_mat = self.total_rotation, t_vec = self.total_translation, header = "Rigid body refinement", out = log) if (monitors_call_back_after_collect is not None): monitors_call_back_after_collect( monitor=None, model=None, fmodel=fmodel) if(bss is not None and params.bulk_solvent_and_scale): fmodel.update_solvent_and_scale(out = log, verbose = -1) print >> log self.show(fmodel = fmodel, r_mat = self.total_rotation, t_vec = self.total_translation, header = "Rigid body end", out = log) print >> log self.evaluate_after_end(fmodel, save_r_work, save_r_free, save_xray_structure, log) self.fmodel = fmodel self.fmodel.update(target_name = save_original_target_name) time_rigid_body_total += timer_rigid_body_total.elapsed() | a1286dfa760c61de0eaae982b0edee6f39281e3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/a1286dfa760c61de0eaae982b0edee6f39281e3d/rigid_body.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
284,
2284,
16,
21738,
273,
599,
16,
859,
377,
273,
599,
16,
436,
67,
6769,
225,
273,
599,
16,
268,
67,
6769,
225,
273,
599,
16,
324,
1049,
3639,
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,
1001,
2738,
972,
12,
2890,
16,
284,
2284,
16,
21738,
273,
599,
16,
859,
377,
273,
599,
16,
436,
67,
6769,
225,
273,
599,
16,
268,
67,
6769,
225,
273,
599,
16,
324,
1049,
3639,
273,
... |
del req.args['owner'] | del req.args['field_owner'] | def process_newticket_request(self, req): req.perm.require('TICKET_CREATE') data = {} db = self.env.get_db_cnx() | daeaacb4a8d7e14bcd4491b18a83e37c26c94ecb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/daeaacb4a8d7e14bcd4491b18a83e37c26c94ecb/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2704,
16282,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
6528,
2668,
56,
16656,
1584,
67,
9344,
6134,
501,
273,
2618,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
67,
2704,
16282,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
6528,
2668,
56,
16656,
1584,
67,
9344,
6134,
501,
273,
2618,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966... |
sage: print "Test finished !" Test finished ! TESTS:: | ValueError: algorithm must be either 'backtrack' or 'MILP' | def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``. | 815c98d316de2356ea416011f877811bcf39fae3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/815c98d316de2356ea416011f877811bcf39fae3/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12163,
67,
803,
12,
2890,
16,
272,
273,
599,
16,
268,
273,
599,
16,
13747,
273,
1083,
16,
4886,
273,
315,
49,
2627,
52,
3113,
12776,
273,
599,
16,
3988,
273,
374,
4672,
436,
8395,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12163,
67,
803,
12,
2890,
16,
272,
273,
599,
16,
268,
273,
599,
16,
13747,
273,
1083,
16,
4886,
273,
315,
49,
2627,
52,
3113,
12776,
273,
599,
16,
3988,
273,
374,
4672,
436,
8395,
28... |
setup(name = 'poly2d', | setup( | def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('poly2d', parent_package, top_path, package_path =_root_dir) # -- Add `_poly2d` extension module. src_files = ['_poly2d.pyx'] src_files = [join(_src_dir, f) for f in src_files] config.add_extension('_poly2d', sources=src_files, include_dirs=[_src_dir]) # -- Add `tests` directory. config.add_data_dir(('tests', join(_root_dir, 'tests'))) return config | 534425c7c4b52e8df589df54c5158e3288dad5f2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14911/534425c7c4b52e8df589df54c5158e3288dad5f2/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1664,
12,
2938,
67,
5610,
2218,
2187,
1760,
67,
803,
33,
7036,
4672,
628,
3972,
18,
4413,
5471,
18,
23667,
67,
1367,
1930,
4659,
225,
642,
273,
4659,
2668,
16353,
22,
72,
2187,
982,
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,
1664,
12,
2938,
67,
5610,
2218,
2187,
1760,
67,
803,
33,
7036,
4672,
628,
3972,
18,
4413,
5471,
18,
23667,
67,
1367,
1930,
4659,
225,
642,
273,
4659,
2668,
16353,
22,
72,
2187,
982,
67... |
return S_ERROR( error) | return S_ERROR( error ) | def configureCE( ceName='',ceType='', cfg=None, currentSectionPath='' ): """ Produce new dirac.cfg including configuration for new CE """ from DIRAC.Resources.Computing.ComputingElementFactory import ComputingElementFactory from DIRAC.Resources.Computing.ComputingElement import getLocalCEConfigDict from DIRAC import gConfig cesCfg = ResourcesDefaults.getComputingElementDefaults( ceName, ceType, cfg, currentSectionPath ) ceNameList = cesCfg.listSections() if not ceNameList: error = 'No CE Name provided' gLogger.error( error ) if exitOnError: exit( -1 ) return S_ERROR( error) for ceName in ceNameList: if 'CEType' not in cesCfg[ceName]: error = 'Missing Type for CE "%s"' % ceName gLogger.error( error ) if exitOnError: exit( -1 ) return S_ERROR( error) localsiteCfg = localCfg['LocalSite'] # Replace Configuration under LocalSite with new Configuration for ceName in ceNameList: if localsiteCfg.existsKey( ceName ): gLogger.notice(' Removing existing CE:', ceName ) localsiteCfg.deleteKey( ceName ) gLogger.notice( 'Configuring CE:', ceName ) localsiteCfg.createNewSection( ceName, contents=cesCfg[ceName] ) # Apply configuration and try to instantiate the CEs gConfig.loadCFG( localCfg ) for ceName in ceNameList: ceFactory = ComputingElementFactory( ) try: ceInstance = ceFactory.getCE(ceType, ceName) except Exception, x: error = 'Fail to instantiate CE' gLogger.exception(error) if exitOnError: exit( -1 ) return S_ERROR( error) if not ceInstance['OK']: error = 'Fail to instantiate CE: %s' % ceInstance['Message'] gLogger.error(error) if exitOnError: exit( -1 ) return S_ERROR( error) # Everything is OK, we can save the new cfg localCfg.writeToFile( cfgFile ) gLogger.always( 'LocalSite section in %s has been uptdated with new configuration:' % os.path.basename(cfgFile) ) gLogger.always( str( localCfg['LocalSite'] ) ) return S_OK( ceNameList ) | 9cd965a8f6afefefa23e4aaa683056b6432068d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9cd965a8f6afefefa23e4aaa683056b6432068d8/InstallTools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
1441,
12,
5898,
461,
2218,
2187,
311,
559,
2218,
2187,
2776,
33,
7036,
16,
783,
5285,
743,
2218,
11,
262,
30,
3536,
23278,
394,
4314,
8836,
18,
7066,
6508,
1664,
364,
394,
29538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
1441,
12,
5898,
461,
2218,
2187,
311,
559,
2218,
2187,
2776,
33,
7036,
16,
783,
5285,
743,
2218,
11,
262,
30,
3536,
23278,
394,
4314,
8836,
18,
7066,
6508,
1664,
364,
394,
29538,
... |
print action, request | def __call__(self, environ, start_response): from webob import Request request = Request(environ) | ea9db19fdf3a98a72b6d1592c5a6f400959ee52c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4277/ea9db19fdf3a98a72b6d1592c5a6f400959ee52c/snakeroutes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
5473,
16,
787,
67,
2740,
4672,
628,
3311,
947,
1930,
1567,
590,
273,
1567,
12,
28684,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
5473,
16,
787,
67,
2740,
4672,
628,
3311,
947,
1930,
1567,
590,
273,
1567,
12,
28684,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE') | self._waitThreads() for i in range(4): self.failUnlessEqual(self.done.get_nowait(), 'DONE') | def testConcurrentRemove(self): self.ls.add('four') self.ls.acquire(['one', 'two', 'four']) Thread(target=self._doLockSet, args=(['one', 'four'], 0)).start() Thread(target=self._doLockSet, args=(['one', 'four'], 1)).start() Thread(target=self._doLockSet, args=(['one', 'two'], 0)).start() Thread(target=self._doLockSet, args=(['one', 'two'], 1)).start() self.assertRaises(Queue.Empty, self.done.get, True, 0.2) self.ls.remove('one') self.ls.release() self.assertEqual(self.done.get(True, 1), 'ERR') self.assertEqual(self.done.get(True, 1), 'ERR') self.assertEqual(self.done.get(True, 1), 'ERR') self.assertEqual(self.done.get(True, 1), 'ERR') self.ls.add(['five', 'six'], acquired=1) Thread(target=self._doLockSet, args=(['three', 'six'], 1)).start() Thread(target=self._doLockSet, args=(['three', 'six'], 0)).start() Thread(target=self._doLockSet, args=(['four', 'six'], 1)).start() Thread(target=self._doLockSet, args=(['four', 'six'], 0)).start() self.ls.remove('five') self.ls.release() self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE') self.ls.acquire(['three', 'four']) Thread(target=self._doRemoveSet, args=(['four', 'six'], )).start() self.assertRaises(Queue.Empty, self.done.get, True, 0.2) self.ls.remove('four') self.assertEqual(self.done.get(True, 1), ['six']) Thread(target=self._doRemoveSet, args=(['two'])).start() self.assertEqual(self.done.get(True, 1), ['two']) self.ls.release() | 4607c978b8f973b63c49547f1b8d6061fdbd78d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/4607c978b8f973b63c49547f1b8d6061fdbd78d3/ganeti.locking_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
18521,
3288,
12,
2890,
4672,
365,
18,
3251,
18,
1289,
2668,
74,
477,
6134,
365,
18,
3251,
18,
1077,
1039,
12,
3292,
476,
2187,
296,
15415,
2187,
296,
74,
477,
19486,
4884,
12,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
18521,
3288,
12,
2890,
4672,
365,
18,
3251,
18,
1289,
2668,
74,
477,
6134,
365,
18,
3251,
18,
1077,
1039,
12,
3292,
476,
2187,
296,
15415,
2187,
296,
74,
477,
19486,
4884,
12,
32... |
g = self.__class__(s, self._mangle_from_, self.__maxheaderlen) | g = self.clone(s) | def _handle_message(self, msg): s = StringIO() g = self.__class__(s, self._mangle_from_, self.__maxheaderlen) # The payload of a message/rfc822 part should be a multipart sequence # of length 1. The zeroth element of the list should be the Message # object for the subpart.Extract that object, stringify it, and write # that out. g.flatten(msg.get_payload(0), unixfrom=0) self._fp.write(s.getvalue()) | ee084c72c49e60af052e272006f74cb07fc13eb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ee084c72c49e60af052e272006f74cb07fc13eb2/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
2150,
12,
2890,
16,
1234,
4672,
272,
273,
15777,
1435,
314,
273,
365,
18,
14056,
12,
87,
13,
468,
1021,
2385,
434,
279,
883,
19,
16784,
24532,
1087,
1410,
506,
279,
1026... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
2150,
12,
2890,
16,
1234,
4672,
272,
273,
15777,
1435,
314,
273,
365,
18,
14056,
12,
87,
13,
468,
1021,
2385,
434,
279,
883,
19,
16784,
24532,
1087,
1410,
506,
279,
1026... |
self.WriteConf() | self.changed = True | def ChangeParent(self, name, parent): """ Change keyword's parent """ try: self.keywords[parent] self.keywords[name]["parent"] = parent except KeyError, e: raise exceptions.BadArgumentError("The keyword %s doesn't exist on this system." % str(e)) self.WriteConf() | 79be33ad35e5abf9b9e98709a8fa8bad16c9097b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/79be33ad35e5abf9b9e98709a8fa8bad16c9097b/keywords.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7576,
3054,
12,
2890,
16,
508,
16,
982,
4672,
3536,
7576,
4932,
1807,
982,
3536,
775,
30,
365,
18,
11771,
63,
2938,
65,
365,
18,
11771,
63,
529,
6362,
6,
2938,
11929,
273,
982,
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,
7576,
3054,
12,
2890,
16,
508,
16,
982,
4672,
3536,
7576,
4932,
1807,
982,
3536,
775,
30,
365,
18,
11771,
63,
2938,
65,
365,
18,
11771,
63,
529,
6362,
6,
2938,
11929,
273,
982,
1335,
... |
replacements.append(arg) if source == None or len(replacements) != 2: | commandline_replacements.append(arg) if source == None: | def generator(source, old, regex, textfilename = None, sqlfilename = None): if source == 'sqldump': for pl in read_pages_from_sql_dump(sqlfilename, old, regex): yield pl elif source == 'textfile': for pl in read_pages_from_text_file(textfilename, old, regex): yield pl | d3596dc42562932cbc3b84fdd463983c3a41dcb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/d3596dc42562932cbc3b84fdd463983c3a41dcb7/replace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4456,
12,
3168,
16,
1592,
16,
3936,
16,
977,
3459,
273,
599,
16,
1847,
3459,
273,
599,
4672,
309,
1084,
422,
296,
4669,
8481,
4278,
364,
886,
316,
855,
67,
7267,
67,
2080,
67,
4669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3168,
16,
1592,
16,
3936,
16,
977,
3459,
273,
599,
16,
1847,
3459,
273,
599,
4672,
309,
1084,
422,
296,
4669,
8481,
4278,
364,
886,
316,
855,
67,
7267,
67,
2080,
67,
4669,
... |
self.parent_dir(None) | self.browse_parent_dir(None) | def topwindow_keypress(self, widget, event): shortcut = gtk.accelerator_name(event.keyval, event.state) shortcut = shortcut.replace("<Mod2>", "") # These shortcuts were moved here so that they don't # interfere with searching the library if shortcut == 'BackSpace': self.parent_dir(None) elif shortcut == 'Escape': if self.minimize_to_systray: if HAVE_STATUS_ICON and self.statusicon.is_embedded() and self.statusicon.get_visible(): self.withdraw_app() elif HAVE_EGG and self.trayicon.get_property('visible') == True: self.withdraw_app() elif shortcut == 'Delete': self.remove(None) | ef335bb5758783289bea4a5b77282ae0c87d687a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/ef335bb5758783289bea4a5b77282ae0c87d687a/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1760,
5668,
67,
856,
1028,
12,
2890,
16,
3604,
16,
871,
4672,
10995,
273,
22718,
18,
30737,
7385,
67,
529,
12,
2575,
18,
856,
1125,
16,
871,
18,
2019,
13,
10995,
273,
10995,
18,
2079,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1760,
5668,
67,
856,
1028,
12,
2890,
16,
3604,
16,
871,
4672,
10995,
273,
22718,
18,
30737,
7385,
67,
529,
12,
2575,
18,
856,
1125,
16,
871,
18,
2019,
13,
10995,
273,
10995,
18,
2079,
... |
self.calendarColor = Styles.ColorStyle(self.itsView) | hueList = [k/360.0 for k in [210, 120, 60, 0, 240, 90, 330, 30, 180, 270]] @classmethod def getNextHue(cls, oldhue): """ returns the next hue following the one passed in For example, f.hue = nextHue(f.hue) """ found = False for hue in cls.hueList: if found: return hue if hue == oldhue: found = True return cls.hueList[0] def _setEventColor(self, color): self.calendarColor.backgroundColor = color try: del self.eventHue except AttributeError: pass def _getEventColor(self): return self.calendarColor.backgroundColor eventColor = property(_getEventColor, _setEventColor) @CachedAttribute def eventHue(self): c = self.eventColor rgbvalues = (c.red, c.green, c.blue) hsv = rgb_to_hsv(*color2rgb(*rgbvalues)) return hsv[0] def tintedColor(saturation, value = 1.0): def getSaturatedColor(self): hsv = (self.eventHue, saturation, value) return rgb2color(*hsv_to_rgb(*hsv)) return property(getSaturatedColor) gradientLeft = tintedColor(0.4) gradientRight = tintedColor(0.2) outlineColor = tintedColor(0.5) textColor = tintedColor(0.67, 0.6) selectedGradientLeft = tintedColor(0.15) selectedGradientRight = tintedColor(0.05) selectedOutlineColor = tintedColor(0.5) selectedTextColor = tintedColor(0.67, 0.6) visibleGradientLeft = tintedColor(0.4) visibleGradientRight = tintedColor(0.4) visibleOutlineColor = tintedColor(0.3) visibleTextColor = tintedColor(0.5) | def __init__(self, *args, **keywords): super(CalendarData, self).__init__(*args, **keywords) self.calendarColor = Styles.ColorStyle(self.itsView) | 25ddad0361cdcff8c6c9b1849cc3d6061261e934 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/25ddad0361cdcff8c6c9b1849cc3d6061261e934/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
11771,
4672,
2240,
12,
7335,
751,
16,
365,
2934,
972,
2738,
972,
30857,
1968,
16,
2826,
11771,
13,
282,
16846,
682,
273,
306,
79,
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,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
11771,
4672,
2240,
12,
7335,
751,
16,
365,
2934,
972,
2738,
972,
30857,
1968,
16,
2826,
11771,
13,
282,
16846,
682,
273,
306,
79,
19... |
S[:,:,j] = num.dot(V, dot(diag(D), V.T )) | S[:,:,j] = num.dot(V, num.dot(num.diag(D), V.T )) | def trysplit(ellipses,i,isdone,L,dfore): if DEBUG: print 'trying to split target i=%d: '%i if DEBUG: print str(ellipses[i]) # get datapoints (r,c) = num.where(L==i+1) x = num.hstack((c.reshape(c.size,1),r.reshape(r.size,1))) w = dfore[L==i+1] ndata = r.size ## try increasing threshold # get a bounding box around L == i+1 c1 = num.min(c); c2 = num.max(c); r1 = num.min(r); r2 = num.max(r); dforebox = dfore[r1:r2+1,c1:c2+1].copy() dforebox0 = dforebox.copy() if DEBUG: print 'range r = [%d, %d], range c = [%d, %d]'%(r1,r2,c1,c2) # only look at cc i+1 Lbox = L[r1:r2+1,c1:c2+1].copy() isforebox0 = Lbox == i+1 dforebox[Lbox!=i+1] = 0 for currthresh in num.linspace(params.n_bg_std_thresh_low, min(params.n_bg_std_thresh, num.max(dforebox)),20): # try raising threshold to currthresh isforebox = dforebox >= currthresh # compute connected components (Lbox,ncomponents) = meas.label(isforebox) if DEBUG: print 'for thresh = %.2f, ncomponents = %d'%(currthresh,ncomponents) if ncomponents == 1: continue # remove components with too small area removed = [] for j in range(ncomponents): areaj = num.sum(Lbox==j+1) if areaj < 3: Lbox[Lbox==j+1] = 0 removed += j, if DEBUG: print 'removed = ' + str(removed) for j in range(ncomponents): if num.any(num.array(removed)==j): continue nsmaller = num.sum(num.array(removed)<j) Lbox[Lbox==j+1] = j+1-nsmaller ncomponents -= len(removed) if DEBUG: print 'ncomponents = ' + str(ncomponents) # if we've created a new connected component if ncomponents > 1: if DEBUG: print 'found %d components at thresh %f'%(ncomponents,currthresh) break # end loop trying to increase threshold if ncomponents > 1: # succeeded in splitting into multiple connected components # by raising the threshold, use this as initialization for GMM # get clusters for each cc mu = num.zeros([ncomponents,2]) S = num.zeros([2,2,ncomponents]) priors = num.zeros(ncomponents) for j in range(ncomponents): BWI = Lbox == (j+1) wj = dforebox[BWI] # normalize weights Z = sum(wj) if Z == 0: Z = 1 # compute mean (rj,cj) = num.where(BWI) centerX = sum(cj*wj)/Z centerY = sum(rj*wj)/Z mu[j,0] = centerX + c1 mu[j,1] = centerY + r1 # compute variance S[0,0,j] = sum(wj*cj**2)/Z - centerX**2 S[1,1,j] = sum(wj*rj**2)/Z - centerY**2 S[0,1,j] = sum(wj*cj*rj)/Z - centerX*centerY S[1,0,j] = S[0,1,j] # fix small variances [D,V] = num.linalg.eig(S[:,:,j]) if num.any(D<.01): D[D<.01] = .01 S[:,:,j] = num.dot(V, dot(diag(D), V.T )) priors[j] = rj.size if DEBUG: print 'component %d: mu = '%j + str(mu[j,:]) + ', S = ' + str(S[:,:,j]) + ', prior = ' + str(priors[j]) priors = priors / num.sum(priors) # label all points (gamma,e) = kcluster.gmmmemberships(mu,S,priors,x,w) # recompute clusters kcluster.gmmupdate(mu,S,priors,gamma,x,w) if DEBUG: print 'after updating, ' if DEBUG: for j in range(ncomponents): print 'component %d: mu = '%j + str(mu[j,:]) + ', S = ' + str(S[:,:,j]) + ', prior = ' + str(priors[j]) area = num.zeros(ncomponents) for j in range(ncomponents): (major,minor,angle) = cov2ell(S[:,:,j]) area[j] = major*minor*num.pi*4.0 removed, = num.where(area <= params.minshape.area) if removed.size > 0: if DEBUG: print 'removing components ' + str(removed) mu = num.delete(mu,removed,axis=0) S = num.delete(S,removed,axis=2) priors = num.delete(priors,removed) ncomponents -= removed.size if DEBUG: print "now there are " + str(ncomponents) + " components" if ncomponents > 1: # recompute memberships (gamma,e) = kcluster.gmmmemberships(mu,S,priors,x,w) # store mu0 = num.zeros([ncomponents,2]) mu0[:,0] = mu[:,0] mu0[:,1] = mu[:,1] gamma0 = gamma major0 = num.zeros(ncomponents) minor0 = num.zeros(ncomponents) angle0 = num.zeros(ncomponents) area0 = num.zeros(ncomponents) #if ncomponents > 2: # print 'Split component %d into %d components'%(i,ncomponents) # params.DOBREAK = True for j in range(ncomponents): (major0[j],minor0[j],angle0[j]) = cov2ell(S[:,:,j]) area0[j] = major0[j]*minor0[j]*num.pi*4.0 if DEBUG: print 'component %d: mu = '%j + str(mu0[j,:]) + ', major = ' + str(major0[j]) + ', minor = ' + str(minor0[j]) + ', angle = ' + str(angle0[j]) + ', area = ' + str(area0[j]) ## are any of the components too small? #if num.any(area0 < params.minshape.area): # print 'split by raising threshold, but one of the components was too small, minarea = ' + str(params.minshape.area) # # undo split # ncomponents = 1 # end if ncomponents > 1 (true if raising threshold successfully # split the component) if ncomponents < 1: print "ncomponents = " + str(ncomponents) + " resetting to 1" ncomponents = 1 if ncomponents == 1: # not able to split the connected component by raising # the threshold if DEBUG: print 'clustering ' # compute the difference between the observation area and the # mean area err0 = num.abs(ellipses[i].area - params.meanshape.area) # try splitting into more clusters ncomponents = 2 while True: if DEBUG: print 'ncomponents = %d'%ncomponents (mu,S,priors,gamma,negloglik) = kcluster.gmm(x,ncomponents,weights=w,kmeansthresh=.1,emthresh=.1,mincov=.25) #(mu,S,priors,gamma,negloglik) = gmm(x,ncomponents,weights=w,nreplicates=4,kmeansiter=10,kmeansthresh=.1,emiters=10,emthresh=.1) if DEBUG: print 'negloglik = %.2f'%negloglik # compute the average distance between each clusters area and the # mean area; greatly penalize areas smaller than minarea err = 0 major = num.zeros(ncomponents) minor = num.zeros(ncomponents) angle = num.zeros(ncomponents) area = num.zeros(ncomponents) for j in range(ncomponents): (major[j],minor[j],angle[j]) = cov2ell(S[:,:,j]) area[j] = major[j]*minor[j]*num.pi*4.0 if area[j] < params.minshape.area: err += 10000 if DEBUG: print 'area[%d] < params.minshape.area = %d, incrementing error by 10000'%(j,round(params.minshape.area)) else: err += num.abs(params.meanshape.area - area[j]) if DEBUG: print 'difference between mean area = %d and area[%d] = %d is %d'%(round(params.meanshape.area),j,round(area[j]),round(num.abs(params.meanshape.area - area[j]))) # end for j in range(ncomponents) if DEBUG: print 'error for ncomponents = %d is %f'%(ncomponents,err) if err >= err0: break ncomponents += 1 mu0 = mu.copy() major0 = major.copy() minor0 = minor.copy() angle0 = angle.copy() area0 = area.copy() err0 = err gamma0 = gamma.copy() # end while True ncomponents -= 1 # end if ncomponents == 1 (was not able to form multiple ccs by # raising threshold) if ncomponents == 1: isdone[i] = True if DEBUG: print 'decided not to split' return isdone else: # get id idx = num.argmax(gamma0,axis=1) # replace ellipses[i].center.x = mu0[0,0] ellipses[i].center.y = mu0[0,1] ellipses[i].major = major0[0] ellipses[i].minor = minor0[0] ellipses[i].angle = angle0[0] ellipses[i].area = area0[0] # if small enough, set to done isdone[i] = ellipses[i].area <= params.maxshape.area # add new for j in range(1,ncomponents): ellipse = Ellipse(mu0[j,0],mu0[j,1],minor0[j],major0[j],angle0[j],area0[j]) ellipses.append(ellipse) isdone = num.append(isdone,ellipse.area <= params.maxshape.area) L[r[idx==j],c[idx==j]] = len(ellipses) if DEBUG: print 'split into %d ellipses: '%ncomponents if DEBUG: print 'ellipses[%d] = '%i + str(ellipses[i]) if DEBUG: for j in range(1,ncomponents): print 'ellipses[%d] = '%(len(ellipses)-j) + str(ellipses[-j]) return isdone | e7bd804077e11ab23fcc662b8ba169e169bc8bfc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2711/e7bd804077e11ab23fcc662b8ba169e169bc8bfc/estconncomps.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
775,
4939,
12,
292,
11693,
281,
16,
77,
16,
291,
8734,
16,
48,
16,
72,
1405,
4672,
225,
309,
6369,
30,
1172,
296,
698,
310,
358,
1416,
1018,
277,
5095,
72,
30,
1995,
77,
309,
6369,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
775,
4939,
12,
292,
11693,
281,
16,
77,
16,
291,
8734,
16,
48,
16,
72,
1405,
4672,
225,
309,
6369,
30,
1172,
296,
698,
310,
358,
1416,
1018,
277,
5095,
72,
30,
1995,
77,
309,
6369,
... |
marginalia = ' ' * width | marginalia = '<tt>' + ' ' * width + '</tt>' | def section(self, title, fgcol, bgcol, contents, width=20, prelude='', marginalia=None, gap=' '): """Format a section with a heading.""" if marginalia is None: marginalia = ' ' * width result = ''' | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2442,
12,
2890,
16,
2077,
16,
10186,
1293,
16,
7611,
1293,
16,
2939,
16,
1835,
33,
3462,
16,
675,
80,
1317,
2218,
2187,
26533,
1155,
33,
7036,
16,
9300,
2218,
10,
10600,
23480,
10600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2442,
12,
2890,
16,
2077,
16,
10186,
1293,
16,
7611,
1293,
16,
2939,
16,
1835,
33,
3462,
16,
675,
80,
1317,
2218,
2187,
26533,
1155,
33,
7036,
16,
9300,
2218,
10,
10600,
23480,
10600,
... |
txt = new_doc.createTextNode(str(line[f] or '')) | col.text = line[f] or '' | def _append_node(name, text): n = new_doc.createElement(name) t = new_doc.createTextNode(text) n.appendChild(t) config.appendChild(n) | 32aa89f603ce93d4388ce6f049f482862969ced9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/32aa89f603ce93d4388ce6f049f482862969ced9/custom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6923,
67,
2159,
12,
529,
16,
977,
4672,
290,
273,
394,
67,
2434,
18,
2640,
1046,
12,
529,
13,
268,
273,
394,
67,
2434,
18,
2640,
17299,
12,
955,
13,
290,
18,
6923,
1763,
12,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6923,
67,
2159,
12,
529,
16,
977,
4672,
290,
273,
394,
67,
2434,
18,
2640,
1046,
12,
529,
13,
268,
273,
394,
67,
2434,
18,
2640,
17299,
12,
955,
13,
290,
18,
6923,
1763,
12,
8... |
"Return the column number where the current event ends." return -1 | "Return the column number where the current event ends." return -1 | def getColumnNumber(self): | 27c75fe806fd4e5fcdccb398bd43691a6d25d3ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/27c75fe806fd4e5fcdccb398bd43691a6d25d3ca/xmlreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6716,
1854,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6716,
1854,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
def submitted(self): if not self.available(): return False form = self.form name = "%s.%s" % (form.prefix, self.__name__) return name in form.request.form | def available(self): condition = self.condition return (condition is None) or condition(self.form, self) | b454136ef456c884ae4bf11b3f8d29e8bd8fd1f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9642/b454136ef456c884ae4bf11b3f8d29e8bd8fd1f1/form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2319,
12,
2890,
4672,
2269,
273,
365,
18,
4175,
327,
261,
4175,
353,
599,
13,
578,
2269,
12,
2890,
18,
687,
16,
365,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
2319,
12,
2890,
4672,
2269,
273,
365,
18,
4175,
327,
261,
4175,
353,
599,
13,
578,
2269,
12,
2890,
18,
687,
16,
365,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
def setParseAction( self, fn ): | def setParseAction( self, *fns ): | def setParseAction( self, fn ): """Define action to perform when successfully matching parse element definition. Parse action fn is a callable method with the arguments (s, loc, toks) where: - s = the original string being parsed - loc = the location of the matching substring - toks = a list of the matched tokens, packaged as a ParseResults object If the function fn modifies the tokens, it can return them as the return value from fn, and the modified list of tokens will replace the original. Otherwise, fn does not need to return any value. """ self.parseAction = fn return self | 0d5c070900efe583f55b5d4d6525eb2686936701 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/0d5c070900efe583f55b5d4d6525eb2686936701/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3201,
1803,
12,
365,
16,
380,
74,
2387,
262,
30,
3536,
11644,
1301,
358,
3073,
1347,
4985,
3607,
1109,
930,
2379,
18,
2884,
1301,
2295,
353,
279,
4140,
707,
598,
326,
1775,
261,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3201,
1803,
12,
365,
16,
380,
74,
2387,
262,
30,
3536,
11644,
1301,
358,
3073,
1347,
4985,
3607,
1109,
930,
2379,
18,
2884,
1301,
2295,
353,
279,
4140,
707,
598,
326,
1775,
261,
8... |
contents = '' for item in funcs: contents = contents + self.document(item, fdict, cdict) | contents = [] for key, value in funcs: contents.append(self.document(value, key, fdict, cdict)) | def docmodule(self, object): """Produce HTML documentation for a module object.""" name = object.__name__ parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) filelink = '<a href="file:%s">%s</a>' % (path, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink) | a8b37d1a3238fb85be760a30db03672525e8f591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a8b37d1a3238fb85be760a30db03672525e8f591/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
2140,
273,
1416,
12,
529,
16,
2611,
13,
4716,
273,
5378,
364,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
2140,
273,
1416,
12,
529,
16,
2611,
13,
4716,
273,
5378,
364,
2... |
"friendlyName": "Dell PERC 5/i Integrated Controller 3 Firmware", | "displayname": "Dell PERC 5/i Integrated Controller 3 Firmware", | def testSvm_multiPkg(self): import firmware_addon_dell.svm as svm expectedResult = [ {"name": "pci_firmware(ven_0x1028_dev_0x0015_subven_0x1028_subdev_0x1f03)", "friendlyName": "Dell PERC 5/i Integrated Controller 1 Firmware", "pciDbdf": (0, 2, 0x14, 0)}, {"name": "pci_firmware(ven_0x1028_dev_0x0016)", "friendlyName": "Dell PERC 5/i Integrated Controller 2 Firmware", "pciDbdf": (0, 2, 0x15, 0)}, {"name": "pci_firmware(ven_0x1028_dev_0x0017)", "friendlyName": "Dell PERC 5/i Integrated Controller 3 Firmware", "pciDbdf": (0, 2, 0x16, 0)}, ] actualResult = [] | 606d28562261464d563e0ba692d958783d6ffc7f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/36/606d28562261464d563e0ba692d958783d6ffc7f/testSvm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
55,
3489,
67,
7027,
11264,
12,
2890,
4672,
1930,
22820,
67,
24390,
67,
72,
1165,
18,
87,
3489,
487,
272,
3489,
2665,
1253,
273,
306,
12528,
529,
6877,
315,
2436,
77,
67,
24403,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
55,
3489,
67,
7027,
11264,
12,
2890,
4672,
1930,
22820,
67,
24390,
67,
72,
1165,
18,
87,
3489,
487,
272,
3489,
2665,
1253,
273,
306,
12528,
529,
6877,
315,
2436,
77,
67,
24403,
1... |
\item \sage tries to convert $x$ into a \class{RealIntervalField}. The floors of the endpoints are computed. If they are the same, then that value is returned. Otherwise, the precision of the \class{RealIntervalField} is increased until they do match up or it reaches \code{maximum_bits} of precision. | \item \sage tries to convert $x$ into a \class{RealIntervalField} with 53 bits of precision. Next, the floors of the endpoints are computed. If they are the same, then that value is returned. Otherwise, the precision of the \class{RealIntervalField} is increased until they do match up or it reaches \code{maximum_bits} of precision. | def __call__(self, x, maximum_bits=20000): try: return x.ceil() except AttributeError: if isinstance(x, (float, int, long, complex)): return Integer(int(math.ceil(x))) | 2cf36cd065e0c14848cc191fb4e60967c101792f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2cf36cd065e0c14848cc191fb4e60967c101792f/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
4207,
67,
6789,
33,
22,
2787,
4672,
775,
30,
327,
619,
18,
311,
330,
1435,
1335,
6394,
30,
309,
1549,
12,
92,
16,
261,
5659,
16,
509,
16,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
4207,
67,
6789,
33,
22,
2787,
4672,
775,
30,
327,
619,
18,
311,
330,
1435,
1335,
6394,
30,
309,
1549,
12,
92,
16,
261,
5659,
16,
509,
16,
15... |
self.pageSection % ('Word query', self.wordQuery)+ self.pageSection % ('Train', self.train)) | self.pageSection % ('Train', self.train)+ self.pageSection % ('Classify a message', self.classify)+ self.pageSection % ('Word query', self.wordQuery)) | def onHome(self, params): """Serve up the homepage.""" body = (self.pageSection % ('Status', self.summary % status.__dict__)+ self.pageSection % ('Word query', self.wordQuery)+ self.pageSection % ('Train', self.train)) self.push(body) | bb67db5e2dc016a7be764205cf241b78d334ff9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/bb67db5e2dc016a7be764205cf241b78d334ff9b/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
8684,
12,
2890,
16,
859,
4672,
3536,
14350,
731,
326,
30815,
12123,
1417,
273,
261,
2890,
18,
2433,
5285,
738,
7707,
1482,
2187,
365,
18,
7687,
738,
1267,
16186,
1576,
972,
27921,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
8684,
12,
2890,
16,
859,
4672,
3536,
14350,
731,
326,
30815,
12123,
1417,
273,
261,
2890,
18,
2433,
5285,
738,
7707,
1482,
2187,
365,
18,
7687,
738,
1267,
16186,
1576,
972,
27921,
3... |
currentData = ''.join(self.currentData) | currentData = ''.join(str(self.currentData)) | def endData(self, containerClass=NavigableString): if self.currentData: currentData = ''.join(self.currentData) if currentData.endswith('<') and self.convertHTMLEntities: currentData = currentData[:-1] + '<' if not currentData.strip(): if '\n' in currentData: currentData = '\n' else: currentData = ' ' self.currentData = [] if self.parseOnlyThese and len(self.tagStack) <= 1 and \ (not self.parseOnlyThese.text or \ not self.parseOnlyThese.search(currentData)): return o = containerClass(currentData) o.setup(self.currentTag, self.previous) if self.previous: self.previous.next = o self.previous = o self.currentTag.contents.append(o) | cdbfc869714001c09ab27ccac7074328724b6865 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8598/cdbfc869714001c09ab27ccac7074328724b6865/BeautifulSoup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
751,
12,
2890,
16,
1478,
797,
33,
50,
4911,
429,
780,
4672,
309,
365,
18,
2972,
751,
30,
30685,
273,
875,
18,
5701,
12,
701,
12,
2890,
18,
2972,
751,
3719,
309,
30685,
18,
5839,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
751,
12,
2890,
16,
1478,
797,
33,
50,
4911,
429,
780,
4672,
309,
365,
18,
2972,
751,
30,
30685,
273,
875,
18,
5701,
12,
701,
12,
2890,
18,
2972,
751,
3719,
309,
30685,
18,
5839,... |
HHGate2D.className_ = _moose.cvar.HHGate2D_className_ | def getType(*args): """getType(self) -> string""" return _moose.HHGate2D_getType(*args) | 1961c35f540060f41023dcf804a850794a39f350 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/1961c35f540060f41023dcf804a850794a39f350/moose.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3130,
30857,
1968,
4672,
3536,
588,
559,
12,
2890,
13,
317,
533,
8395,
327,
389,
8683,
2584,
18,
17500,
13215,
22,
40,
67,
588,
559,
30857,
1968,
13,
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,
3130,
30857,
1968,
4672,
3536,
588,
559,
12,
2890,
13,
317,
533,
8395,
327,
389,
8683,
2584,
18,
17500,
13215,
22,
40,
67,
588,
559,
30857,
1968,
13,
2,
-100,
-100,
-100,
-100,
-100,
-... | |
chance = chance * -1 | chance = 0 | def getexceptionalchance(self, player, arguments): if not self.skills.has_key(BOWCRAFT): return False | d3a229f3927dfab3f902c94177d231927ef4e830 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d3a229f3927dfab3f902c94177d231927ef4e830/bowcraft.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4064,
287,
343,
1359,
12,
2890,
16,
7291,
16,
1775,
4672,
309,
486,
365,
18,
7771,
737,
87,
18,
5332,
67,
856,
12,
5315,
59,
39,
2849,
4464,
4672,
327,
1083,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4064,
287,
343,
1359,
12,
2890,
16,
7291,
16,
1775,
4672,
309,
486,
365,
18,
7771,
737,
87,
18,
5332,
67,
856,
12,
5315,
59,
39,
2849,
4464,
4672,
327,
1083,
2,
-100,
-100,
-100... |
def __init__(self,input_handler): | def __init__(self): | def __init__(self,input_handler): Widget.__init__(self) self.input_handler=input_handler self.win=None | 15c8f8c34c52496d37a8a99389c07ba9fa01e1df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/15c8f8c34c52496d37a8a99389c07ba9fa01e1df/ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
11103,
16186,
2738,
972,
12,
2890,
13,
365,
18,
2630,
67,
4176,
33,
2630,
67,
4176,
365,
18,
8082,
33,
7036,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
11103,
16186,
2738,
972,
12,
2890,
13,
365,
18,
2630,
67,
4176,
33,
2630,
67,
4176,
365,
18,
8082,
33,
7036,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100... |
self._completeDelayedCallback = FrameDelayedCallback( | self._completeDelayedCallback = FrameDelayedCall( | def sendEvent(): messenger.send(self.getAllInterestsCompleteEvent()) for callback in self._allInterestsCompleteCallbacks: callback() self._allInterestsCompleteCallbacks = [] | 5f779fa12ecab28126e191fe82db1852c6112cbf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/5f779fa12ecab28126e191fe82db1852c6112cbf/DoInterestManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
1133,
13332,
31086,
18,
4661,
12,
2890,
18,
588,
1595,
2465,
25563,
6322,
1133,
10756,
364,
1348,
316,
365,
6315,
454,
2465,
25563,
6322,
10617,
30,
1348,
1435,
365,
6315,
454,
2465,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1366,
1133,
13332,
31086,
18,
4661,
12,
2890,
18,
588,
1595,
2465,
25563,
6322,
1133,
10756,
364,
1348,
316,
365,
6315,
454,
2465,
25563,
6322,
10617,
30,
1348,
1435,
365,
6315,
454,
2465,... |
self.targets[tag['name']] = tb | self.targets[tag[key]] = tb | def parse_tag(self, tag, parent_css): try: tagname = tag.name.lower() except AttributeError: if not isinstance(tag, HTMLConverter.IGNORED_TAGS): self.add_text(tag, parent_css) return tag_css = self.tag_css(tag, parent_css=parent_css) try: # Skip element if its display attribute is set to none if tag_css['display'].lower() == 'none' or \ tag_css['visibility'].lower() == 'hidden': return except KeyError: pass if 'page-break-before' in tag_css.keys(): if tag_css['page-break-before'].lower() != 'avoid': self.end_page() tag_css.pop('page-break-before') end_page = False if 'page-break-after' in tag_css.keys() and \ tag_css['page-break-after'].lower() != 'avoid': end_page = True tag_css.pop('page-break-after') if self.force_page_break.match(tagname): self.end_page() self.page_break_found = True if not self.page_break_found and self.page_break.match(tagname): if len(self.current_page.contents) > 3: self.end_page() if self.verbose: print 'Forcing page break at', tagname if tagname in ["title", "script", "meta", 'del', 'frameset']: pass elif tagname == 'a' and self.max_link_levels >= 0: if tag.has_key('name'): if self.anchor_to_previous: self.process_children(tag, tag_css) for c in self.anchor_to_previous.contents: if isinstance(c, (TextBlock, ImageBlock)): self.targets[tag['name']] = c return tb = self.book.create_text_block() tb.Paragraph(" ") self.anchor_to_previous.append(tb) self.targets[tag['name']] = tb return previous = self.current_block self.process_children(tag, tag_css) target = None if self.current_block == previous: self.current_para.append_to(self.current_block) self.current_para = Paragraph() if self.current_block.has_text(): target = self.current_block else: target = BlockSpace() self.current_page.append(target) else: found = False for item in self.current_page.contents: if item == previous: found = True continue if found: target = item break if target and not isinstance(target, (TextBlock, ImageBlock)): if isinstance(target, RuledLine): target = self.book.create_text_block(textStyle=self.current_block.textStyle, blockStyle=self.current_block.blockStyle) target.Paragraph(' ') self.current_page.append(target) else: target = BlockSpace() self.current_page.append(target) if target == None: if self.current_block.has_text(): target = self.current_block else: target = BlockSpace() self.current_page.append(target) self.targets[tag['name']] = target elif tag.has_key('href') and not self.link_exclude.match(tag['href']): purl = urlparse(tag['href']) path = unquote(purl[2]) if path and os.access(path, os.R_OK) and os.path.splitext(path)[1][1:].lower() in \ ['png', 'jpg', 'bmp', 'jpeg']: self.process_image(path, tag_css) else: text = self.get_text(tag, limit=1000) if not text.strip(): text = "Link" self.add_text(text, tag_css) self.links.append(HTMLConverter.Link(self.current_para.contents[-1], tag)) elif tagname == 'img': if tag.has_key('src') and os.access(unquote(tag['src']), os.R_OK): path = os.path.abspath(unquote(tag['src'])) width, height = None, None try: width = int(tag['width']) height = int(tag['height']) except: pass dropcaps = tag.has_key('class') and tag['class'] == 'libprs500_dropcaps' self.process_image(path, tag_css, width, height, dropcaps=dropcaps) else: if self.verbose: print >>sys.stderr, "Failed to process:", tag elif tagname in ['style', 'link']: def update_css(ncss): for key in ncss.keys(): if self.css.has_key(key): self.css[key].update(ncss[key]) else: self.css[key] = ncss[key] ncss = {} if tagname == 'style': for c in tag.contents: if isinstance(c, NavigableString): ncss.update(self.parse_css(str(c))) elif tag.has_key('type') and tag['type'] == "text/css" \ and tag.has_key('href'): purl = urlparse(tag['href']) path = unquote(purl[2]) try: f = open(path, 'rb') src = f.read() f.close() match = self.PAGE_BREAK_PAT.search(src) if match and not re.match('avoid', match.group(1), re.IGNORECASE): self.page_break_found = True ncss = self.parse_css(src) except IOError: pass if ncss: update_css(ncss) elif tagname == 'pre': for c in tag.findAll(True): c.replaceWith(self.get_text(c)) self.end_current_para() self.current_block.append_to(self.current_page) attrs = Span.translate_attrs(tag_css, self.profile.dpi, self.fonts, self.font_delta, self.memory) attrs['fontfacename'] = self.fonts['mono']['normal'][1] ts = self.book.create_text_style(**self.unindented_style.attrs) ts.attrs.update(attrs) self.current_block = self.book.create_text_block( blockStyle=self.current_block.blockStyle, textStyle=ts) src = ''.join([str(i) for i in tag.contents]) lines = src.split('\n') for line in lines: try: self.current_para.append(line) self.current_para.CR() except ConversionError: pass self.end_current_block() self.current_block = self.book.create_text_block() elif tagname in ['ul', 'ol', 'dl']: self.list_level += 1 if tagname == 'ol': old_counter = self.list_counter self.list_counter = 1 prev_bs = self.current_block.blockStyle self.end_current_block() attrs = self.current_block.blockStyle.attrs attrs = attrs.copy() attrs['sidemargin'] = self.list_indent*self.list_level bs = self.book.create_block_style(**attrs) self.current_block = self.book.create_text_block( blockStyle=bs, textStyle=self.unindented_style) self.process_children(tag, tag_css) self.end_current_block() self.current_block.blockStyle = prev_bs self.list_level -= 1 if tagname == 'ol': self.list_counter = old_counter elif tagname in ['li', 'dt', 'dd']: margin = self.list_indent*self.list_level if tagname == 'dd': margin += 80 if int(self.current_block.blockStyle.attrs['sidemargin']) != margin: self.end_current_block() attrs = self.current_block.blockStyle.attrs attrs = attrs.copy() attrs['sidemargin'] = margin attrs['blockwidth'] = int(attrs['blockwidth']) + margin bs = self.book.create_block_style(**attrs) self.current_block = self.book.create_text_block( blockStyle=bs, textStyle=self.unindented_style) | b6075d3dd6c27ae601bd9acb1970998212e8ed19 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/b6075d3dd6c27ae601bd9acb1970998212e8ed19/convert_from.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2692,
12,
2890,
16,
1047,
16,
982,
67,
5212,
4672,
775,
30,
25586,
273,
1047,
18,
529,
18,
8167,
1435,
1335,
6394,
30,
309,
486,
1549,
12,
2692,
16,
3982,
5072,
18,
3047,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2692,
12,
2890,
16,
1047,
16,
982,
67,
5212,
4672,
775,
30,
25586,
273,
1047,
18,
529,
18,
8167,
1435,
1335,
6394,
30,
309,
486,
1549,
12,
2692,
16,
3982,
5072,
18,
3047,
3... |
dict[meth_name] = Function(fullmodule, meth_name, file, lineno) | dict[meth_name] = Function(fullmodule, meth_name, fname, lineno) | def _readmodule(module, path, inpackage=None): '''Do the hard work for readmodule[_ex].''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initialize the dict for this module's contents dict = {} # Check if it is a built-in module; we don't do much for these if module in sys.builtin_module_names and not inpackage: _modules[module] = dict return dict # Check for a dotted module name i = module.rfind('.') if i >= 0: package = module[:i] submodule = module[i+1:] parent = _readmodule(package, path, inpackage) if inpackage: package = "%s.%s" % (inpackage, package) return _readmodule(submodule, parent['__path__'], package) # Search the path for the module f = None if inpackage: f, file, (suff, mode, type) = imp.find_module(module, path) else: f, file, (suff, mode, type) = imp.find_module(module, path + sys.path) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] path = [file] + path f, file, (suff, mode, type) = imp.find_module('__init__', [file]) _modules[fullmodule] = dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() return dict stack = [] # stack of (class, indent) pairs g = tokenize.generate_tokens(f.readline) try: for tokentype, token, start, end, line in g: if tokentype == DEDENT: lineno, thisindent = start # close nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] elif token == 'def': lineno, thisindent = start # close previous nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] tokentype, meth_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error if stack: cur_class = stack[-1][0] if isinstance(cur_class, Class): # it's a method cur_class._addmethod(meth_name, lineno) # else it's a nested def else: # it's a function dict[meth_name] = Function(fullmodule, meth_name, file, lineno) stack.append((None, thisindent)) # Marker for nested fns elif token == 'class': lineno, thisindent = start # close previous nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] tokentype, class_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # parse what follows the class name tokentype, token, start, end, line = g.next() inherit = None if token == '(': names = [] # List of superclasses # there's a list of superclasses level = 1 super = [] # Tokens making up current superclass while True: tokentype, token, start, end, line = g.next() if token in (')', ',') and level == 1: n = "".join(super) if n in dict: # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class is of the form # module.class: look in module for # class m = c[-2] c = c[-1] if m in _modules: d = _modules[m] if c in d: n = d[c] names.append(n) super = [] if token == '(': level += 1 elif token == ')': level -= 1 if level == 0: break elif token == ',' and level == 1: pass # only use NAME and OP (== dot) tokens for type name elif tokentype in (NAME, OP) and level == 1: super.append(token) # expressions in the base list are not supported inherit = names cur_class = Class(fullmodule, class_name, inherit, file, lineno) if not stack: dict[class_name] = cur_class stack.append((cur_class, thisindent)) elif token == 'import' and start[1] == 0: modules = _getnamelist(g) for mod, mod2 in modules: try: # Recursively read the imported module if not inpackage: _readmodule(mod, path) else: try: _readmodule(mod, path, inpackage) except ImportError: _readmodule(mod, []) except: # If we can't find or parse the imported module, # too bad -- don't die here. pass elif token == 'from' and start[1] == 0: mod, token = _getname(g) if not mod or token != "import": continue names = _getnamelist(g) try: # Recursively read the imported module d = _readmodule(mod, path, inpackage) except: # If we can't find or parse the imported module, # too bad -- don't die here. continue # add any classes that were defined in the imported module # to our name space if they were mentioned in the list for n, n2 in names: if n in d: dict[n2 or n] = d[n] elif n == '*': # don't add names that start with _ for n in d: if n[0] != '_': dict[n] = d[n] except StopIteration: pass f.close() return dict | 7d4cac5de777aad61727f6a068b3c392bb76f3e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/7d4cac5de777aad61727f6a068b3c392bb76f3e3/pyclbr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
2978,
12,
2978,
16,
589,
16,
316,
5610,
33,
7036,
4672,
9163,
3244,
326,
7877,
1440,
364,
855,
2978,
63,
67,
338,
65,
1093,
6309,
468,
8155,
326,
1983,
1605,
508,
261,
1484,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
896,
2978,
12,
2978,
16,
589,
16,
316,
5610,
33,
7036,
4672,
9163,
3244,
326,
7877,
1440,
364,
855,
2978,
63,
67,
338,
65,
1093,
6309,
468,
8155,
326,
1983,
1605,
508,
261,
1484,
... |
def ssh_command(self, connect_timeout=30): | def ssh_command(self, connect_timeout=30, options=''): | def ssh_command(self, connect_timeout=30): """Construct an ssh command with proper args for this host.""" ssh = self.ssh_base_command(connect_timeout) return r'%s -l %s -p %d %s' % (ssh, self.user, self.port, self.hostname) | 1e2ce83a87cd61c21ae5660a0769f5db77e32ddc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/1e2ce83a87cd61c21ae5660a0769f5db77e32ddc/ssh_host.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7056,
67,
3076,
12,
2890,
16,
3077,
67,
4538,
33,
5082,
16,
702,
2218,
11,
4672,
3536,
7249,
392,
7056,
1296,
598,
5338,
833,
364,
333,
1479,
12123,
7056,
273,
365,
18,
10975,
67,
1969... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7056,
67,
3076,
12,
2890,
16,
3077,
67,
4538,
33,
5082,
16,
702,
2218,
11,
4672,
3536,
7249,
392,
7056,
1296,
598,
5338,
833,
364,
333,
1479,
12123,
7056,
273,
365,
18,
10975,
67,
1969... |
Seq('AAACACAC', Alphabet()) """ records = [] for record in fasta_multi(filename): records.append(record) return records | Seq('AAACACAC', SingleLetterAlphabet()) """ return list(SeqIO.parse(open_file(filename), format="fasta")) | def fasta_readrecords(filename=None): """ >>> records = fasta_readrecords('GFF/multi.fna') >>> records[0].id 'test1' >>> records[2].seq Seq('AAACACAC', Alphabet()) """ records = [] for record in fasta_multi(filename): records.append(record) return records | 8f2d18c8dacb0d43fdf0329c0285ee23c561a67b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/8f2d18c8dacb0d43fdf0329c0285ee23c561a67b/easy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13104,
67,
896,
7094,
12,
3459,
33,
7036,
4672,
3536,
4080,
3853,
273,
13104,
67,
896,
7094,
2668,
43,
2246,
19,
7027,
18,
4293,
69,
6134,
4080,
3853,
63,
20,
8009,
350,
296,
3813,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13104,
67,
896,
7094,
12,
3459,
33,
7036,
4672,
3536,
4080,
3853,
273,
13104,
67,
896,
7094,
2668,
43,
2246,
19,
7027,
18,
4293,
69,
6134,
4080,
3853,
63,
20,
8009,
350,
296,
3813,
21,... |
if isinstance(right, basestring): ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, limit=None)] else: ids2 = list(right) if not ids2: self.__exp[i] = ('id', '=', '0') else: self.__exp[i] = ('id', 'in', self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', ids2)) | call_null = True if right: if isinstance(right, basestring): ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, limit=None)] operator = 'in' else: if not isinstance(right,list): ids2 = [right] else: ids2 = right if not ids2: call_null = True operator = 'in' else: call_null = False o2m_op = 'in' if operator in ['not like','not ilike','not in','<>','!=']: o2m_op = 'not in' self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', ids2, operator, field._type)) if call_null: o2m_op = 'not in' if operator in ['not like','not ilike','not in','<>','!=']: o2m_op = 'in' self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', [], operator, field._type) or [0]) | def rg(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids + rg(ids2, table, parent) | 029c8f62598eeeb99bfb23ba2cb398a6ef5dfd95 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/029c8f62598eeeb99bfb23ba2cb398a6ef5dfd95/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14524,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
13,
6487,
819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14524,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
13,
6487,
819... |
def set_add_view_expr(gscontext): | def set_add_view_expr(context): | def set_add_view_expr(gscontext): # in Plone 4, the Action Letter FTI needs to have the add_view_expr set. if HAS_PLONE40: ttool = getToolByName(gscontext, 'portal_types') ttool['Action Letter']._updateProperty( 'add_view_expr', 'string:${folder_url}/+/addActionLetter' ) | b5e0465b66cb74dcf90fa2948ddaccfafd508bdd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10584/b5e0465b66cb74dcf90fa2948ddaccfafd508bdd/setuphandlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
1289,
67,
1945,
67,
8638,
12,
2472,
4672,
468,
316,
3008,
476,
1059,
16,
326,
4382,
10559,
387,
478,
23240,
4260,
358,
1240,
326,
527,
67,
1945,
67,
8638,
444,
18,
309,
21641,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
1289,
67,
1945,
67,
8638,
12,
2472,
4672,
468,
316,
3008,
476,
1059,
16,
326,
4382,
10559,
387,
478,
23240,
4260,
358,
1240,
326,
527,
67,
1945,
67,
8638,
444,
18,
309,
21641,... |
return self.eigVectors[:nPCs] | return MA.take(self.eigVectors, range(nPCs), axis=1) | def getEigVectors(self, nPCs = None, varianceExplained = None): if not self.data: return None self.compute() nPCs = self.getCount(nPCs, varianceExplained) return self.eigVectors[:nPCs] | 18586f4d56a41156c51a8dbdbbe000463c34e3b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/18586f4d56a41156c51a8dbdbbe000463c34e3b7/orngDimReduction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4774,
360,
21680,
12,
2890,
16,
290,
3513,
87,
273,
599,
16,
12380,
424,
7446,
329,
273,
599,
4672,
309,
486,
365,
18,
892,
30,
327,
599,
365,
18,
9200,
1435,
225,
290,
3513,
87,
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,
4774,
360,
21680,
12,
2890,
16,
290,
3513,
87,
273,
599,
16,
12380,
424,
7446,
329,
273,
599,
4672,
309,
486,
365,
18,
892,
30,
327,
599,
365,
18,
9200,
1435,
225,
290,
3513,
87,
273... |
t.lineno += t.value.count('\n') | t.lexer.lineno += t.value.count('\n') | def t_CPPDIRECTIVE(t): r'^\#[^\#].*\n' t.lineno += t.value.count('\n') return t | afeef4c0622dd3b0d90a8446c97b6671679c1a82 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/afeef4c0622dd3b0d90a8446c97b6671679c1a82/isa_parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
67,
4258,
52,
17541,
5354,
12,
88,
4672,
436,
11,
17134,
7,
15441,
7,
65,
4509,
64,
82,
11,
268,
18,
31731,
18,
17782,
1011,
268,
18,
1132,
18,
1883,
2668,
64,
82,
6134,
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,
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,
268,
67,
4258,
52,
17541,
5354,
12,
88,
4672,
436,
11,
17134,
7,
15441,
7,
65,
4509,
64,
82,
11,
268,
18,
31731,
18,
17782,
1011,
268,
18,
1132,
18,
1883,
2668,
64,
82,
6134,
327,
... |
expr = re.compile(r'(\s*[%s]+\.)|(\s*[0-9]+\.)|(\s*[0-9]+\s+)' % letters).match): | expr = re.compile(r'(\s*[%s]\.)|(\s*[0-9]+\.)|(\s*[0-9]+\s+)' % letters).match): | def doc_numbered( self, paragraph, expr = re.compile(r'(\s*[%s]+\.)|(\s*[0-9]+\.)|(\s*[0-9]+\s+)' % letters).match): # This is the old expression. It had a nasty habit # of grabbing paragraphs that began with a single # letter word even if there was no following period. #expr = re.compile('\s*' # '(([a-zA-Z]|[0-9]+|[ivxlcdmIVXLCDM]+)\.)*' # '([a-zA-Z]|[0-9]+|[ivxlcdmIVXLCDM]+)\.?' # '\s+').match): top=paragraph.getColorizableTexts()[0] m=expr(top) if not m: return None subs=paragraph.getSubparagraphs() if top[-2:]=='::': subs=[StructuredTextExample(subs)] top=top[:-1] return StructuredTextNumbered(top[m.span()[1]:], subs, indent=paragraph.indent, number=top[:m.span()[1]]) | b29008c90524f37221faf5a492ff5cfc6328548c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b29008c90524f37221faf5a492ff5cfc6328548c/DocumentClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
67,
2696,
329,
12,
365,
16,
10190,
16,
3065,
273,
283,
18,
11100,
12,
86,
11,
4713,
87,
14,
14451,
87,
65,
5834,
14047,
4713,
87,
26625,
20,
17,
29,
3737,
5834,
14047,
4713,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
2696,
329,
12,
365,
16,
10190,
16,
3065,
273,
283,
18,
11100,
12,
86,
11,
4713,
87,
14,
14451,
87,
65,
5834,
14047,
4713,
87,
26625,
20,
17,
29,
3737,
5834,
14047,
4713,
87,... |
print " Op", r.owner, "produced", type(r_vals[r]) | print " Result:", id(r), r print " Op", r.owner print " Value Type:", type(r_vals[r]) | def f(): for x in no_recycling: x[0] = None try: equiv_vals = {} problematic = set() r_vals = {} assert len(thunks) == len(order) for i, (thunk, node) in enumerate(zip(thunks, order)): thunk() | 4429a0e8fb76c2421c51d3d2f105fe6d40dae574 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/4429a0e8fb76c2421c51d3d2f105fe6d40dae574/debugmode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
13332,
364,
619,
316,
1158,
67,
266,
2431,
830,
310,
30,
619,
63,
20,
65,
273,
599,
775,
30,
1298,
427,
67,
4524,
273,
2618,
6199,
2126,
273,
444,
1435,
436,
67,
4524,
273,
2618... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
13332,
364,
619,
316,
1158,
67,
266,
2431,
830,
310,
30,
619,
63,
20,
65,
273,
599,
775,
30,
1298,
427,
67,
4524,
273,
2618,
6199,
2126,
273,
444,
1435,
436,
67,
4524,
273,
2618... |
sage: a.minpoly(algorithm='numeric', bits=100, degree=3) | sage: a.minpoly(algorithm='numerical', bits=100, degree=3) | def minpoly(self, var='x', algorithm=None, bits=None, degree=None, epsilon=0): """ Return the minimal polynomial of self, if possible. | 716fafc899a2315c0c3ff5bce18d53b81aa109d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/716fafc899a2315c0c3ff5bce18d53b81aa109d3/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
16353,
12,
2890,
16,
569,
2218,
92,
2187,
4886,
33,
7036,
16,
4125,
33,
7036,
16,
10782,
33,
7036,
16,
12263,
33,
20,
4672,
3536,
2000,
326,
16745,
16991,
434,
365,
16,
309,
3323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1131,
16353,
12,
2890,
16,
569,
2218,
92,
2187,
4886,
33,
7036,
16,
4125,
33,
7036,
16,
10782,
33,
7036,
16,
12263,
33,
20,
4672,
3536,
2000,
326,
16745,
16991,
434,
365,
16,
309,
3323... |
return self._executeSingleStorageElementFunction(storageElementName,storageDirectory,'isDirectory') else: return self._executeStorageElementFunction(storageElementName,storageDirectory,'isDirectory') def getStorageDirectoryMetadata(self,storageDirectory,storageElementName,singleDirectory=False): | return self._executeSingleStorageElementFunction( storageElementName, storageDirectory, 'isDirectory' ) else: return self._executeStorageElementFunction( storageElementName, storageDirectory, 'isDirectory' ) def getStorageDirectoryMetadata( self, storageDirectory, storageElementName, singleDirectory=False ): | def getStorageDirectoryIsDirectory(self,storageDirectory,storageElementName,singleDirectory=False): """ Determine the storage paths are directories | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13840,
2853,
2520,
2853,
12,
2890,
16,
5697,
2853,
16,
5697,
30584,
16,
7526,
2853,
33,
8381,
4672,
3536,
10229,
326,
2502,
2953,
854,
6402,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13840,
2853,
2520,
2853,
12,
2890,
16,
5697,
2853,
16,
5697,
30584,
16,
7526,
2853,
33,
8381,
4672,
3536,
10229,
326,
2502,
2953,
854,
6402,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
catContentDB[cat] = [subcatlist, articlelist] | catContentDB[supercat] = [subcatlist, articlelist] | def get_subcats(supercat): ''' For a given supercategory, return a list of CatLinks for all its subcategories. Saves this list in a temporary database so that it won't be loaded from the server next time it's required. ''' # if we already know which subcategories exist here if catContentDB.has_key(supercat): return catContentDB[supercat][0] else: subcatlist = supercat.subcategories() articlelist = supercat.articles() # add to dictionary catContentDB[cat] = [subcatlist, articlelist] return subcatlist | 3a995a3b062b01c4b620c238fc64f5656ea117ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/3a995a3b062b01c4b620c238fc64f5656ea117ad/category.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1717,
24750,
12,
9565,
2574,
4672,
9163,
2457,
279,
864,
2240,
4743,
16,
327,
279,
666,
434,
385,
270,
7100,
364,
777,
2097,
720,
8995,
18,
348,
6606,
333,
666,
316,
279,
6269... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1717,
24750,
12,
9565,
2574,
4672,
9163,
2457,
279,
864,
2240,
4743,
16,
327,
279,
666,
434,
385,
270,
7100,
364,
777,
2097,
720,
8995,
18,
348,
6606,
333,
666,
316,
279,
6269... |
print "schedTime - addTime > self._lastRun=", schedTime - addTime > self._lastRun | def _CalcNextRun(self, missedAlready = False): # calculate when the next task should run # depending on last run time, update frequency, # task start time and day of the week | 2e54de76b96ee6c9485ee5131c7e0d1170f6f06f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3644/2e54de76b96ee6c9485ee5131c7e0d1170f6f06f/Scheduler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
25779,
2134,
1997,
12,
2890,
16,
25143,
9430,
273,
1083,
4672,
468,
4604,
1347,
326,
1024,
1562,
1410,
1086,
468,
8353,
603,
1142,
1086,
813,
16,
1089,
8670,
16,
468,
1562,
787,
813... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
25779,
2134,
1997,
12,
2890,
16,
25143,
9430,
273,
1083,
4672,
468,
4604,
1347,
326,
1024,
1562,
1410,
1086,
468,
8353,
603,
1142,
1086,
813,
16,
1089,
8670,
16,
468,
1562,
787,
813... | |
def BurnDVDISO(): | def BurnDVDISO(title): | def BurnDVDISO(): write( "Burning ISO image to %s" % dvddrivepath) checkCancelFlag() finished = False tries = 0 while not finished and tries < 10: f = os.open(dvddrivepath, os.O_RDONLY | os.O_NONBLOCK) drivestatus = ioctl(f,CDROM.CDROM_DRIVE_STATUS, 0) os.close(f); if drivestatus == CDROM.CDS_DISC_OK or drivestatus == CDROM.CDS_NO_INFO: if mediatype == DVD_RW and erasedvdrw == True: command = path_growisofs[0] + " -dvd-compat " if drivespeed != 0: command += "-speed=%d " % drivespeed command += " -use-the-force-luke -Z " + dvddrivepath command += " -dvd-video -V 'MythTV DVD' " command += os.path.join(getTempPath(),'dvd') else: command = path_growisofs[0] + " -dvd-compat " if drivespeed != 0: command += "-speed=%d " % drivespeed command += " -Z " + dvddrivepath + " -dvd-video -V 'MythTV DVD' " command += os.path.join(getTempPath(),'dvd') write(command) write("Running growisofs to burn DVD") result = runCommand(command) if result != 0: write("-"*60) write("ERROR: Failed while running growisofs.") write("Result %d, Command was: %s" % (result, command)) write("Please check the troubleshooting section of the README for ways to fix this error") write("-"*60) write("") sys.exit(1) finished = True try: # eject the burned disc f = os.open(dvddrivepath, os.O_RDONLY | os.O_NONBLOCK) r = ioctl(f,CDROM.CDROMEJECT, 0) os.close(f) except: write("Failed to eject the disc! " "Maybe the media monitor has mounted it") elif drivestatus == CDROM.CDS_TRAY_OPEN: # Give the user 10secs to close the Tray write("Waiting for tray to close.") time.sleep(10) elif drivestatus == CDROM.CDS_NO_DISC: # Open the Tray, if there is one. write("Opening tray to get it fed with a DVD.") f = os.open(dvddrivepath, os.O_RDONLY | os.O_NONBLOCK) ioctl(f,CDROM.CDROMEJECT, 0) os.close(f); elif drivestatus == CDROM.CDS_DRIVE_NOT_READY: # Try a hard reset write("Trying a hard-reset of the device") f = os.open(dvddrivepath, os.O_RDONLY | os.O_NONBLOCK) ioctl(f,CDROM.CDROMEJECT, 0) os.close(f); time.sleep(1) tries += 1 if not finished: fatalError("Tried 10 times to get a good status from DVD drive - Giving up!") write("Finished burning ISO image") | 87ee8e4938a9bc41c4ba992fd57f61744dee45ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13713/87ee8e4938a9bc41c4ba992fd57f61744dee45ce/mythburn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
605,
321,
30199,
2565,
3584,
12,
2649,
4672,
1045,
12,
315,
38,
321,
310,
9351,
1316,
358,
738,
87,
6,
738,
12494,
449,
86,
688,
803,
13,
866,
6691,
4678,
1435,
225,
6708,
273,
1083,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
605,
321,
30199,
2565,
3584,
12,
2649,
4672,
1045,
12,
315,
38,
321,
310,
9351,
1316,
358,
738,
87,
6,
738,
12494,
449,
86,
688,
803,
13,
866,
6691,
4678,
1435,
225,
6708,
273,
1083,
... |
res.append( self.move_line_get_item(cr, uid, line, context)) for tax in tax_obj.compute(cr, uid, line.invoice_line_tax_id, (line.price_unit *(1.0-(line['discount'] or 0.0)/100.0)), line.quantity, inv.address_invoice_id.id, line.product_id, inv.partner_id): | res.append(self.move_line_get_item(cr, uid, line, context)) tax_code_found= False for tax in tax_obj.compute(cr, uid, line.invoice_line_tax_id, (line.price_unit * (1.0 - (line['discount'] or 0.0) / 100.0)), line.quantity, inv.address_invoice_id.id, line.product_id, inv.partner_id): | def move_line_get(self, cr, uid, invoice_id, context={}): res = [] tax_grouped = {} tax_obj = self.pool.get('account.tax') cur_obj = self.pool.get('res.currency') ait_obj = self.pool.get('account.invoice.tax') inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id) cur = inv.currency_id | 2dc533b969687458f10362d76b0d0320bfe478db /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/2dc533b969687458f10362d76b0d0320bfe478db/invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
67,
1369,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
9179,
67,
350,
16,
819,
12938,
4672,
400,
273,
5378,
5320,
67,
25472,
273,
2618,
5320,
67,
2603,
273,
365,
18,
6011,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
67,
1369,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
9179,
67,
350,
16,
819,
12938,
4672,
400,
273,
5378,
5320,
67,
25472,
273,
2618,
5320,
67,
2603,
273,
365,
18,
6011,
18,
58... |
self.deleteTransformationInputDataQuery(transID,connection=connection) | self.deleteTransformationInputDataQuery( transID, connection = connection ) | def __addInputDataQuery(self, transID, queryDict, author='', connection=False): res = self.getTransformationInputDataQuery(transID, connection=connection) if res['OK']: return S_ERROR("Input data query already exists for transformation") if res['Message'] != 'No InputDataQuery found for transformation': return res insertTuples = [] for parameterName in sortList(queryDict.keys()): parameterValue = queryDict[parameterName] if not parameterValue: continue parameterType = 'String' if type(parameterValue) in [ListType,TupleType]: if type(parameterValue[0]) in [IntType,LongType]: parameterType = 'Integer' parameterValue = [str(x) for x in parameterValue] parameterValue = ';;;'.join(parameterValue) else: if type(parameterValue) in [IntType,LongType]: parameterType = 'Integer' parameterValue = str(parameterValue) insertTuples.append("(%d,'%s','%s','%s')" % (transID,parameterName,parameterValue,parameterType)) if not insertTuples: return S_ERROR("No input data query to be inserted") req = "INSERT INTO TransformationInputDataQuery (TransformationID,ParameterName,ParameterValue,ParameterType) VALUES %s" % ','.join(insertTuples) res = self._update(req,connection) if not res['OK']: message = 'Failed to add input data query' self.deleteTransformationInputDataQuery(transID,connection=connection) else: message = 'Added input data query' self.__updateTransformationLogging(transID,message,author,connection=connection) return res | 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,
1001,
1289,
1210,
751,
1138,
12,
2890,
16,
906,
734,
16,
843,
5014,
16,
2869,
2218,
2187,
1459,
33,
8381,
4672,
400,
273,
365,
18,
588,
15292,
1210,
751,
1138,
12,
2338,
734,
16,
1459,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1289,
1210,
751,
1138,
12,
2890,
16,
906,
734,
16,
843,
5014,
16,
2869,
2218,
2187,
1459,
33,
8381,
4672,
400,
273,
365,
18,
588,
15292,
1210,
751,
1138,
12,
2338,
734,
16,
1459,... |
pattern = join(self.packageResourceFolder, pat) | pattern = join(self.resourceFolder, pat) | def _addResources(self): "Add Welcome/ReadMe/License files, .lproj folders and scripts." | d932aaa96ea8845f4755fa2da90712cb71b9e9c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d932aaa96ea8845f4755fa2da90712cb71b9e9c4/buildpkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
3805,
12,
2890,
4672,
315,
986,
678,
16312,
19,
1994,
4667,
19,
13211,
1390,
16,
263,
80,
17995,
9907,
471,
8873,
1199,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
3805,
12,
2890,
4672,
315,
986,
678,
16312,
19,
1994,
4667,
19,
13211,
1390,
16,
263,
80,
17995,
9907,
471,
8873,
1199,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.engine.processFrame(StompFrame('SUBSCRIBE', headers={'destination': '/queue/bar', | self.engine.process_frame(StompFrame('SUBSCRIBE', headers={'destination': '/queue/bar', | def test_subscribe_ack(self): """ Test subscribing to a queue with ack=true """ self._connect() self.engine.processFrame(StompFrame('SUBSCRIBE', headers={'destination': '/queue/bar', 'ack': 'client'})) assert self.conn.reliable_subscriber == True assert self.conn in self.qm.queues['/queue/bar'] | f9d8d8c4b602e4da62a32eac4e04f31994d99e97 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10258/f9d8d8c4b602e4da62a32eac4e04f31994d99e97/test_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9174,
67,
484,
12,
2890,
4672,
3536,
7766,
10189,
310,
358,
279,
2389,
598,
8479,
33,
3767,
3536,
365,
6315,
3612,
1435,
365,
18,
8944,
18,
2567,
67,
3789,
12,
510,
20667,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9174,
67,
484,
12,
2890,
4672,
3536,
7766,
10189,
310,
358,
279,
2389,
598,
8479,
33,
3767,
3536,
365,
6315,
3612,
1435,
365,
18,
8944,
18,
2567,
67,
3789,
12,
510,
20667,
32... |
report.write("\n\nThe following subject languages returned no results:\n") | report.write("\n\nThe following %s subject languages returned no results:\n" % len(subjzeros)) | def inc(var, dict): if var in dict: dict[var] += 1 else: dict[var] = 1 | 87cab1882ebddf3ad47a4249bd5b2a75fabd3742 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8937/87cab1882ebddf3ad47a4249bd5b2a75fabd3742/worldcat2olac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7290,
12,
1401,
16,
2065,
4672,
309,
569,
316,
2065,
30,
2065,
63,
1401,
65,
1011,
404,
469,
30,
2065,
63,
1401,
65,
273,
404,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7290,
12,
1401,
16,
2065,
4672,
309,
569,
316,
2065,
30,
2065,
63,
1401,
65,
1011,
404,
469,
30,
2065,
63,
1401,
65,
273,
404,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.