rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
macostools.copy(fullname, os.path.join(destprefix, dest), 1) | try: macostools.copy(fullname, os.path.join(destprefix, dest), 1) except: print 'cwd', os.path.getcwd() print 'fsspec', macfs.FSSpec(fullname) sys.exit(1) | def rundir(self, path, destprefix, doit): files = os.listdir(path) todo = [] rv = 1 for f in files: if self.exc.match(f): continue fullname = os.path.join(path, f) if os.path.isdir(fullname): todo.append(fullname) else: dest = self.inc.match(fullname) if dest == None: print 'Not yet resolved:', fullname rv = 0 if dest: if doit: print 'COPY ', fullname print ' -> ', os.path.join(destprefix, dest) macostools.copy(fullname, os.path.join(destprefix, dest), 1) for d in todo: if not self.rundir(d, destprefix, doit): rv = 0 return rv | 582c3868c008e703f17b8c9b66ac4afe3ed2d047 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/582c3868c008e703f17b8c9b66ac4afe3ed2d047/MkDistr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
1074,
481,
12,
2890,
16,
589,
16,
1570,
3239,
16,
741,
305,
4672,
1390,
273,
1140,
18,
1098,
1214,
12,
803,
13,
10621,
273,
5378,
5633,
273,
404,
364,
284,
316,
1390,
30,
309,
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,
436,
1074,
481,
12,
2890,
16,
589,
16,
1570,
3239,
16,
741,
305,
4672,
1390,
273,
1140,
18,
1098,
1214,
12,
803,
13,
10621,
273,
5378,
5633,
273,
404,
364,
284,
316,
1390,
30,
309,
3... |
self.shapes=[[QwtSymbol.Ellipse]*(len(attributes)+1) for i in range(len(data))] self.sizes=[[5]*(len(attributes)+1) for i in range(len(data))] | self.shapes=[[QwtSymbol.Ellipse]*(len(discAttributes)+1) for i in range(len(data))] self.sizes=[[5]*(len(contAttributes)+1) for i in range(len(data))] | def setExampleTable(self, data): self.colorCombo.clear() self.sizeCombo.clear() self.shapeCombo.clear() self.nameCombo.clear() attributes=[attr for attr in data.domain.variables+data.domain.getmetas().values() or [] ] discAttributes=filter(lambda a: a.varType==orange.VarTypes.Discrete, attributes) contAttributes=filter(lambda a: a.varType==orange.VarTypes.Continuous, attributes) attrName=[attr.name for attr in attributes] for name in ["One color"]+attrName: self.colorCombo.insertItem(name) for name in ["One size"]+map(lambda a:a.name, contAttributes): self.sizeCombo.insertItem(name) for name in ["One shape"]+map(lambda a: a.name, discAttributes): self.shapeCombo.insertItem(name) for name in ["No name"]+attrName: self.nameCombo.insertItem(name) self.attributes=attributes self.discAttributes=discAttributes self.contAttributes=contAttributes | 0ded696c0dd471f9bd5f26eee159434806c2ed8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/0ded696c0dd471f9bd5f26eee159434806c2ed8f/OWMDS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
10908,
1388,
12,
2890,
16,
501,
4672,
365,
18,
3266,
16156,
18,
8507,
1435,
365,
18,
1467,
16156,
18,
8507,
1435,
365,
18,
4867,
16156,
18,
8507,
1435,
365,
18,
529,
16156,
18,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10908,
1388,
12,
2890,
16,
501,
4672,
365,
18,
3266,
16156,
18,
8507,
1435,
365,
18,
1467,
16156,
18,
8507,
1435,
365,
18,
4867,
16156,
18,
8507,
1435,
365,
18,
529,
16156,
18,
85... |
for entry in range(0, len(newEntries)): if newEntries[entry].link != self[entry].link: self[:] self.extend(newEntries) self.lastChange = datetime.utcnow() break | changes = True if len(self) == len(newEntries): for entry in range(0, len(newEntries) - 1): if newEntries[entry]['link'] != self[entry]['link']: break changes = False if changes: self[:] self.extend(newEntries) self.lastChange = datetime.utcnow() | def refresh(self, force=False): if not force and (datetime.utcnow() - self.lastPoll) < self.pollInterval: log.debug("Skipping refresh") return log.debug("Refreshing entries") newEntries = [] regex = re.compile('<img src="(.*)" alt="" />') feed = feedparser.parse(self.url) for entry in feed['entries'][:5]: # FIXME: use config info newEntries.append({ 'link' : entry['link'], 'title' : entry['title'], 'image' : regex.match(entry['summary']).group(1) }) for entry in range(0, len(newEntries)): if newEntries[entry].link != self[entry].link: self[:] self.extend(newEntries) self.lastChange = datetime.utcnow() break self.lastPoll = datetime.utcnow() | 6c74d5d6ad9d75c6788456ed21646d7a86e36b59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12732/6c74d5d6ad9d75c6788456ed21646d7a86e36b59/controllers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
12,
2890,
16,
2944,
33,
8381,
4672,
309,
486,
2944,
471,
261,
6585,
18,
17892,
3338,
1435,
300,
365,
18,
2722,
19085,
13,
411,
365,
18,
13835,
4006,
30,
613,
18,
4148,
2932,
1687... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
12,
2890,
16,
2944,
33,
8381,
4672,
309,
486,
2944,
471,
261,
6585,
18,
17892,
3338,
1435,
300,
365,
18,
2722,
19085,
13,
411,
365,
18,
13835,
4006,
30,
613,
18,
4148,
2932,
1687... |
return S_OK(totalSeconds-valid) else: result = S_ERROR('Proxy is not valid for the requested length') result['Value'] = totalSeconds-valid | return S_OK( totalSeconds - valid ) else: result = S_ERROR( 'Proxy is not valid for the requested length' ) result['Value'] = totalSeconds - valid | def isProxyValid(self,valid=1000): """ Check if the stored proxy is valid """ if not self.valid: result = S_ERROR('Proxy is not valid for the requested length') result['Value'] = 0 return result delta = self.valid - dateTime() totalSeconds = delta[0]*86400+delta[1] if totalSeconds > valid: return S_OK(totalSeconds-valid) else: result = S_ERROR('Proxy is not valid for the requested length') result['Value'] = totalSeconds-valid return result | 3d103a1ec7530dcfac38e6ccc642be862e663b73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3d103a1ec7530dcfac38e6ccc642be862e663b73/ComputingElement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
3886,
1556,
12,
2890,
16,
877,
33,
18088,
4672,
3536,
2073,
309,
326,
4041,
2889,
353,
923,
3536,
309,
486,
365,
18,
877,
30,
563,
273,
348,
67,
3589,
2668,
3886,
353,
486,
923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
3886,
1556,
12,
2890,
16,
877,
33,
18088,
4672,
3536,
2073,
309,
326,
4041,
2889,
353,
923,
3536,
309,
486,
365,
18,
877,
30,
563,
273,
348,
67,
3589,
2668,
3886,
353,
486,
923,
... |
CRC = 0 compress_size = 0 file_size = 0 | def write(self, filename, arcname=None, compress_type=None): """Put the bytes from filename into the archive under the name arcname.""" st = os.stat(filename) mtime = time.localtime(st[8]) date_time = mtime[0:6] # Create ZipInfo instance to store file information if arcname is None: zinfo = ZipInfo(filename, date_time) else: zinfo = ZipInfo(arcname, date_time) zinfo.external_attr = st[0] << 16 # Unix attributes if compress_type is None: zinfo.compress_type = self.compression else: zinfo.compress_type = compress_type self._writecheck(zinfo) fp = open(filename, "rb") zinfo.flag_bits = 0x08 zinfo.header_offset = self.fp.tell() # Start of header bytes self.fp.write(zinfo.FileHeader()) zinfo.file_offset = self.fp.tell() # Start of file bytes CRC = 0 compress_size = 0 file_size = 0 if zinfo.compress_type == ZIP_DEFLATED: cmpr = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION, zlib.DEFLATED, -15) else: cmpr = None while 1: buf = fp.read(1024 * 8) if not buf: break file_size = file_size + len(buf) CRC = binascii.crc32(buf, CRC) if cmpr: buf = cmpr.compress(buf) compress_size = compress_size + len(buf) self.fp.write(buf) fp.close() if cmpr: buf = cmpr.flush() compress_size = compress_size + len(buf) self.fp.write(buf) zinfo.compress_size = compress_size else: zinfo.compress_size = file_size zinfo.CRC = CRC zinfo.file_size = file_size # Write CRC and file sizes after the file data self.fp.write(struct.pack("<lll", zinfo.CRC, zinfo.compress_size, zinfo.file_size)) self.filelist.append(zinfo) self.NameToInfo[zinfo.filename] = zinfo | e74bef3dea4e4f414731e66172d3f9679104bbc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e74bef3dea4e4f414731e66172d3f9679104bbc3/zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
1544,
16,
8028,
529,
33,
7036,
16,
8099,
67,
723,
33,
7036,
4672,
3536,
6426,
326,
1731,
628,
1544,
1368,
326,
5052,
3613,
326,
508,
8028,
529,
12123,
384,
273,
114... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
1544,
16,
8028,
529,
33,
7036,
16,
8099,
67,
723,
33,
7036,
4672,
3536,
6426,
326,
1731,
628,
1544,
1368,
326,
5052,
3613,
326,
508,
8028,
529,
12123,
384,
273,
114... | |
'name': fields.char('Name',size=64, required=True), 'code': fields.char('Code',size=64, required=True) | 'name': fields.char('Name',size=64, required=True), 'code': fields.char('Code',size=64, required=True) | def _log_event(self, cr, uid, project_id, values={}, context={}): obj_project_event = self.pool.get('project.event') values['project_id'] = project_id obj_project_event.create(cr, uid, values) | 0944b6859f82afb44e3d9bec8c41e264c9e0a66e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/0944b6859f82afb44e3d9bec8c41e264c9e0a66e/project_event.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1330,
67,
2575,
12,
2890,
16,
4422,
16,
4555,
16,
1984,
67,
350,
16,
924,
28793,
819,
12938,
4672,
1081,
67,
4406,
67,
2575,
273,
365,
18,
6011,
18,
588,
2668,
4406,
18,
2575,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1330,
67,
2575,
12,
2890,
16,
4422,
16,
4555,
16,
1984,
67,
350,
16,
924,
28793,
819,
12938,
4672,
1081,
67,
4406,
67,
2575,
273,
365,
18,
6011,
18,
588,
2668,
4406,
18,
2575,
6... |
elif o in ('--stage'): | elif o in ('--stage',): | def do_mem(self, argv): | 67b8280e3e3a5fcdde21a536adf595f1d889e4da /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12817/67b8280e3e3a5fcdde21a536adf595f1d889e4da/scons-time.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3917,
12,
2890,
16,
5261,
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,
741,
67,
3917,
12,
2890,
16,
5261,
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,
... |
self.callCallbacks(self.EVENT_UPGRADE, data.split(' ', 1)[1].split(' ')[0]) | if self.opkgAvail: self.callCallbacks(self.EVENT_UPGRADE, data.split(' ', 1)[1].split(' ')[0]) else: self.callCallbacks(self.EVENT_UPGRADE, data.split(' ', 1)[1].split(' ')[0]) | def parseLine(self, data): if self.currentCommand == self.CMD_LIST: item = data.split(' - ', 2) self.fetchedList.append(item) self.callCallbacks(self.EVENT_LISTITEM, item) else: if data.find('Downloading') == 0: self.callCallbacks(self.EVENT_DOWNLOAD, data.split(' ', 5)[1].strip()) elif data.find('Upgrading') == 0: self.callCallbacks(self.EVENT_UPGRADE, data.split(' ', 1)[1].split(' ')[0]) elif data.find('Installing') == 0: self.callCallbacks(self.EVENT_INSTALL, data.split(' ', 1)[1].split(' ')[0]) elif data.find('Removing') == 0: self.callCallbacks(self.EVENT_REMOVE, data.split(' ', 1)[1].split(' ')[1]) elif data.find('Configuring') == 0: self.callCallbacks(self.EVENT_CONFIGURING, data.split(' ', 1)[1].split(' ')[0]) elif data.find('An error occurred') == 0: self.callCallbacks(self.EVENT_ERROR, None) elif data.find('Failed to download') == 0: self.callCallbacks(self.EVENT_ERROR, None) elif data.find('ipkg_download: ERROR:') == 0: self.callCallbacks(self.EVENT_ERROR, None) elif data.find(' Configuration file \'') >= 0: # Note: the config file update question doesn't end with a newline, so # if we get multiple config file update questions, the next ones # don't necessarily start at the beginning of a line self.callCallbacks(self.EVENT_MODIFIED, data.split(' \'', 1)[1][:-1]) | 626e2215066e3ed3efddb7edf12b41eda9d6ce50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/626e2215066e3ed3efddb7edf12b41eda9d6ce50/Ipkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1670,
12,
2890,
16,
501,
4672,
309,
365,
18,
2972,
2189,
422,
365,
18,
19473,
67,
7085,
30,
761,
273,
501,
18,
4939,
2668,
300,
2265,
576,
13,
365,
18,
5754,
18073,
18,
6923,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1670,
12,
2890,
16,
501,
4672,
309,
365,
18,
2972,
2189,
422,
365,
18,
19473,
67,
7085,
30,
761,
273,
501,
18,
4939,
2668,
300,
2265,
576,
13,
365,
18,
5754,
18073,
18,
6923,
1... |
M = matrix(R, n, n, D, sparse=sparse) | M = matrix(IntegerRing(), n, n, D, sparse=sparse) | def adjacency_matrix(self, sparse=True, boundary_first=False, over_integers=False): """ Returns the adjacency matrix of the (di)graph. Each vertex is represented by its position in the list returned by the vertices() function. If the (di)graph allows multiple edges, then the returned matrix is over the integers, otherwise it is over the ring with two elements. INPUT: sparse -- whether to represent with a sparse matrix boundary_first -- whether to represent the boundary vertices in the upper left block over_integers -- overrides checking multiple edges EXAMPLES: sage: G = graphs.CubeGraph(4) sage: G.adjacency_matrix() [0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0] [1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0] [1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0] [0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0] [1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0] [0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0] [0 0 1 0 1 0 0 1 0 0 0 0 0 0 1 0] [0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1] [1 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0] [0 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0] [0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0] [0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1] [0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0] [0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1] [0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1] [0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0] | 39b2a213a8aeef7d16cd713c8bb40a26ea0177df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/39b2a213a8aeef7d16cd713c8bb40a26ea0177df/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25220,
67,
5667,
12,
2890,
16,
9387,
33,
5510,
16,
7679,
67,
3645,
33,
8381,
16,
1879,
67,
14970,
414,
33,
8381,
4672,
3536,
2860,
326,
25220,
3148,
434,
326,
261,
3211,
13,
4660,
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,
25220,
67,
5667,
12,
2890,
16,
9387,
33,
5510,
16,
7679,
67,
3645,
33,
8381,
16,
1879,
67,
14970,
414,
33,
8381,
4672,
3536,
2860,
326,
25220,
3148,
434,
326,
261,
3211,
13,
4660,
18,
... |
def readgitpatch(fp, firstline): | def readgitpatch(fp, firstline=None): | def readgitpatch(fp, firstline): """extract git-style metadata about patches from <patchname>""" class gitpatch: "op is one of ADD, DELETE, RENAME, MODIFY or COPY" def __init__(self, path): self.path = path self.oldpath = None self.mode = None self.op = 'MODIFY' self.copymod = False self.lineno = 0 self.binary = False def reader(fp, firstline): yield firstline for line in fp: yield line # Filter patch for git information gitre = re.compile('diff --git a/(.*) b/(.*)') gp = None gitpatches = [] # Can have a git patch with only metadata, causing patch to complain dopatch = 0 lineno = 0 for line in reader(fp, firstline): lineno += 1 if line.startswith('diff --git'): m = gitre.match(line) if m: if gp: gitpatches.append(gp) src, dst = m.group(1, 2) gp = gitpatch(dst) gp.lineno = lineno elif gp: if line.startswith('--- '): if gp.op in ('COPY', 'RENAME'): gp.copymod = True dopatch |= GP_FILTER gitpatches.append(gp) gp = None dopatch |= GP_PATCH continue if line.startswith('rename from '): gp.op = 'RENAME' gp.oldpath = line[12:].rstrip() elif line.startswith('rename to '): gp.path = line[10:].rstrip() elif line.startswith('copy from '): gp.op = 'COPY' gp.oldpath = line[10:].rstrip() elif line.startswith('copy to '): gp.path = line[8:].rstrip() elif line.startswith('deleted file'): gp.op = 'DELETE' elif line.startswith('new file mode '): gp.op = 'ADD' gp.mode = int(line.rstrip()[-3:], 8) elif line.startswith('new mode '): gp.mode = int(line.rstrip()[-3:], 8) elif line.startswith('GIT binary patch'): dopatch |= GP_BINARY gp.binary = True if gp: gitpatches.append(gp) if not gitpatches: dopatch = GP_PATCH return (dopatch, gitpatches) | 5636d52ec05ad9b16844c9ce646859e0ecd81642 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/5636d52ec05ad9b16844c9ce646859e0ecd81642/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
6845,
2272,
12,
7944,
16,
1122,
1369,
33,
7036,
4672,
3536,
8004,
5071,
17,
4060,
1982,
2973,
16482,
628,
411,
2272,
529,
2984,
3660,
667,
5071,
2272,
30,
315,
556,
353,
1245,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6845,
2272,
12,
7944,
16,
1122,
1369,
33,
7036,
4672,
3536,
8004,
5071,
17,
4060,
1982,
2973,
16482,
628,
411,
2272,
529,
2984,
3660,
667,
5071,
2272,
30,
315,
556,
353,
1245,
434,
... |
self.rgenop.openbuilders -= 1 | def _close(self): self.closed = True self.mc.done() self.rgenop.close_mc(self.mc) self.mc = None self.rgenop.openbuilders -= 1 #os.write(1, 'Open builders-: %d\n' % self.rgenop.openbuilders) | 545a67bcfa7398abc9e7ff2a3f249aeea9acb650 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/545a67bcfa7398abc9e7ff2a3f249aeea9acb650/rgenop.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4412,
12,
2890,
4672,
365,
18,
12204,
273,
1053,
365,
18,
13952,
18,
8734,
1435,
365,
18,
86,
4507,
556,
18,
4412,
67,
13952,
12,
2890,
18,
13952,
13,
365,
18,
13952,
273,
599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4412,
12,
2890,
4672,
365,
18,
12204,
273,
1053,
365,
18,
13952,
18,
8734,
1435,
365,
18,
86,
4507,
556,
18,
4412,
67,
13952,
12,
2890,
18,
13952,
13,
365,
18,
13952,
273,
599,
... | |
packageDir = os.path.dirname(package.__file__) | def loadPackageRecursive(self, package): packageDir = os.path.dirname(package.__file__) suite = self.suiteFactory() os.path.walk(packageDir, self._packageRecurse, suite) return suite | 4f2abefec014ce51b87f0fa3e8ca3cce6a6c6b04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4f2abefec014ce51b87f0fa3e8ca3cce6a6c6b04/runner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
2261,
10483,
12,
2890,
16,
2181,
4672,
11371,
273,
365,
18,
30676,
1733,
1435,
1140,
18,
803,
18,
11348,
12,
5610,
1621,
16,
365,
6315,
5610,
426,
17682,
16,
11371,
13,
327,
11371,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
2261,
10483,
12,
2890,
16,
2181,
4672,
11371,
273,
365,
18,
30676,
1733,
1435,
1140,
18,
803,
18,
11348,
12,
5610,
1621,
16,
365,
6315,
5610,
426,
17682,
16,
11371,
13,
327,
11371,... | |
[A,B] = numpy.dot([[dc**2, -db**2],[-dc**3, db**3]],[fb-fa-C*db,fc-fa-C*dc]) | d1 = empty((2,2)) d1[0,0] = dc**2 d1[0,1] = -db**2 d1[1,0] = -dc**3 d1[1,1] = db**3 [A,B] = numpy.dot(d1,asarray([fb-fa-C*db,fc-fa-C*dc]).flatten()) | def _cubicmin(a,fa,fpa,b,fb,c,fc): # finds the minimizer for a cubic polynomial that goes through the # points (a,fa), (b,fb), and (c,fc) with derivative at a of fpa. # # if no minimizer can be found return None # # f(x) = A *(x-a)^3 + B*(x-a)^2 + C*(x-a) + D C = fpa D = fa db = b-a dc = c-a if (db == 0) or (dc == 0) or (b==c): return None denom = (db*dc)**2 * (db-dc) [A,B] = numpy.dot([[dc**2, -db**2],[-dc**3, db**3]],[fb-fa-C*db,fc-fa-C*dc]) A /= denom B /= denom radical = B*B-3*A*C if radical < 0: return None if (A == 0): return None xmin = a + (-B + sqrt(radical))/(3*A) return xmin | 5b37f823eba2026f7252af30b986ae43fe285a85 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/5b37f823eba2026f7252af30b986ae43fe285a85/optimize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
71,
17616,
1154,
12,
69,
16,
507,
16,
7944,
69,
16,
70,
16,
19192,
16,
71,
16,
7142,
4672,
468,
13094,
326,
18172,
1824,
364,
279,
31247,
16991,
716,
13998,
3059,
326,
468,
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,
389,
71,
17616,
1154,
12,
69,
16,
507,
16,
7944,
69,
16,
70,
16,
19192,
16,
71,
16,
7142,
4672,
468,
13094,
326,
18172,
1824,
364,
279,
31247,
16991,
716,
13998,
3059,
326,
468,
225,
... |
self.center = (self.ctx_map.coord_to_tile(coord[2], coord[0], coord[1]), (0,0)) | self.center = (self.ctx_map.coord_to_tile(coord[2], coord[0], coord[1]), (googleMaps.TILES_WIDTH / 2, googleMaps.TILES_HEIGHT / 2)) | def confirm_clicked(self, button): location = self.entry.get_text() if (0 == len(location)): self.error_msg("Need location") return locations = self.ctx_map.get_locations() if (not location in locations.keys()): if (not self.cb_offline.get_active()): l = self.ctx_map.search_location(location) if (False == l): self.error_msg( "Can't find %s in google map" % location) self.entry.set_text("") return location = l; self.entry.set_text(l) self.set_completion() coord = self.ctx_map.get_locations()[location] else: self.error_msg("Offline mode, cannot do search") return else: coord = locations[location] print "%s at %f, %f" % (location, coord[0], coord[1]) | 8a7c1806fe443b57b096303ec847af759b73be2a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5373/8a7c1806fe443b57b096303ec847af759b73be2a/maps.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6932,
67,
7475,
329,
12,
2890,
16,
3568,
4672,
2117,
273,
365,
18,
4099,
18,
588,
67,
955,
1435,
309,
261,
20,
422,
562,
12,
3562,
3719,
30,
365,
18,
1636,
67,
3576,
2932,
14112,
211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6932,
67,
7475,
329,
12,
2890,
16,
3568,
4672,
2117,
273,
365,
18,
4099,
18,
588,
67,
955,
1435,
309,
261,
20,
422,
562,
12,
3562,
3719,
30,
365,
18,
1636,
67,
3576,
2932,
14112,
211... |
"stbl": (AtomList, "stbl", ""), | "stbl": (AtomList, "stbl", "Sample Table"), "stco": (STCO, "stsd", "Sample Table Chunk Offset"), "stsd": (STSD, "stsd", "Sample Table Sample Description"), "stss": (STSS, "stss", "Sample Table Sync Samples"), "stsz": (STSZ, "stsz", "Sample Table Sizes"), | def createFields(self): yield UInt32(self, "unk") yield AtomList(self, "tags") | 3b1d5b3fc1813e8ce461e86889a0bbdd5760acb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9327/3b1d5b3fc1813e8ce461e86889a0bbdd5760acb3/mov.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
2314,
12,
2890,
4672,
2824,
29810,
1578,
12,
2890,
16,
315,
1683,
7923,
2824,
7149,
682,
12,
2890,
16,
315,
4156,
7923,
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,
752,
2314,
12,
2890,
4672,
2824,
29810,
1578,
12,
2890,
16,
315,
1683,
7923,
2824,
7149,
682,
12,
2890,
16,
315,
4156,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
"""%(number, number+1)) | """%(save_name, number, number+1)) | def __show_page(self, number): global current_log f = self.send_head() if f: f = StringIO() f.write(""" <html><head><title>SAGE Calculator (%s)</title></head>\n <script language=javascript> function scroll_to_bottom() { document.getElementById(%s).scrollIntoView(); document.io%s.elements[0].focus(); } | 43fdf3632d1b09b70ef8dab59bc90d4d77c1aa50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/43fdf3632d1b09b70ef8dab59bc90d4d77c1aa50/server1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4500,
67,
2433,
12,
2890,
16,
1300,
4672,
2552,
783,
67,
1330,
284,
273,
365,
18,
4661,
67,
1978,
1435,
309,
284,
30,
284,
273,
15777,
1435,
284,
18,
2626,
2932,
3660,
411,
2620,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4500,
67,
2433,
12,
2890,
16,
1300,
4672,
2552,
783,
67,
1330,
284,
273,
365,
18,
4661,
67,
1978,
1435,
309,
284,
30,
284,
273,
15777,
1435,
284,
18,
2626,
2932,
3660,
411,
2620,... |
return event.keyval in (up, down, tab) def __init__(self, window): gtk.Entry.__init__(self) self.win = window | def keypress(self, event): key = '' for k, c in ((gtk.gdk.CONTROL_MASK, '^'), (gtk.gdk.SHIFT_MASK, '+'), (gtk.gdk.MOD1_MASK, '!')): if event.state & k: key += c key += gtk.gdk.keyval_name(event.keyval) | 2631c07796dcf7037172d498dd143ecb83327d4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/2631c07796dcf7037172d498dd143ecb83327d4f/widgets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
1028,
12,
2890,
16,
871,
4672,
498,
273,
875,
364,
417,
16,
276,
316,
14015,
4521,
79,
18,
75,
2883,
18,
18248,
67,
11704,
16,
19161,
3631,
261,
4521,
79,
18,
75,
2883,
18,
2319... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
1028,
12,
2890,
16,
871,
4672,
498,
273,
875,
364,
417,
16,
276,
316,
14015,
4521,
79,
18,
75,
2883,
18,
18248,
67,
11704,
16,
19161,
3631,
261,
4521,
79,
18,
75,
2883,
18,
2319... | |
if multiple_edges or over_integers: from sage.rings.integer_ring import IntegerRing R = IntegerRing() else: from sage.rings.integer_mod_ring import IntegerModRing R = IntegerModRing(2) | from sage.rings.integer_ring import IntegerRing | def adjacency_matrix(self, sparse=True, boundary_first=False, over_integers=False): """ Returns the adjacency matrix of the (di)graph. Each vertex is represented by its position in the list returned by the vertices() function. | eed3623c0caa3c0a2126620432702d05dae34083 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/eed3623c0caa3c0a2126620432702d05dae34083/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25220,
67,
5667,
12,
2890,
16,
9387,
33,
5510,
16,
7679,
67,
3645,
33,
8381,
16,
1879,
67,
14970,
414,
33,
8381,
4672,
3536,
2860,
326,
25220,
3148,
434,
326,
261,
3211,
13,
4660,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25220,
67,
5667,
12,
2890,
16,
9387,
33,
5510,
16,
7679,
67,
3645,
33,
8381,
16,
1879,
67,
14970,
414,
33,
8381,
4672,
3536,
2860,
326,
25220,
3148,
434,
326,
261,
3211,
13,
4660,
18,
... |
self.get_weight(path, key, mod))) | self.get_weight(path, key, mod))) | def fill_actions(self): self.actions_view.set_model(None) | 97e48fe37f3d792fabd0f9148ef2bcf4044cbade /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/97e48fe37f3d792fabd0f9148ef2bcf4044cbade/shortcuts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
67,
4905,
12,
2890,
4672,
365,
18,
4905,
67,
1945,
18,
542,
67,
2284,
12,
7036,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
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,
3636,
67,
4905,
12,
2890,
4672,
365,
18,
4905,
67,
1945,
18,
542,
67,
2284,
12,
7036,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
(test_00_a, "Check PyVortex async queue wrapper"), (test_01, "Check PyVortex context initialization"), (test_02, "Check PyVortex basic BEEP connection"), (test_03, "Check PyVortex basic BEEP connection (shutdown)"), (test_03_a, "Check PyVortex connection set data"), (test_04, "Check PyVortex basic BEEP channel creation"), (test_05, "Check BEEP basic data exchange"), (test_06, "Check BEEP check several send operations (serialize)"), (test_07, "Check BEEP check several send operations (one send, one receive)"), (test_08, "Check BEEP transfer zeroed binaries frames"), (test_09, "Check BEEP channel support"), (test_10, "Check BEEP channel creation deny"), (test_10_a, "Check BEEP channel creation deny (a)"), (test_10_b, "Check reference counting on async notifications"), (test_10_c, "Check async channel start notification"), (test_10_d, "Check async channel start notification (failure expected)"), (test_11, "Check BEEP listener support"), (test_12, "Check connection on close notification"), (test_12_a, "Check connection on close notification (during channel start)"), (test_12_b, "Check channel start during connection close notify"), (test_12_c, "Check close notification for conn refs not owned by caller"), (test_12_d, "Check close notification for conn refs at listener"), (test_13, "Check wrong listener allocation"), (test_14, "Check SASL PLAIN support"), (test_15, "Check SASL ANONYMOUS support"), (test_16, "Check SASL DIGEST-MD5 support"), (test_17, "Check SASL CRAM-MD5 support"), (test_18, "Check TLS support"), (test_19, "Check TLS support (async notification)"), (test_20, "Check SASL PLAIN support (async notification)"), (test_21, "Check channel pool support"), (test_22, "Check channel pool support (handlers)"), (test_23, "Check event tasks"), (test_24, "Check alive implementation") | (test_00_a, "Check PyVortex async queue wrapper"), (test_01, "Check PyVortex context initialization"), (test_02, "Check PyVortex basic BEEP connection"), (test_03, "Check PyVortex basic BEEP connection (shutdown)"), (test_03_a, "Check PyVortex connection set data"), (test_04, "Check PyVortex basic BEEP channel creation"), (test_05, "Check BEEP basic data exchange"), (test_06, "Check BEEP check several send operations (serialize)"), (test_07, "Check BEEP check several send operations (one send, one receive)"), (test_08, "Check BEEP transfer zeroed binaries frames"), (test_09, "Check BEEP channel support"), (test_10, "Check BEEP channel creation deny"), (test_10_a, "Check BEEP channel creation deny (a)"), (test_10_b, "Check reference counting on async notifications"), (test_10_c, "Check async channel start notification"), (test_10_d, "Check async channel start notification (failure expected)"), (test_11, "Check BEEP listener support"), (test_12, "Check connection on close notification"), (test_12_a, "Check connection on close notification (during channel start)"), (test_12_b, "Check channel start during connection close notify"), (test_12_c, "Check close notification for conn refs not owned by caller"), (test_12_d, "Check close notification for conn refs at listener"), (test_12_e, "Check removing close notification"), (test_13, "Check wrong listener allocation"), (test_14, "Check SASL PLAIN support"), (test_15, "Check SASL ANONYMOUS support"), (test_16, "Check SASL DIGEST-MD5 support"), (test_17, "Check SASL CRAM-MD5 support"), (test_18, "Check TLS support"), (test_19, "Check TLS support (async notification)"), (test_20, "Check SASL PLAIN support (async notification)"), (test_21, "Check channel pool support"), (test_22, "Check channel pool support (handlers)"), (test_23, "Check event tasks"), (test_24, "Check alive implementation") | def run_all_tests (): test_count = 0 for test in tests: # print log info ("TEST-" + str(test_count) + ": Running " + test[1]) # call test if not test[0](): error ("detected test failure at: " + test[1]) return False # next test test_count += 1 ok ("All tests ok!") return True | 0c8647cbb202867dd8f5815045ea2b056aeb1921 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1306/0c8647cbb202867dd8f5815045ea2b056aeb1921/vortex-regression-client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
454,
67,
16341,
1832,
30,
1842,
67,
1883,
273,
374,
364,
1842,
316,
7434,
30,
225,
468,
1172,
613,
1123,
7566,
16961,
10951,
397,
609,
12,
3813,
67,
1883,
13,
397,
6398,
2048... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
454,
67,
16341,
1832,
30,
1842,
67,
1883,
273,
374,
364,
1842,
316,
7434,
30,
225,
468,
1172,
613,
1123,
7566,
16961,
10951,
397,
609,
12,
3813,
67,
1883,
13,
397,
6398,
2048... |
def fl_get_browser_line_yoffset(obj, line): """ fl_get_browser_line_yoffset(obj, line) -> num. """ retval = _fl_get_browser_line_yoffset(obj, line) return retval _fl_get_browser_hscroll_callback = cfuncproto(so_libforms, "fl_get_browser_hscroll_callback", FL_BROWSER_SCROLL_CALLBACK, [cty.POINTER(FL_OBJECT)], | def fl_get_browser_line_yoffset(pObject, line): """ fl_get_browser_line_yoffset(pObject, line) -> num. """ retval = _fl_get_browser_line_yoffset(pObject, line) return retval _fl_get_browser_hscroll_callback = cfuncproto(so_libforms, "fl_get_browser_hscroll_callback", FL_BROWSER_SCROLL_CALLBACK, [cty.POINTER(FL_OBJECT)], | def fl_get_browser_line_yoffset(obj, line): """ fl_get_browser_line_yoffset(obj, line) -> num. """ retval = _fl_get_browser_line_yoffset(obj, line) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
588,
67,
11213,
67,
1369,
67,
93,
3348,
12,
2603,
16,
980,
4672,
3536,
1183,
67,
588,
67,
11213,
67,
1369,
67,
93,
3348,
12,
2603,
16,
980,
13,
317,
818,
18,
3536,
225,
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,
1183,
67,
588,
67,
11213,
67,
1369,
67,
93,
3348,
12,
2603,
16,
980,
4672,
3536,
1183,
67,
588,
67,
11213,
67,
1369,
67,
93,
3348,
12,
2603,
16,
980,
13,
317,
818,
18,
3536,
225,
5... |
'class M(B):\n' ' pass\n' 'class N(B):\n' ' pass\n' ) | 'class M(B):\n' ' pass\n' 'class N(B):\n' ' pass\n' ) | def test2_class_diagram_from_python(self): data = ('from A import B\n' 'class M(B):\n' ' pass\n' 'class N(B):\n' ' pass\n' ) handler = Python(memory.File(data)) dot = Dot() dot.class_diagram_from_python([handler]) res = dot.to_str() expect = ('digraph G {\n' 'rankdir=BT;\n' ' "M" -> "A.B"\n' ' "N" -> "A.B"\n}') self.assertEqual(expect, res) | 05ad743166834b950b86d9122f51ac7dbc465d1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/05ad743166834b950b86d9122f51ac7dbc465d1f/test_handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
22,
67,
1106,
67,
12264,
1940,
67,
2080,
67,
8103,
12,
2890,
4672,
501,
273,
7707,
2080,
432,
1930,
605,
64,
82,
11,
296,
1106,
490,
12,
38,
4672,
64,
82,
11,
296,
225,
1342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22,
67,
1106,
67,
12264,
1940,
67,
2080,
67,
8103,
12,
2890,
4672,
501,
273,
7707,
2080,
432,
1930,
605,
64,
82,
11,
296,
1106,
490,
12,
38,
4672,
64,
82,
11,
296,
225,
1342,
... |
quartic point search - ``second_limit`` (int, default 8) -- bound on `\log `max(|x|,|z|)`, i.e. logarithmic | quartic point search. - ``second_limit`` (int, default 8) -- bound on `\log \max(|x|,|z|)`, i.e. logarithmic. | def two_descent(self, verbose = True, selmer_only = False, first_limit = 20, second_limit = 8, n_aux = -1, second_descent = True): """ Compute 2-descent data for this curve. | 8b53e056cc765e689493ec9632c441ee03a3206a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8b53e056cc765e689493ec9632c441ee03a3206a/interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2795,
67,
5569,
319,
12,
2890,
16,
3988,
273,
1053,
16,
357,
6592,
67,
3700,
273,
1083,
16,
1122,
67,
3595,
273,
4200,
16,
2205,
67,
3595,
273,
1725,
16,
290,
67,
18196,
273,
300,
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,
2795,
67,
5569,
319,
12,
2890,
16,
3988,
273,
1053,
16,
357,
6592,
67,
3700,
273,
1083,
16,
1122,
67,
3595,
273,
4200,
16,
2205,
67,
3595,
273,
1725,
16,
290,
67,
18196,
273,
300,
21... |
self.linter.set_option('disable-msg-cat', 'WCRFI') | self.linter.set_option('disable-msg-cat', 'WCRI') | def cb_error_mode(self, *args, **kwargs): """error mode: * checkers without error messages are disabled * for others, only the ERROR messages are displayed * disable reports * do not save execution information """ self.linter.disable_noerror_checkers() self.linter.set_option('disable-msg-cat', 'WCRFI') self.linter.set_option('reports', False) self.linter.set_option('persistent', False) | 31ef7c4955d71885e0e40854575af43d89f0843e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/928/31ef7c4955d71885e0e40854575af43d89f0843e/lint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2875,
67,
1636,
67,
3188,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
1636,
1965,
30,
380,
31534,
2887,
555,
2743,
854,
5673,
380,
364,
10654,
16,
1338,
326,
5475,
2743,
854,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2875,
67,
1636,
67,
3188,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
1636,
1965,
30,
380,
31534,
2887,
555,
2743,
854,
5673,
380,
364,
10654,
16,
1338,
326,
5475,
2743,
854,
... |
if context is None: | if context is None: | def populate_statement(self, cr, uid, ids, context=None): if context is None: context = {} statement_id = context.get('statement_id', False) if not statement_id: return {} data = self.read(cr, uid, ids, context=context)[0] line_ids = data['line_ids'] if not line_ids: return {} | 7cd178554d9162e655ae1ad43898cd71b227b0a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7cd178554d9162e655ae1ad43898cd71b227b0a6/account_statement_from_invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
11516,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
3021,
67,
350,
273,
819,
18,
588,
2668,
11516,
67,
350,
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,
6490,
67,
11516,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
3021,
67,
350,
273,
819,
18,
588,
2668,
11516,
67,
350,
2187... |
f = file('/tmp/%s_%03d.v' % (self._debug_matrix_file, step), 'w') | f = file('%s/%s_%03d.v' % (temporaryDirectory(), self._debug_matrix_file, step), 'w') | def write_current_matrix(): f = file('/tmp/%s_%03d.v' % (self._debug_matrix_file, step), 'w') x = v.reshape(len(self._p1.modules), len(self._p2.modules)) for i in xrange(len(self._p1.modules)): for j in xrange(len(self._p2.modules)): f.write('%f ' % x[i,j]) f.write('\n') f.close() | 26ed3d9c709770d97d4bcb3827c44642cf25acb5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/26ed3d9c709770d97d4bcb3827c44642cf25acb5/eigen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2972,
67,
5667,
13332,
284,
273,
585,
29909,
87,
5258,
87,
10185,
4630,
72,
18,
90,
11,
738,
261,
31143,
2853,
9334,
365,
6315,
4148,
67,
5667,
67,
768,
16,
2235,
3631,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2972,
67,
5667,
13332,
284,
273,
585,
29909,
87,
5258,
87,
10185,
4630,
72,
18,
90,
11,
738,
261,
31143,
2853,
9334,
365,
6315,
4148,
67,
5667,
67,
768,
16,
2235,
3631,
296,
... |
def test_crash_3114(self): | def test_3114(self): | def test_crash_3114(self): # Bug #3114: in its destructor, MyObject retrieves a pointer to a # deallocated exception instance or traceback. class MyObject: def __del__(self): nonlocal e e = sys.exc_info() e = () try: raise Exception(MyObject()) except: pass gc.collect() [0]*10000 # Do something with the exception and its traceback traceback.format_exception(*e) | 27d63678a31f1adcf5f2f0f9f88d6b78e93a9c52 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/27d63678a31f1adcf5f2f0f9f88d6b78e93a9c52/test_exceptions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3353,
961,
67,
23,
22214,
12,
2890,
4672,
468,
16907,
468,
23,
22214,
30,
316,
2097,
23819,
280,
16,
8005,
921,
9023,
279,
4407,
358,
279,
468,
443,
28172,
1520,
791,
578,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3353,
961,
67,
23,
22214,
12,
2890,
4672,
468,
16907,
468,
23,
22214,
30,
316,
2097,
23819,
280,
16,
8005,
921,
9023,
279,
4407,
358,
279,
468,
443,
28172,
1520,
791,
578,
10... |
properties = properties + ', \"' + logfile.readline()[:-1].replace(' ','_') +'\"' | properties = properties + ', \"' + logfile.readline()[:-1].replace(' ','_') +'\" REAL' | def read_benchmark_log(dbname, filenames): """Parse benchmark log files and store the parsed data in a sqlite3 database.""" conn = sqlite3.connect(dbname) c = conn.cursor() c.execute('pragma foreign_keys = on') c.execute("select name from sqlite_master where type='table'") table_names = [ str(t[0]) for t in c.fetchall() ] if not 'experiments' in table_names: c.execute("""create table experiments (id INTEGER PRIMARY KEY AUTOINCREMENT, totaltime REAL, timelimit REAL, memorylimit REAL, hostname TEXT, date DATE)""") if not 'planners' in table_names: c.execute("""create table planners (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT UNIQUE)""") for filename in filenames: logfile = open(filename,'r') hostname = logfile.readline().split()[-1] date = " ".join(logfile.readline().split()[2:]) num_planners = int(logfile.readline().split()[0]) timelimit = float(logfile.readline().split()[0]) memorylimit = float(logfile.readline().split()[0]) totaltime = float(logfile.readline().split()[0]) c.execute('insert into experiments values (?,?,?,?,?,?)', (None, totaltime, timelimit, memorylimit, hostname, date) ) c.execute('select last_insert_rowid()') experiment_id = c.fetchone()[0] for i in range(num_planners): planner_name = logfile.readline()[:-1] print planner_name c.execute('select id from planners where name=?', (planner_name,) ) p = c.fetchone() if p==None: c.execute("insert into planners values (?,?)", (None,planner_name)) c.execute('select last_insert_rowid()') planner_id = c.fetchone()[0] else: planner_id = p[0] num_properties = int(logfile.readline().split()[0]) properties = """experimentid references experiments(id) on delete cascade, plannerid references planners(id) on delete cascade""" for j in range(num_properties): properties = properties + ', \"' + logfile.readline()[:-1].replace(' ','_') +'\"' planner_table = 'planner_%s' % planner_name print "create table %s (%s)" % (planner_table,properties) if not planner_table in table_names: c.execute("create table %s (%s)" % (planner_table,properties)) insert_fmt_str = 'insert into %s values (' % planner_table + ','.join('?'*(num_properties+2)) + ')' num_runs = int(logfile.readline().split()[0]) for j in range(num_runs): run = tuple([experiment_id, planner_id] + [None if len(x)==0 else float(x) for x in logfile.readline().split('; ')[:-1]]) print insert_fmt_str, run c.execute(insert_fmt_str, run) num_averages = int(logfile.readline().split()[0]) for j in range(num_averages): logfile.readline() logfile.readline() logfile.close() conn.commit() c.close() | 9dfa6233855a16dc41022bc2f92038c2ddbefa9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7332/9dfa6233855a16dc41022bc2f92038c2ddbefa9c/benchmark_statistics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
70,
9737,
67,
1330,
12,
20979,
16,
9066,
4672,
3536,
3201,
14128,
613,
1390,
471,
1707,
326,
2707,
501,
316,
279,
16184,
23,
2063,
12123,
225,
1487,
273,
16184,
23,
18,
3612,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
70,
9737,
67,
1330,
12,
20979,
16,
9066,
4672,
3536,
3201,
14128,
613,
1390,
471,
1707,
326,
2707,
501,
316,
279,
16184,
23,
2063,
12123,
225,
1487,
273,
16184,
23,
18,
3612,
... |
if len(string) > maxchars: string = '(..)'+string[-(maxchars-4):] | if maxchars is not None: maxchars -= len(attrname)+4 if len(string) > maxchars: string = '(..)'+string[-(maxchars-4):] | def format_child(obj, attrname, maxchars): linebuf = attrname if isinstance(getattr(type(obj), attrname, None), Setting): maxchars -= len(attrname)+4 string = str(getattr(obj, attrname)) if len(string) > maxchars: string = '(..)'+string[-(maxchars-4):] linebuf += ' = ' + string return linebuf | 07794136a7049f8b4a45f29ffb011b70aab800a2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/07794136a7049f8b4a45f29ffb011b70aab800a2/sip_settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
3624,
12,
2603,
16,
1604,
529,
16,
943,
7549,
4672,
980,
4385,
273,
1604,
529,
309,
1549,
12,
588,
1747,
12,
723,
12,
2603,
3631,
1604,
529,
16,
599,
3631,
13274,
4672,
943,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
3624,
12,
2603,
16,
1604,
529,
16,
943,
7549,
4672,
980,
4385,
273,
1604,
529,
309,
1549,
12,
588,
1747,
12,
723,
12,
2603,
3631,
1604,
529,
16,
599,
3631,
13274,
4672,
943,
... |
task.update(self.bossLiteSession.db) self.bossLiteSession.session.commit() | self.bossLiteSession.updateDB(task) | def query( self, taskId, jobRange='all', queryType='node' ): """ query status and eventually other scheduler related information """ | a12aea6c736c3d28ee313435b4134e202d181ed6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/a12aea6c736c3d28ee313435b4134e202d181ed6/BossLiteAPISched.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
12,
365,
16,
15321,
16,
1719,
2655,
2218,
454,
2187,
843,
559,
2218,
2159,
11,
262,
30,
3536,
843,
1267,
471,
18011,
1308,
8129,
3746,
1779,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
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,
843,
12,
365,
16,
15321,
16,
1719,
2655,
2218,
454,
2187,
843,
559,
2218,
2159,
11,
262,
30,
3536,
843,
1267,
471,
18011,
1308,
8129,
3746,
1779,
3536,
2,
-100,
-100,
-100,
-100,
-100,
... |
for pat in (r'\shirecindex=[\'"](\d+)[\'"]', '\srecindex=[\'"](\d+)[\'"]', '\slorecindex=[\'"](\d+)[\'"]'): | for pat in (r'\shirecindex=[\'"]{0,1}(\d+)[\'"]{0,1}', '\srecindex=[\'"]{0,1}(\d+)[\'"]{0,1}', '\slorecindex=[\'"]{0,1}(\d+)[\'"]{0,1}'): | def fix_images(match): tag = match.group() for pat in (r'\shirecindex=[\'"](\d+)[\'"]', '\srecindex=[\'"](\d+)[\'"]', '\slorecindex=[\'"](\d+)[\'"]'): pat = re.compile(pat) m = pat.search(tag) if m: return pat.sub(' src="images/%s.jpg"'%m.group(1), tag) | 5d156e7d83e7dbe093340c654f4778cd94b89394 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/5d156e7d83e7dbe093340c654f4778cd94b89394/reader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
7369,
12,
1916,
4672,
1047,
273,
845,
18,
1655,
1435,
364,
9670,
316,
261,
86,
8314,
674,
577,
71,
1615,
22850,
3730,
6,
7073,
20,
16,
21,
97,
4713,
72,
6975,
63,
3730,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
7369,
12,
1916,
4672,
1047,
273,
845,
18,
1655,
1435,
364,
9670,
316,
261,
86,
8314,
674,
577,
71,
1615,
22850,
3730,
6,
7073,
20,
16,
21,
97,
4713,
72,
6975,
63,
3730,
6,
... |
- list: list of article ids""" | - list: list of message ids""" | def newnews(self, group, date, time, file=None): """Process a NEWNEWS command. Arguments: - group: group name or '*' - date: string 'yymmdd' indicating the date - time: string 'hhmmss' indicating the time Return: - resp: server response if successful - list: list of article ids""" | 5dbda75a0208d1e1acd1d3bf26c4c44df0897dae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5dbda75a0208d1e1acd1d3bf26c4c44df0897dae/nntplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
18443,
12,
2890,
16,
1041,
16,
1509,
16,
813,
16,
585,
33,
7036,
4672,
3536,
2227,
279,
12887,
5407,
2651,
1296,
18,
225,
13599,
30,
300,
1041,
30,
1041,
508,
578,
5306,
300,
1509... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
18443,
12,
2890,
16,
1041,
16,
1509,
16,
813,
16,
585,
33,
7036,
4672,
3536,
2227,
279,
12887,
5407,
2651,
1296,
18,
225,
13599,
30,
300,
1041,
30,
1041,
508,
578,
5306,
300,
1509... |
vals_line['unit_amount']=vals['hours'] vals_line['amount']=(-1) * vals['hours'] * obj.browse(cr,uid,line_id).product_id.standard_price obj.write(cr, uid,[line_id],vals_line,{}) | vals_line['unit_amount'] = vals['hours'] vals_line['amount'] = (-1) * vals['hours'] * obj.browse(cr, uid, line_id).product_id.standard_price obj.write(cr, uid, [line_id], vals_line, {}) | def write(self, cr, uid, ids,vals,context={}): vals_line={} | 3378bd4d3a4d503d59d259ae7c1220f1547be7df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/3378bd4d3a4d503d59d259ae7c1220f1547be7df/project_timesheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
4524,
16,
2472,
12938,
4672,
5773,
67,
1369,
12938,
2,
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,
1045,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
4524,
16,
2472,
12938,
4672,
5773,
67,
1369,
12938,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
@bigmemtest(minsize=_2G // 2 + 2, memuse=8) | @bigmemtest(minsize=_2G // 2 + 2, memuse=16) | def basic_test_extend(self, size): l = [file] * size l.extend(l) self.assertEquals(len(l), size * 2) self.failUnless(l[0] is l[-1]) self.failUnless(l[size - 1] is l[size + 1]) | cda404bf367d0958c27f1649caa108f11bc696a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cda404bf367d0958c27f1649caa108f11bc696a1/test_bigmem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5337,
67,
3813,
67,
14313,
12,
2890,
16,
963,
4672,
328,
273,
306,
768,
65,
380,
963,
328,
18,
14313,
12,
80,
13,
365,
18,
11231,
8867,
12,
1897,
12,
80,
3631,
963,
380,
576,
13,
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,
5337,
67,
3813,
67,
14313,
12,
2890,
16,
963,
4672,
328,
273,
306,
768,
65,
380,
963,
328,
18,
14313,
12,
80,
13,
365,
18,
11231,
8867,
12,
1897,
12,
80,
3631,
963,
380,
576,
13,
3... |
model = randstr(32) | model = randstr(255) | def unicmp(a, b, encoding = "utf-8"): """ When connected directly to the DB, values are returned as raw 8-bit strings that may need to be decoded (as UTF-8 by default) in order to compare them against expected Python Unicode strings. """ is8bit = re.compile("[\x80-\xff]").search if isinstance(a, str) and is8bit(a): a = unicode(a, encoding) if isinstance(b, str) and is8bit(b): b = unicode(b, encoding) return a == b | 8cecf35d2c665fe2ac2e0982da46d39e3fc05b42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/8cecf35d2c665fe2ac2e0982da46d39e3fc05b42/Test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
335,
1291,
12,
69,
16,
324,
16,
2688,
273,
315,
3158,
17,
28,
6,
4672,
3536,
5203,
5840,
5122,
358,
326,
2383,
16,
924,
854,
2106,
487,
1831,
1725,
17,
3682,
2064,
716,
2026,
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,
640,
335,
1291,
12,
69,
16,
324,
16,
2688,
273,
315,
3158,
17,
28,
6,
4672,
3536,
5203,
5840,
5122,
358,
326,
2383,
16,
924,
854,
2106,
487,
1831,
1725,
17,
3682,
2064,
716,
2026,
16... |
def __init__(self, db, user, passwd='', host='localhost', **kw): | def __init__(self, db, user, passwd='', host='localhost', port=None, **kw): | def __init__(self, db, user, passwd='', host='localhost', **kw): global MySQLdb if MySQLdb is None: import MySQLdb self.module = MySQLdb self.host = host self.db = db self.user = user self.password = passwd DBAPI.__init__(self, **kw) | cdb69eaaa489146d157427e1dddc8263d199292b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/cdb69eaaa489146d157427e1dddc8263d199292b/mysqlconnection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1319,
16,
729,
16,
19093,
2218,
2187,
1479,
2218,
13014,
2187,
1756,
33,
7036,
16,
2826,
9987,
4672,
2552,
13485,
1966,
309,
13485,
1966,
353,
599,
30,
193... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1319,
16,
729,
16,
19093,
2218,
2187,
1479,
2218,
13014,
2187,
1756,
33,
7036,
16,
2826,
9987,
4672,
2552,
13485,
1966,
309,
13485,
1966,
353,
599,
30,
193... |
base = path[len(longest) + 1:].replace("/", ".") | if longest: base = path[len(longest) + 1:] else: base = path base = base.replace("/", ".") | def fullmodname(path): """Return a plausible module name for the path.""" # If the file 'path' is part of a package, then the filename isn't # enough to uniquely identify it. Try to do the right thing by # looking in sys.path for the longest matching prefix. We'll # assume that the rest is the package name. longest = "" for dir in sys.path: if path.startswith(dir) and path[len(dir)] == os.path.sep: if len(dir) > len(longest): longest = dir base = path[len(longest) + 1:].replace("/", ".") filename, ext = os.path.splitext(base) return filename | 04f0a2e502e08ddf0636eec5b9fbc8f37e07a8f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/04f0a2e502e08ddf0636eec5b9fbc8f37e07a8f1/trace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1983,
1711,
529,
12,
803,
4672,
3536,
990,
279,
886,
69,
407,
1523,
1605,
508,
364,
326,
589,
12123,
225,
468,
971,
326,
585,
296,
803,
11,
353,
1087,
434,
279,
2181,
16,
1508,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1983,
1711,
529,
12,
803,
4672,
3536,
990,
279,
886,
69,
407,
1523,
1605,
508,
364,
326,
589,
12123,
225,
468,
971,
326,
585,
296,
803,
11,
353,
1087,
434,
279,
2181,
16,
1508,
326,
... |
if "," in ifos: return set(map(unicode.strip, ifos.split(","))) if "+" in ifos: return set(map(unicode.strip, ifos.split("+"))) | if u"," in ifos: return set(ifo.strip() for ifo in ifos.split(u",")) if u"+" in ifos: return set(ifo.strip() for ifo in ifos.split(u"+")) | def instrument_set_from_ifos(ifos): """ Convenience function for parsing the values stored in the "ifos" columns found in many tables. This function is mostly for internal use by the .get_ifos() methods of the corresponding row classes. The mapping from input to output is as follows (rules are applied in order): input is None --> output is None input contains "," --> output is set of strings split on "," with leading and trailing whitespace stripped from each piece input contains "+" --> output is set of strings split on "," with leading and trailing whitespace stripped from each piece after stripping input of leading and trailing whitespace, input has an even length greater than two --> output is set of two-character pieces input is a non-empty string --> output is a set containing input as single value otherwise --> output is an empty set. """ if ifos is None: return None if "," in ifos: return set(map(unicode.strip, ifos.split(","))) if "+" in ifos: return set(map(unicode.strip, ifos.split("+"))) ifos = ifos.strip() if len(ifos) > 2 and not len(ifos) % 2: # if ifos is a string with an even number of characters # greater than two, split it into two-character pieces. # FIXME: remove this when the inspiral codes don't write # ifos strings like this anymore return set(ifos[n:n+2] for n in range(0, len(ifos), 2)) if ifos: return set([ifos]) return set() | 791b07900714baff8fce1845fc84bdfd51d332f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/791b07900714baff8fce1845fc84bdfd51d332f6/lsctables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10353,
67,
542,
67,
2080,
67,
430,
538,
12,
430,
538,
4672,
3536,
735,
9080,
445,
364,
5811,
326,
924,
4041,
316,
326,
315,
430,
538,
6,
2168,
1392,
316,
4906,
4606,
18,
225,
1220,
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,
10353,
67,
542,
67,
2080,
67,
430,
538,
12,
430,
538,
4672,
3536,
735,
9080,
445,
364,
5811,
326,
924,
4041,
316,
326,
315,
430,
538,
6,
2168,
1392,
316,
4906,
4606,
18,
225,
1220,
4... |
print '<tr>' | global output_minute_count output_minute_count += 1 if output_minute_count%2: print '<tr style="background: lightgrey">' else: print '<tr>' | def output_minute_html(lmin, requests, input, wait, apps, output, n, spr, spa): print '<tr>' apps = '<font size="+2"><strong>%s</strong></font>' % apps print td(lmin.replace('T', ' '), len(requests), input, wait, apps, output) if n: print td(n, "%10.2f" % (spr/n), "%10.2f" % (spa/n)) print '</tr>' | ba39a8840d2e26f7d357f08fd1799ffbe4620b0e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7695/ba39a8840d2e26f7d357f08fd1799ffbe4620b0e/tracereport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
17637,
67,
2620,
12,
80,
1154,
16,
3285,
16,
810,
16,
2529,
16,
8279,
16,
876,
16,
290,
16,
272,
683,
16,
1694,
69,
4672,
2552,
876,
67,
17637,
67,
1883,
876,
67,
17637,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
17637,
67,
2620,
12,
80,
1154,
16,
3285,
16,
810,
16,
2529,
16,
8279,
16,
876,
16,
290,
16,
272,
683,
16,
1694,
69,
4672,
2552,
876,
67,
17637,
67,
1883,
876,
67,
17637,
6... |
ocs = csc_matrix(other) if (ocs.shape != self.shape): raise ValueError, "Inconsistent shapes." dtypechar = _coerce_rules[(self._dtypechar,other._dtypechar)] nnz1, nnz2 = self.nnz, other.nnz data1, data2 = _convert_data(self.data[:nnz1], ocs.data[:nnz2], dtypechar) func = getattr(sparsetools,_transtabl[dtypechar]+'cscadd') c,rowc,ptrc,ierr = func(data1,self.rowind[:nnz1],self.indptr,data2,ocs.rowind[:nnz2],ocs.indptr) if ierr: raise ValueError, "Ran out of space (but shouldn't have happened)." M, N = self.shape return csc_matrix.Construct(c,(rowc,ptrc),M=M,N=N) | if isscalar(other): raise NotImplementedError('adding a scalar to a sparse matrix is not yet supported') elif isspmatrix(other): ocs = other.tocsc() if (ocs.shape != self.shape): raise ValueError, "Inconsistent shapes." dtypechar = _coerce_rules[(self._dtypechar, ocs._dtypechar)] nnz1, nnz2 = self.nnz, other.nnz data1, data2 = _convert_data(self.data[:nnz1], ocs.data[:nnz2], dtypechar) func = getattr(sparsetools,_transtabl[dtypechar]+'cscadd') c,rowc,ptrc,ierr = func(data1,self.rowind[:nnz1],self.indptr,data2,ocs.rowind[:nnz2],ocs.indptr) if ierr: raise ValueError, "Ran out of space (but shouldn't have happened)." M, N = self.shape return csc_matrix.Construct(c,(rowc,ptrc),M=M,N=N) | def __add__(self, other): ocs = csc_matrix(other) if (ocs.shape != self.shape): raise ValueError, "Inconsistent shapes." dtypechar = _coerce_rules[(self._dtypechar,other._dtypechar)] nnz1, nnz2 = self.nnz, other.nnz data1, data2 = _convert_data(self.data[:nnz1], ocs.data[:nnz2], dtypechar) func = getattr(sparsetools,_transtabl[dtypechar]+'cscadd') c,rowc,ptrc,ierr = func(data1,self.rowind[:nnz1],self.indptr,data2,ocs.rowind[:nnz2],ocs.indptr) if ierr: raise ValueError, "Ran out of space (but shouldn't have happened)." M, N = self.shape return csc_matrix.Construct(c,(rowc,ptrc),M=M,N=N) | bdabf856b614694a8ef20c73a7d82bda3a7cf386 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/bdabf856b614694a8ef20c73a7d82bda3a7cf386/sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
1308,
4672,
320,
2143,
273,
276,
1017,
67,
5667,
12,
3011,
13,
309,
261,
22280,
18,
4867,
480,
365,
18,
4867,
4672,
1002,
2068,
16,
315,
382,
16952,
1473... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
1308,
4672,
320,
2143,
273,
276,
1017,
67,
5667,
12,
3011,
13,
309,
261,
22280,
18,
4867,
480,
365,
18,
4867,
4672,
1002,
2068,
16,
315,
382,
16952,
1473... |
self.dicom_preview.SetDicomGroup(group) | self.sizer.Layout() | def SetDicomSeries(self, pubsub_evt): group = pubsub_evt.data print "X" self.dicom_preview.Show(1) self.serie_preview.Show(0) self.dicom_preview.SetDicomGroup(group) self.Update() | 1912ed6407d3a779ef251d08eb63103a530ddc9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/1912ed6407d3a779ef251d08eb63103a530ddc9f/import_panel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
40,
335,
362,
6485,
12,
2890,
16,
23288,
67,
73,
11734,
4672,
1041,
273,
23288,
67,
73,
11734,
18,
892,
1172,
315,
60,
6,
365,
18,
15859,
362,
67,
12102,
18,
5706,
12,
21,
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,
1000,
40,
335,
362,
6485,
12,
2890,
16,
23288,
67,
73,
11734,
4672,
1041,
273,
23288,
67,
73,
11734,
18,
892,
1172,
315,
60,
6,
365,
18,
15859,
362,
67,
12102,
18,
5706,
12,
21,
13,
... |
recipients = [] | def send(recipient, label, extra_context={}, issue_notice=True): """ Creates a new notice. This is intended to be how other apps create new notices. notification.send(user, 'friends_invite_sent', { 'spam': 'eggs', 'foo': 'bar', ) """ notice_type = NoticeType.objects.get(label=label) current_site = Site.objects.get_current() notices_url = u"http://%s%s" % ( unicode(current_site), reverse("notification_notices"), ) context = Context({ "notice": ugettext(notice_type.display), "notices_url": notices_url, "current_site": current_site, }) context.update(extra_context) recipients = [] current_language = get_language() formats = ( 'short.txt', 'plain.txt', 'teaser.html', 'full.html', ) # TODO make formats configurable for user in recipient: # get user profiles if available try: profile = user.get_profile() except SiteProfileNotAvailable: profile = None # activate language of user to send message translated if profile is not None: # get language attribute of user profile language = getattr(profile, "language", None) if language is not None: # activate the user's language activate(language) # get prerendered format messages messages = get_formatted_messages(formats, label, context) # Strip newlines from subject subject = ''.join(render_to_string('notification/email_subject.txt', { 'message': messages['short'], }, context).splitlines()) body = render_to_string('notification/email_body.txt', { 'message': messages['plain'], }, context) if issue_notice: notice = Notice.objects.create(user=user, message=messages['teaser'], notice_type=notice_type) if should_send(user, notice_type, "1") and user.email: # Email recipients.append(user.email) send_mail(subject, body, settings.DEFAULT_FROM_EMAIL, recipients) # reset environment to original language activate(current_language) | 3bdc4dc09c5f5e36ce0d4d6bc94cc2310173db5e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11515/3bdc4dc09c5f5e36ce0d4d6bc94cc2310173db5e/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
20367,
16,
1433,
16,
2870,
67,
2472,
28793,
5672,
67,
20392,
33,
5510,
4672,
3536,
10210,
279,
394,
11690,
18,
225,
1220,
353,
12613,
358,
506,
3661,
1308,
8279,
752,
394,
486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
20367,
16,
1433,
16,
2870,
67,
2472,
28793,
5672,
67,
20392,
33,
5510,
4672,
3536,
10210,
279,
394,
11690,
18,
225,
1220,
353,
12613,
358,
506,
3661,
1308,
8279,
752,
394,
486,... | |
results[0].delete() | objectstore.delete(results[0]) | def test_delete(self): p1 = self.create_person_one() objectstore.flush() objectstore.clear() results = Person.query.select() self.assertEquals(len(results), 1) results[0].delete() objectstore.flush() objectstore.clear() results = Person.query.select() self.assertEquals(len(results), 0) | a0ed498ff553b90e805eafa8fad85fe3c60fdb37 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/a0ed498ff553b90e805eafa8fad85fe3c60fdb37/activemapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3733,
12,
2890,
4672,
293,
21,
273,
365,
18,
2640,
67,
12479,
67,
476,
1435,
225,
733,
2233,
18,
11330,
1435,
733,
2233,
18,
8507,
1435,
225,
1686,
273,
11573,
18,
2271,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3733,
12,
2890,
4672,
293,
21,
273,
365,
18,
2640,
67,
12479,
67,
476,
1435,
225,
733,
2233,
18,
11330,
1435,
733,
2233,
18,
8507,
1435,
225,
1686,
273,
11573,
18,
2271,
18,
... |
process_file(args[0], args[1], opts) | processor.process_file(args[0], args[1], opts) | def _cell(self, data, header=False): if header: data = '*%s*' % data self._output.write(data.encode('UTF-8') + '\t') | 828a91f57a32f3b2701cb3328493ca38352888eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/828a91f57a32f3b2701cb3328493ca38352888eb/robotidy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3855,
12,
2890,
16,
501,
16,
1446,
33,
8381,
4672,
309,
1446,
30,
501,
273,
14609,
9,
87,
4035,
738,
501,
365,
6315,
2844,
18,
2626,
12,
892,
18,
3015,
2668,
5159,
17,
28,
6134,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3855,
12,
2890,
16,
501,
16,
1446,
33,
8381,
4672,
309,
1446,
30,
501,
273,
14609,
9,
87,
4035,
738,
501,
365,
6315,
2844,
18,
2626,
12,
892,
18,
3015,
2668,
5159,
17,
28,
6134,... |
seglist = segmentlist([seglist]) | def grab_segments(start,end,flag): """ Returns a segmentlist containing the segments during which the given flag was active in the given period. """ #== construct segment query segment_cmd = "ligolw_segment_query --query-segments"+\ " --segment_url https://segdb.ligo.caltech.edu"+\ " --include-segments "+flag+\ " --gps-start-time "+str(start)+\ " --gps-end-time "+str(end)+\ ''' | ligolw_print -t segment -c start_time -c end_time --delimiter " "''' #== run segment query segs = GetCommandOutput(segment_cmd) #== construct segments as structure seglist=[] segs=segs.split('\n') for seg in segs: if seg=='': continue try: [seg_start,seg_end]=seg.split(' ') seglist.append(segment(int(seg_start),int(seg_end))) except: continue seglist = segmentlist([seglist]) return seglist | 3ff03be0c8cc77ecae9200efb1d883d6c9166fdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/3ff03be0c8cc77ecae9200efb1d883d6c9166fdc/dqSegmentUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11086,
67,
12838,
12,
1937,
16,
409,
16,
6420,
4672,
3536,
2860,
279,
3267,
1098,
4191,
326,
5155,
4982,
1492,
326,
864,
2982,
1703,
2695,
316,
326,
864,
3879,
18,
3536,
225,
468,
631,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11086,
67,
12838,
12,
1937,
16,
409,
16,
6420,
4672,
3536,
2860,
279,
3267,
1098,
4191,
326,
5155,
4982,
1492,
326,
864,
2982,
1703,
2695,
316,
326,
864,
3879,
18,
3536,
225,
468,
631,
... | |
return e | if e is not None: return e return encoding | def detect_encoding(fpath): """ Try to detect the encoding used by the file *fpath*. The function will return polib default *encoding* if it's unable to detect it. **Keyword argument**: - *fpath*: string, full or relative path to the mo file to parse. **Examples**: >>> print detect_encoding('tests/test_noencoding.po') utf-8 >>> print detect_encoding('tests/test_utf8.po') UTF-8 >>> print detect_encoding('tests/test_utf8.mo') UTF-8 >>> print detect_encoding('tests/test_iso-8859-15.po') ISO_8859-15 >>> print detect_encoding('tests/test_iso-8859-15.mo') ISO_8859-15 """ # detect_encoding {{{ import re global encoding e = encoding rx = re.compile(r'"?Content-Type:.+? charset=([\w_\-:\.]+)') f = open(fpath) for l in f: match = rx.search(l) if match: e = _strstrip(match.group(1)) break f.close() return e # }}} | ff9943af59a4994cd9185e9c75a8b1d02243ae04 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9209/ff9943af59a4994cd9185e9c75a8b1d02243ae04/polib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
5999,
12,
28900,
4672,
3536,
6161,
358,
5966,
326,
2688,
1399,
635,
326,
585,
380,
28900,
11146,
1021,
445,
903,
327,
2952,
495,
805,
380,
5999,
14,
309,
518,
1807,
13496,
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,
5966,
67,
5999,
12,
28900,
4672,
3536,
6161,
358,
5966,
326,
2688,
1399,
635,
326,
585,
380,
28900,
11146,
1021,
445,
903,
327,
2952,
495,
805,
380,
5999,
14,
309,
518,
1807,
13496,
358,... |
template_detect(var, cl) | template_detect(var, cl) | def template_parameters(): # --- determine initial template variables (we might add prediction here later on) for cl in getgx().allclasses: # (first do class template vars, as function depend on them) # XXX recursion! vars = cl.vars.values() #if not cl.bases and not cl.children: # XXX if cl.mv.module.builtin: if cl.ident in ['datetime', 'date', 'time', 'timedelta']: continue if cl.ident in ['dict', 'defaultdict'] and 'unit' in cl.vars and 'value' in cl.vars: vars = [cl.vars['unit'], cl.vars['value']] elif cl == defclass('tuple2') and 'first' in cl.vars and 'second' in cl.vars: vars = [cl.vars['first'], cl.vars['second']] for var in vars: template_detect(var, cl) for clname in ['list', 'tuple', 'set', 'frozenset']: # XXX remove if not 'A' in defclass(clname).template_vars: defaultvar('A', defclass(clname), template_var=True) for clname in ['tuple2', 'dict']: #if not 'A' in defclass(clname).template_vars: # defaultvar('A', defclass(clname), template_var=True) if not 'B' in defclass(clname).template_vars: defaultvar('B', defclass(clname), template_var=True) allfuncs = getgx().allfuncs.copy() allfuncs.update(getgx().modules['builtin'].funcs.values()) for func in allfuncs: #if func.mv.module.ident != 'builtin': formals = func.formals if func.defaults: formals = formals[:-len(func.defaults)] for formal in formals: if func.parent and formal == 'self': continue template_detect(func.vars[formal], func) # --- remove template variables until the C++ compiler exactly knows all types # (uncertainty arises from passing truly polymorphic object into parameterized arguments) getgx().changed = True while getgx().changed: getgx().changed = False for node in getgx().merged_all: if isinstance(node, CallFunc): objexpr, ident, direct_call, method_call, constructor, mod_var, parent_constr = analyze_callfunc(node) if ident and ident.startswith('__'): continue # XXX targets = callfunc_targets(node, getgx().merged_all) # XXX getting targets, pairs in sep func.. for target in targets: if isinstance(target.parent, class_) and target.parent.module.ident == 'builtin': continue pairs = connect_actual_formal(node, target) for (lvalue, rvalue) in pairs: if isinstance(lvalue, tuple) or isinstance(rvalue, tuple): continue argsplit = typesplit(lvalue, inode(node).parent) formalsplit = typesplit(rvalue, target) template_disable_rec(argsplit, inode(node).parent, formalsplit, target) for parent in getgx().allfuncs.union(getgx().allclasses): new_dict = {} var_nr = 0 if is_method(parent): var_nr = len(parent.parent.template_vars) for tvar in parent.template_vars.values(): if not tvar.template_disabled: tvar.name = string.ascii_uppercase[var_nr] new_dict[tvar.name] = tvar var_nr += 1 parent.template_vars = new_dict # --- output generic classes/functions for cl in getgx().allclasses: if cl.template_vars and not cl.mv.module.builtin: print template_repr(cl)+'class '+cl.ident for func in getgx().allfuncs: if func.template_vars and not func.mv.module.builtin: print template_repr(func)+func.ident | 6a7cd3ec9604a1996a0f44096bd9413947e659e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4470/6a7cd3ec9604a1996a0f44096bd9413947e659e6/cpp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1542,
67,
3977,
13332,
468,
9948,
4199,
2172,
1542,
3152,
261,
1814,
4825,
527,
8239,
2674,
5137,
603,
13,
364,
927,
316,
336,
75,
92,
7675,
454,
4701,
30,
468,
261,
3645,
741,
667,
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,
1542,
67,
3977,
13332,
468,
9948,
4199,
2172,
1542,
3152,
261,
1814,
4825,
527,
8239,
2674,
5137,
603,
13,
364,
927,
316,
336,
75,
92,
7675,
454,
4701,
30,
468,
261,
3645,
741,
667,
15... |
PGLCLASS = getSceneGraphNodes((sg.Geometry,sg.Shape3D,sg.Appearance,sg.Scene)) | PGLCLASS = getSceneGraphNodes((sg.Geometry,sg.Shape3D,sg.Appearance)) | def getSceneGraphNodes(baseclass): cl = [] for i in dir(sg): c = getattr(sg,i) try: if issubclass(c,baseclass): try: i = c() cl.append(c) except RuntimeError,e: # Cannot instanciate this class. Boost return runtime error. pass except: cl.append(c) except: pass cl.sort(lambda x,y : cmp(x.__name__,y.__name__)) return cl | 9f5f146caf90dccb76b1fe0c63e86e3c3aa9fd30 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/799/9f5f146caf90dccb76b1fe0c63e86e3c3aa9fd30/objectgenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11971,
4009,
4137,
3205,
12,
1969,
1106,
4672,
927,
273,
5378,
364,
277,
316,
1577,
12,
1055,
4672,
276,
273,
3869,
12,
1055,
16,
77,
13,
775,
30,
309,
14664,
12,
71,
16,
1969,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11971,
4009,
4137,
3205,
12,
1969,
1106,
4672,
927,
273,
5378,
364,
277,
316,
1577,
12,
1055,
4672,
276,
273,
3869,
12,
1055,
16,
77,
13,
775,
30,
309,
14664,
12,
71,
16,
1969,
1106,
... |
opts, args = getopt(argv[1:], "vE:S:a:g:hfi:c:ldr:", ["verbose","avm=","asc=","globalabc=","help", | opts, args = getopt(argv[1:], "vE:S:a:g:hfi:c:ldr:m", ["verbose","avm=","asc=","globalabc=","help", | def usage(c): print "usage: %s [options] [tests]" % basename(argv[0]) print " -v --verbose enable additional output" print " -E --avm avmplus command to use" print " -S --avm2 second avmplus command to use" print " -a --asc compiler to use" print " -c --config configuration to use with testconfig.txt" print " -g --globalabc location of global.abc" print " -h --help display help and exit" print " -f --forcerebuild force rebuild all test files" print " -i --iterations number of times to repeat test" print " -l --log logs results to a file" print " -d --socketlog logs results to a socket server" print " -r --runtime name of the runtime VM used, including switch info eg. TTVMi (tamarin-tracing interp)" print " --vmversion specify vmversion e.g. 502, use this if cannot be calculated from executable" print " --ascargs args to pass to asc on rebuild of test files" print " --vmargs args to pass to vm" print " --vmargs2 args to pass to avm2, if not specified --vmargs will be used" print " --nooptimize do not optimize files when compiling" exit(c) | 922a70b8ca3591bc66a38d59f03d4b2e4e59737f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13395/922a70b8ca3591bc66a38d59f03d4b2e4e59737f/runtests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
12,
71,
4672,
1172,
315,
9167,
30,
738,
87,
306,
2116,
65,
306,
16341,
4279,
738,
4882,
12,
19485,
63,
20,
5717,
1172,
315,
300,
90,
1493,
11369,
4202,
4237,
3312,
876,
6,
1172,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
12,
71,
4672,
1172,
315,
9167,
30,
738,
87,
306,
2116,
65,
306,
16341,
4279,
738,
4882,
12,
19485,
63,
20,
5717,
1172,
315,
300,
90,
1493,
11369,
4202,
4237,
3312,
876,
6,
1172,
... |
for i in self.temperatures: file = open("/proc/acpi/thermal_zone/"+i+"/temperature") line = file.readline() while len(line) != 0: if line.find("temperature") == 0: self.temperatures[i] = line.split(":")[1].strip() | try: for i in self.temperatures: file = open("/proc/acpi/thermal_zone/"+i+"/temperature") | def update_temperatures(self): """Read current temperatures""" # Update processor temperature | a5f2d35e0da5172061e926554430e102d2600a96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2969/a5f2d35e0da5172061e926554430e102d2600a96/acpi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
874,
457,
2790,
12,
2890,
4672,
3536,
1994,
783,
1022,
457,
2790,
8395,
282,
468,
2315,
6659,
12843,
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,
1089,
67,
874,
457,
2790,
12,
2890,
4672,
3536,
1994,
783,
1022,
457,
2790,
8395,
282,
468,
2315,
6659,
12843,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise | def __init__(self, dir): self.dir = dir self.control = os.path.join(dir, "control") self.status = os.path.join(dir, "status") self.variables = {} self.tests = [] self.kernel = None | e1471b8de3c886e9566d685f635fed88acc76f42 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12268/e1471b8de3c886e9566d685f635fed88acc76f42/parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1577,
4672,
365,
18,
1214,
273,
1577,
365,
18,
7098,
273,
1140,
18,
803,
18,
5701,
12,
1214,
16,
315,
7098,
7923,
365,
18,
2327,
273,
1140,
18,
803,
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,
1577,
4672,
365,
18,
1214,
273,
1577,
365,
18,
7098,
273,
1140,
18,
803,
18,
5701,
12,
1214,
16,
315,
7098,
7923,
365,
18,
2327,
273,
1140,
18,
803,
18... | |
client.remove(remotePath + basename(filename)) | if basename(filename) in fileList: client.remove(remotePath + basename(filename)) | def callback(i, j): print i, j | 65dc99220014e2cc36504541e5e9286779f226bc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/65dc99220014e2cc36504541e5e9286779f226bc/UploadFile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1348,
12,
77,
16,
525,
4672,
1172,
277,
16,
525,
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,
1348,
12,
77,
16,
525,
4672,
1172,
277,
16,
525,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
... def _(a=5, y=range(20)): print a + y | ... def _(a=5, y=(0..20)): print a + y | ... def _(a=5, y=range(20)): print a + y | 62388752f294ea8d4a0b63c99ef0284a3db57018 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62388752f294ea8d4a0b63c99ef0284a3db57018/interact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
1652,
389,
12,
69,
33,
25,
16,
677,
33,
3676,
12,
3462,
3719,
30,
1172,
279,
397,
677,
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,
1372,
1652,
389,
12,
69,
33,
25,
16,
677,
33,
3676,
12,
3462,
3719,
30,
1172,
279,
397,
677,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
num_per_page = self.settings.get_int ('num-per-page') | num_per_page = self.settings.get_value ('num-per-page').get_uint32 () | def do_create_configure_widget(self): """ Plugin config widget. This code must be independent from the rest of the plugin. FIXME: bgo#624073 """ builder = Totem.plugin_load_interface ('jamendo', 'jamendo.ui', True, None, self) config_widget = builder.get_object ('config_widget') config_widget.connect ('destroy', self.on_config_widget_destroy) format = self.settings.get_enum ('format') num_per_page = self.settings.get_int ('num-per-page') | 94f7eca4af87a06c4c557582364f0f240b94c497 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11070/94f7eca4af87a06c4c557582364f0f240b94c497/jamendo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2640,
67,
14895,
67,
6587,
12,
2890,
4672,
3536,
6258,
642,
3604,
18,
1220,
981,
1297,
506,
14807,
628,
326,
3127,
434,
326,
1909,
18,
9852,
30,
324,
3240,
7,
26,
3247,
8642,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2640,
67,
14895,
67,
6587,
12,
2890,
4672,
3536,
6258,
642,
3604,
18,
1220,
981,
1297,
506,
14807,
628,
326,
3127,
434,
326,
1909,
18,
9852,
30,
324,
3240,
7,
26,
3247,
8642,
... |
'href': relative_uri(requrl + '/', link), | 'href': relative_uri(req.url, link), | def get_keyword_matches(self, req, term=None, avoid_fuzzy=False): """ Find keyword matches. If there is an exact match, just redirect: http://docs.python.org/os.path.exists would automatically redirect to http://docs.python.org/modules/os.path/#os.path.exists. Else, show a page with close matches. | c678feadbe0ed46d817b1d29d7e633c81ecbcde8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1278/c678feadbe0ed46d817b1d29d7e633c81ecbcde8/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
11041,
67,
8436,
12,
2890,
16,
1111,
16,
2481,
33,
7036,
16,
4543,
67,
74,
13903,
33,
8381,
4672,
3536,
4163,
4932,
1885,
18,
971,
1915,
353,
392,
5565,
845,
16,
2537,
3136,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11041,
67,
8436,
12,
2890,
16,
1111,
16,
2481,
33,
7036,
16,
4543,
67,
74,
13903,
33,
8381,
4672,
3536,
4163,
4932,
1885,
18,
971,
1915,
353,
392,
5565,
845,
16,
2537,
3136,
... |
if dsp_file: sources = sources or [] sources.extend(self.get_source_files(dsp_file)) | def __init__ (self, name, sources=None, include_dirs=[], define_macros=None, undef_macros=None, library_dirs=[], libraries=[], runtime_library_dirs=None, extra_objects=None, extra_compile_args=None, extra_link_args=None, export_symbols=None, export_symbol_file=None, dsp_file=None, ): assert dsp_file or sources, "Either dsp_file or sources must be specified" libary_dirs = library_dirs, include_dirs = ['com/win32com/src/include', 'win32/src'] + include_dirs libraries = ['user32', 'odbc32', 'advapi32', 'oleaut32', 'ole32', 'shell32'] + libraries | 457a0c87599728580c734960e1f42b75599d3307 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/457a0c87599728580c734960e1f42b75599d3307/setup_win32all_core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
508,
16,
5550,
33,
7036,
16,
2341,
67,
8291,
22850,
6487,
4426,
67,
5821,
6973,
33,
7036,
16,
640,
536,
67,
5821,
6973,
33,
7036,
16,
5313,
67,
8291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
508,
16,
5550,
33,
7036,
16,
2341,
67,
8291,
22850,
6487,
4426,
67,
5821,
6973,
33,
7036,
16,
640,
536,
67,
5821,
6973,
33,
7036,
16,
5313,
67,
8291,
... | |
def change_to_location_view(self, plugin_api): tasks = plugin_api.get_all_tasks() tasks_with_location = [] tasks_without_location = [] for tid in tasks: task = plugin_api.get_task(tid) tags = task.get_tags() for tag in tags: if "location" in tag.get_all_attributes(): tasks_with_location.append(task) else: tasks_without_location.append(task) for task in tasks_with_location: tags = task.get_tags() for tag in tags: if tag.get_attribute("location"): position = eval(tag.get_attribute("location")) if not self.geoclue.compare_position(position[0], position[1], self.PROXIMITY_FACTOR): plugin_api.add_task_to_workview_filter(task.get_id()) | def filter_workview_by_location(self, plugin_api): if self.location.has_key("latitude") and self.location.has_key("longitude"): tasks = plugin_api.get_all_tasks() tasks_with_location = [] tasks_without_location = [] for tid in tasks: task = plugin_api.get_task(tid) tags = task.get_tags() for tag in tags: if "location" in tag.get_all_attributes(): tasks_with_location.append(task) else: tasks_without_location.append(task) for task in tasks_with_location: tags = task.get_tags() for tag in tags: if tag.get_attribute("location"): position = eval(tag.get_attribute("location")) if not self.geoclue.compare_position(position[0], position[1], float(self.PROXIMITY_FACTOR)): plugin_api.add_task_to_workview_filter(task.get_id()) | def change_to_location_view(self, plugin_api): tasks = plugin_api.get_all_tasks() tasks_with_location = [] tasks_without_location = [] for tid in tasks: task = plugin_api.get_task(tid) tags = task.get_tags() for tag in tags: if "location" in tag.get_all_attributes(): tasks_with_location.append(task) else: tasks_without_location.append(task) # add the tasks that are in the current location # or in the proximity factor's range to the new model # TODO: # - check the task status for task in tasks_with_location: tags = task.get_tags() for tag in tags: if tag.get_attribute("location"): position = eval(tag.get_attribute("location")) if not self.geoclue.compare_position(position[0], position[1], self.PROXIMITY_FACTOR): plugin_api.add_task_to_workview_filter(task.get_id()) | 12aa706127ecc14ac0202cf17283e5add9dd74b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/12aa706127ecc14ac0202cf17283e5add9dd74b1/geolocalized-tasks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
869,
67,
3562,
67,
1945,
12,
2890,
16,
1909,
67,
2425,
4672,
4592,
273,
1909,
67,
2425,
18,
588,
67,
454,
67,
9416,
1435,
225,
4592,
67,
1918,
67,
3562,
273,
5378,
4592,
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,
2549,
67,
869,
67,
3562,
67,
1945,
12,
2890,
16,
1909,
67,
2425,
4672,
4592,
273,
1909,
67,
2425,
18,
588,
67,
454,
67,
9416,
1435,
225,
4592,
67,
1918,
67,
3562,
273,
5378,
4592,
67... |
if options.syslog_prefix: | if options.syslog and options.syslog_prefix: | def help_reactors(*args): run_twistd(["--help-reactors"]) sys.exit(1) | b91b50bcd3713e961858c675c8cf6f9be791230f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3337/b91b50bcd3713e961858c675c8cf6f9be791230f/run.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
17056,
1383,
30857,
1968,
4672,
1086,
67,
11246,
376,
72,
3816,
6,
413,
5201,
17,
17056,
1383,
6,
5717,
2589,
18,
8593,
12,
21,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
17056,
1383,
30857,
1968,
4672,
1086,
67,
11246,
376,
72,
3816,
6,
413,
5201,
17,
17056,
1383,
6,
5717,
2589,
18,
8593,
12,
21,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100... |
for node in self.doc_order_iter(doc): print node | def open_cb(self, b): | 34016e248ab107f4924918f308190464649d31f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2237/34016e248ab107f4924918f308190464649d31f5/khagan.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
7358,
12,
2890,
16,
324,
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,
1696,
67,
7358,
12,
2890,
16,
324,
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 self.args.protocol == 'tcp' or self.args.protocol == 'UDP': | if self.args.protocol == 'tcp' or self.args.protocol == 'TCP': | def getData(self): | b4e224ae5fe3f0243b81962579ee62002bb25750 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/b4e224ae5fe3f0243b81962579ee62002bb25750/common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4303,
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,
4303,
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,
-... |
(dt, tz) = date.split(' ') date = datetime.fromtimestamp(int(dt) + int(tz)) | tags = None if files == ['.hgtags']: tags = [tag for (tag, tagnode) in repo.tags().iteritems() if tagnode in parents] if pms.has_key('.hgtags'): pms = {'.hgtags': pms['.hgtags']} else: pms = {} | def _changesetForRevision(self, repo, revision): from changes import Changeset, ChangesetEntry from datetime import datetime | bcdd7ec65ad49ff6a8c0bcf77d0355e1f12fa8c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/bcdd7ec65ad49ff6a8c0bcf77d0355e1f12fa8c2/hglib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6329,
278,
1290,
7939,
12,
2890,
16,
3538,
16,
6350,
4672,
628,
3478,
1930,
17776,
278,
16,
17776,
278,
1622,
628,
3314,
1930,
3314,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6329,
278,
1290,
7939,
12,
2890,
16,
3538,
16,
6350,
4672,
628,
3478,
1930,
17776,
278,
16,
17776,
278,
1622,
628,
3314,
1930,
3314,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def read(self, n = 0): if n <= 0: | def read(self, n = -1): if n < 0: | def read(self, n = 0): if n <= 0: newpos = len(self.buf) else: newpos = min(self.pos+n, len(self.buf)) r = self.buf[self.pos:newpos] self.pos = newpos return r | f7476c5088e6f459f866901219e1b5b084fb0750 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f7476c5088e6f459f866901219e1b5b084fb0750/StringIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
290,
273,
300,
21,
4672,
309,
290,
411,
374,
30,
394,
917,
273,
562,
12,
2890,
18,
4385,
13,
469,
30,
394,
917,
273,
1131,
12,
2890,
18,
917,
15,
82,
16,
562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
290,
273,
300,
21,
4672,
309,
290,
411,
374,
30,
394,
917,
273,
562,
12,
2890,
18,
4385,
13,
469,
30,
394,
917,
273,
1131,
12,
2890,
18,
917,
15,
82,
16,
562,
... |
if not self.globals.settings['show_only_current_desktop'] \ or (self.window.get_workspace() is None \ or self.screen.get_active_workspace() == \ self.window.get_workspace()) \ and self.window.is_in_viewport( self.screen.get_active_workspace()): t = gtk.get_current_event_time() | aws = self.screen.get_active_workspace() wws = win.get_workspace() if not self.globals.settings['show_only_current_desktop'] or \ (wws is None or aws == wws) and win.is_in_viewport(aws): t = int(time()) if wws is not None and aws != wws: win.get_workspace().activate(t) if not win.is_in_viewport(aws): wx,wy,ww,wh = self.window.get_geometry() sw = self.screen.get_width() sh = self.screen.get_height() self.screen.move_viewport(wx - (wx%sw), wy - (wy%sh)) | def gkey_select_next_group(self, previous=False): active_found = False gl = self.groups.values() # Repeat list twice so we can get # back to the first group after the last gl = gl + gl if previous: gl.reverse() for gr in gl: if gr.list_hide_timeout is not None: # Hide the popup if it's opened # by keyboard shortcut. gr.hide_list() if gr.has_active_window: active_found = True continue | 25decfa92376e2a95d3dfc49f44eeac4b67758d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/25decfa92376e2a95d3dfc49f44eeac4b67758d5/dockbar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
856,
67,
4025,
67,
4285,
67,
1655,
12,
2890,
16,
2416,
33,
8381,
4672,
2695,
67,
7015,
273,
1083,
5118,
273,
365,
18,
4650,
18,
2372,
1435,
468,
20742,
666,
13605,
1427,
732,
848,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
856,
67,
4025,
67,
4285,
67,
1655,
12,
2890,
16,
2416,
33,
8381,
4672,
2695,
67,
7015,
273,
1083,
5118,
273,
365,
18,
4650,
18,
2372,
1435,
468,
20742,
666,
13605,
1427,
732,
848,... |
self.assertEqual(b.rpartition(b'w'), (b'', b'', b'mississippi')) | self.assertEqual(b.partition(b'w'), (b'mississippi', b'', b'')) | def test_partition(self): b = self.type2test(b'mississippi') self.assertEqual(b.partition(b'ss'), (b'mi', b'ss', b'issippi')) self.assertEqual(b.rpartition(b'w'), (b'', b'', b'mississippi')) | 5f31c7d9de42c3e61ab40db94e55abfa958075d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/5f31c7d9de42c3e61ab40db94e55abfa958075d1/test_bytes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
10534,
12,
2890,
4672,
324,
273,
365,
18,
723,
22,
3813,
12,
70,
17784,
1054,
1054,
625,
7259,
6134,
365,
18,
11231,
5812,
12,
70,
18,
10534,
12,
70,
1807,
87,
19899,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
10534,
12,
2890,
4672,
324,
273,
365,
18,
723,
22,
3813,
12,
70,
17784,
1054,
1054,
625,
7259,
6134,
365,
18,
11231,
5812,
12,
70,
18,
10534,
12,
70,
1807,
87,
19899,
261,
... |
return int(x[-3])*1024 | return int(x[3])*1024 | def get_free_space(uuid): path = get_mount_point_for_uuid(uuid) cmd = 'df "%s"' % path print '$', cmd f = os.popen(cmd) s = f.read() f.close() line = s.split('\n')[1] x = line.strip().split() print x if int(x[1])==0: return -1 # unknown amount of space return int(x[-3])*1024 | cd5e63175c5611da8c59471f031292505308c0a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3798/cd5e63175c5611da8c59471f031292505308c0a4/backup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9156,
67,
2981,
12,
7080,
4672,
589,
273,
336,
67,
4778,
67,
1153,
67,
1884,
67,
7080,
12,
7080,
13,
1797,
273,
296,
2180,
2213,
87,
5187,
738,
589,
1172,
3365,
2187,
1797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9156,
67,
2981,
12,
7080,
4672,
589,
273,
336,
67,
4778,
67,
1153,
67,
1884,
67,
7080,
12,
7080,
13,
1797,
273,
296,
2180,
2213,
87,
5187,
738,
589,
1172,
3365,
2187,
1797,
... |
self.waitbuf = StringIO() | self.waitbuf = [] | def __init__ (self, rules, url, **opts): if wc.config['showerrors']: self.error = self._error self.warning = self._warning self.fatalError = self._fatalError HtmlParser.__init__(self) self.rules = rules self.comments = opts['comments'] self.javascript = opts['javascript'] self.outbuf = StringIO() self.inbuf = StringIO() self.waitbuf = StringIO() self.state = 'parse' self.script = '' self.waited = 0 self.rulestack = [] self.buf = [] self.url = url or "unknown" if self.javascript: self.jsEnv = jslib.new_jsenv() self.output_counter = 0 self.popup_counter = 0 | 89b79386924e75b2a16ac8ce4c732a86c3d9ed2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/89b79386924e75b2a16ac8ce4c732a86c3d9ed2d/Rewriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2931,
16,
880,
16,
2826,
4952,
4672,
309,
14310,
18,
1425,
3292,
4500,
4324,
3546,
30,
365,
18,
1636,
273,
365,
6315,
1636,
365,
18,
8551,
273,
365,
631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2931,
16,
880,
16,
2826,
4952,
4672,
309,
14310,
18,
1425,
3292,
4500,
4324,
3546,
30,
365,
18,
1636,
273,
365,
6315,
1636,
365,
18,
8551,
273,
365,
631... |
sql = "SELECT %s FROM `%s` %s" % (self.retcolsSQLBlacklist, tableBlacklist, sqlWhere) | sql = "SELECT %s FROM `%s` %s" % (self.retcolsSQLBlacklist, self.tableBlacklist, sqlWhere) | def check(self, data, *args, **keywords): cacheCaseSensitive = self.getParam('cacheCaseSensitive') param = self.getParam('param') | 2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5428/2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae/ListBW.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
2890,
16,
501,
16,
380,
1968,
16,
2826,
11771,
4672,
1247,
2449,
14220,
273,
365,
18,
588,
786,
2668,
2493,
2449,
14220,
6134,
579,
273,
365,
18,
588,
786,
2668,
891,
6134,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
2890,
16,
501,
16,
380,
1968,
16,
2826,
11771,
4672,
1247,
2449,
14220,
273,
365,
18,
588,
786,
2668,
2493,
2449,
14220,
6134,
579,
273,
365,
18,
588,
786,
2668,
891,
6134,
2,... |
for t in x: if not (isinstance(t, tuple) and len(t) == 2 and isinstance(t[1],(int, long, Integer))): raise TypeError, "x must be a list of tuples of length 2" list.__init__(self, x) | for i in xrange(len(x)): t=x[i] if not (isinstance(t, tuple) and len(t) == 2): raise TypeError, "input must be a list of tuples of length 2" if not isinstance(t[1],(int, long, Integer)): try: x[i]= (t[0], Integer(t[1])) except TypeError: raise TypeError, "powers of factors must be integers" list.__init__(self, [ (t[0],int(t[1])) for t in x]) | def __init__(self, x, unit=None, cr=False, sort=True, simplify=True): if not isinstance(x, list): raise TypeError, "x must be a list" if isinstance(x, Factorization): if unit is None: unit = x.__unit else: unit = x.__unit * unit from sage.rings.integer import Integer for t in x: if not (isinstance(t, tuple) and len(t) == 2 and isinstance(t[1],(int, long, Integer))): raise TypeError, "x must be a list of tuples of length 2" list.__init__(self, x) if unit is None: if len(x) > 0: try: unit = self.base_ring()(1) except AttributeError: unit = Integer(1) else: unit = Integer(1) self.__unit = unit self.__cr = cr if self.is_commutative() and sort: self.sort() if simplify: self.simplify() | 26bf8cac04006edc32bbd8c704363567813199f6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/26bf8cac04006edc32bbd8c704363567813199f6/factorization.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
619,
16,
2836,
33,
7036,
16,
4422,
33,
8381,
16,
1524,
33,
5510,
16,
16499,
33,
5510,
4672,
309,
486,
1549,
12,
92,
16,
666,
4672,
1002,
3580,
16,
315,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
619,
16,
2836,
33,
7036,
16,
4422,
33,
8381,
16,
1524,
33,
5510,
16,
16499,
33,
5510,
4672,
309,
486,
1549,
12,
92,
16,
666,
4672,
1002,
3580,
16,
315,... |
for c in self.pool.get('account.tax').compute(cr, uid, line.tax_id, line.price_unit * (1-(line.discount or 0.0)/100.0), line.product_uom_qty, order.partner_invoice_id.id, line.product_id, order.partner_id): | for c in self.pool.get('account.tax').compute(cr, uid, line.tax_id, line.price_unit * (1-(line.discount or 0.0)/100.0), line.product_uos_qty, order.partner_invoice_id.id, line.product_id, order.partner_id): | def _amount_tax(self, cr, uid, ids, field_name, arg, context): res = {} cur_obj=self.pool.get('res.currency') for order in self.browse(cr, uid, ids): val = 0.0 cur=order.pricelist_id.currency_id for line in order.order_line: for c in self.pool.get('account.tax').compute(cr, uid, line.tax_id, line.price_unit * (1-(line.discount or 0.0)/100.0), line.product_uom_qty, order.partner_invoice_id.id, line.product_id, order.partner_id): val+= cur_obj.round(cr, uid, cur, c['amount']) res[order.id]=cur_obj.round(cr, uid, cur, val) return res | 9accdd11acb449201def5e34b3d0d7f7c5e9aba4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/9accdd11acb449201def5e34b3d0d7f7c5e9aba4/sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
67,
8066,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
400,
273,
2618,
662,
67,
2603,
33,
2890,
18,
6011,
18,
588,
2668,
455,
18,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
67,
8066,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
400,
273,
2618,
662,
67,
2603,
33,
2890,
18,
6011,
18,
588,
2668,
455,
18,
7... |
(group.get('name'), group.get('name'), style, color)) | (group.get('name'), group.get('name'), style, group.get('color'))) | def Visualize(self, repopath, raw=False, hosts=False, bundles=False, key=False): '''Build visualization of groups file''' groupdata = lxml.etree.parse(repopath + '/Metadata/groups.xml') groupdata.xinclude() groups = groupdata.getroot() if raw: dotpipe = popen2.Popen4("dd bs=4M 2>/dev/null") else: dotpipe = popen2.Popen4("dot -Tpng") categories = {'default':'grey83'} instances = {} egroups = groups.findall("Group") + groups.findall('.//Groups/Group') for group in egroups: if group.get('category', False): if not categories.has_key(group.get('category')): categories[group.get('category')] = self.colors.pop() try: dotpipe.tochild.write("digraph groups {\n") except: print "write to dot process failed. Is graphviz installed?" raise SystemExit(1) dotpipe.tochild.write('\trankdir="LR";\n') | e5a2454eeb1c692111e4a7235a1d49659593911c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/e5a2454eeb1c692111e4a7235a1d49659593911c/Viz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26832,
554,
12,
2890,
16,
2071,
556,
421,
16,
1831,
33,
8381,
16,
7206,
33,
8381,
16,
11408,
33,
8381,
16,
498,
33,
8381,
4672,
9163,
3116,
30056,
434,
3252,
585,
26418,
1041,
892,
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,
26832,
554,
12,
2890,
16,
2071,
556,
421,
16,
1831,
33,
8381,
16,
7206,
33,
8381,
16,
11408,
33,
8381,
16,
498,
33,
8381,
4672,
9163,
3116,
30056,
434,
3252,
585,
26418,
1041,
892,
273... |
if os.sep != '/': paths = string.split (pathname, '/') return apply (os.path.join, paths) else: return pathname | paths = string.split(pathname, '/') return apply(os.path.join, paths) | def convert_path (pathname): """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local convention before we can actually use them in the filesystem. Raises ValueError if 'pathname' is absolute (starts with '/') or contains local directory separators (unless the local separator is '/', of course).""" if pathname[0] == '/': raise ValueError, "path '%s' cannot be absolute" % pathname if pathname[-1] == '/': raise ValueError, "path '%s' cannot end with '/'" % pathname if os.sep != '/': paths = string.split (pathname, '/') return apply (os.path.join, paths) else: return pathname | 81ff1667998085671e05dd5a9e6d70f35b936961 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/81ff1667998085671e05dd5a9e6d70f35b936961/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
803,
261,
28336,
4672,
3536,
990,
296,
28336,
11,
487,
279,
508,
716,
903,
1440,
603,
326,
6448,
6496,
16,
277,
18,
73,
18,
1416,
518,
603,
2023,
471,
1378,
518,
1473,
9475,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
803,
261,
28336,
4672,
3536,
990,
296,
28336,
11,
487,
279,
508,
716,
903,
1440,
603,
326,
6448,
6496,
16,
277,
18,
73,
18,
1416,
518,
603,
2023,
471,
1378,
518,
1473,
9475,
... |
self.change2ElemPage() | def update_dialog(self, elemNum): """Called when the current element has been changed. Update non user interactive controls display for current selected element: element label info and element graphics info """ | 8624a03629a78b37387e297a0bcde02be3eca359 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/8624a03629a78b37387e297a0bcde02be3eca359/MMKit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
12730,
12,
2890,
16,
3659,
2578,
4672,
3536,
8185,
1347,
326,
783,
930,
711,
2118,
3550,
18,
2315,
1661,
729,
12625,
11022,
2562,
364,
783,
3170,
930,
30,
930,
1433,
1123,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
12730,
12,
2890,
16,
3659,
2578,
4672,
3536,
8185,
1347,
326,
783,
930,
711,
2118,
3550,
18,
2315,
1661,
729,
12625,
11022,
2562,
364,
783,
3170,
930,
30,
930,
1433,
1123,
471,... | |
par += self.make_xref(self.typerolename, domain, typename) | if len(fieldtype) == 1 and isinstance(fieldtype[0], nodes.Text): typename = u''.join(n.astext() for n in types[fieldarg]) par += self.make_xref(self.typerolename, domain, typename) else: par += fieldtype | def make_field(self, types, domain, items): fieldname = nodes.field_name('', self.label) listnode = self.list_type() for fieldarg, content in items: par = nodes.paragraph() par += self.make_xref(self.rolename, domain, fieldarg, nodes.strong) if fieldarg in types: typename = u''.join(n.astext() for n in types[fieldarg]) par += nodes.Text(' (') par += self.make_xref(self.typerolename, domain, typename) par += nodes.Text(')') par += nodes.Text(' -- ') par += content listnode += nodes.list_item('', par) fieldbody = nodes.field_body('', listnode) return nodes.field('', fieldname, fieldbody) | 87487752ab19c216ac9c6cfce03c69081be094d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/87487752ab19c216ac9c6cfce03c69081be094d8/docfields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
1518,
12,
2890,
16,
1953,
16,
2461,
16,
1516,
4672,
14680,
273,
2199,
18,
1518,
67,
529,
2668,
2187,
365,
18,
1925,
13,
666,
2159,
273,
365,
18,
1098,
67,
723,
1435,
364,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
1518,
12,
2890,
16,
1953,
16,
2461,
16,
1516,
4672,
14680,
273,
2199,
18,
1518,
67,
529,
2668,
2187,
365,
18,
1925,
13,
666,
2159,
273,
365,
18,
1098,
67,
723,
1435,
364,
6... |
'section_id' : fields.many2one('crm.case.section', 'Section', required=False) | def _get_hours(self, cr, uid, ids, context={}, *arg): res = {} if not ids: return {} for id in ids: for acc in self.browse(cr, uid, ids, context): cr.execute("""select id from account_analytic_line where \ account_id in (select category_id from project_project where id = %s)""" %id) line_id = map(lambda x: x[0], cr.fetchall()) res[acc.id] = line_id return res | 7d4a1f443e6db1070d34b81a48740dd9e244dd98 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7d4a1f443e6db1070d34b81a48740dd9e244dd98/portal_project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
16814,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
28793,
380,
3175,
4672,
400,
273,
2618,
309,
486,
3258,
30,
327,
2618,
364,
612,
316,
3258,
30,
364,
4078,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
16814,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
28793,
380,
3175,
4672,
400,
273,
2618,
309,
486,
3258,
30,
327,
2618,
364,
612,
316,
3258,
30,
364,
4078,
316,
... | |
path = path.replace('/', os.sep) | path = self._absnorm(path) | def directory_should_exist(self, path, msg=None): """Fails unless the given path points to an existing directory. The path can be given as an exact path or as a pattern similarly as with `File Should Exist` keyword. The default error message can be overridden with the `msg` argument. """ path = path.replace('/', os.sep) matches = [ p for p in glob.glob(path) if os.path.isdir(p) ] if not matches: self._fail(msg, "Path '%s' does not match any directory" % path) self._info("Directory '%s' exists" % path) | 4e92df2860c270b97129fb5577b1caec2faab8a2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/4e92df2860c270b97129fb5577b1caec2faab8a2/OperatingSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1867,
67,
13139,
67,
7398,
12,
2890,
16,
589,
16,
1234,
33,
7036,
4672,
3536,
30800,
3308,
326,
864,
589,
3143,
358,
392,
2062,
1867,
18,
225,
1021,
589,
848,
506,
864,
487,
392,
5565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1867,
67,
13139,
67,
7398,
12,
2890,
16,
589,
16,
1234,
33,
7036,
4672,
3536,
30800,
3308,
326,
864,
589,
3143,
358,
392,
2062,
1867,
18,
225,
1021,
589,
848,
506,
864,
487,
392,
5565,... |
if fleet2[0]['def'] and random.random < .7: | if fleet2[0]['def'] and random.random() < .7: fleet2[0]['def'] -= 1 f1report.append(f1replinestart + "Enemy " + shiptypes[fleet2[0]['type']]['singular'] + " dodged an attack") f2report.append(f2replinestart + "Our " + shiptypes[fleet2[0]['type']]['singular'] + " dodged an attack") continue if fleet2[0]['def'] and random.random() < .7: fleet2[0]['def'] -= 1 f1report.append(f1replinestart + "Enemy " + shiptypes[fleet2[0]['type']]['singular'] + " dodged an attack") f2report.append(f2replinestart + "Our " + shiptypes[fleet2[0]['type']]['singular'] + " dodged an attack") continue if fleet2[0]['def'] and random.random() < .7: fleet2[0]['def'] -= 1 | def doattack(fleet1, fleet2, f1report, f2report, f1replinestart, f2replinestart): done = 1 for ship in fleet1: if len(fleet2) == 0: done = 1 break if ship['att'] > 0: done = 0 ship['att'] -= 1 if random.random() < .1: random.shuffle(fleet2) if fleet2[0]['def'] and random.random < .7: # successful defense f1report.append(f1replinestart + "Enemy " + shiptypes[fleet2[0]['type']]['singular'] + " dodged an attack") f2report.append(f2replinestart + "Our " + shiptypes[fleet2[0]['type']]['singular'] + " dodged an attack") continue # kaboom... f1report.append(f1replinestart + "Enemy " + shiptypes[fleet2[0]['type']]['singular'] + " destroyed") f2report.append(f2replinestart + "We Lost a " + shiptypes[fleet2[0]['type']]['singular'] + " destroyed") fleet2[0]['delete'] = 1 tmp = range(len(fleet2)) tmp.reverse() for i in tmp: if fleet2[i].has_key('delete'): fleet2.pop(i) return done, fleet1, fleet2 | b784d4719ade6a02d296b81980f17fdc391871f4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2020/b784d4719ade6a02d296b81980f17fdc391871f4/doturn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
4558,
484,
12,
74,
8270,
21,
16,
19764,
22,
16,
284,
21,
6006,
16,
284,
22,
6006,
16,
284,
21,
26745,
267,
27893,
16,
284,
22,
26745,
267,
27893,
4672,
2731,
273,
404,
364,
2431... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4558,
484,
12,
74,
8270,
21,
16,
19764,
22,
16,
284,
21,
6006,
16,
284,
22,
6006,
16,
284,
21,
26745,
267,
27893,
16,
284,
22,
26745,
267,
27893,
4672,
2731,
273,
404,
364,
2431... |
if ( not doIgnore and (severity <= opts.severity) ): | if ( not doIgnore and (severity <= opts.severity) ): | def main(): ######################################################################## # command line arguments and options ######################################################################## parser = optparse.OptionParser(usage = __doc__) parser.add_option("-i", "--ignore", dest = "ignore", default = ".ignore-style", help = "Provide a file containing a list of " + "'filename rule line' to ignore (default = %default)") parser.add_option("-l", "--showline", dest = "showline", action = "store_true", default = False, help = "Show the offending line (same as -w) (default = %default)") parser.add_option("-p", "--showstripped", dest = "showstripped", action = "store_true", default = False, help = "Show the stripped offending line (default = %default)") parser.add_option("-w", "--showraw", dest = "showraw", action = "store_true", default = False, help = "Show the raw offending line (default = %default)") parser.add_option("-s", "--severity", dest = "severity", type = int, default = 5, help = "Minimum severity (highest numerical value) " + "to display (default = %default)") opts, args = parser.parse_args() if opts.showline: opts.showraw = True if len(args) != 1: parser.print_help() sys.exit(1) infile, = args m = re.search(".*\.(cc|c|h|py)", infile) if m: filetype = m.group(1) else: filetype = "" ########################################################################## # build the list of tests testList = initializeTestList(filetype, infile) ########################################################################## # load the file and create the line info structures fp = open(infile, 'r') lines = parseLines(fp.readlines(), filetype) fp.close() ########################################################################## # run each test and accumulate violations violationList = [] for test in testList: violationList += test.apply(lines) ########################################################################## # load the .ignore file to deal with known (and accepted) violations ignore = {} if (os.path.exists(opts.ignore)): fp = open(opts.ignore, 'r') for line in fp: line = re.sub("#.*$", "", line) # remove any '#' comments if (re.search("^\s*$", line)): continue # skip blank lines igFile, igRule, igLine = line.split() if (ignore.has_key(igFile) and ignore[igFile].has_key[igRule]): ignore[igFile][igRule].append(igLine) elif (ignore.has_key(igFile) and not ignore[igFile].has_key[igRule]): ignore[igFile][igRule] = [igLine] else: ignore[igFile] = { igRule: [igLine] } fp.close() ########################################################################## # print the results, sorted by line number violationSort = sorted(violationList, key = lambda x: x.getLineNumber()); if violationSort: print "// -*- parasoft -*-" print infile for violation in violationSort: lineNumber = str(violation.getLineNumber()) rule = violation.getId() doIgnore = (ignore.has_key(infile) and ignore[infile].has_key(rule) and (lineNumber in ignore[infile][rule])) severity = violation.getSeverity() if ( not doIgnore and (severity <= opts.severity) ): print "%-4s \t%-60s \t%10s" % (lineNumber + ":", violation.getComment(), "LsstDm-" + rule + "-" + str(severity)) if (opts.showraw): print lines[int(lineNumber) - 1].raw, if (opts.showstripped): print lines[int(lineNumber) - 1].stripped, | cb6d1c1b9da3a15f55b42e7ffc55f274aee325d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6529/cb6d1c1b9da3a15f55b42e7ffc55f274aee325d2/style.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
28256,
1970,
13151,
468,
1296,
980,
1775,
471,
702,
28256,
1970,
13151,
2082,
273,
2153,
2670,
18,
1895,
2678,
12,
9167,
273,
1001,
2434,
972,
13,
2082,
18,
1289,
67,
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,
2774,
13332,
225,
28256,
1970,
13151,
468,
1296,
980,
1775,
471,
702,
28256,
1970,
13151,
2082,
273,
2153,
2670,
18,
1895,
2678,
12,
9167,
273,
1001,
2434,
972,
13,
2082,
18,
1289,
67,
3... |
""" | def __str__(self): params = [self.time, self.user, self.auth] self.cookie[COOKIE_NAME] = ';'.join(params) self.cookie[COOKIE_NAME]['path'] = '/' return self.cookie.output() | a092fdb4f9f2fa0e8e5cff0db63679e797c79978 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2580/a092fdb4f9f2fa0e8e5cff0db63679e797c79978/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
859,
273,
306,
2890,
18,
957,
16,
365,
18,
1355,
16,
365,
18,
1944,
65,
365,
18,
8417,
63,
13584,
67,
1985,
65,
273,
7554,
18,
5701,
12,
2010,
13,
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,
1001,
701,
972,
12,
2890,
4672,
859,
273,
306,
2890,
18,
957,
16,
365,
18,
1355,
16,
365,
18,
1944,
65,
365,
18,
8417,
63,
13584,
67,
1985,
65,
273,
7554,
18,
5701,
12,
2010,
13,
3... | |
def get_q_packed_for_zero_dihedrals(tardy_model): uninitialized = -1e20 result = flex.double(tardy_model.q_packed_size, uninitialized) rotamer_tor_id = set([tor.id for tor in rotamer_tor]) for tor in comp.tor_list: i_q_packed = tor_id_i_q_packed_matches.get(tor.id) if (i_q_packed is not None): ai = [atom_indices[atom_id] for atom_id in tor.atom_ids()] d_sites = [tardy_model.sites[i] for i in ai] d = cctbx.geometry_restraints.dihedral( sites=d_sites, angle_ideal=0, weight=1) if (tor.id in rotamer_tor_id): result[i_q_packed] = -math.radians(d.angle_model) else: result[i_q_packed] = 0 assert result.all_ne(uninitialized) return result tardy_model_start.unpack_q( q_packed=get_q_packed_for_zero_dihedrals(tardy_model=tardy_model_start)) tardy_model_work = scitbx.rigid_body.tardy_model( labels=tardy_model_start.labels, sites=tardy_model_start.sites_moved(), masses=tardy_model_start.masses, tardy_tree=tardy_tree, potential_obj=None) q_packed_zero = get_q_packed_for_zero_dihedrals( tardy_model=tardy_model_work) assert flex.abs(q_packed_zero).all_lt(1e-6) | tors_start = {} for tor in comp.tor_list: ai = [atom_indices.get(atom_id) for atom_id in tor.atom_ids()] if (ai.count(None) != 0): continue d_sites = [tardy_model.sites[i] for i in ai] d = cctbx.geometry_restraints.dihedral( sites=d_sites, angle_ideal=0, weight=1) assert tor.id not in tors_start tors_start[tor.id] = d.angle_model | def get_q_packed_for_zero_dihedrals(tardy_model): uninitialized = -1e20 result = flex.double(tardy_model.q_packed_size, uninitialized) rotamer_tor_id = set([tor.id for tor in rotamer_tor]) for tor in comp.tor_list: i_q_packed = tor_id_i_q_packed_matches.get(tor.id) if (i_q_packed is not None): ai = [atom_indices[atom_id] for atom_id in tor.atom_ids()] d_sites = [tardy_model.sites[i] for i in ai] d = cctbx.geometry_restraints.dihedral( sites=d_sites, angle_ideal=0, weight=1) if (tor.id in rotamer_tor_id): result[i_q_packed] = -math.radians(d.angle_model) else: result[i_q_packed] = 0 # keep fixed assert result.all_ne(uninitialized) return result | 2660185393d07f44d74af45c3a4be3afec180d44 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/2660185393d07f44d74af45c3a4be3afec180d44/tst_tor_vs_tardy_tree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
85,
67,
2920,
329,
67,
1884,
67,
7124,
67,
3211,
18550,
86,
1031,
12,
88,
1060,
93,
67,
2284,
4672,
640,
13227,
273,
300,
21,
73,
3462,
563,
273,
16600,
18,
9056,
12,
88,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
85,
67,
2920,
329,
67,
1884,
67,
7124,
67,
3211,
18550,
86,
1031,
12,
88,
1060,
93,
67,
2284,
4672,
640,
13227,
273,
300,
21,
73,
3462,
563,
273,
16600,
18,
9056,
12,
88,
... |
def getModule(type): | def getModule(tapLookup, type): | def getModule(type): try: mod = tapLookup[type].load() return mod except KeyError: print """Please select one of: %s""" % string.join(tapMods) sys.exit(2) | 65a70796f6fda77dd59f199e2703a3efc83a3b84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/65a70796f6fda77dd59f199e2703a3efc83a3b84/mktap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
11251,
12,
29562,
6609,
16,
618,
4672,
775,
30,
681,
273,
13495,
6609,
63,
723,
8009,
945,
1435,
327,
681,
1335,
4999,
30,
1172,
3536,
8496,
2027,
1245,
434,
30,
738,
87,
8395,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
1652,
11251,
12,
29562,
6609,
16,
618,
4672,
775,
30,
681,
273,
13495,
6609,
63,
723,
8009,
945,
1435,
327,
681,
1335,
4999,
30,
1172,
3536,
8496,
2027,
1245,
434,
30,
738,
87,
8395,
73... |
App_Button( bosh.dirs['MayaPath'], Image(r'images/maya.png'), _("Launch Maya"))) | App_Button( bosh.dirs['MayaPath'], Image(r'images/maya.png'), _("Launch Maya"))) | def InitStatusBar(): """Initialize status bar links.""" #--Bash Status/LinkBar #BashStatusBar.buttons.append(App_Fallout3()) BashStatusBar.buttons.append(Fose_Button()) BashStatusBar.buttons.append(AutoQuit_Button()) BashStatusBar.buttons.append( Fallout3_Button( bosh.dirs['app'].join('Fallout3.exe'), Image(r'images/fallout3.png'), _("Launch Fallout3"), _("Launch Fallout3 + FOSE"), '')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('GECK.exe'), Image(r'images/geck.png'), _("Launch GECK"), _("Launch GECK + FOSE"), '-editor')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('fomm\\fomm.exe'), Image(r'images/database_connect.png'), _("Launch FOMM"))) BashStatusBar.buttons.append( App_FO3Edit( (bosh.dirs['FO3EditPath'], '-view'), Image(r'images/brick_edit.png'), _("Launch FO3View"))) BashStatusBar.buttons.append( App_FO3Edit( dirs['FO3EditPath']), Image(r'images/brick.png'), _("Launch FO3Edit"))) BashStatusBar.buttons.append( App_FO3Edit( (dirs['FO3EditPath'],'-translate'), Image(r'images/brick_error.png'), _("Launch FO3Trans"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/Boss1.png'), _("Launch BOSS"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/boss2.png'), _("Launch BOSS"))) if bosh.inisettings['showmodelingtoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['BlenderPath'], Image(r'images/blender.png'), _("Launch Blender"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['GmaxPath'], Image(r'images/gmax.png'), _("Launch Gmax"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MayaPath'], Image(r'images/maya.png'), _("Launch Maya"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MaxPath'], Image(r'images/max.png'), _("Launch 3dsMax"))) if bosh.inisettings['showmodelingtoollaunchers'] or bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['NifskopePath'], Image(r'images/nifskope.png'), _("Launch Nifskope"))) if bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['GIMP'], Image(r'images/gimp.png'), _("Launch GIMP"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Photoshop'], Image(r'images/photoshop.png'), _("Launch Photoshop"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Artweaver'], Image(r'images/artweaver.png'), _("Launch Artweaver"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['PaintNET'], Image(r'images/paint.net.png'), _("Launch Paint.NET"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['DDSConverter'], Image(r'images/ddsconverter.png'), _("Launch DDSConverter"))) if bosh.inisettings['showaudiotoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['Audacity'], Image(r'images/audacity.png'), _("Launch Audacity"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Fraps'], Image(r'images/fraps.png'), _("Launch Fraps"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['NPP'], Image(r'images/notepad++.png'), _("Launch Notepad++"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom1'], Image(r'images/custom1.png'), _(bosh.inisettings['custom1txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom2'], Image(r'images/custom2.png'), _(bosh.inisettings['custom2txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom3'], Image(r'images/custom3.png'), _(bosh.inisettings['custom3txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom4'], Image(r'images/custom4.png'), _(bosh.inisettings['custom4txt']))) BashStatusBar.buttons.append(App_BashMon()) BashStatusBar.buttons.append(App_DocBrowser()) BashStatusBar.buttons.append(App_ModChecker()) BashStatusBar.buttons.append(App_Help()) | 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,
4378,
1482,
5190,
13332,
3536,
7520,
1267,
4653,
4716,
12123,
468,
413,
38,
961,
2685,
19,
2098,
5190,
468,
38,
961,
1482,
5190,
18,
16016,
18,
6923,
12,
3371,
67,
42,
287,
14533,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4378,
1482,
5190,
13332,
3536,
7520,
1267,
4653,
4716,
12123,
468,
413,
38,
961,
2685,
19,
2098,
5190,
468,
38,
961,
1482,
5190,
18,
16016,
18,
6923,
12,
3371,
67,
42,
287,
14533,
23,
... |
Multiplicative Abelian Group isomorphic to Z x C5 x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a*b, c^6, d] sage: G = F.subgroup([a*b,c^6,d],names = list("xyz")) sage: G Multiplicative Abelian Group isomorphic to Z x C5 x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a*b, c^6, d] | Multiplicative Abelian Group isomorphic to C5 x C64 x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C30 x C64 x C729 generated by [a*b, c^6, d] sage: G = F.subgroup([a*b,c^6,d],names = list("xyz")); G Multiplicative Abelian Group isomorphic to C5 x C64 x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C30 x C64 x C729 generated by [a*b, c^6, d] | def __init__(self, ambient, gens, names="f"): """ | b65442735772ceff5c9acdb22a37ed84013525ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/b65442735772ceff5c9acdb22a37ed84013525ec/abelian_group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
13232,
1979,
16,
314,
773,
16,
1257,
1546,
74,
6,
4672,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
13232,
1979,
16,
314,
773,
16,
1257,
1546,
74,
6,
4672,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
group.add_option('--log-level', dest='log_level', type='choice', choices=loglevels.keys(), help='specify the level of the logging. Accepted values: ' + str(loglevels.keys())) | group.add_option('--log-level', dest='log_level', type='choice', choices=self._LOGLEVELS.keys(), help='specify the level of the logging. Accepted values: ' + str(self._LOGLEVELS.keys())) | def __init__(self, fname=None): self.options = { 'email_from':False, 'interface': '', # this will bind the server to all interfaces 'port': 8069, 'netinterface': '', 'netport': 8070, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'reportgz': False, 'netrpc': True, 'xmlrpc': True, 'soap': False, 'translate_in': None, 'translate_out': None, 'language': None, 'pg_path': None, 'admin_passwd': 'admin', 'csv_internal_sep': ',', 'addons_path': None, 'root_path': None, 'debug_mode': False, 'import_partial': "", 'pidfile': None, 'logfile': None, 'smtp_server': 'localhost', 'smtp_user': False, 'smtp_port':25, 'smtp_password': False, 'stop_after_init': False, # this will stop the server after initialization 'price_accuracy': 2, 'secure' : False, 'syslog' : False, 'log_level': logging.INFO, 'assert_exit_level': logging.WARNING, # level above which a failed assert will be raise 'cache_timeout': 100000, } | 5a398a2ceed86991d804f5f5d006e1d3a26ca4b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/5a398a2ceed86991d804f5f5d006e1d3a26ca4b7/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5299,
33,
7036,
4672,
365,
18,
2116,
273,
288,
296,
3652,
67,
2080,
4278,
8381,
16,
296,
5831,
4278,
10226,
565,
468,
333,
903,
1993,
326,
1438,
358,
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,
1001,
2738,
972,
12,
2890,
16,
5299,
33,
7036,
4672,
365,
18,
2116,
273,
288,
296,
3652,
67,
2080,
4278,
8381,
16,
296,
5831,
4278,
10226,
565,
468,
333,
903,
1993,
326,
1438,
358,
777... |
pp = node.parentNode ns = node.nextSibling pp.removeChild(node) | if node: pp = node.parentNode ns = node.nextSibling pp.removeChild(node) else: pp=self._node | def format(self, text, oldtag=None): if not oldtag: oldtag = self.tag self._node.data = '' node = self._find_parent(self._node, [oldtag]) | 2e7f1a4d772c51458d78e7ce14823be81c5a6a89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/2e7f1a4d772c51458d78e7ce14823be81c5a6a89/report_sxw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
977,
16,
1592,
2692,
33,
7036,
4672,
309,
486,
1592,
2692,
30,
1592,
2692,
273,
365,
18,
2692,
365,
6315,
2159,
18,
892,
273,
875,
756,
273,
365,
6315,
4720,
67,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
977,
16,
1592,
2692,
33,
7036,
4672,
309,
486,
1592,
2692,
30,
1592,
2692,
273,
365,
18,
2692,
365,
6315,
2159,
18,
892,
273,
875,
756,
273,
365,
6315,
4720,
67,
2... |
t = 'roslib/Log' | t = 'rosgraph_msgs/Log' | def test_cmd_type(self): from ros import rostopic cmd = 'rostopic' s = '/rosout_agg' t = 'roslib/Log' | 1d10a71234b1d1d17b6ec6187e32433197b32987 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10596/1d10a71234b1d1d17b6ec6187e32433197b32987/test_rostopic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4172,
67,
723,
12,
2890,
4672,
628,
721,
87,
1930,
721,
5681,
335,
1797,
273,
296,
303,
5681,
335,
11,
272,
273,
1173,
6973,
659,
67,
17535,
11,
268,
273,
296,
303,
24760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
4172,
67,
723,
12,
2890,
4672,
628,
721,
87,
1930,
721,
5681,
335,
1797,
273,
296,
303,
5681,
335,
11,
272,
273,
1173,
6973,
659,
67,
17535,
11,
268,
273,
296,
303,
24760,
... |
gLogger.exception('JobWrapperTemplate could not create working directory with exception:\n%s' %(str(x))) | gLogger.exception('JobWrapperTemplate could not create working directory') | def execute ( arguments ): global jobReport jobID = arguments['Job']['JobID'] os.environ['JOBID'] = jobID jobID = int(jobID) if arguments.has_key('WorkingDirectory'): wdir = os.path.expandvars(arguments['WorkingDirectory']) if os.path.isdir(wdir): os.chdir(wdir) else: try: os.makedirs(wdir) if os.path.isdir(wdir): os.chdir(wdir) except Exception, x: gLogger.exception('JobWrapperTemplate could not create working directory with exception:\n%s' %(str(x))) rescheduleFailedJob(jobID,'Could Not Create Working Directory') return root = arguments['CE']['Root'] jobReport = JobReport(jobID,'JobWrapper') try: job = JobWrapper( jobID, jobReport ) job.initialize(arguments) except Exception, x: message = 'JobWrapper failed the initialization phase with exception: \n%s' %(str(x)) gLogger.exception(message) rescheduleFailedJob(jobID,'Job Wrapper Initialization') job.sendWMSAccounting('Failed','Job Wrapper Initialization') return if arguments['Job'].has_key('InputSandbox'): try: result = job.transferInputSandbox(arguments['Job']['InputSandbox']) if not result['OK']: gLogger.warn(result['Message']) raise JobWrapperError(result['Message']) except Exception, x: message = 'JobWrapper failed to download input sandbox' gLogger.exception(message) rescheduleFailedJob(jobID,'Input Sandbox Download') job.sendWMSAccounting('Failed','Input Sandbox Download') return else: gLogger.verbose('Job has no InputSandbox requirement') jobReport.sendStoredStatusInfo() jobReport.sendStoredJobParameters() if arguments['Job'].has_key('InputData'): if arguments['Job']['InputData']: try: result = job.resolveInputData(arguments['Job']['InputData']) if not result['OK']: gLogger.warn(result['Message']) raise JobWrapperError(result['Message']) except Exception, x: message = 'JobWrapper failed to resolve input data with exception: \n%s' %(str(x)) gLogger.warn(message) gLogger.exception() rescheduleFailedJob(jobID,'Input Data Resolution') job.sendWMSAccounting('Failed','Input Data Resolution') return else: gLogger.verbose('Job has a null InputData requirement:') gLogger.verbose(arguments) else: gLogger.verbose('Job has no InputData requirement') jobReport.sendStoredStatusInfo() jobReport.sendStoredJobParameters() try: result = job.execute(arguments) if not result['OK']: gLogger.warn(result['Message']) raise JobWrapperError(result['Message']) except Exception, x: if str(x) == '0': gLogger.verbose('JobWrapper exited with status=0 after execution') pass else: message = 'Job failed in execution phase with exception: \n%s' %(str(x)) gLogger.warn(message) gLogger.exception() jobReport.setJobStatus('Failed',str(x),sendFlag=False) jobParam = jobReport.setJobParameter('Error Message',message,sendFlag=False) if not jobParam['OK']: gLogger.warn(jobParam) job.sendFailoverRequest('Failed','Exception During Execution') return if arguments['Job'].has_key('OutputSandbox') or arguments['Job'].has_key('OutputData'): try: result = job.processJobOutputs(arguments) if not result['OK']: gLogger.warn(result['Message']) raise JobWrapperError(result['Message']) except Exception, x: message = 'JobWrapper failed to process output files with exception: \n%s' %(str(x)) gLogger.warn(message) gLogger.exception() jobReport.setJobParameter('Error Message',message,sendFlag=False) jobReport.setJobStatus('Failed','Uploading Job Outputs',sendFlag=False) job.sendFailoverRequest('Failed','Uploading Job Outputs') return else: gLogger.verbose('Job has no OutputData or OutputSandbox requirement') try: job.finalize(arguments) except Exception, x: message = 'JobWrapper failed the finalization phase with exception: \n%s' %(str(x)) gLogger.warn(message) gLogger.exception() return | 98469a5fadf61445869859b880cc54412da80ddd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/98469a5fadf61445869859b880cc54412da80ddd/JobWrapperTemplate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
261,
1775,
262,
30,
225,
2552,
1719,
4820,
225,
28913,
273,
1775,
3292,
2278,
21712,
2278,
734,
3546,
1140,
18,
28684,
3292,
18321,
734,
3546,
273,
28913,
28913,
273,
509,
12,
4688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
261,
1775,
262,
30,
225,
2552,
1719,
4820,
225,
28913,
273,
1775,
3292,
2278,
21712,
2278,
734,
3546,
1140,
18,
28684,
3292,
18321,
734,
3546,
273,
28913,
28913,
273,
509,
12,
4688,
... |
C = Instance("test", None, {'a': (Signed, 3)}) | C = Instance("test", ROOT, {'a': (Signed, 3)}) | def build_sqfunc(func, args=[], view=False): try: func = func.im_func except AttributeError: pass t = TranslationContext() t.buildannotator().build_types(func, args) t.buildrtyper(type_system="ootype").specialize() if view or conftest.option.view: t.viewcg() GenSqueak(udir, t) | 68c89757d704c45b9c27ce307810d84c393ac225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/68c89757d704c45b9c27ce307810d84c393ac225/test_oo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
11410,
644,
12,
644,
16,
833,
22850,
6487,
1476,
33,
8381,
4672,
775,
30,
1326,
273,
1326,
18,
381,
67,
644,
1335,
6394,
30,
1342,
268,
273,
17427,
1042,
1435,
268,
18,
3510,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11410,
644,
12,
644,
16,
833,
22850,
6487,
1476,
33,
8381,
4672,
775,
30,
1326,
273,
1326,
18,
381,
67,
644,
1335,
6394,
30,
1342,
268,
273,
17427,
1042,
1435,
268,
18,
3510,... |
self.log.append('<<< ' + line) | def lineReceived(self, line): why = None | f75030b75edbe6c90136972acbf7050669ff7506 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f75030b75edbe6c90136972acbf7050669ff7506/smtp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
980,
8872,
12,
2890,
16,
980,
4672,
11598,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
980,
8872,
12,
2890,
16,
980,
4672,
11598,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
server_response = atom.service.AtomService.Post(self, http_data, uri, | server_response = self.handler.Post(self, http_data, uri, | def Post(self, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4, media_source=None, converter=None): """Insert data into a GData service at the given URI. | 2fc3c8b5e04f49e7854d86afdf5c528572665ee2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6580/2fc3c8b5e04f49e7854d86afdf5c528572665ee2/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5616,
12,
2890,
16,
501,
16,
2003,
16,
2870,
67,
2485,
33,
7036,
16,
880,
67,
2010,
33,
7036,
16,
4114,
67,
2010,
33,
5510,
16,
18064,
67,
17956,
33,
24,
16,
3539,
67,
3168,
33,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5616,
12,
2890,
16,
501,
16,
2003,
16,
2870,
67,
2485,
33,
7036,
16,
880,
67,
2010,
33,
7036,
16,
4114,
67,
2010,
33,
5510,
16,
18064,
67,
17956,
33,
24,
16,
3539,
67,
3168,
33,
70... |
print 'Created new GUSI option' ngusi_opr = Resource(gusi_opr.data) | ngusi_opr = Resource(newdata) | def edit_preferences(): preff_handle = openpreffile(WRITE) l, sr = getprefpath(PATH_STRINGS_ID) if l == None: message('Cannot find any sys.path resource! (Old python?)') sys.exit(0) fss, dr, fss_changed = getprefdir(DIRECTORY_ID) if fss == None: fss = macfs.FSSpec(os.getcwd()) fss_changed = 1 options, opr = getoptions(OPTIONS_ID) saved_options = options[:] creator, type, delaycons, gusi_opr = getgusioptions(GUSI_ID) saved_gusi_options = creator, type, delaycons # Let the user play away result = interact(l, fss, (options, creator, type, delaycons), 'System-wide preferences') # See what we have to update, and how if result == None: sys.exit(0) pathlist, nfss, (options, creator, type, delaycons) = result if nfss != fss: fss_changed = 1 if fss_changed: alias = nfss.NewAlias() if dr: dr.data = alias.data dr.ChangedResource() else: dr = Resource(alias.data) dr.AddResource('alis', DIRECTORY_ID, '') if pathlist != l: if pathlist == []: if sr.HomeResFile() == preff_handle: sr.RemoveResource() elif sr.HomeResFile() == preff_handle: sr.data = listtores(pathlist) sr.ChangedResource() else: sr = Resource(listtores(pathlist)) sr.AddResource('STR#', PATH_STRINGS_ID, '') if options != saved_options: newdata = reduce(lambda x, y: x+chr(y), options, '') if opr and opr.HomeResFile() == preff_handle: opr.data = newdata opr.ChangedResource() else: opr = Resource(newdata) opr.AddResource('Popt', OPTIONS_ID, '') if (creator, type, delaycons) != saved_gusi_options: newdata = setgusioptions(gusi_opr, creator, type, delaycons) if gusi_opr.HomeResFile() == preff_handle: gusi_opr.data = newdata gusi_opr.ChangedResource() else: print 'Created new GUSI option' ngusi_opr = Resource(gusi_opr.data) ngusi_opr.AddResource('GU\267I', GUSI_ID, '') CloseResFile(preff_handle) | a662e3c79daa85cb66b4638487b38a1f393be505 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a662e3c79daa85cb66b4638487b38a1f393be505/EditPythonPrefs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
67,
23219,
13332,
675,
1403,
67,
4110,
273,
1696,
25724,
768,
12,
11677,
13,
225,
328,
16,
9133,
273,
336,
25724,
803,
12,
4211,
67,
5804,
55,
67,
734,
13,
309,
328,
422,
599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
67,
23219,
13332,
675,
1403,
67,
4110,
273,
1696,
25724,
768,
12,
11677,
13,
225,
328,
16,
9133,
273,
336,
25724,
803,
12,
4211,
67,
5804,
55,
67,
734,
13,
309,
328,
422,
599,
... |
def __init__(self, session, manager, remote_party): | def __init__(self, session, manager, remote_party, streams): | def __init__(self, session, manager, remote_party): self.session = session self.session._chat = self self.manager = manager self.remote_party = remote_party self.history_file = None self.put_on_hold = False if self.inv is not None: self.history_file = get_history_file(self.inv) if self.remote_party is None: self.remote_party = format_uri(self.inv.remote_uri) self.subscribe_to_all(sender=self.session) | 757218aa36e3d9194fabf2b88e4254a122dc47e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/757218aa36e3d9194fabf2b88e4254a122dc47e9/sip_session2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1339,
16,
3301,
16,
2632,
67,
21214,
16,
8205,
4672,
365,
18,
3184,
273,
1339,
365,
18,
3184,
6315,
10880,
273,
365,
365,
18,
4181,
273,
3301,
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,
1339,
16,
3301,
16,
2632,
67,
21214,
16,
8205,
4672,
365,
18,
3184,
273,
1339,
365,
18,
3184,
6315,
10880,
273,
365,
365,
18,
4181,
273,
3301,
365,
18,
... |
return Page(self.site(), self.site().namespace(ns + 1) + ':' + self.titleWithoutNamespace()) | ns += 1 if ns == 6: return ImagePage(self.site(), self.titleWithoutNamespace()) return Page(self.site(), self.titleWithoutNamespace(), defaultNamespace=ns) | def toggleTalkPage(self): """Return the other member of the article-talk page pair for this Page. | 54fa5c4791af2d684720c89e9fd87b887b78d41c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/54fa5c4791af2d684720c89e9fd87b887b78d41c/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10486,
56,
2960,
1964,
12,
2890,
4672,
3536,
990,
326,
1308,
3140,
434,
326,
7559,
17,
88,
2960,
1363,
3082,
364,
333,
3460,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10486,
56,
2960,
1964,
12,
2890,
4672,
3536,
990,
326,
1308,
3140,
434,
326,
7559,
17,
88,
2960,
1363,
3082,
364,
333,
3460,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
lineno = 0 | lineno = self.curframe.f_lineno | def do_list(self, arg): rel = re.compile(r'^[-+] *[0-9]* *$') if arg and arg == '.': self.lineno = None pdb.Pdb.do_list(self, '') return if rel.match(arg): if arg == '-': reldist = -7 else: reldist = int(arg) if self.lineno is None: lineno = 0 else: lineno = self.lineno lineno += reldist - 5 pdb.Pdb.do_list(self, str(lineno)) self.lastcmd = 'list ' + arg else: pdb.Pdb.do_list(self, arg) | ce3165af80ba38e8f6a8950edb4cf36624ffcbd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/ce3165af80ba38e8f6a8950edb4cf36624ffcbd7/epdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1098,
12,
2890,
16,
1501,
4672,
1279,
273,
283,
18,
11100,
12,
86,
19856,
18919,
15,
65,
380,
63,
20,
17,
29,
5772,
380,
8,
6134,
309,
1501,
471,
1501,
422,
2611,
30,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1098,
12,
2890,
16,
1501,
4672,
1279,
273,
283,
18,
11100,
12,
86,
19856,
18919,
15,
65,
380,
63,
20,
17,
29,
5772,
380,
8,
6134,
309,
1501,
471,
1501,
422,
2611,
30,
365,
... |
OWGUI.separator(self.sBox) OWGUI.checkBox(self.sBox, self, 'applyOnAnyChange', | box = OWGUI.widgetBox(self.sBtns, orientation='vertical', addSpace=False) OWGUI.separator(box) OWGUI.checkBox(box, self, 'applyOnAnyChange', | def __init__(self,parent=None, signalManager = None): OWWidget.__init__(self, parent, signalManager, "TestLearners") | b6da925d044fec442a4b02d9a5fa7e753c24afa5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/b6da925d044fec442a4b02d9a5fa7e753c24afa5/OWTestLearners.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
33,
7036,
16,
4277,
1318,
273,
599,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
315,
4709,
1682,
1303,
414,
7923,
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,
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,
2938,
33,
7036,
16,
4277,
1318,
273,
599,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
315,
4709,
1682,
1303,
414,
7923,
2... |
info_file.write('Status: ' + 'Stopped' + '\n') try: info_file.write('Title: ' + mpdh.get(self.songinfo, 'artist') + ' - ' + mpdh.get(self.songinfo, 'title') + '\n') except: try: info_file.write('Title: ' + mpdh.get(self.songinfo, 'title') + '\n') except: info_file.write('Title: No - ID Tag\n') | info_file.write('Status: ' + 'Stopped' + '\n') try: info_file.write('Title: ' + mpdh.get(self.songinfo, 'artist') + ' - ' + mpdh.get(self.songinfo, 'title') + '\n') except: try: info_file.write('Title: ' + mpdh.get(self.songinfo, 'title') + '\n') except: info_file.write('Title: No - ID Tag\n') | def update_infofile(self): if self.use_infofile is True: try: info_file = open(self.infofile_path, 'w') | 2d5074cab475c83651a769096af105d9e13e1b31 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/2d5074cab475c83651a769096af105d9e13e1b31/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1376,
768,
12,
2890,
4672,
309,
365,
18,
1202,
67,
1376,
768,
353,
1053,
30,
775,
30,
1123,
67,
768,
273,
1696,
12,
2890,
18,
1376,
768,
67,
803,
16,
296,
91,
6134,
2,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1376,
768,
12,
2890,
4672,
309,
365,
18,
1202,
67,
1376,
768,
353,
1053,
30,
775,
30,
1123,
67,
768,
273,
1696,
12,
2890,
18,
1376,
768,
67,
803,
16,
296,
91,
6134,
2,
-1... |
through `(x - a)^n`. | through `(x - a)^n`. Functions in more variables are also supported. | def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) sage: taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6) -1/720*(45*k^6 - 60*k^4 + 16*k^2)*x^6 - 1/24*(3*k^4 - 4*k^2)*x^4 - 1/2*k^2*x^2 + 1 sage: taylor ((x + 1)^n, x, 0, 4) 1/24*(n^4 - 6*n^3 + 11*n^2 - 6*n)*x^4 + 1/6*(n^3 - 3*n^2 + 2*n)*x^3 + 1/2*(n^2 - n)*x^2 + n*x + 1 """ if not isinstance(f, Expression): f = SR(f) return f.taylor(v=v,a=a,n=n) | bd10fcd2308181d18d7f755582bea0d7d97b6d50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/bd10fcd2308181d18d7f755582bea0d7d97b6d50/functional.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
12,
74,
16,
331,
16,
279,
16,
290,
4672,
3536,
7784,
5708,
365,
316,
279,
15282,
399,
528,
80,
280,
578,
511,
8377,
547,
4166,
316,
326,
2190,
1375,
90,
68,
6740,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
12,
74,
16,
331,
16,
279,
16,
290,
4672,
3536,
7784,
5708,
365,
316,
279,
15282,
399,
528,
80,
280,
578,
511,
8377,
547,
4166,
316,
326,
2190,
1375,
90,
68,
6740,
... |
def move_forward(self, speed): | def move_forward(self, amt): | def move_forward(self, speed): self.rect = None self.pos[0] += math.cos(self.traj) * speed self.pos[1] += math.sin(self.traj) * speed | 9b09cf6ef07d2ee54bff2ed908465c95a67128b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4253/9b09cf6ef07d2ee54bff2ed908465c95a67128b1/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
67,
11565,
12,
2890,
16,
25123,
4672,
365,
18,
2607,
273,
599,
365,
18,
917,
63,
20,
65,
1011,
4233,
18,
14445,
12,
2890,
18,
30514,
13,
380,
8632,
365,
18,
917,
63,
21,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3635,
67,
11565,
12,
2890,
16,
25123,
4672,
365,
18,
2607,
273,
599,
365,
18,
917,
63,
20,
65,
1011,
4233,
18,
14445,
12,
2890,
18,
30514,
13,
380,
8632,
365,
18,
917,
63,
21,
65,
... |
log.debug("Created new seesion") | log.debug("Created new session") | def request(self, host, handler, request_body, verbose=0): """Send a complete request, and parse the response. Return a Deferred response object. """ #From the comments in the Transport class it appears that there will only be one host session = None for session in self.sessions: if not session.waiting_on_response: break | e30a94dbeedffb2c41dfa152c7f4d4d0f1c5b151 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5969/e30a94dbeedffb2c41dfa152c7f4d4d0f1c5b151/AsyncXMLRPCTransport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
2890,
16,
1479,
16,
1838,
16,
590,
67,
3432,
16,
3988,
33,
20,
4672,
3536,
3826,
279,
3912,
590,
16,
471,
1109,
326,
766,
18,
2000,
279,
12816,
766,
733,
18,
3536,
468,
1265... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
2890,
16,
1479,
16,
1838,
16,
590,
67,
3432,
16,
3988,
33,
20,
4672,
3536,
3826,
279,
3912,
590,
16,
471,
1109,
326,
766,
18,
2000,
279,
12816,
766,
733,
18,
3536,
468,
1265... |
elif partition.getFlag(parted.PARTITION_RAID): | elif partition.type == parted.PARTITION_RAID: | def __init__(self, partition): self.partition = partition self.size = partition.getSize() self.start = partition.geometry.start self.end = partition.geometry.end self.description = "" self.used_space = "" if partition.number != -1: self.name = partition.path if partition.fileSystem is None: # no filesystem, check flags if partition.getFlag(parted.PARTITION_SWAP): self.type = ("Linux swap") elif partition.getFlag(parted.PARTITION_RAID): self.type = ("RAID") elif partition.getFlag(parted.PARTITION_LVM): self.type = ("Linux LVM") elif partition.getFlag(parted.PARTITION_HPSERVICE): self.type = ("HP Service") elif partition.getFlag(parted.PARTITION_PALO): self.type = ("PALO") elif partition.getFlag(parted.PARTITION_PREP): self.type = ("PReP") elif partition.getFlag(parted.PARTITION_MSFT_RESERVED): self.type = ("MSFT Reserved") elif partition.getFlag(parted.PARTITION_EXTENDED): self.type = ("Extended Partition") elif partition.getFlag(parted.PARTITION_LOGICAL): self.type = ("Logical Partition") elif partition.getFlag(parted.PARTITION_FREESPACE): self.type = ("Free Space") else: self.type =("Unknown") else: self.type = partition.fileSystem.type else: self.type = "" self.name = _("unallocated") | c4993745f76e2dbbb7e80145e7a6166e91f08d7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1953/c4993745f76e2dbbb7e80145e7a6166e91f08d7e/screen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3590,
4672,
365,
18,
10534,
273,
3590,
365,
18,
1467,
273,
3590,
18,
588,
1225,
1435,
365,
18,
1937,
273,
3590,
18,
14330,
18,
1937,
365,
18,
409,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3590,
4672,
365,
18,
10534,
273,
3590,
365,
18,
1467,
273,
3590,
18,
588,
1225,
1435,
365,
18,
1937,
273,
3590,
18,
14330,
18,
1937,
365,
18,
409,
273,
... |
if token is Token.String and value in ['"""', "'''", '"', "'"]: if not inside_string: inside_string = value elif value == inside_string: inside_string = False | if token is Token.String: value = value.lstrip('bBrRuU') if value in ['"""', "'''", '"', "'"]: if not inside_string: inside_string = value elif value == inside_string: inside_string = False | def next_token_inside_string(s, inside_string): """Given a code string s and an initial state inside_string, return whether the next token will be inside a string or not.""" for token, value in PythonLexer().get_tokens(s): if token is Token.String and value in ['"""', "'''", '"', "'"]: if not inside_string: inside_string = value elif value == inside_string: inside_string = False return inside_string | 00b0196745fe50b3744a12821b711a0613d4738e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6932/00b0196745fe50b3744a12821b711a0613d4738e/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
67,
2316,
67,
28091,
67,
1080,
12,
87,
16,
4832,
67,
1080,
4672,
3536,
6083,
279,
981,
533,
272,
471,
392,
2172,
919,
4832,
67,
1080,
16,
327,
2856,
326,
1024,
1147,
903,
506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
67,
2316,
67,
28091,
67,
1080,
12,
87,
16,
4832,
67,
1080,
4672,
3536,
6083,
279,
981,
533,
272,
471,
392,
2172,
919,
4832,
67,
1080,
16,
327,
2856,
326,
1024,
1147,
903,
506,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.