rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
if re.search('LOST',urlLocality): | if re.search( 'LOST', urlLocality ): | def __parse_file_metadata(self,urlDict): statDict = self.__parse_stat(urlDict['stat']) if statDict['File']: statDict['Checksum'] = '' if urlDict.has_key('checksum') and (urlDict['checksum'] != '0x'): statDict['Checksum'] = urlDict['checksum'] if urlDict.has_key('locality'): urlLocality = urlDict['locality'] if re.search('ONLINE',urlLocality): statDict['Cached'] = 1 else: statDict['Cached'] = 0 if re.search('NEARLINE',urlLocality): statDict['Migrated'] = 1 else: statDict['Migrated'] = 0 statDict['Lost'] = 0 if re.search('LOST',urlLocality): statDict['Lost'] = 1 statDict['Unavailable'] = 0 if re.search('UNAVAILABLE',urlLocality): statDict['Unavailable'] = 1 return statDict | 70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
67,
768,
67,
4165,
12,
2890,
16,
718,
5014,
4672,
610,
5014,
273,
365,
16186,
2670,
67,
5642,
12,
718,
5014,
3292,
5642,
19486,
309,
610,
5014,
3292,
812,
3546,
30,
610,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2670,
67,
768,
67,
4165,
12,
2890,
16,
718,
5014,
4672,
610,
5014,
273,
365,
16186,
2670,
67,
5642,
12,
718,
5014,
3292,
5642,
19486,
309,
610,
5014,
3292,
812,
3546,
30,
610,
50... |
asynchat.async_chat.__init__(self, conn) | try: asynchat.async_chat.__init__(self, conn) except socket.error, err: self.close() if err[0] == errno.EINVAL: return raise | def __init__(self, conn, server): """Initialize the command channel. | 39505a80171c8ad22ffaadab7243ef2a37abdc5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3782/39505a80171c8ad22ffaadab7243ef2a37abdc5b/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1487,
16,
1438,
4672,
3536,
7520,
326,
1296,
1904,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
1487,
16,
1438,
4672,
3536,
7520,
326,
1296,
1904,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
for elem in tree.findall('//percentFormats/percentFormatLength'): | for elem in tree.findall('.//percentFormats/percentFormatLength'): | def main(): parser = OptionParser(usage='%prog path/to/cldr') options, args = parser.parse_args() if len(args) != 1: parser.error('incorrect number of arguments') srcdir = args[0] destdir = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), '..', 'babel') sup = parse(os.path.join(srcdir, 'supplemental', 'supplementalData.xml')) # Import global data from the supplemental files global_data = {} territory_zones = global_data.setdefault('territory_zones', {}) zone_aliases = global_data.setdefault('zone_aliases', {}) zone_territories = global_data.setdefault('zone_territories', {}) for elem in sup.findall('//timezoneData/zoneFormatting/zoneItem'): tzid = elem.attrib['type'] territory_zones.setdefault(elem.attrib['territory'], []).append(tzid) zone_territories[tzid] = elem.attrib['territory'] if 'aliases' in elem.attrib: for alias in elem.attrib['aliases'].split(): zone_aliases[alias] = tzid # Import Metazone mapping meta_zones = global_data.setdefault('meta_zones', {}) tzsup = parse(os.path.join(srcdir, 'supplemental', 'metazoneInfo.xml')) for elem in tzsup.findall('//timezone'): for child in elem.findall('usesMetazone'): if 'to' not in child.attrib: # FIXME: support old mappings meta_zones[elem.attrib['type']] = child.attrib['mzone'] outfile = open(os.path.join(destdir, 'global.dat'), 'wb') try: pickle.dump(global_data, outfile, 2) finally: outfile.close() # build a territory containment mapping for inheritance regions = {} for elem in sup.findall('//territoryContainment/group'): regions[elem.attrib['type']] = elem.attrib['contains'].split() # Resolve territory containment territory_containment = {} region_items = regions.items() region_items.sort() for group, territory_list in region_items: for territory in territory_list: containers = territory_containment.setdefault(territory, set([])) if group in territory_containment: containers |= territory_containment[group] containers.add(group) # prepare the per-locale plural rules definitions plural_rules = {} prsup = parse(os.path.join(srcdir, 'supplemental', 'plurals.xml')) for elem in prsup.findall('//plurals/pluralRules'): rules = [] for rule in elem.findall('pluralRule'): rules.append((rule.attrib['count'], unicode(rule.text))) pr = PluralRule(rules) for locale in elem.attrib['locales'].split(): plural_rules[locale] = pr filenames = os.listdir(os.path.join(srcdir, 'main')) filenames.remove('root.xml') filenames.sort(lambda a,b: len(a)-len(b)) filenames.insert(0, 'root.xml') for filename in filenames: stem, ext = os.path.splitext(filename) if ext != '.xml': continue print>>sys.stderr, 'Processing input file %r' % filename tree = parse(os.path.join(srcdir, 'main', filename)) data = {} language = None elem = tree.find('//identity/language') if elem is not None: language = elem.attrib['type'] print>>sys.stderr, ' Language: %r' % language territory = None elem = tree.find('//identity/territory') if elem is not None: territory = elem.attrib['type'] else: territory = '001' # world print>>sys.stderr, ' Territory: %r' % territory regions = territory_containment.get(territory, []) print>>sys.stderr, ' Regions: %r' % regions # plural rules locale_id = '_'.join(filter(None, [ language, territory != '001' and territory or None ])) if locale_id in plural_rules: data['plural_form'] = plural_rules[locale_id] # <localeDisplayNames> territories = data.setdefault('territories', {}) for elem in tree.findall('//territories/territory'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib['type'] in territories: continue territories[elem.attrib['type']] = _text(elem) languages = data.setdefault('languages', {}) for elem in tree.findall('//languages/language'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib['type'] in languages: continue languages[elem.attrib['type']] = _text(elem) variants = data.setdefault('variants', {}) for elem in tree.findall('//variants/variant'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib['type'] in variants: continue variants[elem.attrib['type']] = _text(elem) scripts = data.setdefault('scripts', {}) for elem in tree.findall('//scripts/script'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib['type'] in scripts: continue scripts[elem.attrib['type']] = _text(elem) # <dates> week_data = data.setdefault('week_data', {}) supelem = sup.find('//weekData') for elem in supelem.findall('minDays'): territories = elem.attrib['territories'].split() if territory in territories or any([r in territories for r in regions]): week_data['min_days'] = int(elem.attrib['count']) for elem in supelem.findall('firstDay'): territories = elem.attrib['territories'].split() if territory in territories or any([r in territories for r in regions]): week_data['first_day'] = weekdays[elem.attrib['day']] for elem in supelem.findall('weekendStart'): territories = elem.attrib['territories'].split() if territory in territories or any([r in territories for r in regions]): week_data['weekend_start'] = weekdays[elem.attrib['day']] for elem in supelem.findall('weekendEnd'): territories = elem.attrib['territories'].split() if territory in territories or any([r in territories for r in regions]): week_data['weekend_end'] = weekdays[elem.attrib['day']] zone_formats = data.setdefault('zone_formats', {}) for elem in tree.findall('//timeZoneNames/gmtFormat'): if 'draft' not in elem.attrib and 'alt' not in elem.attrib: zone_formats['gmt'] = unicode(elem.text).replace('{0}', '%s') break for elem in tree.findall('//timeZoneNames/regionFormat'): if 'draft' not in elem.attrib and 'alt' not in elem.attrib: zone_formats['region'] = unicode(elem.text).replace('{0}', '%s') break for elem in tree.findall('//timeZoneNames/fallbackFormat'): if 'draft' not in elem.attrib and 'alt' not in elem.attrib: zone_formats['fallback'] = unicode(elem.text) \ .replace('{0}', '%(0)s').replace('{1}', '%(1)s') break time_zones = data.setdefault('time_zones', {}) for elem in tree.findall('//timeZoneNames/zone'): info = {} city = elem.findtext('exemplarCity') if city: info['city'] = unicode(city) for child in elem.findall('long/*'): info.setdefault('long', {})[child.tag] = unicode(child.text) for child in elem.findall('short/*'): info.setdefault('short', {})[child.tag] = unicode(child.text) time_zones[elem.attrib['type']] = info meta_zones = data.setdefault('meta_zones', {}) for elem in tree.findall('//timeZoneNames/metazone'): info = {} city = elem.findtext('exemplarCity') if city: info['city'] = unicode(city) for child in elem.findall('long/*'): info.setdefault('long', {})[child.tag] = unicode(child.text) for child in elem.findall('short/*'): info.setdefault('short', {})[child.tag] = unicode(child.text) info['common'] = elem.findtext('commonlyUsed') == 'true' meta_zones[elem.attrib['type']] = info for calendar in tree.findall('//calendars/calendar'): if calendar.attrib['type'] != 'gregorian': # TODO: support other calendar types continue months = data.setdefault('months', {}) for ctxt in calendar.findall('months/monthContext'): ctxt_type = ctxt.attrib['type'] ctxts = months.setdefault(ctxt_type, {}) for width in ctxt.findall('monthWidth'): width_type = width.attrib['type'] widths = ctxts.setdefault(width_type, {}) for elem in width.getiterator(): if elem.tag == 'month': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and int(elem.attrib['type']) in widths: continue widths[int(elem.attrib.get('type'))] = unicode(elem.text) elif elem.tag == 'alias': ctxts[width_type] = Alias( _translate_alias(['months', ctxt_type, width_type], elem.attrib['path']) ) days = data.setdefault('days', {}) for ctxt in calendar.findall('days/dayContext'): ctxt_type = ctxt.attrib['type'] ctxts = days.setdefault(ctxt_type, {}) for width in ctxt.findall('dayWidth'): width_type = width.attrib['type'] widths = ctxts.setdefault(width_type, {}) for elem in width.getiterator(): if elem.tag == 'day': dtype = weekdays[elem.attrib['type']] if ('draft' in elem.attrib or 'alt' not in elem.attrib) \ and dtype in widths: continue widths[dtype] = unicode(elem.text) elif elem.tag == 'alias': ctxts[width_type] = Alias( _translate_alias(['days', ctxt_type, width_type], elem.attrib['path']) ) quarters = data.setdefault('quarters', {}) for ctxt in calendar.findall('quarters/quarterContext'): ctxt_type = ctxt.attrib['type'] ctxts = quarters.setdefault(ctxt.attrib['type'], {}) for width in ctxt.findall('quarterWidth'): width_type = width.attrib['type'] widths = ctxts.setdefault(width_type, {}) for elem in width.getiterator(): if elem.tag == 'quarter': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and int(elem.attrib['type']) in widths: continue widths[int(elem.attrib['type'])] = unicode(elem.text) elif elem.tag == 'alias': ctxts[width_type] = Alias( _translate_alias(['quarters', ctxt_type, width_type], elem.attrib['path']) ) eras = data.setdefault('eras', {}) for width in calendar.findall('eras/*'): width_type = NAME_MAP[width.tag] widths = eras.setdefault(width_type, {}) for elem in width.getiterator(): if elem.tag == 'era': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and int(elem.attrib['type']) in widths: continue widths[int(elem.attrib.get('type'))] = unicode(elem.text) elif elem.tag == 'alias': eras[width_type] = Alias( _translate_alias(['eras', width_type], elem.attrib['path']) ) # AM/PM periods = data.setdefault('periods', {}) for elem in calendar.findall('am'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.tag in periods: continue periods[elem.tag] = unicode(elem.text) for elem in calendar.findall('pm'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.tag in periods: continue periods[elem.tag] = unicode(elem.text) date_formats = data.setdefault('date_formats', {}) for format in calendar.findall('dateFormats'): for elem in format.getiterator(): if elem.tag == 'dateFormatLength': if 'draft' in elem.attrib and \ elem.attrib.get('type') in date_formats: continue try: date_formats[elem.attrib.get('type')] = \ dates.parse_pattern(unicode(elem.findtext('dateFormat/pattern'))) except ValueError, e: print>>sys.stderr, 'ERROR: %s' % e elif elem.tag == 'alias': date_formats = Alias(_translate_alias( ['date_formats'], elem.attrib['path']) ) time_formats = data.setdefault('time_formats', {}) for format in calendar.findall('timeFormats'): for elem in format.getiterator(): if elem.tag == 'timeFormatLength': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in time_formats: continue try: time_formats[elem.attrib.get('type')] = \ dates.parse_pattern(unicode(elem.findtext('timeFormat/pattern'))) except ValueError, e: print>>sys.stderr, 'ERROR: %s' % e elif elem.tag == 'alias': time_formats = Alias(_translate_alias( ['time_formats'], elem.attrib['path']) ) datetime_formats = data.setdefault('datetime_formats', {}) for format in calendar.findall('dateTimeFormats'): for elem in format.getiterator(): if elem.tag == 'dateTimeFormatLength': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in datetime_formats: continue try: datetime_formats[elem.attrib.get('type')] = \ unicode(elem.findtext('dateTimeFormat/pattern')) except ValueError, e: print>>sys.stderr, 'ERROR: %s' % e elif elem.tag == 'alias': datetime_formats = Alias(_translate_alias( ['datetime_formats'], elem.attrib['path']) ) # <numbers> number_symbols = data.setdefault('number_symbols', {}) for elem in tree.findall('//numbers/symbols/*'): if ('draft' in elem.attrib or 'alt' in elem.attrib): continue number_symbols[elem.tag] = unicode(elem.text) decimal_formats = data.setdefault('decimal_formats', {}) for elem in tree.findall('//decimalFormats/decimalFormatLength'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in decimal_formats: continue pattern = unicode(elem.findtext('decimalFormat/pattern')) decimal_formats[elem.attrib.get('type')] = numbers.parse_pattern(pattern) scientific_formats = data.setdefault('scientific_formats', {}) for elem in tree.findall('//scientificFormats/scientificFormatLength'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in scientific_formats: continue pattern = unicode(elem.findtext('scientificFormat/pattern')) scientific_formats[elem.attrib.get('type')] = numbers.parse_pattern(pattern) currency_formats = data.setdefault('currency_formats', {}) for elem in tree.findall('//currencyFormats/currencyFormatLength'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in currency_formats: continue pattern = unicode(elem.findtext('currencyFormat/pattern')) currency_formats[elem.attrib.get('type')] = numbers.parse_pattern(pattern) percent_formats = data.setdefault('percent_formats', {}) for elem in tree.findall('//percentFormats/percentFormatLength'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in percent_formats: continue pattern = unicode(elem.findtext('percentFormat/pattern')) percent_formats[elem.attrib.get('type')] = numbers.parse_pattern(pattern) currency_names = data.setdefault('currency_names', {}) currency_symbols = data.setdefault('currency_symbols', {}) for elem in tree.findall('//currencies/currency'): code = elem.attrib['type'] # TODO: support plural rules for currency name selection for name in elem.findall('displayName'): if ('draft' in name.attrib or 'count' in name.attrib) \ and code in currency_names: continue currency_names[code] = unicode(name.text) # TODO: support choice patterns for currency symbol selection symbol = elem.find('symbol') if symbol is not None and 'draft' not in symbol.attrib \ and 'choice' not in symbol.attrib: currency_symbols[code] = unicode(symbol.text) # <units> unit_patterns = data.setdefault('unit_patterns', {}) for elem in tree.findall('//units/unit'): unit_type = elem.attrib['type'] unit_pattern = unit_patterns.setdefault(unit_type, {}) for pattern in elem.findall('unitPattern'): unit_patterns[unit_type][pattern.attrib['count']] = \ unicode(pattern.text) outfile = open(os.path.join(destdir, 'localedata', stem + '.dat'), 'wb') try: pickle.dump(data, outfile, 2) finally: outfile.close() | f6a446f4ec90556809110a0a1cf043584a1e7e50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8909/f6a446f4ec90556809110a0a1cf043584a1e7e50/import_cldr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
18862,
12,
9167,
28713,
14654,
589,
19,
869,
19,
830,
3069,
6134,
702,
16,
833,
273,
2082,
18,
2670,
67,
1968,
1435,
309,
562,
12,
1968,
13,
480,
404,
30,
2082,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2082,
273,
18862,
12,
9167,
28713,
14654,
589,
19,
869,
19,
830,
3069,
6134,
702,
16,
833,
273,
2082,
18,
2670,
67,
1968,
1435,
309,
562,
12,
1968,
13,
480,
404,
30,
2082,... |
contents = original.replace("\r\n", "\n") updated = CopyWithInsertion(contents, commentPrefix, inpath == outpath, *lists) if crlf: updated = updated.replace("\n", "\r\n") | updated = CopyWithInsertion(original, commentPrefix, inpath == outpath, eolType, *lists) | def RegenerateOverLists(inpath, outpath, commentPrefix, crlf, *lists): try: infile = open(inpath, "rb") except IOError: print "Can not open", inpath return original = infile.read() infile.close() contents = original.replace("\r\n", "\n") updated = CopyWithInsertion(contents, commentPrefix, inpath == outpath, *lists) if crlf: updated = updated.replace("\n", "\r\n") UpdateFile(outpath, updated) | 2e64c228af0a6aace1ad3f50ebde97c7fdfa34f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6874/2e64c228af0a6aace1ad3f50ebde97c7fdfa34f3/LexGen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2526,
14681,
4851,
7432,
12,
267,
803,
16,
596,
803,
16,
2879,
2244,
16,
18789,
74,
16,
380,
9772,
4672,
775,
30,
14568,
273,
1696,
12,
267,
803,
16,
315,
6731,
7923,
1335,
8340,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2526,
14681,
4851,
7432,
12,
267,
803,
16,
596,
803,
16,
2879,
2244,
16,
18789,
74,
16,
380,
9772,
4672,
775,
30,
14568,
273,
1696,
12,
267,
803,
16,
315,
6731,
7923,
1335,
8340,
30,
... |
csc.dtype.char = csc.data.dtype.char | csc.dtype = csc.data.dtype | def _real(self): csc = self.tocsc() csc.data = real(csc.data) csc.dtype.char = csc.data.dtype.char csc.ftype = _transtabl[csc.dtype.char] return csc | 755141cd47edbf647cfcd8d09fd47ede3320459c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/755141cd47edbf647cfcd8d09fd47ede3320459c/sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7688,
12,
2890,
4672,
276,
1017,
273,
365,
18,
1391,
1017,
1435,
276,
1017,
18,
892,
273,
2863,
12,
71,
1017,
18,
892,
13,
276,
1017,
18,
8972,
273,
276,
1017,
18,
892,
18,
8972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7688,
12,
2890,
4672,
276,
1017,
273,
365,
18,
1391,
1017,
1435,
276,
1017,
18,
892,
273,
2863,
12,
71,
1017,
18,
892,
13,
276,
1017,
18,
8972,
273,
276,
1017,
18,
892,
18,
8972... |
self.pool.get('ir.model.data').ir_set(self.cr, self.uid, 'action', \ keyword, node.id, [node.src_model], value, replace=replace, isobject=True, xml_id=node.id) | self.pool.get('ir.model.data').ir_set(self.cr, self.uid, 'action', keyword, \ node.id, [node.src_model], value, replace=replace, noupdate=self.isnoupdate(node), isobject=True, xml_id=node.id) | def process_act_window(self, node): self.validate_xml_id(node.id) view_id = False if node.view: view_id = self.get_id(node.view) context = eval(node.context, {'ref': self._ref, '_ref': self._ref}) | 88635654ce8aa65af2e0d311178c356dd8e2cd42 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/88635654ce8aa65af2e0d311178c356dd8e2cd42/yaml_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
621,
67,
5668,
12,
2890,
16,
756,
4672,
365,
18,
5662,
67,
2902,
67,
350,
12,
2159,
18,
350,
13,
1476,
67,
350,
273,
1083,
309,
756,
18,
1945,
30,
1476,
67,
350,
273,
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,
1207,
67,
621,
67,
5668,
12,
2890,
16,
756,
4672,
365,
18,
5662,
67,
2902,
67,
350,
12,
2159,
18,
350,
13,
1476,
67,
350,
273,
1083,
309,
756,
18,
1945,
30,
1476,
67,
350,
273,
365... |
def killr (pid, sig): | def killr (pid): | def killr (pid, sig): if sys.platform!="win32": names=os.listdir("/proc/") for name in names: try: f = open("/proc/" + name +"/stat","r") line = f.readline() words = string.split(line) if words[3]==str(pid): debugOutput("Found in " + name) killr(int(name), sig) except IOError: pass try: os.kill(pid,sig) except: pass | 025790af866b8b72d6a1915839839f93479497b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1233/025790af866b8b72d6a1915839839f93479497b7/worker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
86,
261,
6610,
4672,
309,
2589,
18,
9898,
5,
1546,
8082,
1578,
6877,
1257,
33,
538,
18,
1098,
1214,
2932,
19,
9381,
4898,
13,
364,
508,
316,
1257,
30,
775,
30,
284,
273,
1696,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
86,
261,
6610,
4672,
309,
2589,
18,
9898,
5,
1546,
8082,
1578,
6877,
1257,
33,
538,
18,
1098,
1214,
2932,
19,
9381,
4898,
13,
364,
508,
316,
1257,
30,
775,
30,
284,
273,
1696,
... |
self.add_option('places', _('Places'), _('A database of URLs including bookmarks and a history of visited web sites')) | self.add_option('places', _('Places'), _('A database of URLs including bookmarks, favicons, and a history of visited web sites')) | def __init__(self): Cleaner.__init__(self) self.add_option('cache', _('Cache'), _('Web cache reduces time to display revisited pages')) self.add_option('cookies', _('Cookies'), _('HTTP cookies contain information such as web site prefereneces, authentication, and tracking identification')) self.add_option('download_history', _('Download history'), _('List of files downloaded')) self.add_option('forms', _('Form history'), _('A history of forms entered in web sites and in the Search bar')) self.add_option('session_restore', _('Session restore'), _('Loads the initial session after the browser closes or crashes')) self.add_option('passwords', _('Passwords'), _('A database of usernames and passwords as well as a list of sites that should not store passwords')) self.add_option('places', _('Places'), _('A database of URLs including bookmarks and a history of visited web sites')) self.add_option('url_history', _('URL history'), _('List of visited web pages')) self.add_option('vacuum', _('Vacuum'), _('Clean database fragmentation to reduce space and improve speed without removing any data')) | 1f790e9a90c830de48d690e310d59e4446f3e578 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/1f790e9a90c830de48d690e310d59e4446f3e578/CleanerBackend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
9645,
264,
16186,
2738,
972,
12,
2890,
13,
365,
18,
1289,
67,
3482,
2668,
2493,
2187,
389,
2668,
1649,
19899,
389,
2668,
4079,
1247,
30568,
813,
358,
256... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
9645,
264,
16186,
2738,
972,
12,
2890,
13,
365,
18,
1289,
67,
3482,
2668,
2493,
2187,
389,
2668,
1649,
19899,
389,
2668,
4079,
1247,
30568,
813,
358,
256... |
msg = _('argument "-" with mode %r' % self._mode) | msg = _('argument "-" with mode %r') % self._mode | def __call__(self, string): # the special argument "-" means sys.std{in,out} if string == '-': if 'r' in self._mode: return _sys.stdin elif 'w' in self._mode: return _sys.stdout else: msg = _('argument "-" with mode %r' % self._mode) raise ValueError(msg) | 693ee7b9cf9d4f43abc0c585f568361ca6d4d73e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/693ee7b9cf9d4f43abc0c585f568361ca6d4d73e/argparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
533,
4672,
468,
326,
4582,
1237,
7514,
4696,
2589,
18,
5084,
95,
267,
16,
659,
97,
309,
533,
422,
4014,
30,
309,
296,
86,
11,
316,
365,
6315,
3188,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
533,
4672,
468,
326,
4582,
1237,
7514,
4696,
2589,
18,
5084,
95,
267,
16,
659,
97,
309,
533,
422,
4014,
30,
309,
296,
86,
11,
316,
365,
6315,
3188,
30,... |
@property | @property | def docstring( self ): """Retrieve docstring for pure-python objects""" if hasattr( self.py_function, '__doc__' ): return self.py_function.__doc__ return None | 5e441a6d3c8bf4a1d1361e5553c2257c04555ada /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1545/5e441a6d3c8bf4a1d1361e5553c2257c04555ada/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14525,
12,
365,
262,
30,
3536,
5767,
14525,
364,
16618,
17,
8103,
2184,
8395,
309,
3859,
12,
365,
18,
2074,
67,
915,
16,
4940,
2434,
7250,
262,
30,
327,
365,
18,
2074,
67,
915,
16186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14525,
12,
365,
262,
30,
3536,
5767,
14525,
364,
16618,
17,
8103,
2184,
8395,
309,
3859,
12,
365,
18,
2074,
67,
915,
16,
4940,
2434,
7250,
262,
30,
327,
365,
18,
2074,
67,
915,
16186,
... |
Task(self.modify_bootloader, description=_("Adding a new bootlader entry")), | Task(self.modify_bootloader, description=_("Adding a new bootloader entry")), | def get_cdboot_tasklist(self): tasks = [ Task(self.select_target_dir, description=_("Selecting the target directory")), Task(self.create_dir_structure, description=_("Creating the installation directories")), Task(self.create_uninstaller, description=_("Creating the uninstaller")), Task(self.copy_installation_files, description=_("Copying installation files")), Task(self.use_cd, description=_("Extracting CD content")), Task(self.extract_kernel, description=_("Extracting the kernel")), Task(self.create_preseed_cdboot, description=_("Creating a preseed file")), Task(self.modify_bootloader, description=_("Adding a new bootlader entry")), Task(self.modify_grub_configuration, description=_("Setting up installation boot menu")), Task(self.uncompress_files, description=_("Uncompressing files")), Task(self.eject_cd, description=_("Ejecting the CD")), ] tasklist = ThreadedTaskList(description=_("Installing CD boot helper"), tasks=tasks) return tasklist | 8fcd4138416b254673f4102f079da698c461dffa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/702/8fcd4138416b254673f4102f079da698c461dffa/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4315,
7137,
67,
4146,
1098,
12,
2890,
4672,
4592,
273,
306,
3837,
12,
2890,
18,
4025,
67,
3299,
67,
1214,
16,
2477,
33,
67,
2932,
3391,
310,
326,
1018,
1867,
7923,
3631,
3837,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4315,
7137,
67,
4146,
1098,
12,
2890,
4672,
4592,
273,
306,
3837,
12,
2890,
18,
4025,
67,
3299,
67,
1214,
16,
2477,
33,
67,
2932,
3391,
310,
326,
1018,
1867,
7923,
3631,
3837,... |
msg = MIMEText(body) | msg = email.MIMEText.MIMEText(body) | 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'): break desc.append(line) if not node: raise ValueError | 08ff5f4b194f5833849d0791d7ee6e0b27ec1d59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/08ff5f4b194f5833849d0791d7ee6e0b27ec1d59/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... |
f_size = getattr(f, 'size', 16) | f_size = getattr(f, 'size', None) or 16 | def get_pg_type(f): ''' returns a tuple (type returned by postgres when the column was created, type expression to create the column) ''' type_dict = { fields.boolean: 'bool', fields.integer: 'int4', fields.integer_big: 'int8', fields.text: 'text', fields.date: 'date', fields.time: 'time', fields.datetime: 'timestamp', fields.binary: 'bytea', fields.many2one: 'int4', } if type(f) in type_dict: f_type = (type_dict[type(f)], type_dict[type(f)]) elif isinstance(f, fields.float): if f.digits: f_type = ('numeric', 'NUMERIC(%d,%d)' % (f.digits[0], f.digits[1])) else: f_type = ('float8', 'DOUBLE PRECISION') elif isinstance(f, (fields.char, fields.reference)): f_type = ('varchar', 'VARCHAR(%d)' % (f.size,)) elif isinstance(f, fields.selection): if isinstance(f.selection, list) and isinstance(f.selection[0][0], (str, unicode)): f_size = reduce(lambda x, y: max(x, len(y[0])), f.selection, f.size or 16) elif isinstance(f.selection, list) and isinstance(f.selection[0][0], int): f_size = -1 else: f_size = getattr(f, 'size', 16) if f_size == -1: f_type = ('int4', 'INTEGER') else: f_type = ('varchar', 'VARCHAR(%d)' % f_size) elif isinstance(f, fields.function) and eval('fields.'+(f._type)) in type_dict: t = eval('fields.'+(f._type)) f_type = (type_dict[t], type_dict[t]) elif isinstance(f, fields.function) and f._type == 'float': if f.digits: f_type = ('numeric', 'NUMERIC(%d,%d)' % (f.digits[0], f.digits[1])) else: f_type = ('float8', 'DOUBLE PRECISION') elif isinstance(f, fields.function) and f._type == 'selection': f_type = ('text', 'text') elif isinstance(f, fields.function) and f._type == 'char': f_type = ('varchar', 'VARCHAR(%d)' % (f.size)) else: logger = netsvc.Logger() logger.notifyChannel("init", netsvc.LOG_WARNING, '%s type not supported!' % (type(f))) f_type = None return f_type | 3816dadb22090212fa6c8eae24b3e9c3076a5e90 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3816dadb22090212fa6c8eae24b3e9c3076a5e90/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8365,
67,
723,
12,
74,
4672,
9163,
1135,
279,
3193,
261,
723,
2106,
635,
1603,
14107,
1347,
326,
1057,
1703,
2522,
16,
618,
2652,
358,
752,
326,
1057,
13,
9163,
225,
618,
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,
8365,
67,
723,
12,
74,
4672,
9163,
1135,
279,
3193,
261,
723,
2106,
635,
1603,
14107,
1347,
326,
1057,
1703,
2522,
16,
618,
2652,
358,
752,
326,
1057,
13,
9163,
225,
618,
67,
... |
strip --strip-all SDL_mixer.dll | dlltool -D SDL_mixer.dll -d SDL_mixer.def -l libSDL_mixer.dll.a | 5ed962a58a84830cbe0f649aee7072426feb4c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/5ed962a58a84830cbe0f649aee7072426feb4c22/msys_link_VC_2008_dlls.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
302,
2906,
6738,
300,
40,
17157,
67,
14860,
264,
18,
27670,
300,
72,
17157,
67,
14860,
264,
18,
536,
300,
80,
2561,
55,
8914,
67,
14860,
264,
18,
27670,
18,
69,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
302,
2906,
6738,
300,
40,
17157,
67,
14860,
264,
18,
27670,
300,
72,
17157,
67,
14860,
264,
18,
536,
300,
80,
2561,
55,
8914,
67,
14860,
264,
18,
27670,
18,
69,
2,
-100,
-100,
-100,
-100,
... | |
"%r tag takes %d arguments." % (tag_name, num_args) | "%r tag takes %d arguments." % (tag_name, min_args) | def _setup_tag(parser, token): bits = token.split_contents() tag_name = bits[0] del(bits[0]) | 3f94f332c2c4144cc86abe701362438b9fcc4d7e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6757/3f94f332c2c4144cc86abe701362438b9fcc4d7e/decorators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8401,
67,
2692,
12,
4288,
16,
1147,
4672,
4125,
273,
1147,
18,
4939,
67,
3980,
1435,
1047,
67,
529,
273,
4125,
63,
20,
65,
1464,
12,
6789,
63,
20,
5717,
2,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8401,
67,
2692,
12,
4288,
16,
1147,
4672,
4125,
273,
1147,
18,
4939,
67,
3980,
1435,
1047,
67,
529,
273,
4125,
63,
20,
65,
1464,
12,
6789,
63,
20,
5717,
2,
-100,
-100,
-100,
-10... |
sage: m = WordMorphism('a->aa,b->aac') sage: list(m.letter_iterator('a')) Traceback (most recent call last): ... TypeError: self (=WordMorphism: a->aa, b->aac) is not a endomorphism """ if not self.is_endomorphism(): raise TypeError, "self (=%s) is not a endomorphism"%self if not self.is_prolongable(letter=letter): raise TypeError, "self must be prolongable on %s"%letter w = list(self(letter)) | The morphism must be prolongable on the letter:: sage: list(m._fixed_point_iterator('b')) Traceback (most recent call last): ... IndexError: pop from empty list The morphism must be an endomorphism:: sage: m = WordMorphism('a->ac,b->aac') sage: list(m._fixed_point_iterator('a')) Traceback (most recent call last): ... KeyError: 'c' We check that sage: s = WordMorphism({('a', 1):[('a', 1), ('a', 2)], ('a', 2):[('a', 1)]}) sage: it = s._fixed_point_iterator(('a',1)) sage: it.next() ('a', 1) """ w = list(self.image(letter)) | def letter_iterator(self, letter): r""" Returns an iterator of the letters of the fixed point of ``self`` starting with ``letter``. | 504ba7b1455ea380dd159b2aa42179a48a8ef384 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/504ba7b1455ea380dd159b2aa42179a48a8ef384/morphism.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9471,
67,
9838,
12,
2890,
16,
9471,
4672,
436,
8395,
2860,
392,
2775,
434,
326,
13768,
434,
326,
5499,
1634,
434,
12176,
2890,
10335,
5023,
598,
12176,
13449,
68,
8338,
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,
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,
9471,
67,
9838,
12,
2890,
16,
9471,
4672,
436,
8395,
2860,
392,
2775,
434,
326,
13768,
434,
326,
5499,
1634,
434,
12176,
2890,
10335,
5023,
598,
12176,
13449,
68,
8338,
2,
-100,
-100,
-1... |
def findPipeLight(self): | def findPipeLight(self): | def findPipeLight(self): orangeDetector = self.vision.downward.OrangeDetector redDetector = self.vision.forward.RedLightDetector | b10a92e535b20c0b6cda01a39be7e0c41877eb1b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10608/b10a92e535b20c0b6cda01a39be7e0c41877eb1b/cleanAI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
11546,
12128,
12,
2890,
4672,
578,
726,
12594,
273,
365,
18,
2820,
18,
2378,
2913,
18,
1162,
726,
12594,
1755,
12594,
273,
365,
18,
2820,
18,
11565,
18,
3715,
12128,
12594,
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,
1104,
11546,
12128,
12,
2890,
4672,
578,
726,
12594,
273,
365,
18,
2820,
18,
2378,
2913,
18,
1162,
726,
12594,
1755,
12594,
273,
365,
18,
2820,
18,
11565,
18,
3715,
12128,
12594,
2,
-100... |
addional_args = 1 else: addional_args = 0 args, varargs, _, _ = inspect.getargspec(meth) if varargs: logger.warn("Ignoring notification '%s' as variable" " arguments were used (pattern not recognized," " exactly %d arguments are expected)", meth.__name__, _CUST_METH_ARGS_COUNT+addional_args) pass if len(args) != _CUST_METH_ARGS_COUNT + addional_args: logger.warn("Ignoring notification '%s': exactly %d" " arguments are expected", meth.__name__, _CUST_METH_ARGS_COUNT+addional_args) pass if addional_args > 0: pair = (_obs_with_name, meth) else: pair = (_obs_without_name, meth) if pair not in self.__value_notifications[prop_name]: list.append(self.__value_notifications[prop_name], pair) logger.debug("Added explicit value change notification '%s'", meth.im_func.__name__) pass pass orig_prop = getattr(self, "_prop_%s" % prop_name, None) if isinstance(orig_prop, Signal): method_name = "property_%s_signal_emit" % prop_name if hasattr(observer, method_name): pair = (_obs_without_name, getattr(observer, method_name)) if pair not in self.__signal_notif[prop_name]: list.append(self.__signal_notif[prop_name], pair) logger.debug("Added implicit signal emit notification '%s'", method_name) | notification = WITH_NAME, meth if numargs == 4: add_signal(notification) elif numargs == 5: add_value(notification) elif numargs == 7: add_before(notification) elif numargs == 8: add_after(notification) else: logger.warn("Ignoring notification %s: wrong number of" " arguments (one is prop_name)", meth.__name__) | def __add_observer_notification(self, observer, prop_name): """Searches in the observer for any possible listener, and stores the notification methods to be called later""" | 38d0536eb2a0348732b53a55ef6eecc08bd51e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4095/38d0536eb2a0348732b53a55ef6eecc08bd51e12/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
67,
30971,
67,
9927,
12,
2890,
16,
9655,
16,
2270,
67,
529,
4672,
3536,
16294,
316,
326,
9655,
364,
1281,
3323,
2991,
16,
471,
9064,
326,
3851,
2590,
358,
506,
2566,
5137,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
1289,
67,
30971,
67,
9927,
12,
2890,
16,
9655,
16,
2270,
67,
529,
4672,
3536,
16294,
316,
326,
9655,
364,
1281,
3323,
2991,
16,
471,
9064,
326,
3851,
2590,
358,
506,
2566,
5137,
... |
x0 = ones(self.dims,'d') lrange = x0*self.lower urange = x0*self.upper | lrange = self.lower urange = self.upper | def getstart_temp(self, best_state): assert(not self.dims is None) x0 = ones(self.dims,'d') lrange = x0*self.lower urange = x0*self.upper fmax = -300e8 fmin = 300e8 for n in range(self.Ninit): x0[:] = random.uniform(size=self.dims)*(urange-lrange) + lrange fval = self.func(x0,*self.args) self.feval += 1 if fval > fmax: fmax = fval if fval < fmin: fmin = fval best_state.cost = fval best_state.x = array(x0) self.T0 = (fmax-fmin)*1.5 return best_state.x | 5d83f70d8d9b65f40e4932969c9d8113c8f4f8cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/5d83f70d8d9b65f40e4932969c9d8113c8f4f8cd/anneal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1937,
67,
5814,
12,
2890,
16,
3796,
67,
2019,
4672,
1815,
12,
902,
365,
18,
8550,
353,
599,
13,
328,
3676,
273,
365,
18,
8167,
8896,
726,
273,
365,
18,
5797,
284,
1896,
273,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1937,
67,
5814,
12,
2890,
16,
3796,
67,
2019,
4672,
1815,
12,
902,
365,
18,
8550,
353,
599,
13,
328,
3676,
273,
365,
18,
8167,
8896,
726,
273,
365,
18,
5797,
284,
1896,
273,
300... |
cty.POINTER(FLIMAGE_FORMAT_INFO), [cty.c_int], | cty.POINTER(FLIMAGE_FORMAT_INFO), [cty.c_int], | def flimage_get_number_of_formats(): """ flimage_get_number_of_formats() -> num. """ retval = _flimage_get_number_of_formats() 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,
2730,
67,
588,
67,
2696,
67,
792,
67,
11962,
13332,
3536,
1183,
2730,
67,
588,
67,
2696,
67,
792,
67,
11962,
1435,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
2730,
67,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
2730,
67,
588,
67,
2696,
67,
792,
67,
11962,
13332,
3536,
1183,
2730,
67,
588,
67,
2696,
67,
792,
67,
11962,
1435,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
2730,
67,
588,
... |
from Numeric import array | from Numeric import array, Float | def get_potential_energy(self, atoms): from Numeric import array # XXXX what about the cell? self.atoms.SetCartesianPositions(array(atoms.get_positions())) return self.calc.GetPotentialEnergy() | aa0bda297143c894511d856e028689fbe386c90c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5572/aa0bda297143c894511d856e028689fbe386c90c/old.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
26451,
67,
15358,
12,
2890,
16,
9006,
4672,
628,
16980,
1930,
526,
16,
5450,
468,
11329,
60,
4121,
2973,
326,
2484,
35,
365,
18,
14937,
18,
694,
13006,
13404,
11024,
12,
1126,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
67,
26451,
67,
15358,
12,
2890,
16,
9006,
4672,
628,
16980,
1930,
526,
16,
5450,
468,
11329,
60,
4121,
2973,
326,
2484,
35,
365,
18,
14937,
18,
694,
13006,
13404,
11024,
12,
1126,
... |
print """cl(ear) [lineno] | print """cl(ear) [file:][lineno] | def help_cl(self): print """cl(ear) [lineno] | 18182467f8587275e35e28657065f285578822c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/18182467f8587275e35e28657065f285578822c4/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
830,
12,
2890,
4672,
1172,
3536,
830,
12,
2091,
13,
306,
17782,
65,
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,
... | [
1,
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,
2809,
67,
830,
12,
2890,
4672,
1172,
3536,
830,
12,
2091,
13,
306,
17782,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
elif hgpatch: | elif hgpatchheader: | def extract(ui, fileobj): '''extract patch from data read from fileobj. patch can be a normal patch or contained in an email message. return tuple (filename, message, user, date, branch, node, p1, p2). Any item in the returned tuple can be None. If filename is None, fileobj did not contain a patch. Caller must unlink filename when done.''' # attempt to detect the start of a patch # (this heuristic is borrowed from quilt) diffre = re.compile(r'^(?:Index:[ \t]|diff[ \t]|RCS file: |' r'retrieving revision [0-9]+(\.[0-9]+)*$|' r'---[ \t].*?^\+\+\+[ \t]|' r'\*\*\*[ \t].*?^---[ \t])', re.MULTILINE|re.DOTALL) fd, tmpname = tempfile.mkstemp(prefix='hg-patch-') tmpfp = os.fdopen(fd, 'w') try: msg = email.Parser.Parser().parse(fileobj) subject = msg['Subject'] user = msg['From'] if not subject and not user: # Not an email, restore parsed headers if any subject = '\n'.join(': '.join(h) for h in msg.items()) + '\n' gitsendmail = 'git-send-email' in msg.get('X-Mailer', '') # should try to parse msg['Date'] date = None nodeid = None branch = None parents = [] if subject: if subject.startswith('[PATCH'): pend = subject.find(']') if pend >= 0: subject = subject[pend + 1:].lstrip() subject = subject.replace('\n\t', ' ') ui.debug('Subject: %s\n' % subject) if user: ui.debug('From: %s\n' % user) diffs_seen = 0 ok_types = ('text/plain', 'text/x-diff', 'text/x-patch') message = '' for part in msg.walk(): content_type = part.get_content_type() ui.debug('Content-Type: %s\n' % content_type) if content_type not in ok_types: continue payload = part.get_payload(decode=True) m = diffre.search(payload) if m: hgpatch = False ignoretext = False ui.debug('found patch at byte %d\n' % m.start(0)) diffs_seen += 1 cfp = cStringIO.StringIO() for line in payload[:m.start(0)].splitlines(): if line.startswith('# HG changeset patch'): ui.debug('patch generated by hg export\n') hgpatch = True # drop earlier commit message content cfp.seek(0) cfp.truncate() subject = None elif hgpatch: if line.startswith('# User '): user = line[7:] ui.debug('From: %s\n' % user) elif line.startswith("# Date "): date = line[7:] elif line.startswith("# Branch "): branch = line[9:] elif line.startswith("# Node ID "): nodeid = line[10:] elif line.startswith("# Parent "): parents.append(line[10:]) elif line == '---' and gitsendmail: ignoretext = True if not line.startswith('# ') and not ignoretext: cfp.write(line) cfp.write('\n') message = cfp.getvalue() if tmpfp: tmpfp.write(payload) if not payload.endswith('\n'): tmpfp.write('\n') elif not diffs_seen and message and content_type == 'text/plain': message += '\n' + payload except: tmpfp.close() os.unlink(tmpname) raise if subject and not message.startswith(subject): message = '%s\n%s' % (subject, message) tmpfp.close() if not diffs_seen: os.unlink(tmpname) return None, message, user, date, branch, None, None, None p1 = parents and parents.pop(0) or None p2 = parents and parents.pop(0) or None return tmpname, message, user, date, branch, nodeid, p1, p2 | 9b4165b4dedf5fd74b91c5d488c18a39e852133e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/9b4165b4dedf5fd74b91c5d488c18a39e852133e/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
12,
4881,
16,
17041,
4672,
9163,
8004,
4729,
628,
501,
855,
628,
17041,
18,
225,
4729,
848,
506,
279,
2212,
4729,
578,
7542,
316,
392,
2699,
883,
18,
225,
327,
3193,
261,
3459,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
12,
4881,
16,
17041,
4672,
9163,
8004,
4729,
628,
501,
855,
628,
17041,
18,
225,
4729,
848,
506,
279,
2212,
4729,
578,
7542,
316,
392,
2699,
883,
18,
225,
327,
3193,
261,
3459,
1... |
self.assertEquals(0, self.c.parse(['--help', ])) | self.assertEquals(None, self.c.parse(['--help', ])) | def testHelpCommands(self): self.assertEquals(0, self.c.parse(['--help', ])) lookFor = "%s " % self.c.subCommands.keys()[0] self.failUnless(self.out.getvalue().find(lookFor) > -1, "out %r does not contain %s" % (self.out.getvalue(), lookFor)) | ffd28412447b5417849fe1137af7230d1203e88f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10492/ffd28412447b5417849fe1137af7230d1203e88f/test_command.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6696,
9127,
12,
2890,
4672,
365,
18,
11231,
8867,
12,
7036,
16,
365,
18,
71,
18,
2670,
12,
3292,
413,
5201,
2187,
308,
3719,
2324,
1290,
273,
2213,
87,
225,
315,
738,
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,
1842,
6696,
9127,
12,
2890,
4672,
365,
18,
11231,
8867,
12,
7036,
16,
365,
18,
71,
18,
2670,
12,
3292,
413,
5201,
2187,
308,
3719,
2324,
1290,
273,
2213,
87,
225,
315,
738,
365,
18,
... |
raise errors.OpExecError("Cannot shutdow instance disks, unable to" | raise errors.OpExecError("Cannot shutdown instance disks, unable to" | def Exec(self, feedback_fn): """Modifies an instance. | 7c2e922e178e28b60e9871d1cf0d37bf9203f9de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/7c2e922e178e28b60e9871d1cf0d37bf9203f9de/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3889,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
1739,
5032,
392,
791,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3889,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
1739,
5032,
392,
791,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return StringIO.StringIO(self.text) | return self.fileclass(self.text) class NoEOFStringIO(StringIO.StringIO): """Like StringIO, but raises AssertionError on EOF. This is used below to test that httplib doesn't try to read more from the underlying file than it should. """ def read(self, n=-1): data = StringIO.StringIO.read(self, n) if data == '': raise AssertionError('caller tried to read past EOF') return data def readline(self, length=None): data = StringIO.StringIO.readline(self, length) if data == '': raise AssertionError('caller tried to read past EOF') return data | def makefile(self, mode, bufsize=None): if mode != 'r' and mode != 'rb': raise httplib.UnimplementedFileMode() return StringIO.StringIO(self.text) | fed454b4fc4aaf7f877d2b702314f8e5a8fa7d13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fed454b4fc4aaf7f877d2b702314f8e5a8fa7d13/test_httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
768,
12,
2890,
16,
1965,
16,
1681,
1467,
33,
7036,
4672,
309,
1965,
480,
296,
86,
11,
471,
1965,
480,
296,
6731,
4278,
1002,
15851,
6673,
18,
984,
21099,
812,
2309,
1435,
327,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
768,
12,
2890,
16,
1965,
16,
1681,
1467,
33,
7036,
4672,
309,
1965,
480,
296,
86,
11,
471,
1965,
480,
296,
6731,
4278,
1002,
15851,
6673,
18,
984,
21099,
812,
2309,
1435,
327,
15... |
context.error("unsupported directive: %s %s" % (self.mnemonic, operands)) sys.exit() | pa = None if operands: expr = Expression(context, operands) if expr.complete: pa = expr.value if context.memmap.isErasable(pa): context.code = pa + 024000 else: context.error("1DNADR operand must be in erasable memory") | def parse_6DNADR(self, context, symbol, operands): context.error("unsupported directive: %s %s" % (self.mnemonic, operands)) sys.exit() | 7b29e1bdd72f89ef067f6f4227a2842caa307ee6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/7b29e1bdd72f89ef067f6f4227a2842caa307ee6/directives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
26,
8609,
1880,
54,
12,
2890,
16,
819,
16,
3273,
16,
14883,
4672,
6790,
273,
599,
309,
14883,
30,
3065,
273,
5371,
12,
2472,
16,
14883,
13,
309,
3065,
18,
6226,
30,
6790,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
26,
8609,
1880,
54,
12,
2890,
16,
819,
16,
3273,
16,
14883,
4672,
6790,
273,
599,
309,
14883,
30,
3065,
273,
5371,
12,
2472,
16,
14883,
13,
309,
3065,
18,
6226,
30,
6790,
2... |
msg = """can't create or remove files in install directory | msg = """can't create or remove files in install directory | def cant_write_to_target(self): msg = """can't create or remove files in install directory | 71aeed6af15f476a6af8b6ac10628d11fcf18358 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/495/71aeed6af15f476a6af8b6ac10628d11fcf18358/easy_install.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
848,
88,
67,
2626,
67,
869,
67,
3299,
12,
2890,
4672,
1234,
273,
3536,
4169,
1404,
752,
578,
1206,
1390,
316,
3799,
1867,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
848,
88,
67,
2626,
67,
869,
67,
3299,
12,
2890,
4672,
1234,
273,
3536,
4169,
1404,
752,
578,
1206,
1390,
316,
3799,
1867,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def __static_text(self, parent, text, index): | def __button(self, parent, default, evt_handler, id, container): | def draw_timeline(self, period_selection=None): """Draws the timeline onto the background buffer.""" memdc = wx.MemoryDC() memdc.SelectObject(self.bgbuf) try: logging.debug('Draw timeline to bgbuf') memdc.BeginDrawing() memdc.SetBackground(wx.Brush(wx.WHITE, wx.SOLID)) memdc.Clear() if self.timeline: current_events = self.timeline.get_events(self.time_period) self.drawing_algorithm.draw(memdc, self.time_period, current_events, period_selection) memdc.EndDrawing() self.Refresh() except Exception, e: self.bgbuf = None logging.fatal('Error in drawing', exc_info=e) | 5e536432e6c9d25da46ff5c5562f1c02d7b6cc8c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/5e536432e6c9d25da46ff5c5562f1c02d7b6cc8c/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
26237,
12,
2890,
16,
3879,
67,
10705,
33,
7036,
4672,
3536,
25113,
326,
18316,
10170,
326,
5412,
1613,
12123,
1663,
7201,
273,
7075,
18,
6031,
5528,
1435,
1663,
7201,
18,
3391,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
26237,
12,
2890,
16,
3879,
67,
10705,
33,
7036,
4672,
3536,
25113,
326,
18316,
10170,
326,
5412,
1613,
12123,
1663,
7201,
273,
7075,
18,
6031,
5528,
1435,
1663,
7201,
18,
3391,
... |
corners.append(CoordinatePair(point_x, point_y)) | corners.append(Coordinate(point_x, point_y)) | def points(self): corners = [] pi_div_180 = math.pi / 180.0 half_width = self.width * 0.5 half_height = self.height * 0.5 | c97192d0a0bcb0b825f29f5e9d924119b675bda2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3716/c97192d0a0bcb0b825f29f5e9d924119b675bda2/star.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3143,
12,
2890,
4672,
18398,
273,
5378,
4790,
67,
2892,
67,
18278,
273,
4233,
18,
7259,
342,
9259,
18,
20,
8816,
67,
2819,
273,
365,
18,
2819,
380,
374,
18,
25,
8816,
67,
4210,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3143,
12,
2890,
4672,
18398,
273,
5378,
4790,
67,
2892,
67,
18278,
273,
4233,
18,
7259,
342,
9259,
18,
20,
8816,
67,
2819,
273,
365,
18,
2819,
380,
374,
18,
25,
8816,
67,
4210,
273,
... |
description = "rdf:Literal string representation" def __init__(self, klass): _klass = klass | description = "rdf:Literal string representation" def __init__(self, klass): _klass = klass | def makeStringLiteral(self, attr, spec): properties[attr] = CharLiteralRdfProperty(self) setattr(self, attr, spec) | d6c797f4a2089543ac6cb76bfb9c014053f177e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11435/d6c797f4a2089543ac6cb76bfb9c014053f177e3/rdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
28565,
12,
2890,
16,
1604,
16,
857,
4672,
1790,
63,
1747,
65,
273,
3703,
6177,
27616,
1396,
12,
2890,
13,
9241,
12,
2890,
16,
1604,
16,
857,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
28565,
12,
2890,
16,
1604,
16,
857,
4672,
1790,
63,
1747,
65,
273,
3703,
6177,
27616,
1396,
12,
2890,
13,
9241,
12,
2890,
16,
1604,
16,
857,
13,
225,
2,
-100,
-100,
-100,
-100,
... |
settings = QSettings("Davide Setti", "Lector"); | settings = QSettings("Davide Setti", "Lector") | def readSettings(self): settings = QSettings("Davide Setti", "Lector"); pos = settings.value("pos", QVariant(QPoint(50, 50))).toPoint() size = settings.value("size", QVariant(QSize(800, 500))).toSize() self.curDir = settings.value("file_dialog_dir", QVariant('~/')).toString() self.resize(size) self.move(pos) ## load saved language lang = str(settings.value("rbtn/lang", QVariant(QString())).toString()) if lang: ## TODO: if the language is not installed anymore? self.rbtn_languages[lang].setChecked(True) self.ocrWidget.language = lang | 235dac2bd0866f9c99d2d5de8927576d79e954e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2085/235dac2bd0866f9c99d2d5de8927576d79e954e8/lector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
2628,
12,
2890,
4672,
1947,
273,
2238,
2628,
2932,
40,
69,
6768,
1000,
9096,
3113,
315,
48,
1229,
7923,
949,
273,
1947,
18,
1132,
2932,
917,
3113,
2238,
9356,
12,
53,
2148,
12,
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,
855,
2628,
12,
2890,
4672,
1947,
273,
2238,
2628,
2932,
40,
69,
6768,
1000,
9096,
3113,
315,
48,
1229,
7923,
949,
273,
1947,
18,
1132,
2932,
917,
3113,
2238,
9356,
12,
53,
2148,
12,
33... |
butler: @butlerUpdate.paf | butler: @PT1Pipe/butlerUpdate.paf | def ccdAssemblyProcess(f): for snap in (0, 1): print >>f, """ appStage: { name: ccdAssemblyCcdList""" + str(snap) + """ parallelClass: lsst.datarel.ObjectListStageParallel eventTopic: None stagePolicy: { inputKeys: {""" for channelX in (0, 1): for channelY in (0, 1, 2, 3, 4, 5, 6, 7): channelId = "%d%d" % (channelX, channelY) channelSnap = "%d%d_%d" % (channelX, channelY, snap) print >>f, " object: isrExposure" + channelSnap print >>f, """ } outputKeys: { objectList: exposureList""" + str(snap) + """ } } } appStage: { name: ccdAssemblyIsrCcdAssembly""" + str(snap) + """ parallelClass: lsst.ip.pipeline.IsrCcdAssemblyStageParallel eventTopic: None inputKeys: { exposureList: exposureList""" + str(snap) + """ } outputKeys: { assembledCcdExposure: isrExposure""" + str(snap) + """ } } appStage: { name: ccdAssemblyIsrCcdDefect""" + str(snap) + """ parallelClass: lsst.ip.pipeline.IsrCcdDefectStageParallel eventTopic: None inputKeys: { ccdExposure: isrExposure""" + str(snap) + """ } outputKeys: { ccdExposure: isrExposure""" + str(snap) + """ } } appStage: { name: ccdAssemblyIsrCcdSdqa""" + str(snap) + """ parallelClass: lsst.ip.pipeline.IsrCcdSdqaStageParallel eventTopic: None inputKeys: { ccdExposure: isrExposure""" + str(snap) + """ } outputKeys: { sdqaCcdExposure: isrExposure""" + str(snap) + """ } } appStage: { name: ccdAssemblySdqaCcd""" + str(snap) + """ parallelClass: lsst.sdqa.pipeline.IsrSdqaStageParallel eventTopic: None inputKeys: { exposureKey: isrExposure""" + str(snap) + """ } parameters: @ISR-sdqaCcd.paf outputKeys: { isrPersistableSdqaRatingVectorKey: sdqaRatingVector""" + str(snap) + """ } }""" print >>f, """ appStage: { name: ccdAssemblyOutput parallelClass: lsst.pex.harness.IOStage.OutputStageParallel eventTopic: None stagePolicy: { parameters: { butler: @butlerUpdate.paf outputItems: { sdqaRatingVector0: { datasetType: sdqaCcd datasetId: { fromJobIdentity: "visit" "raft" "sensor" set: { snap: 0 } } } sdqaRatingVector1: { datasetType: sdqaCcd datasetId: { fromJobIdentity: "visit" "raft" "sensor" set: { snap: 1 } } } } } } }""" print >>f, """ appStage: { name: ccdAssemblyFixup parallelClass: lsst.datarel.FixupStageParallel eventTopic: None stagePolicy: { inputKeys: { isrCcdExposure0: isrExposure0 isrCcdExposure1: isrExposure1 } parameters: { pipeline: CcdAssembly } outputKeys: { isrCcdExposure0: isrCcdExposure0 isrCcdExposure1: isrCcdExposure1 } } }""" | 794695332025b0321e85c5771ec0bb572bc37b41 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6538/794695332025b0321e85c5771ec0bb572bc37b41/createImSimPipe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
4315,
24368,
2227,
12,
74,
4672,
364,
10915,
316,
261,
20,
16,
404,
4672,
1172,
1671,
74,
16,
3536,
595,
8755,
30,
288,
508,
30,
276,
4315,
24368,
39,
4315,
682,
8395,
397,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
4315,
24368,
2227,
12,
74,
4672,
364,
10915,
316,
261,
20,
16,
404,
4672,
1172,
1671,
74,
16,
3536,
595,
8755,
30,
288,
508,
30,
276,
4315,
24368,
39,
4315,
682,
8395,
397,
609,
... |
paragraph_bellow.extend(['\\begin_inset VSpace ' + vspace_bot_value,'\\end_inset','','']) | paragraph_below.extend(['\\begin_inset VSpace ' + vspace_bot_value,'\\end_inset','','']) | def convert_breaks(file): i = 0 while 1: i = find_token(file.body, "\\begin_layout", i) if i == -1: return i = i + 1 line_top = find(file.body[i],"\\line_top") line_bot = find(file.body[i],"\\line_bottom") pb_top = find(file.body[i],"\\pagebreak_top") pb_bot = find(file.body[i],"\\pagebreak_bottom") vspace_top = find(file.body[i],"\\added_space_top") vspace_bot = find(file.body[i],"\\added_space_bottom") if line_top == -1 and line_bot == -1 and pb_bot == -1 and pb_top == -1 and vspace_top == -1 and vspace_bot == -1: continue for tag in "\\line_top", "\\line_bottom", "\\pagebreak_top", "\\pagebreak_bottom": file.body[i] = replace(file.body[i], tag, "") if vspace_top != -1: # the position could be change because of the removal of other # paragraph properties above vspace_top = find(file.body[i],"\\added_space_top") tmp_list = split(file.body[i][vspace_top:]) vspace_top_value = tmp_list[1] file.body[i] = file.body[i][:vspace_top] + join(tmp_list[2:]) if vspace_bot != -1: # the position could be change because of the removal of other # paragraph properties above vspace_bot = find(file.body[i],"\\added_space_bottom") tmp_list = split(file.body[i][vspace_bot:]) vspace_bot_value = tmp_list[1] file.body[i] = file.body[i][:vspace_bot] + join(tmp_list[2:]) file.body[i] = strip(file.body[i]) i = i + 1 # Create an empty paragraph for line and page break that belong # above the paragraph if pb_top !=-1 or line_top != -1 or vspace_top != -1: paragraph_above = ['','\\begin_layout Standard','',''] if pb_top != -1: paragraph_above.extend(['\\newpage ','']) if vspace_top != -1: paragraph_above.extend(['\\begin_inset VSpace ' + vspace_top_value,'\\end_inset','','']) if line_top != -1: paragraph_above.extend(['\\lyxline ','']) paragraph_above.extend(['\\end_layout','']) #inset new paragraph above the current paragraph file.body[i-2:i-2] = paragraph_above i = i + len(paragraph_above) # Ensure that nested style are converted later. k = find_end_of(file.body, i, "\\begin_layout", "\\end_layout") if k == -1: return if pb_bot !=-1 or line_bot != -1 or vspace_bot != -1: paragraph_bellow = ['','\\begin_layout Standard','',''] if line_bot != -1: paragraph_bellow.extend(['\\lyxline ','']) if vspace_bot != -1: paragraph_bellow.extend(['\\begin_inset VSpace ' + vspace_bot_value,'\\end_inset','','']) if pb_bot != -1: paragraph_bellow.extend(['\\newpage ','']) paragraph_bellow.extend(['\\end_layout','']) #inset new paragraph above the current paragraph file.body[k + 1: k + 1] = paragraph_bellow | f9c17f01afe90fd6880bcac2b458dc3f02daf8e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/f9c17f01afe90fd6880bcac2b458dc3f02daf8e8/lyx_1_4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
29292,
12,
768,
4672,
277,
273,
374,
1323,
404,
30,
277,
273,
1104,
67,
2316,
12,
768,
18,
3432,
16,
8422,
10086,
67,
6741,
3113,
277,
13,
309,
277,
422,
300,
21,
30,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
29292,
12,
768,
4672,
277,
273,
374,
1323,
404,
30,
277,
273,
1104,
67,
2316,
12,
768,
18,
3432,
16,
8422,
10086,
67,
6741,
3113,
277,
13,
309,
277,
422,
300,
21,
30,
327,
... |
if self.to_peer == -1: | if self.to_peer is None: | def write_object(self, object): if self.to_peer == -1: raise Exception('Peer is defunct') if not self.out_buffer: self.enable_write_watch() | d066f1b86670a91c93b3692037a67750623a4daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4591/d066f1b86670a91c93b3692037a67750623a4daf/proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1612,
12,
2890,
16,
733,
4672,
309,
365,
18,
869,
67,
12210,
353,
599,
30,
1002,
1185,
2668,
6813,
353,
1652,
6931,
6134,
309,
486,
365,
18,
659,
67,
4106,
30,
365,
18,
758... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1612,
12,
2890,
16,
733,
4672,
309,
365,
18,
869,
67,
12210,
353,
599,
30,
1002,
1185,
2668,
6813,
353,
1652,
6931,
6134,
309,
486,
365,
18,
659,
67,
4106,
30,
365,
18,
758... |
bfile.close() | bfile.close() def getName(self): """ Get the catalog type name """ return S_OK(self.name) | def flush(self): """Flush the contents of the catalog to a file Flushes the contents of the catalog to a file from which the catalog was instanciated or which was set explicitely with setBackend() method """ if os.path.exists(self.backend_file): os.rename(self.backend_file,self.backend_file+'.bak') bfile = open(self.backend_file,'w') print >>bfile,self.toXML() bfile.close() | 15bf7dd6204f2cdb3b3b2146d62e93fe210c8af4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/15bf7dd6204f2cdb3b3b2146d62e93fe210c8af4/PoolXMLCatalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
12,
2890,
4672,
3536,
8207,
326,
2939,
434,
326,
6222,
358,
279,
585,
225,
11624,
281,
326,
2939,
434,
326,
6222,
358,
279,
585,
628,
1492,
326,
6222,
1703,
316,
541,
8450,
690,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
12,
2890,
4672,
3536,
8207,
326,
2939,
434,
326,
6222,
358,
279,
585,
225,
11624,
281,
326,
2939,
434,
326,
6222,
358,
279,
585,
628,
1492,
326,
6222,
1703,
316,
541,
8450,
690,
... |
m = umath.logical_and.accumulate(self.mask, axis) | m = umath.logical_or.accumulate(self.mask, axis) | def _cumprod(self, axis=0, dtype=None): m = self.mask if m is not nomask: m = umath.logical_and.accumulate(self.mask, axis) return MaskedArray(data = self.filled(1).cumprod(axis, dtype), mask=m) | 18c2a959e5ef86a576cc13470ac845174b57a39c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/18c2a959e5ef86a576cc13470ac845174b57a39c/ma.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
28538,
17672,
12,
2890,
16,
2654,
33,
20,
16,
3182,
33,
7036,
4672,
312,
273,
365,
18,
4455,
309,
312,
353,
486,
12457,
835,
30,
312,
273,
9570,
421,
18,
20300,
67,
280,
18,
898... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28538,
17672,
12,
2890,
16,
2654,
33,
20,
16,
3182,
33,
7036,
4672,
312,
273,
365,
18,
4455,
309,
312,
353,
486,
12457,
835,
30,
312,
273,
9570,
421,
18,
20300,
67,
280,
18,
898... |
if page['title'] != title: return None | def getRawArticle(self, title, revision=None): if revision is None: page = self.api_helper.page_query(titles=title, redirects=1, prop='revisions', rvprop='content') else: page = self.api_helper.page_query(revids=revision, prop='revisions', rvprop='content') if page is None: return None try: if page['title'] != title: return None return page['revisions'][0].values()[0] except KeyError: return None | c9069ecbcaba9017d079af21987f99ce7e917f2b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/c9069ecbcaba9017d079af21987f99ce7e917f2b/mwapidb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10547,
7880,
12,
2890,
16,
2077,
16,
6350,
33,
7036,
4672,
309,
6350,
353,
599,
30,
1363,
273,
365,
18,
2425,
67,
4759,
18,
2433,
67,
2271,
12,
17643,
33,
2649,
16,
18064,
33,
21,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10547,
7880,
12,
2890,
16,
2077,
16,
6350,
33,
7036,
4672,
309,
6350,
353,
599,
30,
1363,
273,
365,
18,
2425,
67,
4759,
18,
2433,
67,
2271,
12,
17643,
33,
2649,
16,
18064,
33,
21,
16... | |
candidates.sort(lambda a,b: cmp(self.atomCount[a.atomicNum], self.atomCount[a.atomicNum])) | candidates.sort(lambda a,b: cmp(self.atomCount[a.atomicNum], self.atomCount[b.atomicNum])) | def Initialize(self): """Initializes the search""" self.initialFragments=[] self.rings={} self.atomCount={} self.canonicalPruningSet={} candidates=[] ringCandidates=[] for mol in self.GetAllMolecules(): mol.rings=self.rings[mol]=list(mol.GetSSSR()) for ring in mol.rings: ring.fingerprint=set([mol.GetAtom(i).GetAtomicNum() for i in ring._path]) | 5777da743aa14fefa65bf5d15a355e209a496532 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/5777da743aa14fefa65bf5d15a355e209a496532/orngChem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9190,
12,
2890,
4672,
3536,
9685,
326,
1623,
8395,
365,
18,
6769,
27588,
33,
8526,
365,
18,
86,
899,
12938,
365,
18,
7466,
1380,
12938,
365,
18,
18288,
2050,
13036,
694,
12938,
7965,
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,
9190,
12,
2890,
4672,
3536,
9685,
326,
1623,
8395,
365,
18,
6769,
27588,
33,
8526,
365,
18,
86,
899,
12938,
365,
18,
7466,
1380,
12938,
365,
18,
18288,
2050,
13036,
694,
12938,
7965,
33,... |
self.mox.StubOutWithMock(gclient_utils, 'FileRead') self.mox.StubOutWithMock(gclient_utils, 'FileWrite') self.mox.StubOutWithMock(gclient_utils, 'SubprocessCall') self.mox.StubOutWithMock(gclient_utils, 'RemoveDirectory') | self.mox.StubOutWithMock(gclient.gclient_utils, 'FileRead') self.mox.StubOutWithMock(gclient.gclient_utils, 'FileWrite') self.mox.StubOutWithMock(gclient.gclient_utils, 'SubprocessCall') self.mox.StubOutWithMock(gclient.gclient_utils, 'RemoveDirectory') | def setUp(self): BaseTestCase.setUp(self) self.mox.StubOutWithMock(gclient.os.path, 'exists') self.mox.StubOutWithMock(gclient.os.path, 'isfile') self.mox.StubOutWithMock(gclient.os.path, 'isdir') self.mox.StubOutWithMock(gclient.os, 'remove') self.mox.StubOutWithMock(gclient.sys, 'stdout') self.mox.StubOutWithMock(gclient_utils, 'subprocess') # These are not tested. self.mox.StubOutWithMock(gclient_utils, 'FileRead') self.mox.StubOutWithMock(gclient_utils, 'FileWrite') self.mox.StubOutWithMock(gclient_utils, 'SubprocessCall') self.mox.StubOutWithMock(gclient_utils, 'RemoveDirectory') # Mock them to be sure nothing bad happens. self.mox.StubOutWithMock(gclient_scm, 'CaptureSVN') self._CaptureSVNInfo = gclient_scm.CaptureSVNInfo self.mox.StubOutWithMock(gclient_scm, 'CaptureSVNInfo') self.mox.StubOutWithMock(gclient_scm, 'CaptureSVNStatus') self.mox.StubOutWithMock(gclient_scm, 'RunSVN') self.mox.StubOutWithMock(gclient_scm, 'RunSVNAndGetFileList') self._gclient_gclient = gclient.GClient gclient.GClient = self.mox.CreateMockAnything() self._scm_wrapper = gclient_scm.CreateSCM gclient_scm.CreateSCM = self.mox.CreateMockAnything() | 90ba161b70b445eba62b2a376e4fa2f508854e13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/90ba161b70b445eba62b2a376e4fa2f508854e13/gclient_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
3360,
4709,
2449,
18,
542,
1211,
12,
2890,
13,
365,
18,
81,
2409,
18,
11974,
1182,
1190,
9865,
12,
75,
2625,
18,
538,
18,
803,
16,
296,
1808,
6134,
365,
18,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
3360,
4709,
2449,
18,
542,
1211,
12,
2890,
13,
365,
18,
81,
2409,
18,
11974,
1182,
1190,
9865,
12,
75,
2625,
18,
538,
18,
803,
16,
296,
1808,
6134,
365,
18,
81... |
if not m.eval('objExists "%s";'%(attrpath,)): | if not cmd.objExists(attrpath): | def __init__( self, attrpath, keyTime=None, keyIdx=None ): #if the attrpath doesn't exist, then just create an empty key instance if not m.eval('objExists "%s";'%(attrpath,)): self.obj = None self.attr = None self.time = None self.value = None self.iw = None self.ow = None self.itt = None self.ott = None self.time = None return | 8781a673d03469676f09284ae55510ab6d71bde7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1810/8781a673d03469676f09284ae55510ab6d71bde7/keyUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
1604,
803,
16,
498,
950,
33,
7036,
16,
498,
4223,
33,
7036,
262,
30,
468,
430,
326,
1604,
803,
3302,
1404,
1005,
16,
1508,
2537,
752,
392,
1008,
498,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
365,
16,
1604,
803,
16,
498,
950,
33,
7036,
16,
498,
4223,
33,
7036,
262,
30,
468,
430,
326,
1604,
803,
3302,
1404,
1005,
16,
1508,
2537,
752,
392,
1008,
498,
79... |
self.plugin.menuDlg.ShowMenu( | self.event = CreateEvent(None, 0, 0, None) wx.CallAfter(self.plugin.menuDlg.ShowMenu, | def OnButton(event): self.plugin.choices = self.choices self.plugin.menuDlg = Menu() self.plugin.menuDlg.ShowMenu( self.plugin, self.choices, foreColourButton.GetValue(), backColourButton.GetValue(), fontButton.GetValue(), True ) | e1fa4c9b0e24e89f67c1d855207a1876617f94d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/e1fa4c9b0e24e89f67c1d855207a1876617f94d1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
3616,
12,
2575,
4672,
365,
18,
4094,
18,
11937,
273,
365,
18,
11937,
365,
18,
4094,
18,
5414,
40,
23623,
273,
9809,
1435,
365,
18,
2575,
273,
1788,
1133,
12,
7036,
16,
374,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
3616,
12,
2575,
4672,
365,
18,
4094,
18,
11937,
273,
365,
18,
11937,
365,
18,
4094,
18,
5414,
40,
23623,
273,
9809,
1435,
365,
18,
2575,
273,
1788,
1133,
12,
7036,
16,
374,
16,
... |
v.SetCaptureFormat(SV.RGB_FRAMES) v.SetCaptureMode(SV.BLOCKING_CAPTURE) v.SetQueueSize(QSIZE) v.InitCapture() if v.GetQueueSize() != QSIZE: QSIZE = v.GetQueueSize() print 'Warning: QSIZE reduced to', QSIZE | def main(): QSIZE = 16 TIME = 5 audio = 0 num, den = 1, 1 opts, args = getopt.getopt(sys.argv[1:], 'aq:r:t:') for opt, arg in opts: if opt == '-a': audio = 1 elif opt == '-q': QSIZE = string.atoi(arg) elif opt == '-r': [nstr, dstr] = string.splitfields(arg, '/') num, den = string.atoi(nstr), string.atoi(dstr) elif opt == '-t': TIME = string.atoi(arg) if args[2:]: sys.stderr.write('usage: Vrec [options] [file [audiofile]]\n') sys.exit(2) if args: filename = args[0] else: filename = 'film.video' if args[1:] and not audio: sys.stderr.write('-a turned on by appearance of 2nd file\n') audio = 1 if audio: if args[1:]: audiofilename = args[1] else: audiofilename = 'film.aiff' else: audiofilename = None gl.foreground() x, y = SV.PAL_XMAX / 4, SV.PAL_YMAX / 4 print x, 'x', y gl.minsize(40, 30) gl.stepunit(8, 6) gl.maxsize(SV.PAL_XMAX, SV.PAL_YMAX) gl.keepaspect(SV.PAL_XMAX, SV.PAL_YMAX) win = gl.winopen(filename) x, y = gl.getsize() print x, 'x', y v = sv.OpenVideo() v.BindGLWindow(win, SV.IN_REPLACE) v.SetSize(x, y) v.BindGLWindow(win, SV.IN_REPLACE) v.SetCaptureFormat(SV.RGB_FRAMES) v.SetCaptureMode(SV.BLOCKING_CAPTURE) v.SetQueueSize(QSIZE) v.InitCapture() if v.GetQueueSize() != QSIZE: QSIZE = v.GetQueueSize() print 'Warning: QSIZE reduced to', QSIZE | dd2d726866c36f9ef98e011ae9958f47d4411fed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dd2d726866c36f9ef98e011ae9958f47d4411fed/Vrec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2238,
4574,
273,
2872,
8721,
273,
1381,
7447,
273,
374,
818,
16,
5545,
273,
404,
16,
404,
225,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2238,
4574,
273,
2872,
8721,
273,
1381,
7447,
273,
374,
818,
16,
5545,
273,
404,
16,
404,
225,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
... | |
Parameters: i1 : any item of data i2 : an item to compare with i1, this may be some plain data or an object derived from deep.Comparator Returns: A true or false value Operation: 1 Return true if i1 and i2 are the same object (using id()). 2 If we have compared i1 and i2 before we return the value we returned previously, from a cache. 3 If i2 is not already derived from deep.Comparator, wrap it in an appropriate comarator object and call that i2. 4 Ask the comparator i2 if it considers i1 to be equal. Circular structures are handled by stage 2 above and the fact that when we encounter a previously unseen pair (i1, i2) we set their cached result to true. This is effectively "assume i1 == i2 unless we can prove otherwise". Eventually we will come back out of the circular structure and if we couldn't find an differences then it really was true. | Parameters: i1 : any item of data i2 : an item to compare with i1, this may be some plain data, an object derived from deep.Comparator or a mix of both. Returns: A true or false value Operation: 1 Return true if i1 and i2 are the same object (using id()). 2 If we have compared i1 and i2 before we return the value we returned previously, from a cache. 3 If i2 is not already derived from deep.Comparator, wrap it in an appropriate comarator object and call that i2. 4 Ask the comparator i2 if it considers i1 to be equal. Circular structures are handled by stage 2 above and the fact that when we encounter a previously unseen pair (i1, i2) we set their cached result to true. This is effectively "assume i1 == i2 unless we can prove otherwise". Eventually we will come back out of the circular structure and if we couldn't find an differences then it really was true. | def descend(self, i1, i2): """ Parameters: i1 : any item of data i2 : an item to compare with i1, this may be some plain data or an object derived from deep.Comparator Returns: A true or false value | 2e7b15abd167a17bf8f880c7e0bd7891362e04de /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/873/2e7b15abd167a17bf8f880c7e0bd7891362e04de/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10653,
12,
2890,
16,
277,
21,
16,
277,
22,
4672,
3536,
7012,
30,
277,
21,
294,
1281,
761,
434,
501,
277,
22,
294,
392,
761,
358,
3400,
598,
277,
21,
16,
333,
2026,
506,
2690,
7351,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10653,
12,
2890,
16,
277,
21,
16,
277,
22,
4672,
3536,
7012,
30,
277,
21,
294,
1281,
761,
434,
501,
277,
22,
294,
392,
761,
358,
3400,
598,
277,
21,
16,
333,
2026,
506,
2690,
7351,
... |
for i in range(len(longopts)): if longopts[i].startswith(opt): break else: | possibilities = [o for o in longopts if o.startswith(opt)] if not possibilities: | def long_has_args(opt, longopts): for i in range(len(longopts)): if longopts[i].startswith(opt): break else: raise GetoptError('option --%s not recognized' % opt, opt) # opt is a prefix of longopts[i]; find j s.t. opt is a prefix of # each possibility in longopts[i:j] j = i+1 while j < len(longopts) and longopts[j].startswith(opt): j += 1 possibilities = longopts[i:j] # Is there an exact match? if opt in possibilities: return 0, opt elif opt + '=' in possibilities: return 1, opt # No exact match, so better be unique. if len(possibilities) > 1: # XXX since possibilities contains all valid continuations, might be # nice to work them into the error msg raise GetoptError('option --%s not a unique prefix' % opt, opt) assert len(possibilities) == 1 unique_match = possibilities[0] has_arg = unique_match.endswith('=') if has_arg: unique_match = unique_match[:-1] return has_arg, unique_match | 96490d9a859d22ad6be6f1c47719422a31e5066c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/96490d9a859d22ad6be6f1c47719422a31e5066c/getopt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1525,
67,
5332,
67,
1968,
12,
3838,
16,
1525,
4952,
4672,
28550,
273,
306,
83,
364,
320,
316,
1525,
4952,
309,
320,
18,
17514,
1918,
12,
3838,
25887,
309,
486,
28550,
30,
1002,
968,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1525,
67,
5332,
67,
1968,
12,
3838,
16,
1525,
4952,
4672,
28550,
273,
306,
83,
364,
320,
316,
1525,
4952,
309,
320,
18,
17514,
1918,
12,
3838,
25887,
309,
486,
28550,
30,
1002,
968,
38... |
message = _("Can't back config file up, error: %s") % error print message if self.frame: self.frame.logMessage(message) | log.addwarning(_("Can't back config file up, error: %s") % error) | def writeConfig(self): self.config_lock.acquire() for i in self.sections.keys(): if not self.parser.has_section(i): self.parser.add_section(i) for j in self.sections[i].keys(): if j not in ["sharedfiles", "sharedfilesstreams", "wordindex", "fileindex", "sharedmtimes", "bsharedfiles", "bsharedfilesstreams", "bwordindex", "bfileindex", "bsharedmtimes"]: self.parser.set(i, j, self.sections[i][j]) else: self.parser.remove_option(i, j) path, fn = os.path.split(self.filename) try: if not os.path.isdir(path): os.makedirs(path) except OSError, msg: message = _("Can't create directory '%(path)s', reported error: %(error)s") % {'path':path, 'error':msg} print message if self.frame: self.frame.logMessage(message) oldumask = os.umask(0077) try: f = open(self.filename + ".new", "w") except IOError, e: message = _("Can't save config file, I/O error: %s") % e print message if self.frame: self.frame.logMessage(message) self.config_lock.release() return else: try: self.parser.write(f) except IOError, e: message = _("Can't save config file, I/O error: %s") % e print message if self.frame: self.frame.logMessage(message) self.config_lock.release() return else: f.close() os.umask(oldumask) # A paranoid precaution since config contains the password try: os.chmod(self.filename, 0600) except: pass try: s = os.stat(self.filename) if s.st_size > 0: try: if os.path.exists(self.filename + ".old"): os.remove(self.filename + ".old") except OSError, error: message = _("Can't remove %s" % self.filename + ".old") print message if self.frame: self.frame.logMessage(message) try: os.rename(self.filename, self.filename + ".old") except OSError, error: message = _("Can't back config file up, error: %s") % error print message if self.frame: self.frame.logMessage(message) except OSError: pass try: os.rename(self.filename + ".new", self.filename) except OSError, error: message = _("Can't rename config file, error: %s") % error print message if self.frame: self.frame.logMessage(message) self.config_lock.release() | d03b1060449a904912df2e17c0cce7abc6348d8f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/d03b1060449a904912df2e17c0cce7abc6348d8f/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
809,
12,
2890,
4672,
365,
18,
1425,
67,
739,
18,
1077,
1039,
1435,
364,
277,
316,
365,
18,
11657,
18,
2452,
13332,
309,
486,
365,
18,
4288,
18,
5332,
67,
3464,
12,
77,
4672,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
809,
12,
2890,
4672,
365,
18,
1425,
67,
739,
18,
1077,
1039,
1435,
364,
277,
316,
365,
18,
11657,
18,
2452,
13332,
309,
486,
365,
18,
4288,
18,
5332,
67,
3464,
12,
77,
4672,
36... |
new_contact = contactform.save() | new_contact = contactform.save(commit=False) new_contact.creator = request.user new_contact.save() | def step_8(request, trial_pk): ct = get_object_or_404(ClinicalTrial, id=int(trial_pk)) contact_type = { 'PublicContact': (PublicContact,make_public_contact_form(request.user)), 'ScientificContact': (ScientificContact,make_scientifc_contact_form(request.user)), 'SiteContact': (SiteContact,make_site_contact_form(request.user)) } InlineFormSetClasses = [] for model,form in contact_type.values(): InlineFormSetClasses.append( inlineformset_factory(ClinicalTrial,model,form=form,can_delete=True,extra=EXTRA_FORMS) ) ContactFormSet = modelformset_factory(Contact, form=make_contact_form(request.user), extra=1) contact_qs = Contact.objects.none() if request.POST: inlineformsets = [fs(request.POST,instance=ct) for fs in InlineFormSetClasses] new_contact_formset = ContactFormSet(request.POST,queryset=contact_qs) if not False in [fs.is_valid() for fs in inlineformsets] \ and new_contact_formset.is_valid(): for contactform in new_contact_formset.forms: if contactform.cleaned_data: Relation = contact_type[contactform.cleaned_data.pop('relation')][0] new_contact = contactform.save() Relation.objects.create(trial=ct,contact=new_contact) for fs in inlineformsets: fs.save() check_trial_fields(sender=ClinicalTrial,instance=ct) return HttpResponseRedirect(reverse('step_8',args=[trial_pk])) else: inlineformsets = [fs(instance=ct) for fs in InlineFormSetClasses] new_contact_formset = ContactFormSet(queryset=contact_qs) formsets = inlineformsets + [new_contact_formset] return render_to_response('repository/trial_form.html', {'formsets':formsets, 'trial_pk':trial_pk, 'title':TRIAL_FORMS[7], 'steps': step_list(trial_pk), 'remarks':Remark.opened.filter(submission=ct.submission,context=slugify(TRIAL_FORMS[7])), 'default_second_language': ct.submission.get_secondary_language(), 'available_languages': [lang.lower() for lang in ct.submission.get_mandatory_languages()],}, context_instance=RequestContext(request)) | 67c3aa511f5c9bb1bf301c1b99d88ba1ce257148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12441/67c3aa511f5c9bb1bf301c1b99d88ba1ce257148/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2235,
67,
28,
12,
2293,
16,
12950,
67,
5465,
4672,
5691,
273,
336,
67,
1612,
67,
280,
67,
11746,
12,
2009,
267,
1706,
6251,
287,
16,
612,
33,
474,
12,
17493,
67,
5465,
3719,
225,
538... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2235,
67,
28,
12,
2293,
16,
12950,
67,
5465,
4672,
5691,
273,
336,
67,
1612,
67,
280,
67,
11746,
12,
2009,
267,
1706,
6251,
287,
16,
612,
33,
474,
12,
17493,
67,
5465,
3719,
225,
538... |
print str(e) | debug.critical(str(e)) | def check_dependencies(self, index): """ determines if current VisTrail will be supported by the repository's VisTrail server """ | f2c524b1f99dd206d3cc04ebfb6cb554feee2d88 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/f2c524b1f99dd206d3cc04ebfb6cb554feee2d88/repository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
11037,
12,
2890,
16,
770,
4672,
3536,
12949,
309,
783,
8077,
18107,
903,
506,
3260,
635,
326,
3352,
1807,
8077,
18107,
1438,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
11037,
12,
2890,
16,
770,
4672,
3536,
12949,
309,
783,
8077,
18107,
903,
506,
3260,
635,
326,
3352,
1807,
8077,
18107,
1438,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.charEncoding = ("utf-8", "certian") | self.charEncoding = ("utf-8", "certain") | def openStream(self, source): """Produces a file object from source. | 8fd2e83ea83743d331dd500a10a2afd65333ffb6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4487/8fd2e83ea83743d331dd500a10a2afd65333ffb6/inputstream.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25900,
12,
2890,
16,
1084,
4672,
3536,
27291,
279,
585,
733,
628,
1084,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25900,
12,
2890,
16,
1084,
4672,
3536,
27291,
279,
585,
733,
628,
1084,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not dict[field] == d_name : if self.logger: self.logger.ReportFailure("(On display name Checking) || object title = %s ; expected title = %s" %(d_name, dict[field])) | if not value == d_name : if self.logger: self.logger.ReportFailure("(On display name Checking) || object title = %s ; expected title = %s" %(d_name, value)) | def Check_Object(self, dict): """ Check expected value by comparison to the data contained in the object attributes @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) # check the changing values for field in dict.keys(): if field == "displayName": # display name checking if self.isMailMessage: d_name = "%s" %self.item.subject else: d_name = "%s" %self.item.displayName if not dict[field] == d_name : if self.logger: self.logger.ReportFailure("(On display name Checking) || object title = %s ; expected title = %s" %(d_name, dict[field])) else: if self.logger: self.logger.ReportPass("(On display name Checking)") elif field == "startDate": # start date checking startTime = self.item.startTime s_date = self.formatDate("%s/%s/%s" %(startTime.month, startTime.day, startTime.year) ) dictDate = self.formatDate(dict[field]) if not dictDate == s_date : if self.logger: self.logger.ReportFailure("(On start date Checking) || object start date = %s ; expected start date = %s" %(s_date, dictDate)) else: if self.logger: self.logger.ReportPass("(On start date Checking)") elif field == "startTime": # start time checking startTime = self.item.startTime s_time = getTime(startTime) if not dict[field] == s_time : if self.logger: self.logger.ReportFailure("(On start time Checking) || object start time = %s ; expected start time = %s" %(s_time, dict[field])) else: if self.logger: self.logger.ReportPass("(On start time Checking)") elif field == "endDate": # end date checking endTime = self.item.endTime e_date = self.formatDate("%s/%s/%s" %(endTime.month, endTime.day, endTime.year)) dictDate = self.formatDate(dict[field]) if not dictDate == e_date : if self.logger: self.logger.ReportFailure("(On end date Checking) || object end date = %s ; expected end date = %s" %(e_date, dictDate)) else: if self.logger: self.logger.ReportPass("(On end date Checking)") elif field == "endTime": # end time checking endTime = self.item.endTime e_time = getTime(endTime) if not dict[field] == e_time : if self.logger: self.logger.ReportFailure("(On end time Checking) || object end time = %s ; expected end time = %s" %(e_time, dict[field])) else: if self.logger: self.logger.ReportPass("(On end time Checking)") elif field == "location": # location checking loc = "%s" %self.item.location if not dict[field] == loc : if self.logger: self.logger.ReportFailure("(On location Checking) || object location = %s ; expected location = %s" %(loc, dict[field])) else: if self.logger: self.logger.ReportPass("(On location Checking)") elif field == "body": # body checking body = "%s" %self.item.body if not dict[field] == body : if self.logger: self.logger.ReportFailure("(On body Checking) || object body = %s ; expected body = %s" %(body, dict[field])) else: if self.logger: self.logger.ReportPass("(On body Checking)") elif field == "fromAddress": # from address checking f = "%s" %self.item.fromAddress if not dict[field] == f : if self.logger: self.logger.ReportFailure("(On from address Checking) || object from address = %s ; expected from address = %s" %(f, dict[field])) else: if self.logger: self.logger.ReportPass("(On from address Checking)") elif field == "toAddress": # to address checking t = "%s" %self.item.toAddress if not dict[field] == t : if self.logger: self.logger.ReportFailure("(On to address Checking) || object to address = %s ; expected to address = %s" %(t, dict[field])) else: if self.logger: self.logger.ReportPass("(On to address Checking)") elif field == "status": # status checking status = "%s" %string.upper(self.item.transparency) if not dict[field] == status : if self.logger: self.logger.ReportFailure("(On status Checking) || object status = %s ; expected status = %s" %(status, dict[field])) else: if self.logger: self.logger.ReportPass("(On status Checking)") elif field == "timeZone": # time zone checking timeZone = "%s" %self.item.startTime.tzname() if not dict[field] == timeZone : if self.logger: self.logger.ReportFailure("(On time zone Checking) || object time zone = %s ; expected time zone = %s" %(timeZone, dict[field])) else: if self.logger: self.logger.ReportPass("(On time zone Checking)") elif field == "alarm": # status checking alarm = self.item.startTime - self.item.reminderTime field = timedelta(minutes = string.atoi(dict[field])) if not field == alarm : if self.logger: self.logger.ReportFailure("(On alarm Checking) || object alarm = %s ; expected alarm = %s" %(alarm, field)) else: if self.logger: self.logger.ReportPass("(On alarm Checking)") elif field == "allDay": # status checking allDay = self.item.allDay if not dict[field] == allDay : if self.logger: self.logger.ReportFailure("(On all Day Checking) || object all day = %s ; expected all day = %s" %(allDay, dict[field])) else: if self.logger: self.logger.ReportPass("(On all Day Checking)") elif field == "stampMail": # Mail stamp checking kind = "%s" %self.item.getKind() if not string.find(kind, "MailMessage") == -1: stampMail = True else: stampMail = False if not dict[field] == stampMail : if self.logger: self.logger.ReportFailure("(On Mail Stamp Checking) || object Mail Stamp = %s ; expected Mail Stamp = %s" %(stampMail, dict[field])) else: if self.logger: self.logger.ReportPass("(On Mail Stamp Checking)") elif field == "stampTask": # Task stamp checking kind = "%s" %self.item.getKind() if not string.find(kind, "Task") == -1: stampTask = True else: stampTask = False if not dict[field] == stampTask : if self.logger: self.logger.ReportFailure("(On Task Stamp Checking) || object Task Stamp = %s ; expected Task Stamp = %s" %(stampTask, dict[field])) else: if self.logger: self.logger.ReportPass("(On Task Stamp Checking)") elif field == "stampEvent": # Event stamp checking kind = "%s" %self.item.getKind() if not string.find(kind, "CalendarEvent") == -1: stampEvent = True else: stampEvent = False if not dict[field] == stampEvent : if self.logger: self.logger.ReportFailure("(On Event Stamp Checking) || object Event Stamp = %s ; expected Event Stamp = %s" %(stampEvent, dict[field])) else: if self.logger: self.logger.ReportPass("(On Event Stamp Checking)") else: # Wrong check => set the report state to unchecked if self.logger: self.logger.SetChecked(False) #report the checkings if self.logger: self.logger.Report("Object state") | 5c6ba404b99947f3210082287c79a9b81a402c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5c6ba404b99947f3210082287c79a9b81a402c26/QAUITestAppLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
67,
921,
12,
2890,
16,
2065,
4672,
3536,
2073,
2665,
460,
635,
5826,
358,
326,
501,
7542,
316,
326,
733,
1677,
632,
723,
2065,
294,
3880,
632,
891,
2065,
294,
3880,
598,
2665,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
67,
921,
12,
2890,
16,
2065,
4672,
3536,
2073,
2665,
460,
635,
5826,
358,
326,
501,
7542,
316,
326,
733,
1677,
632,
723,
2065,
294,
3880,
632,
891,
2065,
294,
3880,
598,
2665,
76... |
if (len(projection) + iteration > self.locOptMaxAttrsInProj): continue | if (len(projection) + iteration > self.locOptMaxAttrsInProj): continue | def optimizeBestProjections(self, restartWhenImproved = 1): random.seed(0) # always use the same seed to make results repeatable count = min(len(self.results), self.locOptProjCount) if not count: return self.correctSettingsIfNecessary() self.optimizedProjectionsCount = 0 """ if self.optimizeTimeLimit == self.optimizeProjectionLimit == 0: print "Optimization of projections was started without any time or projection restrictions. To prevent an indefinite projection optimization a time limit of 2 hours was set." self.optimizeProjectionLimit = 2 * 60 """ if self.__class__.__name__ == "OWVizRank": self.disableControls() from qt import qApp attrs = [self.results[i][ATTR_LIST] for i in range(count)] # create a list of attributes that are in the top projections attrs = [[self.attributeNameIndex[name] for name in projection] for projection in attrs] # find indices from the attribute names accuracys = [self.getProjectionQuality(self.results[i][ATTR_LIST])[0] for i in range(count)] projections = [(accuracys[i], attrs[i]) for i in range(len(accuracys))] | b9e52e096e6043bf925f92bc9842c2a83b088af5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/b9e52e096e6043bf925f92bc9842c2a83b088af5/orngVizRank.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10979,
14173,
14789,
87,
12,
2890,
16,
7870,
9434,
1170,
685,
2155,
273,
404,
4672,
2744,
18,
12407,
12,
20,
13,
1377,
468,
3712,
999,
326,
1967,
5009,
358,
1221,
1686,
7666,
429,
1056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10979,
14173,
14789,
87,
12,
2890,
16,
7870,
9434,
1170,
685,
2155,
273,
404,
4672,
2744,
18,
12407,
12,
20,
13,
1377,
468,
3712,
999,
326,
1967,
5009,
358,
1221,
1686,
7666,
429,
1056,
... |
rng_seed = numpy.random.RandomState(234).randint(2**30) | rng_seed = numpy.random.RandomState(utt.fetch_seed()).randint(2**30) | def test_shuffle_row_elements(self): """Test that RandomStreams.shuffle_row_elements generates the right results""" # Check over two calls to see if the random state is correctly updated. | 767a7312c152b7ed8872e5185c2457d0aa95a8d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/767a7312c152b7ed8872e5185c2457d0aa95a8d0/test_shared_randomstreams.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
31980,
67,
492,
67,
6274,
12,
2890,
4672,
3536,
4709,
716,
8072,
10301,
18,
31980,
67,
492,
67,
6274,
6026,
326,
2145,
1686,
8395,
468,
2073,
1879,
2795,
4097,
358,
2621,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
31980,
67,
492,
67,
6274,
12,
2890,
4672,
3536,
4709,
716,
8072,
10301,
18,
31980,
67,
492,
67,
6274,
6026,
326,
2145,
1686,
8395,
468,
2073,
1879,
2795,
4097,
358,
2621,
309,
... |
sqlString=queryString%(ifo,segName,gpsStop,gpsStart) | sqlString=queryString%(segName,ifo,gpsStop,gpsStart) | def getSciSegs(serverURL="ldbd://metaserver.phy.syr.edu:30015", ifo=None, gpsStart=None, gpsStop=None, cut=bool(False), segName="Science"): """ This method is designed to query the server specified by SERVERURL. The method will return the segments that are between and overlaping with the variable gpsStart and gpsStop. If the flag cut is specified to be True then the returned lists will be cut so that the times are between gpsStart and gpsStop inclusive. In addition to these required arguments you must also specify in a text string the IFO of interest. Valid entries are L1 H1 V1 , but only one IFO at a time can be specified. You can call this method by specifying specific keyswords ifo,gpsStart,gpsStop,cut,serverURL. For example to call using no segment cuts and the default URL try: x=getSciSegs(gpsStart=987654321,gpsStop=876543210) A query failure will give an error but no records found for the options specified will return an empty list. """ if sum([x==None for x in (ifo,gpsStart,gpsStop)])>0: sys.stderr.write("Invalid arguments given to getSciSegs.\n") return None ifo=ifo.strip() queryString="""SELECT \ | ef9d2fcafb4af0490af1dba41f324af95145f526 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/ef9d2fcafb4af0490af1dba41f324af95145f526/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
8450,
1761,
564,
12,
3567,
1785,
1546,
1236,
16410,
2207,
10578,
345,
12330,
18,
844,
93,
18,
9009,
86,
18,
28049,
30,
19249,
3600,
3113,
21479,
33,
7036,
16,
20985,
1685,
33,
7036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
8450,
1761,
564,
12,
3567,
1785,
1546,
1236,
16410,
2207,
10578,
345,
12330,
18,
844,
93,
18,
9009,
86,
18,
28049,
30,
19249,
3600,
3113,
21479,
33,
7036,
16,
20985,
1685,
33,
7036... |
if child is not None: for y in rec(child): yield y; | yield child for y in rec(child): yield y; | def rec(x): for i in x.index_set(): child = x.f(i); if child is None: break hasParent = False; for j in x.index_set(): if j == i: break if not child.e(j) == None: hasParent = True break if hasParent: break; if child is not None: for y in rec(child): yield y; | 04edc759747c68c339fa59f7829bbea243b35a60 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/04edc759747c68c339fa59f7829bbea243b35a60/crystals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1950,
12,
92,
4672,
364,
277,
316,
619,
18,
1615,
67,
542,
13332,
1151,
273,
619,
18,
74,
12,
77,
1769,
309,
1151,
353,
599,
30,
898,
711,
3054,
273,
1083,
31,
364,
525,
316,
619,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1950,
12,
92,
4672,
364,
277,
316,
619,
18,
1615,
67,
542,
13332,
1151,
273,
619,
18,
74,
12,
77,
1769,
309,
1151,
353,
599,
30,
898,
711,
3054,
273,
1083,
31,
364,
525,
316,
619,
... |
self._ui.initialise_program_table() | self._ui.initialise_program_table() def on_increaseWidthButton_clicked(self,*args): self._ui.increase_width() def on_decreaseWidthButton_clicked(self,*args): self._ui.decrease_width() def on_increaseHeightButton_clicked(self,*args): self._ui.increase_height() def on_decreaseHeightButton_clicked(self,*args): self._ui.decrease_height() | def on_programTable_expose_event(self, widget, event): #Add event boxes to program table self._ui.initialise_program_table() | 957e250090c79f4ca933e19b75d4fe9659153717 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1947/957e250090c79f4ca933e19b75d4fe9659153717/ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
12890,
1388,
67,
338,
4150,
67,
2575,
12,
2890,
16,
3604,
16,
871,
4672,
468,
986,
871,
14356,
358,
5402,
1014,
365,
6315,
4881,
18,
6769,
784,
67,
12890,
67,
2121,
1435,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
12890,
1388,
67,
338,
4150,
67,
2575,
12,
2890,
16,
3604,
16,
871,
4672,
468,
986,
871,
14356,
358,
5402,
1014,
365,
6315,
4881,
18,
6769,
784,
67,
12890,
67,
2121,
1435,
225,... |
print 'Making ', os.path.join(dir, '.Trash', subdir) | def initializeMaildir(dir): if not os.path.isdir(dir): os.mkdir(dir) for subdir in ['new', 'cur', 'tmp', '.Trash']: print 'Making ', os.path.join(dir, subdir) os.mkdir(os.path.join(dir, subdir)) for subdir in ['new', 'cur', 'tmp']: print 'Making ', os.path.join(dir, '.Trash', subdir) os.mkdir(os.path.join(dir, '.Trash', subdir)) # touch open(os.path.join(dir, '.Trash', 'maildirfolder'), 'w').close() | f62141284f70e03e38c8b10f4f5067d1711d8d0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f62141284f70e03e38c8b10f4f5067d1711d8d0a/maildir.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
49,
69,
545,
481,
12,
1214,
4672,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
1214,
4672,
1140,
18,
26686,
12,
1214,
13,
364,
16921,
316,
10228,
2704,
2187,
296,
1397,
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,
4046,
49,
69,
545,
481,
12,
1214,
4672,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
1214,
4672,
1140,
18,
26686,
12,
1214,
13,
364,
16921,
316,
10228,
2704,
2187,
296,
1397,
2187,
296,... | |
self.assert_(self.p.pageWithName('IssueNo0002 b')) self.p.folder().short_issue_names = 1 self.p.createNextIssue('c') self.assert_(self.p.pageWithName(' self.assertEqual(self.p.issueCount(),3) | self.assert_(self.p.pageWithName(' self.assertEqual(self.p.issueCount(),2) | def test_createNextIssue(self): self.p.createNextIssue('b') self.assert_(self.p.pageWithName('IssueNo0002 b')) self.p.folder().short_issue_names = 1 self.p.createNextIssue('c') self.assert_(self.p.pageWithName('#3 c')) self.assertEqual(self.p.issueCount(),3) | acf69133db82e469c655bf35fecc93d49ca297d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/acf69133db82e469c655bf35fecc93d49ca297d8/tracker_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2640,
2134,
12956,
12,
2890,
4672,
365,
18,
84,
18,
2640,
2134,
12956,
2668,
70,
6134,
365,
18,
11231,
67,
12,
2890,
18,
84,
18,
2433,
17557,
2668,
12956,
2279,
17954,
324,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2640,
2134,
12956,
12,
2890,
4672,
365,
18,
84,
18,
2640,
2134,
12956,
2668,
70,
6134,
365,
18,
11231,
67,
12,
2890,
18,
84,
18,
2433,
17557,
2668,
12956,
2279,
17954,
324,
2... |
self.assertEquals(sms_partials[i].get_length(), simplsms_partials[i].get_length()) | assert sms_partials[i].get_length() == simplsms_partials[i].get_length() | def test_sms_analyze(self): """test_sms_analyzebt43lztar Make sure that the simplsms.sms_analyze function does the same thing as the sms_analyze function from libsms.""" audio, sampling_rate = self.get_audio() | f0576d53f10832adb8a491f85ec86d2219a621bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10871/f0576d53f10832adb8a491f85ec86d2219a621bf/sms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
20984,
67,
304,
9508,
12,
2890,
4672,
3536,
3813,
67,
20984,
67,
304,
9508,
23602,
8942,
80,
94,
11718,
4344,
3071,
716,
326,
9330,
20984,
18,
20984,
67,
304,
9508,
445,
1552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20984,
67,
304,
9508,
12,
2890,
4672,
3536,
3813,
67,
20984,
67,
304,
9508,
23602,
8942,
80,
94,
11718,
4344,
3071,
716,
326,
9330,
20984,
18,
20984,
67,
304,
9508,
445,
1552,
... |
self.write_breadcrumbs(out, 'help') | self.write_breadcrumbs(out, 'help', 'help.html') | def write_help(self, out): """ Write an HTML help file to the given stream. If C{self._helpfile} contains a help file, then use it; otherwise, use the default helpfile from L{epydoc.docwriter.html_help}. @param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. """ # todo: optionally parse .rst etc help files? # Get the contents of the help file. if self._helpfile: if os.path.exists(self._helpfile): try: help = open(self._helpfile).read() except: raise IOError("Can't open help file: %r" % self._helpfile) else: raise IOError("Can't find help file: %r" % self._helpfile) else: if self._prj_name: thisprj = self._prj_name else: thisprj = 'this project' help = HTML_HELP % {'this_project':thisprj} | 5651a6f4c9af655549cee3af81b7c2c1e48b85d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5651a6f4c9af655549cee3af81b7c2c1e48b85d8/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
5201,
12,
2890,
16,
596,
4672,
3536,
2598,
392,
3982,
2809,
585,
358,
326,
864,
1407,
18,
225,
971,
385,
95,
2890,
6315,
5201,
768,
97,
1914,
279,
2809,
585,
16,
1508,
999,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5201,
12,
2890,
16,
596,
4672,
3536,
2598,
392,
3982,
2809,
585,
358,
326,
864,
1407,
18,
225,
971,
385,
95,
2890,
6315,
5201,
768,
97,
1914,
279,
2809,
585,
16,
1508,
999,
... |
return "SR(%d,%d,%d,%d)"%(self._n,self._r,self._c,self._e) | return "SR(%d,%d,%d,%d)"%(self._n, self._r, self._c, self._e) | def _repr_(self): """ EXAMPLES: sage: sr = mq.SR(1,2,2,4); sr #indirect doctest SR(1,2,2,4) sage: sr = mq.SR(1,2,2,4, star=True); sr SR*(1,2,2,4) """ if self._star: return "SR*(%d,%d,%d,%d)"%(self._n,self._r,self._c,self._e) else: return "SR(%d,%d,%d,%d)"%(self._n,self._r,self._c,self._e) | cd82551727ddbae04c5b28f55b59ec14654a84ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd82551727ddbae04c5b28f55b59ec14654a84ab/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12715,
67,
12,
2890,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
9133,
273,
18327,
18,
10090,
12,
21,
16,
22,
16,
22,
16,
24,
1769,
9133,
468,
728,
867,
31263,
395,
19145,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12715,
67,
12,
2890,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
9133,
273,
18327,
18,
10090,
12,
21,
16,
22,
16,
22,
16,
24,
1769,
9133,
468,
728,
867,
31263,
395,
19145,
... |
self.conn.send("rcpt to:<%s>\n" % person) | self.conn.send("rcpt to:<%s>\015\012" % person) | def send(self, mfrom, mto, subj='No Subject', body='Blank Message'): self.conn.send("mail from:<%s>\n" % mfrom) self._check() if type(mto) in [types.ListType, types.TupleType]: for person in mto: self.conn.send("rcpt to:<%s>\n" % person) self._check() else: self.conn.send("rcpt to:<%s>\n" % mto) self._check() self.conn.send("data\n") self._check() self.conn.send(body) self.conn.send("\n.\n") self._check('354') | 0cd72037947e4b20833b896769634c2951088c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0cd72037947e4b20833b896769634c2951088c4f/MailHost.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
2890,
16,
312,
2080,
16,
312,
869,
16,
15333,
2218,
2279,
9912,
2187,
1417,
2218,
7796,
2350,
11,
4672,
365,
18,
4646,
18,
4661,
2932,
4408,
628,
22292,
9,
87,
5333,
82,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
2890,
16,
312,
2080,
16,
312,
869,
16,
15333,
2218,
2279,
9912,
2187,
1417,
2218,
7796,
2350,
11,
4672,
365,
18,
4646,
18,
4661,
2932,
4408,
628,
22292,
9,
87,
5333,
82,
6,
... |
fraction = busyFractions.get(offset, 0.25) | fraction = busyFractions.get(offset, 0.0) fraction = max(fraction, 0.25) | def updateBusy(event, start): # Broken out into a separate function because we're going # to call it for each non-recurring events, and for each # individual occurrence of all the recurring events. # In the case of the latter, event may be the master, or # a modification; we're trying to avoid creating all the # items for individual computed occurrences. if event.transparency == "confirmed": | e9c90a20d7b0c7f7270cff8b10d64f1651f18873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/e9c90a20d7b0c7f7270cff8b10d64f1651f18873/CalendarBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
29289,
12,
2575,
16,
787,
4672,
468,
605,
19906,
596,
1368,
279,
9004,
445,
2724,
732,
4565,
8554,
468,
358,
745,
518,
364,
1517,
1661,
17,
266,
21179,
2641,
16,
471,
364,
1517,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29289,
12,
2575,
16,
787,
4672,
468,
605,
19906,
596,
1368,
279,
9004,
445,
2724,
732,
4565,
8554,
468,
358,
745,
518,
364,
1517,
1661,
17,
266,
21179,
2641,
16,
471,
364,
1517,
... |
if nsa > 30: self.assy.w.history.message(cmd + redmsg(str(nsa) + " atoms selected. The limit is 30. Try again.")) return | if nsa > 200: self.assy.w.history.message(cmd + redmsg(str(nsa) + " atoms selected. The limit is 200. Try again.")) return if nsa > 50: ret = QMessageBox.warning( self.assy.w, "Large GAMESS Jig", "GAMESS Jigs with more than 50 atoms may take an\n" "excessively long time to compute (days or weeks).\n" "Are you sure you want to continue?", "&Continue", "Cancel", None, 0, 1 ) if ret==1: return | def makegamess(self): """Makes a GAMESS jig... """ # [bruce 050210 modified docstring] cmd = greenmsg("Gamess: ") if not self.assy.selatoms: self.assy.w.history.message(cmd + redmsg("You must first select an atom(s) to create a Gamess Jig.")) return # Make sure that no more than 30 atoms are selected. nsa = len(self.assy.selatoms) if nsa > 30: self.assy.w.history.message(cmd + redmsg(str(nsa) + " atoms selected. The limit is 30. Try again.")) return from jig_Gamess import Gamess m = Gamess(self.assy, self.selatoms.values()) m.edit() #bruce 050701 split edit method out of the constructor, # so the dialog doesn't show up when the jig is read from an mmp file if m.cancelled: # User hit 'Cancel' button in the jig dialog. #bruce 050701 comment: I haven't reviewed this for correctness since the above change. self.assy.w.history.message(cmd + "Cancelled") return self.unpickatoms() self.place_new_jig(m) self.assy.w.history.message(cmd + "Gamess Jig created") self.assy.w.win_update() | 26dabbe6db8471c3ae86c35d802a43ecfba48786 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/26dabbe6db8471c3ae86c35d802a43ecfba48786/jigs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
75,
301,
403,
12,
2890,
4672,
3536,
14534,
279,
611,
1642,
1260,
525,
360,
2777,
3536,
468,
306,
2848,
3965,
15331,
3103,
2163,
4358,
14525,
65,
225,
1797,
273,
10004,
3576,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
75,
301,
403,
12,
2890,
4672,
3536,
14534,
279,
611,
1642,
1260,
525,
360,
2777,
3536,
468,
306,
2848,
3965,
15331,
3103,
2163,
4358,
14525,
65,
225,
1797,
273,
10004,
3576,
2932,
... |
u2 = random() | u2 = 1.0 - random() | def normalvariate(self, mu, sigma): """Normal distribution. | 1e49e196f8180335503bfb88255d3cabccbea81c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1e49e196f8180335503bfb88255d3cabccbea81c/random.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2212,
1401,
3840,
12,
2890,
16,
4129,
16,
7299,
4672,
3536,
5506,
7006,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2212,
1401,
3840,
12,
2890,
16,
4129,
16,
7299,
4672,
3536,
5506,
7006,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
runImage(f6, 'qemuarm', 'world -c uricheckall') | runImage(f6, 'qemuarm', 'world -c checkuriall') | def runPreamble(factory): factory.addStep(step.ShellCommand, description=["Run", "preamble"], command=["./scripts/poky-autobuild", "preamble"], timeout=30) | 7b717d201ad1e1a6710965da8e30de8ada07dfcf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8123/7b717d201ad1e1a6710965da8e30de8ada07dfcf/pokyABConfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
52,
793,
7119,
12,
6848,
4672,
3272,
18,
1289,
4160,
12,
4119,
18,
13220,
2189,
16,
2477,
33,
9614,
1997,
3113,
315,
84,
793,
7119,
6,
6487,
225,
1296,
33,
9614,
18,
19,
12827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
52,
793,
7119,
12,
6848,
4672,
3272,
18,
1289,
4160,
12,
4119,
18,
13220,
2189,
16,
2477,
33,
9614,
1997,
3113,
315,
84,
793,
7119,
6,
6487,
225,
1296,
33,
9614,
18,
19,
12827,
... |
menutiem_reset_default = gtk.MenuItem(_('Reset default'), True) menutiem_reset_default.connect('activate', | menuitem_reset_default = gtk.MenuItem(_('Reset default'), True) menuitem_reset_default.connect('activate', | def _create_menu(self, attrs): hbox = gtk.HBox(homogeneous=False, spacing=0) menubar = gtk.MenuBar() if hasattr(menubar, 'set_pack_direction') and \ hasattr(menubar, 'set_child_pack_direction'): menubar.set_pack_direction(gtk.PACK_DIRECTION_LTR) menubar.set_child_pack_direction(gtk.PACK_DIRECTION_LTR) menuitem_title = gtk.ImageMenuItem(stock_id='tryton-preferences') menu_title = gtk.Menu() menuitem_set_to_default = gtk.MenuItem(_('Set to default value'), True) menuitem_set_to_default.connect('activate', lambda *x: self._menu_sig_default_get()) menu_title.add(menuitem_set_to_default) menuitem_set_default = gtk.MenuItem(_('Set as default'), True) menuitem_set_default.connect('activate', lambda *x: self._menu_sig_default_set()) menu_title.add(menuitem_set_default) menutiem_reset_default = gtk.MenuItem(_('Reset default'), True) menutiem_reset_default.connect('activate', lambda *x: self._menu_sig_default_set(reset=True)) menu_title.add(menutiem_reset_default) menuitem_title.set_submenu(menu_title) menubar.add(menuitem_title) hbox.pack_start(menubar, expand=True, fill=True) tooltips = common.Tooltips() if attrs.get('add_remove'): self.wid_text = gtk.Entry() self.wid_text.set_property('width_chars', 13) self.wid_text.connect('activate', self._sig_activate) hbox.pack_start(self.wid_text, expand=True, fill=True) self.but_add = gtk.Button() tooltips.set_tip(self.but_add, _('Add')) self.but_add.connect('clicked', self._sig_add) img_add = gtk.Image() img_add.set_from_stock('tryton-list-add', gtk.ICON_SIZE_SMALL_TOOLBAR) img_add.set_alignment(0.5, 0.5) self.but_add.add(img_add) self.but_add.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_add, expand=False, fill=False) self.but_remove = gtk.Button() tooltips.set_tip(self.but_remove, _('Remove')) self.but_remove.connect('clicked', self._sig_remove, True) img_remove = gtk.Image() img_remove.set_from_stock('tryton-list-remove', gtk.ICON_SIZE_SMALL_TOOLBAR) img_remove.set_alignment(0.5, 0.5) self.but_remove.add(img_remove) self.but_remove.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_remove, expand=False, fill=False) hbox.pack_start(gtk.VSeparator(), expand=False, fill=True) self.but_new = gtk.Button() tooltips.set_tip(self.but_new, _('Create a new record')) self.but_new.connect('clicked', self._sig_new) img_new = gtk.Image() img_new.set_from_stock('tryton-new', gtk.ICON_SIZE_SMALL_TOOLBAR) img_new.set_alignment(0.5, 0.5) self.but_new.add(img_new) self.but_new.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_new, expand=False, fill=False) self.but_open = gtk.Button() tooltips.set_tip(self.but_open, _('Edit selected record')) self.but_open.connect('clicked', self._sig_edit) img_open = gtk.Image() img_open.set_from_stock('tryton-open', gtk.ICON_SIZE_SMALL_TOOLBAR) img_open.set_alignment(0.5, 0.5) self.but_open.add(img_open) self.but_open.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_open, expand=False, fill=False) self.but_del = gtk.Button() tooltips.set_tip(self.but_del, _('Delete selected record')) self.but_del.connect('clicked', self._sig_remove) img_del = gtk.Image() img_del.set_from_stock('tryton-delete', gtk.ICON_SIZE_SMALL_TOOLBAR) img_del.set_alignment(0.5, 0.5) self.but_del.add(img_del) self.but_del.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_del, expand=False, fill=False) hbox.pack_start(gtk.VSeparator(), expand=False, fill=True) but_pre = gtk.Button() tooltips.set_tip(but_pre, _('Previous')) but_pre.connect('clicked', self._sig_previous) img_pre = gtk.Image() img_pre.set_from_stock('tryton-go-previous', gtk.ICON_SIZE_SMALL_TOOLBAR) img_pre.set_alignment(0.5, 0.5) but_pre.add(img_pre) but_pre.set_relief(gtk.RELIEF_NONE) hbox.pack_start(but_pre, expand=False, fill=False) self.label = gtk.Label('(0,0)') hbox.pack_start(self.label, expand=False, fill=False) but_next = gtk.Button() tooltips.set_tip(but_next, _('Next')) but_next.connect('clicked', self._sig_next) img_next = gtk.Image() img_next.set_from_stock('tryton-go-next', gtk.ICON_SIZE_SMALL_TOOLBAR) img_next.set_alignment(0.5, 0.5) but_next.add(img_next) but_next.set_relief(gtk.RELIEF_NONE) hbox.pack_start(but_next, expand=False, fill=False) hbox.pack_start(gtk.VSeparator(), expand=False, fill=True) but_switch = gtk.Button() tooltips.set_tip(but_switch, _('Switch')) but_switch.connect('clicked', self.switch_view) img_switch = gtk.Image() img_switch.set_from_stock('tryton-fullscreen', gtk.ICON_SIZE_SMALL_TOOLBAR) img_switch.set_alignment(0.5, 0.5) but_switch.add(img_switch) but_switch.set_relief(gtk.RELIEF_NONE) hbox.pack_start(but_switch, expand=False, fill=False) if attrs.get('add_remove'): hbox.set_focus_chain([self.wid_text]) else: hbox.set_focus_chain([]) tooltips.enable() return hbox, menuitem_title | 6c59c23d4762b5e6dbd1ba234587c9dd185b55ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9151/6c59c23d4762b5e6dbd1ba234587c9dd185b55ad/one2many.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
5414,
12,
2890,
16,
3422,
4672,
366,
2147,
273,
22718,
18,
44,
3514,
12,
17125,
30075,
1481,
33,
8381,
16,
13259,
33,
20,
13,
21247,
373,
297,
273,
22718,
18,
4599,
5190... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2640,
67,
5414,
12,
2890,
16,
3422,
4672,
366,
2147,
273,
22718,
18,
44,
3514,
12,
17125,
30075,
1481,
33,
8381,
16,
13259,
33,
20,
13,
21247,
373,
297,
273,
22718,
18,
4599,
5190... |
sic_vpdat = [[0.0, sic_yU, 0.0], [sic_uLen+sic_hLen, 0.0, 0.0], [sic_uLen, sic_yU, 0.0], [sic_uLen+sic_hLen, sic_yU*2, 0.0], [2*sic_uLen+sic_hLen, sic_yU*2.0, 0.0], [3*sic_uLen, sic_yU, 0.0], [2*sic_uLen+sic_hLen, 0.0, 0.0]] | sic_vpdat = [[0.0, sic_yU, 0.0], [sic_uLen+sic_hLen, 0.0, 0.0], [sic_uLen, sic_yU, 0.0], [sic_uLen+sic_hLen, sic_yU*2, 0.0], [2*sic_uLen+sic_hLen, sic_yU*2.0, 0.0], [3*sic_uLen, sic_yU, 0.0], [2*sic_uLen+sic_hLen, 0.0, 0.0]] | def _makeGraphiteCell(zIndex): """Data structure to construct a Graphite lattice cell""" gVp = [[-gUx, -gUy, 0.0], [0.0, 0.0, 0.0], [gUx, -gUy, 0.0], [-gUx, 3*gUy, 0.0], [0.0, 2*gUy, 0.0], [gUx, 3*gUy, 0.0], [gUx, 5*gUy, 0.0] ] grpEdges = [ [gVp[0], gVp[1]], [gVp[1], lVp[2]], ##Not finished yet. We need double bond to do this?? ] return lonsEdges | d137aadae12afd03386c3c85863a6b2893ded503 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/d137aadae12afd03386c3c85863a6b2893ded503/drawer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
4137,
1137,
4020,
12,
94,
1016,
4672,
3536,
751,
3695,
358,
4872,
279,
5601,
1137,
16690,
2484,
8395,
314,
58,
84,
273,
12167,
17,
75,
57,
92,
16,
300,
75,
57,
93,
16,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
4137,
1137,
4020,
12,
94,
1016,
4672,
3536,
751,
3695,
358,
4872,
279,
5601,
1137,
16690,
2484,
8395,
314,
58,
84,
273,
12167,
17,
75,
57,
92,
16,
300,
75,
57,
93,
16,
374... |
item('') | item.cmd('print 0') | def get(self, name=''): '''Get Gnuplot instance from list and verify whether it's alive.''' | 5c6ae24863fd74b13079b939ab15616079c33531 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6471/5c6ae24863fd74b13079b939ab15616079c33531/qtgnuplot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
508,
2218,
11,
4672,
9163,
967,
611,
13053,
4032,
791,
628,
666,
471,
3929,
2856,
518,
1807,
13714,
1093,
6309,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
508,
2218,
11,
4672,
9163,
967,
611,
13053,
4032,
791,
628,
666,
471,
3929,
2856,
518,
1807,
13714,
1093,
6309,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
table, self.dialog = create_table_dialog(parent, "Debugger UI options", 1, 2) self.lines = table_add_entry_row(table, 0, "Memdump/disasm lines:", 2) self.lines.connect("activate", dialog_apply_cb, self.dialog) def run(self, lines): "run(lines) -> lines, as integers" self.lines.set_text(str(lines)) | self.dialog = gtk.Dialog("Debugger UI options", parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_APPLY, gtk.RESPONSE_APPLY, gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) self.lines = gtk.Adjustment(0, 5, 50) scale = gtk.HScale(self.lines) scale.set_digits(0) self.follow_pc = gtk.CheckButton("On stop, set address to PC") vbox = self.dialog.vbox vbox.add(gtk.Label("Memdump/disasm lines:")) vbox.add(scale) vbox.add(self.follow_pc) vbox.show_all() def run(self, lines, follow_pc): "run(lines,follow_pc) -> (lines,follow_pc)" self.follow_pc.set_active(follow_pc) self.lines.set_value(lines) | def __init__(self, parent): table, self.dialog = create_table_dialog(parent, "Debugger UI options", 1, 2) self.lines = table_add_entry_row(table, 0, "Memdump/disasm lines:", 2) self.lines.connect("activate", dialog_apply_cb, self.dialog) | db653d6bdd3940617d97f1714f0ad839176ce93b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8501/db653d6bdd3940617d97f1714f0ad839176ce93b/debugui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
4672,
1014,
16,
365,
18,
12730,
273,
752,
67,
2121,
67,
12730,
12,
2938,
16,
315,
24113,
6484,
702,
3113,
404,
16,
576,
13,
365,
18,
3548,
273,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
4672,
1014,
16,
365,
18,
12730,
273,
752,
67,
2121,
67,
12730,
12,
2938,
16,
315,
24113,
6484,
702,
3113,
404,
16,
576,
13,
365,
18,
3548,
273,
10... |
con.type = type | con.type = ctype | def run(self, top, task): #print "applying %s" % self if self.type == "topology-rename": top.name = self.properties["name"] top.save() elif self.type == "device-create": dtype = self.properties["type"] import kvm, openvz if dtype == "kvm": dev = kvm.KVMDevice() elif dtype == "openvz": dev = openvz.OpenVZDevice() else: raise fault.new(fault.UNKNOWN_DEVICE_TYPE, "Unknown device type: %s" % type ) dev.type = type dev.topology = top dev.name = self.properties["name"] top.device_set_add(dev) dev.configure(self.properties, task) dev.save() elif self.type == "device-rename": #FIXME: any steps to do if device is running ? device = top.device_set_get(self.element) device.name = self.properties["name"] device.save() elif self.type == "device-configure": device = top.device_set_get(self.element).upcast() device.configure(self.properties, task) elif self.type == "device-delete": device = top.device_set_get(self.element).upcast() assert device.state == generic.State.CREATED, "Cannot delete a running or prepared device" device.delete() elif self.type == "interface-create": device = top.device_set_get(self.element).upcast() name = self.properties["name"] device.interfaces_add(name, self.properties, task) elif self.type == "interface-rename": device = top.device_set_get(self.element).upcast() name = self.subelement device.interfaces_rename(name, self.properties, task) elif self.type == "interface-configure": device = top.device_set_get(self.element).upcast() name = self.subelement device.interfaces_configure(name, self.properties, task) elif self.type == "interface-delete": device = top.device_set_get(self.element).upcast() name = self.subelement device.interfaces_delete(name, task) elif self.type == "connector-create": ctype = self.properties["type"] import tinc, special if ctype == "special": con = special.SpecialFeatureConnector() con.state = generic.State.STARTED elif ctype == "hub" or ctype =="switch" or ctype == "router": con = tinc.TincConnector() else: raise fault.new(fault.UNKNOWN_CONNECTOR_TYPE, "Unknown connector type: %s" % type ) con.type = type con.topology = top con.name = self.properties["name"] top.connector_set_add(con) con.configure(self.properties, task) con.save() elif self.type == "connector-rename": #FIXME: any steps to do if connector is running ? con = top.connector_set_get(self.element) con.name = self.properties["name"] con.save() elif self.type == "connector-configure": con = top.connector_set_get(self.element).upcast() con.configure(self.properties, task) elif self.type == "connector-delete": con = top.connector_set_get(self.element).upcast() if not con.is_special(): assert con.state == generic.State.CREATED, "Cannot delete a running or prepared connector" con.delete() elif self.type == "connection-create": con = top.connector_set_get(self.element).upcast() interface = self.properties["interface"] con.connections_add(interface, self.properties, task) elif self.type == "connection-configure": con = top.connector_set_get(self.element).upcast() name = self.subelement con.connections_configure(name, self.properties, task) elif self.type == "connection-delete": con = top.connector_set_get(self.element).upcast() name = self.subelement con.connections_delete(name, task) else: raise fault.Fault(fault.IMPOSSIBLE_TOPOLOGY_CHANGE, "Unknown modification type: %s" % self.type) | ebe8c1b703e33a41dfc47dc14958a0f240f1cc0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3860/ebe8c1b703e33a41dfc47dc14958a0f240f1cc0f/modification.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
1760,
16,
1562,
4672,
468,
1188,
315,
9010,
310,
738,
87,
6,
738,
365,
309,
365,
18,
723,
422,
315,
25572,
17,
18539,
6877,
1760,
18,
529,
273,
365,
18,
4738,
961... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
1760,
16,
1562,
4672,
468,
1188,
315,
9010,
310,
738,
87,
6,
738,
365,
309,
365,
18,
723,
422,
315,
25572,
17,
18539,
6877,
1760,
18,
529,
273,
365,
18,
4738,
961... |
"the last save point.\n Would you like to " | "the last save point.\n\nWould you like to " | def ModifySave(self): """Called when document has been modified prompting a message dialog asking if the user would like to save the document before closing. @return: Result value of whether the file was saved or not | 01f3f92c6e71b13dcb13ff41b9708dce08a037ae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/01f3f92c6e71b13dcb13ff41b9708dce08a037ae/ed_main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9518,
4755,
12,
2890,
4672,
3536,
8185,
1347,
1668,
711,
2118,
4358,
6866,
310,
279,
883,
6176,
29288,
309,
326,
729,
4102,
3007,
358,
1923,
326,
1668,
1865,
7647,
18,
632,
2463,
30,
343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9518,
4755,
12,
2890,
4672,
3536,
8185,
1347,
1668,
711,
2118,
4358,
6866,
310,
279,
883,
6176,
29288,
309,
326,
729,
4102,
3007,
358,
1923,
326,
1668,
1865,
7647,
18,
632,
2463,
30,
343... |
if self.is_sparse(): self._element_class = sage.modules.free_module_element.FreeModuleElement_generic_sparse return self._element_class = sage.modules.free_module_element.FreeModuleElement_generic_dense | def _element_class(self): if self.__is_sparse: return free_module_element.FreeModuleElement_generic_sparse else: return free_module_element.FreeModuleElement_generic_dense | def __init__(self, base_ring, rank, degree, sparse=False, inner_product_matrix=None): """ Create the free module of given rank over the given base_ring. | 0ca77f634b683ffe0f0028568d0d1cf22120503e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0ca77f634b683ffe0f0028568d0d1cf22120503e/free_module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1026,
67,
8022,
16,
6171,
16,
10782,
16,
9387,
33,
8381,
16,
3443,
67,
5896,
67,
5667,
33,
7036,
4672,
3536,
1788,
326,
4843,
1605,
434,
864,
6171,
1879,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1026,
67,
8022,
16,
6171,
16,
10782,
16,
9387,
33,
8381,
16,
3443,
67,
5896,
67,
5667,
33,
7036,
4672,
3536,
1788,
326,
4843,
1605,
434,
864,
6171,
1879,... |
self.assertEqual('% jython and '1.000000e-05' or '1.00000e-05') | self.assertEqual('% | def test_float_str_formatting(self): self.assertEqual('%.13g' % 12345678.00005, '12345678.00005') self.assertEqual('%.12g' % 12345678.00005, jython and '12345678' or '12345678.0001') self.assertEqual('%.11g' % 12345678.00005, '12345678') # XXX: The exponential formatter isn't totally correct, e.g. our # output here is really .13g self.assertEqual('%.12g' % math.pi**-100, jython and '1.927581416056e-50' or '1.92758141606e-50') self.assertEqual('%.5g' % 123.005, '123') self.assertEqual('%#.5g' % 123.005, '123.00') self.assertEqual('%#g' % 0.001, '0.00100000') self.assertEqual('%#.5g' % 0.001, '0.0010000') self.assertEqual('%#.1g' % 0.0001, '0.0001') self.assertEqual('%#.4g' % 100, '100.0') self.assertEqual('%#.4g' % 100.25, '100.2') self.assertEqual('%g' % 0.00001, '1e-05') self.assertEqual('%#g' % 0.00001, jython and '1.000000e-05' or '1.00000e-05') self.assertEqual('%e' % -400.0, '-4.000000e+02') self.assertEqual('%.2g' % 99, '99') self.assertEqual('%.2g' % 100, '1e+02') | 2fbf5e9fa71fd755bfd0f4d25422dba222a1afbe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6753/2fbf5e9fa71fd755bfd0f4d25422dba222a1afbe/test_float_jy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5659,
67,
701,
67,
2139,
1787,
12,
2890,
4672,
365,
18,
11231,
5812,
29909,
18,
3437,
75,
11,
738,
30011,
4313,
8285,
18,
2787,
25,
16,
296,
28462,
4313,
8285,
18,
2787,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5659,
67,
701,
67,
2139,
1787,
12,
2890,
4672,
365,
18,
11231,
5812,
29909,
18,
3437,
75,
11,
738,
30011,
4313,
8285,
18,
2787,
25,
16,
296,
28462,
4313,
8285,
18,
2787,
25,
... |
self.filename = os.path.join(tempfile.gettempdir(), 'trac-test.ini') | tmpdir = os.path.realpath(tempfile.gettempdir()) self.filename = os.path.join(tmpdir, 'trac-test.ini') | def setUp(self): self.filename = os.path.join(tempfile.gettempdir(), 'trac-test.ini') self._write([]) self._orig_registry = Option.registry Option.registry = {} | 6c101510b9f590ed577fd60e4f78a52e24b77bd8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/6c101510b9f590ed577fd60e4f78a52e24b77bd8/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
20213,
273,
1140,
18,
803,
18,
7688,
803,
12,
5814,
768,
18,
588,
5814,
1214,
10756,
365,
18,
3459,
273,
1140,
18,
803,
18,
5701,
12,
5645,
1214,
16,
296,
313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
20213,
273,
1140,
18,
803,
18,
7688,
803,
12,
5814,
768,
18,
588,
5814,
1214,
10756,
365,
18,
3459,
273,
1140,
18,
803,
18,
5701,
12,
5645,
1214,
16,
296,
313,
... |
"date": dt.strftime("%m/%d/%Y"), | "date": dt.strftime("%Y-%m-%d"), | def LatLngsToGoogleUrl(source, destination, dt): """Return a URL for routing between two (lat, lng) at a datetime.""" params = {"saddr": FormatLatLng(source), "daddr": FormatLatLng(destination), "time": dt.strftime("%I:%M%p"), "date": dt.strftime("%m/%d/%Y"), "dirflg": "r", "ie": "UTF8", "oe": "UTF8"} url = urlparse.urlunsplit(("http", "maps.google.com", "/maps", urllib.urlencode(params), "")) return url | 3423cb8cc1380d1ac67039a0a83ca6ea1bbe3fb1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6829/3423cb8cc1380d1ac67039a0a83ca6ea1bbe3fb1/google_random_queries.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11134,
13780,
564,
774,
9639,
1489,
12,
3168,
16,
2929,
16,
3681,
4672,
3536,
990,
279,
1976,
364,
7502,
3086,
2795,
261,
4801,
16,
12662,
13,
622,
279,
3314,
12123,
859,
273,
12528,
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,
11134,
13780,
564,
774,
9639,
1489,
12,
3168,
16,
2929,
16,
3681,
4672,
3536,
990,
279,
1976,
364,
7502,
3086,
2795,
261,
4801,
16,
12662,
13,
622,
279,
3314,
12123,
859,
273,
12528,
87,... |
if ffi_type is types.void: return 'v' elif ffi_type is types.double: return 'f' elif ffi_type is types.pointer: return 'i' elif ffi_type is types.uchar: return 'i' elif ffi_type is types.uint8: return 'i' elif ffi_type is types.schar: return 'i' elif ffi_type is types.sint8: return 'i' elif ffi_type is types.uint16: return 'i' elif ffi_type is types.ushort: return 'i' elif ffi_type is types.sint16: return 'i' elif ffi_type is types.sshort: return 'i' elif ffi_type is types.uint: return 'i' elif ffi_type is types.uint32: return 'i' elif ffi_type is types.sint: return 'i' elif ffi_type is types.sint32: return 'i' | if ffi_type is types.void: return 'v' elif ffi_type is types.double: return 'f' elif ffi_type is types.pointer: return 'i' elif ffi_type is types.schar: return 'i' elif ffi_type is types.uchar: return 'i' elif ffi_type is types.sshort: return 'i' elif ffi_type is types.ushort: return 'i' elif ffi_type is types.sint: return 'i' elif ffi_type is types.uint: return 'i' elif ffi_type is types.slong: return 'i' elif ffi_type is types.ulong: return 'i' elif ffi_type is types.sint8: return 'i' elif ffi_type is types.uint8: return 'i' elif ffi_type is types.sint16: return 'i' elif ffi_type is types.uint16: return 'i' elif ffi_type is types.sint32: return 'i' elif ffi_type is types.uint32: return 'i' | def getkind(ffi_type): if ffi_type is types.void: return 'v' elif ffi_type is types.double: return 'f' elif ffi_type is types.pointer: return 'i' elif ffi_type is types.uchar: return 'i' elif ffi_type is types.uint8: return 'i' elif ffi_type is types.schar: return 'i' elif ffi_type is types.sint8: return 'i' elif ffi_type is types.uint16: return 'i' elif ffi_type is types.ushort: return 'i' elif ffi_type is types.sint16: return 'i' elif ffi_type is types.sshort: return 'i' elif ffi_type is types.uint: return 'i' elif ffi_type is types.uint32: return 'i' elif ffi_type is types.sint: return 'i' elif ffi_type is types.sint32: return 'i' ## elif ffi_type is types.uint64: ## return 'i' ## elif ffi_type is types.sint64: ## return 'i' raise KeyError | 7bf9fdde1695244b5b2f2cfa823665f1238682b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/7bf9fdde1695244b5b2f2cfa823665f1238682b5/libffi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
9224,
12,
1403,
77,
67,
723,
4672,
309,
19655,
67,
723,
353,
1953,
18,
6459,
30,
327,
296,
90,
11,
1327,
19655,
67,
723,
353,
1953,
18,
9056,
30,
327,
296,
74,
11,
1327,
19655,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9224,
12,
1403,
77,
67,
723,
4672,
309,
19655,
67,
723,
353,
1953,
18,
6459,
30,
327,
296,
90,
11,
1327,
19655,
67,
723,
353,
1953,
18,
9056,
30,
327,
296,
74,
11,
1327,
19655,
... |
rec_line_data = property_obj.read(cr, uid, rec_pro_id, ['name','value','res_id']) pay_line_data = property_obj.read(cr, uid, pay_pro_id, ['name','value','res_id']) rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')[1]) or False | rec_line_data = property_obj.read(cr, uid, rec_pro_id, ['name','value_reference','res_id']) pay_line_data = property_obj.read(cr, uid, pay_pro_id, ['name','value_reference','res_id']) rec_res_id = rec_line_data and rec_line_data[0].get('value_reference',False) and int(rec_line_data[0]['value_reference'].split(',')[1]) or False pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False | def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val = {} dom = {} obj_journal = self.pool.get('account.journal') if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable and partner_obj.property_account_receivable: if partner_obj.property_account_payable.company_id.id != company_id and partner_obj.property_account_receivable.company_id.id != company_id: property_obj = self.pool.get('ir.property') rec_pro_id = property_obj.search(cr, uid, [('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)]) pay_pro_id = property_obj.search(cr, uid, [('name','=','property_account_payable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)]) if not rec_pro_id: rec_pro_id = property_obj.search(cr, uid, [('name','=','property_account_receivable'),('company_id','=',company_id)]) if not pay_pro_id: pay_pro_id = property_obj.search(cr, uid, [('name','=','property_account_payable'),('company_id','=',company_id)]) rec_line_data = property_obj.read(cr, uid, rec_pro_id, ['name','value','res_id']) pay_line_data = property_obj.read(cr, uid, pay_pro_id, ['name','value','res_id']) rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')[1]) or False if not rec_res_id and not pay_res_id: raise osv.except_osv(_('Configuration Error !'), _('Can not find account chart for this company, Please Create account.')) if type in ('out_invoice', 'out_refund'): acc_id = rec_res_id else: acc_id = pay_res_id val= {'account_id': acc_id} account_obj = self.pool.get('account.account') if ids: if company_id: inv_obj = self.browse(cr,uid,ids) for line in inv_obj[0].invoice_line: if line.account_id: if line.account_id.company_id.id != company_id: result_id = account_obj.search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)]) if not result_id: raise osv.except_osv(_('Configuration Error !'), _('Can not find account chart for this company in invoice line account, Please Create account.')) r_id = self.pool.get('account.invoice.line').write(cr, uid, [line.id], {'account_id': result_id[0]}) else: if invoice_line: for inv_line in invoice_line: obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id']) if obj_l.company_id.id != company_id: raise osv.except_osv(_('Configuration Error !'), _('Invoice line account company does not match with invoice company.')) else: continue if company_id and type: if type in ('out_invoice'): journal_type = 'sale' elif type in ('out_refund'): journal_type = 'sale_refund' elif type in ('in_refund'): journal_type = 'purchase_refund' else: journal_type = 'purchase' journal_ids = obj_journal.search(cr, uid, [('company_id','=',company_id), ('type', '=', journal_type)]) if journal_ids: val['journal_id'] = journal_ids[0] else: raise osv.except_osv(_('Configuration Error !'), _('Can\'t find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Financial Accounting\Accounts\Journals.' % (journal_type))) dom = {'journal_id': [('id', 'in', journal_ids)]} else: journal_ids = obj_journal.search(cr, uid, []) | 476c000425262c0640ebac9e4fc0faacdf420183 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/476c000425262c0640ebac9e4fc0faacdf420183/invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3427,
67,
16840,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
9395,
67,
350,
16,
1087,
67,
350,
16,
618,
16,
9179,
67,
1369,
16,
5462,
67,
350,
4672,
1244,
273,
2618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3427,
67,
16840,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
9395,
67,
350,
16,
1087,
67,
350,
16,
618,
16,
9179,
67,
1369,
16,
5462,
67,
350,
4672,
1244,
273,
2618,
... |
// Labeled statement. | def Statement(tokenizer, compilerContext) { var i, label, node, childNode, ss, tokenType = tokenizer.get(True) var builder = compilerContext.builder | 58afad4d3cade0a037f53f0a04cb23589df417b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/58afad4d3cade0a037f53f0a04cb23589df417b1/Parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8056,
12,
2316,
1824,
16,
5274,
1042,
13,
288,
569,
277,
16,
1433,
16,
756,
16,
9465,
16,
5202,
16,
22302,
273,
10123,
18,
588,
12,
5510,
13,
569,
2089,
273,
5274,
1042,
18,
9574,
2,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8056,
12,
2316,
1824,
16,
5274,
1042,
13,
288,
569,
277,
16,
1433,
16,
756,
16,
9465,
16,
5202,
16,
22302,
273,
10123,
18,
588,
12,
5510,
13,
569,
2089,
273,
5274,
1042,
18,
9574,
2,... | |
fileBaseName = os.path.basename(sourcePFN) | result += """ EXIT_STATUS=`cat $REPORT_FILE | cut -f3 -d" "` echo "srmcp exit status: $EXIT_STATUS" if (( $EXIT_STATUS != 0 )); then echo "Non-zero srmcp Exit status!!!" exit $EXIT_STATUS fi """ fileAbsPath = sourcePFN.replace("file://", "") | def createStageOutCommand(self, sourcePFN, targetPFN, options = None): """ _createStageOutCommand_ | e508055f166572617c81472ef522ae198cdd6c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/e508055f166572617c81472ef522ae198cdd6c4f/SRMImpl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
8755,
1182,
2189,
12,
2890,
16,
1084,
52,
19793,
16,
1018,
52,
19793,
16,
702,
273,
599,
4672,
3536,
389,
2640,
8755,
1182,
2189,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
8755,
1182,
2189,
12,
2890,
16,
1084,
52,
19793,
16,
1018,
52,
19793,
16,
702,
273,
599,
4672,
3536,
389,
2640,
8755,
1182,
2189,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
tv = TaskEditor(self.req, t, self.do_refresh, self.on_delete_task, self.close_task, self.open_task, self.get_tasktitle, notes=self.notes) | tv = TaskEditor( self.req, t, self.do_refresh, self.on_delete_task, self.close_task, self.open_task, self.get_tasktitle, notes=self.notes) | def open_task(self, uid): t = self.req.get_task(uid) if self.opened_task.has_key(uid): self.opened_task[uid].present() else: tv = TaskEditor(self.req, t, self.do_refresh, self.on_delete_task, self.close_task, self.open_task, self.get_tasktitle, notes=self.notes) #registering as opened self.opened_task[uid] = tv | fac54dcba973acc5967f43b60fb540659a1a87a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/fac54dcba973acc5967f43b60fb540659a1a87a8/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
4146,
12,
2890,
16,
4555,
4672,
268,
273,
365,
18,
3658,
18,
588,
67,
4146,
12,
1911,
13,
309,
365,
18,
25304,
67,
4146,
18,
5332,
67,
856,
12,
1911,
4672,
365,
18,
25304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
4146,
12,
2890,
16,
4555,
4672,
268,
273,
365,
18,
3658,
18,
588,
67,
4146,
12,
1911,
13,
309,
365,
18,
25304,
67,
4146,
18,
5332,
67,
856,
12,
1911,
4672,
365,
18,
25304,
... |
make several into keyword-based ones | make several arguments into keyword-based ones if candidate_gene_set is None, no filtering based on that. otherwise, yes. if gene_id is given (used in geneForm()), get SNP & phenotype association information (no gene info) related to that gene. getGeneInformation() takes care of it. if gene_id is None (used in showResultsGeneForOnePhenotype()), get both gene & SNP association information but not phenotype info. | def getAssociationsGivenGene(self, typeID, minScore=None, maxRank=None, results_id=None, gene_id=None, candidate_gene_set=None): """ 2009-7-2 add argument results_id, candidate_gene_set make several into keyword-based ones 2009-5-27 return all associations related to a gene in table results_gene """ #construct the full data and turn it into json column_name_type_ls1 = [("results_id", ("number", "Result Id")), ("phenotype_method_id", ("string", "Phenotype ID")), \ ("phenotype_short_name", ("string", "Phenotype Name")), \ ("analysis", ("string", "Association Method"))] column_name_type_ls2 = [("snps_id", ("string","SNP ID")), ("chromosome", ("string","Chr")), \ ("position", ("string","Position")), ("left_or_right", ("string","Left/Right")), \ ("disp_pos", ("string","Distance")), ("disp_pos_comment", ("string","Distance comment")), \ ("snp_annotation", ("string","SNP Annotation")), \ ("score", ("number","Score")), \ ("rank", ("number","Rank")), ('beta', ('number', 'Beta')),\ ("maf", ("number","MAF")), ("mac", ("number","MAC")),\ ('genotype_var_perc', ('number', 'variance explained'))] if gene_id is not None: column_name_type_ls = column_name_type_ls1 + column_name_type_ls2 results_gene_related_columns = column_name_type_ls else: gene_column_name_type_ls = [("gene_symbol", ("string", "Symbol")), ("description", ("string", "Description")), \ ("type_of_gene", ("string", "Type Of Gene")), \ ("dbxrefs", ("string", "DB Cross References")), \ ("gene_id", ("string","Gene ID")), \ ("strand", ("string","Strand")),\ ("start", ("number","Start")),("stop", ("number","Stop"))] column_name_type_ls = gene_column_name_type_ls + column_name_type_ls2 results_gene_related_columns = column_name_type_ls2 | 03a67488d0ee8743c4e797444458dc675189c50e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9645/03a67488d0ee8743c4e797444458dc675189c50e/DisplayResultsGene.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
15143,
6083,
24442,
12,
2890,
16,
618,
734,
16,
1131,
7295,
33,
7036,
16,
943,
12925,
33,
7036,
16,
1686,
67,
350,
33,
7036,
16,
7529,
67,
350,
33,
7036,
16,
5500,
67,
11857,
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,
15143,
6083,
24442,
12,
2890,
16,
618,
734,
16,
1131,
7295,
33,
7036,
16,
943,
12925,
33,
7036,
16,
1686,
67,
350,
33,
7036,
16,
7529,
67,
350,
33,
7036,
16,
5500,
67,
11857,
67... |
self.assertEqual(result, list(pair)) | self.assertEqual(result, tuple(pair)) | def testConversionInBothDirectionsWithSimilarContainer(self): '''Test converting a list, instead of the expected tuple, from Python to C++ and the other way around.''' pu = PairUser() pair = [3, 5] pu.setPair(pair) result = pu.getPair() self.assertNotEqual(result, pair) self.assertEqual(result, list(pair)) | 838b56730d27a6fd5e229c103f1d9957c58c5b0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13343/838b56730d27a6fd5e229c103f1d9957c58c5b0d/pair_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6814,
382,
20240,
8212,
87,
1190,
16891,
2170,
12,
2890,
4672,
9163,
4709,
14540,
279,
666,
16,
3560,
434,
326,
2665,
3193,
16,
628,
6600,
358,
385,
9904,
471,
326,
1308,
4031,
674... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6814,
382,
20240,
8212,
87,
1190,
16891,
2170,
12,
2890,
4672,
9163,
4709,
14540,
279,
666,
16,
3560,
434,
326,
2665,
3193,
16,
628,
6600,
358,
385,
9904,
471,
326,
1308,
4031,
674... |
return self.text | return ''.join( self.text ) | def get_text(self): """Get the text in its current state.""" return self.text | c105b3d9af56ac0d99c836c9ae3443f9ddfcea9a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4177/c105b3d9af56ac0d99c836c9ae3443f9ddfcea9a/pefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
955,
12,
2890,
4672,
3536,
967,
326,
977,
316,
2097,
783,
919,
12123,
225,
327,
365,
18,
955,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
955,
12,
2890,
4672,
3536,
967,
326,
977,
316,
2097,
783,
919,
12123,
225,
327,
365,
18,
955,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sourceScriptFile = expandedjobs[1].get("compile-source/file", None) | sourceScriptFile = expandedjobs[1].get("compile-options/paths/file", None) | def runCollectEnvironmentInfo(self): letConfig = self._job.get('let',{}) self._console.info("Environment information") self._console.indent() platformInfo = util.getPlatformInfo() self._console.info("Platform: %s %s" % (platformInfo[0], platformInfo[1])) self._console.info("Python version: %s" % sys.version) if 'QOOXDOO_PATH' in letConfig: qxPath = letConfig['QOOXDOO_PATH'] self._console.info("qooxdoo path: %s" % qxPath) versionFile = open(os.path.join(qxPath, "version.txt")) version = versionFile.read() self._console.info("Framework version: %s" % version.strip()) #TODO: Improve this check classFile = os.path.join(qxPath, "framework", "source", "class", "qx", "Class.js") self._console.info("Kit looks OK: %s" % os.path.isfile(classFile) ) | 4e269de148cbd3cc397ae53e124136b00d418821 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/4e269de148cbd3cc397ae53e124136b00d418821/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
10808,
5494,
966,
12,
2890,
4672,
2231,
809,
273,
365,
6315,
4688,
18,
588,
2668,
1810,
2187,
2916,
13,
225,
365,
6315,
8698,
18,
1376,
2932,
5494,
1779,
7923,
365,
6315,
8698,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
10808,
5494,
966,
12,
2890,
4672,
2231,
809,
273,
365,
6315,
4688,
18,
588,
2668,
1810,
2187,
2916,
13,
225,
365,
6315,
8698,
18,
1376,
2932,
5494,
1779,
7923,
365,
6315,
8698,
18,... |
NOTE: it may do this not only in assy_extrude_unit, but in merging the copies to create the final product. | NOTE: it may call this not only in assy_extrude_unit, but in merging the copies to create the final product. We should detect that and act differently... | def merge(self, mol): """Unlike Chunk.merge(mol) (for mol being another chunk), only remember mol, don't steal its atoms and kill it. Also let mol be a Group, not just a Chunk (though we may define fewer methods correctly in that case, since we define just barely enough to get by in the current private use). We will let Extrude call this method and think it's really merging, though it's not. NOTE: it may do this not only in assy_extrude_unit, but in merging the copies to create the final product. """ self._mols.append(mol) return | 87507b5d72c4f9e44bf4b021301509d805c1bf11 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/87507b5d72c4f9e44bf4b021301509d805c1bf11/extrudeMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
12,
2890,
16,
12629,
4672,
3536,
984,
5625,
13021,
18,
2702,
12,
21260,
13,
261,
1884,
12629,
3832,
4042,
2441,
3631,
1338,
11586,
12629,
16,
2727,
1404,
18654,
287,
2097,
9006,
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,
2691,
12,
2890,
16,
12629,
4672,
3536,
984,
5625,
13021,
18,
2702,
12,
21260,
13,
261,
1884,
12629,
3832,
4042,
2441,
3631,
1338,
11586,
12629,
16,
2727,
1404,
18654,
287,
2097,
9006,
471,... |
stderr=subprocess.PIPE) | stderr=subprocess.STDOUT) | def StartTestShell(binary, args): """Returns the process for a new test_shell started in layout-tests mode.""" cmd = [binary, '--layout-tests'] + args # We'd really like to combine stderr into stdout here by setting stderr to # subprocess.STDOUT, but on Windows that's just dropping stderr output on # the floor, at least in Python 2.4.1. return subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | dccf5db1c627eb53f5dba004ab4e8628323a94b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/dccf5db1c627eb53f5dba004ab4e8628323a94b0/test_shell_thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3603,
4709,
13220,
12,
8578,
16,
833,
4672,
3536,
1356,
326,
1207,
364,
279,
394,
1842,
67,
10304,
5746,
316,
3511,
17,
16341,
1965,
12123,
1797,
273,
306,
8578,
16,
3534,
6741,
17,
1634... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3603,
4709,
13220,
12,
8578,
16,
833,
4672,
3536,
1356,
326,
1207,
364,
279,
394,
1842,
67,
10304,
5746,
316,
3511,
17,
16341,
1965,
12123,
1797,
273,
306,
8578,
16,
3534,
6741,
17,
1634... |
self.cr = None self.dclass = None | def delete(self): """ Inheritors should redefine this to take appropriate action on delete """ assert self.notify.debug('delete(): %s' % (self.doId)) try: self.DistributedObject_deleted except: self.DistributedObject_deleted = 1 self.cr = None self.dclass = None | 9a0cfd2725967aa54e8c519381ed45171911dc65 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8543/9a0cfd2725967aa54e8c519381ed45171911dc65/DistributedObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
3536,
25953,
1383,
1410,
283,
11255,
333,
358,
4862,
5505,
1301,
603,
1430,
3536,
1815,
365,
18,
12336,
18,
4148,
2668,
3733,
13332,
738,
87,
11,
738,
261,
2890,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
3536,
25953,
1383,
1410,
283,
11255,
333,
358,
4862,
5505,
1301,
603,
1430,
3536,
1815,
365,
18,
12336,
18,
4148,
2668,
3733,
13332,
738,
87,
11,
738,
261,
2890,
18... | |
if not watch and not self._inotify: | if watch and not self._inotify: | def watch(self, watch = True): """ If argument is True (default), adds a watch to the config file and will reload the config if it changes. If INotify is available, use that, otherwise stat the file every 3 seconds. | 26ae633979dcc14e7e93304ee8666a7fca252a3d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11722/26ae633979dcc14e7e93304ee8666a7fca252a3d/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4267,
12,
2890,
16,
4267,
273,
1053,
4672,
3536,
971,
1237,
353,
1053,
261,
1886,
3631,
4831,
279,
4267,
358,
326,
642,
585,
471,
903,
7749,
326,
642,
309,
518,
3478,
18,
225,
971,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4267,
12,
2890,
16,
4267,
273,
1053,
4672,
3536,
971,
1237,
353,
1053,
261,
1886,
3631,
4831,
279,
4267,
358,
326,
642,
585,
471,
903,
7749,
326,
642,
309,
518,
3478,
18,
225,
971,
467... |
button = None button = gtk.RadioButton() | group = gtk.RadioButton() | def draw_poll_details_box(self): """(Re)draw the poll details box self.poll_details_box should be already defined on the canvas. """ poll_details_box = self.poll_details_box poll_details_box.remove_all() | aab56394c440066113dba4b20e4ceb2c478b61e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6691/aab56394c440066113dba4b20e4ceb2c478b61e8/poll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
13835,
67,
6395,
67,
2147,
12,
2890,
4672,
3536,
12,
426,
13,
9446,
326,
7672,
3189,
3919,
225,
365,
18,
13835,
67,
6395,
67,
2147,
1410,
506,
1818,
2553,
603,
326,
5953,
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,
3724,
67,
13835,
67,
6395,
67,
2147,
12,
2890,
4672,
3536,
12,
426,
13,
9446,
326,
7672,
3189,
3919,
225,
365,
18,
13835,
67,
6395,
67,
2147,
1410,
506,
1818,
2553,
603,
326,
5953,
18,... |
t = escape_re.sub(r'_\1', t) | t = escape_re.sub(r'/\1', t) | def search_to_sql(db, columns, terms): """ Convert a search query into a SQL condition string and corresponding parameters. The result is returned as a (string, params) tuple. """ if len(columns) < 1 or len(terms) < 1: raise TracError('Empty search attempt, this should really not happen.') likes = [r"%s %s %%s ESCAPE '_'" % (i, db.like()) for i in columns] c = ' OR '.join(likes) sql = '(' + ') AND ('.join([c] * len(terms)) + ')' args = [] escape_re = re.compile(r'([_%])') for t in terms: t = escape_re.sub(r'_\1', t) # escape LIKE syntax args.extend(['%'+t+'%'] * len(columns)) return sql, tuple(args) | 7ccf6de4043e208822aa6135f4edb581aac2a951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/7ccf6de4043e208822aa6135f4edb581aac2a951/Search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
869,
67,
4669,
12,
1966,
16,
2168,
16,
6548,
4672,
3536,
4037,
279,
1623,
843,
1368,
279,
3063,
2269,
533,
471,
4656,
1472,
18,
1021,
563,
353,
2106,
487,
279,
261,
1080,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
869,
67,
4669,
12,
1966,
16,
2168,
16,
6548,
4672,
3536,
4037,
279,
1623,
843,
1368,
279,
3063,
2269,
533,
471,
4656,
1472,
18,
1021,
563,
353,
2106,
487,
279,
261,
1080,
16,... |
return None coverage_file = None | return False | def SetUp(self, binaries): """Set up the platform specific environment and instrument the binaries for coverage. | 9c08cda4aa58cfa7cdbb6a02025a1219305ed383 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/9c08cda4aa58cfa7cdbb6a02025a1219305ed383/coverage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
1211,
12,
2890,
16,
4158,
5646,
4672,
3536,
694,
731,
326,
4072,
2923,
3330,
471,
10353,
326,
4158,
5646,
364,
11196,
18,
2,
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,
1000,
1211,
12,
2890,
16,
4158,
5646,
4672,
3536,
694,
731,
326,
4072,
2923,
3330,
471,
10353,
326,
4158,
5646,
364,
11196,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
setName.upper()) def GenerateSource(file, functions, setName): | set_name.upper()) def GenerateSource(file, functions, set_name): | file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments)) | 41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
585,
18,
2626,
2668,
723,
536,
738,
87,
261,
11261,
67,
2739,
67,
13730,
380,
9,
87,
15417,
13,
9275,
87,
20472,
82,
11,
738,
261,
2463,
559,
16,
1257,
63,
20,
6487,
1775,
3719,
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,
585,
18,
2626,
2668,
723,
536,
738,
87,
261,
11261,
67,
2739,
67,
13730,
380,
9,
87,
15417,
13,
9275,
87,
20472,
82,
11,
738,
261,
2463,
559,
16,
1257,
63,
20,
6487,
1775,
3719,
2,
-100,
... |
db=_connections[connUser]=_real_connect(connUser, connectParams) | del _connections[connUser] db=_real_connect(connUser, connectParams) _connections[connUser]=db | def getConnection(connUser): """ Returns a database connection as defined by connUser. If this module already has an open connection for connUser, it returns it; otherwise, it creates a new connection, stores it, and returns it. """ if not _users.has_key(connUser): raise SkunkStandardError, 'user %s is not initialized' % (connUser) connectParams = _users[connUser] if not _connections.has_key(connUser): db = _connections[connUser] = _real_connect(connUser, connectParams) else: db=_connections[connUser] # hook for testing the connection before returning it from the cache if connection_test and not connection_test(db): del db db=_connections[connUser]=_real_connect(connUser, connectParams) return db | 2d3f0b38c3a173192b41e748a9659481dea70fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/2d3f0b38c3a173192b41e748a9659481dea70fbc/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6742,
12,
4646,
1299,
4672,
3536,
2860,
279,
2063,
1459,
487,
2553,
635,
1487,
1299,
18,
971,
333,
1605,
1818,
711,
392,
1696,
1459,
364,
1487,
1299,
16,
518,
1135,
518,
31,
3541,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6742,
12,
4646,
1299,
4672,
3536,
2860,
279,
2063,
1459,
487,
2553,
635,
1487,
1299,
18,
971,
333,
1605,
1818,
711,
392,
1696,
1459,
364,
1487,
1299,
16,
518,
1135,
518,
31,
3541,
16,
... |
marker.append_marker((Coord[0], Coord[1], zoom), strName) | marker.append_marker((Coord[1], Coord[0], zoom), strName) | def getText(nodelist): rc = "" for node in nodelist: if node.nodeType == node.TEXT_NODE: rc = rc + node.data return rc | d4cbfbe17a411dad493b4b9880feea088a6b5218 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5373/d4cbfbe17a411dad493b4b9880feea088a6b5218/xmlUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6701,
12,
82,
24221,
4672,
4519,
273,
1408,
364,
756,
316,
30068,
30,
309,
756,
18,
2159,
559,
422,
756,
18,
5151,
67,
8744,
30,
4519,
273,
4519,
397,
756,
18,
892,
327,
4519,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6701,
12,
82,
24221,
4672,
4519,
273,
1408,
364,
756,
316,
30068,
30,
309,
756,
18,
2159,
559,
422,
756,
18,
5151,
67,
8744,
30,
4519,
273,
4519,
397,
756,
18,
892,
327,
4519,
2,
-10... |
PDB record in a list of records. Fields like continuation and serNum | PDB record in a list of records. Fields like continuation and serNum | def __is_sucsessive_record(self, prev_rec, rec): """Returns True if the current record looks like it is the successive PDB record in a list of records. Fields like continuation and serNum are checked, as well as record name. """ ## check record names if rec._name != prev_rec._name: return False ## NOTE: perhaps record type specific handlers could be put ## here to catch common mistakes which are found in PDB ## files | 39233ce8921d1424c03c7e0806f0a519dab74e10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/39233ce8921d1424c03c7e0806f0a519dab74e10/PDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
291,
67,
26560,
2143,
403,
688,
67,
3366,
12,
2890,
16,
2807,
67,
3927,
16,
1950,
4672,
3536,
1356,
1053,
309,
326,
783,
1409,
10192,
3007,
518,
353,
326,
2216,
688,
21601,
1409,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
291,
67,
26560,
2143,
403,
688,
67,
3366,
12,
2890,
16,
2807,
67,
3927,
16,
1950,
4672,
3536,
1356,
1053,
309,
326,
783,
1409,
10192,
3007,
518,
353,
326,
2216,
688,
21601,
1409,
... |
[ -1/2 sqrt(3)/2] [sqrt(3)/2 1/2] | [ -1/2 1/2*sqrt(3)] [1/2*sqrt(3) 1/2] | def representation_matrix_for_simple_transposition(self, i): r""" Return the matrix representing the transposition that swaps ``i`` and ``i+1``. | 0483be4559ab0347db05ec03cda2708d9c88374c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/0483be4559ab0347db05ec03cda2708d9c88374c/symmetric_group_representations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4335,
67,
5667,
67,
1884,
67,
9647,
67,
2338,
3276,
12,
2890,
16,
277,
4672,
436,
8395,
2000,
326,
3148,
5123,
326,
906,
3276,
716,
1352,
6679,
12176,
77,
10335,
471,
12176,
77,
15,
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,
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,
4335,
67,
5667,
67,
1884,
67,
9647,
67,
2338,
3276,
12,
2890,
16,
277,
4672,
436,
8395,
2000,
326,
3148,
5123,
326,
906,
3276,
716,
1352,
6679,
12176,
77,
10335,
471,
12176,
77,
15,
21... |
self.assert_([1,'user.create_vm'] in clusters) self.assert_([2,'user.admin'] in clusters) | self.assert_([cluster0.id,'user.create_vm'] in clusters) self.assert_([cluster1.id,'user.admin'] in clusters) | def test_view_cluster_choices(self): """ Test retrieving list of clusters a user or usergroup has access to """ url = '/vm/add/choices/' Cluster.objects.all().delete() cluster0 = Cluster(hostname='user.create_vm', slug='user_create_vm') cluster0.save() cluster1 = Cluster(hostname='user.admin', slug='user_admin') cluster1.save() cluster2 = Cluster(hostname='superuser', slug='superuser') cluster2.save() cluster3 = Cluster(hostname='group.create_vm', slug='group_create_vm') cluster3.save() cluster4 = Cluster(hostname='group.admin', slug='group_admin') cluster4.save() cluster5 = Cluster(hostname='no.perms.on.this.group', slug='no_perms') cluster5.save() # cluster ids are 1 through 6 group.user_set.add(user) group1 = Group(id=2, name='testing_group2') group1.save() group1.grant('admin',cluster5) # anonymous user response = c.get(url, follow=True) self.assertEqual(200, response.status_code) self.assertTemplateUsed(response, 'registration/login.html') self.assert_(c.login(username=user.username, password='secret')) # invalid group_id response = c.get(url, {'group_id':-1}) self.assertEqual(404, response.status_code) # group user is not a member of response = c.get(url, {'group_id':2}) self.assertEqual(403, response.status_code) # create_vm permission (group) group.grant('create_vm', cluster3) response = c.get(url, {'group_id':1}) self.assertEqual(200, response.status_code) clusters = json.loads(response.content) self.assert_([4,'group.create_vm'] in clusters) self.assertEqual(1, len(clusters)) # admin permission (group) group.grant('admin', cluster4) response = c.get(url, {'group_id':1}) self.assertEqual(200, response.status_code) clusters = json.loads(response.content) self.assert_([4,'group.create_vm'] in clusters) self.assert_([5,'group.admin'] in clusters) self.assertEqual(2, len(clusters)) # create_vm permission user.grant('create_vm', cluster0) response = c.get(url) self.assertEqual(200, response.status_code) clusters = json.loads(response.content) self.assert_([1,'user.create_vm'] in clusters) self.assertEqual(1, len(clusters), clusters) # admin permission user.grant('admin', cluster1) response = c.get(url) self.assertEqual(200, response.status_code) clusters = json.loads(response.content) self.assert_([1,'user.create_vm'] in clusters) self.assert_([2,'user.admin'] in clusters) self.assertEqual(2, len(clusters)) # authorized (superuser) user.is_superuser = True user.save() response = c.get(url) self.assertEqual(200, response.status_code) self.assertEqual('application/json', response['content-type']) clusters = json.loads(response.content) self.assert_([1,'user.create_vm'] in clusters) self.assert_([2,'user.admin'] in clusters) self.assert_([3,'superuser'] in clusters, clusters) self.assert_([4,'group.create_vm'] in clusters) self.assert_([5,'group.admin'] in clusters, clusters) self.assert_([6,'no.perms.on.this.group'] in clusters) self.assertEqual(6, len(clusters)) | ca1881ba70a46cbf51fd87126fff358c5d5e5868 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10509/ca1881ba70a46cbf51fd87126fff358c5d5e5868/virtual_machine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1945,
67,
7967,
67,
11937,
12,
2890,
4672,
3536,
7766,
17146,
666,
434,
9566,
279,
729,
578,
729,
1655,
711,
2006,
358,
3536,
880,
273,
1173,
3489,
19,
1289,
19,
11937,
2473,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1945,
67,
7967,
67,
11937,
12,
2890,
4672,
3536,
7766,
17146,
666,
434,
9566,
279,
729,
578,
729,
1655,
711,
2006,
358,
3536,
880,
273,
1173,
3489,
19,
1289,
19,
11937,
2473,
... |
def c_code(self, node, name, (_x, _y, _a), (_z, ), sub): | def c_code(self, node, name, (_x, _y, _a), (_zout, ), sub): | def c_code(self, node, name, (_x, _y, _a), (_z, ), sub): #DEBUG if len(self.c_libraries())<=0: return super(Dot22Scalar, self).c_code(node, name, (_x, _y), (_z, ), sub) full_code = self.build_gemm_call() % dict(locals(), **sub) return full_code | 8de841732793cd10ff16cb698569859d02e6ecc4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/8de841732793cd10ff16cb698569859d02e6ecc4/blas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
67,
710,
12,
2890,
16,
756,
16,
508,
16,
261,
67,
92,
16,
389,
93,
16,
389,
69,
3631,
261,
67,
94,
659,
16,
262,
16,
720,
4672,
468,
9394,
309,
562,
12,
2890,
18,
71,
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,
276,
67,
710,
12,
2890,
16,
756,
16,
508,
16,
261,
67,
92,
16,
389,
93,
16,
389,
69,
3631,
261,
67,
94,
659,
16,
262,
16,
720,
4672,
468,
9394,
309,
562,
12,
2890,
18,
71,
67,
... |
value = evalu("g.edges[" + str(j) + "]." + i) | value = eval("g.edges[" + str(j) + "]." + i) | def initializeGlobalVariables(): # put all the color names into an array for i in colorInfo: colorList.append(i[0]) gStuff = globals() # all variables that have been declared # the properties of nodes and edges specified in the gdf file wantedProperties = [] # get all methods and variables for i in globalDir: if gStuff.has_key(i) and not i == "Edge" and not i == "Node" and not i in colorList and not i in defaultProperties: # check to see if it is a variable if str(gStuff[i]) == i: wantedProperties.append(i) # check to see which properties belong to what for i in wantedProperties: # check to see if it's a node property try: property = "g.nodes[0]." + i eval(property) # will throw an error if it is not a property of a node # find out what type of variable it is nodeProperties[i] = type(eval(property)) nodePropertiesList.append(i) # add to the list of node properties nodePropertyValues[i] = [] # store all the values of that property # find all the values for that node property if it is a string if nodeProperties[i] == type("string"): for j in g.nodes: value = eval("j." + i) # the value of the property # if we don't have the value, add it to the list if not value in nodePropertyValues[i]: nodePropertyValues[i].append(value) # else find the range if the property is a flot or an integer elif nodeProperties[i] == type(1) or nodeProperties[i] == type(1.5): largest = eval("g.nodes[0]." + i) smallest = eval("g.nodes[0]." + i) for j in g.nodes: value = eval("j." + i) if value > largest: largest = value elif value < smallest: smallest = value nodePropertyValues[i].append(smallest) nodePropertyValues[i].append(largest) # there is an attribute error => i is not a property of a node except AttributeError: # check to see if it is an edge property try: property = "g.edges[0]." + i eval(property) # will throw an error if it is not a property of an edge edgeProperties[i] = type(eval(property)) edgePropertiesList.append(i) edgePropertyValues[i] = [] # find all the values for that edge property if property is a string if edgeProperties[i] == type("string"): for j in range(len(g.edges)): value = evalu("g.edges[" + str(j) + "]." + i) # if we don't have the value, add it to the list if not value in edgePRopertyValues[i]: edgePropertyValues[i].append(value) # find the range of values for an edge if it is an integer or float elif edgeProperties[i] == type(1) or edgeProperties[i] == type(1.5): largest = eval("g.edges[0]." + i) smallest = eval("g.edges[0]." + i) for j in range(len(g.edges)): value = eval("g.edges[" + str(j) + "]." + i) if value > largest: largest = value elif value < smallest: smallest = value edgePropertyValues[i].append(smallest) edgePropertyValues[i].append(largest) # there is an attribute error => i is not a property of an edge except AttributeError: print i + " is not a property of a node or an edge" # sort the node list counter = 0 for i in g.nodes: nodeIndex.append((i.getName(), counter)) counter = counter + 1 nodeIndex.sort() # sort the edge list counter = 0 for i in g.edges: edgeIndex.append((i.node1.getName() + " - " + i.node2.getName(), counter)) counter = counter + 1 edgeIndex.sort() | f1491801ac53881cd5d7b8f88e71072606223729 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2706/f1491801ac53881cd5d7b8f88e71072606223729/graphModifier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
5160,
6158,
13332,
468,
1378,
777,
326,
2036,
1257,
1368,
392,
526,
364,
277,
316,
2036,
966,
30,
2036,
682,
18,
6923,
12,
77,
63,
20,
5717,
225,
314,
510,
3809,
273,
10941,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
5160,
6158,
13332,
468,
1378,
777,
326,
2036,
1257,
1368,
392,
526,
364,
277,
316,
2036,
966,
30,
2036,
682,
18,
6923,
12,
77,
63,
20,
5717,
225,
314,
510,
3809,
273,
10941,
1435... |
if Config != "NT386": | if Config != "NT386" and not Target.endswith("_NT"): | def _CopyCompiler(From, To): CreateDirectory(To) from_cm3 = os.path.join(From, "cm3") from_cm3exe = os.path.join(From, "cm3.exe") from_cm3cg = os.path.join(From, "cm3cg") from_cm3cgexe = os.path.join(From, "cm3cg.exe") if (Config != "NT386" and not FileExists(from_cm3) and not FileExists(from_cm3exe) and not FileExists(from_cm3cg) and not FileExists(from_cm3cgexe)): FatalError("none of " + from_cm3 + ", " + from_cm3exe + ", " + from_cm3cg + ", " + from_cm3cgexe + " exist") # # check .exe first to avoid being fooled by Cygwin # if FileExists(from_cm3exe): from_cm3 = from_cm3exe elif FileExists(from_cm3): pass else: from_cm3 = None from_cm3exe = None if from_cm3: # # delete .exe first to avoid being fooled by Cygwin # DeleteFile(os.path.join(To, "cm3.exe")) DeleteFile(os.path.join(To, "cm3")) CopyFile(from_cm3, To) or FatalError("3") CopyFileIfExist(os.path.join(From, "cm3.pdb"), To) or FatalError("5") if Config != "NT386": if FileExists(from_cm3cgexe): from_cm3cg = from_cm3cgexe elif FileExists(from_cm3cg): pass else: from_cm3cg = None from_cm3cgexe = None if from_cm3cg: # # delete .exe first to avoid being fooled by Cygwin # DeleteFile(os.path.join(To, "cm3cg.exe")) DeleteFile(os.path.join(To, "cm3cg")) CopyFile(from_cm3cg, To) or FatalError("4") return True | c35fdb46ab081a89157be8ee1623b9566eef3714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/c35fdb46ab081a89157be8ee1623b9566eef3714/pylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2951,
9213,
12,
1265,
16,
2974,
4672,
225,
1788,
2853,
12,
774,
13,
225,
628,
67,
7670,
23,
273,
1140,
18,
803,
18,
5701,
12,
1265,
16,
315,
7670,
23,
7923,
628,
67,
7670,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2951,
9213,
12,
1265,
16,
2974,
4672,
225,
1788,
2853,
12,
774,
13,
225,
628,
67,
7670,
23,
273,
1140,
18,
803,
18,
5701,
12,
1265,
16,
315,
7670,
23,
7923,
628,
67,
7670,
23,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.