rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
text = text.replace(">", """) | text = text.replace("\"", """) | def encodeText(text): if not text: return text text = text.replace("&", "&") text = text.replace("<", "<") text = text.replace(">", ">") text = text.replace(">", """) return text | fb832c764df39f18c86a783e0a9a88a61d937755 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2223/fb832c764df39f18c86a783e0a9a88a61d937755/rdw_helpers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
1528,
12,
955,
4672,
309,
486,
977,
30,
327,
977,
977,
273,
977,
18,
2079,
2932,
10,
3113,
7830,
931,
4868,
13,
977,
273,
977,
18,
2079,
2932,
32,
3113,
7830,
5618,
4868,
13,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
1528,
12,
955,
4672,
309,
486,
977,
30,
327,
977,
977,
273,
977,
18,
2079,
2932,
10,
3113,
7830,
931,
4868,
13,
977,
273,
977,
18,
2079,
2932,
32,
3113,
7830,
5618,
4868,
13,
9... |
if not (item.icon_cache.isValid() or | if not item.icon_cache or not (item.icon_cache.isValid() or | def icon_changed(self): """See item.get_thumbnail to figure out which items to send signals for. """ self.signal_change(needs_save=False) for item in self.items: if not (item.icon_cache.isValid() or item.screenshot or item.isContainerItem): item.signal_change(needs_save=False) | 3710637007dde793979208ceafc3c1112cfd3c94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/3710637007dde793979208ceafc3c1112cfd3c94/feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4126,
67,
6703,
12,
2890,
4672,
3536,
9704,
761,
18,
588,
67,
14904,
358,
7837,
596,
1492,
1516,
358,
1366,
11505,
364,
18,
3536,
365,
18,
10420,
67,
3427,
12,
20600,
67,
5688,
33,
838... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4126,
67,
6703,
12,
2890,
4672,
3536,
9704,
761,
18,
588,
67,
14904,
358,
7837,
596,
1492,
1516,
358,
1366,
11505,
364,
18,
3536,
365,
18,
10420,
67,
3427,
12,
20600,
67,
5688,
33,
838... |
addbase.close(self) | def close(self): if self.closehook: apply(self.closehook, self.hookargs) self.closehook = None self.hookargs = None addbase.close(self) | c580dae6da60aa76e9b885ddbf7a9833aa61c147 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c580dae6da60aa76e9b885ddbf7a9833aa61c147/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
309,
365,
18,
4412,
4476,
30,
2230,
12,
2890,
18,
4412,
4476,
16,
365,
18,
4476,
1968,
13,
365,
18,
4412,
4476,
273,
599,
365,
18,
4476,
1968,
273,
599,
527,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
309,
365,
18,
4412,
4476,
30,
2230,
12,
2890,
18,
4412,
4476,
16,
365,
18,
4476,
1968,
13,
365,
18,
4412,
4476,
273,
599,
365,
18,
4476,
1968,
273,
599,
527,
19... | |
def dispatch_departure(self, node, method_name): | def dispatch_departure(self, node): node_name = node.__class__.__name__ | def dispatch_departure(self, node, method_name): method = getattr(self, 'depart_' + method_name, self.unknown_departure) return method(node) | 971c54bb905b5e813bab54eaff4546f7b9f77950 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/971c54bb905b5e813bab54eaff4546f7b9f77950/nodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3435,
67,
323,
2680,
594,
12,
2890,
16,
756,
4672,
756,
67,
529,
273,
756,
16186,
1106,
972,
16186,
529,
972,
707,
273,
3869,
12,
2890,
16,
296,
323,
2680,
4623,
397,
707,
67,
529,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3435,
67,
323,
2680,
594,
12,
2890,
16,
756,
4672,
756,
67,
529,
273,
756,
16186,
1106,
972,
16186,
529,
972,
707,
273,
3869,
12,
2890,
16,
296,
323,
2680,
4623,
397,
707,
67,
529,
1... |
raise KeyError(unique_id) | else: raise KeyError(unique_id) | def find(self, unique_id): # We could speed this method up by building and maintaining an index. for event in self: if event.unique_id == unique_id: return event raise KeyError(unique_id) | 2650639b445e9d56d387f08a00a67af0ba2043bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/2650639b445e9d56d387f08a00a67af0ba2043bb/cal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
12,
2890,
16,
3089,
67,
350,
4672,
468,
1660,
3377,
8632,
333,
707,
731,
635,
10504,
471,
11566,
3280,
392,
770,
18,
364,
871,
316,
365,
30,
309,
871,
18,
6270,
67,
350,
422,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
12,
2890,
16,
3089,
67,
350,
4672,
468,
1660,
3377,
8632,
333,
707,
731,
635,
10504,
471,
11566,
3280,
392,
770,
18,
364,
871,
316,
365,
30,
309,
871,
18,
6270,
67,
350,
422,
3... |
if square.color() == color: | squarecolor = square.color() if squarecolor == color: | def score(self, color): """ score according to chinese rules (area, instead of territory) """ if color == WHITE: count = KOMI + self.black_dead else: count = self.white_dead for square in self.squares: if square.color() == color: count += 1 elif square.color() == EMPTY: surround = 0 for neighbour in square.neighbours: if neighbour.color() == color: surround += 1 if surround == len(square.neighbours): count += 1 return count | 0d95ae33a76068dbf939b15d98629d016d9fb86a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4470/0d95ae33a76068dbf939b15d98629d016d9fb86a/go.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4462,
12,
2890,
16,
2036,
4672,
3536,
4462,
4888,
358,
462,
25331,
2931,
261,
5036,
16,
3560,
434,
268,
25313,
13,
3536,
309,
2036,
422,
24353,
30,
1056,
273,
1475,
1872,
45,
397,
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,
4462,
12,
2890,
16,
2036,
4672,
3536,
4462,
4888,
358,
462,
25331,
2931,
261,
5036,
16,
3560,
434,
268,
25313,
13,
3536,
309,
2036,
422,
24353,
30,
1056,
273,
1475,
1872,
45,
397,
365,
... |
print 'Usage:\n %s <output_directory>' % sys.argv[0] | print 'Usage:\n %s <output_directory> [branding]' % sys.argv[0] | def main(argv): translated_strings = CollectTranslatedStrings() kFilebase = os.path.join(argv[1], 'installer_util_strings') WriteRCFile(translated_strings, kFilebase) WriteHeaderFile(translated_strings, kFilebase) | d55a76d023d7e2813170f7d04b554611861749ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/d55a76d023d7e2813170f7d04b554611861749ab/create_string_rc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
9955,
67,
10219,
273,
9302,
20421,
7957,
1435,
417,
812,
1969,
273,
1140,
18,
803,
18,
5701,
12,
19485,
63,
21,
6487,
296,
20163,
67,
1367,
67,
10219,
6134,
2598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
19485,
4672,
9955,
67,
10219,
273,
9302,
20421,
7957,
1435,
417,
812,
1969,
273,
1140,
18,
803,
18,
5701,
12,
19485,
63,
21,
6487,
296,
20163,
67,
1367,
67,
10219,
6134,
2598,
... |
if(k=='locators'): | if(k=='locators'): | def convert_microstep(self, microstep, microstep_name): self.config.add_section(microstep_name) self.config.set(microstep_name, 'blueprint', 'collective.amberjack.blueprints.windmillmicrostep') self.set(microstep_name,'method', microstep['method']) primo = True selector='{' text='{' for k, v in microstep['params'].items(): if(k=='titleTut'): continue if(k=='descStep'): continue if(k=='url'): continue if(k=='nameStep'): continue if(k=='description'): self.set(microstep_name,'description',v) continue if(k=='locators'): if (v==''): continue allLoc=v.split(',') lung=len(allLoc) cont=1 for l in allLoc: loctype=(l.split(':')[0]+'').strip() selector+='"'+(l.split(':')[1]).strip()+'" : '+"'"+loctype+"'" if cont==lung: break else: selector+=', ' cont+=1 elif(k=='id' or k=='link' or k=='value' or k=='xpath' or k=='jsid' or k=='name' or k=='classname' or k=='tagname' or k=='label' or k=='jquery'): selector+='"'+v+'" : '+"'"+k+"'" else: if(primo==True): if(k=='bookmark'): text+="'"+k+"' : '"+v+'\'' else: text+="'"+k+"' : "+'"'+v.replace('"','\\"')+'"' primo=False else: if(k=='bookmark'): text+=", '"+k+"' : '"+v+'\'' else: text+=", '"+k+"' : "+'"'+v.replace('"','\\"')+'"' selector+='}' text+='}' if selector!= '{}': self.set(microstep_name,'selector',selector) if text!= '{}': self.set(microstep_name,'text',text) | adcfae1b75757b81099367bed24f899d4be62038 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8218/adcfae1b75757b81099367bed24f899d4be62038/transforms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
14458,
4119,
12,
2890,
16,
6481,
4119,
16,
6481,
4119,
67,
529,
4672,
365,
18,
1425,
18,
1289,
67,
3464,
12,
14458,
4119,
67,
529,
13,
365,
18,
1425,
18,
542,
12,
14458,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14458,
4119,
12,
2890,
16,
6481,
4119,
16,
6481,
4119,
67,
529,
4672,
365,
18,
1425,
18,
1289,
67,
3464,
12,
14458,
4119,
67,
529,
13,
365,
18,
1425,
18,
542,
12,
14458,
41... |
if isinstance(item, DateTime.DateTime): | if type(item)==DateTime.DateTimeType: | def _dateConvertFromDB(item): if item is None: return item # MySQLdb will now return DateTime objects is egenix is present. if isinstance(item, DateTime.DateTime): return item if string.find(item, '-') == -1: #timestamp form y = item[:4] mo = item[4:6] d = item[6:8] h = item[8:10] mi = item[10:12] s = item[12:14] else: y=item[:4] mo = item[5:7] d = item[8:10] h = item[11:13] mi = item[14:16] s = item[17:19] return DateTime.DateTime(int(y), int(mo), int(d), int(h), int(mi), int(s)) | a5bc384231ae9228f86b646e0200e5e4f638c4c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/a5bc384231ae9228f86b646e0200e5e4f638c4c3/mysqlconn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
712,
2723,
1265,
2290,
12,
1726,
4672,
309,
761,
353,
599,
30,
327,
761,
468,
13485,
1966,
903,
2037,
327,
3716,
2184,
353,
425,
4507,
697,
353,
3430,
18,
309,
618,
12,
1726,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
712,
2723,
1265,
2290,
12,
1726,
4672,
309,
761,
353,
599,
30,
327,
761,
468,
13485,
1966,
903,
2037,
327,
3716,
2184,
353,
425,
4507,
697,
353,
3430,
18,
309,
618,
12,
1726,
13,
... |
lineClicked = self.GetLineFromPos(event.GetPosition()) + 1 if self.breaks.has_key(lineClicked): self.deleteBreakPoint(lineClicked) else: self.addBreakPoint(lineClicked) | lineClicked = self.LineFromPosition(event.GetPosition()) + 1 if Preferences.useDebugger == 'old': if self.breaks.has_key(lineClicked): self.deleteBreakPoint(lineClicked) else: self.addBreakPoint(lineClicked) elif Preferences.useDebugger == 'new': if self.breaks.hasBreakpoint(lineClicked): self.deleteBreakPoint(lineClicked) else: self.addBreakPoint(lineClicked) | def OnMarginClick(self, event): if event.GetMargin() == 1: lineClicked = self.GetLineFromPos(event.GetPosition()) + 1 if self.breaks.has_key(lineClicked): self.deleteBreakPoint(lineClicked) else: self.addBreakPoint(lineClicked) else: FoldingStyledTextCtrlMix.OnMarginClick(self, event) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
9524,
6563,
12,
2890,
16,
871,
4672,
309,
871,
18,
967,
9524,
1435,
422,
404,
30,
980,
27633,
273,
365,
18,
1670,
1265,
2555,
12,
2575,
18,
967,
2555,
10756,
397,
404,
309,
28310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9524,
6563,
12,
2890,
16,
871,
4672,
309,
871,
18,
967,
9524,
1435,
422,
404,
30,
980,
27633,
273,
365,
18,
1670,
1265,
2555,
12,
2575,
18,
967,
2555,
10756,
397,
404,
309,
28310... |
lang, update_tax,date_order) | lang, update_tax,date_order,fp) | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True,date_order=False,packaging=False): | 6c85bb3352e22cf5ae1493a7d27ad90facf7fa56 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/6c85bb3352e22cf5ae1493a7d27ad90facf7fa56/product.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
846,
335,
5449,
16,
3017,
16,
26667,
33,
20,
16,
582,
362,
33,
8381,
16,
26667,
67,
89,
538,
33,
20,
16,
582,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
846,
335,
5449,
16,
3017,
16,
26667,
33,
20,
16,
582,
362,
33,
8381,
16,
26667,
67,
89,
538,
33,
20,
16,
582,
... |
half_axis = u[i] * 0.5 * v[i] | half_axis = axis_lengths[i] / 2.0 * v[i] | def execute_module(self): ii = self._input_data if not ii: return | 9a662b58081b223e2ff54ea3d063c7e78c4c347f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4494/9a662b58081b223e2ff54ea3d063c7e78c4c347f/FitEllipsoidToMask.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
67,
2978,
12,
2890,
4672,
6072,
273,
365,
6315,
2630,
67,
892,
309,
486,
6072,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
67,
2978,
12,
2890,
4672,
6072,
273,
365,
6315,
2630,
67,
892,
309,
486,
6072,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
os.kill(pid,9) | kill(pid,9) | def logOut(user,pid): #Forces the user to log out. if issessionalive(user) == 1: logkpr('logOut: Attempting killing '+user+' (TERM, 15)...') #this is a pretty bad way of killing a gnome-session, but we warned 'em #Should it be signal 1 (HUP)? os.kill(pid,15) time.sleep(5) if issessionalive(user) == 1: logkpr('logOut: Process still there, attempting force-killing '+user+' (KILL, 9)...') os.kill(pid,9) #logkpr('logOut: touched $username.logout') #touched? """ uncomment the following to brutally kill all of the users processes sleep 5 pkill -u $username # killing gnome-session should be more like: DISPLAY=":0" XAUTHORITY="/tmp/.gdmEQ0V5T" SESSION_MANAGER="local/wretched:/tmp/.ICE-unix/$pid" su -c 'gnome-session-save --kill --silent' $username # but this can still leave processes to cleanup - plus it's not easy to get SESSION_MANAG """ | a676b5a036664696b95ecdfb2c7d1b9b3882d6d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1574/a676b5a036664696b95ecdfb2c7d1b9b3882d6d9/timekpr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
1182,
12,
1355,
16,
6610,
4672,
468,
1290,
764,
326,
729,
358,
613,
596,
18,
309,
353,
3184,
11462,
12,
1355,
13,
422,
404,
30,
613,
79,
683,
2668,
1330,
1182,
30,
12864,
310,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
1182,
12,
1355,
16,
6610,
4672,
468,
1290,
764,
326,
729,
358,
613,
596,
18,
309,
353,
3184,
11462,
12,
1355,
13,
422,
404,
30,
613,
79,
683,
2668,
1330,
1182,
30,
12864,
310,
4... |
sig1 = sqrt(sum([ (S1[k]-mu1)^2 for k in range(n) ])) sig2 = sqrt(sum([ (S2[k]-mu2)^2 for k in range(n) ])) | sig1 = sqrt(sum([ (S1[k]-mu1)**2 for k in range(n) ])) sig2 = sqrt(sum([ (S2[k]-mu2)**2 for k in range(n) ])) | def translation_correlations(X1,X2): """ The sequence of correlations of the sequence X1 with the cyclic translations of the sequence X2. """ n = len(X1) if n != len(X2): raise ValueError, "Arguments must be of the same length." # Compute the mean value of each sequence: mu1 = sum(X1)/n mu2 = sum(X2)/n # Compute the standard deviations of each sequence: sig1 = sqrt(sum([ (S1[k]-mu1)^2 for k in range(n) ])) sig2 = sqrt(sum([ (S2[k]-mu2)^2 for k in range(n) ])) sig = sig1*sig2 corr_dict = { } for j in range(n): corr_dict[j] = sum([ (S1[i] - mu1) * (S2[(i+j)%n] - mu2) / sig for i in range(n) ]) return corr_dict | 585f918bb94291a20b9b4e70eb8388fef1384021 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/585f918bb94291a20b9b4e70eb8388fef1384021/string_ops.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4794,
67,
3850,
15018,
12,
60,
21,
16,
60,
22,
4672,
3536,
1021,
3102,
434,
1858,
15018,
434,
326,
3102,
1139,
21,
598,
326,
30383,
7863,
434,
326,
3102,
1139,
22,
18,
3536,
290,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4794,
67,
3850,
15018,
12,
60,
21,
16,
60,
22,
4672,
3536,
1021,
3102,
434,
1858,
15018,
434,
326,
3102,
1139,
21,
598,
326,
30383,
7863,
434,
326,
3102,
1139,
22,
18,
3536,
290,
273,
... |
data = cPickle.load(f) f.close() | try: data = cPickle.load(f) except EOFError: return {} finally: f.close() | def loadstatus(name): try: f = open(name, 'rb') except (IOError, WindowsError): return {} data = cPickle.load(f) f.close() return data | 2cf2bf2e7b6559b291112e7fcc7d899094efb012 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10193/2cf2bf2e7b6559b291112e7fcc7d899094efb012/lint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
2327,
12,
529,
4672,
775,
30,
284,
273,
1696,
12,
529,
16,
296,
6731,
6134,
1335,
261,
4294,
668,
16,
8202,
668,
4672,
327,
2618,
775,
30,
501,
273,
276,
17968,
298,
18,
945,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
2327,
12,
529,
4672,
775,
30,
284,
273,
1696,
12,
529,
16,
296,
6731,
6134,
1335,
261,
4294,
668,
16,
8202,
668,
4672,
327,
2618,
775,
30,
501,
273,
276,
17968,
298,
18,
945,
1... |
do_elflink_test(link_str + cmd, combine("HUGETLB_SHARE=1", pre)) | do_elflink_test(link_str + cmd, combine("HUGETLB_SHARE=%d" % i, pre)) | def elflink_and_share_test(cmd, pre=""): """ Run the ordinary linkhuge tests with sharing enabled """ # Run each elflink test pair independently - clean up the sharefiles # before and after each pair clear_hpages() for link_str in ("xB.", "xBDT."): for i in range(2): do_elflink_test(link_str + cmd, combine("HUGETLB_SHARE=1", pre)) clear_hpages() | 8b47c3cf275fa7bed790fd6cb196c14d48b64112 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3715/8b47c3cf275fa7bed790fd6cb196c14d48b64112/run_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
415,
74,
1232,
67,
464,
67,
14419,
67,
3813,
12,
4172,
16,
675,
1546,
6,
4672,
3536,
1939,
326,
4642,
2101,
1692,
76,
21627,
7434,
598,
21001,
3696,
3536,
468,
1939,
1517,
415,
74,
123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
415,
74,
1232,
67,
464,
67,
14419,
67,
3813,
12,
4172,
16,
675,
1546,
6,
4672,
3536,
1939,
326,
4642,
2101,
1692,
76,
21627,
7434,
598,
21001,
3696,
3536,
468,
1939,
1517,
415,
74,
123... |
(ignoredMatch.group() == file)): | (ignoredMatch.group() == daeFile)): | def __CheckForNewTestsRecurse(self, path, pattern, settings, newDataSets, ignoredPatterns): file, dirs = self.GetValidFileAndDirs(path) if (file != None): file = os.path.normpath(os.path.dirname(file)) match = pattern.match(file) if (match != None): if (match.group() == file): found = False for test in self.GetTestGenerator(): if ((test.GetDataSetPath() == file) and test.GetSettings() == settings): found = True break if (not found): ignoredMatchFlag = False for ignoredPattern in ignoredPatterns: ignoredMatch = ignoredPattern.match(file) if ((ignoredMatch != None) and (ignoredMatch.group() == file)): ignoredMatchFlag = True break if (not ignoredMatchFlag): newDataSets.append(file) return for dir in dirs: self.__CheckForNewTestsRecurse(dir, pattern, settings, newDataSets, ignoredPatterns) | 80881a280cc7b2604daab9c5d1fc3c72e67e342d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11176/80881a280cc7b2604daab9c5d1fc3c72e67e342d/FTestProcedure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1564,
1290,
1908,
14650,
426,
17682,
12,
2890,
16,
589,
16,
1936,
16,
1947,
16,
16026,
2785,
16,
5455,
11268,
4672,
585,
16,
7717,
273,
365,
18,
967,
1556,
812,
1876,
9872,
12,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1564,
1290,
1908,
14650,
426,
17682,
12,
2890,
16,
589,
16,
1936,
16,
1947,
16,
16026,
2785,
16,
5455,
11268,
4672,
585,
16,
7717,
273,
365,
18,
967,
1556,
812,
1876,
9872,
12,
8... |
headers, 'file:'+file) | headers, urlfile) | def open_local_file(self, url): import mimetypes, mimetools, StringIO mtype = mimetypes.guess_type(url)[0] headers = mimetools.Message(StringIO.StringIO( 'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url) if not host: return addinfourl(open(url2pathname(file), 'rb'), headers, 'file:'+file) host, port = splitport(host) if not port \ and socket.gethostbyname(host) in (localhost(), thishost()): return addinfourl(open(url2pathname(file), 'rb'), headers, 'file:'+file) raise IOError, ('local file error', 'not on local host') | 1e1b08c7b44eb6d6f1b768d70c2445528bce9816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1e1b08c7b44eb6d6f1b768d70c2445528bce9816/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
3729,
67,
768,
12,
2890,
16,
880,
4672,
1930,
20369,
15180,
16,
20369,
278,
8192,
16,
15777,
22189,
273,
20369,
15180,
18,
20885,
67,
723,
12,
718,
25146,
20,
65,
1607,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
3729,
67,
768,
12,
2890,
16,
880,
4672,
1930,
20369,
15180,
16,
20369,
278,
8192,
16,
15777,
22189,
273,
20369,
15180,
18,
20885,
67,
723,
12,
718,
25146,
20,
65,
1607,
273,
... |
self.matches['launchpad'] = self._vte.match_add ('\\bLP | self.matches['launchpad'] = self._vte.match_add ('\\bLP:? | def add_matches (self, posix = True): userchars = "-A-Za-z0-9" passchars = "-A-Za-z0-9,?;.:/!%$^*&~\"#'" hostchars = "-A-Za-z0-9" pathchars = "-A-Za-z0-9_$.+!*(),;:@&=?/~#%'" schemes = "(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:)" user = "[" + userchars + "]+(:[" + passchars + "]+)?" urlpath = "/[" + pathchars + "]*[^]'.}>) \t\r\n,\\\"]" | 495d1b5fbc13e2dc7a9f89f48cf4567f1450477d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6502/495d1b5fbc13e2dc7a9f89f48cf4567f1450477d/terminatorterm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
8436,
261,
2890,
16,
16366,
273,
1053,
4672,
729,
7549,
273,
3701,
37,
17,
15948,
17,
94,
20,
17,
29,
6,
1342,
7549,
273,
3701,
37,
17,
15948,
17,
94,
20,
17,
29,
27166,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
8436,
261,
2890,
16,
16366,
273,
1053,
4672,
729,
7549,
273,
3701,
37,
17,
15948,
17,
94,
20,
17,
29,
6,
1342,
7549,
273,
3701,
37,
17,
15948,
17,
94,
20,
17,
29,
27166,
3... |
fn = re.sub(r'\.txt$', '', file_basename) | ext = '|'.join(data['extensions'].keys()) fn = re.sub(r'\.(' + ext + ')$', '', file_basename) | def __populateBasicMetadata(self): """ Fills the metadata dict with metadata about the given file. This metadata consists of things we pick up from an os.stat call as well as knowledge of the filename and the root directory. The rest of the metadata comes from parsing the file itself which is done with __populateData. """ # handle file manipulations file_basename = os.path.basename(self._filename) | d32aa9ced5893c7f336fc79b9ebea0ca47ab3a85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/d32aa9ced5893c7f336fc79b9ebea0ca47ab3a85/fileentry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
19936,
8252,
2277,
12,
2890,
4672,
3536,
14192,
87,
326,
1982,
2065,
598,
1982,
2973,
326,
864,
585,
18,
225,
1220,
1982,
20915,
434,
9198,
732,
6002,
731,
628,
392,
1140,
18,
5642... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19936,
8252,
2277,
12,
2890,
4672,
3536,
14192,
87,
326,
1982,
2065,
598,
1982,
2973,
326,
864,
585,
18,
225,
1220,
1982,
20915,
434,
9198,
732,
6002,
731,
628,
392,
1140,
18,
5642... |
'/record/edit/? | '/record/edit/?ln=%s | def format_element(bfo, style): """ Prints a link to BibEdit, if authorization is granted @param style: the CSS style to be applied to the link. """ _ = gettext_set_language(bfo.lang) out = "" user_info = bfo.user_info collection = guess_primary_collection_of_a_record(bfo.recID) (auth_code, auth_message) = acc_authorize_action(user_info, 'runbibedit', collection=collection) if auth_code == 0: linkattrd = {} if style != '': linkattrd['style'] = style out += create_html_link(CFG_SITE_URL + '/record/edit/?#state=edit&recid=%s&ln=%s' % (str(bfo.recID), bfo.lang,), {}, link_label=_("Edit This Record"), linkattrd=linkattrd) return out | 4d0494b98559b3cbdc06ecfb1a601bdd0c32fd58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2763/4d0494b98559b3cbdc06ecfb1a601bdd0c32fd58/bfe_edit_record.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
2956,
12,
70,
617,
16,
2154,
4672,
3536,
3038,
87,
279,
1692,
358,
605,
495,
4666,
16,
309,
6093,
353,
17578,
225,
632,
891,
2154,
30,
326,
6765,
2154,
358,
506,
6754,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
2956,
12,
70,
617,
16,
2154,
4672,
3536,
3038,
87,
279,
1692,
358,
605,
495,
4666,
16,
309,
6093,
353,
17578,
225,
632,
891,
2154,
30,
326,
6765,
2154,
358,
506,
6754,
358,
... |
if self._options.winhttp: shell_args.append('--winhttp') | def Run(self): """Run all our tests on all our test files. | 61062765dbf079528a51b67744568e7736fc1627 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/61062765dbf079528a51b67744568e7736fc1627/run_webkit_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
12,
2890,
4672,
3536,
1997,
777,
3134,
7434,
603,
777,
3134,
1842,
1390,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1939,
12,
2890,
4672,
3536,
1997,
777,
3134,
7434,
603,
777,
3134,
1842,
1390,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
""" | """ | def __call__(self, *args, **kwargs): """ EXAMPLES: sage: x,y,z=var('x,y,z') | 5e3f46a65a607c04b739a1c0c20b41a5f4cc4632 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/5e3f46a65a607c04b739a1c0c20b41a5f4cc4632/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
619,
16,
93,
16,
94,
33,
1401,
2668,
92,
16,
93,
16,
94,
6134,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
619,
16,
93,
16,
94,
33,
1401,
2668,
92,
16,
93,
16,
94,
6134,
2,
-100,
-... |
if not start: start = time.time() | if not start: start = time.time() | def decompress_response_data(response): encoding = None # a reponse to a httplib.HTTPRequest if (response.__class__.__name__ == "HTTPResponse"): encoding = response.getheader("Content-Encoding") # a response to urllib2.urlopen() elif (response.__class__.__name__ == "addinfourl"): encoding = response.info().get("Content-Encoding") tot_len = response.info().get("Content-Length") if not tot_len: tot_len = "0" start = 0 data = "" while True: data_read = response.read(500) # Cells are 495 bytes.. if not start: start = time.time() # TODO: if this doesn't work, check stream observer for # lack of progress.. or for a sign we should read.. len_read = len(data) now = time.time() plog("DEBUG", "Read "+str(len_read)+"/"+str(tot_len)) # Wait 5 seconds before counting data if (now-start) > 5 and len_read/(now-start) < min_rate: plog("WARN", "Minimum xfer rate not maintained. Aborting xfer") return "" if not data_read: break data += data_read if encoding == 'gzip' or encoding == 'x-gzip': return gzip.GzipFile('', 'rb', 9, StringIO.StringIO(data)).read() elif encoding == 'deflate': return StringIO.StringIO(zlib.decompress(data)).read() else: return data | 66eda46415e31c1e17a158bdfb92fc82dc56f58c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3762/66eda46415e31c1e17a158bdfb92fc82dc56f58c/soat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16824,
67,
2740,
67,
892,
12,
2740,
4672,
2688,
273,
599,
225,
468,
279,
283,
575,
358,
279,
15851,
6673,
18,
23891,
309,
261,
2740,
16186,
1106,
972,
16186,
529,
972,
422,
315,
3693,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16824,
67,
2740,
67,
892,
12,
2740,
4672,
2688,
273,
599,
225,
468,
279,
283,
575,
358,
279,
15851,
6673,
18,
23891,
309,
261,
2740,
16186,
1106,
972,
16186,
529,
972,
422,
315,
3693,
... |
styles.append(token[1]) elif token[0] == hpp.COMMENT: | styles.append(token[1]) elif token[0] == hpp.COMMENT: | def scan_html(fp, baseuri, append): token_stream = hpp.generate_tokens(fp, comment=True) for token in token_stream: if token[0] != hpp.TAG: continue tag = token[1] # ---------------------------------------------------------------------- # handle <style> block if tag == 'style': # HACK: <style> should only be valid inside <head> styles = [] for token in token_stream: if token[0] == hpp.DATA: styles.append(token[1]) elif token[0] == hpp.COMMENT: styles.append(token[1]) # CSS enclosed by HTML comment! elif token[0] == hpp.TAG: if token[1] == 'style': # <style> follows by <style>??? OK, treat it as <style>. continue else: # No </style>??? Any other open tags would close <style> break elif token[0] == hpp.ENDTAG: break else: # the stream is exhausted? Make sure next step knows # there is no unprocessed token. token = None # process the style content _scan_html_style(tag, ''.join(styles), baseuri, append) # look at last unprecessed token if not token: # TODO: test break elif token[0] == hpp.ENDTAG: # hopefully this ends with a valid </style> # TODO: test continue else: # we got a (non-style) begin TAG??? OK, we'll process this tag. tag = token[1] # TODO: test # ---------------------------------------------------------------------- # read TAG and its attributes isLinkTag = (tag == 'link') uri_attr = LINKABLE_TAGS.get(tag,'') # run through attribute list to find relevant info uri = style = rel = ctype = '' for n, v in token[2]: # TODO: need to XML decode? if n == uri_attr: uri = v elif n == 'style': style = v elif isLinkTag: if n == 'rel': rel = v elif n == 'type': ctype = v # ---------------------------------------------------------------------- # handle style attribute if style: _scan_html_style(tag, style, baseuri, append) # ---------------------------------------------------------------------- # handle uri attributes (href, src, etc) if not uri: continue #print >>sys.stderr, tag, uri, ctype # note: the ctype is advisory, content-type from http may not be consistent # everything not HTML or CSS is APPLICATION if tag in ['frame','iframe']: ctype = TEXT_HTML elif isLinkTag: if rel.lower() == 'stylesheet': # TODO: rel="alternate stylesheet"? ctype = TEXT_CSS elif ctype != TEXT_CSS: # only want CSS from <link> continue else: ctype = APPLICATION append(baseuri, uri, ctype, tag) | b6602954ff58a4ef2fc133f99f9cd0fd4506e16b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2355/b6602954ff58a4ef2fc133f99f9cd0fd4506e16b/snapshot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
67,
2620,
12,
7944,
16,
1026,
1650,
16,
714,
4672,
225,
1147,
67,
3256,
273,
366,
11858,
18,
7163,
67,
7860,
12,
7944,
16,
2879,
33,
5510,
13,
364,
1147,
316,
1147,
67,
3256,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
67,
2620,
12,
7944,
16,
1026,
1650,
16,
714,
4672,
225,
1147,
67,
3256,
273,
366,
11858,
18,
7163,
67,
7860,
12,
7944,
16,
2879,
33,
5510,
13,
364,
1147,
316,
1147,
67,
3256,
3... |
elif (inspect.ismemberdescriptor(obj) or inspect.isgetsetdescriptor(obj) | elif (ismemberdescriptor(obj) or isgetsetdescriptor(obj) | def get_documenter(obj): """ Get an autodoc.Documenter class suitable for documenting the given object """ import sphinx.ext.autodoc as autodoc if inspect.isclass(obj): if issubclass(obj, Exception): return autodoc.ExceptionDocumenter return autodoc.ClassDocumenter elif inspect.ismodule(obj): return autodoc.ModuleDocumenter elif inspect.ismethod(obj) or inspect.ismethoddescriptor(obj): return autodoc.MethodDocumenter elif (inspect.ismemberdescriptor(obj) or inspect.isgetsetdescriptor(obj) or inspect.isdatadescriptor(obj)): return autodoc.AttributeDocumenter elif inspect.isroutine(obj): return autodoc.FunctionDocumenter else: return autodoc.DataDocumenter | 0ecd745c4918f3a8563a2428c16a0346aef0ec5a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7032/0ecd745c4918f3a8563a2428c16a0346aef0ec5a/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5457,
264,
12,
2603,
4672,
3536,
968,
392,
2059,
369,
504,
18,
2519,
264,
667,
10631,
364,
1668,
310,
326,
864,
733,
3536,
1930,
26296,
18,
408,
18,
5854,
369,
504,
487,
2059,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5457,
264,
12,
2603,
4672,
3536,
968,
392,
2059,
369,
504,
18,
2519,
264,
667,
10631,
364,
1668,
310,
326,
864,
733,
3536,
1930,
26296,
18,
408,
18,
5854,
369,
504,
487,
2059,... |
def test08_DuplicateKeys(self): | def test09_DuplicateKeys(self): | def test08_DuplicateKeys(self): d = self.d if verbose: print '\n', '-=' * 30 print "Running %s.test08_DuplicateKeys..." % \ self.__class__.__name__ | 46ea74ede0b8d2264d7a6e3eeddf206a32b98522 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/46ea74ede0b8d2264d7a6e3eeddf206a32b98522/test_basics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5908,
67,
11826,
2396,
12,
2890,
4672,
302,
273,
365,
18,
72,
309,
3988,
30,
1172,
2337,
82,
2187,
2400,
2218,
380,
5196,
1172,
315,
7051,
738,
87,
18,
3813,
6840,
67,
11826,
239... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5908,
67,
11826,
2396,
12,
2890,
4672,
302,
273,
365,
18,
72,
309,
3988,
30,
1172,
2337,
82,
2187,
2400,
2218,
380,
5196,
1172,
315,
7051,
738,
87,
18,
3813,
6840,
67,
11826,
239... |
from twisted.internet.ssl import DefaultOpenSSLContextFactory | def render(self, req): contents = """<html> | 210970ab9d826e3356854266d5ed3941c43d4c64 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12595/210970ab9d826e3356854266d5ed3941c43d4c64/demo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1111,
4672,
2939,
273,
3536,
32,
2620,
34,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1111,
4672,
2939,
273,
3536,
32,
2620,
34,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
self.fail('Could not fetch %s: %s' % (entity.get_absolute_url(), unicode(e)) | self.fail('Could not fetch %s: %s' % (entity.get_absolute_url(), unicode(e))) | def testBusstops(self): entities = random.sample(list(Entity.objects.filter(entity_type__source='naptan')), 20) client = Client() for entity in entities: try: r = client.get(entity.get_absolute_url()) except urllib2.HTTPError, e: self.fail('Could not fetch %s: %s' % (entity.get_absolute_url(), unicode(e)) | c13a6948643745636ca04627910c4debe470a351 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14173/c13a6948643745636ca04627910c4debe470a351/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7086,
334,
4473,
12,
2890,
4672,
5140,
273,
2744,
18,
6358,
12,
1098,
12,
1943,
18,
6911,
18,
2188,
12,
1096,
67,
723,
972,
3168,
2218,
82,
1657,
304,
6134,
3631,
4200,
13,
1004,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7086,
334,
4473,
12,
2890,
4672,
5140,
273,
2744,
18,
6358,
12,
1098,
12,
1943,
18,
6911,
18,
2188,
12,
1096,
67,
723,
972,
3168,
2218,
82,
1657,
304,
6134,
3631,
4200,
13,
1004,... |
elif subjob.backend.status != info['status']: LCG.updateGangaJobStatus(subjob, info['status']) else: pass | def check_info(status): for info in status: if info['is_node'] and not info['name']: return False return True | 2db7950d0721f8cb421a6b0b0e535e3cc89d1c80 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/2db7950d0721f8cb421a6b0b0e535e3cc89d1c80/LCG.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1376,
12,
2327,
4672,
364,
1123,
316,
1267,
30,
309,
1123,
3292,
291,
67,
2159,
3546,
471,
486,
1123,
3292,
529,
3546,
30,
327,
1083,
327,
1053,
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,
0,
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,
1376,
12,
2327,
4672,
364,
1123,
316,
1267,
30,
309,
1123,
3292,
291,
67,
2159,
3546,
471,
486,
1123,
3292,
529,
3546,
30,
327,
1083,
327,
1053,
2,
-100,
-100,
-100,
-100,
-10... | |
"fixed") | defaultfont) | def get_vfolderfont(): return sqmail.utils.getsetting("vfolderfont", \ "fixed") | e3164923bef42e478fbe8171006582eddf86beed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3083/e3164923bef42e478fbe8171006582eddf86beed/preferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
90,
5609,
5776,
13332,
327,
4744,
4408,
18,
5471,
18,
588,
8920,
2932,
90,
5609,
5776,
3113,
521,
805,
5776,
13,
225,
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,
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,
67,
90,
5609,
5776,
13332,
327,
4744,
4408,
18,
5471,
18,
588,
8920,
2932,
90,
5609,
5776,
3113,
521,
805,
5776,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._leakDetector.removeContainerById(id) | self._leakDetector.removeContainerById(objId) | def run(self): try: self._leakDetector._index2containerId2len[self._index] = {} ids = self._leakDetector.getContainerIds() # record the current len of each container for id in ids: yield None try: for result in self._leakDetector.getContainerByIdGen(id): yield None container = result except Exception, e: # this container no longer exists if self.notify.getDebug(): for contName in self._leakDetector.getContainerNameByIdGen(id): yield None self.notify.debug( '%s no longer exists; caught exception in getContainerById (%s)' % ( contName, e)) self._leakDetector.removeContainerById(id) continue if container is None: # this container no longer exists if self.notify.getDebug(): for contName in self._leakDetector.getContainerNameByIdGen(id): yield None self.notify.debug('%s no longer exists; getContainerById returned None' % contName) self._leakDetector.removeContainerById(id) continue try: cLen = len(container) except Exception, e: # this container no longer exists if self.notify.getDebug(): for contName in self._leakDetector.getContainerNameByIdGen(id): yield None self.notify.debug( '%s is no longer a container, it is now %s (%s)' % (contName, safeRepr(container), e)) self._leakDetector.removeContainerById(id) continue self._leakDetector._index2containerId2len[self._index][id] = cLen # compare the current len of each container to past lens if self._index > 0: idx2id2len = self._leakDetector._index2containerId2len for id in idx2id2len[self._index]: yield None if id in idx2id2len[self._index-1]: diff = idx2id2len[self._index][id] - idx2id2len[self._index-1][id] if diff > 0: if diff > idx2id2len[self._index-1][id]: minutes = (self._leakDetector._index2delay[self._index] - self._leakDetector._index2delay[self._index-1]) / 60. name = self._leakDetector.getContainerNameById(id) if idx2id2len[self._index-1][id] != 0: percent = 100. * (float(diff) / float(idx2id2len[self._index-1][id])) try: for container in self._leakDetector.getContainerByIdGen(id): yield None except: # TODO self.notify.debug('caught exception in getContainerByIdGen (1)') else: self.notify.warning( '%s (%s) grew %.2f%% in %.2f minutes (%s items at last measurement, current contents: %s)' % ( name, itype(container), percent, minutes, idx2id2len[self._index][id], fastRepr(container, maxLen=CheckContainers.ReprItems))) yield None if (self._index > 2 and id in idx2id2len[self._index-2] and id in idx2id2len[self._index-3]): diff2 = idx2id2len[self._index-1][id] - idx2id2len[self._index-2][id] diff3 = idx2id2len[self._index-2][id] - idx2id2len[self._index-3][id] if self._index <= 4: if diff > 0 and diff2 > 0 and diff3 > 0: name = self._leakDetector.getContainerNameById(id) try: for container in self._leakDetector.getContainerByIdGen(id): yield None except: # TODO self.notify.debug('caught exception in getContainerByIdGen (2)') else: msg = ('%s (%s) consistently increased in size over the last ' '3 periods (%s items at last measurement, current contents: %s)' % (name, itype(container), idx2id2len[self._index][id], fastRepr(container, maxLen=CheckContainers.ReprItems))) self.notify.warning(msg) yield None elif (id in idx2id2len[self._index-4] and id in idx2id2len[self._index-5]): # if size has consistently increased over the last 5 checks, # send out a warning diff4 = idx2id2len[self._index-3][id] - idx2id2len[self._index-4][id] diff5 = idx2id2len[self._index-4][id] - idx2id2len[self._index-5][id] if diff > 0 and diff2 > 0 and diff3 > 0 and diff4 > 0 and diff5 > 0: name = self._leakDetector.getContainerNameById(id) try: for container in self._leakDetector.getContainerByIdGen(id): yield None except: # TODO self.notify.debug('caught exception in getContainerByIdGen (3)') else: msg = ('%s (%s) consistently increased in size over the last ' '5 periods (%s items at last measurement, current contents: %s)' % (name, itype(container), idx2id2len[self._index][id], fastRepr(container, maxLen=CheckContainers.ReprItems))) self.notify.warning(msg) self.notify.info('sending notification...') yield None messenger.send(self._leakDetector.getLeakEvent(), [container, name]) except Exception, e: print 'CheckContainers job caught exception: %s' % e if __dev__: #raise e pass yield Job.Done | d9560fa19bec29d4ea08e0b58cd1b7384659f9ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/d9560fa19bec29d4ea08e0b58cd1b7384659f9ff/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
775,
30,
365,
6315,
298,
581,
12594,
6315,
1615,
22,
3782,
548,
22,
1897,
63,
2890,
6315,
1615,
65,
273,
2618,
3258,
273,
365,
6315,
298,
581,
12594,
18,
588,
217... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
775,
30,
365,
6315,
298,
581,
12594,
6315,
1615,
22,
3782,
548,
22,
1897,
63,
2890,
6315,
1615,
65,
273,
2618,
3258,
273,
365,
6315,
298,
581,
12594,
18,
588,
217... |
files = [f for f in os.listdir(backupdir) if f.startswith(db_name+"-")] | files = [f for f in os.listdir(backupdir) if f.startswith(db_name + "-")] | def backup(self): # TODO: implement return | f245a13ecefae0a9b1c9b7caf0c73696fcbd11c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1240/f245a13ecefae0a9b1c9b7caf0c73696fcbd11c1/pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5114,
12,
2890,
4672,
468,
2660,
30,
2348,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5114,
12,
2890,
4672,
468,
2660,
30,
2348,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.data_wrapper = lambda x: x.replace('\r\n', os.linesep) | if os.linesep == '\r\n': self.data_wrapper = lambda x: x else: self.data_wrapper = lambda x: x.replace('\r\n', os.linesep) | def enable_receiving(self, type): """Enable receiving of data over the channel. Depending on the TYPE currently in use it creates an appropriate wrapper for the incoming data. | 0f1a931b840d7fb7ad47ae3841d21493ad5dc62b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7236/0f1a931b840d7fb7ad47ae3841d21493ad5dc62b/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4237,
67,
8606,
9288,
12,
2890,
16,
618,
4672,
3536,
8317,
15847,
434,
501,
1879,
326,
1904,
18,
4019,
2846,
603,
326,
3463,
4551,
316,
999,
518,
3414,
392,
5505,
4053,
364,
326,
6935,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4237,
67,
8606,
9288,
12,
2890,
16,
618,
4672,
3536,
8317,
15847,
434,
501,
1879,
326,
1904,
18,
4019,
2846,
603,
326,
3463,
4551,
316,
999,
518,
3414,
392,
5505,
4053,
364,
326,
6935,
... |
'action', 'background', 'dynsrc', 'href', 'lowsrc', 'src']) | 'action', 'background', 'data', 'dynsrc', 'href', 'lowsrc', 'src']) | def stream_to_str_as_html(stream, encoding='UTF-8'): content_type = 'text/html; charset=%s' % encoding stream = set_content_type(stream, content_type) return stream_to_html(stream, encoding) | 488b724fe0e17a3aa4378f8e5efee96f24036c96 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/488b724fe0e17a3aa4378f8e5efee96f24036c96/xhtml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1407,
67,
869,
67,
701,
67,
345,
67,
2620,
12,
3256,
16,
2688,
2218,
5159,
17,
28,
11,
4672,
913,
67,
723,
273,
296,
955,
19,
2620,
31,
4856,
5095,
87,
11,
738,
2688,
1407,
273,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1407,
67,
869,
67,
701,
67,
345,
67,
2620,
12,
3256,
16,
2688,
2218,
5159,
17,
28,
11,
4672,
913,
67,
723,
273,
296,
955,
19,
2620,
31,
4856,
5095,
87,
11,
738,
2688,
1407,
273,
44... |
http_response, raw_reply = self._sync_handler.HandleCommand(raw_request) | if not self.server._sync_handler: import chromiumsync self.server._sync_handler = chromiumsync.TestServer() http_response, raw_reply = self.server._sync_handler.HandleCommand( raw_request) | def ChromiumSyncCommandHandler(self): """Handle a chromiumsync command arriving via http. | 885dc2c4995c28dcd4381d845cb39522782dac29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/885dc2c4995c28dcd4381d845cb39522782dac29/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1680,
520,
5077,
4047,
2189,
1503,
12,
2890,
4672,
3536,
3259,
279,
8123,
5077,
8389,
1296,
2454,
9288,
3970,
1062,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1680,
520,
5077,
4047,
2189,
1503,
12,
2890,
4672,
3536,
3259,
279,
8123,
5077,
8389,
1296,
2454,
9288,
3970,
1062,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
SupModType = SUP_MODULE_LIST | SupModType = [] | def MetaDataFileCheckLibraryInstance(self): if EccGlobalData.gConfig.MetaDataFileCheckLibraryInstance == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': EdkLogger.quiet("Checking for library instance type issue ...") SqlCommand = """select A.ID, A.Value2, B.Value2 from Inf as A left join Inf as B where A.Value1 = 'LIBRARY_CLASS' and A.Model = %s and B.Value1 = 'MODULE_TYPE' and B.Model = %s and A.BelongsToFile = B.BelongsToFile group by A.BelongsToFile""" % (MODEL_META_DATA_HEADER, MODEL_META_DATA_HEADER) RecordSet = EccGlobalData.gDb.TblInf.Exec(SqlCommand) LibraryClasses = {} for Record in RecordSet: List = Record[1].split('|', 1) SupModType = SUP_MODULE_LIST if len(List) == 1: SupModType = SupModType elif len(List) == 2: SupModType = List[1].split() if List[0] not in LibraryClasses: LibraryClasses[List[0]] = SupModType else: LibraryClasses[List[0]].extend(SupModType) if Record[2] != 'BASE' and Record[2] not in SupModType: EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_2, OtherMsg = "The Library Class '%s' does not specify its supported module types" % (List[0]), BelongsToTable = 'Inf', BelongsToItem = Record[0]) SqlCommand = """select A.ID, A.Value1, B.Value2 from Inf as A left join Inf as B where A.Model = %s and B.Value1 = '%s' and B.Model = %s and B.BelongsToFile = A.BelongsToFile""" \ % (MODEL_EFI_LIBRARY_CLASS, 'MODULE_TYPE', MODEL_META_DATA_HEADER) RecordSet = EccGlobalData.gDb.TblInf.Exec(SqlCommand) # Merge all LibraryClasses' supmodlist RecordDict = {} for Record in RecordSet: if Record[1] not in RecordDict: RecordDict[Record[1]] = [str(Record[2])] else: if Record[2] not in RecordDict[Record[1]]: RecordDict[Record[1]].append(Record[2]) for Record in RecordSet: if Record[1] in LibraryClasses: if Record[2] not in LibraryClasses[Record[1]] and 'BASE' not in RecordDict[Record[1]]: EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_1, OtherMsg = "The type of Library Class '%s' defined in Inf file does not match the type of the module" % (Record[1]), BelongsToTable = 'Inf', BelongsToItem = Record[0]) else: EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_1, OtherMsg = "The type of Library Class '%s' defined in Inf file does not match the type of the module" % (Record[1]), BelongsToTable = 'Inf', BelongsToItem = Record[0]) | 0416e3bfab65ccd629d4718a200afa04c0e358c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/914/0416e3bfab65ccd629d4718a200afa04c0e358c8/Check.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27512,
812,
1564,
9313,
1442,
12,
2890,
4672,
309,
512,
952,
5160,
751,
18,
75,
809,
18,
6998,
812,
1564,
9313,
1442,
422,
296,
21,
11,
578,
512,
952,
5160,
751,
18,
75,
809,
18,
699... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27512,
812,
1564,
9313,
1442,
12,
2890,
4672,
309,
512,
952,
5160,
751,
18,
75,
809,
18,
6998,
812,
1564,
9313,
1442,
422,
296,
21,
11,
578,
512,
952,
5160,
751,
18,
75,
809,
18,
699... |
self.assert_(self._box.get_string(key2) == | self.assertEqual(self._box.get_string(key2), | def test_update(self): # Modify multiple messages using update() key0 = self._box.add(self._template % 'original 0') key1 = self._box.add(self._template % 'original 1') key2 = self._box.add(self._template % 'original 2') self._box.update({key0: self._template % 'changed 0', key2: _sample_message}) self.assertEqual(len(self._box), 3) self.assert_(self._box.get_string(key0) == self._template % 'changed 0') self.assert_(self._box.get_string(key1) == self._template % 'original 1') self._check_sample(self._box[key2]) self._box.update([(key2, self._template % 'changed 2'), (key1, self._template % 'changed 1'), (key0, self._template % 'original 0')]) self.assertEqual(len(self._box), 3) self.assert_(self._box.get_string(key0) == self._template % 'original 0') self.assert_(self._box.get_string(key1) == self._template % 'changed 1') self.assert_(self._box.get_string(key2) == self._template % 'changed 2') self.assertRaises(KeyError, lambda: self._box.update({'foo': 'bar', key0: self._template % "changed 0"})) self.assertEqual(len(self._box), 3) self.assert_(self._box.get_string(key0) == self._template % "changed 0") self.assert_(self._box.get_string(key1) == self._template % "changed 1") self.assert_(self._box.get_string(key2) == self._template % "changed 2") | 9d1fae6c21b9661e8074aa8a166635ba69122b4b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/9d1fae6c21b9661e8074aa8a166635ba69122b4b/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2725,
12,
2890,
4672,
468,
9518,
3229,
2743,
1450,
1089,
1435,
498,
20,
273,
365,
6315,
2147,
18,
1289,
12,
2890,
6315,
3202,
738,
296,
8830,
374,
6134,
498,
21,
273,
365,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2725,
12,
2890,
4672,
468,
9518,
3229,
2743,
1450,
1089,
1435,
498,
20,
273,
365,
6315,
2147,
18,
1289,
12,
2890,
6315,
3202,
738,
296,
8830,
374,
6134,
498,
21,
273,
365,
63... |
compare_vars(nc1, nc2, each, tol) | compare_vars(nc1, nc2, each, tol, relative) | def compare(file1, file2, variables, exclude, tol): try: from netCDF4 import Dataset as NC except: from netCDF3 import Dataset as NC from numpy import unique, r_ try: nc1 = NC(file1, 'r') except: usagefailure("ERROR: FILE '%s' CANNOT BE OPENED FOR READING" % file1) try: nc2 = NC(file2, 'r') except: usagefailure("ERROR: FILE '%s' CANNOT BE OPENED FOR READING" % file2) if (exclude == False): if len(variables) == 0: vars1 = nc1.variables.keys() vars2 = nc2.variables.keys() variables = unique(r_[vars1, vars2]) for each in variables: compare_vars(nc1, nc2, each, tol) else: vars1 = nc1.variables.keys() vars2 = nc2.variables.keys() vars = unique(r_[vars1, vars2]) for each in vars: if (each in variables): continue compare_vars(nc1, nc2, each, tol) | 0db7264b3c26891e82aaf3ccb0f207bd329b735e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7383/0db7264b3c26891e82aaf3ccb0f207bd329b735e/nccmp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
768,
21,
16,
585,
22,
16,
3152,
16,
4433,
16,
6085,
4672,
775,
30,
628,
2901,
39,
4577,
24,
1930,
10778,
487,
423,
39,
1335,
30,
628,
2901,
39,
4577,
23,
1930,
10778,
487,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
768,
21,
16,
585,
22,
16,
3152,
16,
4433,
16,
6085,
4672,
775,
30,
628,
2901,
39,
4577,
24,
1930,
10778,
487,
423,
39,
1335,
30,
628,
2901,
39,
4577,
23,
1930,
10778,
487,
... |
res.update({ 'voucher_id':res_id }) new_payment_ids += [(id1, id2, res)] | if res: res.update({ 'voucher_id':res_id }) new_payment_ids += [(id1, id2, res)] | def create(self, cr, uid, vals, context={}): """ Create a new record for a model account_voucher @param cr: A database cursor @param user: ID of the user currently logged in @param vals: provides data for new record @param context: context arguments, like lang, time zone @return: Returns an id of the new record """ | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
5773,
16,
819,
12938,
4672,
3536,
1788,
279,
394,
1409,
364,
279,
938,
2236,
67,
90,
14329,
632,
891,
4422,
30,
432,
2063,
3347,
632,
891,
729,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
5773,
16,
819,
12938,
4672,
3536,
1788,
279,
394,
1409,
364,
279,
938,
2236,
67,
90,
14329,
632,
891,
4422,
30,
432,
2063,
3347,
632,
891,
729,
... |
tabnanny.reset_globals() | def tabnanny(self, filename): import tabnanny import tokenize tabnanny.reset_globals() f = open(filename, 'r') try: tokenize.tokenize(f.readline, tabnanny.tokeneater) except tokenize.TokenError, msg: self.errorbox("Token error", "Token error:\n%s" % str(msg)) return 0 except tabnanny.NannyNag, nag: # The error messages from tabnanny are too confusing... self.editwin.gotoline(nag.get_lineno()) self.errorbox("Tab/space error", indent_message) return 0 return 1 | 2d087b7bd176f9263cdc6efcfd31d7a9eec33306 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2d087b7bd176f9263cdc6efcfd31d7a9eec33306/ScriptBinding.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3246,
82,
1072,
93,
12,
2890,
16,
1544,
4672,
1930,
3246,
82,
1072,
93,
1930,
13672,
284,
273,
1696,
12,
3459,
16,
296,
86,
6134,
775,
30,
13672,
18,
2316,
554,
12,
74,
18,
896,
1369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3246,
82,
1072,
93,
12,
2890,
16,
1544,
4672,
1930,
3246,
82,
1072,
93,
1930,
13672,
284,
273,
1696,
12,
3459,
16,
296,
86,
6134,
775,
30,
13672,
18,
2316,
554,
12,
74,
18,
896,
1369... | |
if "kvm.ko" in files: kvm_module_path = os.path.join(folder, "kvm.ko") kvm_vendor_module_path = os.path.join(folder, "kvm-%s.ko" % vendor) if extra_modules: extra_module_list = [] for module in extra_modules: extra_module_list.append(os.path.join(folder, "%s.ko" % module)) if not kvm_module_path: logging.error("Could not find kvm.ko inside the source dir") abort = True if not kvm_vendor_module_path: logging.error("Could not find kvm-%s.ko inside the source dir") abort = True if abort: | for module in list_modules: if module in files: module_path = os.path.join(folder, module) list_module_paths.append(module_path) list_modules_load = [] for module in list_modules: for module_path in list_module_paths: if os.path.basename(module_path) == module: list_modules_load.append(module_path) if len(list_module_paths) != len(list_modules): | def load_kvm_modules(module_dir=None, load_stock=False, extra_modules=None): """ Unload previously loaded kvm modules, then load modules present on any sub directory of module_dir. Function will walk through module_dir until it finds the modules. @param module_dir: Directory where the KVM modules are located. @param load_stock: Whether we are going to load system kernel modules. @param extra_modules: List of extra modules to load. """ vendor = "intel" if os.system("grep vmx /proc/cpuinfo 1>/dev/null") != 0: vendor = "amd" logging.debug("Detected CPU vendor as '%s'" %(vendor)) kill_qemu_processes() logging.info("Unloading previously loaded KVM modules") kvm_utils.unload_module("kvm") if extra_modules: for module in extra_modules: kvm_utils.unload_module(module) if module_dir: logging.info("Loading the built KVM modules...") kvm_module_path = None kvm_vendor_module_path = None abort = False for folder, subdirs, files in os.walk(module_dir): if "kvm.ko" in files: kvm_module_path = os.path.join(folder, "kvm.ko") kvm_vendor_module_path = os.path.join(folder, "kvm-%s.ko" % vendor) if extra_modules: extra_module_list = [] for module in extra_modules: extra_module_list.append(os.path.join(folder, "%s.ko" % module)) if not kvm_module_path: logging.error("Could not find kvm.ko inside the source dir") abort = True if not kvm_vendor_module_path: logging.error("Could not find kvm-%s.ko inside the source dir") abort = True if abort: logging.error("KVM modules not found. If you don't want to use the " "modules built by this test, make sure the option " "load_modules: 'no' is marked on the test control " "file.") raise error.TestFail("Could not find one KVM test modules on %s " "source dir" % module_dir) try: utils.system('insmod %s' % kvm_module_path) utils.system('insmod %s' % kvm_vendor_module_path) if extra_modules: for module in extra_module_list: utils.system('insmod %s' % module) except Exception, e: raise error.TestFail("Failed to load KVM modules: %s" % e) if load_stock: logging.info("Loading current system KVM modules...") utils.system("modprobe kvm") utils.system("modprobe kvm-%s" % vendor) if extra_modules: for module in extra_modules: utils.system("modprobe %s" % module) | ded2f2870602ded49e8aa3d2370d632cd56ed3ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10349/ded2f2870602ded49e8aa3d2370d632cd56ed3ad/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
79,
3489,
67,
6400,
12,
2978,
67,
1214,
33,
7036,
16,
1262,
67,
15381,
33,
8381,
16,
2870,
67,
6400,
33,
7036,
4672,
3536,
1351,
945,
7243,
4203,
417,
3489,
4381,
16,
1508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
79,
3489,
67,
6400,
12,
2978,
67,
1214,
33,
7036,
16,
1262,
67,
15381,
33,
8381,
16,
2870,
67,
6400,
33,
7036,
4672,
3536,
1351,
945,
7243,
4203,
417,
3489,
4381,
16,
1508,
... |
if not self._datawritten: | if not self._headerwritten: | def _ensure_header_written(self, datasize): if not self._datawritten: if not self._nchannels: raise Error('# channels not specified') if not self._sampwidth: raise Error('sample width not specified') if not self._framerate: raise Error('sampling rate not specified') self._write_header(datasize) | 5cbc8ce2317935f8bd1a8f2d1173018db812d5b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/5cbc8ce2317935f8bd1a8f2d1173018db812d5b3/wave.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
15735,
67,
3374,
67,
9748,
12,
2890,
16,
5386,
554,
4672,
309,
486,
365,
6315,
3374,
9748,
30,
309,
486,
365,
6315,
82,
9114,
30,
1002,
1068,
2668,
7,
5750,
486,
1269,
6134,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
15735,
67,
3374,
67,
9748,
12,
2890,
16,
5386,
554,
4672,
309,
486,
365,
6315,
3374,
9748,
30,
309,
486,
365,
6315,
82,
9114,
30,
1002,
1068,
2668,
7,
5750,
486,
1269,
6134,
309,
... |
('='+fmt, isbigendian and big or lil)]: | ('='+fmt, ISBIGENDIAN and big or lil)]: | def any_err(func, *args): try: apply(func, args) except (struct.error, OverflowError, TypeError): pass else: raise TestFailed, "%s%s did not raise error" % ( func.__name__, args) | 4fb18ac9e6cf7ddf218d3560fd25420c4aa7f1c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fb18ac9e6cf7ddf218d3560fd25420c4aa7f1c2/test_struct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1281,
67,
370,
12,
644,
16,
380,
1968,
4672,
775,
30,
2230,
12,
644,
16,
833,
13,
1335,
261,
1697,
18,
1636,
16,
10752,
2426,
668,
16,
3580,
4672,
1342,
469,
30,
1002,
7766,
2925,
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,
1281,
67,
370,
12,
644,
16,
380,
1968,
4672,
775,
30,
2230,
12,
644,
16,
833,
13,
1335,
261,
1697,
18,
1636,
16,
10752,
2426,
668,
16,
3580,
4672,
1342,
469,
30,
1002,
7766,
2925,
16... |
prefs_key = True): | prefs_key = "GLPane: skip redraws requested only by Qt?" ): | def paintGL(self): #bruce 050127 revised docstring to deprecate direct calls """ [PRIVATE METHOD -- call gl_update instead!] | e54e4a7eeeace3f3c4392c2c270c3d58c5a8bbbf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/e54e4a7eeeace3f3c4392c2c270c3d58c5a8bbbf/GLPane.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12574,
11261,
12,
2890,
4672,
468,
2848,
3965,
374,
9172,
5324,
283,
26779,
14525,
358,
443,
29246,
2657,
4097,
3536,
306,
20055,
10152,
1493,
745,
5118,
67,
2725,
3560,
5,
65,
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,
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,
12574,
11261,
12,
2890,
4672,
468,
2848,
3965,
374,
9172,
5324,
283,
26779,
14525,
358,
443,
29246,
2657,
4097,
3536,
306,
20055,
10152,
1493,
745,
5118,
67,
2725,
3560,
5,
65,
2,
-100,
... |
def get_output(self, seed): | def get_output(self): | def get_output(self, seed): """ Returns the file name of output from the power code. This must be kept synchronized with the name of the output file in power.c. """ if not self.get_start() or not self.get_end(): raise InjError, "Start time or end time has not been set" | 3b83cce4ad09490122150c0eee4de0adaeedb527 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/3b83cce4ad09490122150c0eee4de0adaeedb527/cosmicstring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2844,
12,
2890,
4672,
3536,
2860,
326,
585,
508,
434,
876,
628,
326,
7212,
981,
18,
1220,
1297,
506,
16555,
3852,
598,
326,
508,
434,
326,
876,
585,
316,
7212,
18,
71,
18,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2844,
12,
2890,
4672,
3536,
2860,
326,
585,
508,
434,
876,
628,
326,
7212,
981,
18,
1220,
1297,
506,
16555,
3852,
598,
326,
508,
434,
326,
876,
585,
316,
7212,
18,
71,
18,
3... |
self.manager = FilesystemCodeTreesManager(TempIO()) | super(TestFilesystemCodeTreesManager, self).setUp() self.manager = FilesystemCodeTreesManager(self.tmpdir) | def setUp(self): self.manager = FilesystemCodeTreesManager(TempIO()) | f99fb42c65abdaff863e4cf1a0327a84def26415 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11544/f99fb42c65abdaff863e4cf1a0327a84def26415/test_code_trees_manager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
4181,
273,
11205,
1085,
26590,
1318,
12,
7185,
4294,
10756,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
24292,
12,
2890,
4672,
365,
18,
4181,
273,
11205,
1085,
26590,
1318,
12,
7185,
4294,
10756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
file, pathname, description = imp.find_module(dotted_name, pathlist) if file: file.close() | file, pathname, description = imp.find_module( dotted_name, pathlist) if file: file.close() | def _get_modpkg_path(dotted_name, pathlist=None): """ Get the filesystem path for a module or a package. Return the file system path to a file for a module, and to a directory for a package. Return None if the name is not found, or is a builtin or extension module. """ import imp # split off top-most name parts = dotted_name.split('.', 1) if len(parts) > 1: # we have a dotted path, import top-level package try: file, pathname, description = imp.find_module(parts[0], pathlist) if file: file.close() except ImportError: return None # check if it's indeed a package if description[2] == imp.PKG_DIRECTORY: # recursively handle the remaining name parts pathname = _get_modpkg_path(parts[1], [pathname]) else: pathname = None else: # plain name try: file, pathname, description = imp.find_module(dotted_name, pathlist) if file: file.close() if description[2] not in [imp.PY_SOURCE, imp.PKG_DIRECTORY]: pathname = None except ImportError: pathname = None return pathname | 9aeccb6a889c8d4e7617228595da08f4f31a3666 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9aeccb6a889c8d4e7617228595da08f4f31a3666/pygettext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1711,
10657,
67,
803,
12,
9811,
2344,
67,
529,
16,
589,
1098,
33,
7036,
4672,
3536,
968,
326,
6496,
589,
364,
279,
1605,
578,
279,
2181,
18,
225,
2000,
326,
585,
2619,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1711,
10657,
67,
803,
12,
9811,
2344,
67,
529,
16,
589,
1098,
33,
7036,
4672,
3536,
968,
326,
6496,
589,
364,
279,
1605,
578,
279,
2181,
18,
225,
2000,
326,
585,
2619,
... |
if not self.haveradii: | disp = self.get_dispdef() if self.haveradii != (disp,): | def get_sel_radii_squared(self): if not self.haveradii: try: res = self.compute_sel_radii_squared() except: print_compact_traceback("bug in %r.compute_sel_radii_squared(), using []: " % self) res = [] #e len(self.atoms) copies of something would be better self.sel_radii_squared_private = res self.haveradii = 1 return self.sel_radii_squared_private | 0f365bb98009dd2955b7779823e30679e1649f48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/0f365bb98009dd2955b7779823e30679e1649f48/chunk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1786,
67,
6012,
2835,
67,
87,
11903,
12,
2890,
4672,
377,
16232,
273,
365,
18,
588,
67,
25453,
536,
1435,
309,
365,
18,
3395,
502,
361,
2835,
480,
261,
25453,
16,
4672,
282,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1786,
67,
6012,
2835,
67,
87,
11903,
12,
2890,
4672,
377,
16232,
273,
365,
18,
588,
67,
25453,
536,
1435,
309,
365,
18,
3395,
502,
361,
2835,
480,
261,
25453,
16,
4672,
282,
... |
el = etree.SubElement(self.current_element, 'text:list', attrib={ | el = SubElement(self.current_element, 'text:list', attrib={ | def visit_bullet_list(self, node): #import pdb; pdb.set_trace() #ipshell('At visit_bullet_list') #print '(visit_bullet_list) node: %s' % node.astext() el = etree.SubElement(self.current_element, 'text:list', attrib={ 'text:style-name': 'rststyle-bulletlist', }) self.set_current_element(el) self.paragraph_style_stack.append('rststyle-bulletitem') | 277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
70,
19994,
67,
1098,
12,
2890,
16,
756,
4672,
468,
5666,
10892,
31,
10892,
18,
542,
67,
5129,
1435,
468,
625,
10304,
2668,
861,
3757,
67,
70,
19994,
67,
1098,
6134,
468,
1188... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
70,
19994,
67,
1098,
12,
2890,
16,
756,
4672,
468,
5666,
10892,
31,
10892,
18,
542,
67,
5129,
1435,
468,
625,
10304,
2668,
861,
3757,
67,
70,
19994,
67,
1098,
6134,
468,
1188... |
if mm_cfg.POSTFIX_STYLE_VIRTUAL_DOMAINS: dbfile, textfile = virtual_files(mlist.host_name) do_create(mlist, dbfile, textfile, addvirtual) | if mlist.host_name in mm_cfg.POSTFIX_STYLE_VIRTUAL_DOMAINS: do_create(mlist, VDBFILE, VTEXTFILE, addvirtual) | def create(mlist, cgi=0, nolock=0): # Acquire the global list database lock lock = None if not nolock: lock = makelock() lock.lock() # Do the aliases file, which need to be done in any case try: do_create(mlist, DBFILE, TEXTFILE, addlist) if mm_cfg.POSTFIX_STYLE_VIRTUAL_DOMAINS: dbfile, textfile = virtual_files(mlist.host_name) do_create(mlist, dbfile, textfile, addvirtual) finally: if lock: lock.unlock(unconditionally=1) | fdea0f4d4aafc034bf532b1250b6ea19c3d2c875 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/fdea0f4d4aafc034bf532b1250b6ea19c3d2c875/Postfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
781,
376,
16,
276,
10052,
33,
20,
16,
31035,
975,
33,
20,
4672,
468,
28822,
326,
2552,
666,
2063,
2176,
2176,
273,
599,
309,
486,
31035,
975,
30,
2176,
273,
29796,
292,
975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
781,
376,
16,
276,
10052,
33,
20,
16,
31035,
975,
33,
20,
4672,
468,
28822,
326,
2552,
666,
2063,
2176,
2176,
273,
599,
309,
486,
31035,
975,
30,
2176,
273,
29796,
292,
975,
... |
related = getattr(obj, relationship, None) | try: related = getattr(obj, relationship, None) except obj._meta.get_field_by_name(relationship)[0].model.DoesNotExist: continue | def _follow_relationships(obj): # Prevent recursion. if obj in result_set: return result_set.add(obj) # Follow relations. registration_info = self.get_registration_info(obj.__class__) for relationship in registration_info.follow: # Clear foreign key cache. try: related_field = obj._meta.get_field(relationship) except models.FieldDoesNotExist: pass else: if isinstance(related_field, models.ForeignKey): if hasattr(obj, related_field.get_cache_name()): delattr(obj, related_field.get_cache_name()) # Get the references obj(s). related = getattr(obj, relationship, None) if isinstance(related, models.Model): _follow_relationships(related) elif isinstance(related, (models.Manager, QuerySet)): for related_obj in related.all(): _follow_relationships(related_obj) elif related is not None: raise TypeError, "Cannot follow the relationship %r. Expected a model or QuerySet, found %r." % (relationship, related) # If a proxy model's parent is registered, add it. if obj._meta.proxy: parent_cls = obj._meta.parents.keys()[0] if self.is_registered(parent_cls): parent_obj = parent_cls.objects.get(pk=obj.pk) _follow_relationships(parent_obj) | 159952c0c6dc5192a293b0a611fa4df427ff06ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/159952c0c6dc5192a293b0a611fa4df427ff06ba/revisions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14641,
67,
21632,
12,
2603,
4672,
468,
19412,
13917,
18,
309,
1081,
316,
563,
67,
542,
30,
327,
563,
67,
542,
18,
1289,
12,
2603,
13,
468,
16093,
7467,
18,
7914,
67,
1376,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14641,
67,
21632,
12,
2603,
4672,
468,
19412,
13917,
18,
309,
1081,
316,
563,
67,
542,
30,
327,
563,
67,
542,
18,
1289,
12,
2603,
13,
468,
16093,
7467,
18,
7914,
67,
1376,
273,
... |
>>> interfaces | >>> list(interfaces) | def provideInterface(id, interface, iface_type=None): """register Interface with utility service >>> from zope.app.tests.placelesssetup import setUp, tearDown >>> setUp() >>> utilities = zapi.getService(None, zapi.servicenames.Utilities) >>> from zope.interface import Interface >>> from zope.interface.interfaces import IInterface >>> from zope.app.content.interfaces import IContentType >>> class I(Interface): ... pass >>> IInterface.providedBy(I) True >>> IContentType.providedBy(I) False >>> interfaces = utilities.getUtilitiesFor(IContentType) >>> interfaces [] >>> provideInterface('', I, IContentType) >>> IContentType.providedBy(I) True >>> interfaces = utilities.getUtilitiesFor(IContentType) >>> [name for (name, iface) in interfaces] ['zope.app.component.interface.I'] >>> [iface.__name__ for (name, iface) in interfaces] ['I'] >>> class I1(Interface): ... pass >>> provideInterface('', I1) >>> IInterface.providedBy(I1) True >>> IContentType.providedBy(I1) False >>> interfaces1 = utilities.getUtilitiesFor(IContentType) >>> [name for (name, iface) in interfaces] ['zope.app.component.interface.I'] >>> [iface.__name__ for (name, iface) in interfaces] ['I'] >>> tearDown() """ if not id: id = "%s.%s" % (interface.__module__, interface.__name__) if not IInterface.providedBy(interface): if not isinstance(interface, (type, ClassType)): raise TypeError(id, "is not an interface or class") return if iface_type is not None: if not iface_type.extends(IInterface): raise TypeError(iface_type, "is not an interface type") directlyProvides(interface, iface_type) else: iface_type = IInterface utilityService = zapi.getService(None, zapi.servicenames.Utilities) utilityService.provideUtility(iface_type, interface, name=id) | ab7b724336ad45169dfaa66cb33bd11ac217f761 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9537/ab7b724336ad45169dfaa66cb33bd11ac217f761/interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5615,
1358,
12,
350,
16,
1560,
16,
9751,
67,
723,
33,
7036,
4672,
3536,
4861,
6682,
598,
12788,
1156,
225,
4080,
628,
998,
1306,
18,
2910,
18,
16341,
18,
30538,
12617,
8401,
1930,
24292,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5615,
1358,
12,
350,
16,
1560,
16,
9751,
67,
723,
33,
7036,
4672,
3536,
4861,
6682,
598,
12788,
1156,
225,
4080,
628,
998,
1306,
18,
2910,
18,
16341,
18,
30538,
12617,
8401,
1930,
24292,... |
def get_handler(self, segment, resource): | def _get_handler(self, segment, resource): | def get_handler(self, segment, resource): return ListOfUsers(resource) | d77b89c2e4553add88c91818fe52c77d8221ca13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/d77b89c2e4553add88c91818fe52c77d8221ca13/Group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
4176,
12,
2890,
16,
3267,
16,
1058,
4672,
327,
987,
951,
6588,
12,
3146,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
4176,
12,
2890,
16,
3267,
16,
1058,
4672,
327,
987,
951,
6588,
12,
3146,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return gst.Event(gst.EVENT_EOS) | return gst.event_new_eos() | def eos(): """Create and return an end of stream (EOS) event.""" return gst.Event(gst.EVENT_EOS) | 473dc8e598b7381c585def115d0d76dc79e52f54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/473dc8e598b7381c585def115d0d76dc79e52f54/events.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
425,
538,
13332,
3536,
1684,
471,
327,
392,
679,
434,
1407,
261,
41,
4618,
13,
871,
12123,
327,
314,
334,
18,
2575,
67,
2704,
67,
73,
538,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
425,
538,
13332,
3536,
1684,
471,
327,
392,
679,
434,
1407,
261,
41,
4618,
13,
871,
12123,
327,
314,
334,
18,
2575,
67,
2704,
67,
73,
538,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
... |
return '\x03%s\x16\x16' % ','.join(codes) | out = '\x03%s' % ','.join(codes) if nextChar is None: out += '\x16\x16' else: nc = ord(nextChar) if ((nc >= 48 and nc <= 57) or nc == 44): out += '\x16\x16' return out | def getColor(self, fg=None, bg=None, type=None): if type is None: type = self.type if fg is None and bg is None: return self.reset() if fg is not None: fg = self.colorMap[self._normalizeColorName(fg)][type] if bg is not None: bg = self.colorMap[self._normalizeColorName(bg)][type] | 1bc661d0d1bd4f217ec53f1e43c253602a2f6d26 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10942/1bc661d0d1bd4f217ec53f1e43c253602a2f6d26/colorlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15672,
12,
2890,
16,
10186,
33,
7036,
16,
7611,
33,
7036,
16,
618,
33,
7036,
4672,
309,
618,
353,
599,
30,
618,
273,
365,
18,
723,
309,
10186,
353,
599,
471,
7611,
353,
599,
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,
15672,
12,
2890,
16,
10186,
33,
7036,
16,
7611,
33,
7036,
16,
618,
33,
7036,
4672,
309,
618,
353,
599,
30,
618,
273,
365,
18,
723,
309,
10186,
353,
599,
471,
7611,
353,
599,
30,
327,... |
this = apply(_quickfix.new_TradeReportRejectReason, args) | this = _quickfix.new_TradeReportRejectReason(*args) | def __init__(self, *args): this = apply(_quickfix.new_TradeReportRejectReason, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
22583,
4820,
21705,
8385,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
22583,
4820,
21705,
8385,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335... |
regexp=None, nocase=None, count=None): | regexp=None, nocase=None, count=None, elide=None): | def search(self, pattern, index, stopindex=None, forwards=None, backwards=None, exact=None, regexp=None, nocase=None, count=None): """Search PATTERN beginning from INDEX until STOPINDEX. Return the index of the first character of a match or an empty string.""" args = [self._w, 'search'] if forwards: args.append('-forwards') if backwards: args.append('-backwards') if exact: args.append('-exact') if regexp: args.append('-regexp') if nocase: args.append('-nocase') if count: args.append('-count'); args.append(count) if pattern[0] == '-': args.append('--') args.append(pattern) args.append(index) if stopindex: args.append(stopindex) return self.tk.call(tuple(args)) | f2f3cd8b7effa6d4a9a75890d721c02adf808fe0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f2f3cd8b7effa6d4a9a75890d721c02adf808fe0/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
1936,
16,
770,
16,
2132,
1615,
33,
7036,
16,
24578,
33,
7036,
16,
12727,
33,
7036,
16,
5565,
33,
7036,
16,
7195,
33,
7036,
16,
30601,
448,
33,
7036,
16,
1056,
33,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
1936,
16,
770,
16,
2132,
1615,
33,
7036,
16,
24578,
33,
7036,
16,
12727,
33,
7036,
16,
5565,
33,
7036,
16,
7195,
33,
7036,
16,
30601,
448,
33,
7036,
16,
1056,
33,... |
self.ddbb.update("records",cells,values," id_record=%d" %id_record) | self.ddbb.update("records",cells,values," id_record=%d" %int(id_record)) | def updateRecord(self, list_options, id_record): logging.debug('>>') gpxfile = self.conf.getValue("gpxdir")+"/%d.gpx"%int(id_record) if os.path.isfile(list_options["rcd_gpxfile"]): if gpxfile != list_options["rcd_gpxfile"]: gpxOrig = self.conf.tmpdir+"/newgpx.gpx" shutil.copy2(gpxOrig, gpxfile) else: if (list_options["rcd_gpxfile"]==""): logging.debug('removing gpxfile') # ein? logging.debug('updating bbdd') #ein? cells,values = self._formatRecord(list_options) self.ddbb.update("records",cells,values," id_record=%d" %id_record) self.parent.refreshListView() logging.debug('<<') | e3c7c0a1640912e86f8b02252d05179ba249504a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11865/e3c7c0a1640912e86f8b02252d05179ba249504a/record.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
2115,
12,
2890,
16,
666,
67,
2116,
16,
612,
67,
3366,
4672,
2907,
18,
4148,
2668,
34,
1870,
13,
4178,
92,
768,
273,
365,
18,
3923,
18,
24805,
2932,
75,
4430,
1214,
7923,
9078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2115,
12,
2890,
16,
666,
67,
2116,
16,
612,
67,
3366,
4672,
2907,
18,
4148,
2668,
34,
1870,
13,
4178,
92,
768,
273,
365,
18,
3923,
18,
24805,
2932,
75,
4430,
1214,
7923,
9078,
... |
print "coloring path" | def run (self): """Execute a heuristic search of a graph. Returns: A list of nodes that is the path from the source to the goal or ``None`` if there is no path. """ if self.path: return self.path | bfb9de4fcf1a57a89f60298f41ded554fee9567c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/bfb9de4fcf1a57a89f60298f41ded554fee9567c/Algorithms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
3536,
5289,
279,
25833,
1623,
434,
279,
2667,
18,
225,
2860,
30,
432,
666,
434,
2199,
716,
353,
326,
589,
628,
326,
1084,
358,
326,
17683,
578,
12176,
7036,
10335,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
261,
2890,
4672,
3536,
5289,
279,
25833,
1623,
434,
279,
2667,
18,
225,
2860,
30,
432,
666,
434,
2199,
716,
353,
326,
589,
628,
326,
1084,
358,
326,
17683,
578,
12176,
7036,
10335,... | |
f = f.split("/") | def cString(name, s, prefix=""): import string retval = "char " + name + "[] = \"\\\n" + prefix # replace double-quote with escaped-double-quote s = string.replace(s, "\"", "\\\"") # replace line terminations with end-of-last-line plus start-of-next-line s = string.replace(s, "\n", ("\\n\\\n") + prefix) return retval + s + "\\n\";\n" | b08a25fe2c7a2aaad03ab97a16232ac58d5c52e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/b08a25fe2c7a2aaad03ab97a16232ac58d5c52e2/makehelp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
780,
12,
529,
16,
272,
16,
1633,
1546,
6,
4672,
1930,
533,
5221,
273,
315,
3001,
315,
397,
508,
397,
5158,
65,
273,
1239,
19662,
82,
6,
397,
1633,
468,
1453,
1645,
17,
6889,
598... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
780,
12,
529,
16,
272,
16,
1633,
1546,
6,
4672,
1930,
533,
5221,
273,
315,
3001,
315,
397,
508,
397,
5158,
65,
273,
1239,
19662,
82,
6,
397,
1633,
468,
1453,
1645,
17,
6889,
598... | |
self.assertEqual(check_line('f(a=1)', REPORTER), None) | self.assertEqual(check_line('f(a=1)'), None) | def test_known_values_opspace_4(self): self.assertEqual(check_line('f(a=1)', REPORTER), None) | 455beb61539a40eb35dfd637d0cd015a7cbec7a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/928/455beb61539a40eb35dfd637d0cd015a7cbec7a0/test_format.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2994,
67,
2372,
67,
556,
2981,
67,
24,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
1893,
67,
1369,
2668,
74,
12,
69,
33,
21,
13,
2187,
2438,
52,
916,
2560,
3631,
599,
13,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2994,
67,
2372,
67,
556,
2981,
67,
24,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
1893,
67,
1369,
2668,
74,
12,
69,
33,
21,
13,
2187,
2438,
52,
916,
2560,
3631,
599,
13,
2... |
fd = os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT|os.O_APPEND, 0600) | fd = os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT|os.O_APPEND, 0666) | def daemonize(self): # Detach from TTY. | b893e1f24027907ff1575c8d700d75dc2325e9ca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/b893e1f24027907ff1575c8d700d75dc2325e9ca/SrvDaemon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8131,
554,
12,
2890,
4672,
468,
17867,
628,
399,
5538,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8131,
554,
12,
2890,
4672,
468,
17867,
628,
399,
5538,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
logger.error("Packages: File read failed; falling back to file download") | logger.error("Packages: File read failed; " "falling back to file download") | def setup_data(self, force_update=False): should_read = True should_download = False if os.path.exists(self.cachefile): try: self.load_state() should_read = False except: logger.error("Cachefile %s load failed; falling back to file read"\ % (self.cachefile)) if should_read: try: self.read_files() except: logger.error("Packages: File read failed; falling back to file download") should_download = True | b33ebf356cd51456c7a09f341924af5fe10f88b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/b33ebf356cd51456c7a09f341924af5fe10f88b9/Packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
892,
12,
2890,
16,
2944,
67,
2725,
33,
8381,
4672,
1410,
67,
896,
273,
1053,
1410,
67,
7813,
273,
1083,
309,
1140,
18,
803,
18,
1808,
12,
2890,
18,
2493,
768,
4672,
775,
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,
3875,
67,
892,
12,
2890,
16,
2944,
67,
2725,
33,
8381,
4672,
1410,
67,
896,
273,
1053,
1410,
67,
7813,
273,
1083,
309,
1140,
18,
803,
18,
1808,
12,
2890,
18,
2493,
768,
4672,
775,
30... |
" qsObjectHelper helper(ToSupports(result));\n" " helper.SetNode(result);\n" " helper.SetCanonical(ToCanonicalSupports(result));\n" | def writeResultConv(f, type, jsvalPtr, jsvalRef): """ Emit code to convert the C++ variable `result` to a jsval. The emitted code contains a return statement; it returns JS_TRUE on success, JS_FALSE on error. """ # From NativeData2JS. typeName = getBuiltinOrNativeTypeName(type) if typeName is not None: template = resultConvTemplates.get(typeName) if template is not None: values = {'jsvalRef': jsvalRef, 'jsvalPtr': jsvalPtr} f.write(substitute(template, values)) return # else fall through; this type isn't supported yet elif isInterfaceType(type): if isVariantType(type): f.write(" return xpc_qsVariantToJsval(lccx, result, %s);\n" % jsvalPtr) return else: f.write(" nsWrapperCache* cache = xpc_qsGetWrapperCache(result);\n" " if (cache) {\n" " JSObject* wrapper = cache->GetWrapper();\n" " if (wrapper &&\n" # FIXME: Bug 585786, this check should go away " IS_SLIM_WRAPPER_OBJECT(wrapper) &&\n" # FIXME: Bug 585787 this should compare compartments " xpc_GetGlobalForObject(wrapper) ==\n" " xpc_GetGlobalForObject(obj)) {\n" " *%s = OBJECT_TO_JSVAL(wrapper);\n" " return JS_TRUE;\n" " }\n" " }\n" " qsObjectHelper helper(ToSupports(result));\n" " helper.SetNode(result);\n" " helper.SetCanonical(ToCanonicalSupports(result));\n" " // After this point do not use 'result'!\n" " return xpc_qsXPCOMObjectToJsval(lccx, " "&helper, cache, &NS_GET_IID(%s), &interfaces[k_%s], %s);\n" % (jsvalPtr, type.name, type.name, jsvalPtr)) return warn("Unable to convert result of type %s" % type.name) f.write(" !; // TODO - Convert `result` to jsval, store in `%s`.\n" % jsvalRef) f.write(" return xpc_qsThrow(cx, NS_ERROR_UNEXPECTED); // FIXME\n") | 67fa03ac6362ae144632cf4f3c31e29bd19a7055 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/67fa03ac6362ae144632cf4f3c31e29bd19a7055/qsgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
1253,
17467,
12,
74,
16,
618,
16,
3828,
1125,
5263,
16,
3828,
1125,
1957,
4672,
3536,
16008,
981,
358,
1765,
326,
385,
9904,
2190,
1375,
2088,
68,
358,
279,
3828,
1125,
18,
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,
1045,
1253,
17467,
12,
74,
16,
618,
16,
3828,
1125,
5263,
16,
3828,
1125,
1957,
4672,
3536,
16008,
981,
358,
1765,
326,
385,
9904,
2190,
1375,
2088,
68,
358,
279,
3828,
1125,
18,
225,
... | |
(('database_version', str(db_version)),)), | (('database_version', str(db_version)), ('youngest_rev', ''))), | def get_data(db): return (('component', ('name', 'owner'), (('component1', 'somebody'), ('component2', 'somebody'))), ('milestone', ('name', 'due', 'completed'), (('milestone1', 0, 0), ('milestone2', 0, 0), ('milestone3', 0, 0), ('milestone4', 0, 0))), ('version', ('name', 'time'), (('1.0', 0), ('2.0', 0))), ('enum', ('type', 'name', 'value'), (('status', 'new', 1), ('status', 'assigned', 2), ('status', 'reopened', 3), ('status', 'closed', 4), ('resolution', 'fixed', 1), ('resolution', 'invalid', 2), ('resolution', 'wontfix', 3), ('resolution', 'duplicate', 4), ('resolution', 'worksforme', 5), ('priority', 'blocker', 1), ('priority', 'critical', 2), ('priority', 'major', 3), ('priority', 'minor', 4), ('priority', 'trivial', 5), ('ticket_type', 'defect', 1), ('ticket_type', 'enhancement', 2), ('ticket_type', 'task', 3))), ('permission', ('username', 'action'), (('anonymous', 'LOG_VIEW'), ('anonymous', 'FILE_VIEW'), ('anonymous', 'WIKI_VIEW'), ('anonymous', 'WIKI_CREATE'), ('anonymous', 'WIKI_MODIFY'), ('anonymous', 'SEARCH_VIEW'), ('anonymous', 'REPORT_VIEW'), ('anonymous', 'REPORT_SQL_VIEW'), ('anonymous', 'TICKET_VIEW'), ('anonymous', 'TICKET_CREATE'), ('anonymous', 'TICKET_MODIFY'), ('anonymous', 'BROWSER_VIEW'), ('anonymous', 'TIMELINE_VIEW'), ('anonymous', 'CHANGESET_VIEW'), ('anonymous', 'ROADMAP_VIEW'), ('anonymous', 'MILESTONE_VIEW'))), ('system', ('name', 'value'), (('database_version', str(db_version)),)), ('report', ('author', 'title', 'query', 'description'), __mkreports(get_reports(db)))) | 679b477b1d7aa0244f2bafde9bf9fcb622e7fe24 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/679b477b1d7aa0244f2bafde9bf9fcb622e7fe24/db_default.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
892,
12,
1966,
4672,
327,
261,
2668,
4652,
2187,
7707,
529,
2187,
296,
8443,
19899,
261,
2668,
4652,
21,
2187,
296,
19068,
3432,
19899,
7707,
4652,
22,
2187,
296,
19068,
3432,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
892,
12,
1966,
4672,
327,
261,
2668,
4652,
2187,
7707,
529,
2187,
296,
8443,
19899,
261,
2668,
4652,
21,
2187,
296,
19068,
3432,
19899,
7707,
4652,
22,
2187,
296,
19068,
3432,
2... |
self.userRenamed(bot, self.nickname, nick) | self.userRenamed(bot, bot.nickname, nick) | def nickChanged(self, bot, nick): self.userRenamed(bot, self.nickname, nick) | 128e004f99f80d097e242d1259b76324da41a7fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6476/128e004f99f80d097e242d1259b76324da41a7fe/chanlog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10909,
5033,
12,
2890,
16,
2512,
16,
10909,
4672,
365,
18,
1355,
16290,
2808,
12,
4819,
16,
2512,
18,
17091,
529,
16,
10909,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10909,
5033,
12,
2890,
16,
2512,
16,
10909,
4672,
365,
18,
1355,
16290,
2808,
12,
4819,
16,
2512,
18,
17091,
529,
16,
10909,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._interface_worker_lock.acquire() | def _wait_for_worker(self): self._interface_worker_lock.acquire() try: if self._interface.try_avail_check_again(): return except: pass self._interface_worker_lock.wait(timeout=1.0) self._interface_worker_lock.release() | f8ed0986dacd40269e6ae289574a9505cbaa9a2c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8868/f8ed0986dacd40269e6ae289574a9505cbaa9a2c/pymw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7048,
67,
1884,
67,
10124,
12,
2890,
4672,
775,
30,
309,
365,
6315,
5831,
18,
698,
67,
842,
671,
67,
1893,
67,
23095,
13332,
327,
1335,
30,
1342,
365,
6315,
5831,
67,
10124,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7048,
67,
1884,
67,
10124,
12,
2890,
4672,
775,
30,
309,
365,
6315,
5831,
18,
698,
67,
842,
671,
67,
1893,
67,
23095,
13332,
327,
1335,
30,
1342,
365,
6315,
5831,
67,
10124,
67,
... | |
'Detailed Documentation\n' '**********************\n' + '\n' + read('collective', 'localrolespanel', 'README.txt') | def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() | 97e25a311497b5d8e9bc332c4d804af8ec5e07fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11462/97e25a311497b5d8e9bc332c4d804af8ec5e07fd/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
30857,
86,
1973,
4672,
327,
1696,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3631,
380,
86,
1973,
13,
2934,
896,
1435,
225,
2,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
30857,
86,
1973,
4672,
327,
1696,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3631,
380,
86,
1973,
13,
2934,
896,
1435,
225,
2,
-100,
-100,
-100,... | |
elif Rtype[0] == 'D' and r == 2 and Stype.is_reducible() and \ | elif Rtype[0] == 'D' and r == 2 and Stype.is_compound() and \ | def rule(x): [x1, x2, x3, x4] = x; return [(x1+x2-x3-x4)/2, (x1-x2+x3-x4)/2, (x1-x2-x3+x4)/2] | 4f1d9b099eb7fa4771eb32c91fd6665497057884 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/4f1d9b099eb7fa4771eb32c91fd6665497057884/weyl_characters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1720,
12,
92,
4672,
306,
92,
21,
16,
619,
22,
16,
619,
23,
16,
619,
24,
65,
273,
619,
31,
327,
306,
12,
92,
21,
15,
92,
22,
17,
92,
23,
17,
92,
24,
13176,
22,
16,
261,
92,
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,
1720,
12,
92,
4672,
306,
92,
21,
16,
619,
22,
16,
619,
23,
16,
619,
24,
65,
273,
619,
31,
327,
306,
12,
92,
21,
15,
92,
22,
17,
92,
23,
17,
92,
24,
13176,
22,
16,
261,
92,
21... |
{'error': "Invalid username or password" if request.GET["error"] == '1' and not request.user.is_authenticated() else "",\ | {'error': "Invalid username or password" if "error" in request.GET and request.GET["error"] == '1' and not request.user.is_authenticated() else "",\ | def login_page(request): from django.shortcuts import render_to_response return render_to_response('login.html', \ {'error': "Invalid username or password" if request.GET["error"] == '1' and not request.user.is_authenticated() else "",\ 'static_files': "http://%s/srp-test/javascript" % request.get_host(), \ 'srp_url': "http://%s/srp/" % request.get_host()}) | 26a1ef6cd2a8b27d1fa289f70b14255c2cfe8c3f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4751/26a1ef6cd2a8b27d1fa289f70b14255c2cfe8c3f/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
67,
2433,
12,
2293,
4672,
628,
13710,
18,
24744,
87,
1930,
1743,
67,
869,
67,
2740,
327,
1743,
67,
869,
67,
2740,
2668,
5819,
18,
2620,
2187,
521,
13666,
1636,
4278,
315,
1941,
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,
3925,
67,
2433,
12,
2293,
4672,
628,
13710,
18,
24744,
87,
1930,
1743,
67,
869,
67,
2740,
327,
1743,
67,
869,
67,
2740,
2668,
5819,
18,
2620,
2187,
521,
13666,
1636,
4278,
315,
1941,
2... |
nm = '_%s__FacetMap' % (cls.__name__.strip('_'),) | nm = '_%s__FacetMap' % (nm,) | def __FacetMapAttributeName (cls): """ """ ''' if cls == simpleTypeDefinition: return '_%s__FacetMap' % (cls.__name__.strip('_'),) | 46686651a36a3cf47d12e8547434ef4a54da5152 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7171/46686651a36a3cf47d12e8547434ef4a54da5152/basis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11137,
863,
19240,
261,
6429,
4672,
3536,
3536,
9163,
309,
2028,
422,
4143,
559,
1852,
30,
327,
2070,
9,
87,
972,
11137,
863,
11,
738,
261,
6429,
16186,
529,
25648,
6406,
2668,
462... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11137,
863,
19240,
261,
6429,
4672,
3536,
3536,
9163,
309,
2028,
422,
4143,
559,
1852,
30,
327,
2070,
9,
87,
972,
11137,
863,
11,
738,
261,
6429,
16186,
529,
25648,
6406,
2668,
462... |
'id', 'interface', 'version', 'released'] | 'id', 'interface', 'version', 'released', 'bindings'] | def __init__(self): self.steps = [] | 85a1246f0c25607895cb5d4303ebbb110ffccfc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10543/85a1246f0c25607895cb5d4303ebbb110ffccfc9/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
8986,
273,
5378,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
8986,
273,
5378,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
representation = factory(self, self.getParent(), *args) | representation = factory(self, self.getParent(), **kwargs) | def getRepresentation(self, name, *args): if args: key = (name) + args else: key = name if key not in self._representations: factory = _representationFactories[name] representation = factory(self, self.getParent(), *args) self._representations[key] = representation return self._representations[key] | c438890c58a2ca94e792551778e6464c560e65ef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8851/c438890c58a2ca94e792551778e6464c560e65ef/glyph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
10364,
12,
2890,
16,
508,
16,
380,
1968,
4672,
309,
833,
30,
498,
273,
261,
529,
13,
397,
833,
469,
30,
498,
273,
508,
309,
498,
486,
316,
365,
6315,
28205,
1012,
30,
3272,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
10364,
12,
2890,
16,
508,
16,
380,
1968,
4672,
309,
833,
30,
498,
273,
261,
529,
13,
397,
833,
469,
30,
498,
273,
508,
309,
498,
486,
316,
365,
6315,
28205,
1012,
30,
3272,
273... |
while True: try: | try: while True: | def _loadInfo(self, limit = 1): params = { 'action': 'query', 'prop': 'imageinfo', 'titles': self.title(), 'iiprop': ['timestamp', 'user', 'comment', 'url', 'size', 'dimensions', 'sha1', 'mime', 'metadata', 'archivename', 'bitdepth'], 'iilimit': limit, } try: data = query.GetData(params, self.site()) except NotImplementedError: output("API not work, loading page HTML.") self.getImagePageHtml() return if 'error' in data: raise RuntimeError("%s" %data['error']) count = 0 if data['query']['pages'].values()[0]["imagerepository"] == "shared": self._local = False else: self._local = True infos = [] while True: try: for info in data['query']['pages'].values()[0]['imageinfo']: count += 1 if count == 1 and 'iistart' not in params: # count 1 and no iicontinue mean first image revision is latest. self._latestInfo = info infos.append(info) if limit == 1: break if 'query-continue' in data and limit != 1: params['iistart'] = data['query-continue']['imageinfo']['iistart'] else: break except KeyError: output("Not image in imagepage") self._infoLoaded = True if limit > 1: return infos | 77c53d1abfbb8a55c8ce1e7cf415a1b42712d878 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/77c53d1abfbb8a55c8ce1e7cf415a1b42712d878/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
966,
12,
2890,
16,
1800,
273,
404,
4672,
859,
273,
288,
296,
1128,
4278,
296,
2271,
2187,
296,
5986,
4278,
296,
2730,
1376,
2187,
296,
17643,
4278,
365,
18,
2649,
9334,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
966,
12,
2890,
16,
1800,
273,
404,
4672,
859,
273,
288,
296,
1128,
4278,
296,
2271,
2187,
296,
5986,
4278,
296,
2730,
1376,
2187,
296,
17643,
4278,
365,
18,
2649,
9334,
296,
... |
""" | """ | def execute(self, inputs, update = 0, last = 0): """ Created: 15.04.2006, KP Description: Execute the filter with given inputs and return the output """ if not ProcessingFilter.ProcessingFilter.execute(self, inputs): return None image = self.getInput(1) image = self.convertVTKtoITK(image) if not self.itkfilter: try: ul3 = itk.Image.UL3 self.itkfilter = itk.MorphologicalWatershedImageFilter[image, ul3].New() except: Logging.info("Failed to get MorphologicalWatershedImageFilter, trying watershed module") traceback.print_exc() import watershed self.itkfilter = watershed.MorphologicalWatershedImageFilter[image, ul3].New() markWatershedLine = self.parameters["MarkWatershedLine"] self.itkfilter.SetMarkWatershedLine(markWatershedLine) | 6d7b572696d4ecdce2049b45a6e109836f3272c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/6d7b572696d4ecdce2049b45a6e109836f3272c9/SegmentationFilters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
4540,
16,
1089,
273,
374,
16,
1142,
273,
374,
4672,
3536,
12953,
30,
4711,
18,
3028,
18,
6976,
26,
16,
1475,
52,
6507,
30,
7903,
326,
1034,
598,
864,
4540,
471,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
4540,
16,
1089,
273,
374,
16,
1142,
273,
374,
4672,
3536,
12953,
30,
4711,
18,
3028,
18,
6976,
26,
16,
1475,
52,
6507,
30,
7903,
326,
1034,
598,
864,
4540,
471,
3... |
if submodel: modelGetter = DefaultWidget(self.model) modelGetter.setSubmodel(submodel) model = modelGetter.getData() else: model = None controller = self.getNodeController(request, node, model) result = self.getNodeView(request, node, model) | controller = self.getNodeController(request, node, submodel) result = self.getNodeView(request, node, submodel) | def handleNode(self, request, node): if not hasattr(node, 'getAttribute'): # text node? return node id = node.getAttribute('model') submodel_prefix = node.getAttribute("_submodel_prefix") if submodel_prefix and id: submodel = "/".join([submodel_prefix, id]) elif id: submodel = id elif submodel_prefix: submodel = submodel_prefix else: submodel = "" if submodel: modelGetter = DefaultWidget(self.model) modelGetter.setSubmodel(submodel) model = modelGetter.getData() else: model = None controller = self.getNodeController(request, node, model) result = self.getNodeView(request, node, model) controller.setView(result) if not getattr(controller, 'submodel', None): controller.setSubmodel(submodel) # xxx refactor this into a widget interface and check to see if the object implements IWidget # the view may be a deferred; this is why this check is required if hasattr(result, 'setController'): result.setController(controller) result.setNode(node) if not getattr(result, 'submodel', None): result.setSubmodel(submodel) success, data = controller.handle(request) if success is not None: self.handlerResults[success].append((controller, data, node)) returnNode = self.dispatchResult(request, node, result) if not isinstance(returnNode, defer.Deferred): self.recurseChildren(request, returnNode) | 3e9326c02c350f24d9edb01a21197fc0767d9e49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3e9326c02c350f24d9edb01a21197fc0767d9e49/view.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
907,
12,
2890,
16,
590,
16,
756,
4672,
309,
486,
3859,
12,
2159,
16,
296,
588,
1499,
11,
4672,
468,
977,
756,
35,
327,
756,
225,
612,
273,
756,
18,
588,
1499,
2668,
2284,
6134,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
907,
12,
2890,
16,
590,
16,
756,
4672,
309,
486,
3859,
12,
2159,
16,
296,
588,
1499,
11,
4672,
468,
977,
756,
35,
327,
756,
225,
612,
273,
756,
18,
588,
1499,
2668,
2284,
6134,... |
if (type(arg_tup) is not TupleType): | if type(arg_tup) is not TupleType and arg_tup is not None: | def save(self, object, pers_save = 0): memo = self.memo | 2c5cff68a490804ae766bd848d9e45af14d96b06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2c5cff68a490804ae766bd848d9e45af14d96b06/pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
733,
16,
13508,
67,
5688,
273,
374,
4672,
11063,
273,
365,
18,
19521,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
733,
16,
13508,
67,
5688,
273,
374,
4672,
11063,
273,
365,
18,
19521,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
__traceback_info__ = (self.getName(), instance, value, kwargs) | def set(self, instance, value, **kwargs): kwargs['field'] = self # Remove acquisition wrappers value = aq_base(value) __traceback_info__ = (self.getName(), instance, value, kwargs) self.storage.set(self.getName(), instance, value, **kwargs) | 64c71cec849e633ac53e1bcfe44e2c42bf15bd9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/64c71cec849e633ac53e1bcfe44e2c42bf15bd9b/Field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12,
2890,
16,
791,
16,
460,
16,
2826,
4333,
4672,
1205,
3292,
1518,
3546,
273,
365,
468,
3581,
1721,
22094,
21589,
460,
273,
279,
85,
67,
1969,
12,
1132,
13,
365,
18,
5697,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12,
2890,
16,
791,
16,
460,
16,
2826,
4333,
4672,
1205,
3292,
1518,
3546,
273,
365,
468,
3581,
1721,
22094,
21589,
460,
273,
279,
85,
67,
1969,
12,
1132,
13,
365,
18,
5697,
18,
... | |
if (item.transparency == "confirmed"): pen = wx.Pen(color, 4) elif (item.transparency == "fyi"): pen = wx.Pen(color, 1) | if item.transparency in ("fyi", "confirmed"): pen = wx.Pen(color, 5) | def GetStatusPen(self, color): # probably should use styles to determine a good pen color item = self.item | 473cf2131d809148843c3750f50a8f38f94d0528 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/473cf2131d809148843c3750f50a8f38f94d0528/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1482,
24251,
12,
2890,
16,
2036,
4672,
468,
8656,
1410,
999,
5687,
358,
4199,
279,
7494,
14264,
2036,
761,
273,
365,
18,
1726,
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,
968,
1482,
24251,
12,
2890,
16,
2036,
4672,
468,
8656,
1410,
999,
5687,
358,
4199,
279,
7494,
14264,
2036,
761,
273,
365,
18,
1726,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
for n in basenodes: | for n in bases: | def changegroupsubset(self, bases, heads): cl = self.changelog # msng = missing msng_cl_lst, bases, heads = cl.nodesbetween(basenodes, headnodes) junk = None knownheads = {} for n in basenodes: for p in cl.parents(n): if p != nullid: knownheads[p] = 1 knownheads = knownheads.keys() has_cl_set, junk, junk = cl.nodesbetween(None, knownheads) has_cl_set = dict.fromkeys(hasnodeset) | 327718049ff93cf9846602faa93d2f1091a61712 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/327718049ff93cf9846602faa93d2f1091a61712/localrepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
1655,
15657,
12,
2890,
16,
8337,
16,
22742,
4672,
927,
273,
365,
18,
24083,
12970,
468,
4086,
3368,
273,
3315,
4086,
3368,
67,
830,
67,
16923,
16,
8337,
16,
22742,
273,
927,
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,
2549,
1655,
15657,
12,
2890,
16,
8337,
16,
22742,
4672,
927,
273,
365,
18,
24083,
12970,
468,
4086,
3368,
273,
3315,
4086,
3368,
67,
830,
67,
16923,
16,
8337,
16,
22742,
273,
927,
18,
... |
symbol, x, y, z = line.split() | symbol, x, y, z = line.split()[:4] | def read_xyz(fileobj, index=-1): if isinstance(fileobj, str): fileobj = open(fileobj) lines = fileobj.readlines() L1 = lines[0].split() if len(L1) == 1: del lines[:2] natoms = int(L1[0]) else: natoms = len(lines) images = [] while len(lines) > 0: positions = [] symbols = [] for line in lines[:natoms]: symbol, x, y, z = line.split() symbols.append(symbol) positions.append([float(x), float(y), float(z)]) images.append(Atoms(symbols=symbols, positions=positions)) del lines[:natoms + 2] return images[index] | dae90d1bc02e95976c6350e48abbb7ee97e90542 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/dae90d1bc02e95976c6350e48abbb7ee97e90542/xyz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
17177,
12,
768,
2603,
16,
770,
29711,
21,
4672,
309,
1549,
12,
768,
2603,
16,
609,
4672,
17041,
273,
1696,
12,
768,
2603,
13,
225,
2362,
273,
17041,
18,
896,
3548,
1435,
511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
17177,
12,
768,
2603,
16,
770,
29711,
21,
4672,
309,
1549,
12,
768,
2603,
16,
609,
4672,
17041,
273,
1696,
12,
768,
2603,
13,
225,
2362,
273,
17041,
18,
896,
3548,
1435,
511,
... |
hBox.pack_start(infoImage, False, False, 0) | infoImageVBox.pack_start(infoImage, False, False, 0) infoImageVBox.show() hBox.pack_start(infoImageVBox, False, False, 0) | def __init__ (self, title, parent, app=None): gtk.Dialog.__init__(self, title, parent, gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, ("gtk-ok", gtk.RESPONSE_OK, "gtk-cancel", gtk.RESPONSE_CANCEL)) table = gtk.Table(3, 2) nameLabel = gtk.Label(_("Application Name")) nameLabel.show() table.attach(nameLabel, 0, 1, 0, 1, 0, gtk.EXPAND, 10, 5) self.nameEntry = gtk.Entry() if app: self.nameEntry.set_text(app.name) self.nameEntry.connect("activate", lambda widget: self.response(gtk.RESPONSE_OK)) self.nameEntry.show() table.attach(self.nameEntry, 1, 2, 0, 1, gtk.EXPAND|gtk.FILL, gtk.EXPAND, 10, 5) | a22737888e184f7e3831dc1540713597c843c940 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/a22737888e184f7e3831dc1540713597c843c940/driconf_simpleui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2077,
16,
982,
16,
595,
33,
7036,
4672,
22718,
18,
6353,
16186,
2738,
972,
12,
2890,
16,
2077,
16,
982,
16,
22718,
18,
2565,
18683,
67,
6720,
1013,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2077,
16,
982,
16,
595,
33,
7036,
4672,
22718,
18,
6353,
16186,
2738,
972,
12,
2890,
16,
2077,
16,
982,
16,
22718,
18,
2565,
18683,
67,
6720,
1013,
96,
... |
cr.execute('SELECT min(%s.id) AS id, count(%s.id) AS %s_count, ' % (self._table, self._table, group_count) + flist + ' FROM ' + from_clause + where_clause + gb + limit_str + offset_str, where_clause_params) | cr.execute('SELECT min(%s.id) AS id, count(%s.id) AS %s_count' % (self._table, self._table, group_count) + (flist and ',') + flist + ' FROM ' + from_clause + where_clause + gb + limit_str + offset_str, where_clause_params) | assert groupby_def and groupby_def._classic_write, "Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True" | 1ba2ff569f11aa08185a42d2faae91ae8c290b05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ba2ff569f11aa08185a42d2faae91ae8c290b05/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1815,
13126,
67,
536,
471,
13126,
67,
536,
6315,
1106,
335,
67,
2626,
16,
315,
2314,
316,
296,
1655,
1637,
11,
1297,
506,
6736,
2063,
17,
19251,
329,
1466,
261,
2135,
445,
578,
3746,
1466,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1815,
13126,
67,
536,
471,
13126,
67,
536,
6315,
1106,
335,
67,
2626,
16,
315,
2314,
316,
296,
1655,
1637,
11,
1297,
506,
6736,
2063,
17,
19251,
329,
1466,
261,
2135,
445,
578,
3746,
1466,
3... |
add_files(self, ignored_files, ext, self.abs_real_path, self.directory) | add_files(self, ignored_files, ext, self.abs_real_path, self.directory) | def scan_files(self): """returns a list of po files for the project and language""" ignored_files = set(p.strip() for p in self.project.ignoredfiles.split(',')) ext = os.extsep + self.project.localfiletype | 9cd84fb706604a54929132998e314890a1997e69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11388/9cd84fb706604a54929132998e314890a1997e69/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
67,
2354,
12,
2890,
4672,
3536,
6154,
279,
666,
434,
8275,
1390,
364,
326,
1984,
471,
2653,
8395,
5455,
67,
2354,
273,
444,
12,
84,
18,
6406,
1435,
364,
293,
316,
365,
18,
4406,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
67,
2354,
12,
2890,
4672,
3536,
6154,
279,
666,
434,
8275,
1390,
364,
326,
1984,
471,
2653,
8395,
5455,
67,
2354,
273,
444,
12,
84,
18,
6406,
1435,
364,
293,
316,
365,
18,
4406,
... |
Thread(target=self._doLockSet, args=(None, 1)).start() self.assertEqual(self.done.get(True, 1), 'DONE') Thread(target=self._doAddSet, args=(['nine'])).start() self.assertRaises(Queue.Empty, self.done.get, True, 0.2) self.ls.release() self.assertEqual(self.done.get(True, 1), 'DONE') class TestGanetiLockManager(unittest.TestCase): | self._addThread(target=self._doLockSet, args=(None, 1)) self._waitThreads() self.assertEqual(self.done.get_nowait(), 'DONE') self._addThread(target=self._doAddSet, args=(['nine'])) self.assertRaises(Queue.Empty, self.done.get_nowait) self.ls.release() self._waitThreads() self.assertEqual(self.done.get_nowait(), 'DONE') self._setUpLS() class TestGanetiLockManager(_ThreadedTestCase): | def testEmptyLockSet(self): # get the set-lock self.assertEqual(self.ls.acquire(None), set(['one', 'two', 'three'])) # now empty it... self.ls.remove(['one', 'two', 'three']) # and adds/locks by another thread still wait Thread(target=self._doAddSet, args=(['nine'])).start() Thread(target=self._doLockSet, args=(None, 1)).start() Thread(target=self._doLockSet, args=(None, 0)).start() self.assertRaises(Queue.Empty, self.done.get, True, 0.2) self.ls.release() self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE') # empty it again... self.assertEqual(self.ls.remove(['nine']), ['nine']) # now share it... self.assertEqual(self.ls.acquire(None, shared=1), set()) # other sharers can go, adds still wait Thread(target=self._doLockSet, args=(None, 1)).start() self.assertEqual(self.done.get(True, 1), 'DONE') Thread(target=self._doAddSet, args=(['nine'])).start() self.assertRaises(Queue.Empty, self.done.get, True, 0.2) self.ls.release() self.assertEqual(self.done.get(True, 1), 'DONE') | 4607c978b8f973b63c49547f1b8d6061fdbd78d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/4607c978b8f973b63c49547f1b8d6061fdbd78d3/ganeti.locking_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1921,
2531,
694,
12,
2890,
4672,
468,
336,
326,
444,
17,
739,
365,
18,
11231,
5812,
12,
2890,
18,
3251,
18,
1077,
1039,
12,
7036,
3631,
444,
12,
3292,
476,
2187,
296,
15415,
2187... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1921,
2531,
694,
12,
2890,
4672,
468,
336,
326,
444,
17,
739,
365,
18,
11231,
5812,
12,
2890,
18,
3251,
18,
1077,
1039,
12,
7036,
3631,
444,
12,
3292,
476,
2187,
296,
15415,
2187... |
"""Tests the addition of an array and a scalar.""" | """Test the addition of an array and a scalar.""" | def test_addition_scalar(self): """Tests the addition of an array and a scalar.""" | b4921174e8e8618d1e94d342df636db8d27a7407 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12870/b4921174e8e8618d1e94d342df636db8d27a7407/test_abstract_array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1289,
608,
67,
8748,
12,
2890,
4672,
3536,
14650,
326,
2719,
434,
392,
526,
471,
279,
4981,
12123,
2,
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,
1842,
67,
1289,
608,
67,
8748,
12,
2890,
4672,
3536,
14650,
326,
2719,
434,
392,
526,
471,
279,
4981,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.starttag(node, 'p', '', CLASS='admonition-title first')) | self.starttag(node, 'p', '', CLASS='admonition-title')) | def visit_title(self, node): """Only 6 section levels are supported by HTML.""" check_id = 0 close_tag = '</p>\n' if isinstance(node.parent, nodes.topic): self.body.append( self.starttag(node, 'p', '', CLASS='topic-title first')) check_id = 1 elif isinstance(node.parent, nodes.sidebar): self.body.append( self.starttag(node, 'p', '', CLASS='sidebar-title first')) check_id = 1 elif isinstance(node.parent, nodes.admonition): self.body.append( self.starttag(node, 'p', '', CLASS='admonition-title first')) check_id = 1 elif isinstance(node.parent, nodes.table): self.body.append( self.starttag(node, 'caption', '')) check_id = 1 close_tag = '</caption>\n' elif self.section_level == 0: # document title self.head.append('<title>%s</title>\n' % self.encode(node.astext())) self.body.append(self.starttag(node, 'h1', '', CLASS='title')) self.context.append('</h1>\n') self.in_document_title = len(self.body) else: h_level = self.section_level + self.initial_header_level - 1 self.body.append( self.starttag(node, 'h%s' % h_level, '')) atts = {} if node.parent.hasattr('id'): atts['name'] = node.parent['id'] if node.hasattr('refid'): atts['class'] = 'toc-backref' atts['href'] = '#' + node['refid'] self.body.append(self.starttag({}, 'a', '', **atts)) self.context.append('</a></h%s>\n' % (h_level)) if check_id: if node.parent.hasattr('id'): self.body.append( self.starttag({}, 'a', '', name=node.parent['id'])) self.context.append('</a>' + close_tag) else: self.context.append(close_tag) | 64f633d15321c5998d3f4c73723543bc12ed1631 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/64f633d15321c5998d3f4c73723543bc12ed1631/html4css1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2649,
12,
2890,
16,
756,
4672,
3536,
3386,
1666,
2442,
7575,
854,
3260,
635,
3982,
12123,
866,
67,
350,
273,
374,
1746,
67,
2692,
273,
4357,
84,
5333,
82,
11,
309,
1549,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2649,
12,
2890,
16,
756,
4672,
3536,
3386,
1666,
2442,
7575,
854,
3260,
635,
3982,
12123,
866,
67,
350,
273,
374,
1746,
67,
2692,
273,
4357,
84,
5333,
82,
11,
309,
1549,
12,
... |
'some_callback' : genericcallable([int], int), | 'some_callback' : genericcallable([int], str), | def test_document_call(): return document.getElementById("some_id") | 30b4af922a1e99773cb05a3cf842c485c075ae42 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/30b4af922a1e99773cb05a3cf842c485c075ae42/test_bltn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5457,
67,
1991,
13332,
327,
1668,
18,
24135,
2932,
19068,
67,
350,
7923,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
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,
1842,
67,
5457,
67,
1991,
13332,
327,
1668,
18,
24135,
2932,
19068,
67,
350,
7923,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
global IBLLIGHT camera = cam.getData() print "o exporting Camera "+camera.getName()+"..." objmatrix = cam.matrix eyeV = Mathutils.Vector([0, 0, 0, 1]) targetV = Mathutils.Vector([0, 0, -1, 1]) upV = Mathutils.Vector([0, 1, 0, 0]) eyeV = eyeV * objmatrix targetV = targetV * objmatrix upV = upV * objmatrix fov = 360.0 * atan(16.0 / camera.getLens()) / pi FILE.write("\n\ncamera {\n") camtype = "pinhole" if(DOF.val == 1): camtype = "thinlens" if(SPHERICALCAMERA.val == 1): camtype = "spherical" FILE.write("\ttype %s\n" % camtype) FILE.write("\teye %s %s %s\n" % (eyeV[0], eyeV[1], eyeV[2])) FILE.write("\ttarget %s %s %s\n" % (targetV[0], targetV[1], targetV[2])) FILE.write("\tup %s %s %s\n" % (upV[0], upV[1], upV[2])) if SPHERICALCAMERA.val == 0: FILE.write("\tfov %s \n" % fov) if SPHERICALCAMERA.val == 0: FILE.write("\taspect %s \n" % (1.0 * IM_WIDTH / IM_HEIGHT)) if DOF.val == 1: FILE.write("\tfdist %s \n" % DOFDIST) FILE.write("\tlensr %s \n" % DOFRADIUS) FILE.write("}") if IBLLIGHT <> "": print "o exporting ibllight..." FILE.write("\n\nlight {\n") FILE.write("\ttype ibl\n") FILE.write("\timage \"%s\"\n" % (IBLLIGHT)) FILE.write("\tcenter 1 0 0\n") FILE.write("\tup 0 0 1\n") FILE.write("\tlock true\n") FILE.write("\tsamples %s\n" % DSAMPLES.val) FILE.write("}") def export_geometry(obj, filename): islight = obj.name.startswith("meshlight") if islight: print "o exporting meshlight " + obj.name+"..." else: print "o exporting mesh " + obj.name+"..." mesh = NMesh.GetRawFromObject(obj.name) if islight: mesh.transform(obj.getMatrix(), 1) verts = mesh.verts faces = mesh.faces numfaces = faces.__len__() numverts = verts.__len__() if numfaces > 100000: print " -> large mesh detected - creating binary ra3 file" ra3filename = filename.replace(".sc", "_%s.ra3" % obj.name) RA3FILE = open(ra3filename, 'wb') print " -> creating \"%s\" ..." % ra3filename print " -> counting triangles ..." numtris = 0 for face in faces: num = len(face.v) if num == 4: numtris = numtris + 2 elif num == 3: numtris = numtris + 1 print " -> writing %s points" % numverts RA3FILE.write(struct.pack("<II", numverts, numtris)) for vert in verts: RA3FILE.write(struct.pack("<fff", vert.co[0], vert.co[1], vert.co[2])) print " -> writing %s triangles" % numtris for face in faces: num = len(face.v) if num == 4: RA3FILE.write(struct.pack("<III", face.v[0].index, face.v[1].index, face.v[2].index)) RA3FILE.write(struct.pack("<III", face.v[0].index, face.v[2].index, face.v[3].index)) elif num == 3: RA3FILE.write(struct.pack("<III", face.v[0].index, face.v[1].index, face.v[2].index)) RA3FILE.close() print " -> done writing file" FILE.write("\n\nobject {\n") if len(mesh.materials) == 1: FILE.write("\tshader \"" + mesh.materials[0].name + ".shader\"\n") elif len(mesh.materials) > 1: FILE.write("\tshaders %d\n" % (len(mesh.materials))) for mat in mesh.materials: FILE.write("\t\t\"" + mat.name + ".shader\"\n") else: FILE.write("\tshader def\n") mat = obj.getMatrix() FILE.write("\ttransform col\n\t\t%s %s %s %s\n\t\t%s %s %s %s\n\t\t%s %s %s %s\n\t\t%s %s %s %s\n" % ( mat[0][0], mat[0][1], mat[0][2], mat[0][3], mat[1][0], mat[1][1], mat[1][2], mat[1][3], mat[2][0], mat[2][1], mat[2][2], mat[2][3], mat[3][0], mat[3][1], mat[3][2], mat[3][3])) FILE.write("\ttype file-mesh\n") FILE.write("\tname \"" + obj.name + "\"\n") FILE.write("\tfilename \"%s\"\n" % os.path.basename(ra3filename)) FILE.write("}\n") return if numverts > 0: if islight: FILE.write("\n\nlight {\n") FILE.write("\ttype meshlight\n") FILE.write("\tname \"" + obj.name + "\"\n") if len(mesh.materials) >= 1: matrl = mesh.materials[0] FILE.write("\temit { \"sRGB nonlinear\" %s %s %s }\n" % (matrl.R, matrl.G, matrl.B)) else: FILE.write("\temit 1 1 1\n") FILE.write("\tradiance %s\n" % (MESHLIGHTPOWER.val)) FILE.write("\tsamples %s\n" % DSAMPLES.val) else: FILE.write("\n\nobject {\n") if len(mesh.materials) == 1: FILE.write("\tshader \"" + mesh.materials[0].name + ".shader\"\n") elif len(mesh.materials) > 1: FILE.write("\tshaders %d\n" % (len(mesh.materials))) for mat in mesh.materials: FILE.write("\t\t\"" + mat.name + ".shader\"\n") else: FILE.write("\tshader def\n") mat = obj.getMatrix() FILE.write("\ttransform col\n\t\t%s %s %s %s\n\t\t%s %s %s %s\n\t\t%s %s %s %s\n\t\t%s %s %s %s\n" % ( mat[0][0], mat[0][1], mat[0][2], mat[0][3], mat[1][0], mat[1][1], mat[1][2], mat[1][3], mat[2][0], mat[2][1], mat[2][2], mat[2][3], mat[3][0], mat[3][1], mat[3][2], mat[3][3])) FILE.write("\ttype generic-mesh\n") FILE.write("\tname \"" + obj.name + "\"\n") FILE.write("\tpoints %d\n" % (numverts)) for vert in verts: FILE.write("\t\t%s %s %s\n" % (vert.co[0], vert.co[1], vert.co[2])) numtris = 0 for face in faces: num = len(face.v) if num == 4: numtris = numtris + 2 elif num == 3: numtris = numtris + 1 FILE.write("\ttriangles %d\n" % (numtris)) allsmooth = True allflat = True for face in faces: num = len(face.v) smooth = face.smooth != 0 allsmooth &= smooth allflat &= not smooth if num == 4: FILE.write("\t\t%d %d %d\n" % (face.v[0].index, face.v[1].index, face.v[2].index)) FILE.write("\t\t%d %d %d\n" % (face.v[0].index, face.v[2].index, face.v[3].index)) elif num == 3: FILE.write("\t\t%d %d %d\n" % (face.v[0].index, face.v[1].index, face.v[2].index)) if not islight: if allflat: FILE.write("\tnormals none\n") elif allsmooth: FILE.write("\tnormals vertex\n") for vert in verts: FILE.write("\t\t%s %s %s\n" % (vert.no[0], vert.no[1], vert.no[2])) else: FILE.write("\tnormals facevarying\n") for face in faces: num = len(face.v) if face.smooth != 0: if num == 4: index0 = face.v[0].index index1 = face.v[1].index index2 = face.v[2].index index3 = face.v[3].index FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (verts[index0].no[0], verts[index0].no[1], verts[index0].no[2], verts[index1].no[0], verts[index1].no[1], verts[index1].no[2], verts[index2].no[0], verts[index2].no[1], verts[index2].no[2])) FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (verts[index0].no[0], verts[index0].no[1], verts[index0].no[2], verts[index2].no[0], verts[index2].no[1], verts[index2].no[2], verts[index3].no[0], verts[index3].no[1], verts[index3].no[2])) elif num == 3: index0 = face.v[0].index index1 = face.v[1].index index2 = face.v[2].index FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (verts[index0].no[0], verts[index0].no[1], verts[index0].no[2], verts[index1].no[0], verts[index1].no[1], verts[index1].no[2], verts[index2].no[0], verts[index2].no[1], verts[index2].no[2])) else: fnx = face.no[0] fny = face.no[1] fnz = face.no[2] if num == 4: FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (fnx, fny, fnz, fnx, fny, fnz, fnx, fny, fnz)) FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (fnx, fny, fnz, fnx, fny, fnz, fnx, fny, fnz)) elif num == 3: FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (fnx, fny, fnz, fnx, fny, fnz, fnx, fny, fnz)) if mesh.hasFaceUV(): tx = 1 ty = 1 if len(mesh.materials) >= 1: if len(mesh.materials[0].getTextures()) >= 1: if mesh.materials[0].getTextures()[0] <> None: tx = mesh.materials[0].getTextures()[0].tex.repeat[0] ty = mesh.materials[0].getTextures()[0].tex.repeat[1] FILE.write("\tuvs facevarying\n") for face in faces: num = len(face.v) if num == 4: FILE.write("\t\t%s %s %s %s %s %s\n" % (tx * face.uv[0][0], ty * face.uv[0][1], tx * face.uv[1][0], ty * face.uv[1][1], tx * face.uv[2][0], ty * face.uv[2][1])) FILE.write("\t\t%s %s %s %s %s %s\n" % (tx * face.uv[0][0], ty * face.uv[0][1], tx * face.uv[2][0], ty * face.uv[2][1], tx * face.uv[3][0], ty * face.uv[3][1])) elif num == 3: FILE.write("\t\t%s %s %s %s %s %s\n" % (tx * face.uv[0][0], ty * face.uv[0][1], tx * face.uv[1][0], ty * face.uv[1][1], tx * face.uv[2][0], ty * face.uv[2][1])) else: FILE.write("\tuvs none\n") if len(mesh.materials) > 1: FILE.write("\tface_shaders\n") for face in faces: num = len(face.v) if num == 4: FILE.write("\t\t%d\n" % (face.materialIndex)) FILE.write("\t\t%d\n" % (face.materialIndex)) elif num == 3: FILE.write("\t\t%d\n" % (face.materialIndex)) FILE.write("}\n") | camera = cam.getData() print "o exporting Camera "+camera.getName()+"..." objmatrix = cam.matrix eyeV = Mathutils.Vector([0, 0, 0, 1]) targetV = Mathutils.Vector([0, 0, -1, 1]) upV = Mathutils.Vector([0, 1, 0, 0]) eyeV = eyeV * objmatrix targetV = targetV * objmatrix upV = upV * objmatrix fov = 360.0 * atan(16.0 / camera.getLens()) / pi DOFDIST=camera.dofDist FILE.write("\n\ncamera {\n") if DOF.val == 1: camtype = "thinlens" FILE.write("\ttype %s\n" % camtype) FILE.write("\teye %s %s %s\n" % (eyeV[0], eyeV[1], eyeV[2])) FILE.write("\ttarget %s %s %s\n" % (targetV[0], targetV[1], targetV[2])) FILE.write("\tup %s %s %s\n" % (upV[0], upV[1], upV[2])) FILE.write("\tfov %s \n" % fov) FILE.write("\taspect %s \n" % (1.0 * IM_WIDTH / IM_HEIGHT)) FILE.write("\tfdist %s \n" % DOFDIST) FILE.write("\tlensr %s \n" % DOFRADIUS) FILE.write("\tsides %s \n" % LENSSIDES) FILE.write("\trotation %s \n" % LENSROTATION) elif SPHERICALCAMERA.val == 1: camtype = "spherical" FILE.write("\ttype %s\n" % camtype) FILE.write("\teye %s %s %s\n" % (eyeV[0], eyeV[1], eyeV[2])) FILE.write("\ttarget %s %s %s\n" % (targetV[0], targetV[1], targetV[2])) FILE.write("\tup %s %s %s\n" % (upV[0], upV[1], upV[2])) elif FISHEYECAMERA.val == 1: camtype = "fisheye" FILE.write("\ttype %s\n" % camtype) FILE.write("\teye %s %s %s\n" % (eyeV[0], eyeV[1], eyeV[2])) FILE.write("\ttarget %s %s %s\n" % (targetV[0], targetV[1], targetV[2])) FILE.write("\tup %s %s %s\n" % (upV[0], upV[1], upV[2])) else: camtype = "pinhole" FILE.write("\ttype %s\n" % camtype) FILE.write("\teye %s %s %s\n" % (eyeV[0], eyeV[1], eyeV[2])) FILE.write("\ttarget %s %s %s\n" % (targetV[0], targetV[1], targetV[2])) FILE.write("\tup %s %s %s\n" % (upV[0], upV[1], upV[2])) FILE.write("\tfov %s \n" % fov) FILE.write("\taspect %s \n" % (1.0 * IM_WIDTH / IM_HEIGHT)) FILE.write("}") def export_geometry(obj): islight = obj.name.startswith("meshlight") if islight: print "o exporting meshlight " + obj.name+"..." else: print "o exporting mesh " + obj.name+"..." mesh = NMesh.GetRawFromObject(obj.name) mesh.transform(obj.getMatrix(), 1) verts = mesh.verts faces = mesh.faces numverts = verts.__len__() if numverts > 0: if islight: FILE.write("\n\nlight {\n") FILE.write("\ttype meshlight\n") FILE.write("\tname \"" + obj.name + "\"\n") if len(mesh.materials) >= 1: matrl = mesh.materials[0] FILE.write("\temit { \"sRGB nonlinear\" %s %s %s }\n" % (matrl.R, matrl.G, matrl.B)) else: FILE.write("\temit 1 1 1\n") FILE.write("\tradiance %s\n" % (MESHLIGHTPOWER.val)) FILE.write("\tsamples %s\n" % DSAMPLES.val) else: FILE.write("\n\nobject {\n") if len(mesh.materials) == 1: FILE.write("\tshader \"" + mesh.materials[0].name + ".shader\"\n") for mat in mesh.materials: textures = mat.getTextures() textu = textures[1] if textu <> None and (textu.tex.name.startswith("bump") or textu.tex.name.startswith("normal")): FILE.write("\tmodifier \"" + str(textu.tex.getName()) + "\"\n") elif len(mesh.materials) > 1: FILE.write("\tshaders %d\n" % (len(mesh.materials))) for mat in mesh.materials: FILE.write("\t\t\"" + mat.name + ".shader\"\n") FILE.write("\tmodifiers %d\n" % (len(mesh.materials))) for mat in mesh.materials: textures = mat.getTextures() textu = textures[1] if textu <> None and (textu.tex.name.startswith("bump") or textu.tex.name.startswith("normal")): FILE.write("\t\t\"" + textu.tex.getName() + "\"\n") else: FILE.write("\t\t\"" + "None" + "\"\n") else: FILE.write("\tshader def\n") FILE.write("\ttype generic-mesh\n") FILE.write("\tname \"" + obj.name + "\"\n") FILE.write("\tpoints %d\n" % (numverts)) for vert in verts: FILE.write("\t\t%s %s %s\n" % (vert.co[0], vert.co[1], vert.co[2])) numtris = 0 for face in faces: num = len(face.v) if num == 4: numtris = numtris + 2 elif num == 3: numtris = numtris + 1 FILE.write("\ttriangles %d\n" % (numtris)) allsmooth = True allflat = True for face in faces: num = len(face.v) smooth = face.smooth <> 0 allsmooth &= smooth allflat &= not smooth if num == 4: FILE.write("\t\t%d %d %d\n" % (face.v[0].index, face.v[1].index, face.v[2].index)) FILE.write("\t\t%d %d %d\n" % (face.v[0].index, face.v[2].index, face.v[3].index)) elif num == 3: FILE.write("\t\t%d %d %d\n" % (face.v[0].index, face.v[1].index, face.v[2].index)) if not islight: if allflat: FILE.write("\tnormals none\n") elif allsmooth: FILE.write("\tnormals vertex\n") for vert in verts: FILE.write("\t\t%s %s %s\n" % (vert.no[0], vert.no[1], vert.no[2])) else: FILE.write("\tnormals facevarying\n") for face in faces: num = len(face.v) if face.smooth <> 0: if num == 4: index0 = face.v[0].index index1 = face.v[1].index index2 = face.v[2].index index3 = face.v[3].index FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (verts[index0].no[0], verts[index0].no[1], verts[index0].no[2], verts[index1].no[0], verts[index1].no[1], verts[index1].no[2], verts[index2].no[0], verts[index2].no[1], verts[index2].no[2])) FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (verts[index0].no[0], verts[index0].no[1], verts[index0].no[2], verts[index2].no[0], verts[index2].no[1], verts[index2].no[2], verts[index3].no[0], verts[index3].no[1], verts[index3].no[2])) elif num == 3: index0 = face.v[0].index index1 = face.v[1].index index2 = face.v[2].index FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (verts[index0].no[0], verts[index0].no[1], verts[index0].no[2], verts[index1].no[0], verts[index1].no[1], verts[index1].no[2], verts[index2].no[0], verts[index2].no[1], verts[index2].no[2])) else: fnx = face.no[0] fny = face.no[1] fnz = face.no[2] if num == 4: FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (fnx, fny, fnz, fnx, fny, fnz, fnx, fny, fnz)) FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (fnx, fny, fnz, fnx, fny, fnz, fnx, fny, fnz)) elif num == 3: FILE.write("\t\t%s %s %s %s %s %s %s %s %s\n" % (fnx, fny, fnz, fnx, fny, fnz, fnx, fny, fnz)) if mesh.hasFaceUV(): tx = 1 ty = 1 if len(mesh.materials) >= 1: if len(mesh.materials[0].getTextures()) >= 1: if mesh.materials[0].getTextures()[0] <> None: tx = mesh.materials[0].getTextures()[0].tex.repeat[0] ty = mesh.materials[0].getTextures()[0].tex.repeat[1] FILE.write("\tuvs facevarying\n") for face in faces: num = len(face.v) if num == 4: FILE.write("\t\t%s %s %s %s %s %s\n" % (tx * face.uv[0][0], ty * face.uv[0][1], tx * face.uv[1][0], ty * face.uv[1][1], tx * face.uv[2][0], ty * face.uv[2][1])) FILE.write("\t\t%s %s %s %s %s %s\n" % (tx * face.uv[0][0], ty * face.uv[0][1], tx * face.uv[2][0], ty * face.uv[2][1], tx * face.uv[3][0], ty * face.uv[3][1])) elif num == 3: FILE.write("\t\t%s %s %s %s %s %s\n" % (tx * face.uv[0][0], ty * face.uv[0][1], tx * face.uv[1][0], ty * face.uv[1][1], tx * face.uv[2][0], ty * face.uv[2][1])) else: FILE.write("\tuvs none\n") if len(mesh.materials) > 1: FILE.write("\tface_shaders\n") for face in faces: num = len(face.v) if num == 4: FILE.write("\t\t%d\n" % (face.materialIndex)) FILE.write("\t\t%d\n" % (face.materialIndex)) elif num == 3: FILE.write("\t\t%d\n" % (face.materialIndex)) FILE.write("}\n") | def export_camera(cam): global IBLLIGHT # get the camera camera = cam.getData() print "o exporting Camera "+camera.getName()+"..." # get the object matrix so we can calculate to and up objmatrix = cam.matrix eyeV = Mathutils.Vector([0, 0, 0, 1]) targetV = Mathutils.Vector([0, 0, -1, 1]) upV = Mathutils.Vector([0, 1, 0, 0]) eyeV = eyeV * objmatrix targetV = targetV * objmatrix upV = upV * objmatrix # get the fov value fov = 360.0 * atan(16.0 / camera.getLens()) / pi FILE.write("\n\ncamera {\n") camtype = "pinhole" if(DOF.val == 1): camtype = "thinlens" if(SPHERICALCAMERA.val == 1): camtype = "spherical" FILE.write("\ttype %s\n" % camtype) FILE.write("\teye %s %s %s\n" % (eyeV[0], eyeV[1], eyeV[2])) FILE.write("\ttarget %s %s %s\n" % (targetV[0], targetV[1], targetV[2])) FILE.write("\tup %s %s %s\n" % (upV[0], upV[1], upV[2])) if SPHERICALCAMERA.val == 0: FILE.write("\tfov %s \n" % fov) if SPHERICALCAMERA.val == 0: FILE.write("\taspect %s \n" % (1.0 * IM_WIDTH / IM_HEIGHT)) if DOF.val == 1: FILE.write("\tfdist %s \n" % DOFDIST) FILE.write("\tlensr %s \n" % DOFRADIUS) FILE.write("}") if IBLLIGHT <> "": print "o exporting ibllight..." FILE.write("\n\nlight {\n") FILE.write("\ttype ibl\n") FILE.write("\timage \"%s\"\n" % (IBLLIGHT)) FILE.write("\tcenter 1 0 0\n") FILE.write("\tup 0 0 1\n") FILE.write("\tlock true\n") FILE.write("\tsamples %s\n" % DSAMPLES.val) FILE.write("}") | cbe7db97c14dab7ad62f558e33819d3bd283fe7b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12400/cbe7db97c14dab7ad62f558e33819d3bd283fe7b/sunflow_export.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
26426,
12,
20133,
4672,
2552,
467,
14618,
23516,
225,
468,
336,
326,
10836,
10836,
273,
5861,
18,
588,
751,
1435,
1172,
315,
83,
3359,
310,
30355,
13773,
26426,
18,
17994,
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,
3359,
67,
26426,
12,
20133,
4672,
2552,
467,
14618,
23516,
225,
468,
336,
326,
10836,
10836,
273,
5861,
18,
588,
751,
1435,
1172,
315,
83,
3359,
310,
30355,
13773,
26426,
18,
17994,
1435,
... |
if dir == None: | if dir == "" or dir is None or user is None or user == "": | def UploadDirectoryTo(self, user, dir, recurse = 0): if dir == None: return | 35d91e47f1719ec8fa03e2e6c2bb07f29edf73f6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8738/35d91e47f1719ec8fa03e2e6c2bb07f29edf73f6/userbrowse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9414,
2853,
774,
12,
2890,
16,
729,
16,
1577,
16,
11502,
273,
374,
4672,
309,
1577,
422,
1408,
578,
1577,
353,
599,
578,
729,
353,
599,
578,
729,
422,
1408,
30,
327,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9414,
2853,
774,
12,
2890,
16,
729,
16,
1577,
16,
11502,
273,
374,
4672,
309,
1577,
422,
1408,
578,
1577,
353,
599,
578,
729,
353,
599,
578,
729,
422,
1408,
30,
327,
2,
-100,
-100,
-... |
os.close(0) os.close(1) if os.dup(p2cread) <> 0: sys.stderr.write('popen2: bad read dup\n') if os.dup(c2pwrite) <> 1: sys.stderr.write('popen2: bad write dup\n') | os.dup2(p2cread, 0) os.dup2(c2pwrite, 1) | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it specifies the size of the I/O buffers to/from the child process.""" if type(cmd) == type(''): cmd = ['/bin/sh', '-c', cmd] p2cread, p2cwrite = os.pipe() c2pread, c2pwrite = os.pipe() if capturestderr: errout, errin = os.pipe() self.pid = os.fork() if self.pid == 0: # Child os.close(0) os.close(1) if os.dup(p2cread) <> 0: sys.stderr.write('popen2: bad read dup\n') if os.dup(c2pwrite) <> 1: sys.stderr.write('popen2: bad write dup\n') if capturestderr: os.close(2) if os.dup(errin) <> 2: pass for i in range(3, MAXFD): try: os.close(i) except: pass try: os.execvp(cmd[0], cmd) finally: os._exit(1) # Shouldn't come here, I guess os._exit(1) os.close(p2cread) self.tochild = os.fdopen(p2cwrite, 'w', bufsize) os.close(c2pwrite) self.fromchild = os.fdopen(c2pread, 'r', bufsize) if capturestderr: os.close(errin) self.childerr = os.fdopen(errout, 'r', bufsize) else: self.childerr = None self.sts = -1 # Child not completed yet _active.append(self) | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1797,
16,
7477,
11241,
33,
20,
16,
1681,
1467,
29711,
21,
4672,
3536,
1986,
1569,
296,
4172,
11,
353,
326,
5972,
1296,
358,
1836,
316,
279,
720,
17,
2567... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1797,
16,
7477,
11241,
33,
20,
16,
1681,
1467,
29711,
21,
4672,
3536,
1986,
1569,
296,
4172,
11,
353,
326,
5972,
1296,
358,
1836,
316,
279,
720,
17,
2567... |
if sys.platform == "win32": return path + os.path.sep + file else: if file[0:3] == "lib": file = file[3:] if file[-3:] == ".so": file = file[0:-3] if file[-2:] == ".a": file = file[0:-2] result = "-L%s -l%s" % ( path, file ) return result | if file[0:3] == "lib": file = file[3:] if file[-3:] == ".so": file = file[0:-3] if file[-2:] == ".a": file = file[0:-2] if file[-4:] == ".lib": file = file[0:-4] result = "-L\"%s\" -l%s" % ( path, file ) return result | def buildLibLine( path, file ): if path == "" or file == "": return "" if sys.platform == "win32": return path + os.path.sep + file else: if file[0:3] == "lib": file = file[3:] if file[-3:] == ".so": file = file[0:-3] if file[-2:] == ".a": file = file[0:-2] result = "-L%s -l%s" % ( path, file ) return result | c5ac6a16b4dd568c9aa1cfb41602b712f1a9448f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/c5ac6a16b4dd568c9aa1cfb41602b712f1a9448f/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5664,
1670,
12,
589,
16,
585,
262,
30,
225,
309,
589,
422,
1408,
578,
585,
422,
1408,
30,
327,
1408,
225,
309,
585,
63,
20,
30,
23,
65,
422,
315,
2941,
6877,
585,
273,
585,
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,
1361,
5664,
1670,
12,
589,
16,
585,
262,
30,
225,
309,
589,
422,
1408,
578,
585,
422,
1408,
30,
327,
1408,
225,
309,
585,
63,
20,
30,
23,
65,
422,
315,
2941,
6877,
585,
273,
585,
6... |
data = self._rbuf | rbufsize = max(self._rbufsize, self.default_bufsize) buf = self._rbuf buf.seek(0, 2) | def read(self, size=-1): data = self._rbuf if size < 0: # Read until EOF buffers = [] if data: buffers.append(data) self._rbuf = "" if self._rbufsize <= 1: recv_size = self.default_bufsize else: recv_size = self._rbufsize while True: data = self._sock.recv(recv_size) if not data: break buffers.append(data) return "".join(buffers) else: # Read until size bytes or EOF seen, whichever comes first buf_len = len(data) if buf_len >= size: self._rbuf = data[size:] return data[:size] buffers = [] if data: buffers.append(data) self._rbuf = "" while True: left = size - buf_len recv_size = min(self._rbufsize, left) data = self._sock.recv(recv_size) if not data: break buffers.append(data) n = len(data) if n >= left: self._rbuf = data[left:] buffers[-1] = data[:left] break buf_len += n return "".join(buffers) | 5203dbadc432c6f2260803a4064375469d5ec7b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/5203dbadc432c6f2260803a4064375469d5ec7b6/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
29711,
21,
4672,
282,
436,
4385,
1467,
273,
943,
12,
2890,
6315,
86,
4385,
1467,
16,
365,
18,
1886,
67,
4385,
1467,
13,
565,
1681,
273,
365,
6315,
86,
4385,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
963,
29711,
21,
4672,
282,
436,
4385,
1467,
273,
943,
12,
2890,
6315,
86,
4385,
1467,
16,
365,
18,
1886,
67,
4385,
1467,
13,
565,
1681,
273,
365,
6315,
86,
4385,
1... |
"params",GL_GET_MATERIAL_SIZES, "pname", | "params",GL_GET_MATERIAL_SIZES, "pname", | def addGLGetConstant( constant, arraySize ): """Add a glGet* constant to return an output array of correct size""" GL_GET_SIZES[ constant ] = arraySize | 779beb78d8242dd156d555119ccab07062fb4bf3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1545/779beb78d8242dd156d555119ccab07062fb4bf3/glget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
11261,
967,
6902,
12,
5381,
16,
526,
1225,
262,
30,
3536,
986,
279,
5118,
967,
14,
5381,
358,
327,
392,
876,
526,
434,
3434,
963,
8395,
10252,
67,
3264,
67,
4574,
55,
63,
5381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
11261,
967,
6902,
12,
5381,
16,
526,
1225,
262,
30,
3536,
986,
279,
5118,
967,
14,
5381,
358,
327,
392,
876,
526,
434,
3434,
963,
8395,
10252,
67,
3264,
67,
4574,
55,
63,
5381,
... |
phrase = L | if is_64bit_linux: phrase = '[C\x1b[C\n' else: phrase = L | def eval(self, code, strip=True): self._synchronize() code = str(code) code = code.strip() code = code.replace('\n',' ') x = [] for L in code.split('\n'): if L != '': try: s = self.__in_seq + 1 pr = '\[%s\]>'%s M = self._eval_line(L, wait_for_prompt=self._prompt) phrase = L #phrase = '[C\x1b[C\n' i = M.rfind(phrase) if i > 1: M = M[i+len(phrase):] x.append(M.strip()) self.__in_seq = s except KeyboardInterrupt: self._keyboard_interrupt() except TypeError, s: return 'error evaluating "%s":\n%s'%(code,s) return '\n'.join(x) | 8a3e0314e880a50ea2c868a4ccbabe7dd6a591fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/8a3e0314e880a50ea2c868a4ccbabe7dd6a591fb/lisp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
981,
16,
2569,
33,
5510,
4672,
365,
6315,
87,
2600,
554,
1435,
981,
273,
609,
12,
710,
13,
981,
273,
981,
18,
6406,
1435,
981,
273,
981,
18,
2079,
2668,
64,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
981,
16,
2569,
33,
5510,
4672,
365,
6315,
87,
2600,
554,
1435,
981,
273,
609,
12,
710,
13,
981,
273,
981,
18,
6406,
1435,
981,
273,
981,
18,
2079,
2668,
64,
82,
... |
self.body = Tkinter.Frame( self.dialog.interior(), bd=2, relief="groove") self.body.pack( padx=10, pady=10, anchor="n" ) | def __init__( self, parent, paper): self.parent = parent self.paper = paper self.dialog = Pmw.Dialog( parent, buttons=(_('OK'), _('Cancel')), defaultbutton=_('OK'), title=_('File properties'), command=self.done, master='parent') self.body = Tkinter.Frame( self.dialog.interior(), bd=2, relief="groove") self.body.pack( padx=10, pady=10, anchor="n" ) self.draw() self.dialog.activate() | ddd687ebf8e17d2f7c95977d36bd2e66ea199594 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4298/ddd687ebf8e17d2f7c95977d36bd2e66ea199594/dialogs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
982,
16,
15181,
4672,
365,
18,
2938,
273,
982,
365,
18,
27400,
273,
15181,
365,
18,
12730,
273,
453,
81,
91,
18,
6353,
12,
982,
16,
9502,
33,
24899,
266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
982,
16,
15181,
4672,
365,
18,
2938,
273,
982,
365,
18,
27400,
273,
15181,
365,
18,
12730,
273,
453,
81,
91,
18,
6353,
12,
982,
16,
9502,
33,
24899,
266... | |
self.assertEqual(len(w.warnings), 1) self.assertWarning(None, w, "Overriding __cmp__ blocks inheritance of __hash__ in 3.x") | self.assertEqual(len(w.warnings), 0) | def __cmp__(self, other): pass | fd73ef7e5d34f58257f4d43fc2311b0a0e88b9b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/fd73ef7e5d34f58257f4d43fc2311b0a0e88b9b5/test_py3kwarn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if self.compiler.find_library_file(lib_dirs, 'crypt'): libs = ['crypt'] else: libs = [] exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) ) | if platform not in ['mac']: if self.compiler.find_library_file(lib_dirs, 'crypt'): libs = ['crypt'] else: libs = [] exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) ) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 081563166713aac056a0230633f21a332e43c91d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/081563166713aac056a0230633f21a332e43c91d/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... |
repo_section = "repo:%s" %(self.SCMrepository) | repo_section = self.cfg_repo_section (self.SCMrepository) | def load_options (self, cfg, repo): # Global self.SCMlogs_appdir = self.option (cfg, "global", "SCMlogs_appdir") self.SCMlogs_appurl = self.remove_double_quotes (self.option (cfg, "global", "SCMlogs_appurl")) if cfg.has_option("global", "SCMlogs_datadir"): self.data_dir = self.option (cfg, "global", "SCMlogs_datadir") else: self.data_dir = "%sdata" % (self.SCMlogs_appdir) | 6bae8db43b1443c14d69b2ff60477bda366d0f2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2574/6bae8db43b1443c14d69b2ff60477bda366d0f2a/SCMconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
2116,
261,
2890,
16,
2776,
16,
3538,
4672,
468,
8510,
365,
18,
2312,
49,
10011,
67,
2910,
1214,
273,
365,
18,
3482,
261,
7066,
16,
315,
6347,
3113,
315,
2312,
49,
10011,
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,
1262,
67,
2116,
261,
2890,
16,
2776,
16,
3538,
4672,
468,
8510,
365,
18,
2312,
49,
10011,
67,
2910,
1214,
273,
365,
18,
3482,
261,
7066,
16,
315,
6347,
3113,
315,
2312,
49,
10011,
67,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.