rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
else: cache = None
def load( self, Object_type, object_id, revision = None ): """ Load the object corresponding to the given object id from the database and return it, or None if the object_id is unknown. If a revision is provided, a specific revision of the object will be loaded.
953f572b2008c47594df790cb84c88faae92c0f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6754/953f572b2008c47594df790cb84c88faae92c0f5/Database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 365, 16, 1033, 67, 723, 16, 733, 67, 350, 16, 6350, 273, 599, 262, 30, 3536, 4444, 326, 733, 4656, 358, 326, 864, 733, 612, 628, 326, 2063, 471, 327, 518, 16, 578, 599, 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, 1262, 12, 365, 16, 1033, 67, 723, 16, 733, 67, 350, 16, 6350, 273, 599, 262, 30, 3536, 4444, 326, 733, 4656, 358, 326, 864, 733, 612, 628, 326, 2063, 471, 327, 518, 16, 578, 599, 3...
timeLeft = float( cpuRemaining * cpuLimit * 100 * self.scaleFactor )
timeLeft = float( cpuRemaining * cpuLimit / 100 * self.scaleFactor )
def getTimeLeft(self,cpuConsumed): """Returns the CPU Time Left for supported batch systems. The CPUConsumed is the current raw total CPU. """ #Quit if no scale factor available if not self.scaleFactor: self.log.warn('/LocalSite/CPUScalingFactor not defined for site %s' %self.site) return S_ERROR('/LocalSite/CPUScalingFactor not defined for site %s' %self.site)
8dcf14bc5812f2afe038bc7d2e7a07e09e313158 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/8dcf14bc5812f2afe038bc7d2e7a07e09e313158/TimeLeft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6135, 3910, 12, 2890, 16, 11447, 20554, 4672, 3536, 1356, 326, 12154, 2647, 13338, 364, 3260, 2581, 14908, 18, 225, 1021, 12154, 20554, 353, 326, 783, 1831, 2078, 12154, 18, 3536, 468, 253...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6135, 3910, 12, 2890, 16, 11447, 20554, 4672, 3536, 1356, 326, 12154, 2647, 13338, 364, 3260, 2581, 14908, 18, 225, 1021, 12154, 20554, 353, 326, 783, 1831, 2078, 12154, 18, 3536, 468, 253...
raw_datas = "2;US-OERP-0000;162220;MR;Shah;Harshit;W Sussex;;25 Oxford Road;;BE;BN;BN11 1XQ;WORTHING.LU.SX"
def onchange_rawdatas(self, cr, uid, ids, raw_datas): if not raw_datas: return {} raw_datas = "2;US-OERP-0000;162220;MR;Shah;Harshit;W Sussex;;25 Oxford Road;;BE;BN;BN11 1XQ;WORTHING.LU.SX" value = raw_datas.split(';') key = ['datamatrix_type', 'segment_id', 'customer_code', 'title', 'customer_lastname', 'customer_firstname', 'customer_add1', 'customer_add2', 'customer_add3', 'customer_add4', 'country_id', 'zip_summary', 'zip', 'distribution_office'] value = dict(zip(key, value)) field_check = {'res.country':('country_id','Country'), 'dm.campaign.proposition.segment' : ('segment_id','Segment') # 'dm.offer_step' : ('offer_step_id','Offer Step') } for m in field_check: field = field_check[m][0] if value.has_key(field) and value[field]: f_id = self.pool.get(m).search(cr,uid,[('code','=',value[field])]) if f_id: value[field]= f_id raise osv.except_osv(_('Error !'), _('No %s found for the code '%field_check[m][1])) else: raise osv.except_osv(_('Error !'), _('There is no code defined for %s'%field_check[m][1])) return {'value': value}
3e950a56936f9d3cac903e6a5230754ff8e3bfd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/3e950a56936f9d3cac903e6a5230754ff8e3bfd1/dm_order_entry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 1899, 13178, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1831, 67, 13178, 4672, 309, 486, 1831, 67, 13178, 30, 327, 2618, 225, 460, 273, 1831, 67, 13178, 18, 4939, 2668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1899, 13178, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1831, 67, 13178, 4672, 309, 486, 1831, 67, 13178, 30, 327, 2618, 225, 460, 273, 1831, 67, 13178, 18, 4939, 2668,...
def DelArrayElement(tag, id, idx):
def DelArrayElement(tag, hashid, idx):
def DelArrayElement(tag, id, idx): raise DeprecatedIDCError, "Use python pickles instead."
4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6603, 1076, 1046, 12, 2692, 16, 1651, 350, 16, 2067, 4672, 1002, 9336, 734, 39, 668, 16, 315, 3727, 5790, 6002, 1040, 3560, 1199, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6603, 1076, 1046, 12, 2692, 16, 1651, 350, 16, 2067, 4672, 1002, 9336, 734, 39, 668, 16, 315, 3727, 5790, 6002, 1040, 3560, 1199, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
el2 = etree.SubElement(el1, 'style:background-image') el = etree.SubElement(self.automatic_styles, 'style:style', attrib={
el2 = SubElement(el1, 'style:background-image') el = SubElement(self.automatic_styles, 'style:style', attrib={
def visit_option_list(self, node): #self.document.reporter.debug_flag = 1 #self.document.reporter.attach_observer(self.show_message) table_name = 'rststyle-tableoption' # # Generate automatic styles if not self.optiontablestyles_generated: self.optiontablestyles_generated = True el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': table_name, 'style:family': 'table'}) el1 = etree.SubElement(el, 'style:table-properties', attrib={ 'style:width': '17.59cm', 'table:align': 'left', 'style:shadow': 'none'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.A' % table_name, 'style:family': 'table-column'}) el1 = etree.SubElement(el, 'style:table-column-properties', attrib={ 'style:column-width': '4.999cm'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.B' % table_name, 'style:family': 'table-column'}) el1 = etree.SubElement(el, 'style:table-column-properties', attrib={ 'style:column-width': '12.587cm'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.A1' % table_name, 'style:family': 'table-cell'}) el1 = etree.SubElement(el, 'style:table-cell-properties', attrib={ 'fo:background-color': 'transparent', 'fo:padding': '0.097cm', 'fo:border-left': '0.035cm solid #000000', 'fo:border-right': 'none', 'fo:border-top': '0.035cm solid #000000', 'fo:border-bottom': '0.035cm solid #000000'}) el2 = etree.SubElement(el1, 'style:background-image') el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.B1' % table_name, 'style:family': 'table-cell'}) el1 = etree.SubElement(el, 'style:table-cell-properties', attrib={ 'fo:padding': '0.097cm', 'fo:border': '0.035cm solid #000000'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.A2' % table_name, 'style:family': 'table-cell'}) el1 = etree.SubElement(el, 'style:table-cell-properties', attrib={ 'fo:padding': '0.097cm', 'fo:border-left': '0.035cm solid #000000', 'fo:border-right': 'none', 'fo:border-top': 'none', 'fo:border-bottom': '0.035cm solid #000000'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.B2' % table_name, 'style:family': 'table-cell'}) el1 = etree.SubElement(el, 'style:table-cell-properties', attrib={ 'fo:padding': '0.097cm', 'fo:border-left': '0.035cm solid #000000', 'fo:border-right': '0.035cm solid #000000', 'fo:border-top': 'none', 'fo:border-bottom': '0.035cm solid #000000'}) # # Generate table data el = self.append_child('table:table', attrib={ 'table:name': table_name, 'table:style-name': table_name, }) el1 = etree.SubElement(el, 'table:table-column', attrib={ 'table:style-name': '%s.A' % table_name}) el1 = etree.SubElement(el, 'table:table-column', attrib={ 'table:style-name': '%s.B' % table_name}) el1 = etree.SubElement(el, 'table:table-header-rows') el2 = etree.SubElement(el1, 'table:table-row') el3 = etree.SubElement(el2, 'table:table-cell', attrib={ 'table:style-name': '%s.A1' % table_name, 'office:value-type': 'string'}) el4 = etree.SubElement(el3, 'text:p', attrib={ 'text:style-name': 'Table_20_Heading'}) el4.text= 'Option' el3 = etree.SubElement(el2, 'table:table-cell', attrib={ 'table:style-name': '%s.B1' % table_name, 'office:value-type': 'string'}) el4 = etree.SubElement(el3, 'text:p', attrib={ 'text:style-name': 'Table_20_Heading'}) el4.text= 'Description' self.set_current_element(el)
57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 3482, 67, 1098, 12, 2890, 16, 756, 4672, 468, 2890, 18, 5457, 18, 266, 7988, 18, 4148, 67, 6420, 273, 404, 468, 2890, 18, 5457, 18, 266, 7988, 18, 7331, 67, 30971, 12, 2890...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 3482, 67, 1098, 12, 2890, 16, 756, 4672, 468, 2890, 18, 5457, 18, 266, 7988, 18, 4148, 67, 6420, 273, 404, 468, 2890, 18, 5457, 18, 266, 7988, 18, 7331, 67, 30971, 12, 2890...
print >>dagfile, """<dag id="%s" file="%s">""" % (id, subdag_name)
print >>dagfile, """<dag id="%s" file="%s">""" % (id_tag, subdag_name)
def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 17801, 67, 30204, 12, 2890, 4672, 3536, 2598, 777, 326, 2199, 316, 326, 6095, 358, 326, 463, 2501, 585, 18, 3536, 309, 486, 365, 16186, 72, 651, 67, 768, 67, 803, 30, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 17801, 67, 30204, 12, 2890, 4672, 3536, 2598, 777, 326, 2199, 316, 326, 6095, 358, 326, 463, 2501, 585, 18, 3536, 309, 486, 365, 16186, 72, 651, 67, 768, 67, 803, 30, 468, ...
for line in file(f).read().split(';'):
for line in file_open(f).read().split(';'):
def init_db(cr): import addons f = addons.get_module_resource('base', 'base.sql') for line in file(f).read().split(';'): if (len(line)>0) and (not line.isspace()): cr.execute(line) cr.commit() for i in addons.get_modules(): terp_file = addons.get_module_resource(i, '__terp__.py') mod_path = addons.get_module_path(i) if not mod_path: continue info = False if os.path.isfile(terp_file) and not os.path.isfile(mod_path+'.zip'): info = eval(file(terp_file).read()) elif zipfile.is_zipfile(mod_path+'.zip'): zfile = zipfile.ZipFile(mod_path+'.zip') i = os.path.splitext(i)[0] info = eval(zfile.read(os.path.join(i, '__terp__.py'))) if info: categs = info.get('category', 'Uncategorized').split('/') p_id = None while categs: if p_id is not None: cr.execute('select id \ from ir_module_category \ where name=%s and parent_id=%s', (categs[0], p_id)) else: cr.execute('select id \ from ir_module_category \ where name=%s and parent_id is NULL', (categs[0],)) c_id = cr.fetchone() if not c_id: cr.execute('select nextval(\'ir_module_category_id_seq\')') c_id = cr.fetchone()[0] cr.execute('insert into ir_module_category \ (id, name, parent_id) \ values (%s, %s, %s)', (c_id, categs[0], p_id)) else: c_id = c_id[0] p_id = c_id categs = categs[1:] active = info.get('active', False) installable = info.get('installable', True) if installable: if active: state = 'to install' else: state = 'uninstalled' else: state = 'uninstallable' cr.execute('select nextval(\'ir_module_module_id_seq\')') id = cr.fetchone()[0] cr.execute('insert into ir_module_module \ (id, author, website, name, shortdesc, description, \ category_id, state) \ values (%s, %s, %s, %s, %s, %s, %s, %s)', ( id, info.get('author', ''), info.get('website', ''), i, info.get('name', False), info.get('description', ''), p_id, state)) dependencies = info.get('depends', []) for d in dependencies: cr.execute('insert into ir_module_module_dependency \ (module_id,name) values (%s, %s)', (id, d)) cr.commit()
90e04b8632de7d64bba8c43217088fad7ced8ca9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/90e04b8632de7d64bba8c43217088fad7ced8ca9/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 1966, 12, 3353, 4672, 1930, 31439, 284, 273, 31439, 18, 588, 67, 2978, 67, 3146, 2668, 1969, 2187, 296, 1969, 18, 4669, 6134, 364, 980, 316, 585, 67, 3190, 12, 74, 2934, 896,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 1966, 12, 3353, 4672, 1930, 31439, 284, 273, 31439, 18, 588, 67, 2978, 67, 3146, 2668, 1969, 2187, 296, 1969, 18, 4669, 6134, 364, 980, 316, 585, 67, 3190, 12, 74, 2934, 896,...
self.driver.Delete( new_filename )
if gdal.GetConfigOption( 'CPL_DEBUG', 'OFF' ) != 'ON': self.driver.Delete( new_filename )
def testSetMetadata(self):
ae1760ad3431993c029a613974b0e9e98f40041b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10290/ae1760ad3431993c029a613974b0e9e98f40041b/gdaltest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 694, 2277, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 694, 2277, 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, -1...
if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) tmpList=list() for chan in zValueDict[sngl.ifo]:
for zFile in fnmatch.filter(filesOmega,\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)): for chan in wikiFileFinder.__readSummary__(zFile):
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.exists(wikiFilename) and maxCount < 15: sys.stdout.write("File %s already exists.\n"%\ os.path.split(wikiFilename)[1]) wikiFilename=wikiFilename+".wiki" maxCount=maxCount+1 # #Create the wikipage object etc # wikiPage=wiki(wikiFilename) # # Create top two trigger params tables # cTable=wikiPage.wikiTable(2,9) cTable.data=[ ["Trigger Type", "Rank", "FAR", "SNR", "IFOS(Coinc)", "Instruments(Active)", "Coincidence Time (s)", "Total Mass (mSol)", "Chirp Mass (mSol)" ], ["%s"%(wikiCoinc.type), "%s"%(wikiCoinc.rank), "%s"%(wikiCoinc.far), "%s"%(wikiCoinc.snr), "%s"%(wikiCoinc.ifos), "%s"%(wikiCoinc.instruments), "%s"%(wikiCoinc.time), "%s"%(wikiCoinc.mass), "%s"%(wikiCoinc.mchirp) ] ] pTable=wikiPage.wikiTable(len(wikiCoinc.sngls_in_coinc())+1,7) pTable.data[0]=[ "IFO", "GPS Time(s)", "SNR", "CHISQR", "Mass 1", "Mass 2", "Chirp Mass" ] for row,cSngl in enumerate(wikiCoinc.sngls_in_coinc()): pTable.data[row+1]=[ "%s"%(cSngl.ifo), "%s"%(cSngl.time), "%s"%(cSngl.snr), "%s"%(cSngl.chisqr), "%s"%(cSngl.mass1), "%s"%(cSngl.mass2), "%s"%(cSngl.mchirp) ] #Write the tables into the Wiki object wikiPage.putText("Coincident Trigger Event Information: %s\n"\ %(stfu_pipe.gpsTimeToReadableDate(wikiCoinc.time))) wikiPage.insertTable(cTable) wikiPage.putText("Corresponding Coincident Single IFO Trigger Information\n") wikiPage.insertTable(pTable) #Generate a table of contents to appear after candidate params table wikiPage.tableOfContents(3) #Begin including each checklist item as section with subsections wikiPage.section("Follow-up Checklist") #Put each checklist item wikiPage.subsection("Checklist Summary") wikiPage.subsubsection("Does this candidate pass this checklist?") wikiPage.subsubsection("Answer") wikiPage.subsubsection("Relevant Information and Comments") wikiPage.insertHR() # #First real checklist item wikiPage.subsection("#0 False Alarm Probability") wikiPage.subsubsection("Question") wikiPage.putText("What is the false alarm rate associated with this candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") farTable=wikiPage.wikiTable(2,1) farTable.setTableStyle("background-color: yellow; text-align center;") farTable.data[0][0]="False Alarm Rate" farTable.data[1][0]="%s"%(wikiCoinc.far) wikiPage.insertTable(farTable) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#1 Data Quality Flags") wikiPage.subsubsection("Question") wikiPage.putText("Can the data quality flags coincident with this candidate be safely disregarded?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPath=os.path.split(wikiFilename)[0] dqFileList=wikiFileFinder.get_findFlags() if len(dqFileList) != 1: sys.stdout.write("Warning: DQ flags data product import problem.\n") print "Found %i files."%len(dqFileList) for mf in dqFileList: print mf for myFile in dqFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#2 Veto Investigations") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate survive the veto investigations performed at its time?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") vetoFileList=wikiFileFinder.get_findVetos() if len(vetoFileList) != 1: sys.stdout.write("Warning: Veto flags data product import problem.\n") for myFile in vetoFileList:print myFile for myFile in vetoFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#3 IFO Status") wikiPage.subsubsection("Question") wikiPage.putText("Are the interferometers operating normally with a reasonable level of sensitivity around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") #Add link to Daily Stats if wikiCoinc.time <= endOfS5: statsLink=wikiPage.makeExternalLink("http://blue.ligo-wa.caltech.edu/scirun/S5/DailyStatistics/",\ "S5 Daily Stats Page") else: statsLink="This should be a link to S6 Daily Stats!\n" wikiPage.putText(statsLink) #Link figures of merit #Get link for all members of wikiCoinc wikiPage.putText("Figures of Merit\n") if wikiCoinc.time > endOfS5: fomLinks=dict() elems=0 for wikiSngl in wikiCoinc.sngls: if not(wikiSngl.ifo.upper().rstrip().lstrip() == 'V1'): fomLinks[wikiSngl.ifo]=stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo) elems=elems+len(fomLinks[wikiSngl.ifo]) else: for myLabel,myLink,myThumb in stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo): wikiPage.putText("%s\n"%(wikiPage.makeExternalLink(myLink,myLabel))) cols=4 rows=(elems/3)+1 fTable=wikiPage.wikiTable(rows,cols) fTable.data[0]=["IFO,Shift","FOM1","FOM2","FOM3"] currentIndex=0 for myIFOKey in fomLinks.keys(): for label,link,thumb in fomLinks[myIFOKey]: myRow=currentIndex/int(3)+1 myCol=currentIndex%int(3)+1 fTable.data[myRow][0]=label thumbURL=thumb fTable.data[myRow][myCol]="%s"%(wikiPage.linkedRemoteImage(thumb,link)) currentIndex=currentIndex+1 wikiPage.insertTable(fTable) else: wikiPage.putText("Can not automatically fetch S5 FOM links.") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#4 Candidate Appearance") wikiPage.subsubsection("Question") wikiPage.putText("Do the Qscan figures show what we would expect for a gravitational-wave event?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() for sngl in wikiCoinc.sngls: frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'hoft') indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*/%s/*/%s/*index.html"%(frametype,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened.png"\ %(sngl.time,channelName)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened?thumb.png"\ %(sngl.time,channelName)) # #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("GW data channel scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >= 1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >= 1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: Candidate appearance plot import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#5 Seismic Plots") wikiPage.subsubsection("Question") wikiPage.putText("Is the seismic activity insignificant around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() # for sngl in wikiCoinc.sngls_in_coinc(): indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*index.html"%(sngl.ifo,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if (len(zValueFiles) > 0): for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Search for analyzeQscan files #/L1-analyseQscan_L1_932797512_687_seis_rds_L1_SEI-ETMX_X_z_scat-unspecified-gpstime.png timeString=str(float(sngl.time)).replace(".","_") zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.txt"%(sngl.ifo,timeString)) indexDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.html"%(sngl.ifo,timeString)) thumbDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime_thumb.png"\ %(sngl.ifo,timeString)) imageDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime.png"\ %(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse keeping SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Seismic scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: Seismic plots product import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#6 Other environmental causes") wikiPage.subsubsection("Question") wikiPage.putText("Were the environmental disturbances (other than seismic) insignificant at the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only PEM channels for sngl in wikiCoinc.sngls_in_coinc(): imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping PEM and not SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) for chan in zValueDictAQ[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(imageDict[sngl.ifo]) < 1: wikiPage.putText("PEM scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: PEM plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#7 Auxiliary degree of freedom") wikiPage.subsubsection("Question") wikiPage.putText("Were the auxiliary channel transients coincident with the candidate insignificant?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only AUX channels for sngl in wikiCoinc.sngls: imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") #H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.html for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Other scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: AUX plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#8 Electronic Log Book") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the comments posted by the sci-mons or the operators in the e-log?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiLinkLHOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"H1"), "Hanford eLog") wikiLinkLLOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"L1"), "Livingston eLog") wikiPage.putText("%s\n\n%s\n\n"%(wikiLinkLHOlog,wikiLinkLLOlog)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#9 Glitch Report") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the weekly glitch report?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") if int(wikiCoinc.time) >= endOfS5: wikiLinkGlitch=wikiPage.makeExternalLink( "https://www.lsc-group.phys.uwm.edu/twiki/bin/view/DetChar/GlitchStudies", "Glitch Reports for S6" ) else: wikiLinkGlitch=wikiPage.makeExternalLink( "http://www.lsc-group.phys.uwm.edu/glitch/investigations/s5index.html#shift", "Glitch Reports for S5" ) wikiPage.putText("%s\n"%(wikiLinkGlitch)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#10 Snr versus time") wikiPage.subsubsection("Question") wikiPage.putText("Is this trigger significant in a SNR versus time plot of all triggers in its analysis chunk?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#11 Parameters of the candidate") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate have a high likelihood of being a gravitational-wave according to its parameters?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Effective Distance Ratio Test\n") effDList=wikiFileFinder.get_effDRatio() if len(effDList) != 1: sys.stdout.write("Warning: Effective Distance Test import problem.\n") for myFile in effDList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#12 Snr and Chisq") wikiPage.subsubsection("Question") wikiPage.putText("Are the SNR and CHISQ time series consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") # #Put plots SNR and Chi sqr # indexList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*.html") thumbList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_snr-*thumb.png") thumbList.extend(fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_chisq-*thumb.png")) thumbList.sort() indexList=[file2URL.convert(x) for x in indexList] thumbList=[file2URL.convert(x) for x in thumbList] #Two thumb types possible "_thumb.png" or ".thumb.png" imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] ifoCount=len(wikiCoinc.sngls) rowLabel={"SNR":1,"CHISQ":2} rowCount=len(rowLabel) colCount=ifoCount if len(indexList) >= 1: snrTable=wikiPage.wikiTable(rowCount+1,colCount+1) for i,sngl in enumerate(wikiCoinc.sngls): myIndex="" for indexFile in indexList: if indexFile.__contains__("_pipe_%s_FOLLOWUP_"%sngl.ifo): myIndex=indexFile if myIndex=="": snrTable.data[0][i+1]=" %s "%sngl.ifo else: snrTable.data[0][i+1]=wikiPage.makeExternalLink(myIndex,sngl.ifo) for col,sngl in enumerate(wikiCoinc.sngls): for row,label in enumerate(rowLabel.keys()): snrTable.data[row+1][0]=label for k,image in enumerate(imageList): if (image.__contains__("_%s-"%label.lower()) \ and image.__contains__("pipe_%s_FOLLOWUP"%sngl.ifo)): snrTable.data[row+1][col+1]=" %s "%(wikiPage.linkedRemoteImage(thumbList[k],thumbList[k])) wikiPage.insertTable(snrTable) else: sys.stdout.write("Warning: SNR and CHISQ plots not found.\n") wikiPage.putText("SNR and CHISQ plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#13 Template bank veto") wikiPage.subsubsection("Question") wikiPage.putText("Is the bank veto value consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#14 Coherent studies") wikiPage.subsubsection("Question") wikiPage.putText("Are the triggers found in multiple interferometers coherent with each other?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") indexList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),"*.html") if len(indexList) >= 1: myIndex=file2URL.convert(indexList[0]) wikiPage.putText(wikiPage.makeExternalLink(myIndex,\ "%s Coherence Study Results"%(wikiCoinc.ifos))) thumbList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),\ "PLOT_CHIA_%s_snr-squared*thumb.png"%(wikiCoinc.time)) imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] rowCount=len(imageList) colCount=1 cohSnrTimeTable=wikiPage.wikiTable(rowCount+1,colCount) cohSnrTimeTable.data[0][0]="%s Coherent SNR Squared Times Series"%(wikiCoinc.ifos) for i,image in enumerate(imageList): cohSnrTimeTable.data[i+1][0]=wikiPage.linkedRemoteImage(image,thumbList[i]) wikiPage.insertTable(cohSnrTimeTable) else: sys.stdout.write("Warning: Coherent plotting jobs not found.\n") wikiPage.putText("Coherent Studies plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#15 Segmentation Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in segmentation?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#16 Calibration Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in calibration that are consistent with systematic uncertainties?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #
fb84ac33aba836b8fcb61075cfaec34ced2846c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/fb84ac33aba836b8fcb61075cfaec34ced2846c0/makeCheckListWiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1564, 1098, 12, 13044, 5359, 33, 7036, 16, 13044, 27055, 71, 33, 7036, 16, 13044, 2471, 33, 7036, 16, 768, 22, 1785, 33, 7036, 4672, 3536, 2985, 358, 2911, 279, 866, 1098, 1625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1564, 1098, 12, 13044, 5359, 33, 7036, 16, 13044, 27055, 71, 33, 7036, 16, 13044, 2471, 33, 7036, 16, 768, 22, 1785, 33, 7036, 4672, 3536, 2985, 358, 2911, 279, 866, 1098, 1625, ...
nodes = [] nodes.append(self.expr) nodes.extend(flatten_nodes(self.subs)) return tuple(nodes)
nodelist = [] nodelist.append(self.expr) nodelist.extend(flatten_nodes(self.subs)) return tuple(nodelist)
def getChildNodes(self): nodes = [] nodes.append(self.expr) nodes.extend(flatten_nodes(self.subs)) return tuple(nodes)
0ac16ec1493e76721d37d537a132195fdb2cbe4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0ac16ec1493e76721d37d537a132195fdb2cbe4f/ast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23895, 12, 2890, 4672, 2199, 273, 5378, 2199, 18, 6923, 12, 2890, 18, 8638, 13, 2199, 18, 14313, 12, 16940, 67, 4690, 12, 2890, 18, 22284, 3719, 327, 3193, 12, 4690, 13, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23895, 12, 2890, 4672, 2199, 273, 5378, 2199, 18, 6923, 12, 2890, 18, 8638, 13, 2199, 18, 14313, 12, 16940, 67, 4690, 12, 2890, 18, 22284, 3719, 327, 3193, 12, 4690, 13, 2, -100, -100,...
return '0'*(11-len(i))+i+' '
v = '0'*(11-len(i))+i+' ' if len(v) > 12: left = v[:-12] for c in left: if c != '0': raise ValueError, 'value too large for oct12' return v[-12:] return v
def oct12(i): i=oct(i) return '0'*(11-len(i))+i+' '
69798eb8854a406787e50821c7d0a8ddf93d98b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/69798eb8854a406787e50821c7d0a8ddf93d98b6/tar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10844, 2138, 12, 77, 4672, 277, 33, 13410, 12, 77, 13, 331, 273, 296, 20, 11, 21556, 2499, 17, 1897, 12, 77, 3719, 15, 77, 6797, 296, 309, 562, 12, 90, 13, 405, 2593, 30, 2002, 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, 10844, 2138, 12, 77, 4672, 277, 33, 13410, 12, 77, 13, 331, 273, 296, 20, 11, 21556, 2499, 17, 1897, 12, 77, 3719, 15, 77, 6797, 296, 309, 562, 12, 90, 13, 405, 2593, 30, 2002, 273...
ifp = open(ifp)
ifp = io.open(ifp, 'rb')
def __init__(self, ifp): if isinstance(ifp, basestring): ifp = open(ifp) # # Find initial colon. # while 1: ch = ifp.read(1) if not ch: raise Error, "No binhex data found" # Cater for \r\n terminated lines (which show up as \n\r, hence # all lines start with \r) if ch == '\r': continue if ch == ':': break if ch != '\n': dummy = ifp.readline()
2b5df605d4feb6b9f3d5c2b690131cf85c3b0fed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/2b5df605d4feb6b9f3d5c2b690131cf85c3b0fed/binhex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 309, 84, 4672, 309, 1549, 12, 430, 84, 16, 10699, 4672, 309, 84, 273, 2527, 18, 3190, 12, 430, 84, 16, 296, 6731, 6134, 468, 468, 4163, 2172, 13336, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 309, 84, 4672, 309, 1549, 12, 430, 84, 16, 10699, 4672, 309, 84, 273, 2527, 18, 3190, 12, 430, 84, 16, 296, 6731, 6134, 468, 468, 4163, 2172, 13336, 18...
return unicode(self).encode('utf-8')
return self.value or ''
def __str__(self): return unicode(self).encode('utf-8')
16b9b09222313e6cf45cd4daa313fd0f951f6a94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/16b9b09222313e6cf45cd4daa313fd0f951f6a94/sql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 5252, 12, 2890, 2934, 3015, 2668, 3158, 17, 28, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 5252, 12, 2890, 2934, 3015, 2668, 3158, 17, 28, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
ttalk_webpage = urllib.urlopen(tedtalk_webpage).read()
ttalk_webpage = urllib2.urlopen(tedtalk_webpage).read()
def main(): """main section""" # first, parse the options & arguments (opts, args) = options().parse_args() if not args: options().print_help() else: tedtalk_webpage = args[0] ## Reads the talk web page, to search the talk's values ttalk_webpage = urllib.urlopen(tedtalk_webpage).read() ttalk_intro = int(re.search("introDuration:(\d+),", ttalk_webpage).group(1)) ttalk_id = int(re.search("talkID = (\d+);", ttalk_webpage).group(1)) ttalk_vid = re.search('hs:"(?:\w+:)?talks/dynamic/(.*)-high.\w+"', ttalk_webpage).group(1) + '_480.mp4' #@ Get subs (and video) check_subs(ttalk_id, ttalk_intro, ttalk_vid) if not opts.no_video: get_video(ttalk_vid)
4c5c6e3145ac56c910754a2f7489f40e0f8834f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11243/4c5c6e3145ac56c910754a2f7489f40e0f8834f3/TEDSubs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 5254, 2442, 8395, 468, 1122, 16, 1109, 326, 702, 473, 1775, 261, 4952, 16, 833, 13, 273, 702, 7675, 2670, 67, 1968, 1435, 225, 309, 486, 833, 30, 702, 7675, 1188, 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, 2774, 13332, 3536, 5254, 2442, 8395, 468, 1122, 16, 1109, 326, 702, 473, 1775, 261, 4952, 16, 833, 13, 273, 702, 7675, 2670, 67, 1968, 1435, 225, 309, 486, 833, 30, 702, 7675, 1188, 67...
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect((host, port))
self.sock = socket.create_connection((host, port))
def open(self, host = '', port = IMAP4_SSL_PORT): """Setup connection to remote server on "host:port". (default: localhost:standard IMAP4 SSL port). This connection will be used by the routines: read, readline, send, shutdown. """ self.host = host self.port = port self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect((host, port)) self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile)
2fd4b1d68f7059eb03a01621fa749d82539bb1bb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/2fd4b1d68f7059eb03a01621fa749d82539bb1bb/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1479, 273, 10226, 1756, 273, 6246, 2203, 24, 67, 6745, 67, 6354, 4672, 3536, 7365, 1459, 358, 2632, 1438, 603, 315, 2564, 30, 655, 9654, 261, 1886, 30, 17365, 30, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1479, 273, 10226, 1756, 273, 6246, 2203, 24, 67, 6745, 67, 6354, 4672, 3536, 7365, 1459, 358, 2632, 1438, 603, 315, 2564, 30, 655, 9654, 261, 1886, 30, 17365, 30, 1...
fileobj : File object Filehandle from which data should be read
fileobj: file object Filehandle from which data should be read.
def read_exciting(fileobj, index=-1): """Reads structure from exiting xml file and returns atoms object in a list Parameters ---------- fileobj : File object Filehandle from which data should be read Other parameters ---------------- index : integer -1 Not used in this implementation """ from lxml import etree as ET #parse file into element tree doc = ET.parse(fileobj) root = doc.getroot() speciesnodes = root.find('structure').getiterator('species') symbols = [] positions = [] basevects = [] atoms = None #collect data from tree for speciesnode in speciesnodes: symbol = speciesnode.get('speciesfile').split('.')[0] natoms = speciesnode.getiterator('atom') for atom in natoms: x, y, z = atom.get('coord').split() positions.append([float(x), float(y), float(z)]) symbols.append(symbol) basevectsn = doc.xpath('//basevect/text()') for basevect in basevectsn: x, y, z = basevect.split() basevects.append([float(x) * Bohr, float(y) * Bohr, float(z) * Bohr]) atoms = Atoms(symbols=symbols, cell=basevects) atoms.set_scaled_positions(positions) if 'molecule' in root.find('structure').attrib.keys(): if root.find('structure').attrib['molecule']: atoms.set_pbc(False) else: atoms.set_pbc(True) return atoms
20963dc015ba791833f02b068b8017fc17b7bb73 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/20963dc015ba791833f02b068b8017fc17b7bb73/exciting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 10075, 305, 310, 12, 768, 2603, 16, 770, 29711, 21, 4672, 3536, 7483, 3695, 628, 15702, 2025, 585, 471, 1135, 9006, 733, 316, 279, 666, 225, 7012, 12181, 17041, 30, 585, 733, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 10075, 305, 310, 12, 768, 2603, 16, 770, 29711, 21, 4672, 3536, 7483, 3695, 628, 15702, 2025, 585, 471, 1135, 9006, 733, 316, 279, 666, 225, 7012, 12181, 17041, 30, 585, 733, ...
if __name__ == "__main__": for fullpath in walk_python_files(['.']): print fullpath print "----------" for fullpath in walk_python_files(['.'], is_python=can_be_compiled): print fullpath
def walk_python_files(paths, is_python=looks_like_python, exclude_dirs=None): """\ Recursively yield all Python source files below the given paths. paths: a list of files and/or directories to be checked. is_python: a function that takes a file name and checks whether it is a Python source file exclude_dirs: a list of directory base names that should be excluded in the search """ if exclude_dirs is None: exclude_dirs=[] for path in paths: print_debug("testing: %s" % path) if os.path.isfile(path): if is_python(path): yield path elif os.path.isdir(path): print_debug(" it is a directory") for dirpath, dirnames, filenames in os.walk(path): for exclude in exclude_dirs: if exclude in dirnames: dirnames.remove(exclude) for filename in filenames: fullpath = os.path.join(dirpath, filename) print_debug("testing: %s" % fullpath) if is_python(fullpath): yield fullpath else: print_debug(" unknown type")
568973181aa523bbcf7f827b3a2eb2affd96ea67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/568973181aa523bbcf7f827b3a2eb2affd96ea67/findnocoding.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 67, 8103, 67, 2354, 12, 4481, 16, 353, 67, 8103, 33, 7330, 87, 67, 5625, 67, 8103, 16, 4433, 67, 8291, 33, 7036, 4672, 3536, 64, 31362, 2824, 777, 6600, 1084, 1390, 5712, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 67, 8103, 67, 2354, 12, 4481, 16, 353, 67, 8103, 33, 7330, 87, 67, 5625, 67, 8103, 16, 4433, 67, 8291, 33, 7036, 4672, 3536, 64, 31362, 2824, 777, 6600, 1084, 1390, 5712, 326, ...
if pkt[TCP].reserved != 0:
if pkt.payload.reserved != 0:
def packet2p0f(pkt): while pkt.haslayer(IP) and pkt.haslayer(TCP): pkt = pkt.getlayer(IP) if isinstance(pkt.payload, TCP): break pkt = pkt.payload if not isinstance(pkt, IP) or not isinstance(pkt.payload, TCP): raise TypeError("Not a TCP/IP packet") if pkt.payload.flags & 0x13 != 0x02: #S,!A,!F raise TypeError("Not a syn packet") #t = p0f_kdb.ttl_range[:] #t += [pkt.ttl] #t.sort() #ttl=t[t.index(pkt.ttl)+1] ttl = pkt.ttl df = (pkt.flags & 2) / 2 ss = len(pkt) # from p0f/config.h : PACKET_BIG = 100 if ss > 100: ss = 0 ooo = "" mss = -1 qqT = False qqP = False #qqBroken = False ilen = (pkt[TCP].dataofs << 2) - 20 # from p0f.c for option in pkt.payload.options: ilen -= 1 if option[0] == "MSS": ooo += "M" + str(option[1]) + "," mss = option[1] # FIXME: qqBroken ilen -= 3 elif option[0] == "WScale": ooo += "W" + str(option[1]) + "," # FIXME: qqBroken ilen -= 2 elif option[0] == "Timestamp": if option[1][0] == 0: ooo += "T0," else: ooo += "T," if option[1][1] != 0: qqT = True ilen -= 9 elif option[0] == "SAckOK": ooo += "S," ilen -= 1 elif option[0] == "NOP": ooo += "N," elif option[0] == "EOL": ooo += "E," if ilen > 0: qqP = True else: ooo += "?," # FIXME: ilen ooo = ooo[:-1] if ooo == "": ooo = "." win = pkt.payload.window if mss != -1: if win % mss == 0: win = "S" + str(win/mss) elif win % (mss + 40) == 0: win = "T" + str(win/(mss+40)) win = str(win) qq = "" if qqP: qq += "P" if pkt[IP].id == 0: qq += "Z" if pkt[IP].options != '': qq += "I" if pkt[TCP].urgptr != 0: qq += "U" if pkt[TCP].reserved != 0: qq += "X" if pkt[TCP].ack != 0: qq += "A" if qqT: qq += "T" if pkt[TCP].flags & 40 != 0: # U or P qq += "F" if not isinstance(pkt[TCP].payload, NoPayload): qq += "D" # FIXME : "!" - broken options segment if qq == "": qq = "." return (win, ttl, df, ss, ooo, qq)
bebe0596dd5f92720a86c6f3fa23aaf4b1bbc984 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7311/bebe0596dd5f92720a86c6f3fa23aaf4b1bbc984/p0f.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4414, 22, 84, 20, 74, 12, 5465, 88, 4672, 1323, 11536, 18, 5332, 6363, 12, 2579, 13, 471, 11536, 18, 5332, 6363, 12, 13891, 4672, 11536, 273, 11536, 18, 588, 6363, 12, 2579, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4414, 22, 84, 20, 74, 12, 5465, 88, 4672, 1323, 11536, 18, 5332, 6363, 12, 2579, 13, 471, 11536, 18, 5332, 6363, 12, 13891, 4672, 11536, 273, 11536, 18, 588, 6363, 12, 2579, 13, 309, ...
Reimplements moveEvent() of QToolBar. It is used as a workaround for
Reimplements QWidget.moveEvent(). It is used as a workaround for
def moveEvent(self, event): """ Reimplements moveEvent() of QToolBar. It is used as a workaround for the orientationChanged() signal bug mentioned throughout. """ self.updateSeparatorPixmaps() QToolBar.moveEvent(self, event)
9701fb6170b4a62527b45a297aafacbbef17fd3c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/9701fb6170b4a62527b45a297aafacbbef17fd3c/NE1_QToolBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 1133, 12, 2890, 16, 871, 4672, 3536, 868, 17061, 2238, 4609, 18, 8501, 1133, 7675, 2597, 353, 1399, 487, 279, 18975, 364, 326, 9820, 5033, 1435, 4277, 7934, 27635, 3059, 659, 18, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 1133, 12, 2890, 16, 871, 4672, 3536, 868, 17061, 2238, 4609, 18, 8501, 1133, 7675, 2597, 353, 1399, 487, 279, 18975, 364, 326, 9820, 5033, 1435, 4277, 7934, 27635, 3059, 659, 18, 3...
delay = 0
delay = 0
def extract_xiso(self): self.extracted_filename = None
2c84e3b10ac70c9c707d18fc985824b110520386 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2692/2c84e3b10ac70c9c707d18fc985824b110520386/gxiso.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 5674, 83, 12, 2890, 4672, 365, 18, 8004, 329, 67, 3459, 273, 599, 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, 2608, 67, 5674, 83, 12, 2890, 4672, 365, 18, 8004, 329, 67, 3459, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
editor._write_file = dummy_write
print 'BODY:', editor.body
def dummy_write(self, *args, **kwargs): print "PageEditor can't save a page if Abort is returned from PreSave event handlers" assert False
05913ee2f82a4d9e79d238f6103bc7bf3cbd120a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/05913ee2f82a4d9e79d238f6103bc7bf3cbd120a/test_PageEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9609, 67, 2626, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 1172, 315, 1964, 6946, 848, 1404, 1923, 279, 1363, 309, 14263, 353, 2106, 628, 2962, 4755, 871, 4919, 6, 1815, 1083, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9609, 67, 2626, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 1172, 315, 1964, 6946, 848, 1404, 1923, 279, 1363, 309, 14263, 353, 2106, 628, 2962, 4755, 871, 4919, 6, 1815, 1083, 2, -...
cache.chunk_decref(c)
id = self.chunk_idx[c] cache.chunk_decref(id)
def delete(self, cache): self.store.delete(NS_ARCHIVES, self.name) for item in self.items: if item['type'] == 'FILE': for c in item['chunks']: cache.chunk_decref(c) self.store.commit() cache.archives.remove(self.name) cache.save()
eedf969f676359badd11509f2d07eb15be37a959 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3863/eedf969f676359badd11509f2d07eb15be37a959/archiver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 16, 1247, 4672, 365, 18, 2233, 18, 3733, 12, 3156, 67, 10586, 5354, 55, 16, 365, 18, 529, 13, 364, 761, 316, 365, 18, 3319, 30, 309, 761, 3292, 723, 3546, 422, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 16, 1247, 4672, 365, 18, 2233, 18, 3733, 12, 3156, 67, 10586, 5354, 55, 16, 365, 18, 529, 13, 364, 761, 316, 365, 18, 3319, 30, 309, 761, 3292, 723, 3546, 422, 296, ...
init_termine() Player.setVBlankFramerate(2)
Player.setInterval(5, start_anim) Player.setFramerate(1000)
def init_termine(): global curTerminNum global terminVonLinks load_termine() Player.getElementByID("linie1").x=900 Player.getElementByID("linie2").x=900 Player.getElementByID("linie3").x=900 curTerminNum = 1 terminVonLinks = 0 Player.setTimeout(10, start_termin)
3f0c1870b847a09cbf49aae1f7a86312f44bd030 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7300/3f0c1870b847a09cbf49aae1f7a86312f44bd030/testleak.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 387, 3081, 13332, 2552, 662, 27506, 2578, 2552, 16122, 58, 265, 7100, 1262, 67, 387, 3081, 1435, 19185, 18, 21336, 13331, 2932, 7511, 1385, 21, 20387, 92, 33, 29, 713, 19185, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 387, 3081, 13332, 2552, 662, 27506, 2578, 2552, 16122, 58, 265, 7100, 1262, 67, 387, 3081, 1435, 19185, 18, 21336, 13331, 2932, 7511, 1385, 21, 20387, 92, 33, 29, 713, 19185, 1...
'm' : ([int],int),
'm' : ([1],2),
def add_attr(): a = AA() a.b = 3 return a.b
66d1ba0da562fc756175b3f586efa203d892350d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/66d1ba0da562fc756175b3f586efa203d892350d/test_bltann.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1747, 13332, 279, 273, 27343, 1435, 279, 18, 70, 273, 890, 327, 279, 18, 70, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1747, 13332, 279, 273, 27343, 1435, 279, 18, 70, 273, 890, 327, 279, 18, 70, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
atexit._run_exitfuncs()
func - function to be called at exit targs - optional arguments to pass to func kargs - optional keyword arguments to pass to func """ _exithandlers.append((func, targs, kargs))
def handler2(*args, **kargs): print "handler2", args, kargs
e3398cad1090250278fb4031ab85a35de5831e95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e3398cad1090250278fb4031ab85a35de5831e95/atexit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 22, 30857, 1968, 16, 2826, 79, 1968, 4672, 1172, 315, 4176, 22, 3113, 833, 16, 25916, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 22, 30857, 1968, 16, 2826, 79, 1968, 4672, 1172, 315, 4176, 22, 3113, 833, 16, 25916, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.CheckEditableBlock("EditCalendarEndDate", "end date", dict[field])
self.CheckEditableBlock("EditCalendarEndDate", "end date", self.formatDate(dict[field]))
def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionnary @param dict : dictionnary with expected item attributes values for checking {"attributeName":"expected value",...} """ 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", 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", 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", 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 self.logger.SetChecked(False) #report the checkings self.logger.Report("Detail View")
425b34d6e73ece9b541623e89f6e14bd134f1e8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/425b34d6e73ece9b541623e89f6e14bd134f1e8f/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, 302, 2228, 82, 814, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 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, 302, 2228, 82, 814, 6...
log.debug("Converts GTFS file to GTFS-DB, which is super handy\nusage: python process_gtfs.py gtfs_filename gtfsdb_filename")
print("Converts GTFS file to GTFS-DB, which is super handy\nusage: python process_gtfs.py gtfs_filename gtfsdb_filename")
def main_build_gtfsdb(): parser = OptionParser() parser.add_option("-t", "--table", dest="tables", action="append", default=[], help="copy over only the given tables") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="make a bunch of noise" ) (options, args) = parser.parse_args() if len(options.tables)==0: options.tables=None if len(args) < 2: log.debug("Converts GTFS file to GTFS-DB, which is super handy\nusage: python process_gtfs.py gtfs_filename gtfsdb_filename") exit() gtfsdb_filename = args[1] gtfs_filename = args[0] gtfsdb = GTFSDatabase( gtfsdb_filename, overwrite=True ) gtfsdb.load_gtfs( gtfs_filename, options.tables, reporter=sys.stdout, verbose=options.verbose )
5cb3ca89a5d953aecb773f70f7f2f38a1f5a8b85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10974/5cb3ca89a5d953aecb773f70f7f2f38a1f5a8b85/gtfsdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 67, 3510, 67, 4521, 2556, 1966, 13332, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2932, 17, 88, 3113, 5238, 2121, 3113, 1570, 1546, 9373, 3113, 1301, 1546, 6923, 3113, 805, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 3510, 67, 4521, 2556, 1966, 13332, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2932, 17, 88, 3113, 5238, 2121, 3113, 1570, 1546, 9373, 3113, 1301, 1546, 6923, 3113, 805, ...
start = self.book_header.first_image_index
start = getattr(self.book_header, 'first_image_index', -1)
def extract_images(self, processed_records, output_dir): if self.verbose: print 'Extracting images...' output_dir = os.path.abspath(os.path.join(output_dir, 'images')) if not os.path.exists(output_dir): os.makedirs(output_dir) image_index = 0 self.image_names = [] start = self.book_header.first_image_index if start > self.num_sections or start < 0: # BAEN PRC files have bad headers start=0 for i in range(start, self.num_sections): if i in processed_records: continue processed_records.append(i) data = self.sections[i][0] buf = cStringIO.StringIO(data) image_index += 1 try: im = PILImage.open(buf) except IOError: continue path = os.path.join(output_dir, '%05d.jpg'%image_index) self.image_names.append(os.path.basename(path)) im.convert('RGB').save(open(path, 'wb'), format='JPEG')
7294199798db2f085ae06cd522650d5577916c7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/7294199798db2f085ae06cd522650d5577916c7b/reader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 7369, 12, 2890, 16, 5204, 67, 7094, 16, 876, 67, 1214, 4672, 309, 365, 18, 11369, 30, 1172, 296, 4976, 310, 4602, 7821, 876, 67, 1214, 273, 1140, 18, 803, 18, 5113, 803, 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, 2608, 67, 7369, 12, 2890, 16, 5204, 67, 7094, 16, 876, 67, 1214, 4672, 309, 365, 18, 11369, 30, 1172, 296, 4976, 310, 4602, 7821, 876, 67, 1214, 273, 1140, 18, 803, 18, 5113, 803, 12...
uri = 'http://test.lpod-project.org/example.odt'
uri = 'http://ftp.lpod-project.org/example.odt'
def test_http(self): uri = 'http://test.lpod-project.org/example.odt' self.assert_(odf_get_container(uri))
e15c8473fdc0a774c68c80ba976d3205f4ee1855 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10612/e15c8473fdc0a774c68c80ba976d3205f4ee1855/test_container.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2505, 12, 2890, 4672, 2003, 273, 296, 2505, 2207, 11727, 18, 80, 7832, 17, 4406, 18, 3341, 19, 8236, 18, 369, 88, 11, 365, 18, 11231, 67, 12, 369, 74, 67, 588, 67, 3782, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 2505, 12, 2890, 4672, 2003, 273, 296, 2505, 2207, 11727, 18, 80, 7832, 17, 4406, 18, 3341, 19, 8236, 18, 369, 88, 11, 365, 18, 11231, 67, 12, 369, 74, 67, 588, 67, 3782, ...
diff = cgi.escape(diff)
def render(self, myself, tree, revision): t = self.buildfarm.trees[tree] branch = t.get_branch() (entry, diff) = branch.diff(revision) # get information about the current diff title = "GIT Diff in %s:%s for revision %s" % ( tree, t.branch, revision) yield "<h2>%s</h2>" % title changes = branch.changes_summary(revision) yield "".join(history_row_html(myself, entry, t, changes)) diff = cgi.escape(diff) diff = highlight(diff, DiffLexer(), HtmlFormatter()) yield "<pre>%s</pre>\n" % diff
48ce95ed1aff318bb8de8e8de0e08292313970ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/48ce95ed1aff318bb8de8e8de0e08292313970ad/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 3399, 2890, 16, 2151, 16, 6350, 4672, 268, 273, 365, 18, 3510, 74, 4610, 18, 17204, 63, 3413, 65, 3803, 273, 268, 18, 588, 67, 7500, 1435, 261, 4099, 16, 3122, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 3399, 2890, 16, 2151, 16, 6350, 4672, 268, 273, 365, 18, 3510, 74, 4610, 18, 17204, 63, 3413, 65, 3803, 273, 268, 18, 588, 67, 7500, 1435, 261, 4099, 16, 3122, 13...
out('\n\n') out('\\textbf{Value:} \n') out(self._pprint_var_value(var_doc))
if has_type or has_value: out('\n\n') if has_value: out('\\textbf{Value:} \n{\\tt %s}' % var_doc.value.summary_pyval_repr().to_latex(None))
def write_var_list_line(self, out, var_doc): out('\\raggedright ') out(plaintext_to_latex(var_doc.name, nbsp=True, breakany=True)) out(' & ') has_descr = var_doc.descr not in (None, UNKNOWN) has_type = var_doc.type_descr not in (None, UNKNOWN) out('\\raggedright ') if has_descr: out(self.docstring_to_latex(var_doc.descr, 10).strip()) out('\n\n') out('\\textbf{Value:} \n') out(self._pprint_var_value(var_doc)) if has_type: ptype = self.docstring_to_latex(var_doc.type_descr, 12).strip() out('%s\\textit{(type=%s)}' % (' '*12, ptype)) out('&\\\\\n') out('\\cline{1-2}\n')
e9fcdeececa8bf6b113955bff93c569ca3ac323f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11420/e9fcdeececa8bf6b113955bff93c569ca3ac323f/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1401, 67, 1098, 67, 1369, 12, 2890, 16, 596, 16, 569, 67, 2434, 4672, 596, 2668, 1695, 2458, 2423, 4083, 8624, 596, 12, 412, 10133, 67, 869, 67, 26264, 12, 1401, 67, 2434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1401, 67, 1098, 67, 1369, 12, 2890, 16, 596, 16, 569, 67, 2434, 4672, 596, 2668, 1695, 2458, 2423, 4083, 8624, 596, 12, 412, 10133, 67, 869, 67, 26264, 12, 1401, 67, 2434, ...
def __init__(self, allow_none, encoding):
def __init__(self, allow_none=False, encoding=None):
def __init__(self, allow_none, encoding): self.funcs = {} self.instance = None self.allow_none = allow_none self.encoding = encoding
a5d58c831fa3b23960c9dfa78f7b9c62a31ce3e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/a5d58c831fa3b23960c9dfa78f7b9c62a31ce3e0/SimpleXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1699, 67, 6102, 33, 8381, 16, 2688, 33, 7036, 4672, 365, 18, 17728, 273, 2618, 365, 18, 1336, 273, 599, 365, 18, 5965, 67, 6102, 273, 1699, 67, 6102, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1699, 67, 6102, 33, 8381, 16, 2688, 33, 7036, 4672, 365, 18, 17728, 273, 2618, 365, 18, 1336, 273, 599, 365, 18, 5965, 67, 6102, 273, 1699, 67, 6102, 3...
d = readmodule(mod, path, inpackage)
d = readmodule_ex(mod, path, inpackage)
def readmodule_ex(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' dict = {} i = module.rfind('.') if i >= 0: # Dotted module name package = module[:i].strip() submodule = module[i+1:].strip() parent = readmodule(package, path, inpackage) child = readmodule(submodule, parent['__path__'], 1) return child if _modules.has_key(module): # we've seen this module before... return _modules[module] if module in sys.builtin_module_names: # this is a built-in module _modules[module] = dict return dict # search the path for the module f = None if inpackage: try: f, file, (suff, mode, type) = \ imp.find_module(module, path) except ImportError: f = None if f is None: fullpath = list(path) + sys.path f, file, (suff, mode, type) = imp.find_module(module, fullpath) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] _modules[module] = dict path = [file] + path f, file, (suff, mode, type) = \ imp.find_module('__init__', [file]) if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() _modules[module] = dict return dict _modules[module] = dict classstack = [] # stack of (class, indent) pairs src = f.read() f.close() # To avoid having to stop the regexp at each newline, instead # when we need a line number we simply string.count the number of # newlines in the string since the last time we did this; i.e., # lineno = lineno + \ # string.count(src, '\n', last_lineno_pos, here) # last_lineno_pos = here countnl = string.count lineno, last_lineno_pos = 1, 0 i = 0 while 1: m = _getnext(src, i) if not m: break start, i = m.span() if m.start("Method") >= 0: # found a method definition or function thisindent = _indent(m.group("MethodIndent")) meth_name = m.group("MethodName") lineno = lineno + \ countnl(src, '\n', last_lineno_pos, start) last_lineno_pos = start # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] if classstack: # it's a class method cur_class = classstack[-1][0] cur_class._addmethod(meth_name, lineno) else: # it's a function f = Function(module, meth_name, file, lineno) dict[meth_name] = f elif m.start("String") >= 0: pass elif m.start("Class") >= 0: # we found a class definition thisindent = _indent(m.group("ClassIndent")) # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] lineno = lineno + \ countnl(src, '\n', last_lineno_pos, start) last_lineno_pos = start class_name = m.group("ClassName") inherit = m.group("ClassSupers") if inherit: # the class inherits from other classes inherit = inherit[1:-1].strip() names = [] for n in inherit.split(','): n = n.strip() if dict.has_key(n): # 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 _modules.has_key(m): d = _modules[m] if d.has_key(c): n = d[c] names.append(n) inherit = names # remember this class cur_class = Class(module, class_name, inherit, file, lineno) dict[class_name] = cur_class classstack.append((cur_class, thisindent)) elif m.start("Import") >= 0: # import module for n in m.group("ImportList").split(','): n = n.strip() try: # recursively read the imported module d = readmodule(n, path, inpackage) except: ##print 'module', n, 'not found' pass elif m.start("ImportFrom") >= 0: # from module import stuff mod = m.group("ImportFromPath") names = m.group("ImportFromList").split(',') try: # recursively read the imported module d = readmodule(mod, path, inpackage) except: ##print 'module', mod, 'not found' continue # add any classes that were defined in the # imported module to our name space if they # were mentioned in the list for n in names: n = n.strip() if d.has_key(n): dict[n] = d[n] elif n == '*': # only add a name if not # already there (to mimic what # Python does internally) # also don't add names that # start with _ for n in d.keys(): if n[0] != '_' and \ not dict.has_key(n): dict[n] = d[n] else: assert 0, "regexp _getnext found something unexpected" return dict
cb5da4b4d7bf5db97d84f27e38144505c7ff2458 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/cb5da4b4d7bf5db97d84f27e38144505c7ff2458/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 20, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 2589...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 20, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 2589...
toolsMoveMoleculeActionText = "<u><b>Move Chunks</b></u><!-- [[Feature:Move Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/64.png\"><br> "\ "Activates <b>Move Chunks</b> mode, allowing you to select, "\ "move and rotate one of more chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Drag</b> - moves the selected chunk(s).</p>"\ "<p><b>Ctrl+Left Drag</b> - freely rotates selected chunk(s).</p>"\ "<p><b>Shift+Left Drag</b> - constrained movement and rotation of a chunk about its own axis."\ "</p>"
toolsMoveMoleculeActionText =\ "<u><b>Move Chunks</b></u><!-- [[Feature:Move Chunks Mode]] --><br>"\ "<p>"\ "<img source=\"ui/actions/Toolbars/Standard/64.png\"><br> "\ "Activates <b>Move Chunks</b> mode, allowing "\ "you to select, move and rotate one of more "\ "chunks with the mouse.</p>"\ "<p>"\ "<b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Drag</b> - moves the selected "\ "chunk(s).</p>"\ "<p>"\ "<b>Ctrl+Left Drag</b> - freely rotates "\ "selected chunk(s).</p>"\ "<p>"\ "<b>Shift+Left Drag</b> - constrained "\ "movement and rotation of a chunk about "\ "its own axis."\ "</p>"
def createWhatsThisTextForMainWindowWidgets(win): """ Adds the "What's This" help text to items found in the NE1 mainwindow toolbars and menus . @param win: NE1's mainwindow object. @type win: U{B{QMainWindow}<http://doc.trolltech.com/4/qmainwindow.html>} @note: Property Managers specify "What's This" text for their own widgets, usually in a method called add_whats_this_text(), not in this file. """ # # File Toolbar # # Open File fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)<br> "\ "<p><img source=\"ui/actions/File/Open.png\"><br> "\ "Opens a new file."\ "</p>" win.fileOpenAction.setWhatsThis( fileOpenText ) # Import File fileImportText = "<u><b>Import File</b></u><br>"\ "Inserts a file of any chemical file format supported by "\ "<b>Openbabel</b> into the current Part" win.fileImportAction.setWhatsThis(fileImportText) #Export File fileExportText = "<u><b>Export File</b></u><br>"\ "Save the current Part in any chemical file format supported by "\ "<b>Openbabel</b>. Note that exclusive features of NanoEngineer-1 "\ "are not saved to the exported file" win.fileExportAction.setWhatsThis(fileExportText) # Save File fileSaveText = "<u><b>Save File</b></u> (Ctrl + S)<br> "\ "<p><img source=\"ui/actions//Save.png\"><br> "\ "Saves the current file."\ "</p>" win.fileSaveAction.setWhatsThis( fileSaveText ) # # Edit Toolbar # # Make Checkpoint ### editMakeCheckpointText = \ "<u><b>Make Checkpoint</b></u>"\ "<p>"\ "<img source=\"ui/actions/Edit/Make_CheckPoint.png\"><br> "\ "Make Undo checkpoint."\ "</p>" win.editMakeCheckpointAction.setWhatsThis( editMakeCheckpointText ) # Automatic Checkpointing ### [minor changes, bruce 060319] editAutoCheckpointingText = \ "<u><b>Automatic Checkpointing</b></u>"\ "<p>"\ "Enables/Disables <b>Automatic Checkpointing</b>. When enabled, "\ "the program maintains the Undo stack automatically. When disabled, "\ "the user is required to manually create Undo checkpoints using the "\ "<b>Make Checkpoint</b> button: "\ "</p>"\ "<p><img source=\"ui/actions/Edit/Make_CheckPoint.png\">"\ "</p>"\ "<p><b>Automatic Checkpointing</b> can impact program performance. "\ "By disabling Automatic Checkpointing, the program will run faster. "\ "</p>"\ "<p><b><i>Remember that you must make your own Undo checkpoints "\ "manually when Automatic Checkpointing is disabled.</i></b>"\ "</p>" win.editAutoCheckpointingAction.setWhatsThis( editAutoCheckpointingText ) # Clear Undo Stack ### [minor changes, bruce 060319] editClearUndoStackText = "<u><b>Clear Undo Stack</b></u>"\ "<p>Clears all checkpoints on the Undo and Redo stacks, freeing up memory."\ "</p>" win.editClearUndoStackAction.setWhatsThis( editClearUndoStackText ) # Undo editUndoText = "<u><b>Undo</b></u> (Ctrl + Z)<br> "\ "<p><img source=\"ui/actions/Undo.png\"><br> "\ "Reverses the last edit or command which changed structure or selection. "\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Undo "\ "only works if you got this popup from the Edit menu item for Undo, "\ "not from the Undo toolbutton."\ "</font>"\ "</p>" #bruce 060317 revised this text to reflect what it does in A7; 060320 added 1421-not-fixed warning win.editUndoAction.setWhatsThis( editUndoText ) win.editUndoText = editUndoText #bruce 060317 to help fix bug 1421 in Undo whatsthis wiki help link # Redo from PlatformDependent import is_macintosh if is_macintosh(): redo_accel = "(Ctrl + Shift + Z)" # note: this is further modified (Ctrl -> Cmd) by other code # changing this is partly redundant with code in undo*.py, but as of 060317 it's desirable in editRedoText too else: redo_accel = "(Ctrl + Y)" editRedoText = "<u><b>Redo</b></u> %s<br> "\ "<p><img source=\"ui/actions/Edit/Redo.png\"> <br>"\ "Restores a change which was undone using the Undo command."\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Redo "\ "only works if you got this popup from the Edit menu item for Redo, "\ "not from the Redo toolbutton."\ "</font>"\ "</p>" % redo_accel #bruce 060317 revised this text to be more accurate, and split out redo_accel; 060320 added 1421-not-fixed warning win.editRedoAction.setWhatsThis( editRedoText ) win.editRedoText = editRedoText #bruce 060317 to help fix bug 1421 in Redo whatsthis wiki help link # Cut editCutText = "<u><b>Cut</b></u> (Ctrl + X)<br> "\ "<p><img source=\"ui/actions/Edit/Cut.png\"><br> "\ "Removes the selected object(s) and stores the cut data on the"\ "clipboard."\ "</p>" win.editCutAction.setWhatsThis( editCutText ) # Copy editCopyText = "<u><b>Copy</b></u> (Ctrl + C)<br> "\ "<p><img source=\"ui/actions/Edit/Copy.png\"><br> "\ "Places a copy of the selected chunk(s) on the clipboard "\ "while leaving the original chunk(s) unaffected."\ "</p>" win.editCopyAction.setWhatsThis( editCopyText ) # Paste editPasteText = "<u><b>Paste</b></u> (Ctrl + V)<br> "\ "<p><img source=\"ui/actions/Edit/Paste_On.png\"><br> "\ "<b>Paste</b> places the user in <b>Build</b> mode where copied chunks on "\ "the clipboard can be pasted into the model by double clicking in empty space. "\ "If the current clipboard chunk has a <b><i>hotspot</i></b>, it can be bonded to "\ "another chunk by single clicking on one of the chunk's bondpoints."\ "</p>"\ "<p>A <b><i>Hotspot</i></b> is a green bondpoint on a clipboard chunk indicating "\ "it will be the active bondpoint which will connect to another chunk's bondpoint. "\ "To specify a hotspot on the clipboard chunk, click on one of its bondpoints in the "\ "<b><i>MMKit's Thumbview</i></b>."\ "</p>" win.editPasteAction.setWhatsThis( editPasteText ) # Delete editDeleteText = "<u><b>Delete</b></u> (DEL)<br> "\ "<p><img source=\"ui/actions/Delete.png\"><br> "\ "Deletes the selected object(s). "\ "For this Alpha release, deleted objects may be permanently lost, or they might be recoverable using Undo.</p>" #bruce 060212 revised above text (and fixed spelling error); should be revised again before A7 release win.editDeleteAction.setWhatsThis( editDeleteText ) #Preferences Dialog editPrefsText = "<u><b>Preferences Dialog</b></u>"\ "<p>Allows you to edit various user preferences "\ "such as changing atom, bond display properties,"\ "lighting, background color, window position and"\ "size, plugins etc. </p>" win.editPrefsAction.setWhatsThis( editPrefsText ) # # View Toolbar # # Home View setViewHomeActionText = \ "<u><b>Home</b></u> (Home)<br>"\ "<p>"\ "<img source=\"ui/actions/View/Modify/Home.png\"><br>"\ "When you create a new model, it appears in a "\ "default view orientation (FRONT view). When you "\ "open an existing model, it appears in the "\ "orientation it was last saved. You can change the "\ "default orientation by selecting <b>Set Home View "\ "to Current View</b> from the <b>View</b> menu."\ "</p>" win.setViewHomeAction.setWhatsThis( setViewHomeActionText ) # Fit to Window setViewFitToWindowActionText = "<u><b>Fit To Window</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom_To_Fit.png\"><br> "\ "Refits the model to the screen so you can view the entire model."\ "</p>" win.setViewFitToWindowAction.setWhatsThis( setViewFitToWindowActionText ) # Recenter setViewRecenterActionText = "<u><b>Recenter</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Recenter.png\"><br> "\ "Changes the view center and zoom factor so that the origin is in the "\ "center of the view and you can view the entire model."\ "</p>" win.setViewRecenterAction.setWhatsThis( setViewRecenterActionText ) # Zoom Tool setzoomToolActionText = "<u><b>Zoom Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom.png\"><br> "\ "Allows the user to zoom into a specific area of the model by specifying a rectangular area. "\ "This is done by holding down the left button and dragging the mouse.</p>"\ "<p>A mouse with a mouse wheel can also be used to zoom in and out "\ "at any time, without using the Zoom Tool.</p>" win.zoomToolAction.setWhatsThis( setzoomToolActionText ) # Pan Tool setpanToolActionText = "<u><b>Pan Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Pan.png\"><br> "\ "Allows X-Y panning using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can pan the model at any time by pressing "\ "the middle mouse button while holding down the Shift key.</p>" win.panToolAction.setWhatsThis( setpanToolActionText ) # Rotate Tool setrotateToolActionText = "<u><b>Rotate Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Rotate.png\"><br> "\ "Allows free rotation using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can rotate the model at any time by pressing "\ "the middle mouse button and dragging the mouse.</p>" win.rotateToolAction.setWhatsThis( setrotateToolActionText ) # Orthographic Projection setViewOrthoActionText = "<u><b>Orthographic Projection</b></u><br>"\ "<p>Sets nonperspective (or parallel) projection, with no foreshortening."\ "</p>" win.setViewOrthoAction.setWhatsThis( setViewOrthoActionText ) # Perspective Projection setViewPerspecActionText = "<u><b>Perspective Projection</b></u><br>"\ "<p>Set perspective projection, drawing objects slightly larger "\ "that are closer to the viewer."\ "</p>" win.setViewPerspecAction.setWhatsThis( setViewPerspecActionText ) # Normal To viewNormalToActionText = "<u><b>Set View Normal To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Normal_To.png/\"><br> "\ "Orients view to the normal vector of the plane defined by "\ "3 or more selected atoms, or a jig's axis."\ "</p>" win.viewNormalToAction.setWhatsThis( viewNormalToActionText ) # Parallel To viewParallelToActionText = "<u><b>Set View Parallel To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Parallel_To.png\"><br> "\ "Orients view parallel to the vector defined by 2 selected atoms."\ "</p>" win.viewParallelToAction.setWhatsThis( viewParallelToActionText ) # Save Named View saveNamedViewActionText = "<u><b>Save Named View</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Save_Named_View.png\"><br> "\ "Saves the current view as a custom <b>named view</b> and places it in the Model Tree.</p>" \ "<p>The view can be restored by selecting <b>Change View</b> from its context menu in the Model Tree."\ "</p>" win.saveNamedViewAction.setWhatsThis( saveNamedViewActionText ) # Front View viewFrontActionText = "<u><b>Front View</b></u><br>"\ "<p><img source=\"ui/actions/View/Front.png\"><br> "\ "Orients the view to the Front View."\ "</p>" win.viewFrontAction.setWhatsThis( viewFrontActionText ) # Back View viewBackActionText = "<u><b>Back View</b></u><br>"\ "<p><img source=\"ui/actions/View/Back.png\"><br> "\ "Orients the view to the Back View."\ "</p>" win.viewBackAction.setWhatsThis( viewBackActionText ) # Top View viewTopActionText = "<u><b>Top View</b></u><br>"\ "<p><img source=\"ui/actions/View/Top.png\"><br> "\ "Orients the view to the Top View."\ "</p>" win.viewTopAction.setWhatsThis( viewTopActionText ) # Bottom View viewBottomActionText = "<u><b>Bottom View</b></u><br>"\ "<p><img source=\"ui/actions/View/Bottom.png\"><br> "\ "Orients the view to the Bottom View."\ "</p>" win.viewBottomAction.setWhatsThis( viewBottomActionText ) # Left View viewLeftActionText = "<u><b>Left View</b></u><br>"\ "<p><img source=\"ui/actions/View/Left.png\"><br> "\ "Orients the view to the Left View."\ "</p>" win.viewLeftAction.setWhatsThis( viewLeftActionText ) # Right View viewRightActionText = "<u><b>Right View</b></u><br>"\ "<p><img source=\"ui/actions/View/Right.png\"><br> "\ "Orients the view to the Right View."\ "</p>" win.viewRightAction.setWhatsThis( viewRightActionText ) #Isometric View viewIsometricActionText = "<u><b>IsometricView</b></u><br>"\ "<p><img source=\"ui/actions/View/Isometric.png\"><br> "\ "Orients the view to the Isometric View."\ "</p>" win.viewIsometricAction.setWhatsThis( viewIsometricActionText ) # Rotate View 180 viewRotate180ActionText = "<u><b>Rotate View 180</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_180.png.png\"><br> "\ "Rotates the view 180 degrees."\ "</p>" win.viewRotate180Action.setWhatsThis( viewRotate180ActionText ) # Rotate View +90 viewRotatePlus90ActionText = "<u><b>Rotate View +90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_+90.png\"><br> "\ "Increment the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotatePlus90Action.setWhatsThis( viewRotatePlus90ActionText ) # Rotate View -90 viewRotateMinus90ActionText = "<u><b>Rotate View -90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_-90.png\"><br> "\ "Decrement the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotateMinus90Action.setWhatsThis( viewRotateMinus90ActionText ) # QuteMol viewQuteMolActionText = \ "<u><b>QuteMol</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/QuteMol.png\"><br> "\ "Starts QuteMol and loads a PDB file of the current model."\ "</p>" \ "QuteMol must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewQuteMolAction.setWhatsThis( viewQuteMolActionText ) # POV-Ray (was Raytrace Scene) viewRaytraceSceneActionText = "<u><b>POV-Ray</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Raytrace_Scene.png\"><br> "\ "Raytrace the current scene using POV-Ray. "\ "</p>" \ "POV-Ray must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewRaytraceSceneAction.setWhatsThis( viewRaytraceSceneActionText ) # # Grids Toolbar # # Surface 100 orient100ActionText = "<u><b>Surface 100</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface100.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,0,0) surface of a diamond lattice."\ "</p>" win.orient100Action.setWhatsThis(orient100ActionText ) # Surface 110 orient110ActionText = "<u><b>Surface 110</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface110.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,0) surface of a diamond lattice."\ "</p>" win.orient110Action.setWhatsThis(orient110ActionText ) # Surface 111 orient111ActionText = "<u><b>Surface 111</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface111.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,1) surface of a diamond lattice."\ "</p>" win.orient111Action.setWhatsThis(orient111ActionText ) # # Insert toolbar # # Graphene insertGrapheneActionText = \ "<u><b>Build Graphene</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Graphene.png\"><br> "\ "Inserts a 2D sheet of graphene in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertGrapheneAction.setWhatsThis(insertGrapheneActionText ) # Build Nanotube insertNanotubeActionText = \ "<u><b>Build Nanotube</b></u>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Nanotube.png\"> <br>"\ "Inserts a carbon or boron nitride nanotube in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertNanotubeAction.setWhatsThis(insertNanotubeActionText ) # Build DNA buildDnaActionText = \ "<u><b>Build DNA</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/DNA.png\"><br> "\ "Inserts DNA in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.buildDnaAction.setWhatsThis(buildDnaActionText ) # POV-Ray Scene insertPovraySceneActionText = "<u><b>Insert POV-Ray Scene</b></u><br>"\ "<p><img source=\"ui/actions/POV-Ray_Scene.png\"><br> "\ "Inserts a POV-Ray Scene file based on the current model and viewpoint. "\ "</p>" win.insertPovraySceneAction.setWhatsThis(insertPovraySceneActionText ) # Comment insertCommentActionText = "<u><b>Insert Comment</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Comment.png\"><br> "\ "Inserts a comment in the current part. "\ "</p>" win.insertCommentAction.setWhatsThis(insertCommentActionText ) # # Display toolbar # # Display Default dispDefaultActionText = "<u><b>Display Default</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Default.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Default</b> , rendering them in the <b>Current Display Mode</b>."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to the <b>Default Display Mode</b>. " \ "All chunks with their display setting set to <b>Default</b> will be rendered in the "\ "<b>Default Display Mode</b>."\ "</p>"\ "<p>The <b>Default Display Mode</b> can be changed via the "\ "<b>Edit > Preferences</b> menu and selecting the <b>Modes</b> tab."\ "</p>"\ "<p>The <b>Current or Default Display Mode</b> is displayed in the status bar in the "\ "lower right corner of the main window."\ "</p>" win.dispDefaultAction.setWhatsThis(dispDefaultActionText ) # Display Invisible dispInvisActionText = "<u><b>Display Invisible</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Invisible.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Invisible</b>, making them invisible."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Invisible</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispInvisAction.setWhatsThis(dispInvisActionText ) # Display Lines dispLinesActionText = "<u><b>Display Lines</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Lines.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ " <b>Lines</b>. Only bonds are rendered as colored lines."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Lines</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispLinesAction.setWhatsThis(dispLinesActionText ) # Display Tubes dispTubesActionText = "<u><b>Display Tubes</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Tubes.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Tubes</b>. Atoms and bonds are rendered as colored tubes."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Tubes</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispTubesAction.setWhatsThis(dispTubesActionText ) # Display Ball and Stick dispBallActionText = "<u><b>Display Ball and Stick</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Ball_and_Stick.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Ball and Stick</b> mode. Atoms are rendered "\ "as spheres and bonds are rendered as narrow cylinders."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Ball and Stick</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres and cylinders can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispBallAction.setWhatsThis(dispBallActionText ) # Display CPK # [bruce extended and slightly corrected text, 060307] dispCPKActionText = "<u><b>Display CPK</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/CPK.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>CPK</b> mode. Atoms are rendered as spheres with "\ "a size equal to 0.78 of their VdW radius, corresponding "\ "to a contact force of approximately 0.1 nN with neighboring "\ "nonbonded atoms. Bonds are not rendered."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>CPK</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispCPKAction.setWhatsThis(dispCPKActionText ) # Display Cylinder dispCylinderActionText = "<u><b>Display Cylinder</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Cylinder.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Cylinder</b> mode. Chunks are rendered as cylinders."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Cylinder</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispCylinderAction.setWhatsThis(dispCylinderActionText ) # Display Surface dispSurfaceActionText = "<u><b>Display Surface</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Surface.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Surface</b> mode. Chunks are rendered as a smooth surface."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Surface</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispSurfaceAction.setWhatsThis(dispSurfaceActionText ) #Reset Chunk Color dispResetChunkColorText = "<u><b>Reset Chunk Color</b></u><br>"\ "Resets the user defined chunk color and renders the atoms " \ "(in the chunk) with their own element colors" win.dispResetChunkColorAction.setWhatsThis(dispResetChunkColorText ) #Reset Atoms Display dispResetAtomsDisplayText = "<u><b>Reset Atoms Display</b></u><br>"\ "Renders the selected atoms (or the atoms in the"\ "selected chunks) with the same display style as "\ "that of their parent chunk" win.dispResetAtomsDisplayAction.setWhatsThis(dispResetAtomsDisplayText) #Show Invisible Atoms dispShowInvisAtomsText = "<u><b>Show Invisible Atoms</b></u><br>"\ "Renders the selected atoms (or the atoms in the selected "\ "chunks) with the same display style as their parent chunk. "\ "However, if the parent chunk is set as invisible, this feature " \ "will not work. " win.dispShowInvisAtomsAction.setWhatsThis(dispShowInvisAtomsText) #Element Color Settings Dialog dispElementColorSettingsText = "<u><b>Element Color Settings Dialog</b></u><br>"\ "Element colors can be manually changed " \ "using this dialog. Also, the user can load"\ "or save the element colors" win.dispElementColorSettingsAction.setWhatsThis(dispElementColorSettingsText) # # Select toolbar # # Select All selectAllActionText = "<u><b>Select All</b></u> (Ctrl + A)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_All.png\"><br> "\ "When in <b>Build</b> mode, this will select all the atoms in "\ "the model. Otherwise, this will select all the chunks in the model."\ "</p>" win.selectAllAction.setWhatsThis(selectAllActionText ) # Select None selectNoneActionText = "<u><b>Select None</b></u></p><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_None.png\"><br> "\ "Unselects everything currently selected.</p>" win.selectNoneAction.setWhatsThis(selectNoneActionText ) # InvertSelection selectInvertActionText = "<u><b>Invert Selection</b></u> (Ctrl + Shift + I)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Invert.png\"><br> "\ "Inverts the current selection.</p>" win.selectInvertAction.setWhatsThis(selectInvertActionText ) # Select Connected selectConnectedActionText = "<u><b>Select Connected</b></u> (Ctrl + Shift + C)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Connected.png\"><br> "\ "Selects all the atoms that can be reached by the currently selected atom "\ "via an unbroken chain of bonds. </p>"\ "<p>You can also select all connected atoms by double clicking on an atom or bond "\ "while in <b>Build</b> mode.</p>" win.selectConnectedAction.setWhatsThis(selectConnectedActionText ) # Select Doubly selectDoublyActionText = "<u><b>Select Doubly</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Doubly.png\"><br> "\ "Selects all the atoms that can be reached from a currently selected "\ "atom through two disjoint unbroken chains of bonds. Atoms singly "\ "connected to this group and unconnected to anything else are also "\ "included in the selection."\ "</p>" win.selectDoublyAction.setWhatsThis(selectDoublyActionText ) # Expand Selection selectExpandActionText = "<u><b>Expand Selection</b></u> (Ctrl + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Expand.png\"><br> "\ "Selects any atom that is a neighbor of a currently selected atom."\ "</p>" win.selectExpandAction.setWhatsThis(selectExpandActionText ) # Contract Selection selectContractActionText = "<u><b>Contract Selection</b></u> (Ctrl + Shift + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Contract.png\"><br> "\ "Deselects any atom that is a neighbor of a non-picked atom or has a bondpoint."\ "</p>" win.selectContractAction.setWhatsThis(selectContractActionText ) # # Modify Toolbar # # Adjust Selection modifyAdjustSelActionText = "<u><b>Adjust Selection</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_Selection.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the selection</i>) to make the geometry more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustSelAction.setWhatsThis(modifyAdjustSelActionText ) # Adjust All modifyAdjustAllActionText = "<u><b>Adjust All</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_All.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the entire part</i>) to make the geometry of the part more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustAllAction.setWhatsThis(modifyAdjustAllActionText ) # Hydrogenate modifyHydrogenateActionText = "<u><b>Hydrogenate</b></u> <br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Hydrogenate.png\"><br> "\ "Adds hydrogen atoms to all the bondpoints in the selection.</p>" win.modifyHydrogenateAction.setWhatsThis(modifyHydrogenateActionText ) # Dehydrogenate modifyDehydrogenateActionText = "<u><b>Dehydrogenate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Dehydrogenate.png\"><br> "\ "Removes all hydrogen atoms from the selection.</p>" win.modifyDehydrogenateAction.setWhatsThis(modifyDehydrogenateActionText ) # Passivate modifyPassivateActionText = "<u><b>Passivate</b></u> (Ctrl + P)<br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Passivate.png\"><br> "\ "Changes the types of incompletely bonded atoms to atoms with the "\ "right number of bonds, using atoms with the best atomic radius."\ "</p>" win.modifyPassivateAction.setWhatsThis(modifyPassivateActionText ) # Stretch modifyStretchActionText = "<u><b>Stretch</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Stretch.png\"><br> "\ "Stretches the bonds of the selected chunk(s).</p>" win.modifyStretchAction.setWhatsThis(modifyStretchActionText ) # Delete Bonds modifyDeleteBondsActionText = "<u><b>Cut Bonds</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Delete_Bonds.png\"><br> "\ "Delete all bonds between selected and unselected atoms or chunks.</p>" win.modifyDeleteBondsAction.setWhatsThis(modifyDeleteBondsActionText ) # Separate/New Chunk modifySeparateActionText = "<u><b>Separate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Separate.png\"><br> "\ "Creates a new chunk(s) from the currently selected atoms. "\ "If the selected atoms belong to different chunks, multiple new "\ "chunks are created.</p>" win.modifySeparateAction.setWhatsThis(modifySeparateActionText ) # New Chunk makeChunkFromSelectedAtomsActionText = "<u><b>New Chunk</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/New_Chunk.png\"><br> "\ "Creates a new chunk from the currently selected atoms. "\ "All atoms end up in a single chunk.</p>" win.makeChunkFromSelectedAtomsAction.setWhatsThis(makeChunkFromSelectedAtomsActionText ) # Merge Chunks modifyMergeActionText = "<u><b>Merge Chunks</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Merge.png\"><br> "\ "Merges two or more chunks into a single chunk.</p>" win.modifyMergeAction.setWhatsThis(modifyMergeActionText ) # Invert Chunks modifyInvertActionText = "<u><b>Invert</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Invert.png\"><br> "\ "Inverts the atoms of the selected chunks.</p>" win.modifyInvertAction.setWhatsThis(modifyInvertActionText ) # Mirror Selected Chunks #Note that the the feature name is intentionally kept "Mirror" instead of "Mirror Chunks" because # in future we will support mirrroing atoms as well. -- ninad060814 modifyMirrorActionText = "<u><b>Mirror</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Mirror.png\"><br> "\ "Mirrors the selected <b> chunks </b> about a reference Grid Plane.<br>"\ "<font color=\"#808080\">Note: In this version, it doesn't mirror jigs or individual atoms.</font> </p>" win.modifyMirrorAction.setWhatsThis(modifyMirrorActionText ) # Align to Common Axis modifyAlignCommonAxisActionText = "<u><b>Align To Common Axis</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/AlignToCommonAxis.png\"><br> "\ "Aligns one or more chunks to the axis of the first selected chunk."\ "You must select two or more chunks before using this feature."\ "</p>" win. modifyAlignCommonAxisAction.setWhatsThis( modifyAlignCommonAxisActionText ) #Center on Common Axis modifyCenterCommonAxisActionText= "<u><b>Center On Common Axis</b></u><br>"\ "<p><b> Moves</b> all selected chunks to the center of the <b> first </b> selected chunk "\ "and also <b>aligns</b> them to the axis of the first one ."\ "You must select two or more chunks before using this feature. </p>" win.modifyCenterCommonAxisAction.setWhatsThis(modifyCenterCommonAxisActionText) # # Tools Toolbar # # Select Chunks toolsSelectMoleculesActionText = "<u><b>Select Chunks</b></u><!-- [[Feature:Select Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/63.png\"><br> "\ "<b>Select Chunks</b> allows you to select/unselect chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click/Drag</b> - selects a chunk(s).</p>"\ "<p><b>Ctrl+Left Click/Drag</b> - removes chunk(s) from selection.</p>"\ "<p><b>Shift+Left Click/Drag</b> - adds chunk(s) to selection."\ "</p>" win. toolsSelectMoleculesAction.setWhatsThis( toolsSelectMoleculesActionText ) # Move Chunks toolsMoveMoleculeActionText = "<u><b>Move Chunks</b></u><!-- [[Feature:Move Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/64.png\"><br> "\ "Activates <b>Move Chunks</b> mode, allowing you to select, "\ "move and rotate one of more chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Drag</b> - moves the selected chunk(s).</p>"\ "<p><b>Ctrl+Left Drag</b> - freely rotates selected chunk(s).</p>"\ "<p><b>Shift+Left Drag</b> - constrained movement and rotation of a chunk about its own axis."\ "</p>" win. toolsMoveMoleculeAction.setWhatsThis( toolsMoveMoleculeActionText ) # Build Atoms toolsDepositAtomActionText = \ "<u><b>Build Atoms</b></u><!-- [[Feature:Build Atoms]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Atoms.png\"><br> "\ "<b>Build Atoms</b> allows you to build structures one atom at a time or by depositing objects "\ "that are on the paste clipboard. You can also insert structures from the "\ "NanoEngineer-1 Parts Library.</p>"\ "<p>It is also possible to change bond types between atoms using the <b>Bond Tool</b> or by "\ "simply dragging and dropping one bondpoint onto another."\ "</p>" win. toolsDepositAtomAction.setWhatsThis( toolsDepositAtomActionText ) # Build Crystal (was Cookie Cutter Mode) toolsCookieCutActionText = "<u><b>Build Crystal</b></u><!-- [[Feature:Build Crystal]] --><br>"\ "<p><><img source=\"ui/actions/Tools/Build Structures/Cookie_Cutter.png\"><br> "\ "<b>Build Crystal</b> provides tools for cutting out multi-layered shapes from "\ "slabs of diamond or lonsdaleite lattice.</p>" win. toolsCookieCutAction.setWhatsThis( toolsCookieCutActionText ) # Tools > Extrude toolsExtrudeActionText = "<u><b>Extrude</b></u><!-- [[Feature:Extrude Mode]] --><br>"\ "<p><img source=\"ui/actions/Insert/Features/Extrude.png\"><br> "\ "Activates <b>Extrude</b> mode, allowing you to create a rod or ring using a chunk as "\ "a repeating unit.</p>" win. toolsExtrudeAction.setWhatsThis( toolsExtrudeActionText ) # Fuse Chunks Mode toolsFuseChunksActionText = "<u><b>Fuse Chunks Mode</b></u><!-- [[Feature:Fuse Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Fuse.png\"><br> "\ "<b>Fuse Chunks</b> can be used to interactively join two or more "\ "chunks by dragging chunks around and fusing them together. "\ "Two fusing options are supported:<br><br>"\ "<b>Make Bonds</b> creates bonds between the existing bondpoints "\ "of two or more chunks. Bondpoints are highlighted and lines are drawn (and undrawn) as chunks "\ "are dragged to indicate bonding relationships between bondpoints. Bondpoints with "\ "multiple bonding relationships are highlighted in magenta to indicate that they cannot "\ "make bonds.<br><br>"\ "<b>Fuse Atoms</b> fuses pairs of overlapping atoms between chunks. The set of overlapping "\ "atoms in the selected chunk(s) are highlighted in green while the set of atoms that will be deleted "\ "in non-selected chunks are highlighted in dark red. It is possible that deleted atoms will not fuse "\ "properly, leaving bondpoints on the selected chunk(s) atoms. This is a bug. To help "\ "minimize this problem, try to get the bonds of overlapping atoms oriented similarly.<br>"\ "</p>" win.toolsFuseChunksAction.setWhatsThis( toolsFuseChunksActionText ) # # Simulator Toolbar # # Minimize Energy simMinimizeEnergyActionText = "<u><b>Minimize Energy</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Minimize_Energy.png\"><br> "\ "The potential energy of a chemical structure is a function of the relative positions of its atoms. " \ "To obtain this energy with complete accuracy involves a lot of computer time spent on quantum " \ "mechanical calculations, which cannot be practically done on a desktop computer. "\ "To get an approximate potential energy without all that, we represent the energy as a series of " \ "terms involving geometric properties of the structure: lengths of chemical bonds, angles between " \ "pairs and triples of chemical bonds, etc. </p>" \ "<p>" \ "As is generally the case with physical systems, the gradient of the potential energy represents " \ "the forces acting on various particles. The atoms want to move in the direction that most reduces " \ "the potential energy. Energy minimization is a process of adjusting the atom positions to try to find " \ "a global minimum of the potential energy. Each atom contributes three variables (its x, y, and z " \ "coordinates) so the search space is multi-dimensional. The global minimum is the configuration " \ "that the atoms will settle into if lowered to zero Kelvin. </p>" win. simMinimizeEnergyAction.setWhatsThis( simMinimizeEnergyActionText ) # Run Dynamics (was NanoDynamics-1). Mark 060807. simSetupActionText = "<u><b>Run Dynamics</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Run_Dynamics.png\"><br> "\ "This is the interface to the NanoEngineer-1 molecular dynamics simulator. "\ "Enter the parameters of the simulation and click <b>Run Simulation</b>."\ "The simulator creates a trajectory (movie) file by calculating the inter-atomic potentials and bonding "\ "of the entire model.</p>" win. simSetupAction.setWhatsThis( simSetupActionText ) # Play Movie (was Movie Player) Mark 060807. simMoviePlayerActionText = "<u><b>Play Movie</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Play_Movie.png\"><br> "\ "Plays the most recent trajectory (movie) file created by the NanoEngineer-1 molecular dynamics simulator."\ "To create a movie file, select <b>Run Dynamics</b>.</p>" win. simMoviePlayerAction.setWhatsThis( simMoviePlayerActionText ) # Make Graphs (was Plot Tool) Mark 060807. simPlotToolActionText = "<u><b>Make Graphs</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Make_Graphs.png\"><br> "\ "Make a graph of a simulator trace file using GNUplot. A simulation must be run to create "\ "the trace file and the part must have a jig that writes output to the trace file. <br><br>"\ "The following list of jigs write data to the trace file:<br>"\ "<b>Rotary Motors:</b> speed (GHz) and torque (nn-nm)<br>"\ "<b>Linear Motors:</b> displacement (pm)<br>"\ "<b>Anchors:</b> torque (nn-nm)<br>"\ "<b>Thermostats:</b> energy added (zJ)<br>"\ "<b>Thermometer:</b> temperature (K)<br>"\ "<b>Measure Distance:</b> distance(angstroms)<br>"\ "<b>Measure Angle:</b> angle (degrees)<br>"\ "<b>Measure Dihedral:</b> dihedral(degrees)<br>"\ "</p>" win. simPlotToolAction.setWhatsThis( simPlotToolActionText ) # # Dashboard Buttons # # Done toolsDoneActionText = "<u><b>Done</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Done.png\"><br> "\ "Completes the current operation and enters the default mode."\ "</p>" win. toolsDoneAction.setWhatsThis( toolsDoneActionText ) # Cancel toolsCancelActionText = "<u><b>Cancel</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Cancel.png\"><br> "\ "Cancels the current operation and enters the default mode."\ "</p>" win. toolsCancelAction.setWhatsThis( toolsCancelActionText ) # Back up toolsBackUpActionText = "<u><b>Back Up</b></u><br>"\ "Undoes the previous operation."\ "</p>" win. toolsBackUpAction.setWhatsThis( toolsBackUpActionText ) # Start Over toolsStartOverActionText = "<u><b>Start Over</b></u><br>"\ "Cancels the current operation, leaving the user in the current mode."\ "</p>" win.toolsStartOverAction.setWhatsThis(toolsStartOverActionText ) # Add Layers ccAddLayerActionText = "<u><b>Add Layer</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/addlayer.png\"><br> "\ "Adds a new layer of diamond lattice to the existing layer."\ "</p>" win.ccAddLayerAction.setWhatsThis(ccAddLayerActionText ) # # Jigs # # Anchor jigsAnchorActionText = "<u><b>Anchor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Anchor.png\"><br> "\ "Attaches an <b>Anchor</b> to the selected atom(s), which "\ "constrains its motion during a minimization or simulation."\ "</p>"\ "<p>To create an Anchor, enter <b>Build</b> mode, "\ "select the atom(s) you want to anchor and then select this action. "\ "Anchors are drawn as a black wireframe box around each selected atom."\ "</p>" win.jigsAnchorAction.setWhatsThis(jigsAnchorActionText ) # Rotary Motor jigsMotorActionText = "<u><b>Rotary Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Rotary_Motor.png\"><br> "\ "Attaches a <b>Rotary Motor</b> to the selected atoms. The Rotary Motor is used by "\ "the simulator to apply rotary motion to a set of atoms during a simulation run. You may "\ "specify the <b>torque (in nN*nm)</b> and <b>speed (in Ghz)</b> of the motor."\ "</p>"\ "<p>To create a Rotary Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsMotorAction.setWhatsThis(jigsMotorActionText ) # Linear Motor jigsLinearMotorActionText = "<u><b>Linear Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Linear_Motor.png\"><br> "\ "Attaches a <b>Linear Motor</b> to the selected atoms. The Linear Motor is used by "\ "the simulator to apply linear motion to a set of atoms during a simulation run. You may "\ "specify the <b>force (in nN*nm)</b> and <b>stiffness (in N/m)</b> of the motor."\ "</p>"\ "<p>To create a Linear Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsLinearMotorAction.setWhatsThis(jigsLinearMotorActionText ) # Thermostat jigsStatActionText = "<u><b>Thermostat</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Thermostat.png\"><br> "\ "Attaches a <b>Langevin Thermostat</b> to a single selected atom, thereby associating "\ "the themostat to the entire molecule of which the selected atom is a member. The user "\ "specifies the temperature (in Kelvin)."\ "</p>"\ "<p>The Langevin Thermostat is used to set and hold the temperature "\ "of a molecule during a simulation run."\ "</p>"\ "<p>To create a Langevin Thermostat, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermostat is drawn as a "\ "blue wireframe box around the selected atom."\ "</p>" win.jigsStatAction.setWhatsThis(jigsStatActionText ) # Thermometer jigsThermoActionText = "<u><b>Thermometer</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Thermometer.png\"><br> "\ "Attaches a <b>Thermometer</b> to a single selected atom, thereby associating "\ "the themometer to the entire molecule of which the selected atom is a member. "\ "<p>The temperature of the molecule will be recorded and written to a trace file "\ "during a simulation run."\ "</p>"\ "<p>To create a Thermometer, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermometer is drawn as a "\ "dark red wireframe box around the selected atom."\ "</p>" win.jigsThermoAction.setWhatsThis(jigsThermoActionText ) # ESP Image jigsESPImageActionText = "<u><b>ESP Image</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/ESP_Image.png\"><br> "\ "An <b>ESP Image</b> allows the user to visualize the electrostatic potential "\ "of points on the face of a square 2D surface. Nano-Hive's MPQC ESP Plane plug-in "\ "is used to calculate the electrostatic potential."\ "</p>"\ "<p>To create an ESP Image, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. The ESP Image is drawn as a "\ "plane with a bounding volume."\ "</p>" win.jigsESPImageAction.setWhatsThis(jigsESPImageActionText ) # Atom Set jigsAtomSetActionText = "<u><b>Atom Set</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Atom_Set.png\"><br> "\ "An <b>Atom Set</b> jig provides a convienient way to save an atom "\ "selection which can be reselected later."\ "</p>"\ "<p>To create an Atom Set, enter <b>Build</b> mode, "\ "select any number of atoms and then select this jig. The Atom Set is "\ "drawn as a set of wireframe boxes around each atom in the selection."\ "</p>"\ "<p>To reselect the atoms in an Atom Set, select it's context "\ "menu in the Model Tree and click the menu item that states "\ "<b>Select this jig's atoms</b>."\ "</p>" win.jigsAtomSetAction.setWhatsThis(jigsAtomSetActionText ) # Measure Distance jigsDistanceActionText = "<u><b>Measure Distance Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Distance.png\"><br> "\ "A <b>Measure Distance Jig</b> functions as a dimension to display the "\ "distance between two atoms."\ "</p>"\ "<p>To create the Measure Distance Jig, enter <b>Build</b> mode, "\ "select two atoms and then select this jig. The Measure Distance Jig is "\ "drawn as a pair of wireframe boxes around each atom connected by "\ "a line and a pair of numbers. The first number is the distance between the "\ "VdW radii (this can be a negative number for atoms that are close together). "\ "The second number is the distance between the nuclei."\ "</p>"\ "<p>The Measure Distance Jig will write the two distance values to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDistanceAction.setWhatsThis(jigsDistanceActionText ) # Measure Angle jigsAngleActionText = "<u><b>Measure Angle Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Angle.png\"><br> "\ "A <b>Measure Angle Jig</b> functions as a dimension to display the "\ "angle between three atoms.</p>"\ "<p>To create the Measure Angle Jig, enter <b>Build</b> mode, "\ "select three atoms and then select this jig. The Measure Angle Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the angle between the three atoms."\ "</p>"\ "<p>The Measure Angle Jig will write the angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsAngleAction.setWhatsThis(jigsAngleActionText ) # Measure Dihedral jigsDihedralActionText = "<u><b>Measure Dihedral Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Dihedral.png\"><br> "\ "A <b>Measure Dihedral Jig</b> functions as a dimension to display the "\ "dihedral angle of a four atom sequence.</p>"\ "<p>To create the Measure Dihedral Jig, enter <b>Build</b> mode, "\ "select four atoms and then select this jig. The Measure Dihedral Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the dihedral angle value."\ "</p>"\ "<p>The Measure Dihedral Jig will write the dihedral angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDihedralAction.setWhatsThis(jigsDihedralActionText ) # GAMESS Jig jigsGamessActionText = "<u><b>GAMESS Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Gamess.png\"><br> "\ "A <b>GAMESS Jig</b> is used to tag a set of atoms for running a GAMESS "\ "calculation. <b>Energy</b> and <b>Geometry Optimization</b> calculations are supported."\ "</p>"\ "<p>To create the GAMESS Jig, enter <b>Build</b> mode, "\ "select the atoms to tag and then select this jig. The GAMESS Jig is drawn as a "\ "set of magenta wireframe boxes around each atom."\ "</p>" win.jigsGamessAction.setWhatsThis(jigsGamessActionText ) # Grid Plane Jig jigsGridPlaneActionText = "<u><b>Grid Plane</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Reference Geometry/Grid_Plane.png\"><br> "\ "A <b>Grid Plane</b> jig is a rectanglar plane that can display a square or SiC grid "\ "within its boundary. It is often used as an aid in constructing large lattice "\ "structures made of silicon carbide (SiC). It is also used as a visual aid in estimating "\ "distances between atoms and/or other structures."\ "</p>"\ "<p>To create the Grid Plane jig, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. "\ "</p>"\ "<p>The Grid Plane jig is drawn as a rectanglar plane with a grid."\ "</p>" win.jigsGridPlaneAction.setWhatsThis(jigsGridPlaneActionText ) # # Help Toolbar # # What's This helpWhatsThisText = "<u><b>What's This</b></u><br>"\ "<p><img source=\"ui/actions/Help/WhatsThis.png\"><br> "\ "Click this option to invoke a small question mark that is attached to the mouse pointer. "\ "Click on a feature which you would like more information about. "\ "A popup box appears with information about the feature.</p>" win.helpWhatsThisAction.setWhatsThis( helpWhatsThisText ) win.helpMouseControlsAction.setWhatsThis('Displays help for mouse controls') win.helpKeyboardShortcutsAction.setWhatsThis('Displays help for keyboard shortcuts')
596540c24ceb3b478e904a42e26d7d5dd8809d95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/596540c24ceb3b478e904a42e26d7d5dd8809d95/whatsthis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2888, 2323, 2503, 1528, 1290, 6376, 3829, 16166, 12, 8082, 4672, 3536, 15605, 326, 315, 23801, 1807, 1220, 6, 2809, 977, 358, 1516, 1392, 316, 326, 12901, 21, 2774, 5668, 12748, 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, 752, 2888, 2323, 2503, 1528, 1290, 6376, 3829, 16166, 12, 8082, 4672, 3536, 15605, 326, 315, 23801, 1807, 1220, 6, 2809, 977, 358, 1516, 1392, 316, 326, 12901, 21, 2774, 5668, 12748, 87, ...
if item[:l] == l:
if item[:ll] == l:
def _aPrefixIn(item, l): for i in l: ll = len(l) if item[:l] == l: return 1 return None
0446acc6520064f1dae0636b32e249a53b61c856 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/0446acc6520064f1dae0636b32e249a53b61c856/Server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 69, 2244, 382, 12, 1726, 16, 328, 4672, 364, 277, 316, 328, 30, 6579, 273, 562, 12, 80, 13, 309, 761, 10531, 2906, 65, 422, 328, 30, 327, 404, 327, 599, 225, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 69, 2244, 382, 12, 1726, 16, 328, 4672, 364, 277, 316, 328, 30, 6579, 273, 562, 12, 80, 13, 309, 761, 10531, 2906, 65, 422, 328, 30, 327, 404, 327, 599, 225, 2, -100, -100, -1...
else: dialog.Show(false)
def OnReportRegisterBatting(self, event): self.RunReport("Compiling batting register", "Batting register", [ statscan.BattingAccumulator() ])
def OnReportRegisterBatting(self, event): bs = statscan.BattingAccumulator() dialog = wxProgressDialog("Generating batting register", "Generating batting register", 100, self, wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_CAN_ABORT | wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME) if statscan.ProcessFile(self.book, [ bs ], dialog): dialog.Show(false)
a472aff44170d13576d93aef10c05dfe716b786d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10056/a472aff44170d13576d93aef10c05dfe716b786d/chadwick.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 4820, 3996, 38, 270, 1787, 12, 2890, 16, 871, 4672, 7081, 273, 610, 9871, 18, 38, 270, 1787, 27361, 1435, 6176, 273, 7075, 5491, 6353, 2932, 21755, 27464, 1787, 1744, 3113, 315, 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, 2755, 4820, 3996, 38, 270, 1787, 12, 2890, 16, 871, 4672, 7081, 273, 610, 9871, 18, 38, 270, 1787, 27361, 1435, 6176, 273, 7075, 5491, 6353, 2932, 21755, 27464, 1787, 1744, 3113, 315, 21...
class SurfaceBlitBlendTest (unittest.TestCase):
class SurfaceBlendTest (unittest.TestCase):
def todo_test_unmap_rgb(self):
139523b1f7ba56209b3d81507edbb2c082bb717e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1298/139523b1f7ba56209b3d81507edbb2c082bb717e/surface_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10621, 67, 3813, 67, 318, 1458, 67, 10948, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10621, 67, 3813, 67, 318, 1458, 67, 10948, 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, ...
XShortField("id",0), XShortField("seq",0) ]
ConditionalField(XShortField("id",0), lambda pkt:pkt.type in [0,8,13,14,15,16]), ConditionalField(XShortField("seq",0), lambda pkt:pkt.type in [0,8,13,14,15,16]), ConditionalField(ICMPTimeStampField("ts_ori", None), lambda pkt:pkt.type in [13,14]), ConditionalField(ICMPTimeStampField("ts_rx", None), lambda pkt:pkt.type in [13,14]), ConditionalField(ICMPTimeStampField("ts_tx", None), lambda pkt:pkt.type in [13,14]), ConditionalField(IPField("gw","0.0.0.0"), lambda pkt:pkt.type==5), ConditionalField(ByteField("ptr",0), lambda pkt:pkt.type==12), ConditionalField(X3BytesField("reserved",0), lambda pkt:pkt.type==12), ConditionalField(IntField("unused",0), lambda pkt:pkt.type not in [0,5,8,12,13,14,15,16]), ]
def mysummary(self): if isinstance(self.underlayer, IP): return self.underlayer.sprintf("UDP %IP.src%:%UDP.sport% > %IP.dst%:%UDP.dport%") elif isinstance(self.underlayer, IPv6): return self.underlayer.sprintf("UDP %IPv6.src%:%UDP.sport% > %IPv6.dst%:%UDP.dport%") else: return self.sprintf("UDP %UDP.sport% > %UDP.dport%")
2120b575f4425441f1c233ce88f9dd376dcb2b71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7311/2120b575f4425441f1c233ce88f9dd376dcb2b71/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 7687, 12, 2890, 4672, 309, 1549, 12, 2890, 18, 9341, 6363, 16, 2971, 4672, 327, 365, 18, 9341, 6363, 18, 87, 1461, 2932, 20352, 738, 2579, 18, 4816, 9, 5319, 20352, 18, 87, 655, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 7687, 12, 2890, 4672, 309, 1549, 12, 2890, 18, 9341, 6363, 16, 2971, 4672, 327, 365, 18, 9341, 6363, 18, 87, 1461, 2932, 20352, 738, 2579, 18, 4816, 9, 5319, 20352, 18, 87, 655, ...
self.section = sect
self.section = None
def __init__(self, repo, dist, deb, pool, apt_conf, gid, sect):
b9da61ec041ae2b237b550c8d9c9fc3bc903254e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1007/b9da61ec041ae2b237b550c8d9c9fc3bc903254e/addpkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3538, 16, 2411, 16, 18202, 16, 2845, 16, 279, 337, 67, 3923, 16, 11399, 16, 29140, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3538, 16, 2411, 16, 18202, 16, 2845, 16, 279, 337, 67, 3923, 16, 11399, 16, 29140, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
parser.add_option('-f', '--function', dest='function', help='Function to optimize {%s}' % ', '.join(functions))
parser.add_option('-f', '--function', action='instantiate', search=['functions'], dest='function', help='Function to optimize')
def update_parser(parser): from simulation import functions from cli import outputtypes global cli_parser cli_parser = parser parser.add_option('-q', '--quiet', dest='quiet', action='store_true', help='Refrain from printing version and option information') parser.add_option('-i', '--iterations', dest='iterations', type='int', help='Number of iterations to run') parser.add_option('-n', '--num-particles', dest='numparts', type='int', help='Number of particles') parser.add_option('-N', '--num-tasks', dest='numtasks', type='int', help='Number of tasks (if 0, create 1 task per particle)') parser.add_option('-o', '--outputfreq', dest='outputfreq', type='int', help='Number of iterations per value output') parser.add_option('-t', '--outputtype', dest='outputtype', help='Style of output {%s}' % ', '.join(outputtypes)) parser.add_option('-d', '--dimensions', dest='dims', type='int', help='Number of dimensions') parser.add_option('-f', '--function', dest='function', help='Function to optimize {%s}' % ', '.join(functions)) parser.add_option('-v', '--verbose', dest='verbose', action='store_true', default=False, help='Print out verbose error messages') parser.set_defaults(quiet=False, iterations=100, outputfreq=1, outputtype='BasicOutput', dims=2, numtasks=0, numparts=2, function='Sphere') from cli import gen_varargs_options gen_varargs_options(parser, FUNCPREFIX, 'Function', functions) return parser
e7a386d9fa3677dd7fe4b386e48989bee0f431d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/966/e7a386d9fa3677dd7fe4b386e48989bee0f431d5/mrspso.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4288, 12, 4288, 4672, 628, 14754, 1930, 4186, 628, 4942, 1930, 876, 2352, 2552, 4942, 67, 4288, 225, 4942, 67, 4288, 273, 2082, 2082, 18, 1289, 67, 3482, 2668, 17, 85, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4288, 12, 4288, 4672, 628, 14754, 1930, 4186, 628, 4942, 1930, 876, 2352, 2552, 4942, 67, 4288, 225, 4942, 67, 4288, 273, 2082, 2082, 18, 1289, 67, 3482, 2668, 17, 85, 2187, ...
r.run(s)
test_support.run_suite(s)
def test_main(): #import gc import sys r = unittest.TextTestRunner() s = test_suite() lastrc = None while True: r.run(s) if 1: # change to 0, under a debug build, for some leak detection break gc.collect() if gc.garbage: raise SystemError("gc.garbage not empty after test run: %r" % gc.garbage) if hasattr(sys, 'gettotalrefcount'): thisrc = sys.gettotalrefcount() print >> sys.stderr, '*' * 10, 'total refs:', thisrc, if lastrc: print >> sys.stderr, 'delta:', thisrc - lastrc else: print >> sys.stderr lastrc = thisrc
77e1ba6032f1265e638167301083e14a8d7d8924 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6753/77e1ba6032f1265e638167301083e14a8d7d8924/test_datetime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 468, 5666, 8859, 1930, 2589, 225, 436, 273, 2836, 3813, 18, 1528, 4709, 9709, 1435, 272, 273, 1842, 67, 30676, 1435, 27596, 313, 71, 273, 599, 1323, 1053, 30, 1842...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5254, 13332, 468, 5666, 8859, 1930, 2589, 225, 436, 273, 2836, 3813, 18, 1528, 4709, 9709, 1435, 272, 273, 1842, 67, 30676, 1435, 27596, 313, 71, 273, 599, 1323, 1053, 30, 1842...
query = ('http://docs.google.com/feeds/documents/private/full'
query = ('https://docs.google.com/feeds/documents/private/full'
def testExportPresentation(self): query = ('http://docs.google.com/feeds/documents/private/full' '/-/presentation?max-results=1') feed = self.doclist.QueryDocumentListFeed(query) file_paths = ['./downloadedTest.pdf', './downloadedTest.ppt', './downloadedTest.swf', './downloadedTest.txt'] for path in file_paths: self.doclist.DownloadPresentation(feed.entry[0].resourceId.text, path) self.assert_(os.path.exists(path)) self.assert_(os.path.getsize(path)) os.remove(path)
6a1d41e0ebd05471e1aa915fdf0a98f4af4bce69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5609/6a1d41e0ebd05471e1aa915fdf0a98f4af4bce69/service_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6144, 6351, 367, 12, 2890, 4672, 843, 273, 7707, 4528, 2207, 8532, 18, 9536, 18, 832, 19, 7848, 87, 19, 24795, 19, 1152, 19, 2854, 11, 1173, 17, 19, 10364, 35, 1896, 17, 4717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6144, 6351, 367, 12, 2890, 4672, 843, 273, 7707, 4528, 2207, 8532, 18, 9536, 18, 832, 19, 7848, 87, 19, 24795, 19, 1152, 19, 2854, 11, 1173, 17, 19, 10364, 35, 1896, 17, 4717, ...
limiter = MemoryLimit(MEMORY_LIMIT)
def fuzzFile(self, fuzz): limiter = MemoryLimit(MEMORY_LIMIT)
ff5f969ef34c922dc4fead4711aa8e0bec82c450 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/ff5f969ef34c922dc4fead4711aa8e0bec82c450/stress.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31839, 812, 12, 2890, 16, 31839, 4672, 25057, 273, 9251, 3039, 12, 24329, 67, 8283, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31839, 812, 12, 2890, 16, 31839, 4672, 25057, 273, 9251, 3039, 12, 24329, 67, 8283, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def test13_associateAutoCommit(self):
def txn_finish_test(self, sDB, txn): try: self.finish_test(sDB, txn=txn) finally: if self.cur: self.cur.close() self.cur = None if txn: txn.commit() def test13_associate_in_transaction(self):
def test13_associateAutoCommit(self): if verbose: print '\n', '-=' * 30 print "Running %s.test13_associateAutoCommit..." % \ self.__class__.__name__
c5cf731a4deb710892c9083a468a6d173d791456 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c5cf731a4deb710892c9083a468a6d173d791456/test_associate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7827, 67, 13749, 67, 3813, 12, 2890, 16, 272, 2290, 16, 7827, 4672, 775, 30, 365, 18, 13749, 67, 3813, 12, 87, 2290, 16, 7827, 33, 24790, 13, 3095, 30, 309, 365, 18, 1397, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7827, 67, 13749, 67, 3813, 12, 2890, 16, 272, 2290, 16, 7827, 4672, 775, 30, 365, 18, 13749, 67, 3813, 12, 87, 2290, 16, 7827, 33, 24790, 13, 3095, 30, 309, 365, 18, 1397, 30, 365, ...
debug(" Set-Cookie2 without version attribute (%s=%s)", cookie.name, cookie.value)
_debug(" Set-Cookie2 without version attribute (%s=%s)", cookie.name, cookie.value)
def set_ok_version(self, cookie, request): if cookie.version is None: # Version is always set to 0 by parse_ns_headers if it's a Netscape # cookie, so this must be an invalid RFC 2965 cookie. debug(" Set-Cookie2 without version attribute (%s=%s)", cookie.name, cookie.value) return False if cookie.version > 0 and not self.rfc2965: debug(" RFC 2965 cookies are switched off") return False elif cookie.version == 0 and not self.netscape: debug(" Netscape cookies are switched off") return False return True
7fde00696ae6c872310a407df8b8923ab907f247 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7fde00696ae6c872310a407df8b8923ab907f247/cookielib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 601, 67, 1589, 12, 2890, 16, 3878, 16, 590, 4672, 309, 3878, 18, 1589, 353, 599, 30, 468, 4049, 353, 3712, 444, 358, 374, 635, 1109, 67, 2387, 67, 2485, 309, 518, 1807, 279,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 601, 67, 1589, 12, 2890, 16, 3878, 16, 590, 4672, 309, 3878, 18, 1589, 353, 599, 30, 468, 4049, 353, 3712, 444, 358, 374, 635, 1109, 67, 2387, 67, 2485, 309, 518, 1807, 279,...
var_doc.value.ast is UNKNOWN):
var_doc.value.toktree is UNKNOWN):
def _module_var_ast(self, module_doc, name): """ If a variable named C{name} exists in C{module_doc}, and its value has an ast, then return its ast. """ var_doc = module_doc.variables.get(name) if (var_doc is None or var_doc.value in (None, UNKNOWN) or var_doc.value.ast is UNKNOWN): return None else: return var_doc.value.ast
1e9df856ab08a6a6e45f4010cb192a8827495dd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1e9df856ab08a6a6e45f4010cb192a8827495dd7/docparser_quick.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2978, 67, 1401, 67, 689, 12, 2890, 16, 1605, 67, 2434, 16, 508, 4672, 3536, 971, 279, 2190, 4141, 385, 95, 529, 97, 1704, 316, 385, 95, 2978, 67, 2434, 5779, 471, 2097, 460, 711...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2978, 67, 1401, 67, 689, 12, 2890, 16, 1605, 67, 2434, 16, 508, 4672, 3536, 971, 279, 2190, 4141, 385, 95, 529, 97, 1704, 316, 385, 95, 2978, 67, 2434, 5779, 471, 2097, 460, 711...
cal = parsedatetime.Calendar(ptc.Constants(str(getLocale()))) (dateVar, invalidFlag) = cal.parse(newValueString) if invalidFlag != 0 and invalidFlag != 2: dateTimeValue = datetime(*dateVar[:3]) else: self._changeTextQuietly(self.control, "%s ?" % newValueString) return
dateTimeValue = pim.shortDateFormat.parse(item.itsView, newValueString, oldValue)
def SetAttributeValue(self, item, attributeName, valueString): newValueString = valueString.replace('?','').strip() if len(newValueString) == 0: # Attempting to remove the start date field will set its value to the # "previous value" when the value is committed (removing focus or # "enter"). Attempting to remove the end-date field will set its # value to the "previous value" when the value is committed. In # brief, if the user attempts to delete the value for a start date # or end date, it automatically resets to what value was displayed # before the user tried to delete it. self.SetControlValue(self.control, self.GetAttributeValue(item, attributeName)) else: oldValue = getattr(item, attributeName, None) # Here, the ICUError covers ICU being unable to handle # the input value. ValueErrors can occur when I've seen ICU # claims to parse bogus values like "06/05/0506/05/05" #successfully, which causes fromtimestamp() to throw.) try: # use parsedatetime to calculate the date cal = parsedatetime.Calendar(ptc.Constants(str(getLocale()))) (dateVar, invalidFlag) = cal.parse(newValueString) #invalidFlag = 0 implies no date/time #invalidFlag = 2 implies only time, no date if invalidFlag != 0 and invalidFlag != 2: dateTimeValue = datetime(*dateVar[:3]) else: self._changeTextQuietly(self.control, "%s ?" % newValueString) return except (ICUError, ValueError): self._changeTextQuietly(self.control, "%s ?" % newValueString) return
1be7eeeda64c66da9dd3618db85f2665c332e54f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9228/1be7eeeda64c66da9dd3618db85f2665c332e54f/detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 14942, 12, 2890, 16, 761, 16, 9734, 16, 24998, 4672, 6129, 780, 273, 24998, 18, 2079, 2668, 35, 2187, 6309, 2934, 6406, 1435, 309, 562, 12, 2704, 620, 780, 13, 422, 374, 30, 468,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 14942, 12, 2890, 16, 761, 16, 9734, 16, 24998, 4672, 6129, 780, 273, 24998, 18, 2079, 2668, 35, 2187, 6309, 2934, 6406, 1435, 309, 562, 12, 2704, 620, 780, 13, 422, 374, 30, 468,...
return dict(((k, getattr(d,k)) for k in dir(d) if not k.startswith('__')))
return dict(((k, getattr(self,k)) for k in dir(self) if not k.startswith('__') and k != 'as_dict'))
def as_dict(self): return dict(((k, getattr(d,k)) for k in dir(d) if not k.startswith('__')))
68d1b5580f4cc5dc097815671e97b0cbc4f3c371 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1203/68d1b5580f4cc5dc097815671e97b0cbc4f3c371/aafigure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 67, 1576, 12, 2890, 4672, 327, 2065, 12443, 12, 79, 16, 3869, 12, 72, 16, 79, 3719, 364, 417, 316, 1577, 12, 72, 13, 309, 486, 417, 18, 17514, 1918, 2668, 7250, 20349, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 67, 1576, 12, 2890, 4672, 327, 2065, 12443, 12, 79, 16, 3869, 12, 72, 16, 79, 3719, 364, 417, 316, 1577, 12, 72, 13, 309, 486, 417, 18, 17514, 1918, 2668, 7250, 20349, 2, -100, ...
prx = self.ic.getDefaultRouter() router = Glacier2.RouterPrx.checkedCast(prx) if router:
try: prx = self.ic.getDefaultRouter() router = Glacier2.RouterPrx.checkedCast(prx) if router: try: router.destroySession() except exceptions.Exception, e: pass
def closeSession(self): """ Closes the Router connection created by createSession(). Due to a bug in Ice, only one connection is allowed per communicator, so we also destroy the communicator. """
982dd23d42656cf07baca9de68d56f4de6cc3aa9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12409/982dd23d42656cf07baca9de68d56f4de6cc3aa9/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27578, 12, 2890, 4672, 3536, 22442, 2420, 326, 9703, 1459, 2522, 635, 752, 2157, 7675, 463, 344, 358, 279, 7934, 316, 467, 311, 16, 1338, 1245, 1459, 353, 2935, 1534, 8391, 8844, 16, 142...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27578, 12, 2890, 4672, 3536, 22442, 2420, 326, 9703, 1459, 2522, 635, 752, 2157, 7675, 463, 344, 358, 279, 7934, 316, 467, 311, 16, 1338, 1245, 1459, 353, 2935, 1534, 8391, 8844, 16, 142...
if entry.getElementsByTagName('SubFormat'):
if entry.getElementsByTagName('SubFormat') and entry.getElementsByTagName('SubFormat')[0].firstChild:
def subtitle_info(self, raw_xml): dom = minidom.parseString(raw_xml) #Make the dom from raw xml entries=dom.getElementsByTagName('opensubtitles') #Pull out all entry's subtitle_entries=[] #Make an empty container to fill up and return data=None for entry in entries: if entry.getElementsByTagName('SubBrowse'): for result in entry.getElementsByTagName('SubBrowse'): if result.getElementsByTagName('Subtitle'): data = result.getElementsByTagName('Subtitle') break break #print "data=", data if not data: return [] # catch subtitle information for entry in data: sub = {} if entry.getElementsByTagName('LinkDetails'): sub['LinkDetails'] = entry.getElementsByTagName('LinkDetails')[0].firstChild.data if entry.getElementsByTagName('IDSubtitle'): sub['IDSubtitle'] = { 'IDSubtitle': entry.getElementsByTagName('IDSubtitle')[0].firstChild.data, 'Link': entry.getElementsByTagName('IDSubtitle')[0].getAttribute('Link'), } if entry.getElementsByTagName('MovieReleaseName'): sub['MovieReleaseName'] = entry.getElementsByTagName('MovieReleaseName')[0].firstChild.data if entry.getElementsByTagName('SubFormat'): sub['SubFormat'] = entry.getElementsByTagName('SubFormat')[0].firstChild.data if entry.getElementsByTagName('SubSumCD'): sub['SubSumCD'] = entry.getElementsByTagName('SubSumCD')[0].firstChild.data if entry.getElementsByTagName('SubAuthorComment'): sub['SubAuthorComment'] = entry.getElementsByTagName('SubAuthorComment')[0].firstChild.data if entry.getElementsByTagName('SubAddDate'): sub['SubAddDate'] = entry.getElementsByTagName('SubAddDate')[0].firstChild.data if entry.getElementsByTagName('SubSumVotes'): sub['SubSumVotes'] = entry.getElementsByTagName('SubSumVotes')[0].firstChild.data if entry.getElementsByTagName('SubRating'): sub['SubRating'] = entry.getElementsByTagName('SubRating')[0].firstChild.data if entry.getElementsByTagName('SubDownloadsCnt'): sub['SubDownloadsCnt'] = entry.getElementsByTagName('SubDownloadsCnt')[0].firstChild.data if entry.getElementsByTagName('UserNickName'): sub['UserNickName'] = entry.getElementsByTagName('UserNickName')[0].firstChild.data if entry.getElementsByTagName('LanguageName'): sub['LanguageName'] = entry.getElementsByTagName('LanguageName')[0].firstChild.data if entry.getElementsByTagName('SubtitleFile'): SubtitleFile = {} _SubtitleFile = entry.getElementsByTagName('SubtitleFile')[0] _File = _SubtitleFile.getElementsByTagName('File')[0] SubtitleFile['File'] = {'ID': _SubtitleFile.getElementsByTagName('File')[0].getAttribute('ID'), 'SubActualCD': {'SubActualCD':_File.getElementsByTagName('SubActualCD')[0].firstChild.data, 'SubSize': _File.getElementsByTagName('SubActualCD')[0].getAttribute('Link'), 'MD5': _File.getElementsByTagName('SubActualCD')[0].getAttribute('MD5'), 'SubFileName': _File.getElementsByTagName('SubActualCD')[0].getAttribute('SubFileName'), 'DownloadLink': _File.getElementsByTagName('SubActualCD')[0].getAttribute('DownloadLink'), }, 'SubPreview': _File.getElementsByTagName('SubPreview')[0].firstChild.data } SubtitleFile['Download'] = {'Download': _SubtitleFile.getElementsByTagName('Download')[0].firstChild.data, 'DownloadLink': _SubtitleFile.getElementsByTagName('Download')[0].getAttribute('DownloadLink'), } sub['SubtitleFile'] = SubtitleFile if entry.getElementsByTagName('Movie'): _Movie = entry.getElementsByTagName('Movie')[0] #sub['MovieName'] = _Movie.getElementsByTagName('MovieName')[0].firstChild.data sub['MovieID'] = {'MovieID': _Movie.getElementsByTagName('MovieName')[0].getAttribute('MovieID'), 'Link': _Movie.getElementsByTagName('MovieName')[0].getAttribute('Link'), } for section in _Movie.getElementsByTagName('section'): if section.getAttribute('type') == u"about": for info in section.getElementsByTagName("info"): if info.getElementsByTagName("web_url")[0].firstChild.data == u"http://www.imdb.com": sub['MovieID']['LinkImdb'] = info.getElementsByTagName("link_detail")[0].firstChild.data if entry.getElementsByTagName('FullName'): sub['FullName'] = entry.getElementsByTagName('FullName')[0].firstChild.data if entry.getElementsByTagName('ReportLink'): sub['ReportLink'] = entry.getElementsByTagName('ReportLink')[0].firstChild.data # just s shortcut sub['DownloadLink'] = sub['SubtitleFile']['File']['SubActualCD']['DownloadLink'] if sub: subtitle_entries.append(sub) return subtitle_entries
f4a0b5c76f2474a74fe101030a960e622bef3d59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/f4a0b5c76f2474a74fe101030a960e622bef3d59/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20281, 67, 1376, 12, 2890, 16, 1831, 67, 2902, 4672, 4092, 273, 1131, 350, 362, 18, 2670, 780, 12, 1899, 67, 2902, 13, 468, 6464, 326, 4092, 628, 1831, 2025, 3222, 33, 9859, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20281, 67, 1376, 12, 2890, 16, 1831, 67, 2902, 4672, 4092, 273, 1131, 350, 362, 18, 2670, 780, 12, 1899, 67, 2902, 13, 468, 6464, 326, 4092, 628, 1831, 2025, 3222, 33, 9859, 18, 588, ...
"""Read data via the RLE-coder""" def __init__(self, ifp):
"""Read data via the RLE-coder""" def __init__(self, ifp):
def close(self):
d9300e7ae7f704ad263013ec13346104b4bba7ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9300e7ae7f704ad263013ec13346104b4bba7ba/binhex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 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, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 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, -100, -...
if self.disable is not None and conf_obj.name in self.disable:
startup = getattr(conf_obj, "startup", None) if startup is None:
def configs(self): for conf_obj in set(config.load_configs(os.path.abspath(self.config))): if self.disable is not None and conf_obj.name in self.disable: continue if self.enable is not None and conf_obj.name not in self.enable: continue yield conf_obj
b0641b14584d862675d92cee2d748fecba505375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14361/b0641b14584d862675d92cee2d748fecba505375/startup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6784, 12, 2890, 4672, 364, 2195, 67, 2603, 316, 444, 12, 1425, 18, 945, 67, 10955, 12, 538, 18, 803, 18, 5113, 803, 12, 2890, 18, 1425, 3719, 4672, 11850, 273, 3869, 12, 3923, 67, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6784, 12, 2890, 4672, 364, 2195, 67, 2603, 316, 444, 12, 1425, 18, 945, 67, 10955, 12, 538, 18, 803, 18, 5113, 803, 12, 2890, 18, 1425, 3719, 4672, 11850, 273, 3869, 12, 3923, 67, 26...
result['url'] = f.url
result['href'] = f.url
def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, referrer=None, handlers=[]): '''Parse a feed from a URL, file, stream, or string''' result = FeedParserDict() result['feed'] = FeedParserDict() result['entries'] = [] if _XML_AVAILABLE: result['bozo'] = 0 if type(handlers) == types.InstanceType: handlers = [handlers] try: f = _open_resource(url_file_stream_or_string, etag, modified, agent, referrer, handlers) data = f.read() except Exception, e: result['bozo'] = 1 result['bozo_exception'] = e data = '' f = None # if feed is gzip-compressed, decompress it if f and data and hasattr(f, 'headers'): if gzip and f.headers.get('content-encoding', '') == 'gzip': try: data = gzip.GzipFile(fileobj=_StringIO(data)).read() except Exception, e: # Some feeds claim to be gzipped but they're not, so # we get garbage. Ideally, we should re-request the # feed without the 'Accept-encoding: gzip' header, # but we don't. result['bozo'] = 1 result['bozo_exception'] = e data = '' elif zlib and f.headers.get('content-encoding', '') == 'deflate': try: data = zlib.decompress(data, -zlib.MAX_WBITS) except Exception, e: result['bozo'] = 1 result['bozo_exception'] = e data = '' # save HTTP headers if hasattr(f, 'info'): info = f.info() result['etag'] = info.getheader('ETag') last_modified = info.getheader('Last-Modified') if last_modified: result['modified'] = _parse_date(last_modified) if hasattr(f, 'url'): result['url'] = f.url result['status'] = 200 if hasattr(f, 'status'): result['status'] = f.status if hasattr(f, 'headers'): result['headers'] = f.headers.dict if hasattr(f, 'close'): f.close() # there are four encodings to keep track of: # - http_encoding is the encoding declared in the Content-Type HTTP header # - xml_encoding is the encoding declared in the <?xml declaration # - sniffed_encoding is the encoding sniffed from the first 4 bytes of the XML data # - result['encoding'] is the actual encoding, as per RFC 3023 and a variety of other conflicting specifications http_headers = result.get('headers', {}) result['encoding'], http_encoding, xml_encoding, sniffed_xml_encoding, acceptable_content_type = \ _getCharacterEncoding(http_headers, data) if http_headers and (not acceptable_content_type): if http_headers.has_key('content-type'): bozo_message = '%s is not an XML media type' % http_headers['content-type'] else: bozo_message = 'no Content-type specified' result['bozo'] = 1 result['bozo_exception'] = NonXMLContentType(bozo_message) result['version'], data = _stripDoctype(data) baseuri = http_headers.get('content-location', result.get('url')) baselang = http_headers.get('content-language', None) # if server sent 304, we're done if result.get('status', 0) == 304: result['version'] = '' result['debug_message'] = 'The feed has not changed since you last checked, ' + \ 'so the server sent no data. This is a feature, not a bug!' return result # if there was a problem downloading, we're done if not data: return result # determine character encoding use_strict_parser = 0 known_encoding = 0 tried_encodings = [] for proposed_encoding in (result['encoding'], xml_encoding, sniffed_xml_encoding, 'utf-8', 'windows-1252'): if proposed_encoding in tried_encodings: continue if not proposed_encoding: continue try: data = _toUTF8(data, proposed_encoding) known_encoding = 1 use_strict_parser = 1 break except: pass tried_encodings.append(proposed_encoding) if not known_encoding: result['bozo'] = 1 result['bozo_exception'] = CharacterEncodingUnknown( \ 'document encoding unknown, I tried ' + \ '%s, %s, utf-8, and windows-1252 but nothing worked' % \ (result['encoding'], xml_encoding)) result['encoding'] = '' elif proposed_encoding != result['encoding']: result['bozo'] = 1 result['bozo_exception'] = CharacterEncodingOverride( \ 'documented declared as %s, but parsed as %s' % \ (result['encoding'], proposed_encoding)) result['encoding'] = proposed_encoding if not _XML_AVAILABLE: use_strict_parser = 0 if use_strict_parser: # initialize the SAX parser feedparser = _StrictFeedParser(baseuri, baselang, 'utf-8') saxparser = xml.sax.make_parser(PREFERRED_XML_PARSERS) saxparser.setFeature(xml.sax.handler.feature_namespaces, 1) saxparser.setContentHandler(feedparser) saxparser.setErrorHandler(feedparser) source = xml.sax.xmlreader.InputSource() source.setByteStream(_StringIO(data)) if hasattr(saxparser, '_ns_stack'): # work around bug in built-in SAX parser (doesn't recognize xml: namespace) # PyXML doesn't have this problem, and it doesn't have _ns_stack either saxparser._ns_stack.append({'http://www.w3.org/XML/1998/namespace':'xml'}) try: saxparser.parse(source) except Exception, e: if _debug: import traceback traceback.print_stack() traceback.print_exc() sys.stderr.write('xml parsing failed\n') result['bozo'] = 1 result['bozo_exception'] = feedparser.exc or e use_strict_parser = 0 if not use_strict_parser: feedparser = _LooseFeedParser(baseuri, baselang, known_encoding and 'utf-8' or '') feedparser.feed(data) result['feed'] = feedparser.feeddata result['entries'] = feedparser.entries result['version'] = result['version'] or feedparser.version return result
50cbe5fb44dbff087e8cca95d332bb7b7cc15747 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/50cbe5fb44dbff087e8cca95d332bb7b7cc15747/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 718, 67, 768, 67, 3256, 67, 280, 67, 1080, 16, 13655, 33, 7036, 16, 4358, 33, 7036, 16, 4040, 33, 7036, 16, 14502, 33, 7036, 16, 4919, 33, 8526, 4672, 9163, 3201, 279, 4746...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 718, 67, 768, 67, 3256, 67, 280, 67, 1080, 16, 13655, 33, 7036, 16, 4358, 33, 7036, 16, 4040, 33, 7036, 16, 14502, 33, 7036, 16, 4919, 33, 8526, 4672, 9163, 3201, 279, 4746...
boundary = self.get_boundary()
def is_circular_planar(self, ordered=True, kuratowski=False, set_embedding=False, set_pos=False): """ A graph (with nonempty boundary) is circular planar if it has a planar embedding in which all boundary vertices can be drawn in order on a disc boundary, with all the interior vertices drawn inside the disc. Returns True if the graph is circular planar, and False if it is not. If kuratowski is set to True, then this function will return a tuple, with boolean first entry and second entry the Kuratowski subgraph or minor isolated by the Boyer-Myrvold algorithm. Note that this graph might contain a vertex or edges that were not in the initial graph. These would be elements referred to below as parts of the wheel and the star, which were added to the graph to require that the boundary can be drawn on the boundary of a disc, with all other vertices drawn inside (and no edge crossings). For more information, refer to reference [2]. This is a linear time algorithm to test for circular planarity. It relies on the edge-addition planarity algorithm due to Boyer-Myrvold. We accomplish linear time for circular planarity by modifying the graph before running the general planarity algorithm. REFERENCE:
afe94467823d292d810d1fb3d0f497a3dcc45df0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/afe94467823d292d810d1fb3d0f497a3dcc45df0/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 11614, 9559, 67, 7088, 297, 12, 2890, 16, 5901, 33, 5510, 16, 417, 295, 270, 543, 7771, 77, 33, 8381, 16, 444, 67, 23744, 33, 8381, 16, 444, 67, 917, 33, 8381, 4672, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 11614, 9559, 67, 7088, 297, 12, 2890, 16, 5901, 33, 5510, 16, 417, 295, 270, 543, 7771, 77, 33, 8381, 16, 444, 67, 23744, 33, 8381, 16, 444, 67, 917, 33, 8381, 4672, 3536, ...
if istream: istream.close() if ostream: ostream.close() if sock: sock.close()
if self.file_count == 0: if istream: istream.close() if ostream: ostream.close() if sock: sock.close()
def close(self):
09918d4423647b289e77e70bd60b2c9e32cf8aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/09918d4423647b289e77e70bd60b2c9e32cf8aad/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 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, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 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, -100, -...
wikipedia.output(u"Unblocking [[User:%s]]..." % self.name())
pywikibot.output(u"Unblocking [[User:%s]]..." % self.name())
def _unblock(self, blockID, reason): wikipedia.output(u"Unblocking [[User:%s]]..." % self.name()) token = self.site().getToken(self, sysop = True) predata = { 'id': blockID, 'wpUnblockReason': reason, 'wpBlock': 'Unblock this address', 'wpEditToken': token, } address = self.site().unblock_address() response, data = self.site().postForm(address, predata, sysop = True) if response.code != 302: if self.site().mediawiki_message('ipb_cant_unblock').replace('$1',blockID) in data: raise AlreadyUnblockedError raise UnblockError, data return True
0553617ec4a3c10f8ce44d225a0ca714f640d691 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/0553617ec4a3c10f8ce44d225a0ca714f640d691/userlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 318, 2629, 12, 2890, 16, 1203, 734, 16, 3971, 4672, 2395, 11999, 495, 352, 18, 2844, 12, 89, 6, 984, 18926, 12167, 1299, 5319, 87, 13563, 7070, 738, 365, 18, 529, 10756, 1147, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 318, 2629, 12, 2890, 16, 1203, 734, 16, 3971, 4672, 2395, 11999, 495, 352, 18, 2844, 12, 89, 6, 984, 18926, 12167, 1299, 5319, 87, 13563, 7070, 738, 365, 18, 529, 10756, 1147, 273...
if self.cleaned_data['studentrep'] and not self.has_key['studentrep_expl']:
if self.cleaned_data['studentrep'] and not self.cleaned_data.has_key('studentrep_expl'):
def clean_studentrep_expl(self): # TODO: run if blank? if self.cleaned_data['studentrep'] and not self.has_key['studentrep_expl']: raise ValidationError("Please enter an explanation above.")
18c828755c05a36284e00173045cc895130ce76a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/18c828755c05a36284e00173045cc895130ce76a/user_profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 26240, 14462, 67, 338, 412, 12, 2890, 4672, 468, 2660, 30, 1086, 309, 7052, 35, 309, 365, 18, 6200, 329, 67, 892, 3292, 26240, 14462, 3546, 471, 486, 365, 18, 6200, 329, 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, 2721, 67, 26240, 14462, 67, 338, 412, 12, 2890, 4672, 468, 2660, 30, 1086, 309, 7052, 35, 309, 365, 18, 6200, 329, 67, 892, 3292, 26240, 14462, 3546, 471, 486, 365, 18, 6200, 329, 67, ...
elif isinstance(other, (int, float)): return cmp(self.date, other)
elif isinstance(other, (datetime.datetime, float, int, basestring)): return cmp(self.date, Date(other).date)
def __cmp__(self, other): if isinstance(other, self.__class__): return cmp(self.date, other.date) elif isinstance(other, (int, float)): return cmp(self.date, other) else: return cmp(id(self), id(other))
7d37fe2286e7096e85473de54b86458ceaf417e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7d37fe2286e7096e85473de54b86458ceaf417e4/plistlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 309, 1549, 12, 3011, 16, 365, 16186, 1106, 972, 4672, 327, 9411, 12, 2890, 18, 712, 16, 1308, 18, 712, 13, 1327, 1549, 12, 3011, 16, 261, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 309, 1549, 12, 3011, 16, 365, 16186, 1106, 972, 4672, 327, 9411, 12, 2890, 18, 712, 16, 1308, 18, 712, 13, 1327, 1549, 12, 3011, 16, 261, 6...
if len(num) > 3: if num[1] in 'bB': num_make = "Integer('%s', 2)" % num[2:] elif num[1] in 'oO': num_make = "Integer('%s', 8)" % num[2:] else: num_make = "Integer(%s)" % num else: num_make = "Integer(%s)" % num
num_make = "Integer(%s)" % num
def preparse_numeric_literals(code, extract=False): """ This preparses numerical literals into their sage counterparts, e.g. Integer, RealNumber, and ComplexNumber. If extract is true, then it will create names for the literals and return a dict of name-construction pairs along with the processed code. EXAMPLES: sage: from sage.misc.preparser import preparse_numeric_literals sage: preparse_numeric_literals("5") 'Integer(5)' sage: preparse_numeric_literals("5j") "ComplexNumber(0, '5')" sage: preparse_numeric_literals("5jr") '5J' sage: preparse_numeric_literals("5l") '5l' sage: preparse_numeric_literals("5L") '5L' sage: preparse_numeric_literals("1.5") "RealNumber('1.5')" sage: preparse_numeric_literals("1.5j") "ComplexNumber(0, '1.5')" sage: preparse_numeric_literals(".5j") "ComplexNumber(0, '.5')" sage: preparse_numeric_literals("5e9j") "ComplexNumber(0, '5e9')" sage: preparse_numeric_literals("5.") "RealNumber('5.')" sage: preparse_numeric_literals("5.j") "ComplexNumber(0, '5.')" sage: preparse_numeric_literals("5.foo()") 'Integer(5).foo()' sage: preparse_numeric_literals("5.5.foo()") "RealNumber('5.5').foo()" sage: preparse_numeric_literals("5.5j.foo()") "ComplexNumber(0, '5.5').foo()" sage: preparse_numeric_literals("5j.foo()") "ComplexNumber(0, '5').foo()" sage: preparse_numeric_literals("1.exp()") 'Integer(1).exp()' sage: preparse_numeric_literals("1e+10") "RealNumber('1e+10')" sage: preparse_numeric_literals("0x0af") 'Integer(0x0af)' sage: preparse_numeric_literals("0x10.sqrt()") 'Integer(0x10).sqrt()' sage: preparse_numeric_literals('0o100') "Integer('100', 8)" sage: preparse_numeric_literals('0b111001') "Integer('111001', 2)" """ literals = {} last = 0 new_code = [] global all_num_regex if all_num_regex is None: dec_num = r"\b\d+" hex_num = r"\b0x[0-9a-f]+" oct_num = r"\b0o[0-7]+" bin_num = r"\b0b[01]+" # This is slightly annoying as floating point numbers may start # with a decimal point, but if they do the \b will not match. float_num = r"((\b\d+([.]\d*)?)|([.]\d+))(e[-+]?\d+)?" all_num = r"((%s)|(%s)|(%s)|(%s)|(%s))(rj|rL|jr|Lr|j|L|r|)\b" % (float_num, dec_num, hex_num, oct_num, bin_num) all_num_regex = re.compile(all_num, re.I) for m in all_num_regex.finditer(code): start, end = m.start(), m.end() num = m.group(1) postfix = m.groups()[-1].upper() if 'R' in postfix: num_name = num_make = num + postfix.replace('R', '') elif 'L' in postfix: continue else: # The Sage preparser does extra things with numbers, which we need to handle here. if '.' in num: if start > 0 and num[0] == '.': if code[start-1] == '.': # handle Ellipsis start += 1 num = num[1:] elif re.match(r'[a-zA-Z0-9_\])]', code[start-1]): # handle R.0 continue elif end < len(code) and num[-1] == '.': if re.match('[a-zA-Z_]', code[end]): # handle 4.sqrt() end -= 1 num = num[:-1] elif end < len(code) and code[end] == '.' and not postfix and re.match(r'\d+$', num): # \b does not match after the . for floating point # two dots in a row would be an ellipsis if end+1 == len(code) or code[end+1] != '.': end += 1 num += '.' if '.' in num or 'e' in num or 'E' in num or 'J' in postfix: num_name = numeric_literal_prefix + num.replace('.', 'p').replace('-', 'n').replace('+', '') if 'J' in postfix: num_make = "ComplexNumber(0, '%s')" % num num_name += 'j' else: num_make = "RealNumber('%s')" % num else: num_name = numeric_literal_prefix + num if len(num) > 3: # Py3 oct and bin support if num[1] in 'bB': num_make = "Integer('%s', 2)" % num[2:] elif num[1] in 'oO': num_make = "Integer('%s', 8)" % num[2:] else: num_make = "Integer(%s)" % num else: num_make = "Integer(%s)" % num literals[num_name] = num_make new_code.append(code[last:start]) if extract: new_code.append(num_name+' ') else: new_code.append(num_make) last = end new_code.append(code[last:]) code = ''.join(new_code) if extract: return code, literals else: return code
8d4b14657db9f6f2cf203a635693e4ff28d49020 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/8d4b14657db9f6f2cf203a635693e4ff28d49020/preparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 2670, 67, 5246, 67, 80, 11235, 12, 710, 16, 2608, 33, 8381, 4672, 3536, 1220, 675, 1065, 2420, 17409, 18228, 1368, 3675, 272, 410, 3895, 6019, 16, 425, 18, 75, 18, 2144, 16, 15987...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 2670, 67, 5246, 67, 80, 11235, 12, 710, 16, 2608, 33, 8381, 4672, 3536, 1220, 675, 1065, 2420, 17409, 18228, 1368, 3675, 272, 410, 3895, 6019, 16, 425, 18, 75, 18, 2144, 16, 15987...
This method write the control files for the binary packages of all
This method writes the control files for the binary packages of all
def write_controlfiles(self, basedir, suite): """Write the control files
644caa3f3125e8104b46e0ef2774fdb1917b2f5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2784/644caa3f3125e8104b46e0ef2774fdb1917b2f5c/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 7098, 2354, 12, 2890, 16, 15573, 16, 11371, 4672, 3536, 3067, 326, 3325, 1390, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 7098, 2354, 12, 2890, 16, 15573, 16, 11371, 4672, 3536, 3067, 326, 3325, 1390, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
else
else:
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 567) else quickfix.IntField.__init__(self, 567, 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, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 9599, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 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, 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, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 9599, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 27...
AUTHOR: -- Robert Bradshaw (2007-05-31)
def partial_fraction_decomposition(self): """ Decomposes fraction field element into a whole part and a list of fraction field elements over prime power denominators.
611ba9af2743f1a8feed24f41fdcf618df0fe707 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/611ba9af2743f1a8feed24f41fdcf618df0fe707/fraction_field_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4702, 67, 16744, 67, 323, 24388, 12, 2890, 4672, 3536, 26824, 10522, 8330, 652, 930, 1368, 279, 7339, 1087, 471, 279, 666, 434, 8330, 652, 2186, 1879, 17014, 7212, 10716, 30425, 18, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4702, 67, 16744, 67, 323, 24388, 12, 2890, 4672, 3536, 26824, 10522, 8330, 652, 930, 1368, 279, 7339, 1087, 471, 279, 666, 434, 8330, 652, 2186, 1879, 17014, 7212, 10716, 30425, 18, 2, -...
ok = False for a in args: if a[0]=='active': ok = True if not ok:
i = 0 while i<len(args): if args[i][0]=='active': if not args[i][2]: del args[i] break i += 1 if i==len(args):
def search(self, cr, user, args, offset=0, limit=None, order=None): # if the object has a field named 'active', filter out all inactive # records unless they were explicitely asked for if 'active' in self._columns: ok = False for a in args: if a[0]=='active': ok = True if not ok: args.append(('active', '=', 1))
84c4283c1db29daa905ff4648461b6a36adafe2b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/84c4283c1db29daa905ff4648461b6a36adafe2b/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 4672, 468, 309, 326, 733, 711, 279, 652, 4141, 296, 3535, 2187, 1034, 596, 777, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 4672, 468, 309, 326, 733, 711, 279, 652, 4141, 296, 3535, 2187, 1034, 596, 777, ...
privateIfGenericTQ = self.privatePilotFraction < random.random()
privateIfGenericTQ = self.privatePilotFraction > random.random()
def submitPilots(self, taskQueueDict, pilotsToSubmit, workDir=None ): """ Submit pilot for the given TaskQueue, this is done from the Thread Pool job """ try:
d67f2cb46a2376c2a5a585faadf0e4bafd26ae7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/d67f2cb46a2376c2a5a585faadf0e4bafd26ae7e/TaskQueueDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 52, 330, 6968, 12, 2890, 16, 1562, 3183, 5014, 16, 24970, 6968, 774, 11620, 16, 1440, 1621, 33, 7036, 262, 30, 3536, 17320, 293, 22797, 364, 326, 864, 3837, 3183, 16, 333, 353, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 52, 330, 6968, 12, 2890, 16, 1562, 3183, 5014, 16, 24970, 6968, 774, 11620, 16, 1440, 1621, 33, 7036, 262, 30, 3536, 17320, 293, 22797, 364, 326, 864, 3837, 3183, 16, 333, 353, 2...
rsync_filenames_client += "tcos_share/%s " %( os.path.basename(filename) ) rsync_filenames_server += "%s " %( filename )
rsync_filenames_client += "tcos_share/%s " %( os.path.basename(filename).replace(" ", "\ ") ) rsync_filenames_server += "%s " %( filename.replace(" ", "\ ") )
def menu_event_all(self, action): start1=time() allclients=self.main.localdata.allclients allclients_txt="" for client in allclients: allclients_txt+="\n %s" %(client) if len(self.main.localdata.allclients) == 0: shared.info_msg ( _("No clients connected, press refresh button.") ) return if action == 0: # Ask for reboot msg=_( _("Do you want to reboot the following hosts:%s?" ) \ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "reboot" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "reboot" ) return if action == 1: # Ask for poweroff msg=_( _("Do you want to poweroff the following hosts:%s?" )\ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "poweroff" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "poweroff" ) return if action == 2: # Ask for lock screens msg=_( _("Do you want to lock the following screens:%s?" )\ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "lockscreen" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "lockscreen" ) return if action == 3: # Ask for unlock screens msg=_( _("Do you want to unlock the following screens:%s?" )\ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "unlockscreen" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "unlockscreen" ) return if action == 4: shared.info_msg ( "FIXME" ) print "LOGOUT FIXME" """ # Ask for unlock screens msg=_( _("Do you want to unlock the following screens:%s?" ) %(allclients_txt) ) if shared.ask_msg ( msg ): self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.main.xmlrpc.action_for_clients, allclients, "unlockscreen" ) return """ if action == 5: # Ask for restart X session msg=_( _("Do you want to restart X screens:%s?" )\ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "restartx" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "restartx" ) return if action == 6: connected_users=[] for client in allclients: if self.main.localdata.IsLogged(client): connected_users.append(self.main.localdata.GetUsernameAndHost(client)) print_debug("menu_event_all() client=%s username=%s" %(client, connected_users[-1]) ) self.askfor(mode="exec", users=connected_users) if action == 7: connected_users=[] for client in allclients: if self.main.localdata.IsLogged(client): connected_users.append(self.main.localdata.GetUsernameAndHost(client)) print_debug("menu_event_all() client=%s username=%s" %(client, connected_users[-1]) ) self.askfor(mode="mess", users=connected_users) if action == 8: # demo mode # search for connected users connected_users=[] for client in allclients: if self.main.localdata.IsLogged(client): connected_users.append(self.main.localdata.GetUsernameAndHost(client)) print_debug("menu_event_all() client=%s username=%s" %(client, connected_users[-1]) ) # start x11vnc in local self.main.exe_cmd("x11vnc -shared -noshm -viewonly -forever") # need to wait for start, PingPort loop from ping import PingPort status = "CLOSED" while status != "OPEN": status=PingPort("127.0.0.1",5900).get_status() if status == "CLOSED": sleep(1) # get vncviewer version # vncviewer --version 2>&1|grep built version=self.main.localdata.exe_cmd("vncviewer --version 2>&1| grep built", verbose=0) if "4.1" in version: args="-ViewOnly -FullScreen" elif "3.3" in version: args="-viewonly -fullscreen" else: args="" # exec this app for user in connected_users: if user.find(":") != -1: # we have a standalone user... usern, ip = user.split(":") self.main.xmlrpc.newhost(ip) server=self.main.xmlrpc.GetStandalone("get_server") standalone_cmd="vncviewer %s %s" %(server, args) self.main.xmlrpc.DBus("exec", standalone_cmd ) connected_users.remove(user) remote_cmd="vncviewer 127.0.0.1 %s" %(args) result = self.main.dbus_action.do_exec( connected_users , remote_cmd ) if not result: shared.error_msg ( _("Error while exec remote app:\nReason: %s") %( self.main.dbus_action.get_error_msg() ) ) self.main.write_into_statusbar( _("Running in demo mode.") ) if action == 9: connected_users=[] for client in allclients: if self.main.localdata.IsLogged(client): connected_users.append(self.main.localdata.GetUsernameAndHost(client)) for user in connected_users: if user.find(":") != -1: # we have a standalone user... usern, ip = user.split(":") self.main.xmlrpc.newhost(ip) self.main.xmlrpc.DBus("killall", "vncviewer" ) connected_users.remove(user) result = self.main.dbus_action.do_killall( connected_users , "vncviewer" ) # kill my x11vnc server self.main.exe_cmd("killall x11vnc") self.main.write_into_statusbar( _("Demo mode off.") ) if action == 10: # capture screenshot of all and show minis # Ask for unlock screens self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "screenshot" )
4f60148a6b13d1d26b8eb734c605d0156a49db1b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13520/4f60148a6b13d1d26b8eb734c605d0156a49db1b/TcosActions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 454, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 777, 16931, 33, 2890, 18, 5254, 18, 3729, 892, 18, 454, 16931, 777, 16931, 67, 5830, 1546, 6, 364, 1004, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 454, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 777, 16931, 33, 2890, 18, 5254, 18, 3729, 892, 18, 454, 16931, 777, 16931, 67, 5830, 1546, 6, 364, 1004, 31...
self.debug_trace("Tag_sint32")
def Tag_sint32(self): self.debug_trace("Tag_sint32") if ( self.getTag( 'sint32' ) ): self.pack_string = 'l' return 1 return 0
ecf78c969222f7513a2f516b0355728295fb546a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/ecf78c969222f7513a2f516b0355728295fb546a/pxlasm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4034, 67, 87, 474, 1578, 12, 2890, 4672, 309, 261, 365, 18, 588, 1805, 12, 296, 87, 474, 1578, 11, 262, 262, 30, 365, 18, 2920, 67, 1080, 273, 296, 80, 11, 327, 404, 327, 374, 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, 4034, 67, 87, 474, 1578, 12, 2890, 4672, 309, 261, 365, 18, 588, 1805, 12, 296, 87, 474, 1578, 11, 262, 262, 30, 365, 18, 2920, 67, 1080, 273, 296, 80, 11, 327, 404, 327, 374, 2, ...
char = self.queue.pop(0)
char = self.queue.popleft()
def char(self): """ Read one character from the stream or queue if available. Return EOF when EOF is reached. """ if not self.queue: self.readChunk() #If we still don't have a character we have reached EOF if not self.queue: return EOF char = self.queue.pop(0) # update position in stream if char == '\n': self.lineLengths.append(self.col) self.line += 1 self.col = 0 else: self.col += 1 return char
e59f8e67926398c5e4b75acbcce4e9410bc02e00 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4487/e59f8e67926398c5e4b75acbcce4e9410bc02e00/inputstream.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1149, 12, 2890, 4672, 3536, 2720, 1245, 3351, 628, 326, 1407, 578, 2389, 309, 2319, 18, 2000, 6431, 1347, 6431, 353, 8675, 18, 3536, 309, 486, 365, 18, 4000, 30, 365, 18, 896, 5579, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1149, 12, 2890, 4672, 3536, 2720, 1245, 3351, 628, 326, 1407, 578, 2389, 309, 2319, 18, 2000, 6431, 1347, 6431, 353, 8675, 18, 3536, 309, 486, 365, 18, 4000, 30, 365, 18, 896, 5579, 14...
return '[Errno %d] %s: %s' % (self.errno, self.strerror,
return '[Errno %s] %s: %s' % (self.errno, self.strerror,
def __str__(self): if self.filename: return '[Errno %d] %s: %s' % (self.errno, self.strerror, self.filename) elif self.errno and self.strerror: return '[Errno %d] %s' % (self.errno, self.strerror) else: return StandardError.__str__(self)
b1acd93f9887529c69ed3ebf22cdd791e429fcf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b1acd93f9887529c69ed3ebf22cdd791e429fcf2/exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 365, 18, 3459, 30, 327, 5271, 2524, 2135, 738, 87, 65, 738, 87, 30, 738, 87, 11, 738, 261, 2890, 18, 19088, 16, 365, 18, 701, 1636, 16, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 365, 18, 3459, 30, 327, 5271, 2524, 2135, 738, 87, 65, 738, 87, 30, 738, 87, 11, 738, 261, 2890, 18, 19088, 16, 365, 18, 701, 1636, 16, 365, 18...
to_pick.append((move.from_location.id, needed_qty))
to_pick.append((move.from_location, needed_qty))
def pick_product(self, cursor, user, move, location_quantities, context=None): """ Pick the product across the location. Naive (fast) implementation. :param move is a browse record with the product and the quantity to pick. :param location_quantities a list of tuple (location, available_qty) where location is a browse record. """ to_pick = [] needed_qty = move.quantity for location, available_qty in location_quantities.iteritems(): # Ignore available_qty when too small if available_qty < move.uom.rounding: continue if needed_qty <= available_qty: to_pick.append((location, needed_qty)) return to_pick else: to_pick.append((location, available_qty)) needed_qty -= available_qty # Force assignation for consumables: if move.product.type == "consumable": to_pick.append((move.from_location.id, needed_qty)) return to_pick return None
47ef607b6c05217b1b0ff34454ce38e40f76fc2d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9298/47ef607b6c05217b1b0ff34454ce38e40f76fc2d/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3635, 16, 2117, 67, 17753, 1961, 16, 819, 33, 7036, 4672, 3536, 23038, 326, 3017, 10279, 326, 2117, 18, 16350, 688, 261, 8076, 13, 4471...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3635, 16, 2117, 67, 17753, 1961, 16, 819, 33, 7036, 4672, 3536, 23038, 326, 3017, 10279, 326, 2117, 18, 16350, 688, 261, 8076, 13, 4471...
address = "https://bugs.launchpad.net/bugs/%s" % url[0][4:]
address = "https://bugs.launchpad.net/bugs/%s" % re.sub(r'[^0-9]+', '', url[0])
def on_vte_button_press (self, term, event): # Left mouse button + Ctrl while over a link should open it mask = gtk.gdk.CONTROL_MASK if (event.state & mask) == mask: if event.button == 1: url = self._vte.match_check (int (event.x / self._vte.get_char_width ()), int (event.y / self._vte.get_char_height ())) if url: if (url[0][0:7] != "mailto:") & (url[1] == self.matches['email']): address = "mailto:" + url[0] elif url[1] == self.matches['launchpad']: address = "https://bugs.launchpad.net/bugs/%s" % url[0][4:] else: address = url[0] self.openurl ( address ) return False
a551fc2becf66bf0d4fd22d08f3c4d16fd2a9abb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1032/a551fc2becf66bf0d4fd22d08f3c4d16fd2a9abb/terminatorterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 90, 736, 67, 5391, 67, 1028, 261, 2890, 16, 2481, 16, 871, 4672, 468, 13338, 7644, 3568, 397, 30715, 1323, 1879, 279, 1692, 1410, 1696, 518, 3066, 273, 22718, 18, 75, 2883, 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, 603, 67, 90, 736, 67, 5391, 67, 1028, 261, 2890, 16, 2481, 16, 871, 4672, 468, 13338, 7644, 3568, 397, 30715, 1323, 1879, 279, 1692, 1410, 1696, 518, 3066, 273, 22718, 18, 75, 2883, 18...
def SR(n=1,r=1,c=1,e=4, star=False, **kwargs):
def SR(n=1, r=1, c=1, e=4, star=False, **kwargs):
def SR(n=1,r=1,c=1,e=4, star=False, **kwargs): """ Return a small scale variant of the AES polynomial system constructor subject to the following conditions: INPUT: n -- the number of rounds (default: 1) r -- the number of rows in the state array (default: 1) c -- the number of columns in the state array (default: 1) e -- the exponent of the finite extension field (default: 4) star -- determines if SR* or SR should be constructed (default: False) aes_mode -- as the SR key schedule specification differs slightly from the AES key schedule this parameter controls which schedule to use (default: True) gf2 -- generate polynomial systems over $\GF(2)$ rather than over $\GF(2^n)$ (default: False) order -- a string to specify the term ordering of the variables postfix -- a string which is appended after the variable name (default: '') allow_zero_inversions -- a boolean to controll whether zero inversions raise an exception (default: False) correct_only -- only include correct inversion polynomials (default: False, GF2 only) biaffine_only -- only include bilinear and biaffine inversion polynomials (default: True, GF2 only) EXAMPLES: sage: sr = mq.SR(1,1,1,4) sage: ShiftRows = sr.shift_rows_matrix() sage: MixColumns = sr.mix_columns_matrix() sage: Lin = sr.lin_matrix() sage: M = MixColumns * ShiftRows * Lin sage: print sr.hex_str_matrix(M) 5 1 C 5 2 2 1 F A 4 4 1 1 8 3 3 sage: sr = mq.SR(1,2,1,4) sage: ShiftRows = sr.shift_rows_matrix() sage: MixColumns = sr.mix_columns_matrix() sage: Lin = sr.lin_matrix() sage: M = MixColumns * ShiftRows * Lin sage: print sr.hex_str_matrix(M) F 3 7 F A 2 B A A A 5 6 8 8 4 9 7 8 8 2 D C C 3 4 6 C C 5 E F F A 2 B A F 3 7 F 8 8 4 9 A A 5 6 D C C 3 7 8 8 2 5 E F F 4 6 C C sage: sr = mq.SR(1,2,2,4) sage: ShiftRows = sr.shift_rows_matrix() sage: MixColumns = sr.mix_columns_matrix() sage: Lin = sr.lin_matrix() sage: M = MixColumns * ShiftRows * Lin sage: print sr.hex_str_matrix(M) F 3 7 F 0 0 0 0 0 0 0 0 A 2 B A A A 5 6 0 0 0 0 0 0 0 0 8 8 4 9 7 8 8 2 0 0 0 0 0 0 0 0 D C C 3 4 6 C C 0 0 0 0 0 0 0 0 5 E F F A 2 B A 0 0 0 0 0 0 0 0 F 3 7 F 8 8 4 9 0 0 0 0 0 0 0 0 A A 5 6 D C C 3 0 0 0 0 0 0 0 0 7 8 8 2 5 E F F 0 0 0 0 0 0 0 0 4 6 C C 0 0 0 0 A 2 B A F 3 7 F 0 0 0 0 0 0 0 0 8 8 4 9 A A 5 6 0 0 0 0 0 0 0 0 D C C 3 7 8 8 2 0 0 0 0 0 0 0 0 5 E F F 4 6 C C 0 0 0 0 0 0 0 0 F 3 7 F A 2 B A 0 0 0 0 0 0 0 0 A A 5 6 8 8 4 9 0 0 0 0 0 0 0 0 7 8 8 2 D C C 3 0 0 0 0 0 0 0 0 4 6 C C 5 E F F 0 0 0 0 """ if not kwargs.get("gf2",False): return SR_gf2n(n,r,c,e,star,**kwargs) else: return SR_gf2(n,r,c,e,star,**kwargs)
26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19145, 12, 82, 33, 21, 16, 436, 33, 21, 16, 276, 33, 21, 16, 425, 33, 24, 16, 10443, 33, 8381, 16, 2826, 4333, 4672, 3536, 2000, 279, 5264, 3159, 5437, 434, 326, 15986, 16991, 2619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19145, 12, 82, 33, 21, 16, 436, 33, 21, 16, 276, 33, 21, 16, 425, 33, 24, 16, 10443, 33, 8381, 16, 2826, 4333, 4672, 3536, 2000, 279, 5264, 3159, 5437, 434, 326, 15986, 16991, 2619, ...
bp = bdb.Breakpoint.bpbynumber[bpnum]
try: bp = bdb.Breakpoint.bpbynumber[bpnum] except IndexError: print >>self.stdout, 'Breakpoint index %r is not valid' % args[0] return
def do_ignore(self,arg): """arg is bp number followed by ignore count.""" args = arg.split() try: bpnum = int(args[0].strip()) except ValueError: # something went wrong print >>self.stdout, \ 'Breakpoint index %r is not a number' % args[0] return try: count = int(args[1].strip()) except: count = 0 bp = bdb.Breakpoint.bpbynumber[bpnum] if bp: bp.ignore = count if count > 0: reply = 'Will ignore next ' if count > 1: reply = reply + '%d crossings' % count else: reply = reply + '1 crossing' print >>self.stdout, reply + ' of breakpoint %d.' % bpnum else: print >>self.stdout, 'Will stop next time breakpoint', print >>self.stdout, bpnum, 'is reached.'
ca630b08b7cf37de7550b62e359d8fe18b5bf094 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/ca630b08b7cf37de7550b62e359d8fe18b5bf094/pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6185, 12, 2890, 16, 3175, 4672, 3536, 3175, 353, 9107, 1300, 10860, 635, 2305, 1056, 12123, 833, 273, 1501, 18, 4939, 1435, 775, 30, 9107, 2107, 273, 509, 12, 1968, 63, 20, 80...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 6185, 12, 2890, 16, 3175, 4672, 3536, 3175, 353, 9107, 1300, 10860, 635, 2305, 1056, 12123, 833, 273, 1501, 18, 4939, 1435, 775, 30, 9107, 2107, 273, 509, 12, 1968, 63, 20, 80...
active= fields.Boolean('Active',) description= fields.Text('Description',)
active = fields.Boolean('Active',) description = fields.Text('Description',)
def on_change_with_unique_name(self, cursor, user, vals, context=None): if vals.get('title'): if not vals.get('unique_name'): vals['unique_name'] = slugify(vals['title']) return vals['unique_name']
cf86e7bebe414008530c7f832e51325ec2785dc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2593/cf86e7bebe414008530c7f832e51325ec2785dc7/cms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 1918, 67, 6270, 67, 529, 12, 2890, 16, 3347, 16, 729, 16, 5773, 16, 819, 33, 7036, 4672, 309, 5773, 18, 588, 2668, 2649, 11, 4672, 309, 486, 5773, 18, 588, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 1918, 67, 6270, 67, 529, 12, 2890, 16, 3347, 16, 729, 16, 5773, 16, 819, 33, 7036, 4672, 309, 5773, 18, 588, 2668, 2649, 11, 4672, 309, 486, 5773, 18, 588, 2668, ...
def _show_toggle(self, action, state): action.handler_block_by_func(self.do_toggle_format_action) action.set_active(state) action.handler_unblock_by_func(self.do_toggle_format_action)
def do_textstyle_changed(self, buffer, style): # set statusbar #~ print '>>> SET STYLE', style if style: label = style.title() else: label = 'None' self.ui.mainwindow.statusbar_style_label.set_text(label)
b3a1b67f94056d4d4df201cc4b919b3fa4f79ed5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4103/b3a1b67f94056d4d4df201cc4b919b3fa4f79ed5/pageview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 955, 4060, 67, 6703, 12, 2890, 16, 1613, 16, 2154, 4672, 468, 444, 1267, 3215, 468, 98, 1172, 296, 23012, 7855, 27449, 2187, 2154, 309, 2154, 30, 1433, 273, 2154, 18, 2649, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 955, 4060, 67, 6703, 12, 2890, 16, 1613, 16, 2154, 4672, 468, 444, 1267, 3215, 468, 98, 1172, 296, 23012, 7855, 27449, 2187, 2154, 309, 2154, 30, 1433, 273, 2154, 18, 2649, 14...
name = 'depart_' + self.__class__.__name__ method = getattr(visitor, name, visitor.unknown_departure) visitor.document.reporter.debug( name, category='nodes.Node.walkabout') method(self)
visitor.document.reporter.debug(self.__class__.__name__, category='nodes.Node.walkabout') visitor.dispatch_depart(self, self.__class__.__name__)
def walkabout(self, visitor): """ Perform a tree traversal similarly to `Node.walk()` (which see), except also call ``depart_...`` methods before exiting each node. If there is no ``depart_particular_node`` method for a node of type ``particular_node``, the ``unknown_departure`` method is called.
ee861d2a4079770aca2185bdbdcaed8b2eb1ee2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/ee861d2a4079770aca2185bdbdcaed8b2eb1ee2a/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 21071, 12, 2890, 16, 8000, 4672, 3536, 11217, 279, 2151, 15940, 7281, 715, 358, 1375, 907, 18, 11348, 20338, 261, 12784, 2621, 3631, 1335, 2546, 745, 12176, 323, 2680, 67, 2777, 1033...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 21071, 12, 2890, 16, 8000, 4672, 3536, 11217, 279, 2151, 15940, 7281, 715, 358, 1375, 907, 18, 11348, 20338, 261, 12784, 2621, 3631, 1335, 2546, 745, 12176, 323, 2680, 67, 2777, 1033...
patchname = [t for t in repo.nodetags(binnode) if t.endswith('.patch') or t.endswith('.diff')] if patchname: patchname = patchname[0] elif total > 1: patchname = cmdutil.make_filename(repo, '%b-%n.patch', binnode, idx, total) else: patchname = cmdutil.make_filename(repo, '%b.patch', binnode)
if not patchname: patchtags = [t for t in repo.nodetags(binnode) if t.endswith('.patch') or t.endswith('.diff')] if patchtags: patchname = patchtags[0] elif total > 1: patchname = cmdutil.make_filename(repo, '%b-%n.patch', binnode, idx, total) else: patchname = cmdutil.make_filename(repo, '%b.patch', binnode)
def makepatch(patch, idx, total): desc = [] node = None body = '' for line in patch: if line.startswith('#'): if line.startswith('# Node ID'): node = line.split()[-1] continue if line.startswith('diff -r') or line.startswith('diff --git'): break desc.append(line) if not node: raise ValueError
5f8789270dde0ad495a09fe99904cd9d88a6585b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/5f8789270dde0ad495a09fe99904cd9d88a6585b/patchbomb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 881, 505, 12, 2272, 16, 2067, 16, 2078, 4672, 3044, 273, 5378, 756, 273, 599, 1417, 273, 875, 364, 980, 316, 4729, 30, 309, 980, 18, 17514, 1918, 2668, 10038, 4672, 309, 980, 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, 29796, 881, 505, 12, 2272, 16, 2067, 16, 2078, 4672, 3044, 273, 5378, 756, 273, 599, 1417, 273, 875, 364, 980, 316, 4729, 30, 309, 980, 18, 17514, 1918, 2668, 10038, 4672, 309, 980, 18...
yield "<h2>No build log available</h2>\n"
yield "<h2>No build log available</h2>"
def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail"""
6f759d61aa9f4714f83d32476fcc23e0c846d5e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/6f759d61aa9f4714f83d32476fcc23e0c846d5e7/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 3399, 2890, 16, 2151, 16, 1479, 16, 5274, 16, 5588, 16, 7351, 67, 10011, 33, 8381, 4672, 3536, 1945, 1245, 1361, 316, 7664, 8395, 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, 1743, 12, 2890, 16, 3399, 2890, 16, 2151, 16, 1479, 16, 5274, 16, 5588, 16, 7351, 67, 10011, 33, 8381, 4672, 3536, 1945, 1245, 1361, 316, 7664, 8395, 2, -100, -100, -100, -100, -100, -...
import pdb; pdb.set_trace()
def validate_authorization_setup(): # since some of the authz config mgmt is taking place in DB, this should # be validated on launch. it is a bit like a lazy migration, but seems # sensible to make sure authz is always correct. import pdb; pdb.set_trace() setup_default_user_roles(System()) # setup all role-actions # context is blank as not currently used # Note that Role.ADMIN can already do anything - hardcoded in. for role, action in default_role_actions: ra = Session.query(RoleAction).filter_by(role=role, action=action).first() if ra is not None: continue ra = RoleAction(role=role, context=u'', action=action) Session.add(ra) Session.commit() Session.remove()
6ae3ccb5975832f2b7597b9a21b2780de3bb7edb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/6ae3ccb5975832f2b7597b9a21b2780de3bb7edb/authz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 12218, 67, 8401, 13332, 468, 3241, 2690, 434, 326, 18686, 642, 29919, 353, 13763, 3166, 316, 2383, 16, 333, 1410, 468, 506, 10266, 603, 8037, 18, 518, 353, 279, 2831, 3007, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 12218, 67, 8401, 13332, 468, 3241, 2690, 434, 326, 18686, 642, 29919, 353, 13763, 3166, 316, 2383, 16, 333, 1410, 468, 506, 10266, 603, 8037, 18, 518, 353, 279, 2831, 3007, 279...
ma = self.link_desc_re.match(args) desc = None desc_format = True if ma: if ma.group('simple_text'): desc = ma.group('simple_text') desc = wikiutil.escape(desc) desc = self.formatter.text(desc) elif ma.group('transclude'): groupdict = ma.groupdict() if groupdict.get('transclude_args') is None: groupdict['transclude_args'] = target desc = ma.group('transclude') desc = self._transclude_repl(desc, groupdict) desc_format = False
def _link_repl(self, word, groups): """Handle [[target|text]] links.""" target = groups.get('link_target', '') args = (groups.get('link_args', '') or '').strip() mt = self.link_target_re.match(target) ma = self.link_desc_re.match(args) desc = None desc_format = True # run desc through text formatter? if ma: if ma.group('simple_text'): desc = ma.group('simple_text') desc = wikiutil.escape(desc) desc = self.formatter.text(desc) elif ma.group('transclude'): groupdict = ma.groupdict() if groupdict.get('transclude_args') is None: # if transcluded obj (image) has no description, use target for it groupdict['transclude_args'] = target desc = ma.group('transclude') desc = self._transclude_repl(desc, groupdict) desc_format = False if mt: if mt.group('page_name'): page_name = mt.group('page_name') # handle relative links if page_name.startswith(self.CHILD_PREFIX): page_name = self.formatter.page.page_name + '/' + page_name[self.CHILD_PREFIX_LEN:] # XXX use func # handle anchors try: page_name, anchor = page_name.split("#", 1) except ValueError: anchor = "" if not page_name: page_name = self.formatter.page.page_name if not desc: desc = self.formatter.text(page_name) return (self.formatter.pagelink(1, page_name, anchor=anchor) + desc + self.formatter.pagelink(0, page_name))
3813c6ae295fcf8c1e1b489285fe598adbd4593a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/3813c6ae295fcf8c1e1b489285fe598adbd4593a/text_moin_wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1232, 67, 26745, 12, 2890, 16, 2076, 16, 3252, 4672, 3536, 3259, 12167, 3299, 96, 955, 13563, 4716, 12123, 1018, 273, 3252, 18, 588, 2668, 1232, 67, 3299, 2187, 28707, 833, 273, 261...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1232, 67, 26745, 12, 2890, 16, 2076, 16, 3252, 4672, 3536, 3259, 12167, 3299, 96, 955, 13563, 4716, 12123, 1018, 273, 3252, 18, 588, 2668, 1232, 67, 3299, 2187, 28707, 833, 273, 261...
expr = 'const platform="%s"; const libdir="%s";'%(sys.platform, libdir_var) cmd = '%s -j -e \'%s\' -f %s -f %s'%( JS, expr, os.path.join(lib_dir, 'prolog.js'), path) return cmd
expr = "const platform=%r; const libdir=%r;"%(sys.platform, libdir_var) return [ JS, '-j', '-e', expr, '-f', os.path.join(lib_dir, 'prolog.js'), '-f', path ]
def get_test_cmd(path, lib_dir): libdir_var = lib_dir if not libdir_var.endswith('/'): libdir_var += '/' expr = 'const platform="%s"; const libdir="%s";'%(sys.platform, libdir_var) cmd = '%s -j -e \'%s\' -f %s -f %s'%( JS, expr, os.path.join(lib_dir, 'prolog.js'), path) return cmd
0e254a9229217bfef23a879d72111a9f32d13f33 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/0e254a9229217bfef23a879d72111a9f32d13f33/trace-test-py2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3813, 67, 4172, 12, 803, 16, 2561, 67, 1214, 4672, 2561, 1214, 67, 1401, 273, 2561, 67, 1214, 309, 486, 2561, 1214, 67, 1401, 18, 5839, 1918, 2668, 2473, 4672, 2561, 1214, 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, 336, 67, 3813, 67, 4172, 12, 803, 16, 2561, 67, 1214, 4672, 2561, 1214, 67, 1401, 273, 2561, 67, 1214, 309, 486, 2561, 1214, 67, 1401, 18, 5839, 1918, 2668, 2473, 4672, 2561, 1214, 67,...
result = util.deferredResult(onData) self.assertEquals(result, WritingProtocol.byte)
return onData.addCallback(lambda result: self.assertEquals(result, WritingProtocol.byte))
def testVerification(self): clientDN = sslverify.DistinguishedName(commonName='client') clientKey = sslverify.KeyPair.generate() clientCertReq = clientKey.certificateRequest(clientDN)
6305a011c61d2e3075143d6d1aac62b453e35f67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8962/6305a011c61d2e3075143d6d1aac62b453e35f67/test_sslverify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13483, 12, 2890, 4672, 1004, 8609, 273, 5832, 8705, 18, 5133, 14344, 5992, 461, 12, 6054, 461, 2218, 2625, 6134, 1004, 653, 273, 5832, 8705, 18, 15099, 18, 7163, 1435, 1004, 5461, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 13483, 12, 2890, 4672, 1004, 8609, 273, 5832, 8705, 18, 5133, 14344, 5992, 461, 12, 6054, 461, 2218, 2625, 6134, 1004, 653, 273, 5832, 8705, 18, 15099, 18, 7163, 1435, 1004, 5461, ...
if not fastsync: self.run('sync; sync', timeout=timeout, ignore_status=True)
self.run('sync; sync', timeout=timeout, ignore_status=True)
def reboot(): self.record("GOOD", None, "reboot.start") try: # sync before starting the reboot, so that a long sync during # shutdown isn't timed out by wait_down's short timeout if not fastsync: self.run('sync; sync', timeout=timeout, ignore_status=True)
4e8ff94992313dfa3d29b62c8111ce235ccb698c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/4e8ff94992313dfa3d29b62c8111ce235ccb698c/remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22852, 13332, 365, 18, 3366, 2932, 16387, 1212, 3113, 599, 16, 315, 266, 7137, 18, 1937, 7923, 775, 30, 468, 3792, 1865, 5023, 326, 22852, 16, 1427, 716, 279, 1525, 3792, 4982, 468, 5731...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22852, 13332, 365, 18, 3366, 2932, 16387, 1212, 3113, 599, 16, 315, 266, 7137, 18, 1937, 7923, 775, 30, 468, 3792, 1865, 5023, 326, 22852, 16, 1427, 716, 279, 1525, 3792, 4982, 468, 5731...
def __init__(self, version, factory, stream):
def __init__(self, mem, factory, stream): self._mem = mem self._factory = factory self._stream = stream
def __init__(self, version, factory, stream): # Start on alphabet 0 self._cur_alph = 0 self._prev_alph = 0
c18a8b409fc4c526f30784247fcbed4c333707ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2052/c18a8b409fc4c526f30784247fcbed4c333707ad/zstring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1663, 16, 3272, 16, 1407, 4672, 365, 6315, 3917, 273, 1663, 365, 6315, 6848, 273, 3272, 365, 6315, 3256, 273, 1407, 225, 468, 3603, 603, 10877, 374, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1663, 16, 3272, 16, 1407, 4672, 365, 6315, 3917, 273, 1663, 365, 6315, 6848, 273, 3272, 365, 6315, 3256, 273, 1407, 225, 468, 3603, 603, 10877, 374, 365, ...
except:
except Exception, e:
def attemptOpen(self, buffer): url = buffer.url assert self.dprint("Trying to open url: %s" % repr(unicode(url))) try: import peppy.hsi.hsi_major_mode format = HyperspectralFileFormat.identify(url) if format: assert self.dprint("found %s" % repr(format)) return (None, [peppy.hsi.hsi_major_mode.HSIMode]) except: dprint("FAILED Loading hsi_major_mode") raise return (None, [])
5b02ccb9f86313f2de81f97c356047a3af5770db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/5b02ccb9f86313f2de81f97c356047a3af5770db/hsi_major_mode_proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4395, 3678, 12, 2890, 16, 1613, 4672, 880, 273, 1613, 18, 718, 1815, 365, 18, 72, 1188, 2932, 18038, 358, 1696, 880, 30, 738, 87, 6, 738, 8480, 12, 9124, 12, 718, 20349, 775, 30, 193...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4395, 3678, 12, 2890, 16, 1613, 4672, 880, 273, 1613, 18, 718, 1815, 365, 18, 72, 1188, 2932, 18038, 358, 1696, 880, 30, 738, 87, 6, 738, 8480, 12, 9124, 12, 718, 20349, 775, 30, 193...
valuedoc = ValueDoc(repr=ast_to_string(rhs))
valuedoc = ValueDoc(ast=rhs)
def process_simple_assignment(self, comments, lhs, rhs, nl_comment, pseudo_docstring): """ The statement handler for assignment statements whose left-hand side is a single identifier. The behavior of this handler depends on the contents of the assignment statement and the context:
1fb4c317bfd16a777415b4874c4c8db19e81beff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/1fb4c317bfd16a777415b4874c4c8db19e81beff/docparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 9647, 67, 12960, 12, 2890, 16, 5678, 16, 8499, 16, 7711, 16, 7741, 67, 3469, 16, 12454, 67, 24675, 4672, 3536, 1021, 3021, 1838, 364, 6661, 6317, 8272, 2002, 17, 2349, 4889, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 9647, 67, 12960, 12, 2890, 16, 5678, 16, 8499, 16, 7711, 16, 7741, 67, 3469, 16, 12454, 67, 24675, 4672, 3536, 1021, 3021, 1838, 364, 6661, 6317, 8272, 2002, 17, 2349, 4889, ...
self.config= dict (block_size=4096).update (config)
logger.debug (config) self.config= dict (block_size=4096) self.config.update (config) logger.debug (self.config)
def __init__ (self, config, events, params): register= params['register'] register (events.PUBLIC_MESSAGE, self.message) self.config= dict (block_size=4096).update (config) self.titleFound= False self.magic= magic.open (magic.MAGIC_MIME) self.magic.load ()
9c87ef6054f0714f972abae8c4823c608178e315 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5759/9c87ef6054f0714f972abae8c4823c608178e315/url.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 642, 16, 2641, 16, 859, 4672, 1744, 33, 859, 3292, 4861, 3546, 1744, 261, 5989, 18, 14939, 67, 8723, 16, 365, 18, 2150, 13, 1194, 18, 4148, 261, 1425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 16, 642, 16, 2641, 16, 859, 4672, 1744, 33, 859, 3292, 4861, 3546, 1744, 261, 5989, 18, 14939, 67, 8723, 16, 365, 18, 2150, 13, 1194, 18, 4148, 261, 1425, ...
if self:
if self and self.HelpBar:
def RefreshStatusBar(self): if self: selected = self.FileOpened.GetSelection() if selected >= 0: window = self.FileOpened.GetPage(selected) selection = window.GetSelection() if selection: index, subIndex = selection if self.Manager.IsCurrentEntry(index): self.HelpBar.SetStatusText("Index: 0x%04X"%index, 0) self.HelpBar.SetStatusText("Subindex: 0x%02X"%subIndex, 1) entryinfos = self.Manager.GetEntryInfos(index) name = entryinfos["name"] category = "Optional" if entryinfos["need"]: category = "Mandatory" struct = "VAR" number = "" if entryinfos["struct"] & OD_IdenticalIndexes: number = " possibly defined %d times"%entryinfos["nbmax"] if entryinfos["struct"] & OD_IdenticalSubindexes: struct = "REC" elif entryinfos["struct"] & OD_MultipleSubindexes: struct = "ARRAY" text = "%s: %s entry of struct %s%s."%(name,category,struct,number) self.HelpBar.SetStatusText(text, 2) else: for i in xrange(3): self.HelpBar.SetStatusText("", i) else: for i in xrange(3): self.HelpBar.SetStatusText("", i)
97bd016b2fd380629fdf0b9a1632ac25224b7b2b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/116/97bd016b2fd380629fdf0b9a1632ac25224b7b2b/objdictedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14179, 1482, 5190, 12, 2890, 4672, 309, 365, 471, 365, 18, 6696, 5190, 30, 3170, 273, 365, 18, 812, 23115, 18, 967, 6233, 1435, 309, 3170, 1545, 374, 30, 2742, 273, 365, 18, 812, 23115...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14179, 1482, 5190, 12, 2890, 4672, 309, 365, 471, 365, 18, 6696, 5190, 30, 3170, 273, 365, 18, 812, 23115, 18, 967, 6233, 1435, 309, 3170, 1545, 374, 30, 2742, 273, 365, 18, 812, 23115...
if o is not None and o.base == "Reference": return True
if o is not None: return o.isReference
def _get_isReference(self): o = self.model.getObjectByName(self.type) if o is not None and o.base == "Reference": return True return False
da66d430c0acc35d155af13f1e3e3c04f787efd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1844/da66d430c0acc35d155af13f1e3e3c04f787efd7/fu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 291, 2404, 12, 2890, 4672, 320, 273, 365, 18, 2284, 18, 588, 921, 5911, 12, 2890, 18, 723, 13, 309, 320, 353, 486, 599, 30, 327, 320, 18, 291, 2404, 327, 1083, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 291, 2404, 12, 2890, 4672, 320, 273, 365, 18, 2284, 18, 588, 921, 5911, 12, 2890, 18, 723, 13, 309, 320, 353, 486, 599, 30, 327, 320, 18, 291, 2404, 327, 1083, 2, -10...
sage: S == loads(dumps(S)) True
sage: TestSuite(S).run()
def __iter__(self): """ Iterates through the subsets of the multiset ``self._s``. Note that each subset is represented by a list of its elements rather than a set since we can have multiplicities (no multiset data structure yet in sage).
6b51027ab87b59ff42d9298c38dd0800c5b1d7a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/6b51027ab87b59ff42d9298c38dd0800c5b1d7a8/subset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 3536, 3016, 815, 3059, 326, 30760, 434, 326, 22945, 278, 12176, 2890, 6315, 87, 68, 8338, 225, 3609, 716, 1517, 7931, 353, 10584, 635, 279, 666, 434, 209...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 3536, 3016, 815, 3059, 326, 30760, 434, 326, 22945, 278, 12176, 2890, 6315, 87, 68, 8338, 225, 3609, 716, 1517, 7931, 353, 10584, 635, 279, 666, 434, 209...
ans[key] = self.unit_convert(t[key])
val = self.unit_convert(t[key]) if val is not None: ans[key] = val
def block_properties(self, tag_css): ans = {} for key in ('topskip', 'footskip', 'sidemargin'): ans[key] = self.book.defaultBlockStyle.attrs[key] src = [None for i in range(4)] if tag_css.has_key('padding'): msrc = tag_css['padding'].split() for i in range(len(msrc)): src[i] = msrc[i] i = 0 for c in ('top', 'right', 'bottom', 'left'): if tag_css.has_key('padding-'+c): src[i] = tag_css['padding-'+c] i += 1 t = {} t['topskip'], t['footskip'], t['sidemargin'] = src[0], src[2], src[3] for key in ('topskip', 'footskip', 'sidemargin'): if t[key] is not None: ans[key] = self.unit_convert(t[key]) return ans
59de78af3e426f15103f22c601ec33497cdc24b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/59de78af3e426f15103f22c601ec33497cdc24b1/convert_from.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1203, 67, 4738, 12, 2890, 16, 1047, 67, 5212, 4672, 4152, 273, 2618, 364, 498, 316, 7707, 3669, 7457, 2187, 296, 617, 6968, 1834, 2187, 296, 5564, 10107, 11, 4672, 4152, 63, 856, 65, 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, 1203, 67, 4738, 12, 2890, 16, 1047, 67, 5212, 4672, 4152, 273, 2618, 364, 498, 316, 7707, 3669, 7457, 2187, 296, 617, 6968, 1834, 2187, 296, 5564, 10107, 11, 4672, 4152, 63, 856, 65, 2...
if not (task1['severity'] == task2['severity']): if severities.index(task1['severity']) < severities.index(task2['severity']):
if not (task1['importance'] == task2['importance']): if severities.index(task1['importance']) < severities.index(task2['importance']):
def _sort(self, task1, task2): # Status sort: try: statuses = ['Rejected', 'Fix Committed', 'Fix Released', 'Confirmed', 'In Progress', 'Needs Info', 'Unconfirmed'] severities = ['Wishlist', 'Minor', 'Normal', 'Major', 'Critical'] if task1['status'] not in statuses and task2['status'] in statuses: return 1 if task1['status'] in statuses and task2['status'] not in statuses: return -1 if task1['severity'] not in severities and task2['severity'] in severities: return 1 if task1['severity'] in severities and task2['severity'] not in severities: return -1 if not (task1['status'] == task2['status']): if statuses.index(task1['status']) < statuses.index(task2['status']): return -1 return 1 if not (task1['severity'] == task2['severity']): if severities.index(task1['severity']) < severities.index(task2['severity']): return -1 return 1 except: # Launchpad changed again? return 0 return 0
550be4907834c437b05af8a2f41d8662d75467d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3104/550be4907834c437b05af8a2f41d8662d75467d9/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3804, 12, 2890, 16, 1562, 21, 16, 1562, 22, 4672, 468, 2685, 1524, 30, 775, 30, 13516, 282, 273, 10228, 19902, 2187, 296, 8585, 1286, 7948, 2187, 296, 8585, 10819, 72, 2187, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3804, 12, 2890, 16, 1562, 21, 16, 1562, 22, 4672, 468, 2685, 1524, 30, 775, 30, 13516, 282, 273, 10228, 19902, 2187, 296, 8585, 1286, 7948, 2187, 296, 8585, 10819, 72, 2187, 296, ...
self.assert_(isinstance(psutil.process_iter().next(), psutil.Process))
self.assert_(isinstance(next(psutil.process_iter()), psutil.Process))
def test_types(self): sproc = subprocess.Popen(PYTHON, stdout=DEVNULL, stderr=DEVNULL) p = psutil.Process(sproc.pid) self.assert_(isinstance(p.pid, int)) self.assert_(isinstance(p.ppid, int)) self.assert_(isinstance(p.parent, psutil.Process)) self.assert_(isinstance(p.name, str)) self.assert_(isinstance(p.path, str)) self.assert_(isinstance(p.cmdline, list)) self.assert_(isinstance(p.uid, int)) self.assert_(isinstance(p.gid, int)) self.assert_(isinstance(p.create_time, float)) self.assert_(isinstance(p.username, str) or \ isinstance(p.username, type(u''))) if hasattr(p, 'getcwd'): if not POSIX and self.__class__.__name__ != "LimitedUserTestCase": self.assert_(isinstance(p.getcwd(), str)) if not POSIX and self.__class__.__name__ != "LimitedUserTestCase": self.assert_(isinstance(p.get_open_files(), list)) for path in p.get_open_files(): self.assert_(isinstance(path, str) or isinstance(path, type(u''))) if not POSIX and self.__class__.__name__ != "LimitedUserTestCase": self.assert_(isinstance(p.get_connections(), list)) self.assert_(isinstance(p.is_running(), bool)) self.assert_(isinstance(p.get_cpu_times(), tuple)) self.assert_(isinstance(p.get_cpu_times()[0], float)) self.assert_(isinstance(p.get_cpu_times()[1], float)) self.assert_(isinstance(p.get_cpu_percent(), float)) self.assert_(isinstance(p.get_memory_info(), tuple)) self.assert_(isinstance(p.get_memory_info()[0], int)) self.assert_(isinstance(p.get_memory_info()[1], int)) self.assert_(isinstance(p.get_memory_percent(), float)) self.assert_(isinstance(psutil.get_process_list(), list)) self.assert_(isinstance(psutil.get_process_list()[0], psutil.Process)) self.assert_(isinstance(psutil.process_iter(), types.GeneratorType)) self.assert_(isinstance(psutil.process_iter().next(), psutil.Process)) self.assert_(isinstance(psutil.get_pid_list(), list)) self.assert_(isinstance(psutil.get_pid_list()[0], int)) self.assert_(isinstance(psutil.pid_exists(1), bool))
7c397a9e03927d8b5085e42fb287dbdde6e056f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7296/7c397a9e03927d8b5085e42fb287dbdde6e056f2/test_psutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2352, 12, 2890, 4672, 272, 9381, 273, 6652, 18, 52, 3190, 12, 16235, 20131, 16, 3909, 33, 15301, 8560, 16, 4514, 33, 15301, 8560, 13, 293, 273, 27024, 18, 2227, 12, 87, 9381,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2352, 12, 2890, 4672, 272, 9381, 273, 6652, 18, 52, 3190, 12, 16235, 20131, 16, 3909, 33, 15301, 8560, 16, 4514, 33, 15301, 8560, 13, 293, 273, 27024, 18, 2227, 12, 87, 9381,...
class InspiralAnalysisNode(pipeline.CondorDAGNode, pipeline.AnalysisNode):
class InspiralAnalysisNode(pipeline.AnalysisNode, pipeline.CondorDAGNode):
def __init__(self, cp, dax = False): """ @cp: a ConfigParser object from which the options are read. """ exec_name = 'inspinjfind' sections = ['inspinjfind'] extension = 'xml' InspiralAnalysisJob.__init__(self, cp, sections, exec_name, extension, dax) self.add_condor_cmd('getenv', 'True') # overwrite standard log file names self.set_stdout_file('logs/' + exec_name + '-$(cluster)-$(process).out') self.set_stderr_file('logs/' + exec_name + '-$(cluster)-$(process).err')
a1ebb3ed6454d4f4a8100deaa2f286012d72028d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a1ebb3ed6454d4f4a8100deaa2f286012d72028d/inspiral.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3283, 16, 302, 651, 273, 1083, 4672, 3536, 632, 4057, 30, 279, 25076, 733, 628, 1492, 326, 702, 854, 855, 18, 3536, 1196, 67, 529, 273, 296, 267, 22876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3283, 16, 302, 651, 273, 1083, 4672, 3536, 632, 4057, 30, 279, 25076, 733, 628, 1492, 326, 702, 854, 855, 18, 3536, 1196, 67, 529, 273, 296, 267, 22876, ...
working_prec = 2*precision emb = K.embeddings(rings.RealField(working_prec))[0] ai = [emb(a) for a in E.a_invariants()] ER = EllipticCurve(ai) E_pari = ER.pari_curve(prec=working_prec) pt_pari = [pari(emb(self[0])), pari(emb(self[1]))]
working_prec = 2*working_prec if not K is rings.QQ: emb = refine_embedding(emb, working_prec) ai = [emb(a) for a in E.a_invariants()] E_work = EllipticCurve(ai) pt_pari = [pari(emb(self[0])), pari(emb(self[1]))] E_pari = E_work.pari_curve(prec=working_prec)
def elliptic_logarithm(self, embedding=None, precision=100, algorithm='pari'): """ Returns the elliptic logarithm of this elliptic curve point.
5dd4c17a0a9d2570d785b2551f4f0a68bc33b16e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/5dd4c17a0a9d2570d785b2551f4f0a68bc33b16e/ell_point.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 415, 549, 21507, 67, 1330, 31249, 12, 2890, 16, 15853, 33, 7036, 16, 6039, 33, 6625, 16, 4886, 2218, 1065, 77, 11, 4672, 3536, 2860, 326, 415, 549, 21507, 613, 31249, 434, 333, 415, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 415, 549, 21507, 67, 1330, 31249, 12, 2890, 16, 15853, 33, 7036, 16, 6039, 33, 6625, 16, 4886, 2218, 1065, 77, 11, 4672, 3536, 2860, 326, 415, 549, 21507, 613, 31249, 434, 333, 415, 54...
raise ValueError, "No such whiteboard %s in bug %i" % (which,id)
raise ValueError, "No such whiteboard %s in bug %s" % (which,str(id))
def _updatewhiteboard(self,id,text,which,action): '''Update the whiteboard given by 'which' for the given bug. performs the given action (which may be 'append',' prepend', or 'overwrite') using the given text.
47522f2fcbdcd280a8d26f5558821af71a334057 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5050/47522f2fcbdcd280a8d26f5558821af71a334057/bugzilla3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 14739, 3752, 12, 2890, 16, 350, 16, 955, 16, 12784, 16, 1128, 4672, 9163, 1891, 326, 9578, 3752, 864, 635, 296, 12784, 11, 364, 326, 864, 7934, 18, 11199, 326, 864, 1301, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 14739, 3752, 12, 2890, 16, 350, 16, 955, 16, 12784, 16, 1128, 4672, 9163, 1891, 326, 9578, 3752, 864, 635, 296, 12784, 11, 364, 326, 864, 7934, 18, 11199, 326, 864, 1301, 26...
msgid = self._ldap_call(self._l.search_ext,base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit)
msgid = self.search_ext(base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit)
def search_ext_s(self,base,scope,filterstr='(objectClass=*)',attrlist=None,attrsonly=0,serverctrls=None,clientctrls=None,timeout=-1,sizelimit=0): msgid = self._ldap_call(self._l.search_ext,base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit) return self.result(msgid,all=1,timeout=timeout)[1]
af82d58b1248c0a1a5e8bd76f9a29354f71ad12f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4610/af82d58b1248c0a1a5e8bd76f9a29354f71ad12f/ldapobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 408, 67, 87, 12, 2890, 16, 1969, 16, 4887, 16, 2188, 701, 2218, 12, 1612, 797, 33, 12437, 2187, 1747, 1098, 33, 7036, 16, 1747, 816, 715, 33, 20, 16, 3567, 16277, 87, 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, 1623, 67, 408, 67, 87, 12, 2890, 16, 1969, 16, 4887, 16, 2188, 701, 2218, 12, 1612, 797, 33, 12437, 2187, 1747, 1098, 33, 7036, 16, 1747, 816, 715, 33, 20, 16, 3567, 16277, 87, 33, ...
strand_neghbors_to_delete = axisAtom.strand_neighbors() return strand_neghbors_to_delete
strand_neighbors_to_delete = axisAtom.strand_neighbors() return strand_neighbors_to_delete
def _strand_neighbors_to_delete(self, axisAtom): """ Returns a list of strand neighbors of the given axis atom to delete from the original dna being resized (and resizing will result in removing bases/ basepairs from the dna). This method determines whether both the strand neigbors of this axisAtom need to be deleted or is it just a single strand neighbor on a specific Dna ladder needs to be deleted. The latter is the case while resizing a single strand of a Dna. @see: self._remove_bases_from_duplex() where this is called. @see: Dna._strand_neighbors_to_delete() -- overridden here @see: B_Dna_PAM3_SingleStrand._strand_neighbors_to_delete() which overrides this method """ strand_neghbors_to_delete = axisAtom.strand_neighbors() return strand_neghbors_to_delete
dee6c39e55d873dc306ac7bd7785c1f9949de959 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/dee6c39e55d873dc306ac7bd7785c1f9949de959/DnaDuplex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 701, 464, 67, 17549, 67, 869, 67, 3733, 12, 2890, 16, 2654, 3641, 4672, 3536, 2860, 279, 666, 434, 16706, 11003, 434, 326, 864, 2654, 3179, 358, 1430, 628, 326, 2282, 31702, 3832, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 464, 67, 17549, 67, 869, 67, 3733, 12, 2890, 16, 2654, 3641, 4672, 3536, 2860, 279, 666, 434, 16706, 11003, 434, 326, 864, 2654, 3179, 358, 1430, 628, 326, 2282, 31702, 3832, ...
aboutdata = KAboutData("guidance", "guidance", ki18n(programname), version,
aboutdata = KAboutData("userconfig", "userconfig", ki18n(programname), version,
def MakeAboutData(): aboutdata = KAboutData("guidance", "guidance", ki18n(programname), version, ki18n("User and Group Configuration Tool"), KAboutData.License_GPL, ki18n("Copyright (C) 2003-2007 Simon Edwards\n" + "Copyright (C) 2008-2009 by Yuriy Kozlov, Jonathan Thomas, " + "Ralph Janke")) aboutdata.addAuthor(ki18n("Simon Edwards"), ki18n("Developer"), "simon@simonzone.com", "http://www.simonzone.com/software/") aboutdata.addAuthor(ki18n("Sebastian Kügler"), ki18n("Developer"), "sebas@kde.org", "http://vizZzion.org") aboutdata.addAuthor(ki18n("Yuriy Kozlov"), ki18n("Developer"), "yuriy-kozlov@kubuntu.org", "http://www.yktech.us") aboutdata.addAuthor(ki18n("Jonathan Thomas"), ki18n("Developer"), "", "") aboutdata.addAuthor(ki18n("Ralph Janke"), ki18n("Developer"), "", "") return aboutdata
abb9902ffa6118dac35f7d61edf8a0b79b48a32f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1669/abb9902ffa6118dac35f7d61edf8a0b79b48a32f/userconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 24813, 751, 13332, 2973, 892, 273, 1475, 24813, 751, 2932, 1355, 1425, 3113, 315, 1355, 1425, 3113, 29027, 2643, 82, 12, 12890, 529, 3631, 1177, 16, 29027, 2643, 82, 2932, 1299, 471,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 24813, 751, 13332, 2973, 892, 273, 1475, 24813, 751, 2932, 1355, 1425, 3113, 315, 1355, 1425, 3113, 29027, 2643, 82, 12, 12890, 529, 3631, 1177, 16, 29027, 2643, 82, 2932, 1299, 471,...
'PyArray_ISWRITEABLE(base), NULL)'),
'PyArray_ISWRITEABLE(%(basename)s), NULL)'),
def statements(lst): return ';\n'.join(lst) + ';'
ded89f6c62470cf3e73c023c61db66e75405a747 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/ded89f6c62470cf3e73c023c61db66e75405a747/elemwise.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6317, 12, 16923, 4672, 327, 296, 9747, 82, 10332, 5701, 12, 16923, 13, 397, 7554, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6317, 12, 16923, 4672, 327, 296, 9747, 82, 10332, 5701, 12, 16923, 13, 397, 7554, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
cty.POINTER(FL_OBJECT), [cty.POINTER(FL_OBJECT)],
cty.POINTER(FL_OBJECT), [cty.POINTER(FL_OBJECT)],
def fl_get_spinner_up_button(obj): """ fl_get_spinner_up_button(obj) -> object """ retval = _fl_get_spinner_up_button(obj) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 1752, 7872, 67, 416, 67, 5391, 12, 2603, 4672, 3536, 1183, 67, 588, 67, 1752, 7872, 67, 416, 67, 5391, 12, 2603, 13, 317, 733, 3536, 225, 5221, 273, 389, 2242, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 1752, 7872, 67, 416, 67, 5391, 12, 2603, 4672, 3536, 1183, 67, 588, 67, 1752, 7872, 67, 416, 67, 5391, 12, 2603, 13, 317, 733, 3536, 225, 5221, 273, 389, 2242, 67,...