rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
self.x, self.y = self.treeview.widget_to_tree_coords(int(event.x), int(event.y)) | self.x, self.y = int(event.x), int(event.y) | def update_position(self, event): self.x, self.y = self.treeview.widget_to_tree_coords(int(event.x), int(event.y)) | e4b8b6508e276f8f616e94febcc43623a92899a1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/e4b8b6508e276f8f616e94febcc43623a92899a1/tableview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
3276,
12,
2890,
16,
871,
4672,
365,
18,
92,
16,
365,
18,
93,
273,
365,
18,
3413,
1945,
18,
6587,
67,
869,
67,
3413,
67,
9076,
12,
474,
12,
2575,
18,
92,
3631,
509,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
3276,
12,
2890,
16,
871,
4672,
365,
18,
92,
16,
365,
18,
93,
273,
365,
18,
3413,
1945,
18,
6587,
67,
869,
67,
3413,
67,
9076,
12,
474,
12,
2575,
18,
92,
3631,
509,
12,
... |
return ('%s:long=%s' % (name, val))[:-1] | value = '%s:long=%s' % (name, val) if value[-1] == 'L': value = value[:-1] return value | def marshal_long(name, val): return ('%s:long=%s' % (name, val))[:-1] | 88b382e19a7e63e371061c2940287e174024e478 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/88b382e19a7e63e371061c2940287e174024e478/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10893,
67,
5748,
12,
529,
16,
1244,
4672,
460,
273,
1995,
87,
30,
5748,
5095,
87,
11,
738,
261,
529,
16,
1244,
13,
309,
460,
18919,
21,
65,
422,
296,
48,
4278,
460,
273,
460,
10531,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10893,
67,
5748,
12,
529,
16,
1244,
4672,
460,
273,
1995,
87,
30,
5748,
5095,
87,
11,
738,
261,
529,
16,
1244,
13,
309,
460,
18919,
21,
65,
422,
296,
48,
4278,
460,
273,
460,
10531,
... |
else: | elif("PYTHONVERSION" in SDK): | def parseopts(args): global INSTALLER,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT longopts = [ "help","distributor=","verbose", "optimize=","everything","nothing","installer","runtime", "version=","lzma","no-python","threads=","outputdir="] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break anything = 1 except: usage(0) if (anything==0): usage(0) if (optimize=="" and RUNTIME): optimize = "4" elif (optimize==""): optimize = "3" try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE") | 000bd6093568c0ea7d8d1fe704b359cea8affbd8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/000bd6093568c0ea7d8d1fe704b359cea8affbd8/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
22880,
4685,
654,
16,
54,
25375,
16,
16652,
9560,
16,
2565,
27424,
1693,
916,
2552,
8456,
16,
4208,
22526,
916,
16,
21730,
7240,
1525,
4952,
273,
306,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
22880,
4685,
654,
16,
54,
25375,
16,
16652,
9560,
16,
2565,
27424,
1693,
916,
2552,
8456,
16,
4208,
22526,
916,
16,
21730,
7240,
1525,
4952,
273,
306,
3... |
self._read() | self._read(readsize) readsize = readsize * 2 | def read(self,size=None): | f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
1467,
33,
7036,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
1467,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not chars: return self.tk.call(self._w, 'column', 'width', col, width) else: return self.tk.call(self._w, 'column', 'width', col, '-char', chars) | if not chars: return self.tk.call(self._w, 'column', 'width', col, width) else: return self.tk.call(self._w, 'column', 'width', col, '-char', chars) | def column_width(self, col=0, width=None, chars=None): | 0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1057,
67,
2819,
12,
2890,
16,
645,
33,
20,
16,
1835,
33,
7036,
16,
5230,
33,
7036,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
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,
1057,
67,
2819,
12,
2890,
16,
645,
33,
20,
16,
1835,
33,
7036,
16,
5230,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return a, d, port | return a.lower(), d, port | def parse_mechanism(str, d): """Breaks A, MX, IP4, and PTR mechanisms into a (name, domain, cidr) tuple. The domain portion defaults to d if not present, the cidr defaults to 32 if not present. Examples: >>> parse_mechanism('a', 'foo.com') ('a', 'foo.com', 32) >>> parse_mechanism('a:bar.com', 'foo.com') ('a', 'bar.com', 32) >>> parse_mechanism('a/24', 'foo.com') ('a', 'foo.com', 24) >>> parse_mechanism('a:bar.com/16', 'foo.com') ('a', 'bar.com', 16) """ a = str.split('/') if len(a) == 2: a, port = a[0], int(a[1]) else: a, port = str, 32 b = a.split(':') if len(b) == 2: return b[0], b[1], port else: return a, d, port | 8ad4b16156cfbaa11f22f77430b55af7820cc3e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/139/8ad4b16156cfbaa11f22f77430b55af7820cc3e8/spf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3501,
10641,
12,
701,
16,
302,
4672,
3536,
26806,
432,
16,
26929,
16,
2971,
24,
16,
471,
453,
4349,
1791,
28757,
1368,
279,
261,
529,
16,
2461,
16,
15323,
13,
3193,
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,
1109,
67,
3501,
10641,
12,
701,
16,
302,
4672,
3536,
26806,
432,
16,
26929,
16,
2971,
24,
16,
471,
453,
4349,
1791,
28757,
1368,
279,
261,
529,
16,
2461,
16,
15323,
13,
3193,
18,
225,
... |
addSkin('skin_display96.xml') | if addSkin('skin_display96.xml'): print "[SKIN] Color OLED" display_skin_id = 2 | def addSkin(name, scope = SCOPE_SKIN): # read the skin filename = resolveFilename(scope, name) if fileExists(filename): mpath = os.path.dirname(filename) + "/" dom_skins.append((mpath, xml.etree.cElementTree.parse(filename).getroot())) | ac65d1659e41f6a0153f32ba8d61ca77bb63cade /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/ac65d1659e41f6a0153f32ba8d61ca77bb63cade/skin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
26827,
12,
529,
16,
2146,
273,
19296,
67,
11129,
706,
4672,
468,
855,
326,
18705,
1544,
273,
2245,
5359,
12,
4887,
16,
508,
13,
309,
27279,
12,
3459,
4672,
312,
803,
273,
1140,
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,
527,
26827,
12,
529,
16,
2146,
273,
19296,
67,
11129,
706,
4672,
468,
855,
326,
18705,
1544,
273,
2245,
5359,
12,
4887,
16,
508,
13,
309,
27279,
12,
3459,
4672,
312,
803,
273,
1140,
18... |
if groupFid != cell.fid: raise ModError(self.inName,'Cell subgroup (%s) does not match CELL <%s> %s.' % (hex(groupFid), hex(cell.fid), cell.eid)) | def loadData(self,ins,endPos): """Loads data from input stream. Called by load().""" cellType_class = self.loadFactory.getCellTypeClass() recCellClass = self.loadFactory.getRecClass('CELL') errLabel = 'World Block' cell = None block = None subblock = None cellBlocks = self.cellBlocks unpackCellBlocks = self.loadFactory.getUnpackCellBlocks('WRLD') insAtEnd = ins.atEnd insRecHeader = ins.unpackRecHeader cellGet = cellType_class.get insSeek = ins.seek insTell = ins.tell selfLoadFactory = self.loadFactory cellBlocksAppend = cellBlocks.append structUnpack = struct.unpack structPack = struct.pack while not insAtEnd(endPos,errLabel): #--Get record info and handle it header = insRecHeader() recType = header[0] recClass = cellGet(recType) if recType == 'ROAD': if not recClass: insSeek(header[1],1) else: self.road = recClass(header,ins,True) elif recType == 'CELL': if cell: cellBlock = MobCell(header,selfLoadFactory,cell) if block: cellBlocksAppend(cellBlock) else: if self.worldCellBlock: raise ModError(self.inName,'Extra exterior cell <%s> %s before block group.' % (hex(cell.fid), cell.eid)) self.worldCellBlock = cellBlock cell = recClass(header,ins,True) if block: if insTell() > endBlockPos or insTell() > endSubblockPos: raise ModError(self.inName,'Exterior cell <%s> %s after block or' ' subblock.' % (hex(cell.fid), cell.eid)) elif recType == 'GRUP': size,groupFid,groupType = header[1:4] if groupType == 4: # Exterior Cell Block block = structUnpack('2h',structPack('I',groupFid)) block = (block[1],block[0]) endBlockPos = insTell() + size - 24 elif groupType == 5: # Exterior Cell Sub-Block subblock = structUnpack('2h',structPack('I',groupFid)) subblock = (subblock[1],subblock[0]) endSubblockPos = insTell() + size - 24 elif groupType == 6: # Cell Children if cell: if groupFid != cell.fid: raise ModError(self.inName,'Cell subgroup (%s) does not match CELL <%s> %s.' % (hex(groupFid), hex(cell.fid), cell.eid)) if unpackCellBlocks: cellBlock = MobCell(header,selfLoadFactory,cell,ins,True) else: cellBlock = MobCell(header,selfLoadFactory,cell) insSeek(header[1]-24,1) if block: cellBlocksAppend(cellBlock) else: if self.worldCellBlock: raise ModError(self.inName,'Extra exterior cell <%s> %s before block group.' % (hex(cell.fid), cell.eid)) self.worldCellBlock = cellBlock cell = None else: raise ModError(self.inName,'Extra cell children subgroup in world children group.') else: raise ModError(self.inName,'Unexpected subgroup %d in world children group.' % groupType) else: raise ModError(self.inName,'Unexpected %s record in world children group.' % recType) if block and insTell() == endBlockPos: cell = subblock = block = None elif subblock and insTell() == endSubblockPos: cell = subblock = None self.setChanged() | 536035b8b2f5ce4ff087dfd95532b3bcb08fa52f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/536035b8b2f5ce4ff087dfd95532b3bcb08fa52f/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29422,
12,
2890,
16,
2679,
16,
409,
1616,
4672,
3536,
7968,
501,
628,
810,
1407,
18,
11782,
635,
1262,
1435,
12123,
2484,
559,
67,
1106,
273,
365,
18,
945,
1733,
18,
588,
4020,
559,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29422,
12,
2890,
16,
2679,
16,
409,
1616,
4672,
3536,
7968,
501,
628,
810,
1407,
18,
11782,
635,
1262,
1435,
12123,
2484,
559,
67,
1106,
273,
365,
18,
945,
1733,
18,
588,
4020,
559,
79... | |
if content.startswith("<?"): content = content.split(">", 1)[1] return xml(content) | return xml(XML.toString(content.childNodes[0])) | def formatItem(self, content): # Format one message. The hackishness here chops off XML declarations # if they are present. It would be much cleaner but much slower to use the DOM for this. if content.startswith("<?"): content = content.split(">", 1)[1] return xml(content) | 67e833172097e3b5c71e40f6904f7f0896b7493b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/67e833172097e3b5c71e40f6904f7f0896b7493b/Feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
1180,
12,
2890,
16,
913,
4672,
468,
4077,
1245,
883,
18,
1021,
11769,
1468,
4496,
2674,
462,
4473,
3397,
3167,
12312,
468,
309,
2898,
854,
3430,
18,
2597,
4102,
506,
9816,
25933,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
1180,
12,
2890,
16,
913,
4672,
468,
4077,
1245,
883,
18,
1021,
11769,
1468,
4496,
2674,
462,
4473,
3397,
3167,
12312,
468,
309,
2898,
854,
3430,
18,
2597,
4102,
506,
9816,
25933,
14... |
raise error, 'option -%s not recognized' % opt | raise GetoptError('option -%s not recognized' % opt, opt) | def short_has_arg(opt, shortopts): for i in range(len(shortopts)): if opt == shortopts[i] != ':': return shortopts[i+1:i+2] == ':' raise error, 'option -%s not recognized' % opt | 810f676cda94b50e65c06958c0bb2550e02a67cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/810f676cda94b50e65c06958c0bb2550e02a67cd/getopt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3025,
67,
5332,
67,
3175,
12,
3838,
16,
3025,
4952,
4672,
364,
277,
316,
1048,
12,
1897,
12,
6620,
4952,
3719,
30,
309,
2153,
422,
3025,
4952,
63,
77,
65,
480,
3921,
30,
327,
3025,
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,
3025,
67,
5332,
67,
3175,
12,
3838,
16,
3025,
4952,
4672,
364,
277,
316,
1048,
12,
1897,
12,
6620,
4952,
3719,
30,
309,
2153,
422,
3025,
4952,
63,
77,
65,
480,
3921,
30,
327,
3025,
4... |
y_values = np.ma.masked_all(2 *self.width) | y_values = np.ma.masked_all(2 *self.width) | def __plotMinMax(self, trace, *args, **kwargs): """ Plots the data using a min/max approach that calculated the minimum and maximum values of each "pixel" and than plots only these values. Works much faster with large data sets. """ # Some variables to help calculate the values. starttime = self.starttime.timestamp endtime = self.endtime.timestamp # The same trace will always have the same sampling_rate. sampling_rate = trace[0].stats.sampling_rate # The samples per resulting pixel. pixel_length = int((endtime - starttime) / self.width * sampling_rate) # Loop over all the traces. Do not merge them as there are many samples # and therefore merging would be slow. for _i, _t in enumerate(trace): # Get the start of the next pixel in case the starttime of the # trace does not match the starttime of the plot. ts = _t.stats.starttime if ts > self.starttime: start = int(ceil(((ts - self.starttime) * \ sampling_rate) / pixel_length)) # Samples before start. prestart = int(((self.starttime + start * pixel_length / sampling_rate) - ts) * sampling_rate) else: start = 0 # Figure out the number of pixels in the current trace. length = len(_t.data) - start pixel_count = int(length // pixel_length) rest = int(length % pixel_length) # Reference to new data array which does not copy data but is # reshapeable. data = _t.data[start: start + pixel_count * pixel_length] data = data.reshape(pixel_count, pixel_length) # Calculate extreme_values and put them into new array. extreme_values = np.ma.masked_all((self.width, 2), dtype=np.float) min = data.min(axis=1) max = data.max(axis=1) extreme_values[start: start + pixel_count, 0] = min extreme_values[start: start + pixel_count, 1] = max # First and last and last pixel need separate treatment. if start and prestart: extreme_values[start - 1, 0] = _t.data[:prestart].min() extreme_values[start - 1, 1] = _t.data[:prestart].max() if rest: if start + pixel_count == self.width: index = self.width - 1 else: index = start + pixel_count extreme_values[index, 0] = _t.data[-rest:].min() extreme_values[index, 1] = _t.data[-rest:].max() # Use the first array as a reference and merge all following # extreme_values into it. if _i == 0: minmax = extreme_values else: # Merge minmax and extreme_values. min = np.ma.empty((self.width, 2)) max = np.ma.empty((self.width, 2)) # Fill both with the values. min[:, 0] = minmax[:, 0] min[:, 1] = extreme_values[:, 0] max[:, 0] = minmax[:, 1] max[:, 1] = extreme_values[:, 1] # Find the minimum and maximum values. min = min.min(axis=1) max = max.max(axis=1) # Write again to minmax. minmax[:, 0] = min minmax[:, 1] = max # Write to self.stats. self.stats.append([trace[0].id, minmax.mean(), minmax[:, 0].min(), minmax[:, 1].max()]) # Finally plot the data. x_values = np.empty(2 * self.width) aranged = np.arange(self.width) x_values[0::2] = aranged x_values[1::2] = aranged # Initialze completely masked array. This version is a little bit # slower than first creating an empty array and then setting the mask # to True. But on numpy 1.1 this results in a 0-D array which can not # be indexed. y_values = np.ma.masked_all(2 *self.width) y_values[0::2] = minmax[:, 0] y_values[1::2] = minmax[:, 1] plt.plot(x_values, y_values, color=self.color) # Set the x-limit to avoid clipping of masked values. plt.xlim(0, self.width - 1) | ac0468b3b204e42963e836956a78c9c18fddeffc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/ac0468b3b204e42963e836956a78c9c18fddeffc/waveform.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4032,
17454,
12,
2890,
16,
2606,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
3008,
6968,
326,
501,
1450,
279,
1131,
19,
1896,
17504,
716,
8894,
326,
5224,
471,
4207,
924,
434,
1517,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4032,
17454,
12,
2890,
16,
2606,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
3008,
6968,
326,
501,
1450,
279,
1131,
19,
1896,
17504,
716,
8894,
326,
5224,
471,
4207,
924,
434,
1517,... |
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect((host, port)) | self.sock = socket.create_connection((host, port)) | def open(self, host = '', port = IMAP4_SSL_PORT): """Setup connection to remote server on "host:port". (default: localhost:standard IMAP4 SSL port). This connection will be used by the routines: read, readline, send, shutdown. """ self.host = host self.port = port self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect((host, port)) self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile) | 9669672101aaf11392963a68f7c9f904047b181d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/9669672101aaf11392963a68f7c9f904047b181d/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
1479,
273,
10226,
1756,
273,
6246,
2203,
24,
67,
6745,
67,
6354,
4672,
3536,
7365,
1459,
358,
2632,
1438,
603,
315,
2564,
30,
655,
9654,
261,
1886,
30,
17365,
30,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
1479,
273,
10226,
1756,
273,
6246,
2203,
24,
67,
6745,
67,
6354,
4672,
3536,
7365,
1459,
358,
2632,
1438,
603,
315,
2564,
30,
655,
9654,
261,
1886,
30,
17365,
30,
1... |
def __init__(self, name, mode=RTLD_LOCAL, handle=None): | def __init__(self, name, mode=DEFAULT_MODE, handle=None): | def __init__(self, name, mode=RTLD_LOCAL, handle=None): self._name = name if handle is None: self._handle = _dlopen(self._name, mode) else: self._handle = handle | 9febfd29da67191fd9cde635fc60d61a71105c07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9febfd29da67191fd9cde635fc60d61a71105c07/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
1965,
33,
5280,
67,
7038,
16,
1640,
33,
7036,
4672,
365,
6315,
529,
273,
508,
309,
1640,
353,
599,
30,
365,
6315,
4110,
273,
389,
72,
18589,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
1965,
33,
5280,
67,
7038,
16,
1640,
33,
7036,
4672,
365,
6315,
529,
273,
508,
309,
1640,
353,
599,
30,
365,
6315,
4110,
273,
389,
72,
18589,
1... |
self.work_stream[idx] = (ws,w) | self.work_stream[idx] = ws,w | def read_works(self, ws): """ read works from a work_stream """ works = ws.read_works() if ws.closed: del self.streams[ws] t = self.server.cur_time() for w in works: # FIXIT: track which work came from which stream, # so we can call appropriate finish function idx = self.idx w.init2(idx, t, self.server) self.work_stream[idx] = (ws,w) self.idx = idx + 1 return works | c89dfbb082f3fee0737301e8c81aaa7959b3a032 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/924/c89dfbb082f3fee0737301e8c81aaa7959b3a032/gxp_js.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
18597,
12,
2890,
16,
4945,
4672,
3536,
855,
6330,
628,
279,
1440,
67,
3256,
3536,
6330,
273,
4945,
18,
896,
67,
18597,
1435,
309,
4945,
18,
12204,
30,
1464,
365,
18,
16320,
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,
855,
67,
18597,
12,
2890,
16,
4945,
4672,
3536,
855,
6330,
628,
279,
1440,
67,
3256,
3536,
6330,
273,
4945,
18,
896,
67,
18597,
1435,
309,
4945,
18,
12204,
30,
1464,
365,
18,
16320,
63... |
%s \1 | %s (?P=quote) | def build_table_row(self, rowdata, tableline): row = nodes.row() for cell in rowdata: if cell is None: continue morerows, morecols, offset, cellblock = cell attributes = {} if morerows: attributes['morerows'] = morerows if morecols: attributes['morecols'] = morecols entry = nodes.entry(**attributes) row += entry if ''.join(cellblock): self.nested_parse(cellblock, input_offset=tableline+offset, node=entry) return row | 9aa86b66cf632d24cd8412c352ecb461084727da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/9aa86b66cf632d24cd8412c352ecb461084727da/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
2121,
67,
492,
12,
2890,
16,
1027,
892,
16,
3246,
80,
3027,
4672,
1027,
273,
2199,
18,
492,
1435,
364,
2484,
316,
1027,
892,
30,
309,
2484,
353,
599,
30,
1324,
312,
8922,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
2121,
67,
492,
12,
2890,
16,
1027,
892,
16,
3246,
80,
3027,
4672,
1027,
273,
2199,
18,
492,
1435,
364,
2484,
316,
1027,
892,
30,
309,
2484,
353,
599,
30,
1324,
312,
8922,
5... |
self.body_html = unicode(Markdown(self.body, safe_mode='escape')) | instance = Markdown(safe_mode='escape') self.body_html = unicode(instance.convert(self.body)) | def render(self): if self.markup == 'bbcode': self.body_html = mypostmarkup.markup(self.body, auto_urls=False) elif self.markup == 'markdown': self.body_html = unicode(Markdown(self.body, safe_mode='escape')) else: raise Exception('Invalid markup property: %s' % self.markup) | b2ac73dce0428040de475cdae430a45bfdb39622 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12938/b2ac73dce0428040de475cdae430a45bfdb39622/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
309,
365,
18,
15056,
422,
296,
9897,
710,
4278,
365,
18,
3432,
67,
2620,
273,
312,
879,
669,
15056,
18,
15056,
12,
2890,
18,
3432,
16,
3656,
67,
10518,
33,
8381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
309,
365,
18,
15056,
422,
296,
9897,
710,
4278,
365,
18,
3432,
67,
2620,
273,
312,
879,
669,
15056,
18,
15056,
12,
2890,
18,
3432,
16,
3656,
67,
10518,
33,
8381,
... |
self.send = self.write = Connection._write_bio self.recv = self.read = Connection._read_bio | self.send = self.write = _write_bio self.recv = self.read = _read_bio | def setblocking(self, mode): """Set this connection's underlying socket to _mode_.""" self.socket.setblocking(mode) if mode: self.send = self.write = Connection._write_bio self.recv = self.read = Connection._read_bio else: self.send = self.write = Connection._write_nbio self.recv = self.read = Connection._read_nbio | a2ed5825423810afd80873dc0f666a6e41e3445e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/a2ed5825423810afd80873dc0f666a6e41e3445e/Connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
18926,
12,
2890,
16,
1965,
4672,
3536,
694,
333,
1459,
1807,
6808,
2987,
358,
389,
3188,
67,
12123,
365,
18,
7814,
18,
542,
18926,
12,
3188,
13,
309,
1965,
30,
365,
18,
4661,
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,
444,
18926,
12,
2890,
16,
1965,
4672,
3536,
694,
333,
1459,
1807,
6808,
2987,
358,
389,
3188,
67,
12123,
365,
18,
7814,
18,
542,
18926,
12,
3188,
13,
309,
1965,
30,
365,
18,
4661,
273,... |
sys.stderr.write("JABBER: Couldn't connect to %s: %s\n" % (server,e)) | sys.stderr.write("JABBER: Couldn't connect to %s: network error\n" % server) | def __init__(self): # Read username, password, server, resource and nickname from # config file. If they're not found, prompt the user for # them. config = howie.configFile.get() try: username = config['jabber.username'] if username == "": raise KeyError except KeyError: username = raw_input("Jabber Username: ") try: password = config['jabber.password'] if password == "": raise KeyError except KeyError: password = getpass.getpass("Jabber password for %s: " % username) try: server = config['jabber.server'] if server == "": raise KeyError except KeyError: server = raw_input("Jabber Server: ") try: resource = config['jabber.resource'] if resource == "": raise KeyError except KeyError: resource = raw_input("Jabber Resource: ") self._jid = "%s@%s/%s" % (username,server,resource) try: nickname = config['jabber.nickname'] if nickname == "": raise KeyError except KeyError: nickname = raw_input("Jabber Nickname for %s: " % self._jid) # Read max delay try: self._maxdelay = int(config['general.maxdelay']) except KeyError: self._maxdelay = 0 | ac604d78c291f67fa935686243493da7ba5e52e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13130/ac604d78c291f67fa935686243493da7ba5e52e1/jabber.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
468,
2720,
2718,
16,
2201,
16,
1438,
16,
1058,
471,
19570,
628,
468,
642,
585,
18,
225,
971,
2898,
4565,
486,
1392,
16,
6866,
326,
729,
364,
468,
2182,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
468,
2720,
2718,
16,
2201,
16,
1438,
16,
1058,
471,
19570,
628,
468,
642,
585,
18,
225,
971,
2898,
4565,
486,
1392,
16,
6866,
326,
729,
364,
468,
2182,... |
a = self.o.assy.findAtomUnderMouse(event, self.water_enabled, singlet_ok = True) | obj = self.o.assy.findAtomUnderMouse(event, self.water_enabled, singlet_ok = True) | def get_obj_under_cursor(self, event): '''Return the object under the cursor. Only atoms, singlets and bonds are returned. Returns None for all other cases, including when a bond, jig or nothing is under the cursor. ''' if self.hover_highlighting_enabled: self.update_selatom(event) #bruce 041130 in case no update_selatom happened yet # update_selatom() updates self.o.selatom and self.o.selobj. # self.o.selatom is either a real atom or a singlet. # self.o.selobj can be a bond, and is used in leftUp() to determine if a bond was selected. # Warning: if there was no GLPane repaint event (i.e. paintGL call) since the last bareMotion, # update_selatom can't make selobj/selatom correct until the next time paintGL runs. # Therefore, the present value might be out of date -- but it does correspond to whatever # highlighting is on the screen, so whatever it is should not be a surprise to the user, # so this is not too bad -- the user should wait for the highlighting to catch up to the mouse # motion before pressing the mouse. [bruce 050705 comment] a = self.o.selatom # a "highlighted" atom or singlet if a is None and self.o.selobj: a = self.o.selobj # a "highlighted" bond else: # No hover highlighting a = self.o.assy.findAtomUnderMouse(event, self.water_enabled, singlet_ok = True) # Note: findAtomUnderMouse() only returns atoms and singlets, not bonds or jigs. # This means that bonds can never be selected when highlighting is turned off. return a | e4a846430da32f8219706ecaa3f18f53cca635c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/e4a846430da32f8219706ecaa3f18f53cca635c5/selectMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2603,
67,
9341,
67,
9216,
12,
2890,
16,
871,
4672,
9163,
990,
326,
733,
3613,
326,
3347,
18,
225,
5098,
9006,
16,
4864,
17307,
471,
15692,
854,
2106,
18,
2860,
599,
364,
777,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2603,
67,
9341,
67,
9216,
12,
2890,
16,
871,
4672,
9163,
990,
326,
733,
3613,
326,
3347,
18,
225,
5098,
9006,
16,
4864,
17307,
471,
15692,
854,
2106,
18,
2860,
599,
364,
777,
... |
raise 'InvalidRequestError' | raise InvalidRequestError | def resetPassword(self, userid, randomstring, password): """Set the password (in 'password') for the user who maps to the string in 'randomstring' iff the entered 'userid' is equal to the mapped userid. (This can be turned off with the 'toggleUserCheck' method.) | 489bf001853502ab2475f5de200186dc8fe65457 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12219/489bf001853502ab2475f5de200186dc8fe65457/PasswordResetTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
3913,
12,
2890,
16,
6709,
16,
2744,
1080,
16,
2201,
4672,
3536,
694,
326,
2201,
261,
267,
296,
3664,
6134,
364,
326,
729,
10354,
7565,
358,
326,
533,
316,
296,
9188,
1080,
11,
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,
2715,
3913,
12,
2890,
16,
6709,
16,
2744,
1080,
16,
2201,
4672,
3536,
694,
326,
2201,
261,
267,
296,
3664,
6134,
364,
326,
729,
10354,
7565,
358,
326,
533,
316,
296,
9188,
1080,
11,
21... |
def DailySiteJobStatus(begin,end,select = "", count = ""): | def DailySiteJobStatus(begin,end,select = "", count = "", what = "CETable.facility_name" ): | def DailySiteJobStatus(begin,end,select = "", count = ""): schema = "gratia" select = " SELECT CETable.facility_name ,J.Status,count(*) " \ + " from "+schema+".CETable, "+schema+".CEProbes, "+schema+".JobUsageRecord J " \ + " where CEProbes.facility_id = CETable.facility_id and J.ProbeName = CEProbes.probename" \ + " and \""+ DateToString(begin) +"\"<EndTime and EndTime<\"" + DateToString(end) + "\"" \ + select \ + " group by J.ProbeName,J.Status " \ + " order by CETable.facility_name " return RunQueryAndSplit(select) | 55368fa17dc9f81d3651509634f0008b9277083b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/55368fa17dc9f81d3651509634f0008b9277083b/PSACCTReport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
463,
12857,
4956,
23422,
12,
10086,
16,
409,
16,
4025,
273,
23453,
1056,
273,
23453,
4121,
273,
315,
1441,
1388,
18,
11639,
1889,
67,
529,
6,
262,
30,
1963,
273,
315,
3197,
270,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
463,
12857,
4956,
23422,
12,
10086,
16,
409,
16,
4025,
273,
23453,
1056,
273,
23453,
4121,
273,
315,
1441,
1388,
18,
11639,
1889,
67,
529,
6,
262,
30,
1963,
273,
315,
3197,
270,
1155,
... |
contents = '' for item in funcs: contents = contents + self.document(item) + '\n' result = result + self.section('FUNCTIONS', contents) | contents = [] for key, value in funcs: contents.append(self.document(value, key)) result = result + self.section('FUNCTIONS', join(contents, '\n')) | def docmodule(self, object): """Produce text documentation for a given module object.""" result = '' | 54a838fe1421d6e6829cabc42e7f398722140804 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/54a838fe1421d6e6829cabc42e7f398722140804/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
4672,
3536,
25884,
977,
7323,
364,
279,
864,
1605,
733,
12123,
563,
273,
875,
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,
997,
2978,
12,
2890,
16,
733,
4672,
3536,
25884,
977,
7323,
364,
279,
864,
1605,
733,
12123,
563,
273,
875,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
args = [arg.findtext('Name') for arg in ribArgs(procXml.findall('Arguments/Argument'))] | args = [arg.findtext('Name') for arg in ribArgs(procXml)] | def wrapperCallArgList(procXml): args = [arg.findtext('Name') for arg in ribArgs(procXml.findall('Arguments/Argument'))] if procXml.findall('Arguments/ParamList'): args += ['pList'] return args | c43c7a3fda00ec17f2b2144eafba3a324e5363ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11560/c43c7a3fda00ec17f2b2144eafba3a324e5363ce/codegenutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4053,
1477,
4117,
682,
12,
9381,
4432,
4672,
833,
273,
306,
3175,
18,
4720,
955,
2668,
461,
6134,
364,
1501,
316,
436,
495,
2615,
12,
9381,
4432,
25887,
309,
5418,
4432,
18,
4720,
454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4053,
1477,
4117,
682,
12,
9381,
4432,
4672,
833,
273,
306,
3175,
18,
4720,
955,
2668,
461,
6134,
364,
1501,
316,
436,
495,
2615,
12,
9381,
4432,
25887,
309,
5418,
4432,
18,
4720,
454,
... |
groups.append(row['name']) | groups.append(row['name'] or '') | def get_groups(self, by='component'): cursor = self.db.cursor () groups = [] if by in ['status', 'resolution', 'severity', 'priority']: cursor.execute("SELECT name FROM enum WHERE type = %s " "AND name != '' ORDER BY value", by) elif by in ['component', 'milestone', 'version']: cursor.execute("SELECT name FROM %s " "WHERE name != '' ORDER BY name" % by) elif by == 'owner': cursor.execute("SELECT DISTINCT owner AS name FROM ticket " "ORDER BY owner") elif by not in Ticket.std_fields: fields = get_custom_fields(self.env) field = [f for f in fields if f['name'] == by] if not field: return [] return [o for o in field[0]['options'] if o != ''] while 1: row = cursor.fetchone() if not row: break groups.append(row['name']) return groups | d95d4c5c2c377d42ef48039a5a4aebe475bde190 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/d95d4c5c2c377d42ef48039a5a4aebe475bde190/Milestone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4650,
12,
2890,
16,
635,
2218,
4652,
11,
4672,
3347,
273,
365,
18,
1966,
18,
9216,
1832,
3252,
273,
5378,
309,
635,
316,
10228,
2327,
2187,
296,
19182,
2187,
296,
27341,
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,
336,
67,
4650,
12,
2890,
16,
635,
2218,
4652,
11,
4672,
3347,
273,
365,
18,
1966,
18,
9216,
1832,
3252,
273,
5378,
309,
635,
316,
10228,
2327,
2187,
296,
19182,
2187,
296,
27341,
2187,
... |
print s, "GREATER THAN", o | def compareURI(self, other): if self is other: return 0 if isinstance(self, Literal): if isinstance(other, Literal): return cmp(self.string, other.string) else: return -1 if isinstance(other, Literal): return 1 # Both regular URIs _type = "<" + notation3.RDF_type_URI + ">" s = self.representation() if s == _type: return -1 o = other.representation() if o == _type: return 1 if s < o : print s, "LESS THAN", o return -1 if s > o : print s, "GREATER THAN", o return 1 raise internalError # Strings should not match if not same object | 7c2dbeca25d6c43fdda7cd3ab49f5845c966025e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/7c2dbeca25d6c43fdda7cd3ab49f5845c966025e/cwm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
3098,
12,
2890,
16,
1308,
4672,
309,
365,
353,
1308,
30,
327,
374,
309,
1549,
12,
2890,
16,
14392,
4672,
309,
1549,
12,
3011,
16,
14392,
4672,
327,
9411,
12,
2890,
18,
1080,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
3098,
12,
2890,
16,
1308,
4672,
309,
365,
353,
1308,
30,
327,
374,
309,
1549,
12,
2890,
16,
14392,
4672,
309,
1549,
12,
3011,
16,
14392,
4672,
327,
9411,
12,
2890,
18,
1080,
16,
... | |
benchmarks = [r.benchmark for r in q.fetch(1000)] | benchmarks = [r.benchmark for r in q] | def benchmark_list(): q = BenchmarkResults.all() q.order('__key__') q.filter('builder = ', u'darwin-amd64') benchmarks = [r.benchmark for r in q.fetch(1000)] q = BenchmarkResults.all() q.order('__key__') q.filter('benchmark =', u'math_test.BenchmarkSqrt') builders = [r.builder for r in q.fetch(100)] return benchmarks, builders | 407356aa69c95431d242566af29fc9f201ed96df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5761/407356aa69c95431d242566af29fc9f201ed96df/gobuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14128,
67,
1098,
13332,
1043,
273,
21854,
3447,
18,
454,
1435,
1043,
18,
1019,
2668,
972,
856,
972,
6134,
1043,
18,
2188,
2668,
9574,
273,
2265,
582,
14271,
19992,
17,
301,
72,
1105,
613... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14128,
67,
1098,
13332,
1043,
273,
21854,
3447,
18,
454,
1435,
1043,
18,
1019,
2668,
972,
856,
972,
6134,
1043,
18,
2188,
2668,
9574,
273,
2265,
582,
14271,
19992,
17,
301,
72,
1105,
613... |
self.assertEqual(fcmp(float(" .25e-1 "), .025), 0) | self.assertEqual(test_support.fcmp(float(" .25e-1 "), .025), 0) | def test_float_with_comma(self): # set locale to something that doesn't use '.' for the decimal point # float must not accept the locale specific decimal point but # it still has to accept the normal python syntac import locale if not locale.localeconv()['decimal_point'] == ',': return | aea957843a4252a5177135070b93362d846c8e80 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/aea957843a4252a5177135070b93362d846c8e80/test_float.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5659,
67,
1918,
67,
25034,
12,
2890,
4672,
468,
444,
2573,
358,
5943,
716,
3302,
1404,
999,
2611,
364,
326,
6970,
1634,
468,
1431,
1297,
486,
2791,
326,
2573,
2923,
6970,
1634,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5659,
67,
1918,
67,
25034,
12,
2890,
4672,
468,
444,
2573,
358,
5943,
716,
3302,
1404,
999,
2611,
364,
326,
6970,
1634,
468,
1431,
1297,
486,
2791,
326,
2573,
2923,
6970,
1634,... |
</table>'''%cgi.escape(''.join(traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)))) | </table>''' % (_('Full traceback:'), cgi.escape(''.join( traceback.format_exception(*sys.exc_info()) )))) | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for frame, file, lnum, func, lines, index in t: args, varargs, varkw, locals = inspect.getargvalues(frame) if locals.has_key('__traceback_info__'): ti = locals['__traceback_info__'] if isinstance(ti, TraversalError): s = [] for name, info in ti.path: s.append('<li>"%s" (%s)</li>'%(name, esc(repr(info)))) s = '\n'.join(s) l.append('<li>Looking for "%s", current path:<ol>%s</ol></li>'%( ti.name, s)) else: l.append('<li>In %s</li>'%esc(str(ti))) if locals.has_key('__traceback_supplement__'): ts = locals['__traceback_supplement__'] if len(ts) == 2: supp, context = ts s = 'A problem occurred in your template "%s".'%str(context.id) if context._v_errors: s = s + '<br>' + '<br>'.join( [esc(x) for x in context._v_errors]) l.append('<li>%s</li>'%s) elif len(ts) == 3: supp, context, info = ts l.append(''' | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5818,
67,
2620,
12,
2472,
33,
25,
4672,
2904,
273,
276,
10052,
18,
6939,
328,
273,
10228,
32,
76,
21,
34,
26033,
1776,
1068,
1757,
76,
21,
1870,
16,
2368,
84,
4438,
70,
9822,
87,
175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5818,
67,
2620,
12,
2472,
33,
25,
4672,
2904,
273,
276,
10052,
18,
6939,
328,
273,
10228,
32,
76,
21,
34,
26033,
1776,
1068,
1757,
76,
21,
1870,
16,
2368,
84,
4438,
70,
9822,
87,
175... |
site = ceToSite[gatekeeper] mergeThresh = self.siteThresholds[site]["mergeThreshold"] test = idle - mergeThresh | msg="mergeInfo: %s"%str(mergeInfo) logging.debug(msg) msg="gatekeeper: %s"%gatekeeper logging.debug(msg) if ceToSite.get(gatekeeper): site = ceToSite[gatekeeper] mergeThresh = self.siteThresholds[site]["mergeThreshold"] test = idle - mergeThresh msg="CondorMonitor Merge: Site=%s, Idle=%s, Thresh=%s, Test=%s"%(site,idle,mergeThresh,test) logging.debug(msg) | def __call__(self): result = [] # // # // get list of all active gatekeepers from DB info #// activeGatekeepers = [ self.allSites[x]['CEName'] for x in self.activeSites ] | 74d0e5c2e0ed6081ca29c5fde17459e315e2f3ad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/74d0e5c2e0ed6081ca29c5fde17459e315e2f3ad/CondorMonitor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
563,
273,
5378,
468,
225,
368,
468,
368,
336,
666,
434,
777,
2695,
12611,
10102,
414,
628,
2383,
1123,
468,
759,
2695,
13215,
10102,
414,
273,
306,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
563,
273,
5378,
468,
225,
368,
468,
368,
336,
666,
434,
777,
2695,
12611,
10102,
414,
628,
2383,
1123,
468,
759,
2695,
13215,
10102,
414,
273,
306,
365,
... |
self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions"], | self["status"] = StaticText("") self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions"], | def __init__(self, session, args = 0): Screen.__init__(self, session) self.skin_path = plugin_path self.menu = args self.list = [] self.oktext = _("\nPress OK on your remote control to continue.") self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value ) if self.menu == 0: self.list.append(("software-update", _("Software update"), _("\nOnline update of your Dreambox software." ) + self.oktext, None)) #self.list.append(("install-plugins", _("Install extensions"), _("\nInstall new Extensions or Plugins to your dreambox" ) + self.oktext, None)) self.list.append(("software-restore", _("Software restore"), _("\nRestore your Dreambox with a new firmware." ) + self.oktext, None)) self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your Dreambox settings." ) + self.oktext, None)) self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your Dreambox settings." ) + self.oktext, None)) self.list.append(("ipkg-install", _("Install local extension"), _("\nScan for local packages and install them." ) + self.oktext, None)) for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER): if p.__call__.has_key("SoftwareSupported"): callFnc = p.__call__["SoftwareSupported"](None) if callFnc is not None: if p.__call__.has_key("menuEntryName"): menuEntryName = p.__call__["menuEntryName"](None) else: menuEntryName = _('Extended Software') if p.__call__.has_key("menuEntryDescription"): menuEntryDescription = p.__call__["menuEntryDescription"](None) else: menuEntryDescription = _('Extended Software Plugin') self.list.append(('default-plugin', menuEntryName, menuEntryDescription + self.oktext, callFnc)) if config.usage.setup_level.index >= 2: # expert+ self.list.append(("advanced", _("Advanced Options"), _("\nAdvanced options and settings." ) + self.oktext, None)) elif self.menu == 1: self.list.append(("advancedrestore", _("Advanced restore"), _("\nRestore your backups by date." ) + self.oktext, None)) self.list.append(("backuplocation", _("Choose backup location"), _("\nSelect your backup device.\nCurrent device: " ) + config.plugins.configurationbackup.backuplocation.value + self.oktext, None)) self.list.append(("backupfiles", _("Choose backup files"), _("Select files for backup. Currently selected:\n" ) + self.backupdirs + self.oktext, None)) if config.usage.setup_level.index >= 2: # expert+ self.list.append(("ipkg-manager", _("Packet management"), _("\nView, install and remove available or installed packages." ) + self.oktext, None)) self.list.append(("ipkg-source",_("Choose upgrade source"), _("\nEdit the upgrade source address." ) + self.oktext, None)) for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER): if p.__call__.has_key("AdvancedSoftwareSupported"): callFnc = p.__call__["AdvancedSoftwareSupported"](None) if callFnc is not None: if p.__call__.has_key("menuEntryName"): menuEntryName = p.__call__["menuEntryName"](None) else: menuEntryName = _('Advanced Software') if p.__call__.has_key("menuEntryDescription"): menuEntryDescription = p.__call__["menuEntryDescription"](None) else: menuEntryDescription = _('Advanced Software Plugin') self.list.append(('advanced-plugin', menuEntryName, menuEntryDescription + self.oktext, callFnc)) | 018534fa7bf9be0885b2ffc753d8d6fc5b56143c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/018534fa7bf9be0885b2ffc753d8d6fc5b56143c/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1339,
16,
833,
273,
374,
4672,
10146,
16186,
2738,
972,
12,
2890,
16,
1339,
13,
365,
18,
7771,
267,
67,
803,
273,
1909,
67,
803,
365,
18,
5414,
273,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1339,
16,
833,
273,
374,
4672,
10146,
16186,
2738,
972,
12,
2890,
16,
1339,
13,
365,
18,
7771,
267,
67,
803,
273,
1909,
67,
803,
365,
18,
5414,
273,
83... |
debug("error creating PDF: %s" % exception) | widgets.debug("error creating PDF: %s" % exception) | def on_savepdf__clicked(button, widgets, state): if not state.downloaded_images or not state.pdf_filename: widgets.debug("Error creating PDF") return try: from reportlab.lib import pagesizes from reportlab.lib.units import cm except ImportError: widgets.debug("You need to install ReportLab (http://www.reportlab.com/)" + " to create a PDF") return chooser = gtk.FileChooserDialog( title="Save PDF", action=gtk.FILE_CHOOSER_ACTION_SAVE, buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK)) chooser.set_current_folder(widgets.destdir.get_text()) chooser.set_current_name(state.pdf_filename) chooser.set_do_overwrite_confirmation(True) response = chooser.run() if response == gtk.RESPONSE_OK: output_pdf = chooser.get_filename() try: lib.create_pdf_from_images(state.downloaded_images, output_pdf, pagesize=pagesizes.A4, margin=0*cm) widgets.debug("PDF written: %s" % output_pdf) except Exception, exception: traceback.print_exc() debug("error creating PDF: %s" % exception) chooser.destroy() | 4ba864a19a1aed80ef57eb8ec1395aab9bd41af7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4836/4ba864a19a1aed80ef57eb8ec1395aab9bd41af7/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
5688,
7699,
972,
7475,
329,
12,
5391,
16,
10965,
16,
919,
4672,
309,
486,
919,
18,
2378,
4230,
67,
7369,
578,
486,
919,
18,
7699,
67,
3459,
30,
10965,
18,
4148,
2932,
668,
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,
603,
67,
5688,
7699,
972,
7475,
329,
12,
5391,
16,
10965,
16,
919,
4672,
309,
486,
919,
18,
2378,
4230,
67,
7369,
578,
486,
919,
18,
7699,
67,
3459,
30,
10965,
18,
4148,
2932,
668,
4... |
gcompris.combo_locales('locale', 'fr') | gcompris.combo_locales('locale', self.init_conf_str('locale', 'fr')) | def config_start(self, profile): # keep profile in mind self.configuring_profile = profile #get the configured values for that profile self.config_dict = gcompris.get_conf(profile, self.gcomprisBoard) | 0a90a1a1a4a90f9f20892ec28b06f8b74ac4131a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/0a90a1a1a4a90f9f20892ec28b06f8b74ac4131a/pythontest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
67,
1937,
12,
2890,
16,
3042,
4672,
468,
3455,
3042,
316,
22838,
365,
18,
1425,
4017,
67,
5040,
273,
3042,
225,
468,
588,
326,
4351,
924,
364,
716,
3042,
365,
18,
1425,
67,
1576,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
67,
1937,
12,
2890,
16,
3042,
4672,
468,
3455,
3042,
316,
22838,
365,
18,
1425,
4017,
67,
5040,
273,
3042,
225,
468,
588,
326,
4351,
924,
364,
716,
3042,
365,
18,
1425,
67,
1576,
... |
raise ValueError('expected 1 starting point, got %i' * len(x0)) | raise ValueError('expected 1 starting point, got %i' % len(x0)) | def __init__(self, f, x0, **kwargs): if len(x0) == 1: self.x0 = x0[0] else: raise ValueError('expected 1 starting point, got %i' * len(x0)) self.f = f if not 'df' in kwargs: def df(x): return diff(f, x) else: df = kwargs['df'] self.df = df | 238e7967fe6ad8de6958ff89eafb2d0c50d3f344 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11851/238e7967fe6ad8de6958ff89eafb2d0c50d3f344/optimization.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
284,
16,
619,
20,
16,
2826,
4333,
4672,
309,
562,
12,
92,
20,
13,
422,
404,
30,
365,
18,
92,
20,
273,
619,
20,
63,
20,
65,
469,
30,
1002,
2068,
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,
2890,
16,
284,
16,
619,
20,
16,
2826,
4333,
4672,
309,
562,
12,
92,
20,
13,
422,
404,
30,
365,
18,
92,
20,
273,
619,
20,
63,
20,
65,
469,
30,
1002,
2068,
266... |
device_rp = rbdir.append("aux") | device_rp = rbdir.append("con") | def set_must_escape_dos_devices(self, rbdir): """If local edd or src edd, then must escape """ try: device_rp = rbdir.append("aux") if device_rp.lstat(): local_edd = 1 else: local_edd = 0 except (OSError): local_edd = 1 SetConnections.UpdateGlobal('must_escape_dos_devices', \ self.src_fsa.escape_dos_devices or local_edd) log.Log("Backup: must_escape_dos_devices = %d" % \ (self.src_fsa.escape_dos_devices or local_edd), 4) | b8f014c5a88e24e5cb24e6697cf1365222a957cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8033/b8f014c5a88e24e5cb24e6697cf1365222a957cf/fs_abilities.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
11926,
67,
6939,
67,
19219,
67,
12506,
12,
2890,
16,
7138,
1214,
4672,
3536,
2047,
1191,
1675,
72,
578,
1705,
1675,
72,
16,
1508,
1297,
4114,
3536,
775,
30,
2346,
67,
13832,
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,
444,
67,
11926,
67,
6939,
67,
19219,
67,
12506,
12,
2890,
16,
7138,
1214,
4672,
3536,
2047,
1191,
1675,
72,
578,
1705,
1675,
72,
16,
1508,
1297,
4114,
3536,
775,
30,
2346,
67,
13832,
2... |
elif elem_id == MATROSKA_CUE_DATE_ID: | elif elem_id == MATROSKA_CUES_ID: | def process_elem(self, elem): elem_id = elem.get_id() log.debug('BEGIN: process element %s' % hex(elem_id)) if elem_id == MATROSKA_SEGMENT_INFO_ID: duration = 0 scalecode = 1000000.0 | cc38cf94f2e5066070dc6dfbb9cf601432cb98ca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11721/cc38cf94f2e5066070dc6dfbb9cf601432cb98ca/mkv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
10037,
12,
2890,
16,
3659,
4672,
3659,
67,
350,
273,
3659,
18,
588,
67,
350,
1435,
613,
18,
4148,
2668,
16061,
30,
1207,
930,
738,
87,
11,
738,
3827,
12,
10037,
67,
350,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
10037,
12,
2890,
16,
3659,
4672,
3659,
67,
350,
273,
3659,
18,
588,
67,
350,
1435,
613,
18,
4148,
2668,
16061,
30,
1207,
930,
738,
87,
11,
738,
3827,
12,
10037,
67,
350,
37... |
self.f.close() | self._fd.close() | def run(self): """Main loop; reads commands until the server is shut down or the connection is terminated.""" self.reply(220, "Hello."); while not self.closed: cmd = self.readcmd() if cmd == None: continue if self.debug: sys.stderr.write("Command: %s, args: %s\n" % (cmd[1], cmd[2])) cmd[0](cmd[1], *cmd[2]) try: self.f.close() except: pass # FIXME: cleanup | 7f75ea328e940ebcae216cfd19befed9d50c6ece /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8495/7f75ea328e940ebcae216cfd19befed9d50c6ece/protocol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
6376,
2798,
31,
6838,
4364,
3180,
326,
1438,
353,
9171,
2588,
578,
326,
1459,
353,
14127,
12123,
365,
18,
10629,
12,
27246,
16,
315,
18601,
1199,
1769,
1323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3536,
6376,
2798,
31,
6838,
4364,
3180,
326,
1438,
353,
9171,
2588,
578,
326,
1459,
353,
14127,
12123,
365,
18,
10629,
12,
27246,
16,
315,
18601,
1199,
1769,
1323,
... |
""" Verify whether LAM/MPI crashed by checking logs and f1.Rout | """ Verify whether LAM/MPI crashed by checking logs and f2.Rout | def did_lam_crash(tmpDir, machine_root = 'karl'): """ Verify whether LAM/MPI crashed by checking logs and f1.Rout for single universe lamboot.""" OTHER_LAM_MSGS = 'Call stack within LAM:' lam_logs = glob.glob(tmpDir + '/' + machine_root + '*.*.*.log') in_error_msg = int(os.popen('grep MPI_Error_string ' + \ tmpDir + '/R_Status.txt | wc').readline().split()[0]) | 078b3a4e27413dac20ecca37ca13f3afcd134a35 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6461/078b3a4e27413dac20ecca37ca13f3afcd134a35/runADaCGHserver-2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5061,
67,
28448,
67,
3353,
961,
12,
5645,
1621,
16,
5228,
67,
3085,
273,
296,
79,
13007,
11,
4672,
3536,
8553,
2856,
511,
2192,
19,
49,
1102,
4422,
13912,
635,
6728,
5963,
471,
284,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5061,
67,
28448,
67,
3353,
961,
12,
5645,
1621,
16,
5228,
67,
3085,
273,
296,
79,
13007,
11,
4672,
3536,
8553,
2856,
511,
2192,
19,
49,
1102,
4422,
13912,
635,
6728,
5963,
471,
284,
22... |
def getfollowuptrigs(numtrigs,page,coincs=None,missed=None): | def getfollowuptrigs(numtrigs,page,coincs=None,missed=None,search=None): | def getfollowuptrigs(numtrigs,page,coincs=None,missed=None): followups = [] if coincs: sim = None try: sim = isinstance(coincs[0].sim,lsctables.SimInspiral) except: pass if sim: coincs.sort(False) # This does an ascending sort instead for found inj else: coincs.sort() numTrigs = 0 for ckey in coincs: numTrigs += 1 if numTrigs > eval(numtrigs): break fuList = followUpList() fuList.add_coincs(ckey) fuList.add_page(page) try: getattr(ckey,'H1') fuList.gpsTime["H1"] = (float(getattr(ckey,'H1').end_time_ns)/1000000000)+float(getattr(ckey,'H1').end_time) except: fuList.gpsTime["H1"] = None try: getattr(ckey,'H2') fuList.gpsTime["H2"] = (float(getattr(ckey,'H2').end_time_ns)/1000000000)+float(getattr(ckey,'H2').end_time) except: fuList.gpsTime["H2"] = None try: getattr(ckey,'L1') fuList.gpsTime["L1"] = (float(getattr(ckey,'L1').end_time_ns)/1000000000)+float(getattr(ckey,'L1').end_time) except: fuList.gpsTime["L1"] = None try: getattr(ckey,'G1') fuList.gpsTime["G1"] = (float(getattr(ckey,'G1').end_time_ns)/1000000000)+float(getattr(ckey,'G1').end_time) except: fuList.gpsTime["G1"] = None try: getattr(ckey,'V1') fuList.gpsTime["V1"] = (float(getattr(ckey,'V1').end_time_ns)/1000000000)+float(getattr(ckey,'V1').end_time) except: fuList.gpsTime["V1"] = None try: getattr(ckey,'T1') fuList.gpsTime["T1"] = (float(getattr(ckey,'T1').end_time_ns)/1000000000)+float(getattr(ckey,'T1').end_time) except: fuList.gpsTime["T1"] = None followups.append(fuList) # the missed stuff doesnt work yet!!! if missed: followups return followups | 9d26e30ffe927662fb55a104f574405b61c52570 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/9d26e30ffe927662fb55a104f574405b61c52570/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
14641,
416,
313,
360,
87,
12,
2107,
313,
360,
87,
16,
2433,
16,
12645,
2143,
33,
7036,
16,
11173,
730,
33,
7036,
16,
3072,
33,
7036,
4672,
225,
2805,
18294,
273,
5378,
309,
13170,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14641,
416,
313,
360,
87,
12,
2107,
313,
360,
87,
16,
2433,
16,
12645,
2143,
33,
7036,
16,
11173,
730,
33,
7036,
16,
3072,
33,
7036,
4672,
225,
2805,
18294,
273,
5378,
309,
13170,... |
project_ids = [x[0] for x in res] | cr.execute('select id from project_project where parent_id=%d', (proj.id,)) project_ids = [x[0] for x in cr.fetchall()] for child in project_ids: self.setActive(cr, uid, [child], value, context) | def setActive(self, cr, uid, ids, value=True, context={}): | e82bae3c66b772ae2b28349b23c30d309b26d7f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/e82bae3c66b772ae2b28349b23c30d309b26d7f0/project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20669,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
460,
33,
5510,
16,
819,
12938,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
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,
20669,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
460,
33,
5510,
16,
819,
12938,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
logging.debug('Replacing in-memory state with on-disk state ' 'from %s', file_path) | def read_from_file(self, file_path, merge=True): """Read in any state from the file at file_path. | 0d9409a32b4022718a2f69ecdac4521bbdfe26aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/0d9409a32b4022718a2f69ecdac4521bbdfe26aa/base_job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
2080,
67,
768,
12,
2890,
16,
585,
67,
803,
16,
2691,
33,
5510,
4672,
3536,
1994,
316,
1281,
919,
628,
326,
585,
622,
585,
67,
803,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
67,
2080,
67,
768,
12,
2890,
16,
585,
67,
803,
16,
2691,
33,
5510,
4672,
3536,
1994,
316,
1281,
919,
628,
326,
585,
622,
585,
67,
803,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,... | |
return 1 | return True | def __eq__(self, n): if n.lid == self.lid: return 1 else: return 0 | 6c6d84c3ad2857d8a0531038f79a0f65cf5df53e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6661/6c6d84c3ad2857d8a0531038f79a0f65cf5df53e/astar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
290,
4672,
309,
290,
18,
80,
350,
422,
365,
18,
80,
350,
30,
327,
1053,
469,
30,
327,
374,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
290,
4672,
309,
290,
18,
80,
350,
422,
365,
18,
80,
350,
30,
327,
1053,
469,
30,
327,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
e.target.connections['in'].remove(e) self.connections['out'].remove(e) | self.disconnect_edge(e) | def disconnect_all(self): removed_edges = set() for e in self.connections['out'][:]: removed_edges.add(e) e.target.connections['in'].remove(e) self.connections['out'].remove(e) for e in self.connections['in'][:]: removed_edges.add(e) e.target.connections['out'].remove(e) self.connections['in'].remove(e) return removed_edges | 2a33e07f3865b3c2d8523296881230d57131858c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5406/2a33e07f3865b3c2d8523296881230d57131858c/Graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9479,
67,
454,
12,
2890,
4672,
3723,
67,
8746,
273,
444,
1435,
364,
425,
316,
365,
18,
13313,
3292,
659,
3546,
10531,
14542,
3723,
67,
8746,
18,
1289,
12,
73,
13,
365,
18,
20177,
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,
9479,
67,
454,
12,
2890,
4672,
3723,
67,
8746,
273,
444,
1435,
364,
425,
316,
365,
18,
13313,
3292,
659,
3546,
10531,
14542,
3723,
67,
8746,
18,
1289,
12,
73,
13,
365,
18,
20177,
67,
... |
newNodes.append(( parent.id, child.tag.decode('ascii'), child.kwargs)) marshal(child) | if isinstance(child, (xmlstan.NSTag, xmlstan.Tag)): pass else: newNodes.append(( parent.id, child.tag.decode('ascii'), child.kwargs)) marshal(child) | def marshal(parent): for child in parent.children: if child.alive: continue child.alive = True newNodes.append(( parent.id, child.tag.decode('ascii'), child.kwargs)) marshal(child) | 81fcd17e3ba132e10b1fa1ee42a9f8e514298161 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2333/81fcd17e3ba132e10b1fa1ee42a9f8e514298161/xul.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10893,
12,
2938,
4672,
364,
1151,
316,
982,
18,
5906,
30,
309,
1151,
18,
11462,
30,
1324,
1151,
18,
11462,
273,
1053,
394,
3205,
18,
6923,
12443,
982,
18,
350,
16,
1151,
18,
2692,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10893,
12,
2938,
4672,
364,
1151,
316,
982,
18,
5906,
30,
309,
1151,
18,
11462,
30,
1324,
1151,
18,
11462,
273,
1053,
394,
3205,
18,
6923,
12443,
982,
18,
350,
16,
1151,
18,
2692,
18,
... |
def export_cal(self, cr, uid, datas, vobj='vevent', context={}): cal = self.browse(cr, uid, datas[0]) ical = vobject.iCalendar() | def export_cal(self, cr, uid, ids, vobj='vevent', context={}): cal = self.browse(cr, uid, ids[0]) ical = vobject.iCalendar() | def export_cal(self, cr, uid, datas, vobj='vevent', context={}): cal = self.browse(cr, uid, datas[0]) ical = vobject.iCalendar() for line in cal.line_ids: if line.name in ('valarm', 'attendee'): continue mod_obj = self.pool.get(line.object_id.model) data_ids = mod_obj.search(cr, uid, eval(line.domain), context=context) datas = mod_obj.read(cr, uid, data_ids, context=context) context.update({'model': line.object_id.model}) self.__attribute__ = get_attribute_mapping(cr, uid, line.name, context) self.create_ics(cr, uid, datas, line.name, ical, context=context) return ical.serialize() | 34a879d3905a9a1ebf968a61170135178a8176cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/34a879d3905a9a1ebf968a61170135178a8176cb/base_calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
771,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
331,
2603,
2218,
537,
616,
2187,
819,
12938,
4672,
1443,
273,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
63,
20,
5717,
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,
3359,
67,
771,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
331,
2603,
2218,
537,
616,
2187,
819,
12938,
4672,
1443,
273,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
63,
20,
5717,
2... |
bool = self.get(question) return bool == 'true' | result = self.get(question) return result == 'true' | def getBoolean(self, question): bool = self.get(question) return bool == 'true' | ad59cd036402c1e3db8b68f1846eca4019f92c76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11145/ad59cd036402c1e3db8b68f1846eca4019f92c76/debconf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12835,
12,
2890,
16,
5073,
4672,
1426,
273,
365,
18,
588,
12,
4173,
13,
327,
1426,
422,
296,
3767,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12835,
12,
2890,
16,
5073,
4672,
1426,
273,
365,
18,
588,
12,
4173,
13,
327,
1426,
422,
296,
3767,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._mesg('> %s' % data) | self._mesg('> %r' % data) | def _command(self, name, *args): | 94448afc2448648679db2638ebbc3bbbee6f391a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/94448afc2448648679db2638ebbc3bbbee6f391a/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3076,
12,
2890,
16,
508,
16,
380,
1968,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3076,
12,
2890,
16,
508,
16,
380,
1968,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def generateChap(start, end, chapter, type): | def generateChap(start, end, chapter, chaptername, type): | def generateChap(start, end, chapter, type): """Generates chapters""" # Matroska if type == 'MKV': return """ <ChapterAtom> <ChapterTimeStart>{}</ChapterTimeStart> <ChapterTimeEnd>{}</ChapterTimeEnd> <ChapterDisplay> <ChapterString>Chapter {:02d}</ChapterString> <ChapterLanguage>{}</ChapterLanguage> </ChapterDisplay> </ChapterAtom> | 783e706a8cc971cea83a2a5c030b5bfe68c6a872 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14863/783e706a8cc971cea83a2a5c030b5bfe68c6a872/vfr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
782,
438,
12,
1937,
16,
679,
16,
23580,
16,
23580,
529,
16,
618,
4672,
3536,
6653,
462,
1657,
414,
8395,
468,
14493,
6973,
7282,
309,
618,
422,
296,
49,
16945,
4278,
327,
3536,
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,
2103,
782,
438,
12,
1937,
16,
679,
16,
23580,
16,
23580,
529,
16,
618,
4672,
3536,
6653,
462,
1657,
414,
8395,
468,
14493,
6973,
7282,
309,
618,
422,
296,
49,
16945,
4278,
327,
3536,
4... |
def __add_songs(klass, library, added, model, update=True): | def _add_songs(klass, library, added, model, update=True): | def __add_songs(klass, library, added, model, update=True): albums = model.get_albums() changed = set() # Keys of changed albums new = [] # Added album instances for song in added: labelid = song.get("labelid", "") mbid = song.get("musicbrainz_albumid", "") key = song.album_key if key not in albums: new_album = klass._Album(song("album"), labelid, mbid) albums[key] = new_album new.append(new_album) albums[key].songs.add(song) changed.add(key) for album in new: model.append(row=[album]) if update: klass.__update(changed, model) else: return changed | a9c59ef45339a182ec9e5cf624857279afb5b230 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4764/a9c59ef45339a182ec9e5cf624857279afb5b230/albums.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
816,
564,
12,
22626,
16,
5313,
16,
3096,
16,
938,
16,
1089,
33,
5510,
4672,
14844,
87,
273,
938,
18,
588,
67,
25090,
87,
1435,
3550,
273,
444,
1435,
468,
11432,
434,
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,
389,
1289,
67,
816,
564,
12,
22626,
16,
5313,
16,
3096,
16,
938,
16,
1089,
33,
5510,
4672,
14844,
87,
273,
938,
18,
588,
67,
25090,
87,
1435,
3550,
273,
444,
1435,
468,
11432,
434,
3... |
Return the sequence of faces of this polytope. | Return the sequence of proper faces of this polytope. | def faces(self, dim=None, codim=None): r""" Return the sequence of faces of this polytope. If ``dim`` or ``codim`` are specified, returns a sequence of faces of the corresponding dimension or codimension. Otherwise returns the sequence of such sequences for all dimensions. EXAMPLES: All faces of the 3-dimensional octahedron:: sage: o = lattice_polytope.octahedron(3) sage: o.faces() [ [[0], [1], [2], [3], [4], [5]], [[1, 5], [0, 5], [0, 1], [3, 5], [1, 3], [4, 5], [0, 4], [3, 4], [1, 2], [0, 2], [2, 3], [2, 4]], [[0, 1, 5], [1, 3, 5], [0, 4, 5], [3, 4, 5], [0, 1, 2], [1, 2, 3], [0, 2, 4], [2, 3, 4]] ] Its faces of dimension one (i.e., edges):: sage: o.faces(dim=1) [[1, 5], [0, 5], [0, 1], [3, 5], [1, 3], [4, 5], [0, 4], [3, 4], [1, 2], [0, 2], [2, 3], [2, 4]] Its faces of codimension two (also edges):: sage: o.faces(codim=2) [[1, 5], [0, 5], [0, 1], [3, 5], [1, 3], [4, 5], [0, 4], [3, 4], [1, 2], [0, 2], [2, 3], [2, 4]] It is an error to specify both dimension and codimension at the same time, even if they do agree:: sage: o.faces(dim=1, codim=2) Traceback (most recent call last): ... ValueError: Both dim and codim are given! """ try: if dim == None and codim == None: return self._faces elif dim != None and codim == None: return self._faces[dim] elif dim == None and codim != None: return self._faces[self.dim()-codim] else: raise ValueError, "Both dim and codim are given!" except AttributeError: self._compute_faces() return self.faces(dim, codim) | 1e32c87292a64b8e757d598e6aedb433fe42c99d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1e32c87292a64b8e757d598e6aedb433fe42c99d/lattice_polytope.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11058,
12,
2890,
16,
2464,
33,
7036,
16,
11012,
381,
33,
7036,
4672,
436,
8395,
2000,
326,
3102,
434,
5338,
11058,
434,
333,
7573,
869,
347,
18,
225,
971,
12176,
3509,
10335,
578,
12176,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11058,
12,
2890,
16,
2464,
33,
7036,
16,
11012,
381,
33,
7036,
4672,
436,
8395,
2000,
326,
3102,
434,
5338,
11058,
434,
333,
7573,
869,
347,
18,
225,
971,
12176,
3509,
10335,
578,
12176,... |
entry.set_text(_("Type here you message to GCompris users in your local network.")) | entry.set_text(_("Type your message here, to send to other GCompris users on your local network.")) | def start(self): gcompris.bar_set (0) gcompris.set_background(self.gcomprisBoard.canvas.root(), gcompris.skin.image_to_skin("gcompris-bg.jpg")) self.rootitem = self.gcomprisBoard.canvas.root().add( gnomecanvas.CanvasGroup, x=0.0, y=0.0 ) | a2883d4f8ebf93e513997826bea41cc0844396f5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11306/a2883d4f8ebf93e513997826bea41cc0844396f5/chat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
314,
832,
683,
291,
18,
3215,
67,
542,
261,
20,
13,
314,
832,
683,
291,
18,
542,
67,
9342,
12,
2890,
18,
75,
832,
683,
291,
22233,
18,
15424,
18,
3085,
9334,
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,
787,
12,
2890,
4672,
314,
832,
683,
291,
18,
3215,
67,
542,
261,
20,
13,
314,
832,
683,
291,
18,
542,
67,
9342,
12,
2890,
18,
75,
832,
683,
291,
22233,
18,
15424,
18,
3085,
9334,
3... |
for lfn,fileID in res['Value']: | for lfn, fileID in res['Value']: | def __getAllFileIDs(self,connection=False): """ Get all the fileIDs for the supplied list of lfns """ req = "SELECT LFN,FileID FROM DataFiles;" res = self._query(req,connection) if not res['OK']: return res fids = {} lfns = {} for lfn,fileID in res['Value']: fids[fileID] = lfn lfns[lfn] = fileID return S_OK((fids,lfns)) | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1595,
812,
5103,
12,
2890,
16,
4071,
33,
8381,
4672,
3536,
968,
777,
326,
585,
5103,
364,
326,
4580,
666,
434,
18594,
2387,
3536,
1111,
273,
315,
4803,
18803,
50,
16,
812,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1595,
812,
5103,
12,
2890,
16,
4071,
33,
8381,
4672,
3536,
968,
777,
326,
585,
5103,
364,
326,
4580,
666,
434,
18594,
2387,
3536,
1111,
273,
315,
4803,
18803,
50,
16,
812,
7... |
funcs = [] for suffix in "base64", "hqx", "uu", "hex": prefixes = ["a2b_", "b2a_"] if suffix == "hqx": prefixes.extend(["crc_", "rlecode_", "rledecode_"]) for prefix in prefixes: name = prefix + suffix self.assertTrue(hasattr(getattr(binascii, name), '__call__')) self.assertRaises(TypeError, getattr(binascii, name)) for name in ("hexlify", "unhexlify"): | for name in all_functions: | def test_functions(self): # Check presence of all functions funcs = [] for suffix in "base64", "hqx", "uu", "hex": prefixes = ["a2b_", "b2a_"] if suffix == "hqx": prefixes.extend(["crc_", "rlecode_", "rledecode_"]) for prefix in prefixes: name = prefix + suffix self.assertTrue(hasattr(getattr(binascii, name), '__call__')) self.assertRaises(TypeError, getattr(binascii, name)) for name in ("hexlify", "unhexlify"): self.assertTrue(hasattr(getattr(binascii, name), '__call__')) self.assertRaises(TypeError, getattr(binascii, name)) | db983a7c38ba3d98649c916afa12340bd8b6bed2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/db983a7c38ba3d98649c916afa12340bd8b6bed2/test_binascii.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
10722,
12,
2890,
4672,
468,
2073,
9805,
434,
777,
4186,
364,
508,
316,
777,
67,
10722,
30,
365,
18,
11231,
5510,
12,
5332,
1747,
12,
588,
1747,
12,
4757,
9184,
16,
508,
3631,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10722,
12,
2890,
4672,
468,
2073,
9805,
434,
777,
4186,
364,
508,
316,
777,
67,
10722,
30,
365,
18,
11231,
5510,
12,
5332,
1747,
12,
588,
1747,
12,
4757,
9184,
16,
508,
3631,... |
@bigmemtest(minsize=_2G, memuse=8) | @bigmemtest(minsize=_2G, memuse=9) | def test_repr_large(self, size): return self.basic_test_repr(size) | 0eb0612816f3c94591421cef69061c71f15c1bb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0eb0612816f3c94591421cef69061c71f15c1bb4/test_bigmem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12715,
67,
14095,
12,
2890,
16,
963,
4672,
327,
365,
18,
13240,
67,
3813,
67,
12715,
12,
1467,
13,
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,
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,
1842,
67,
12715,
67,
14095,
12,
2890,
16,
963,
4672,
327,
365,
18,
13240,
67,
3813,
67,
12715,
12,
1467,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
coinc_inspiral.snr = math.sqrt(sum(event.get_effective_snr(fac = effective_snr_factor)**2 for event in events)) | if all(event.chisq for event in events): coinc_inspiral.snr = math.sqrt(sum(event.get_effective_snr(fac = effective_snr_factor)**2 for event in events)) else: coinc_inspiral.snr = None | def append_coinc(self, process_id, time_slide_id, coinc_def_id, events, effective_snr_factor): # # populate the coinc_event and coinc_event_map tables # | 54a1cd6d9bec9f1406c29f08bcae4cf32861dee1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/54a1cd6d9bec9f1406c29f08bcae4cf32861dee1/ligolw_thinca.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
12645,
71,
12,
2890,
16,
1207,
67,
350,
16,
813,
67,
26371,
67,
350,
16,
13170,
71,
67,
536,
67,
350,
16,
2641,
16,
11448,
67,
8134,
86,
67,
6812,
4672,
468,
468,
6490,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
12645,
71,
12,
2890,
16,
1207,
67,
350,
16,
813,
67,
26371,
67,
350,
16,
13170,
71,
67,
536,
67,
350,
16,
2641,
16,
11448,
67,
8134,
86,
67,
6812,
4672,
468,
468,
6490,
32... |
logging.error('thread %s dying: %s' % (self.getName(), | logging.error('%s dying: %s' % (self.getName(), | def run(self): """Delegate main work to a helper method and watch for uncaught exceptions.""" self._start_time = time.time() self._num_tests = 0 try: logging.debug('thread %s starting' % (self.getName())) self._Run(test_runner=None, result_summary=None) logging.debug('thread %s done (%d tests)' % (self.getName(), self.GetNumTests())) except: # Save the exception for our caller to see. self._exception_info = sys.exc_info() self._stop_time = time.time() # Re-raise it and die. logging.error('thread %s dying: %s' % (self.getName(), self._exception_info)) raise self._stop_time = time.time() | e84e0af1bb8bce9694f71c06db04a4ee04ce4fa7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e84e0af1bb8bce9694f71c06db04a4ee04ce4fa7/test_shell_thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
9586,
2774,
1440,
358,
279,
4222,
707,
471,
4267,
364,
6301,
16510,
4798,
12123,
365,
6315,
1937,
67,
957,
273,
813,
18,
957,
1435,
365,
6315,
2107,
67,
16341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3536,
9586,
2774,
1440,
358,
279,
4222,
707,
471,
4267,
364,
6301,
16510,
4798,
12123,
365,
6315,
1937,
67,
957,
273,
813,
18,
957,
1435,
365,
6315,
2107,
67,
16341... |
return "{0} -> [{1}: {2}]".format(self.round_configuration, self.parameter, self.parameter_value) | return u"{0} -> [{1}: {2}]".format(self.round_configuration, self.parameter, self.parameter_value) | def __unicode__(self): return "{0} -> [{1}: {2}]".format(self.round_configuration, self.parameter, self.parameter_value) | e0c246b75fbd7beea69fbdb5057dc22d60db6a17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7374/e0c246b75fbd7beea69fbdb5057dc22d60db6a17/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9124,
972,
12,
2890,
4672,
327,
4144,
20,
97,
317,
20031,
21,
6713,
288,
22,
23410,
18,
2139,
12,
2890,
18,
2260,
67,
7025,
16,
365,
18,
6775,
16,
365,
18,
6775,
67,
1132,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9124,
972,
12,
2890,
4672,
327,
4144,
20,
97,
317,
20031,
21,
6713,
288,
22,
23410,
18,
2139,
12,
2890,
18,
2260,
67,
7025,
16,
365,
18,
6775,
16,
365,
18,
6775,
67,
1132,
13,
... |
"""Sets screenshot base name and number.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Next Shot...')) menu.AppendItem(menuItem) def Execute(self,event): fallout3Ini = bosh.fallout3Ini base = fallout3Ini.getSetting('Display','sScreenShotBaseName','ScreenShot') next = fallout3Ini.getSetting('Display','iScreenShotIndex','0') rePattern = re.compile(r'^(.+?)(\d*)$',re.I) pattern = balt.askText(self.window,_("Screenshot base name, optionally with next screenshot number.\nE.g. ScreenShot or ScreenShot_101 or Subdir\\ScreenShot_201."),_("Next Shot..."),base+next) if not pattern: return maPattern = rePattern.match(pattern) newBase,newNext = maPattern.groups() settings = {LString('Display'):{ LString('SScreenShotBaseName'): newBase, LString('iScreenShotIndex'): (newNext or next), LString('bAllowScreenShot'): '1', }} screensDir = GPath(newBase).head if screensDir: if not screensDir.isabs(): screensDir = bosh.dirs['app'].join(screensDir) screensDir.makedirs() fallout3Ini.saveSettings(settings) bosh.screensData.refresh() self.window.RefreshUI() | """Sets screenshot base name and number.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Next Shot...')) menu.AppendItem(menuItem) def Execute(self,event): fallout3Ini = bosh.fallout3Ini base = fallout3Ini.getSetting('Display','sScreenShotBaseName','ScreenShot') next = fallout3Ini.getSetting('Display','iScreenShotIndex','0') rePattern = re.compile(r'^(.+?)(\d*)$',re.I) pattern = balt.askText(self.window,_("Screenshot base name, optionally with next screenshot number.\nE.g. ScreenShot or ScreenShot_101 or Subdir\\ScreenShot_201."),_("Next Shot..."),base+next) if not pattern: return maPattern = rePattern.match(pattern) newBase,newNext = maPattern.groups() settings = {LString('Display'):{ LString('SScreenShotBaseName'): newBase, LString('iScreenShotIndex'): (newNext or next), LString('bAllowScreenShot'): '1', }} screensDir = GPath(newBase).head if screensDir: if not screensDir.isabs(): screensDir = bosh.dirs['app'].join(screensDir) screensDir.makedirs() fallout3Ini.saveSettings(settings) bosh.screensData.refresh() self.window.RefreshUI() | def Execute(self,event): debug = True message = _('This will relevel the NPCs in the selected save game(s) according to the npc levels in the currently active mods. This supercedes the older "Import NPC Levels" command.') if not balt.askContinue(self.window,message,'bash.updateNpcLevels.continue',_('Update NPC Levels')): return progress = balt.Progress(_('Update NPC Levels')) try: #--Loop over active mods offsetFlag = 0x80 npc_info = {} loadFactory = bosh.LoadFactory(False,bosh.MreNpc) ordered = list(bosh.modInfos.ordered) subProgress = SubProgress(progress,0,0.4,len(ordered)) modErrors = [] for index,modName in enumerate(ordered): subProgress(index,_("Scanning ") + modName.s) modInfo = bosh.modInfos[modName] modFile = bosh.ModFile(modInfo,loadFactory) try: modFile.load(True) except bosh.ModError, x: modErrors.append(str(x)) continue if 'NPC_' not in modFile.tops: continue #--Loop over mod NPCs mapToOrdered = bosh.MasterMap(modFile.tes4.masters+[modName], ordered) for npc in modFile.NPC_.getActiveRecords(): fid = mapToOrdered(npc.fid,None) if not fid: continue npc_info[fid] = (npc.eid, npc.level, npc.calcMin, npc.calcMax, npc.flags.pcLevelOffset) #--Loop over savefiles subProgress = SubProgress(progress,0.4,1.0,len(self.data)) message = _("NPCs Releveled:") for index,saveName in enumerate(self.data): #deprint(saveName, '==============================') subProgress(index,_("Updating ") + saveName.s) saveInfo = self.window.data[saveName] saveFile = bosh.SaveFile(saveInfo) saveFile.load() records = saveFile.records mapToOrdered = bosh.MasterMap(saveFile.masters, ordered) releveledCount = 0 #--Loop over change records for recNum in xrange(len(records)): releveled = False (recId,recType,recFlags,version,data) = records[recNum] orderedRecId = mapToOrdered(recId,None) if recType != 35 or recId == 7 or orderedRecId not in npc_info: continue (eid,level,calcMin,calcMax,pcLevelOffset) = npc_info[orderedRecId] npc = bosh.SreNPC(recFlags,data) acbs = npc.acbs if acbs and ( (acbs.level != level) or (acbs.calcMin != calcMin) or (acbs.calcMax != calcMax) or (acbs.flags.pcLevelOffset != pcLevelOffset) ): acbs.flags.pcLevelOffset = pcLevelOffset acbs.level = level acbs.calcMin = calcMin acbs.calcMax = calcMax (recId,recType,recFlags,version,data) = saveFile.records[recNum] records[recNum] = (recId,recType,npc.getFlags(),version,npc.getData()) releveledCount += 1 saveFile.records[recNum] = npc.getTuple(recId,version) #deprint(hex(recId), eid, acbs.level, acbs.calcMin, acbs.calcMax, acbs.flags.getTrueAttrs()) #--Save changes? subProgress(index+0.5,_("Updating ") + saveName.s) if releveledCount: saveFile.safeSave() message += '\n%d %s' % (releveledCount,saveName.s,) progress.Destroy() if modErrors: message += _("\n\nSome mods had load errors and were skipped:\n* ") message += '\n* '.join(modErrors) balt.showOk(self.window,message,_('Update NPC Levels')) finally: if progress: progress.Destroy() | 3ac43907fa076fea1e8d682219e2b28fc7419f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3ac43907fa076fea1e8d682219e2b28fc7419f7b/basher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
12,
2890,
16,
2575,
4672,
1198,
273,
1053,
883,
273,
389,
2668,
2503,
903,
283,
2815,
326,
423,
3513,
87,
316,
326,
3170,
1923,
7920,
12,
87,
13,
4888,
358,
326,
1130,
71,
7575,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
12,
2890,
16,
2575,
4672,
1198,
273,
1053,
883,
273,
389,
2668,
2503,
903,
283,
2815,
326,
423,
3513,
87,
316,
326,
3170,
1923,
7920,
12,
87,
13,
4888,
358,
326,
1130,
71,
7575,
... |
Subwidget Class --------- ----- hlist HList hsb Scrollbar vsb Scrollbar""" def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw) self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb') self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb') | Subwidget Class --------- ----- hlist HList hsb Scrollbar vsb Scrollbar""" def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw) self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb') self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb') | def update(self): | 22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.base_url = 'http://www.endicia.com/' self.base_namespace = 'www.endicia.com/' | self.base_url = 'http://LabelServer.endicia.com/' self.base_namespace = 'LabelServer.endicia.com/' | def __init__(self, requesterid, accountid, passphrase, test, **kwargs): """ Validates RequesterID, AccountID and passphrase | 69baa9e4211e80f82015ef540f0cb5c32c08e9aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12524/69baa9e4211e80f82015ef540f0cb5c32c08e9aa/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
19961,
350,
16,
2236,
350,
16,
15244,
16,
1842,
16,
2826,
4333,
4672,
3536,
2364,
815,
868,
21207,
734,
16,
6590,
734,
471,
15244,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
19961,
350,
16,
2236,
350,
16,
15244,
16,
1842,
16,
2826,
4333,
4672,
3536,
2364,
815,
868,
21207,
734,
16,
6590,
734,
471,
15244,
2,
-100,
-100,
-100,
-... |
r'(?P<header>[-\w_.*,(){} ]+)' | r'(?P<header>[^]]+)' | def remove_section(self, section): """Remove a file section.""" if self.__sections.has_key(section): del self.__sections[section] return 1 else: return 0 | 82dd3a1202e198c334da8d7eb4736b04c2394803 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/82dd3a1202e198c334da8d7eb4736b04c2394803/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3464,
12,
2890,
16,
2442,
4672,
3536,
3288,
279,
585,
2442,
12123,
309,
365,
16186,
11657,
18,
5332,
67,
856,
12,
3464,
4672,
1464,
365,
16186,
11657,
63,
3464,
65,
327,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
67,
3464,
12,
2890,
16,
2442,
4672,
3536,
3288,
279,
585,
2442,
12123,
309,
365,
16186,
11657,
18,
5332,
67,
856,
12,
3464,
4672,
1464,
365,
16186,
11657,
63,
3464,
65,
327,
404,
... |
print '(index) Error proccesing messages: ' + str(detail) | print 'Error proccesing messages: ' + str(detail) | def addIndex(self, message, n): self.msg = message self.template = Template() self.tpl = self.template.get('rdf_index_item') | 8a88ddb68024c9a8cd1383a7b6e90e0791d40ee7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2232/8a88ddb68024c9a8cd1383a7b6e90e0791d40ee7/publisher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26794,
12,
2890,
16,
883,
16,
290,
4672,
365,
18,
3576,
273,
883,
365,
18,
3202,
273,
5035,
1435,
365,
18,
10933,
273,
365,
18,
3202,
18,
588,
2668,
19299,
67,
1615,
67,
1726,
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,
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,
26794,
12,
2890,
16,
883,
16,
290,
4672,
365,
18,
3576,
273,
883,
365,
18,
3202,
273,
5035,
1435,
365,
18,
10933,
273,
365,
18,
3202,
18,
588,
2668,
19299,
67,
1615,
67,
1726,
6134,
... |
conf.so_axis = "time_of_flight" | config.so_axis = "time_of_flight" dataset_type = "background" | def run(config, tim=None): """ This method is where the data reduction process gets done. @param config: Object containing the data reduction configuration information. @type config: L{hlr_utils.Configure} @param tim: (OPTIONAL) Object that will allow the method to perform timing evaluations. @type tim: C{sns_time.DiffTime} """ if tim is not None: tim.getTime(False) old_time = tim.getOldTime() if config.data is None: raise RuntimeError("Need to pass a data filename to the driver "\ +"script.") # Read in geometry if one is provided if config.inst_geom is not None: if config.verbose: print "Reading in instrument geometry file" inst_geom_dst = DST.getInstance("application/x-NxsGeom", config.inst_geom) else: inst_geom_dst = None # Add so_axis to Configure object conf.so_axis = "time_of_flight" # Step 0: Open appropriate data files # Data if conf.verbose: print "Reading %s file" % dataset_type # The [0] is to get the data SOM and ignore the None background SOM dp_som = dr_lib.add_files(datalist, Data_Paths=conf.data_paths.toPath(), SO_Axis=conf.so_axis, Signal_ROI=conf.roi_file, dataset_type="background", Verbose=conf.verbose, Timer=t)[0] if t is not None: t.getTime(msg="After reading %s " % dataset_type) dp_som0 = dr_lib.fix_bin_contents(dp_som) del dp_som if conf.inst_geom is not None: i_geom_dst.setGeometry(conf.data_paths.toPath(), dp_som0) if conf.verbose: print "Reading in beam monitor data from %s file" % dataset_type # The [0] is to get the data SOM and ignore the None background SOM dbm_som0 = dr_lib.add_files(datalist, Data_Paths=conf.bmon_path.toPath(), SO_Axis=conf.so_axis, dataset_type="background", Verbose=conf.verbose, Timer=t)[0] if t is not None: t.getTime(msg="After reading beam monitor data ") # Note: time_zero_offset_det MUST be a tuple if conf.time_zero_offset_det is not None: dp_som0.attr_list["Time_zero_offset_det"] = \ conf.time_zero_offset_det.toValErrTuple() # Note: time_zero_offset_mon MUST be a tuple if conf.time_zero_offset_mon is not None and not get_background: dbm_som0.attr_list["Time_zero_offset_mon"] = \ conf.time_zero_offset_mon.toValErrTuple() # Step 2: Convert TOF to wavelength for data and monitor if conf.verbose: print "Converting TOF to wavelength" if t is not None: t.getTime(False) # Convert beam monitor dbm_som1 = common_lib.tof_to_wavelength_lin_time_zero( dbm_som0, units="microsecond", time_zero_offset=conf.time_zero_offset_mon.toValErrTuple()) # Convert detector pixels dp_som1 = common_lib.tof_to_wavelength_lin_time_zero( dp_som0, units="microsecond", time_zero_offset=conf.time_zero_offset_det.toValErrTuple(), inst_param="total") if t is not None: t.getTime(msg="After converting TOF to wavelength ") del dp_som0, dbm_som0 if conf.verbose: print "Cutting spectra" if t is not None: t.getTime(False) dp_som2 = dr_lib.cut_spectra(dp_som1, conf.lambda_low_cut, conf.lambda_high_cut) dbm_som2 = dr_lib.cut_spectra(dbm_som1, conf.lambda_low_cut, conf.lambda_high_cut) if t is not None: t.getTime(msg="After cutting spectra ") del dp_som1, dbm_som1 # Put the data on the same axis dp_som3 = dr_lib.sum_by_rebin_frac(dp_som2, config.lambda_bins.toNessiList()) if tim is not None: tim.setOldTime(old_time) tim.getTime(msg="Total Running Time") | bb758ce3cbe25f73e8a8618bfaf541f06d48e121 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/763/bb758ce3cbe25f73e8a8618bfaf541f06d48e121/sas_background.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
1425,
16,
1658,
33,
7036,
4672,
3536,
1220,
707,
353,
1625,
326,
501,
20176,
1207,
5571,
2731,
18,
225,
632,
891,
642,
30,
1033,
4191,
326,
501,
20176,
1664,
1779,
18,
632,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
1425,
16,
1658,
33,
7036,
4672,
3536,
1220,
707,
353,
1625,
326,
501,
20176,
1207,
5571,
2731,
18,
225,
632,
891,
642,
30,
1033,
4191,
326,
501,
20176,
1664,
1779,
18,
632,
7... |
def exercise_construct_hierarchy(): pdb_inp = pdb.input(source_info=None, lines=flex.split_lines("""\ MODEL 1 ATOM 1 N MET A 1 6.215 22.789 24.067 1.00 0.00 N ATOM 2 CA MET A 1 6.963 22.789 22.822 1.00 0.00 C BREAK HETATM 3 C MET A 2 7.478 21.387 22.491 1.00 0.00 C ATOM 4 O MET A 2 8.406 20.895 23.132 1.00 0.00 O ENDMDL MODEL 3 HETATM 9 2H3 MPR B 5 16.388 0.289 6.613 1.00 0.08 SIGATM 9 2H3 MPR B 5 0.155 0.175 0.155 0.00 0.05 ANISOU 9 2H3 MPR B 5 848 848 848 0 0 0 SIGUIJ 9 2H3 MPR B 5 510 510 510 0 0 0 TER ATOM 10 N CYSCH 6 14.270 2.464 3.364 1.00 0.07 SIGATM 10 N CYSCH 6 0.012 0.012 0.011 0.00 0.00 ANISOU 10 N CYSCH 6 788 626 677 -344 621 -232 SIGUIJ 10 N CYSCH 6 3 13 4 11 6 13 TER ENDMDL END """)) assert [atom.name for atom in pdb_inp.atoms_v2()] \ == [" N ", " CA ", " C ", " O ", "2H3 ", " N "] sio = StringIO() root = pdb_inp.construct_hierarchy_v2() for model in root.models(): print >> sio, "m:", show_string(model.id) for chain in model.chains(): print >> sio, " c:", show_string(chain.id) for residue_group in chain.residue_groups(): print >> sio, " rg:", \ show_string(residue_group.resseq + residue_group.icode) atom_groups = residue_group.atom_groups() for atom_group in atom_groups: print >> sio, " ag:", \ show_string(atom_group.altloc), show_string(atom_group.resname) assert not show_diff(sio.getvalue(), """\ m: " 1" c: "A" rg: " 1 " ag: " " "MET" rg: " 2 " ag: " " "MET" m: " 3" c: "B" rg: " 5 " ag: " " "MPR" c: "CH" rg: " 6 " ag: " " "CYS" """) | def exercise_root(): r = pdb.hierarchy_v2.root() m = pdb.hierarchy_v2.model() assert m.parent() is None m = pdb.hierarchy_v2.model(parent=r) assert m.parent().memory_id() == r.memory_id() assert m.id == "" m = pdb.hierarchy_v2.model(parent=r, id="2") assert m.parent().memory_id() == r.memory_id() assert m.id == "2" del r assert m.parent() is None # r = pdb.hierarchy_v2.root() assert r.info.size() == 0 r.info.append("abc") assert r.info.size() == 1 r.info = flex.std_string(["a", "b"]) assert r.info.size() == 2 r.pre_allocate_models(number_of_additional_models=2) assert r.models_size() == 0 assert len(r.models()) == 0 m_a = r.new_model(id="3") assert m_a.parent().memory_id() == r.memory_id() assert r.models_size() == 1 assert len(r.models()) == 1 m_b = pdb.hierarchy_v2.model(id="5") assert m_b.parent() is None r.append_model(model=m_b) assert r.models_size() == 2 models = r.models() assert len(models) == 2 assert models[0].memory_id() == m_a.memory_id() assert models[1].memory_id() == m_b.memory_id() r.new_models(number_of_additional_models=3) assert r.models_size() == 5 assert len(r.models()) == 5 for model in r.models(): assert model.parent().memory_id() == r.memory_id() r.reset_atom_tmp(new_value=1) == 0 # rc = r.deep_copy() assert rc.memory_id() != r.memory_id() assert rc.models_size() == 5 assert rc.models()[0].memory_id() != r.models()[0].memory_id() assert rc.models()[0].id == "3" r.append_model(model=pdb.hierarchy_v2.model(id="7")) assert r.models_size() == 6 assert rc.models_size() == 5 assert [m.id for m in r.models()] == ["3", "5", "", "", "", "7"] assert [m.id for m in rc.models()] == ["3", "5", "", "", ""] rc.append_model(model=pdb.hierarchy_v2.model(id="8")) assert r.models_size() == 6 assert rc.models_size() == 6 assert [m.id for m in rc.models()] == ["3", "5", "", "", "", "8"] # r = rc.deep_copy() r.insert_model(i=4, model=pdb.hierarchy_v2.model(id="M")) assert [m.id for m in r.models()] \ == ["3", "5", "", "", "M", "", "8"] r.remove_model(i=1) assert [m.id for m in r.models()] \ == ["3", "", "", "M", "", "8"] m = r.models()[-1] assert m.parent().memory_id() == r.memory_id() assert r.find_model_index(model=m) == 5 r.remove_model(model=m) assert m.parent() is None assert r.find_model_index(model=m) == -1 try: r.find_model_index(model=m, must_be_present=True) except RuntimeError, e: assert str(e) == "model not in root." else: raise Exception_expected # r1 = pdb.hierarchy_v2.root() r2 = pdb.hierarchy_v2.root() m = pdb.hierarchy_v2.model() r1.append_model(model=m) try: r2.append_model(model=m) except RuntimeError, e: assert str(e) == "model has another parent root already." else: raise Exception_expected | cca1a1fb33826c5bad549fb7f4917f2fcf5727df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/696/cca1a1fb33826c5bad549fb7f4917f2fcf5727df/tst_hierarchy_v2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
67,
3085,
13332,
436,
273,
10892,
18,
17937,
67,
90,
22,
18,
3085,
1435,
312,
273,
10892,
18,
17937,
67,
90,
22,
18,
2284,
1435,
1815,
312,
18,
2938,
1435,
353,
599,
312,
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,
24165,
67,
3085,
13332,
436,
273,
10892,
18,
17937,
67,
90,
22,
18,
3085,
1435,
312,
273,
10892,
18,
17937,
67,
90,
22,
18,
2284,
1435,
1815,
312,
18,
2938,
1435,
353,
599,
312,
273,
... | |
else: | else: | def _setOpt(name, value, conv=None): '''set a module level value from environ/default''' from os import environ ename = 'RL_'+name if environ.has_key(ename): value = environ[ename] if conv: value = conv(value) globals()[name] = value | e1674f25178cd1fc3a685436f47cf30bd98aaf43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/e1674f25178cd1fc3a685436f47cf30bd98aaf43/rl_config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
6179,
12,
529,
16,
460,
16,
6292,
33,
7036,
4672,
9163,
542,
279,
1605,
1801,
460,
628,
5473,
19,
1886,
26418,
628,
1140,
1930,
5473,
570,
339,
273,
296,
54,
48,
4623,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
6179,
12,
529,
16,
460,
16,
6292,
33,
7036,
4672,
9163,
542,
279,
1605,
1801,
460,
628,
5473,
19,
1886,
26418,
628,
1140,
1930,
5473,
570,
339,
273,
296,
54,
48,
4623,
15,
... |
Creates an isolated vertex. | Creates an isolated vertex. If the vertex already exists, then nothing is done. | def add_vertex(self, name=None): """ Creates an isolated vertex. | c1f13518a0567dd441da00c1e985ef17c27f6c09 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c1f13518a0567dd441da00c1e985ef17c27f6c09/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
15281,
12,
2890,
16,
508,
33,
7036,
4672,
3536,
10210,
392,
25790,
5253,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
15281,
12,
2890,
16,
508,
33,
7036,
4672,
3536,
10210,
392,
25790,
5253,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
limm t1, "IntAddrPrefixIO" ld reg, intseg, [1, t1, t0], imm, addressSize=2 | limm t1, "IntAddrPrefixIO", dataSize=8 ld reg, intseg, [1, t1, t0], imm, addressSize=8 | def macroop IN_R_I { .adjust_imm trimImm(8) limm t1, "IntAddrPrefixIO" ld reg, intseg, [1, t1, t0], imm, addressSize=2 | 54e81506f2213c1ac3e6c928e1f003a1478ac9d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7385/54e81506f2213c1ac3e6c928e1f003a1478ac9d5/general_io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
2120,
67,
54,
67,
45,
288,
263,
13362,
67,
381,
81,
2209,
1170,
81,
12,
28,
13,
20167,
81,
268,
21,
16,
315,
1702,
3178,
2244,
4294,
6,
16916,
960,
16,
509,
5680,
16,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
2120,
67,
54,
67,
45,
288,
263,
13362,
67,
381,
81,
2209,
1170,
81,
12,
28,
13,
20167,
81,
268,
21,
16,
315,
1702,
3178,
2244,
4294,
6,
16916,
960,
16,
509,
5680,
16,
3... |
/.../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=foobar --restore=test_profile/__repository__.001 | /.../chandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=foobar --restore=test_profile/__repository__.001 | def runScriptPerfTests(options, testlist, largeData=False, repeat=1, logger=log): """ Run script performance tests. >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> runScriptPerfTests(options, ['foobar']) /.../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=foobar --create foobar 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runScriptPerfTests(options, ['foobar'], largeData=True) /.../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=foobar --restore=test_profile/__repository__.001 foobar 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> options.profile = True >>> runScriptPerfTests(options, ['foobar.py']) /.../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=foobar.py --catsProfile=test_profile/foobar.hotshot --create foobar.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False """ failed = False l = len(options.chandlerHome) + 1 timeLog = os.path.join(options.profileDir, 'time.log') if repeat == 1: just = 20 elif repeat == 2: just = 13 else: just = 6 for item in testlist: #$CHANDLERBIN/release/$RUN_CHANDLER --create --catch=tests # --profileDir="$PC_DIR" # --catsPerfLog="$TIME_LOG" # --scriptFile="$TESTNAME" &> $TESTLOG if item.startswith(options.chandlerHome): item = item[l:] name = item[item.rfind('/') + 1:] cmd = options.runchandler['release'][:] cmd += ['--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--catsPerfLog=%s' % timeLog, '--scriptFile=%s' % item, ] if options.profile: cmd += ['--catsProfile=%s.hotshot' % os.path.join(options.profileDir, name[:-3])] if not largeData: cmd += ['--create'] else: cmd += ['--restore=%s' % os.path.join(options.profileDir, '__repository__.001')] if options.params: cmd += [options.params] if options.verbose: log(' '.join(cmd)) values = [] log(name.ljust(33), newline=' ') for _x in range(repeat): if not options.dryrun: if os.path.isfile(timeLog): os.remove(timeLog) if options.dryrun: result = 0 else: tempLogger = DelayedLogger() result = build_lib.runCommand(cmd, timeout=1800, logger=tempLogger) if result != 0: if options.tbox: if result == -9: log("***Error: A timeout error has happened for %s" % name) log("***Error: The process output will be dumped below but it may be incomplete") log("***Error: due to the process either crashing or being killed.") # Strip OSAF_QA lines because we don't want to include # results from failed runs for args, kw in tempLogger.delayed: if not args[0].startswith('OSAF_QA: '): log(*args, **kw) else: tempLogger.logAll() log('***Error exit code=%d, %s' % (result, name)) failed = True failedTests.append(item) if not options.noStop: break else: if options.dryrun: value = 0.00 else: if os.path.isfile(timeLog): value = float(open(timeLog).readline()[:-1]) else: log('\ntimeLog [%s] not found' % timeLog) failed = True failedTests.append(item) if not options.noStop: break log(('%02.2f' % value).rjust(just), newline=' ') if not options.dryrun: values.append((value, tempLogger)) else: values.append((value, None)) if options.dryrun: log('- + ' * 15) else: tempLogger('- + ' * 15) else: try: originalValues = values[:] values.sort() value = values[repeat/2] log(' | ', newline='') log(('%02.2f' % value[0]).rjust(6) , newline='') log(u' \u00B1 '.encode('utf8'), newline='') # Unicode PLUS-MINUS SIGN log(('%02.2f' % stddev([x for x, _y in values])).rjust(6)) if not options.dryrun: if options.tbox: for args, kw in value[1].delayed: logger(*args, **kw) else: for _n, tempLogger in originalValues: for args, kw in tempLogger.delayed: logger(*args, **kw) except IndexError: if not options.noStop: raise if failed and not options.noStop: break return failed | 2268248f0e4728b63ca1842648cbad866d679472 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/2268248f0e4728b63ca1842648cbad866d679472/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3651,
22016,
14650,
12,
2116,
16,
1842,
1098,
16,
7876,
751,
33,
8381,
16,
7666,
33,
21,
16,
1194,
33,
1330,
4672,
3536,
1939,
2728,
9239,
7434,
18,
225,
4080,
702,
273,
1109,
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,
1086,
3651,
22016,
14650,
12,
2116,
16,
1842,
1098,
16,
7876,
751,
33,
8381,
16,
7666,
33,
21,
16,
1194,
33,
1330,
4672,
3536,
1939,
2728,
9239,
7434,
18,
225,
4080,
702,
273,
1109,
13... |
impl.addstmt(cxx.StmtReturn(cxx.ExprVar('NS_ERROR_NOT_IMPLEMENTED'))) | if md.ret.ptr: impl.addstmt(cxx.StmtReturn(cxx.ExprLiteral.ZERO)) else: impl.addstmt(cxx.StmtReturn(cxx.ExprVar('NS_ERROR_NOT_IMPLEMENTED'))) | def visitMethodDecl(self, md): if not md.pure: return decl = deepcopy(md) decl.pure = 0 impl = cxx.MethodDefn(cxx.MethodDecl(self.implname(md.name), params=md.params, ret=md.ret)) impl.addstmt(cxx.StmtReturn(cxx.ExprVar('NS_ERROR_NOT_IMPLEMENTED'))) | 3e953eeff35be65d798d548ce1aaeec6f4790a6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/3e953eeff35be65d798d548ce1aaeec6f4790a6a/lower.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25138,
3456,
12,
2890,
16,
3481,
4672,
309,
486,
3481,
18,
84,
594,
30,
327,
3496,
273,
7217,
12,
1264,
13,
3496,
18,
84,
594,
273,
374,
9380,
273,
276,
5279,
18,
1305,
3262,
82,
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,
25138,
3456,
12,
2890,
16,
3481,
4672,
309,
486,
3481,
18,
84,
594,
30,
327,
3496,
273,
7217,
12,
1264,
13,
3496,
18,
84,
594,
273,
374,
9380,
273,
276,
5279,
18,
1305,
3262,
82,
12,... |
evaluate it. */ var v = cell_id_list; var n = v.length; var i; //We want all of these evaluate cell requests to be made //synchronously so that they actually get evaluated in the //correct order. async_bool = false; for(i=0; i<n; i++) { var cell_input = get_cell(v[i]); var I = cell_input.value; if (first_variable_name_in_string(I).length > 0) { evaluate_cell(v[i],0); } } async_bool = true; | evaluate it. Previously, we just called evaluate on everything all at once. This is undesirable, since packets often arrive out-of-order, so the cells get evaluated out-of-order. Set the global variable evaluating_all = true. Then, we kick off evaluations by evaluating the first cell. In cell_evaluate_callback, we check to see if evaluating_all is set, and proceed from there. This way, each cell is evaluated immediately after the server acknowledges that it has received the previous request. */ evaluating_all = true; evaluating_all_cursor = 1; //start at 1 since we kick-off with zero evaluate_cell(cell_id_list[0],false); | def notebook_lib(): s= r""" | 66670ad902f6045d07338b1b8272763fcc764050 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/66670ad902f6045d07338b1b8272763fcc764050/js.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14718,
67,
2941,
13332,
272,
33,
436,
8395,
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,
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,
14718,
67,
2941,
13332,
272,
33,
436,
8395,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
list.sort(key=lambda x: int(x.track)) | list.sort(key=lambda x: int(getattr(x, 'track', 0))) | def browse_search_album_by_artist_and_year(self, artist, album, year): # Return songs of specified album, artist, and year. Sorts by track list = [] for item in self.conn.do.search('album', album, 'artist', artist): # Make sure it's an exact match: if artist.lower() == item.artist.lower() and album.lower() == item.album.lower(): # Make sure it also matches the year: if year != '0000' and item.has_key('date'): # Only show songs whose years match the year var: if int(item.date) == int(year): list.append(item) elif not item.has_key('date'): # Only show songs that have no year specified: list.append(item) list.sort(key=lambda x: int(x.track)) return list | 27ba6044a892640c1f1a018a32d43653e657b791 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/27ba6044a892640c1f1a018a32d43653e657b791/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21670,
67,
3072,
67,
25090,
67,
1637,
67,
25737,
67,
464,
67,
6874,
12,
2890,
16,
15469,
16,
14844,
16,
3286,
4672,
468,
2000,
272,
7260,
434,
1269,
14844,
16,
15469,
16,
471,
3286,
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,
21670,
67,
3072,
67,
25090,
67,
1637,
67,
25737,
67,
464,
67,
6874,
12,
2890,
16,
15469,
16,
14844,
16,
3286,
4672,
468,
2000,
272,
7260,
434,
1269,
14844,
16,
15469,
16,
471,
3286,
18... |
if photo['latitude'] and photo['longitude']: photos['photos']['geototal'] = photos['photos']['geototal']+1 photos['photos']['geototal'] = str(photos['photos']['geototal']) | logging.info("got tags "+photo['tags']) if photo['tags'].find('dopplr:trip='+str(trip_id)) > 0: photos['photos']['tagtotal'] = photos['photos']['tagtotal']+1 photo['dopplr'] = True; if photos['photos']['tagtotal']: photos['photos']['totag'] = str(int(photos['photos']['total'])-photos['photos']['tagtotal']) else: photos['photos']['totag'] = photos['photos']['total'] photos['photos']['tagtotal'] = str(photos['photos']['tagtotal']) | def get_flickr_tagtotal(photos, trip_id): photos['photos']['geototal'] = 0 for photo in photos['photos']['photo']: if photo['latitude'] and photo['longitude']: photos['photos']['geototal'] = photos['photos']['geototal']+1 # TODO coercion properly photos['photos']['geototal'] = str(photos['photos']['geototal']) return photos | e425f94039be132c5c08714f34523539cde128c3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11110/e425f94039be132c5c08714f34523539cde128c3/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2242,
16254,
67,
2692,
4963,
12,
29121,
16,
20654,
67,
350,
4672,
18185,
3292,
29121,
21712,
908,
352,
1568,
3546,
273,
374,
364,
10701,
316,
18185,
3292,
29121,
21712,
17232,
354... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2242,
16254,
67,
2692,
4963,
12,
29121,
16,
20654,
67,
350,
4672,
18185,
3292,
29121,
21712,
908,
352,
1568,
3546,
273,
374,
364,
10701,
316,
18185,
3292,
29121,
21712,
17232,
354... |
if user: | if user and hasattr(user, 'id') and user.id is not None: | def inline_cache_key(input_anchor, path, user=None): if user: return '%s_%s_%d_inline' % (input_anchor.id, path, user.id) else: return '%s_%s_anon_inline' % (input_anchor.id, path) | 900c5663ab8049c36a1d6c95e49d09c8970beb2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/900c5663ab8049c36a1d6c95e49d09c8970beb2d/render_qsd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6370,
67,
2493,
67,
856,
12,
2630,
67,
16215,
16,
589,
16,
729,
33,
7036,
4672,
309,
729,
471,
3859,
12,
1355,
16,
296,
350,
6134,
471,
729,
18,
350,
353,
486,
599,
30,
327,
1995,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6370,
67,
2493,
67,
856,
12,
2630,
67,
16215,
16,
589,
16,
729,
33,
7036,
4672,
309,
729,
471,
3859,
12,
1355,
16,
296,
350,
6134,
471,
729,
18,
350,
353,
486,
599,
30,
327,
1995,
... |
conf.set('tips', 'showonstartup', int(showTip)) conf.set('tips', 'tipindex', index) | conf.set('tips', 'showonstartup', showTip and 'true' or 'false') conf.set('tips', 'tipindex', str(index)) | def showTip(frame, forceShow=0): """ Displays tip of the day. Driven from and updates config file """ try: conf = createAndReadConfig('Explorer') except IOError: conf = None showTip, index = (1, 0) else: showTip = conf.getint('tips', 'showonstartup') index = conf.getint('tips', 'tipindex') if showTip or forceShow: tp = wx.CreateFileTipProvider(toPyPath('Docs/tips.txt'), index) showTip = wx.ShowTip(frame, tp, showTip) index = tp.GetCurrentTip() if conf: conf.set('tips', 'showonstartup', int(showTip)) conf.set('tips', 'tipindex', index) try: writeConfig(conf) except IOError: wx.LogError('Could not edit tips settings, please make ' 'sure that the Explorer.*.cfg file is not read only and you ' 'have sufficient priviledges to write to this file.') | 2880a79b57fa42c3ae86a32a9f44503e1df55435 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2880a79b57fa42c3ae86a32a9f44503e1df55435/Utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
14189,
12,
3789,
16,
2944,
5706,
33,
20,
4672,
3536,
9311,
87,
9529,
434,
326,
2548,
18,
225,
11473,
837,
628,
471,
4533,
642,
585,
3536,
775,
30,
2195,
273,
30545,
1994,
809,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
14189,
12,
3789,
16,
2944,
5706,
33,
20,
4672,
3536,
9311,
87,
9529,
434,
326,
2548,
18,
225,
11473,
837,
628,
471,
4533,
642,
585,
3536,
775,
30,
2195,
273,
30545,
1994,
809,
26... |
sage: print LatinSquare(3).ncols() | sage: LatinSquare(3).ncols() | def ncols(self): """ Number of columns in the latin square. | 79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21330,
12,
2890,
4672,
3536,
3588,
434,
2168,
316,
326,
30486,
8576,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21330,
12,
2890,
4672,
3536,
3588,
434,
2168,
316,
326,
30486,
8576,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
print "Configure.populate with locals=" + str(self.locals) | def populate(self, buildDeps = {}): print "Configure.populate with locals=" + str(self.locals) for local in self.locals: local.populate(buildDeps) | 021d0af4493896ff6811cfbbd2baaa38effbe930 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/021d0af4493896ff6811cfbbd2baaa38effbe930/dws.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
2890,
16,
1361,
14430,
273,
2618,
4672,
364,
1191,
316,
365,
18,
17977,
30,
1191,
18,
19936,
12,
3510,
14430,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
2890,
16,
1361,
14430,
273,
2618,
4672,
364,
1191,
316,
365,
18,
17977,
30,
1191,
18,
19936,
12,
3510,
14430,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
__chunk = proc.stdout.read(self.buffer_size) | _chunk = proc.stdout.read(self.buffer_size) | def core_process_stream(self, media): """Read media and stream data through a generator. Taken from Telemeta (see http://telemeta.org)""" | 95ceaf3edd8eef9223ea99bca356ceec4d029d9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12047/95ceaf3edd8eef9223ea99bca356ceec4d029d9f/deefuzz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2922,
67,
2567,
67,
3256,
12,
2890,
16,
3539,
4672,
3536,
1994,
3539,
471,
1407,
501,
3059,
279,
4456,
18,
399,
7940,
628,
399,
10037,
1066,
261,
5946,
1062,
2207,
88,
10037,
1066,
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,
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,
2922,
67,
2567,
67,
3256,
12,
2890,
16,
3539,
4672,
3536,
1994,
3539,
471,
1407,
501,
3059,
279,
4456,
18,
399,
7940,
628,
399,
10037,
1066,
261,
5946,
1062,
2207,
88,
10037,
1066,
18,
... |
'filestats': filestats, | 'filestats': filestats, 'annotated': annotated, | def _content_changes(old_node, new_node): """Returns the list of differences. | cc70563490d7c3f39bcda5f5030a195a2305acbb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9317/cc70563490d7c3f39bcda5f5030a195a2305acbb/changeset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1745,
67,
6329,
12,
1673,
67,
2159,
16,
394,
67,
2159,
4672,
3536,
1356,
326,
666,
434,
16440,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1745,
67,
6329,
12,
1673,
67,
2159,
16,
394,
67,
2159,
4672,
3536,
1356,
326,
666,
434,
16440,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
syntax are not considered. | syntax are not considered. | >>> def foo(x, y, z=-1.0, *args, **kw): | 21a68ea99cd4c7a3796743445f2f9d2a787ba562 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/21a68ea99cd4c7a3796743445f2f9d2a787ba562/Signature.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
8431,
12,
92,
16,
677,
16,
998,
29711,
21,
18,
20,
16,
380,
1968,
16,
2826,
9987,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
8431,
12,
92,
16,
677,
16,
998,
29711,
21,
18,
20,
16,
380,
1968,
16,
2826,
9987,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.assert_(msg.get_labels() == ['filed', 'resent']) | self.assertEqual(msg.get_labels(), ['filed', 'resent']) | def test_labels(self): # Get, set, join, and leave labels msg = mailbox.BabylMessage(_sample_message) self.assertEqual(msg.get_labels(), []) msg.set_labels(['foobar']) self.assertEqual(msg.get_labels(), ['foobar']) msg.set_labels([]) self.assertEqual(msg.get_labels(), []) msg.add_label('filed') self.assertEqual(msg.get_labels(), ['filed']) msg.add_label('resent') self.assert_(msg.get_labels() == ['filed', 'resent']) msg.add_label('resent') self.assert_(msg.get_labels() == ['filed', 'resent']) msg.remove_label('filed') self.assertEqual(msg.get_labels(), ['resent']) msg.add_label('foobar') self.assert_(msg.get_labels() == ['resent', 'foobar']) msg.remove_label('unseen') self.assert_(msg.get_labels() == ['resent', 'foobar']) msg.set_labels(['foobar', 'answered']) self.assert_(msg.get_labels() == ['foobar', 'answered']) | ea8344797e1a0ebd0b419ce14e16ab25af771fcc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/ea8344797e1a0ebd0b419ce14e16ab25af771fcc/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5336,
12,
2890,
4672,
468,
968,
16,
444,
16,
1233,
16,
471,
8851,
3249,
1234,
273,
14187,
18,
38,
24383,
80,
1079,
24899,
6358,
67,
2150,
13,
365,
18,
11231,
5812,
12,
3576,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5336,
12,
2890,
4672,
468,
968,
16,
444,
16,
1233,
16,
471,
8851,
3249,
1234,
273,
14187,
18,
38,
24383,
80,
1079,
24899,
6358,
67,
2150,
13,
365,
18,
11231,
5812,
12,
3576,
... |
response = conn_chan.request_post(self.url, headers=jsonheader, body=C1_full2_wrongtowner3) self.failUnlessEqual('400', response[u'headers']['status']) | response = conn_chan.request_post(self.url, headers=jsonheader, body=C12_full_wrongtowner3) self.failUnlessEqual('400', response[u'headers']['status']) self.failIf(response[u'body'].find("Database and payload owner for property/tag T2 do not match") == -1) | def test_AuthorizedAsChanWrongNewTagOwner(self): response = conn_chan.request_post(self.url, headers=jsonheader, body=C1_full2_wrongtowner3) self.failUnlessEqual('400', response[u'headers']['status']) | 091168d98667491ee6176464a27d5a3e2a269f75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6226/091168d98667491ee6176464a27d5a3e2a269f75/cftest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
15341,
1463,
6255,
13634,
1908,
1805,
5541,
12,
2890,
4672,
766,
273,
1487,
67,
7472,
18,
2293,
67,
2767,
12,
2890,
18,
718,
16,
1607,
33,
1977,
3374,
16,
1417,
33,
39,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
15341,
1463,
6255,
13634,
1908,
1805,
5541,
12,
2890,
4672,
766,
273,
1487,
67,
7472,
18,
2293,
67,
2767,
12,
2890,
18,
718,
16,
1607,
33,
1977,
3374,
16,
1417,
33,
39,
21,
... |
self.isIP = False | pass | def __init__(self, site, name, check=True): self.site = site self.name = name if not isinstance(self.name, unicode): self.name = unicode(self.name, 'utf8') self.exists = True # If we're not going to check, assume it does self.blocked = False self.editcount = -1 self.groups = [] if check: self.setUserInfo() self.isIP = False try: socket.inet_aton(self.name.replace(' ', '_')) self.isIP = True self.exists = False except: self.isIP = False self.page = page.Page(self.site, self.name, check=check, followRedir=False) | b9aefc11d6b4b2a80e09bd5fbdae2f41000dbcd1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8398/b9aefc11d6b4b2a80e09bd5fbdae2f41000dbcd1/user.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2834,
16,
508,
16,
866,
33,
5510,
4672,
365,
18,
4256,
273,
2834,
365,
18,
529,
273,
508,
309,
486,
1549,
12,
2890,
18,
529,
16,
5252,
4672,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2834,
16,
508,
16,
866,
33,
5510,
4672,
365,
18,
4256,
273,
2834,
365,
18,
529,
273,
508,
309,
486,
1549,
12,
2890,
18,
529,
16,
5252,
4672,
365,
18,
... |
isMultiComponent = preview.GetNumberOfScalarComponents()>1 | for unit in self.sourceunits: isMultiComponent = unit.getBitDepth() > unit.getSingleComponentBitDepth() if isMultiComponent: break | def doPreview(self, depth, renew, timePoint = 0): """ Makes a two-dimensional preview using the class-specific combination function Parameters: depth The preview depth renew Flag indicating, whether the preview should be regenerated or if a stored image can be reused timePoint The timepoint from which to generate the preview Defaults to 0 """ Logging.info("Creating preview",kw="dataunit") preview = None if timePoint > self.getNumberOfTimepoints(): timepoint = self.getNumberOfTimepoints() - 1 self.oldAlphaStatus = scripting.wantAlphaChannel if depth == scripting.WHOLE_DATASET_NO_ALPHA: scripting.wantAlphaChannel = 0 # If the previously requested preview was a "show original" preview # then we can just restore the preview before that without any # processing showOrig = self.settings.get("ShowOriginal") | 5ab84ae3fb47cec3dc170caeca2d9d6b294cc39c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2877/5ab84ae3fb47cec3dc170caeca2d9d6b294cc39c/CombinedDataUnit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
11124,
12,
2890,
16,
3598,
16,
15723,
16,
813,
2148,
273,
374,
4672,
3536,
490,
3223,
279,
2795,
17,
31236,
10143,
1450,
326,
667,
17,
12524,
10702,
445,
7012,
30,
3598,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
11124,
12,
2890,
16,
3598,
16,
15723,
16,
813,
2148,
273,
374,
4672,
3536,
490,
3223,
279,
2795,
17,
31236,
10143,
1450,
326,
667,
17,
12524,
10702,
445,
7012,
30,
3598,
202,
202,
... |
hasn't been loaded yet). The file is searched on sys.path.""" | hasn't been loaded yet). The file is searched on sys.path; the .py suffix may be omitted.""" | def help_cl(self): print """cl(ear) [lineno] | 18182467f8587275e35e28657065f285578822c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/18182467f8587275e35e28657065f285578822c4/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
830,
12,
2890,
4672,
1172,
3536,
830,
12,
2091,
13,
306,
17782,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
830,
12,
2890,
4672,
1172,
3536,
830,
12,
2091,
13,
306,
17782,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
print "[%r, %r, 1, %r, %r, %r, %r, %r]," % (testStr, commentStr, itemList, deg, sec, neatStr, outDMSStr) | print "[%r, %r, True, %r, %r, %r, %r, %r]," % (testStr, commentStr, itemList, deg, sec, neatStr, outDMSStr) | def _printTest(dmsSet = None): """Prints the results of running each routine on a set of test data. Data format is a list of tuples, each containing three elements: dmsStr to test, a comment, and isOK (true if the dmsStr is valid, false if not) The output is in the format used by _assertTest, but please use this with great caution. You must examine the output very carefully to confirm it is correct before updating _assertTest! """ print "Exercising RO string utilities" if not dmsSet: dmsSet = ( ("::", ""), ("-::", ""), (" +1", ""), ("-2.999998639", ""), # 3:00:00 = 3:00:00.0 = 3:00:00.00 = 2:59:59.9951 ("-2.999998583", ""), # 3:00:00 = 3:00:00.0 = 2:59:59.99 = 2:59:59.9949 ("-2.999986139", ""), # 3:00:00 = 3:00:00.0 = 2:59:59.95 = 2:59:59.9501 ("-2.999986083", ""), # 3:00:00 = 2:59:59.9 = 2:59:59.95 = 2:59:59.9499 ("-2.999861139", ""), # 2:59:59 = 2:59:59.5 = 2:59:59.50 = 2:59:59.5001 ("-2.999861083", ""), # 2:59:59 = 2:59:59.5 = 2:59:59.50 = 2:59:59.4999 ("-123::", ""), ("-123:4", ""), ("-123:45", ""), ("-123:4.56789", ""), ("-123:45.6789", ""), ("1:2:", ""), ("1:2:3", ""), ("1:2:3.456789", ""), ("1:23:4", ""), ("1:23:45", ""), ("123:45:6.789", ""), ("123:45:56.789", ""), ("-0::12.34", "bug test; the sign must be retained"), ("-::12.34", "a weird gray area, but it works"), ("::12.34", ""), ("1:23.4567", ""), ("-1.234567", ""), ("-1:abadstr", "invalid characters"), ("-1:2343:24", "too many minutes digits"), ("1:-1:24", "minus sign in wrong place"), ) for testStr, commentStr in dmsSet: # note: if splitDMSStr succeeds, then the other calls all should succeed if checkDMSStr(testStr): try: itemList = splitDMSStr(testStr) deg = degFromDMSStr (testStr) sec = secFromDMSStr (testStr) neatStr = neatenDMSStr (testStr) outDMSStr = [] for prec in range(3): outDMSStr.append(dmsStrFromDeg(deg, precision=prec)) print "[%r, %r, 1, %r, %r, %r, %r, %r]," % (testStr, commentStr, itemList, deg, sec, neatStr, outDMSStr) except StandardError, e: print "unexpected failure on %r (%s); error = %s" % (testStr, commentStr, e) else: print "[%r, %r, 0, %r, %r, %r, %r, %r]," % tuple([testStr, commentStr] + [None]*5) | a5c12743960cc44ddb0aa0f21361c8697521f18c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6354/a5c12743960cc44ddb0aa0f21361c8697521f18c/StringUtil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1188,
4709,
12,
72,
959,
694,
273,
599,
4672,
3536,
15402,
326,
1686,
434,
3549,
1517,
12245,
603,
279,
444,
434,
1842,
501,
18,
1910,
740,
353,
279,
666,
434,
10384,
16,
1517,
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,
389,
1188,
4709,
12,
72,
959,
694,
273,
599,
4672,
3536,
15402,
326,
1686,
434,
3549,
1517,
12245,
603,
279,
444,
434,
1842,
501,
18,
1910,
740,
353,
279,
666,
434,
10384,
16,
1517,
41... |
if samlSignonUri != '' or properties['samlSignonUri'] == None: | if samlSignonUri != None: | def UpdateSSOSettings(self, enableSSO=None, samlSignonUri=None, samlLogoutUri=None, changePasswordUri=None, ssoWhitelist=None, useDomainSpecificIssuer=None): """Update SSO Settings. | 61f724252631c404b4614b31975ab484ca6648fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/61f724252631c404b4614b31975ab484ca6648fd/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
1260,
51,
2628,
12,
2890,
16,
4237,
1260,
51,
33,
7036,
16,
22835,
2766,
265,
3006,
33,
7036,
16,
22835,
19456,
3006,
33,
7036,
16,
2549,
3913,
3006,
33,
7036,
16,
27250,
18927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2315,
1260,
51,
2628,
12,
2890,
16,
4237,
1260,
51,
33,
7036,
16,
22835,
2766,
265,
3006,
33,
7036,
16,
22835,
19456,
3006,
33,
7036,
16,
2549,
3913,
3006,
33,
7036,
16,
27250,
18927,
... |
self.action.setdefault('domain', '[]') | self.action.setdefault('pyson_domain', '[]') | def __init__(self, window, attrs=None): self.act_id = int(attrs['name']) self._window = window self.screen = None self.tree = None | eeb0c8c8fb0f2e1e50e9efcf641ff30642e4e8fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9151/eeb0c8c8fb0f2e1e50e9efcf641ff30642e4e8fa/action.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2742,
16,
3422,
33,
7036,
4672,
365,
18,
621,
67,
350,
273,
509,
12,
7039,
3292,
529,
19486,
365,
6315,
5668,
273,
2742,
365,
18,
9252,
273,
599,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2742,
16,
3422,
33,
7036,
4672,
365,
18,
621,
67,
350,
273,
509,
12,
7039,
3292,
529,
19486,
365,
6315,
5668,
273,
2742,
365,
18,
9252,
273,
599,
365,
... |
def __init__(self, userHandle="", screenName="", listType=None, group=None, status=None): | def __init__(self, userHandle="", screenName="", lists=0, groups=[], status=None): | def __init__(self, userHandle="", screenName="", listType=None, group=None, status=None): self.userHandle = userHandle self.screenName = screenName self.list = listType # list ('fl','rl','bl','al') self.group = group # group id (if applicable) self.status = status # current status | 9b2b7163e441396d9e5e7f46775cd7809b4655be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b2b7163e441396d9e5e7f46775cd7809b4655be/msn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
729,
3259,
1546,
3113,
5518,
461,
1546,
3113,
6035,
33,
20,
16,
3252,
22850,
6487,
1267,
33,
7036,
4672,
365,
18,
1355,
3259,
273,
729,
3259,
365,
18,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
729,
3259,
1546,
3113,
5518,
461,
1546,
3113,
6035,
33,
20,
16,
3252,
22850,
6487,
1267,
33,
7036,
4672,
365,
18,
1355,
3259,
273,
729,
3259,
365,
18,
92... |
return None | return 'nochange' | def get_initial_value(self, book_ids): value = None for book_id in book_ids: val = self.db.get_custom(book_id, num=self.col_id, index_is_id=True) if tweaks['bool_custom_columns_are_tristate'] == 'no' and val is None: val = False if value is not None and value != val: return None value = val return value | 9e756e0a9630bb5da8dec82fbc7a18cd6ce06f21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/9e756e0a9630bb5da8dec82fbc7a18cd6ce06f21/custom_column_widgets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
6769,
67,
1132,
12,
2890,
16,
6978,
67,
2232,
4672,
460,
273,
599,
364,
6978,
67,
350,
316,
6978,
67,
2232,
30,
1244,
273,
365,
18,
1966,
18,
588,
67,
3662,
12,
3618,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
6769,
67,
1132,
12,
2890,
16,
6978,
67,
2232,
4672,
460,
273,
599,
364,
6978,
67,
350,
316,
6978,
67,
2232,
30,
1244,
273,
365,
18,
1966,
18,
588,
67,
3662,
12,
3618,
67,
... |
aItems = self.scene().items() | aItems = self.areas | def doOcr(self): import codecs aItems = self.scene().items() numItems = len(aItems) | c96fe700768a9e60c39291ba6aac51eb800696fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2085/c96fe700768a9e60c39291ba6aac51eb800696fc/ocrwidget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
51,
3353,
12,
2890,
4672,
1930,
17437,
279,
3126,
273,
365,
18,
21766,
818,
3126,
273,
562,
12,
69,
3126,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
51,
3353,
12,
2890,
4672,
1930,
17437,
279,
3126,
273,
365,
18,
21766,
818,
3126,
273,
562,
12,
69,
3126,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if ctype.count('/') <> 1: raise ValueError, 'No maintype found in: %s' % ctype | def get_content_maintype(self): """Returns the message's main content type. | f303f0e3dd00833f27bdbf89dfb02776b474d74f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f303f0e3dd00833f27bdbf89dfb02776b474d74f/Message.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1745,
67,
81,
1598,
388,
12,
2890,
4672,
3536,
1356,
326,
883,
1807,
2774,
913,
618,
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... | [
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1745,
67,
81,
1598,
388,
12,
2890,
4672,
3536,
1356,
326,
883,
1807,
2774,
913,
618,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
tags = record[self.db.FIELD_MAP['tags']] | tags = record[FM['tags']] | def stanza(self, search=None, sortby=None, authorid=None, tagid=None, seriesid=None, offset=0): 'Feeds to read calibre books on a ipod with stanza.' books = [] updated = self.db.last_modified() offset = int(offset) cherrypy.response.headers['Last-Modified'] = self.last_modified(updated) cherrypy.response.headers['Content-Type'] = 'text/xml' # Main feed if not sortby and not search and not authorid and not tagid and not seriesid: return self.stanza_main(updated) if sortby in ('byseries', 'byauthor', 'bytag'): return self.stanza_sortby_subcategory(updated, sortby, offset) | 37bfe8109d9f641424f8ff122cea79b8ee9f279e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/37bfe8109d9f641424f8ff122cea79b8ee9f279e/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21650,
12,
2890,
16,
1623,
33,
7036,
16,
1524,
1637,
33,
7036,
16,
2869,
350,
33,
7036,
16,
1047,
350,
33,
7036,
16,
4166,
350,
33,
7036,
16,
1384,
33,
20,
4672,
296,
8141,
87,
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,
21650,
12,
2890,
16,
1623,
33,
7036,
16,
1524,
1637,
33,
7036,
16,
2869,
350,
33,
7036,
16,
1047,
350,
33,
7036,
16,
4166,
350,
33,
7036,
16,
1384,
33,
20,
4672,
296,
8141,
87,
358,
... |
""" fl_set_form_geometry(pForm, x, y, w, h) | """ fl_set_form_geometry(pForm, x, y, w, h) @params: <pForm> : pointer to form <x> : horizonthal position <y> : vertical position <w> : width of form <h> : height of form | def fl_set_form_geometry(pForm, x, y, w, h): """ fl_set_form_geometry(pForm, x, y, w, h) """ _fl_set_form_geometry = cfuncproto( load_so_libforms(), "fl_set_form_geometry", \ None, [cty.POINTER(FL_FORM), FL_Coord, FL_Coord, FL_Coord, FL_Coord], \ """void fl_set_form_geometry(FL_FORM * form, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h) """) ix = convert_to_FL_Coord(x) iy = convert_to_FL_Coord(y) iw = convert_to_FL_Coord(w) ih = convert_to_FL_Coord(h) keep_elem_refs(pForm, x, ix, y, iy, w, iw, h, ih) _fl_set_form_geometry(pForm, ix, iy, iw, ih) | bd6cf497d94f877a33a2bba90b9d74b9e4c950cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/bd6cf497d94f877a33a2bba90b9d74b9e4c950cb/library.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
687,
67,
14330,
12,
84,
1204,
16,
619,
16,
677,
16,
341,
16,
366,
4672,
3536,
1183,
67,
542,
67,
687,
67,
14330,
12,
84,
1204,
16,
619,
16,
677,
16,
341,
16,
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,
1183,
67,
542,
67,
687,
67,
14330,
12,
84,
1204,
16,
619,
16,
677,
16,
341,
16,
366,
4672,
3536,
1183,
67,
542,
67,
687,
67,
14330,
12,
84,
1204,
16,
619,
16,
677,
16,
341,
16,
3... |
log.debug("Adding new router record for %s.", router) | log.debug("Adding new router record for %s.", rid) | def new_desc_event(self, event): for rid in event.idlist: ns = self.conn.get_network_status("id/" + rid)[0] | 972256cced5cfeb52fac1d5193a9fc358c46d757 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/972256cced5cfeb52fac1d5193a9fc358c46d757/torbel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
67,
5569,
67,
2575,
12,
2890,
16,
871,
4672,
364,
10911,
316,
871,
18,
350,
1098,
30,
3153,
273,
365,
18,
4646,
18,
588,
67,
5185,
67,
2327,
2932,
350,
4898,
397,
10911,
25146,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
67,
5569,
67,
2575,
12,
2890,
16,
871,
4672,
364,
10911,
316,
871,
18,
350,
1098,
30,
3153,
273,
365,
18,
4646,
18,
588,
67,
5185,
67,
2327,
2932,
350,
4898,
397,
10911,
25146,
... |
'suspend_general': r"PM: Syncing filesystems.*", 'suspend_early': r"PM: suspend of devices complete after.*", 'suspend_noirq': r"PM: late suspend of devices complete after.*", 'suspend_cpu': r"PM: noirq suspend of devices complete after.*", 'resume_cpu': r"ACPI: Low-level resume complete.*", 'resume_noirq': r"ACPI: Waking up from system sleep state.*", 'resume_early': r"PM: noirq resume of devices complete after.*", 'resume_general': r"PM: early resume of devices complete after.*", 'resume_complete': r".*Restarting tasks \.\.\..*", | 'suspend_prepare': 'PM: Syncing filesystems.*', 'suspend': 'PM: Entering [a-z]* sleep.*', 'suspend_late': 'PM: suspend of devices complete after.*', 'suspend_noirq': 'PM: late suspend of devices complete after.*', 'suspend_machine': 'PM: noirq suspend of devices complete after.*', 'resume_machine': 'ACPI: Low-level resume complete.*', 'resume_noirq': 'ACPI: Waking up from system sleep state.*', 'resume_early': 'PM: noirq resume of devices complete after.*', 'resume': 'PM: early resume of devices complete after.*', 'resume_complete': 'PM: resume of devices complete after.*', 'post_resume': '.*Restarting tasks \.\.\..*', | def analyzeKernelLog(): global sysvals, data print("PROCESSING DATA") data.vprint("Analyzing the dmesg data...") if(os.path.exists(sysvals.dmesgfile) == False): print("ERROR: %s doesn't exist") % sysvals.dmesgfile return False lf = sortKernelLog() phase = "suspend_runtime" dm = { 'suspend_general': r"PM: Syncing filesystems.*", 'suspend_early': r"PM: suspend of devices complete after.*", 'suspend_noirq': r"PM: late suspend of devices complete after.*", 'suspend_cpu': r"PM: noirq suspend of devices complete after.*", 'resume_cpu': r"ACPI: Low-level resume complete.*", 'resume_noirq': r"ACPI: Waking up from system sleep state.*", 'resume_early': r"PM: noirq resume of devices complete after.*", 'resume_general': r"PM: early resume of devices complete after.*", 'resume_complete': r".*Restarting tasks \.\.\..*", } if(sysvals.suspendmode == "standby"): dm['resume_cpu'] = r"PM: Restoring platform NVS memory" elif(sysvals.suspendmode == "disk"): dm['suspend_early'] = r"PM: freeze of devices complete after.*" dm['suspend_noirq'] = r"PM: late freeze of devices complete after.*" dm['suspend_cpu'] = r"PM: noirq freeze of devices complete after.*" dm['resume_cpu'] = r"PM: Restoring platform NVS memory" dm['resume_early'] = r"PM: noirq restore of devices complete after.*" dm['resume_general'] = r"PM: early restore of devices complete after.*" action_start = 0.0 for line in lf: # -- preprocessing -- # parse each dmesg line into the time and message m = re.match(r".*(\[ *)(?P<ktime>[0-9\.]*)(\]) (?P<msg>.*)", line) if(m): ktime = float(m.group("ktime")) msg = m.group("msg") else: print line continue # -- phase changes -- # suspend_general start if(re.match(dm['suspend_general'], msg)): phase = "suspend_general" data.dmesg[phase]['start'] = ktime data.start = ktime # action start: syncing filesystems action_start = ktime # suspend_early start elif(re.match(dm['suspend_early'], msg)): data.dmesg["suspend_general"]['end'] = ktime phase = "suspend_early" data.dmesg[phase]['start'] = ktime # suspend_noirq start elif(re.match(dm['suspend_noirq'], msg)): data.dmesg["suspend_early"]['end'] = ktime phase = "suspend_noirq" data.dmesg[phase]['start'] = ktime # suspend_cpu start elif(re.match(dm['suspend_cpu'], msg)): data.dmesg["suspend_noirq"]['end'] = ktime phase = "suspend_cpu" data.dmesg[phase]['start'] = ktime # resume_cpu start elif(re.match(dm['resume_cpu'], msg)): data.tSuspended = ktime data.dmesg["suspend_cpu"]['end'] = ktime phase = "resume_cpu" data.dmesg[phase]['start'] = ktime # resume_noirq start elif(re.match(dm['resume_noirq'], msg)): data.dmesg["resume_cpu"]['end'] = ktime phase = "resume_noirq" data.dmesg[phase]['start'] = ktime # action end: ACPI resume data.newAction("resume_cpu", "ACPI", -1, "", action_start, ktime) # resume_early start elif(re.match(dm['resume_early'], msg)): data.dmesg["resume_noirq"]['end'] = ktime phase = "resume_early" data.dmesg[phase]['start'] = ktime # resume_general start elif(re.match(dm['resume_general'], msg)): data.dmesg["resume_early"]['end'] = ktime phase = "resume_general" data.dmesg[phase]['start'] = ktime # resume complete start elif(re.match(dm['resume_complete'], msg)): data.dmesg["resume_general"]['end'] = ktime data.end = ktime phase = "resume_runtime" break # -- device callbacks -- if(phase in data.phases): # device init call if(re.match(r"calling (?P<f>.*)\+ @ .*, parent: .*", msg)): sm = re.match(r"calling (?P<f>.*)\+ @ (?P<n>.*), parent: (?P<p>.*)", msg); f = sm.group("f") n = sm.group("n") p = sm.group("p") if(f and n and p): data.newAction(phase, f, int(n), p, ktime, -1) # device init return elif(re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs", msg)): sm = re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs(?P<a>.*)", msg); f = sm.group("f") t = sm.group("t") list = data.dmesg[phase]['list'] if(f in list): dev = list[f] dev['length'] = int(t) dev['end'] = ktime data.vprint("%15s [%f - %f] %s(%d) %s" % (phase, dev['start'], dev['end'], f, dev['pid'], dev['par'])) # -- phase specific actions -- if(phase == "suspend_general"): if(re.match(r"PM: Preparing system for mem sleep.*", msg)): data.newAction(phase, "filesystem-sync", -1, "", action_start, ktime) elif(re.match(r"Freezing user space processes .*", msg)): action_start = ktime elif(re.match(r"Freezing remaining freezable tasks.*", msg)): data.newAction(phase, "freeze-user-processes", -1, "", action_start, ktime) action_start = ktime elif(re.match(r"PM: Entering (?P<mode>[a-z,A-Z]*) sleep.*", msg)): data.newAction(phase, "freeze-tasks", -1, "", action_start, ktime) elif(phase == "suspend_cpu"): m = re.match(r"smpboot: CPU (?P<cpu>[0-9]*) is now offline", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"ACPI: Preparing to enter system sleep state.*", msg)): action_start = ktime elif(re.match(r"Disabling non-boot CPUs .*", msg)): data.newAction(phase, "ACPI", -1, "", action_start, ktime) action_start = ktime elif(phase == "resume_cpu"): m = re.match(r"CPU(?P<cpu>[0-9]*) is up", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"Enabling non-boot CPUs .*", msg)): action_start = ktime # fill in any missing phases lp = "suspend_general" for p in data.phases: if(p == "suspend_general"): continue if(data.dmesg[p]['start'] < 0): data.dmesg[p]['start'] = data.dmesg[lp]['end'] if(p == "resume_cpu"): data.tSuspended = data.dmesg[lp]['end'] if(data.dmesg[p]['end'] < 0): data.dmesg[p]['end'] = data.dmesg[p]['start'] lp = p data.fixupInitcallsThatDidntReturn() return True | 0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
11286,
1343,
13332,
2552,
2589,
4524,
16,
501,
225,
1172,
2932,
16560,
1360,
8730,
7923,
501,
18,
90,
1188,
2932,
979,
4647,
310,
326,
9113,
281,
75,
501,
7070,
13,
309,
12,
538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
11286,
1343,
13332,
2552,
2589,
4524,
16,
501,
225,
1172,
2932,
16560,
1360,
8730,
7923,
501,
18,
90,
1188,
2932,
979,
4647,
310,
326,
9113,
281,
75,
501,
7070,
13,
309,
12,
538,
... |
if key == 'host': | if key == 'host' or key in self.suppress_http_headers: | def __call__(self, environ, start_response): if (self.allowed_request_methods and environ['REQUEST_METHOD'].lower() not in self.allowed_request_methods): return httpexceptions.HTTPBadRequest("Disallowed")(environ, start_response) | 9186389aa7157fa80e47b513d6152b935e1ea72f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/9186389aa7157fa80e47b513d6152b935e1ea72f/proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
5473,
16,
787,
67,
2740,
4672,
309,
261,
2890,
18,
8151,
67,
2293,
67,
5163,
471,
5473,
3292,
5519,
67,
5327,
29489,
8167,
1435,
486,
316,
365,
18,
8151,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
5473,
16,
787,
67,
2740,
4672,
309,
261,
2890,
18,
8151,
67,
2293,
67,
5163,
471,
5473,
3292,
5519,
67,
5327,
29489,
8167,
1435,
486,
316,
365,
18,
8151,... |
try: import _types except ImportError: pass else: GetSetDescriptorType = type(_types.Helper.getter) MemberDescriptorType = type(_types.Helper.member) del _types | GetSetDescriptorType = type(FunctionType.func_code) MemberDescriptorType = type(FunctionType.func_globals) | def _m(self): pass | 77be775d440a0a278b7280dc3479a43dd10570cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/77be775d440a0a278b7280dc3479a43dd10570cf/types.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
81,
12,
2890,
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,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
81,
12,
2890,
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,
-100,
-100,
-100... |
phasors = fftpack.fft(sig_array.get_array(), pts) | sh = sig_array.get_shape() if len(sh) < 2: shp = (1, sh[0]) sig_array.reshape(shp) (num_sigs, num_samps) = sig_array.get_shape() phasors = fftpack.fft(sig_array.get_row_range(0,0), pts) out_ar = phasors for i in xrange(1,num_sigs): phasors = fftpack.fft(sig_array.get_row_range(i,i), pts) out_ar = numpy.vstack([out_ar, phasors]) | def compute(self): sig_array = self.getInputFromPort("Signals") | 8424cba9d41b218f67fe1a20b20c20bcc36816a0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/8424cba9d41b218f67fe1a20b20c20bcc36816a0/DSP.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
12,
2890,
4672,
3553,
67,
1126,
273,
365,
18,
588,
1210,
1265,
2617,
2932,
23346,
7923,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3671,
12,
2890,
4672,
3553,
67,
1126,
273,
365,
18,
588,
1210,
1265,
2617,
2932,
23346,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
closestpoints = orngStat.TCbestThresholdsOnROCcurve(self.FPcost, self.FNcost, self.pvalue, self.hullCurveDataForPerfLine) m = (self.FPcost*(1.0 - self.pvalue)) / (self.FNcost*self.pvalue) | closestpoints = orngStat.TCbestThresholdsOnROCcurve(self.FPcost, self.FNcost, self.pvalue, self.hullCurveDataForPerfLine) m = (self.FPcost*(1.0 - self.pvalue)) / (self.FNcost*self.pvalue) | def calcUpdatePerformanceLine(self): closestpoints = orngStat.TCbestThresholdsOnROCcurve(self.FPcost, self.FNcost, self.pvalue, self.hullCurveDataForPerfLine) m = (self.FPcost*(1.0 - self.pvalue)) / (self.FNcost*self.pvalue) | 1832fe731d06d489aaa3db4d1ce896cbc0b56df2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/1832fe731d06d489aaa3db4d1ce896cbc0b56df2/OWROC.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
1891,
25024,
1670,
12,
2890,
4672,
9219,
4139,
273,
578,
3368,
5000,
18,
15988,
12729,
7614,
87,
1398,
1457,
39,
16683,
12,
2890,
18,
30246,
12398,
16,
365,
18,
19793,
12398,
16,
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,
7029,
1891,
25024,
1670,
12,
2890,
4672,
9219,
4139,
273,
578,
3368,
5000,
18,
15988,
12729,
7614,
87,
1398,
1457,
39,
16683,
12,
2890,
18,
30246,
12398,
16,
365,
18,
19793,
12398,
16,
3... |
create_results_log(results, logdir, missing) | create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) | def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:m", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir="]) except getopt.error, msg: sys.stderr.write("%s: %s\n" % (sys.argv[0], msg)) sys.stderr.write("Try `%s --help' for more information\n" % sys.argv[0]) sys.exit(1) trace = 0 count = 0 report = 0 no_report = 0 counts_file = None logdir = "." missing = 0 ignore_modules = [] ignore_dirs = [] for opt, val in opts: if opt == "--help": usage(sys.stdout) sys.exit(0) if opt == "--version": sys.stdout.write("trace 2.0\n") sys.exit(0) if opt == "-t" or opt == "--trace": trace = 1 continue if opt == "-c" or opt == "--count": count = 1 continue if opt == "-r" or opt == "--report": report = 1 continue if opt == "-R" or opt == "--no-report": no_report = 1 continue if opt == "-f" or opt == "--file": counts_file = val continue if opt == "-d" or opt == "--logdir": logdir = val continue if opt == "-m" or opt == "--missing": missing = 1 continue if opt == "--ignore-module": ignore_modules.append(val) continue if opt == "--ignore-dir": for s in string.split(val, os.pathsep): s = os.path.expandvars(s) # should I also call expanduser? (after all, could use $HOME) s = string.replace(s, "$prefix", os.path.join(sys.prefix, "lib", "python" + sys.version[:3])) s = string.replace(s, "$exec_prefix", os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3])) s = os.path.normpath(s) ignore_dirs.append(s) continue assert 0, "Should never get here" if len(prog_argv) == 0: _err_exit("missing name of file to run") if count + trace + report > 1: _err_exit("can only specify one of --trace, --count or --report") if count + trace + report == 0: _err_exit("must specify one of --trace, --count or --report") if report and counts_file is None: _err_exit("--report requires a --file") if report and no_report: _err_exit("cannot specify both --report and --no-report") if logdir is not None: # warn if the directory doesn't exist, but keep on going # (is this the correct behaviour?) if not os.path.isdir(logdir): sys.stderr.write( "trace: WARNING, --logdir directory %s is not available\n" % `logdir`) sys.argv = prog_argv progname = prog_argv[0] if eval(sys.version[:3])>1.3: sys.path[0] = os.path.split(progname)[0] # ??? # everything is ready ignore = Ignore(ignore_modules, ignore_dirs) if trace: t = Trace(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err.strerror)) elif count: t = Coverage(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err.strerror)) except SystemExit: pass results = t.results() # Add another lookup from the program's file name to its import name # This give the right results, but I'm not sure why ... results.modules[progname] = os.path.splitext(progname)[0] if counts_file: # add in archived data, if available try: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) except IOError: pass else: results.update(CoverageResults(old_counts, old_modules)) if not no_report: create_results_log(results, logdir, missing) if counts_file: try: marshal.dump( (results.counts, results.modules), open(counts_file, 'wb')) except IOError, err: _err_exit("Cannot save counts file %s because: %s" % \ (`counts_file`, err.strerror)) elif report: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) results = CoverageResults(old_counts, old_modules) create_results_log(results, logdir, missing) else: assert 0, "Should never get here" | 66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
273,
599,
4672,
1930,
336,
3838,
225,
309,
5261,
353,
599,
30,
5261,
273,
2589,
18,
19485,
775,
30,
1500,
16,
11243,
67,
19485,
273,
336,
3838,
18,
588,
3838,
12,
1948... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
273,
599,
4672,
1930,
336,
3838,
225,
309,
5261,
353,
599,
30,
5261,
273,
2589,
18,
19485,
775,
30,
1500,
16,
11243,
67,
19485,
273,
336,
3838,
18,
588,
3838,
12,
1948... |
sage: sr = mq.SR(1,2,2,4) | sage: sr = mq.SR(1, 2, 2, 4) | def mix_columns_matrix(self): """ Return the MixColumns matrix. | 26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6843,
67,
5112,
67,
5667,
12,
2890,
4672,
3536,
2000,
326,
31043,
3380,
3148,
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,
6843,
67,
5112,
67,
5667,
12,
2890,
4672,
3536,
2000,
326,
31043,
3380,
3148,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.