rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
self.attr_content.append(AttributeGroupDefinition(self)) | content.append(AttributeGroupReference(self)) | def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) | 5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
8832,
12,
2890,
16,
756,
4672,
365,
18,
542,
2498,
12,
2159,
13,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
628,
8832,
12,
2890,
16,
756,
4672,
365,
18,
542,
2498,
12,
2159,
13,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
cont = compute_paragraph(stream, _tag_name, attributes, None) content.extend(cont) content[-1] += (build_end_tag(_tag_name)) | def compute_link(stream, _tag_name, attributes): """ stream : parser stream """ content = [] has_content = False attrs = {} if exist_attribute(attributes, ['href']): attrs['href'] = attributes.get((URI, 'href')) # Reencode the entities because the a tags # are decoded again by the reportlab para parser. href = XMLContent.encode(attrs['href']) content.append('<a href="%s">' % href) if exist_attribute(attributes, ['id', 'name'], at_least=True): name = attributes.get((URI, 'id'), attributes.get((URI, 'name'))) if len(content): content[0] += '<a name="%s"/>' % name else: content.append('<a name="%s">' % name) cont = compute_paragraph(stream, _tag_name, attributes, None) content.extend(cont) content[-1] += (build_end_tag(_tag_name)) return ' '.join(content) | b6d57a7e1fa01810144e8abd9202e1ee1ca5fa8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/b6d57a7e1fa01810144e8abd9202e1ee1ca5fa8a/rml2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
67,
1232,
12,
3256,
16,
389,
2692,
67,
529,
16,
1677,
4672,
3536,
1407,
294,
2082,
1407,
3536,
225,
913,
273,
5378,
711,
67,
1745,
273,
1083,
3422,
273,
2618,
309,
1005,
67,
4589... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
67,
1232,
12,
3256,
16,
389,
2692,
67,
529,
16,
1677,
4672,
3536,
1407,
294,
2082,
1407,
3536,
225,
913,
273,
5378,
711,
67,
1745,
273,
1083,
3422,
273,
2618,
309,
1005,
67,
4589... | |
J = self.index_set() | J = range(len(self.index_set())) | def __rmul__(self,other): """ Implements scalar multiplication (on the right). | b5d444db2992a10837c0e2ccaebfd79325c6361e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/b5d444db2992a10837c0e2ccaebfd79325c6361e/dft.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8864,
332,
972,
12,
2890,
16,
3011,
4672,
3536,
29704,
4981,
23066,
261,
265,
326,
2145,
2934,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
8864,
332,
972,
12,
2890,
16,
3011,
4672,
3536,
29704,
4981,
23066,
261,
265,
326,
2145,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
""" mysql database connectivity """ try: db=MySQLdb.connect(host=DATABASE_HOST,user=DATABASE_USER,passwd=DATABASE_PASSWD, port=int(DATABASE_PORT), db=DATABASE_NAME) except MySQLdb.OperationalError: plog('error connecting to mysql database.\n - check config: bbs.cfg\n') exit(1) plog('database %s on %s connected.' % (DATABASE_NAME, DATABASE_HOST)) return db | """ mysql database connectivity """ try: db = MySQLdb.connect(host=DATABASE_HOST,user=DATABASE_USER,passwd=DATABASE_PASSWD, port=int(DATABASE_PORT), db=DATABASE_NAME) except MySQLdb.OperationalError: plog('error connecting to mysql database.\n - check config: bbs.cfg\n') exit(1) plog('database %s on %s connected.' % (DATABASE_NAME, DATABASE_HOST)) return db | def _db(DATABASE_HOST, DATABASE_PORT, DATABASE_USER, DATABASE_PASSWD, DATABASE_NAME): """ mysql database connectivity """ try: db=MySQLdb.connect(host=DATABASE_HOST,user=DATABASE_USER,passwd=DATABASE_PASSWD, port=int(DATABASE_PORT), db=DATABASE_NAME) except MySQLdb.OperationalError: plog('error connecting to mysql database.\n - check config: bbs.cfg\n') exit(1) plog('database %s on %s connected.' % (DATABASE_NAME, DATABASE_HOST)) return db | 9f0495ce7066cd2385a6fdae1f019f7da433c5a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6760/9f0495ce7066cd2385a6fdae1f019f7da433c5a4/chloe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1966,
12,
22366,
67,
8908,
16,
17998,
67,
6354,
16,
17998,
67,
4714,
16,
17998,
67,
10884,
16006,
16,
17998,
67,
1985,
4672,
3536,
7219,
2063,
20301,
3536,
775,
30,
1319,
273,
13485... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1966,
12,
22366,
67,
8908,
16,
17998,
67,
6354,
16,
17998,
67,
4714,
16,
17998,
67,
10884,
16006,
16,
17998,
67,
1985,
4672,
3536,
7219,
2063,
20301,
3536,
775,
30,
1319,
273,
13485... |
def BuildStructures(self, metadata): | def BuildStructures(self, _): | def BuildStructures(self, metadata): '''Build a set of structures tailored to the client metadata''' return [] | 1c445056e1b7868dffc6d566d14eaa806f11f926 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/1c445056e1b7868dffc6d566d14eaa806f11f926/Plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
3823,
1823,
12,
2890,
16,
389,
4672,
9163,
3116,
279,
444,
434,
12597,
5798,
7653,
358,
326,
1004,
1982,
26418,
327,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
3823,
1823,
12,
2890,
16,
389,
4672,
9163,
3116,
279,
444,
434,
12597,
5798,
7653,
358,
326,
1004,
1982,
26418,
327,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
blank = inputfile.next(); blank = inputfile.next(); blank = inputfile.next() | blank = inputfile.next() blank = inputfile.next() if len(blank) > 2: blank = inputfile.next() blank = inputfile.next() blank = inputfile.next() | def extract(self, inputfile, fupdate=0.05, cupdate=0.002): """Extract information from the file object inputfile.""" oldstep = 0 # Used to avoid extracting the final geometry twice in a GeoOpt NOTFOUND, GETLAST, NOMORE = range(3) finalgeometry = NOTFOUND # Used for calculating the scftarget (variables names taken from the ADF manual) accint = SCFconv = sconv2 = None # keep track of nosym and unrestricted case to parse Energies since it doens't have an all Irreps section nosymflag = False unrestrictedflag = False for line in inputfile: self.updateprogress(inputfile, "Unsupported Information", cupdate) if line.find("INPUT FILE") >= 0: | 749cb1d34dc3e574b4220456c6c97a7bb41fa2d6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8167/749cb1d34dc3e574b4220456c6c97a7bb41fa2d6/adfparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
12,
2890,
16,
810,
768,
16,
284,
2725,
33,
20,
18,
6260,
16,
276,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
585,
733,
810,
768,
12123,
225,
1592,
4119,
273,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
12,
2890,
16,
810,
768,
16,
284,
2725,
33,
20,
18,
6260,
16,
276,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
585,
733,
810,
768,
12123,
225,
1592,
4119,
273,
37... |
return ProcessorResult(False, _("Not Implemented")) | return ProcessorResult(self.key, False, _("Not Implemented")) | def capture_authorized_payment(self, authorization, testing=False, order=None, amount=NOTSET): """Capture a single payment, must be overridden to function""" self.log.warn('Module does not implement capture_payment: %s', self.key) return ProcessorResult(False, _("Not Implemented")) | 4ed616007e1d7993a74af691a9de6794aef4fe9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/171/4ed616007e1d7993a74af691a9de6794aef4fe9d/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7477,
67,
8434,
67,
9261,
12,
2890,
16,
6093,
16,
7769,
33,
8381,
16,
1353,
33,
7036,
16,
3844,
33,
4400,
4043,
4672,
3536,
12372,
279,
2202,
5184,
16,
1297,
506,
11000,
358,
445,
8395... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7477,
67,
8434,
67,
9261,
12,
2890,
16,
6093,
16,
7769,
33,
8381,
16,
1353,
33,
7036,
16,
3844,
33,
4400,
4043,
4672,
3536,
12372,
279,
2202,
5184,
16,
1297,
506,
11000,
358,
445,
8395... |
while x < w: | while x < x1: | def _clear_dc(self, dc, rect): N = 16 dc.Clear() dc.SetBrush(self._checkboard_brush) dc.SetPen(wx.TRANSPARENT_PEN) x0, y0, w, h = rect y1 = (y0 + w + N - 1) // N * N y1 = (y0 + h + N - 1) // N * N x0 = x0 // N * N y0 = y0 // N * N o = oo = (x0 ^ y0) & 1 y = y0 while y < h: o = not oo x = x0 while x < w: if o: dc.DrawRectangle(x, y, N, N) x += N o = not o y += N oo = not oo | 98bf4acecad0f391e6d8f2e29a67794212cc144e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3683/98bf4acecad0f391e6d8f2e29a67794212cc144e/page.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8507,
67,
7201,
12,
2890,
16,
6744,
16,
4917,
4672,
423,
273,
2872,
6744,
18,
9094,
1435,
6744,
18,
694,
19114,
1218,
12,
2890,
6315,
1893,
3752,
67,
2848,
1218,
13,
6744,
18,
694... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8507,
67,
7201,
12,
2890,
16,
6744,
16,
4917,
4672,
423,
273,
2872,
6744,
18,
9094,
1435,
6744,
18,
694,
19114,
1218,
12,
2890,
6315,
1893,
3752,
67,
2848,
1218,
13,
6744,
18,
694... |
return cmdutil.findcmd(self._getUI(), cmd, commands.table) | if cmdutil.findcmd.func_code.co_varnames[0] == "ui": return cmdutil.findcmd(self._getUI(), cmd, commands.table) else: return cmdutil.findcmd(cmd, commands.table) | def findcmd(cmd): return cmdutil.findcmd(self._getUI(), cmd, commands.table) | 58bb0d2746dffe665a361adc67bc15a0ca3728a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5981/58bb0d2746dffe665a361adc67bc15a0ca3728a3/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
4172,
12,
4172,
4672,
327,
24884,
18,
4720,
4172,
12,
2890,
6315,
588,
5370,
9334,
1797,
16,
4364,
18,
2121,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1104,
4172,
12,
4172,
4672,
327,
24884,
18,
4720,
4172,
12,
2890,
6315,
588,
5370,
9334,
1797,
16,
4364,
18,
2121,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self._indxr_mosaic = float(o.split('>')[1].split()[0]) | ms = float(o.split('>')[1].split()[0]) mosaic_spreads.append(ms) | def _index(self): '''Implement the indexer interface.''' | 18979c3273b7035ec88d3f13b963de27bad1113f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3290/18979c3273b7035ec88d3f13b963de27bad1113f/Mosflm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1615,
12,
2890,
4672,
9163,
5726,
326,
12635,
1560,
1093,
6309,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1615,
12,
2890,
4672,
9163,
5726,
326,
12635,
1560,
1093,
6309,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
engine.execute(DDL('REVOKE UPDATE ON log FROM pkgdbadmin;')) | engine.execute('BEGIN; REVOKE UPDATE ON log FROM pkgdbadmin; COMMIT;') | def transform(relation, table, attribute): ''' Transforms userids into usernames table - pkgdb.model attribute - string 'owner' or 'userid' ''' print 'transforming ' + relation.__name__ for id, owner in zip(select([relation.id]).execute(), select([getattr(relation, attribute)]).execute()): ownername = people[int(owner[0])]['username'] table.update('id=%s' % id[0], values={attribute:ownername}).execute() print 'flushing ' + relation.__name__ session.flush() | f8da11248bff1618d73709bab80ecff38b48dffa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9953/f8da11248bff1618d73709bab80ecff38b48dffa/pkgdb-0.3.10-0.3.11.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
12,
5488,
16,
1014,
16,
1566,
4672,
9163,
2604,
9741,
31892,
1368,
27675,
225,
1014,
300,
3475,
1966,
18,
2284,
1566,
300,
533,
296,
8443,
11,
578,
296,
8339,
11,
9163,
1172,
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,
2510,
12,
5488,
16,
1014,
16,
1566,
4672,
9163,
2604,
9741,
31892,
1368,
27675,
225,
1014,
300,
3475,
1966,
18,
2284,
1566,
300,
533,
296,
8443,
11,
578,
296,
8339,
11,
9163,
1172,
296,
... |
zip_cmd = "7za a \"%s\" nonlocalized" % self.build | zip_cmd = "%s a \"%s\" nonlocalized" % (SEVENZIP_BIN, self.build) | def repackBuild(self): zip_cmd = "7za a \"%s\" nonlocalized" % self.build shellCommand(zip_cmd) | 5cb6fbdd734ac0c785378340542d00fd69c55600 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10262/5cb6fbdd734ac0c785378340542d00fd69c55600/partner-repacks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2071,
484,
3116,
12,
2890,
4672,
3144,
67,
4172,
273,
2213,
87,
279,
22049,
87,
2412,
1661,
3729,
1235,
6,
738,
261,
1090,
58,
1157,
13951,
67,
12615,
16,
365,
18,
3510,
13,
5972,
2189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2071,
484,
3116,
12,
2890,
4672,
3144,
67,
4172,
273,
2213,
87,
279,
22049,
87,
2412,
1661,
3729,
1235,
6,
738,
261,
1090,
58,
1157,
13951,
67,
12615,
16,
365,
18,
3510,
13,
5972,
2189... |
getattr(self, '_write_%s' % self._writer, | getattr(self, '_write_%s' % self.writer, | def render(self, source, destination): parts = self.publish_parts(source) getattr(self, '_write_%s' % self._writer, self.default_writer)(self.template % parts, destination) destination.flush() | dbe6749e6aa8ae4ea90f39a35943664b181c539b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13745/dbe6749e6aa8ae4ea90f39a35943664b181c539b/rendering.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1084,
16,
2929,
4672,
2140,
273,
365,
18,
6543,
67,
6019,
12,
3168,
13,
3869,
12,
2890,
16,
2070,
2626,
10185,
87,
11,
738,
365,
18,
6299,
16,
365,
18,
1886,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1084,
16,
2929,
4672,
2140,
273,
365,
18,
6543,
67,
6019,
12,
3168,
13,
3869,
12,
2890,
16,
2070,
2626,
10185,
87,
11,
738,
365,
18,
6299,
16,
365,
18,
1886,
67,
... |
res = run_sql("SELECT b.id FROM bibrec_bibdoc bb JOIN bibdoc b on bb.id_bibdoc=b.id WHERE bb.id_bibrec=%s AND b.docname=%s", (self.recid, self.docname)) | res = run_sql("SELECT b.id FROM bibrec_bibdoc bb JOIN bibdoc b on bb.id_bibdoc=b.id WHERE bb.id_bibrec=%s AND b.docname=%s", (self.recid, newname)) | def changeName(self, newname): """Rename the bibdoc name. New name must not be already used by the linked bibrecs.""" res = run_sql("SELECT b.id FROM bibrec_bibdoc bb JOIN bibdoc b on bb.id_bibdoc=b.id WHERE bb.id_bibrec=%s AND b.docname=%s", (self.recid, self.docname)) if res: raise StandardError, "A bibdoc called %s already exists for recid %s" % (self.docname, self.recid) run_sql("update bibdoc set docname=%s where id=%s", (newname, self.id,)) for f in os.listdir(self.basedir): if f.startswith(self.docname): shutil.move('%s/%s' % (self.basedir, f), '%s/%s' % (self.basedir, f.replace(self.docname, newname, 1))) self.docname = newname Md5Folder(self.basedir).update() self.touch() self.BuildFileList() self.BuildRelatedFileList() | 0205aab376eaef7e17205944d62ef5d121c83eee /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/0205aab376eaef7e17205944d62ef5d121c83eee/file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
461,
12,
2890,
16,
26722,
4672,
3536,
16019,
326,
25581,
2434,
508,
18,
1166,
508,
1297,
486,
506,
1818,
1399,
635,
326,
8459,
25581,
266,
2143,
12123,
400,
273,
1086,
67,
4669,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
461,
12,
2890,
16,
26722,
4672,
3536,
16019,
326,
25581,
2434,
508,
18,
1166,
508,
1297,
486,
506,
1818,
1399,
635,
326,
8459,
25581,
266,
2143,
12123,
400,
273,
1086,
67,
4669,
29... |
return self._coerce_impl(x) except PropTypeError, msg: raise TypeError, msg | return self._coerce_from_special_method(x) except TypeError: raise except AttributeError, msg: pass try: return self._coerce_impl(x, use_special=False) | def __call__(self, x): r""" Create a new object in self from x. | 51db3b4ba3e1601df442dc6dc63910c90aac5b5a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/51db3b4ba3e1601df442dc6dc63910c90aac5b5a/expect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
4672,
436,
8395,
1788,
279,
394,
733,
316,
365,
628,
619,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
4672,
436,
8395,
1788,
279,
394,
733,
316,
365,
628,
619,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'UID', 'ACTION', 'REQUEST-STATUS', 'TZID', 'BUSYTYPE'] | 'UID', 'ACTION', 'REQUEST-STATUS', 'BUSYTYPE'] | def transformFromNative(cls, obj): """Convert the list of tuples in obj.value to strings.""" if obj.isNative: obj.isNative = False transformed = [] for tup in obj.value: transformed.append(periodToString(tup, cls.forceUTC)) if len(transformed) > 0: tzid = TimezoneComponent.registerTzinfo(tup[0].tzinfo) if not cls.forceUTC and tzid is not None: obj.tzid_param = tzid obj.value = ','.join(transformed) | 7ef3d8ea30baa05f1f06aef74068bc3e6c5c8c60 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9169/7ef3d8ea30baa05f1f06aef74068bc3e6c5c8c60/icalendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
1265,
9220,
12,
6429,
16,
1081,
4672,
3536,
2723,
326,
666,
434,
10384,
316,
1081,
18,
1132,
358,
2064,
12123,
309,
1081,
18,
291,
9220,
30,
1081,
18,
291,
9220,
273,
1083,
10220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
1265,
9220,
12,
6429,
16,
1081,
4672,
3536,
2723,
326,
666,
434,
10384,
316,
1081,
18,
1132,
358,
2064,
12123,
309,
1081,
18,
291,
9220,
30,
1081,
18,
291,
9220,
273,
1083,
10220,
... |
None, [cty.POINTER(FL_OBJECT), cty.c_double, cty.c_double], | None, [cty.POINTER(FL_OBJECT), cty.c_double, cty.c_double], | def fl_set_dial_return(ob, value): """ fl_set_dial_return(ob, value) """ _fl_set_dial_return(ob, value) | 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,
542,
67,
25909,
67,
2463,
12,
947,
16,
460,
4672,
3536,
1183,
67,
542,
67,
25909,
67,
2463,
12,
947,
16,
460,
13,
3536,
225,
389,
2242,
67,
542,
67,
25909,
67,
2463,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
25909,
67,
2463,
12,
947,
16,
460,
4672,
3536,
1183,
67,
542,
67,
25909,
67,
2463,
12,
947,
16,
460,
13,
3536,
225,
389,
2242,
67,
542,
67,
25909,
67,
2463,
12,
... |
@param id: structure type ID | @param sid: structure type ID | def SetStrucName(id, name): """ Change structure name @param id: structure type ID @param name: new name of the structure @return: != 0 - ok """ return idaapi.set_struc_name(id, name) | 244a3cd02a580c0095170004ec30e922f0d1a8a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6984/244a3cd02a580c0095170004ec30e922f0d1a8a6/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
1585,
5286,
461,
12,
350,
16,
508,
4672,
3536,
7576,
3695,
508,
225,
632,
891,
7348,
30,
3695,
618,
1599,
632,
891,
508,
30,
394,
508,
434,
326,
3695,
225,
632,
2463,
30,
480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1585,
5286,
461,
12,
350,
16,
508,
4672,
3536,
7576,
3695,
508,
225,
632,
891,
7348,
30,
3695,
618,
1599,
632,
891,
508,
30,
394,
508,
434,
326,
3695,
225,
632,
2463,
30,
480,
... |
andi t3, t3, 32 or reg, reg, t3 | andi t4, t3, 32, flags=(EZF,) or reg, reg, t4 mov t1, t1, t3, flags=(nCEZF,) | def macroop BSF_R_P { rdip t7 mov t1, t1, t0, dataSize=8 ld t1, seg, riprel, disp # Determine if the input was zero, and also move it to a temp reg. and t1, t1, t1, flags=(ZF,) bri t0, label("end"), flags=(CZF,) # Zero out the result register mov reg, reg, t0 subi t2, t1, 1 xor t1, t2, t1 # Bit 6 srli t3, t1, 32, dataSize=8 andi t3, t3, 32 or reg, reg, t3 # Bit 5 srli t3, t1, 16, dataSize=8 andi t3, t3, 16 or reg, reg, t3 # Bit 4 srli t3, t1, 8, dataSize=8 andi t3, t3, 8 or reg, reg, t3 # Bit 3 srli t3, t1, 4, dataSize=8 andi t3, t3, 4 or reg, reg, t3 # Bit 2 srli t3, t1, 2, dataSize=8 andi t3, t3, 2 or reg, reg, t3 # Bit 1 srli t3, t1, 1, dataSize=8 andi t3, t3, 1 or reg, reg, t3 | 8e2991b529fd63f4d7c56518ebfbd2424f964172 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6787/8e2991b529fd63f4d7c56518ebfbd2424f964172/bit_scan.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
605,
22395,
67,
54,
67,
52,
288,
225,
9437,
625,
268,
27,
5730,
268,
21,
16,
268,
21,
16,
268,
20,
16,
30216,
33,
28,
16916,
268,
21,
16,
2291,
16,
436,
625,
2878,
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,
11522,
556,
605,
22395,
67,
54,
67,
52,
288,
225,
9437,
625,
268,
27,
5730,
268,
21,
16,
268,
21,
16,
268,
20,
16,
30216,
33,
28,
16916,
268,
21,
16,
2291,
16,
436,
625,
2878,
16,
... |
for dir in __tmp_dirs: shutil.rmtree(dir) __tmp_dirs= [] | pid = os.getpid() if pid not in __tmp_dirs: return for dir in __tmp_dirs[pid]: try: shutil.rmtree(dir) except OSError, e: if e.errno == 2: pass __tmp_dirs[pid] = [] | def __clean_tmp_dirs(): """Erase temporary directories that were created by the get_tmp_dir() function and that are still present. """ global __tmp_dirs for dir in __tmp_dirs: shutil.rmtree(dir) __tmp_dirs= [] | 53d9f3f8f8cfc853e95f6b0e2aab394f81cb83b9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12268/53d9f3f8f8cfc853e95f6b0e2aab394f81cb83b9/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
6200,
67,
5645,
67,
8291,
13332,
3536,
41,
5648,
6269,
6402,
716,
4591,
2522,
635,
326,
336,
67,
5645,
67,
1214,
1435,
445,
471,
716,
854,
4859,
3430,
18,
3536,
2552,
1001,
5645,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6200,
67,
5645,
67,
8291,
13332,
3536,
41,
5648,
6269,
6402,
716,
4591,
2522,
635,
326,
336,
67,
5645,
67,
1214,
1435,
445,
471,
716,
854,
4859,
3430,
18,
3536,
2552,
1001,
5645,
... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 841) else quickfix.IntField.__init__(self, 841, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
1725,
9803,
13,
469,
9549,
904,
18,
1702,
974,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
1725,
9803,
13,
469,
9549,
904,
18,
1702,
974,
16186,
2738,
... |
return X509.X509(c) | return X509.X509(c, 1) | def get_peer_cert(self): c=m2.ssl_get_peer_cert(self.ssl) if c is None: return None return X509.X509(c) | 00b626b1ae2f8b02ab6849a0340d53a65bd27866 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/00b626b1ae2f8b02ab6849a0340d53a65bd27866/Connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12210,
67,
7593,
12,
2890,
4672,
276,
33,
81,
22,
18,
8157,
67,
588,
67,
12210,
67,
7593,
12,
2890,
18,
8157,
13,
309,
276,
353,
599,
30,
327,
599,
225,
327,
1139,
5995,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
67,
12210,
67,
7593,
12,
2890,
4672,
276,
33,
81,
22,
18,
8157,
67,
588,
67,
12210,
67,
7593,
12,
2890,
18,
8157,
13,
309,
276,
353,
599,
30,
327,
599,
225,
327,
1139,
5995,
1... |
s += "%s\n" % ip | s += "%s netmask %s\n" % (ip, netmask) | def write_host_file_sunos(self, ip, device): s = '<file name="/etc/hostname.%s">\n' % device s += "%s\n" % ip s += '</file>\n' self.addText(s) | c648f91283e4672a6d000eda65c577697a536cb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7066/c648f91283e4672a6d000eda65c577697a536cb1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2564,
67,
768,
67,
16924,
538,
12,
2890,
16,
2359,
16,
2346,
4672,
272,
273,
2368,
768,
508,
1546,
19,
14175,
19,
10358,
7866,
87,
6,
5333,
82,
11,
738,
2346,
272,
1011,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2564,
67,
768,
67,
16924,
538,
12,
2890,
16,
2359,
16,
2346,
4672,
272,
273,
2368,
768,
508,
1546,
19,
14175,
19,
10358,
7866,
87,
6,
5333,
82,
11,
738,
2346,
272,
1011,
22... |
session.modified): | session.should_save): | def finalize(self, request, session): if request.user.auth_method == 'setuid': userobj = request._setuid_real_user setuid = request.user.id else: userobj = request.user setuid = None logging.debug("finalize userobj = %r, setuid = %r" % (userobj, setuid)) cfg = request.cfg # we use different cookie names for different wikis: cookie_name = get_cookie_name(request, name=request.cfg.cookie_name, usage=self.cookie_usage) # we always use path='/' except if explicitly overridden by configuration, # which is usually not needed and not recommended: cookie_path = cfg.cookie_path or '/' if userobj and userobj.valid: session['user.id'] = userobj.id session['user.auth_method'] = userobj.auth_method session['user.auth_attribs'] = userobj.auth_attribs if setuid: session['setuid'] = setuid elif 'setuid' in session: del session['setuid'] logging.debug("after auth: storing valid user into session: %r" % userobj.name) else: logging.debug("after auth: user is invalid") if 'user.id' in session: logging.debug("after auth: destroying session: %r" % session) self.destroy_session(request, session) logging.debug("after auth: deleting session cookie!") request.delete_cookie(cookie_name, path=cookie_path, domain=cfg.cookie_domain) | e42433dfef2f71b42210790866823ee481f53888 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/888/e42433dfef2f71b42210790866823ee481f53888/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
12,
2890,
16,
590,
16,
1339,
4672,
309,
590,
18,
1355,
18,
1944,
67,
2039,
422,
296,
542,
1911,
4278,
729,
2603,
273,
590,
6315,
542,
1911,
67,
7688,
67,
1355,
444,
1911,
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,
12409,
12,
2890,
16,
590,
16,
1339,
4672,
309,
590,
18,
1355,
18,
1944,
67,
2039,
422,
296,
542,
1911,
4278,
729,
2603,
273,
590,
6315,
542,
1911,
67,
7688,
67,
1355,
444,
1911,
273,
... |
initial bound 2.62270974833657e117 | initial bound 2.6227097483365...e117 | def S_integral_points(self, S, mw_base='auto', both_signs=False, verbose=False, proof=None): """ Computes all S-integral points (up to sign) on this elliptic curve. INPUT: S -- list of primes mw_base -- list of EllipticCurvePoint generating the Mordell-Weil group of E (default: 'auto' - calls self.gens()) both_signs -- True/False (default False): if True the output contains both P and -P, otherwise only one of each pair. verbose -- True/False (default False): if True, some details of the computation are output. proof -- True/False (default True): if True ALL S-integral points will be returned. If False, the MW basis will be computed with the proof=False flag, and also the time-consuming final call to S_integral_x_coords_with_abs_bounded_by(abs_bound) is omitted. Use this only if the computation takes too long, but be warned that then it cannot be guaranteed that all S-integral points will be found. OUTPUT: A sorted list of all the S-integral points on E (up to sign unless both_signs is True) NOTES: The complexity increases exponentially in the rank of curve E and in the length of S. The computation time (but not the output!) depends on the Mordell-Weil basis. If mw_base is given but is not a basis for the Mordell-Weil group (modulo torsion), S-integral points which are not in the subgroup generated by the given points will almost certainly not be listed. NOTE: Testing of this function has revealed some inputs where it fails due to p-adic precision issues. For example, EllipticCurve("7690e1").S_integral_points([13,2]) fails as of version 3.2.2. This is being tracked at \#4805. Please report any other observed failures to sage-support. EXAMPLES: A curve of rank 3 with no torsion points sage: E=EllipticCurve([0,0,1,-7,6]) sage: P1=E.point((2,0)); P2=E.point((-1,3)); P3=E.point((4,6)) sage: a=E.S_integral_points(S=[2,3], mw_base=[P1,P2,P3], verbose=True);a max_S: 3 len_S: 3 len_tors: 1 lambda 0.485997517468... k1,k2,k3,k4 6.68597129142710e234 1.31952866480763 3.31908110593519e9 2.42767548272846e17 mw_base [(1 : -1 : 1), (2 : 0 : 1), (0 : -3 : 1)] mw_base_log [0.667789378224099, 0.552642660712417, 0.818477222895703] mp [5, 7] mw_base_p_log [[2^2 + 2^3 + 2^6 + 2^7 + 2^8 + 2^9 + 2^14 + 2^15 + 2^18 + 2^19 + O(2^20), 2^2 + 2^3 + 2^5 + 2^6 + 2^9 + 2^11 + 2^12 + 2^14 + 2^15 + 2^16 + 2^18 + O(2^20), 2 + 2^3 + 2^6 + 2^7 + 2^8 + 2^9 + 2^11 + 2^12 + 2^13 + 2^16 + 2^17 + 2^19 + O(2^20)], [2*3^2 + 2*3^5 + 2*3^6 + 2*3^7 + 3^8 + 3^9 + 2*3^10 + 3^12 + 2*3^14 + 3^15 + 3^17 + 2*3^19 + O(3^20), 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^6 + 2*3^7 + 2*3^8 + 3^10 + 2*3^12 + 3^13 + 2*3^14 + 3^15 + 3^18 + O(3^20), 3 + 3^2 + 2*3^3 + 3^6 + 2*3^7 + 2*3^8 + 3^9 + 2*3^11 + 2*3^12 + 2*3^13 + 3^15 + 2*3^16 + 3^18 + 2*3^19 + O(3^20)]] k5,k6,k7 0.321154513240... 1.55246328915... 0.161999172489... initial bound 2.62270974833657e117 bound_list [58, 58, 58] bound_list [8, 9, 9] bound_list [8, 7, 7] bound_list [8, 7, 7] starting search of points using coefficient bound 8 x-coords of S-integral points via linear combination of mw_base and torsion: [-3, -26/9, -8159/2916, -2759/1024, -151/64, -1343/576, -2, -7/4, -1, -47/256, 0, 1/4, 4/9, 9/16, 58/81, 7/9, 6169/6561, 1, 17/16, 2, 33/16, 172/81, 9/4, 25/9, 3, 31/9, 4, 25/4, 1793/256, 8, 625/64, 11, 14, 21, 37, 52, 6142/81, 93, 4537/36, 342, 406, 816, 207331217/4096] starting search of extra S-integer points with absolute value bounded by 3.89321964979420 x-coords of points with bounded absolute value [-3, -2, -1, 0, 1, 2] Total number of S-integral points: 43 [(-3 : 0 : 1), (-26/9 : 28/27 : 1), (-8159/2916 : 233461/157464 : 1), (-2759/1024 : 60819/32768 : 1), (-151/64 : 1333/512 : 1), (-1343/576 : 36575/13824 : 1), (-2 : 3 : 1), (-7/4 : 25/8 : 1), (-1 : 3 : 1), (-47/256 : 9191/4096 : 1), (0 : 2 : 1), (1/4 : 13/8 : 1), (4/9 : 35/27 : 1), (9/16 : 69/64 : 1), (58/81 : 559/729 : 1), (7/9 : 17/27 : 1), (6169/6561 : 109871/531441 : 1), (1 : 0 : 1), (17/16 : -25/64 : 1), (2 : 0 : 1), (33/16 : 17/64 : 1), (172/81 : 350/729 : 1), (9/4 : 7/8 : 1), (25/9 : 64/27 : 1), (3 : 3 : 1), (31/9 : 116/27 : 1), (4 : 6 : 1), (25/4 : 111/8 : 1), (1793/256 : 68991/4096 : 1), (8 : 21 : 1), (625/64 : 14839/512 : 1), (11 : 35 : 1), (14 : 51 : 1), (21 : 95 : 1), (37 : 224 : 1), (52 : 374 : 1), (6142/81 : 480700/729 : 1), (93 : 896 : 1), (4537/36 : 305425/216 : 1), (342 : 6324 : 1), (406 : 8180 : 1), (816 : 23309 : 1), (207331217/4096 : 2985362173625/262144 : 1)] | 37d28b071d0d8d35874225db8855ec5bb17975fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/37d28b071d0d8d35874225db8855ec5bb17975fc/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
348,
67,
14970,
23811,
67,
4139,
12,
2890,
16,
348,
16,
14721,
67,
1969,
2218,
6079,
2187,
3937,
67,
2977,
87,
33,
8381,
16,
3988,
33,
8381,
16,
14601,
33,
7036,
4672,
3536,
14169,
281... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
348,
67,
14970,
23811,
67,
4139,
12,
2890,
16,
348,
16,
14721,
67,
1969,
2218,
6079,
2187,
3937,
67,
2977,
87,
33,
8381,
16,
3988,
33,
8381,
16,
14601,
33,
7036,
4672,
3536,
14169,
281... |
diffs = [value for value in L2 if not L1.count(value) > 0 ] default = 'Following values were not found from first list: ' default += ', '.join(diffs) _verify_condition(len(diffs) == 0, default, msg, values) | diffs = ', '.join([ str(item) for item in L2 if item not in L1 ]) default = 'Following values were not found from first list: ' + diffs _verify_condition(diffs == '', default, msg, values) | def list_should_contain_sub_list(self, L1, L2, msg=None, values=True): """Fails if not all of the elements in L2 are found in L1. The order of values and the number of values are not taken into acount. See the use of 'msg' and 'values' from the 'List Should Be Equal' keyword. """ diffs = [value for value in L2 if not L1.count(value) > 0 ] default = 'Following values were not found from first list: ' default += ', '.join(diffs) _verify_condition(len(diffs) == 0, default, msg, values) | 9e3b0b6f2f5e1229f613f2fc11d15a4072f9d6db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/9e3b0b6f2f5e1229f613f2fc11d15a4072f9d6db/Collections.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
13139,
67,
28744,
67,
1717,
67,
1098,
12,
2890,
16,
511,
21,
16,
511,
22,
16,
1234,
33,
7036,
16,
924,
33,
5510,
4672,
3536,
30800,
309,
486,
777,
434,
326,
2186,
316,
511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
13139,
67,
28744,
67,
1717,
67,
1098,
12,
2890,
16,
511,
21,
16,
511,
22,
16,
1234,
33,
7036,
16,
924,
33,
5510,
4672,
3536,
30800,
309,
486,
777,
434,
326,
2186,
316,
511,
... |
reads in a FASTQ (PHRED) file and re-saves it as another FASTQ (PHRED) file: | reads in a standard Sanger style FASTQ file (using PHRED scores) and re-saves it as another FASTQ (PHRED) file: | def QualPhredIterator(handle, alphabet = single_letter_alphabet, title2ids = None) : """For QUAL files which include PHRED quality scores, but no sequence. For example, consider this short QUAL file:: >EAS54_6_R1_2_1_413_324 26 26 18 26 26 26 26 26 26 26 26 26 26 26 26 22 26 26 26 26 26 26 26 23 23 >EAS54_6_R1_2_1_540_792 26 26 26 26 26 26 26 26 26 26 26 22 26 26 26 26 26 12 26 26 26 18 26 23 18 >EAS54_6_R1_2_1_443_348 26 26 26 26 26 26 26 26 26 26 26 24 26 22 26 26 13 22 26 18 24 18 18 18 18 Using this module directly you might run: >>> handle = open("Quality/example.qual", "rU") >>> for record in QualPhredIterator(handle) : ... print record.id, record.seq EAS54_6_R1_2_1_413_324 ????????????????????????? EAS54_6_R1_2_1_540_792 ????????????????????????? EAS54_6_R1_2_1_443_348 ????????????????????????? >>> handle.close() Typically however, you would call this via Bio.SeqIO instead with "qual" as the format: >>> from Bio import SeqIO >>> handle = open("Quality/example.qual", "rU") >>> for record in SeqIO.parse(handle, "qual") : ... print record.id, record.seq EAS54_6_R1_2_1_413_324 ????????????????????????? EAS54_6_R1_2_1_540_792 ????????????????????????? EAS54_6_R1_2_1_443_348 ????????????????????????? >>> handle.close() Becase QUAL files don't contain the sequence string itself, the seq property is set to an UnknownSeq object. As no alphabet was given, this has defaulted to a generic single letter alphabet and the character "?" used. By specifying a nucleotide alphabet, "N" is used instead: >>> from Bio import SeqIO >>> from Bio.Alphabet import generic_dna >>> handle = open("Quality/example.qual", "rU") >>> for record in SeqIO.parse(handle, "qual", alphabet=generic_dna) : ... print record.id, record.seq EAS54_6_R1_2_1_413_324 NNNNNNNNNNNNNNNNNNNNNNNNN EAS54_6_R1_2_1_540_792 NNNNNNNNNNNNNNNNNNNNNNNNN EAS54_6_R1_2_1_443_348 NNNNNNNNNNNNNNNNNNNNNNNNN >>> handle.close() However, the quality scores themselves are available as a list of integers in each record's per-letter-annotation: >>> print record.letter_annotations["phred_quality"] [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 24, 26, 22, 26, 26, 13, 22, 26, 18, 24, 18, 18, 18, 18] You can still slice one of these SeqRecord objects with an UnknownSeq: >>> sub_record = record[5:10] >>> print sub_record.id, sub_record.letter_annotations["phred_quality"] EAS54_6_R1_2_1_443_348 [26, 26, 26, 26, 26] """ #Skip any text before the first record (e.g. blank lines, comments) while True : line = handle.readline() if line == "" : return #Premature end of file, or just empty? if line[0] == ">" : break while True : if line[0]!=">" : raise ValueError("Records in Fasta files should start with '>' character") if title2ids : id, name, descr = title2ids(line[1:].rstrip()) else : descr = line[1:].rstrip() id = descr.split()[0] name = id qualities = [] line = handle.readline() while True: if not line : break if line[0] == ">": break qualities.extend([int(word) for word in line.split()]) line = handle.readline() if qualities : if min(qualities) < 0 or max(qualities) > 90 : raise ValueError(("Quality score range for %s is %i to %i, outside the " \ +"expected 0 to 90. Perhaps these are Solexa/Illumina " \ +"scores, and not PHRED scores?") \ % (id, min(qualities), max(qualities))) #Return the record and then continue... record = SeqRecord(UnknownSeq(len(qualities), alphabet), id = id, name = name, description = descr) record.letter_annotations["phred_quality"] = qualities yield record if not line : return #StopIteration assert False, "Should not reach this line" | ca957491dd42f6d15dc267230d1a6ebbd10491c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/ca957491dd42f6d15dc267230d1a6ebbd10491c1/QualityIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15029,
3731,
1118,
3198,
12,
4110,
16,
10877,
273,
2202,
67,
13449,
67,
287,
8907,
16,
2077,
22,
2232,
273,
599,
13,
294,
3536,
1290,
10110,
1013,
1390,
1492,
2341,
15490,
5879,
9312,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15029,
3731,
1118,
3198,
12,
4110,
16,
10877,
273,
2202,
67,
13449,
67,
287,
8907,
16,
2077,
22,
2232,
273,
599,
13,
294,
3536,
1290,
10110,
1013,
1390,
1492,
2341,
15490,
5879,
9312,
84... |
print q | def vfolder_set(id, name, query, parent): cursor = sqmail.db.cursor() q = "UPDATE vfolders SET name='%s', query='%s', parent=%d WHERE id=%d"\ % (sqmail.db.escape(name), sqmail.db.escape(query), parent, id) print q cursor.execute(q) | fde2418a5ead2e41f7b3698418f1637d21d6229c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3083/fde2418a5ead2e41f7b3698418f1637d21d6229c/vfolder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
331,
5609,
67,
542,
12,
350,
16,
508,
16,
843,
16,
982,
4672,
3347,
273,
4744,
4408,
18,
1966,
18,
9216,
1435,
1043,
273,
315,
8217,
331,
16064,
7855,
508,
28713,
87,
2187,
843,
28713,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
331,
5609,
67,
542,
12,
350,
16,
508,
16,
843,
16,
982,
4672,
3347,
273,
4744,
4408,
18,
1966,
18,
9216,
1435,
1043,
273,
315,
8217,
331,
16064,
7855,
508,
28713,
87,
2187,
843,
28713,... | |
raise IOError(popen.stderr.read()) for line in popen.stdout: | raise IOError(stderr.decode("mbcs")) stdout = stdout.decode("mbcs") for line in stdout.split("\n"): | def query_vcvarsall(version, arch="x86"): """Launch vcvarsall.bat and read the settings from its environment """ vcvarsall = find_vcvarsall(version) interesting = set(("include", "lib", "libpath", "path")) result = {} if vcvarsall is None: raise IOError("Unable to find vcvarsall.bat") popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, stderr=subprocess.PIPE) if popen.wait() != 0: raise IOError(popen.stderr.read()) for line in popen.stdout: line = Reg.convert_mbcs(line) if '=' not in line: continue line = line.strip() key, value = line.split('=') key = key.lower() if key in interesting: if value.endswith(os.pathsep): value = value[:-1] result[key] = value if len(result) != len(interesting): raise ValueError(str(list(result.keys()))) return result | cbdb705c887fb9c7feaa83ad93c365448926b110 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/cbdb705c887fb9c7feaa83ad93c365448926b110/msvc9compiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
67,
4227,
4699,
454,
12,
1589,
16,
6637,
1546,
92,
5292,
6,
4672,
3536,
9569,
12802,
4699,
454,
18,
28260,
471,
855,
326,
1947,
628,
2097,
3330,
3536,
12802,
4699,
454,
273,
1104,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
67,
4227,
4699,
454,
12,
1589,
16,
6637,
1546,
92,
5292,
6,
4672,
3536,
9569,
12802,
4699,
454,
18,
28260,
471,
855,
326,
1947,
628,
2097,
3330,
3536,
12802,
4699,
454,
273,
1104,
... |
assert_equal(str(tp(1.2)), str(float(1.2)), | assert_equal(locale.format("%f",tp(1.2)), locale.format("%f",float(1.2)), | def _test_locale_independance(tp): # XXX: How to query locale on a given system ? # French is one language where the decimal is ',' not '.', and should be # relatively common on many systems curloc = locale.getlocale(locale.LC_NUMERIC) try: if not sys.platform == 'win32': locale.setlocale(locale.LC_NUMERIC, 'fr_FR') else: locale.setlocale(locale.LC_NUMERIC, 'FRENCH') assert_equal(str(tp(1.2)), str(float(1.2)), err_msg='Failed locale test for type %s' % tp) finally: locale.setlocale(locale.LC_NUMERIC, locale=curloc) | a5ca79d91f5ded5bee86407605e3f2004af3e6a6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/a5ca79d91f5ded5bee86407605e3f2004af3e6a6/test_print.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
67,
6339,
67,
267,
5817,
1359,
12,
6834,
4672,
468,
11329,
30,
9017,
358,
843,
2573,
603,
279,
864,
2619,
692,
225,
468,
478,
26728,
353,
1245,
2653,
1625,
326,
6970,
353,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
67,
6339,
67,
267,
5817,
1359,
12,
6834,
4672,
468,
11329,
30,
9017,
358,
843,
2573,
603,
279,
864,
2619,
692,
225,
468,
478,
26728,
353,
1245,
2653,
1625,
326,
6970,
353,
3... |
if p.__baseClassName__ == 'NonLin': p.nNaNs = len(isnan(p.c(p.xk))) + len(isnan(p.h(p.xk))) | if p.__baseClassName__ == 'NonLin': p.nNaNs = len(where(isnan(p.c(p.xk)))[0]) + len(where(isnan(p.h(p.xk)))[0]) | def __decodeIterFcnArgs__(self, p, *args, **kwargs): """ decode and assign x, f, maxConstr (and/or other fields) to p.iterValues """ fArg = True | b47e58e6d7e8169a2938a760957e4f83958301cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6196/b47e58e6d7e8169a2938a760957e4f83958301cf/baseSolver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3922,
2360,
42,
10305,
2615,
972,
12,
2890,
16,
225,
293,
16,
225,
380,
1968,
16,
225,
2826,
4333,
4672,
3536,
2495,
471,
2683,
619,
16,
284,
16,
943,
442,
701,
261,
464,
19,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3922,
2360,
42,
10305,
2615,
972,
12,
2890,
16,
225,
293,
16,
225,
380,
1968,
16,
225,
2826,
4333,
4672,
3536,
2495,
471,
2683,
619,
16,
284,
16,
943,
442,
701,
261,
464,
19,
2... |
id='c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com'): | id='python.gcal.test%40gmail.com'): | def _DeleteCalendarSubscription(self, id='c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com'): """Deletes the subscription to the calendar with the specified ID.""" print 'Deleting the calendar subscription with ID: %s' % id calendar_url = ( 'http://www.google.com/calendar/feeds/default/allcalendars/full/%s' % id) calendar_entry = self.cal_client.GetCalendarListEntry(calendar_url) self.cal_client.DeleteCalendarEntry(calendar_entry.GetEditLink().href) | 0fd73016e9ed2e0b1a268ba70f42439a3feaa2eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10620/0fd73016e9ed2e0b1a268ba70f42439a3feaa2eb/calendarExample.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2613,
7335,
6663,
12,
2890,
16,
612,
2218,
8103,
18,
75,
771,
18,
3813,
9,
7132,
75,
4408,
18,
832,
11,
4672,
3536,
7551,
326,
4915,
358,
326,
5686,
598,
326,
1269,
1599,
12123,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2613,
7335,
6663,
12,
2890,
16,
612,
2218,
8103,
18,
75,
771,
18,
3813,
9,
7132,
75,
4408,
18,
832,
11,
4672,
3536,
7551,
326,
4915,
358,
326,
5686,
598,
326,
1269,
1599,
12123,
... |
assert(c.readlines(), | assert(c.readlines() == | def test_array(self): a =np.array( [[1,2],[3,4]], float) c = StringIO.StringIO() np.savetxt(c, a) c.seek(0) assert(c.readlines(), ['1.000000000000000000e+00 2.000000000000000000e+00\n', '3.000000000000000000e+00 4.000000000000000000e+00\n']) | e39cb02e227e168f8b3b55c455820c47e2d6c4c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/e39cb02e227e168f8b3b55c455820c47e2d6c4c1/test_io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1126,
12,
2890,
4672,
279,
273,
6782,
18,
1126,
12,
12167,
21,
16,
22,
6487,
63,
23,
16,
24,
65,
6487,
1431,
13,
276,
273,
15777,
18,
780,
4294,
1435,
1130,
18,
87,
842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1126,
12,
2890,
4672,
279,
273,
6782,
18,
1126,
12,
12167,
21,
16,
22,
6487,
63,
23,
16,
24,
65,
6487,
1431,
13,
276,
273,
15777,
18,
780,
4294,
1435,
1130,
18,
87,
842,
... |
x, y = fox.pos | x, y = map(int, fox.pos) | def _paint_gamefield(self): """ Draw the board. """ # Fill self.arena of black self.arena.fill((0, 0, 0)) | 268ecf8b3d592ec2a5dd56bcb180cf4c21706bde /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4543/268ecf8b3d592ec2a5dd56bcb180cf4c21706bde/bubbles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
84,
1598,
67,
13957,
1518,
12,
2890,
4672,
3536,
10184,
326,
11094,
18,
3536,
468,
14192,
365,
18,
834,
6582,
434,
7721,
365,
18,
834,
6582,
18,
5935,
12443,
20,
16,
374,
16,
374,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
84,
1598,
67,
13957,
1518,
12,
2890,
4672,
3536,
10184,
326,
11094,
18,
3536,
468,
14192,
365,
18,
834,
6582,
434,
7721,
365,
18,
834,
6582,
18,
5935,
12443,
20,
16,
374,
16,
374,... |
site.manage_permission(PERMISSION_ADD_ANSWER, ('Anonymous', 'Authenticated'), acquire=0) site.manage_permission(PERMISSION_VIEW_REPORTS, ('Anonymous', 'Authenticated'), acquire=0) | site.manage_permission(PERMISSION_ADD_ANSWER, ('Anonymous', ), acquire=0) site.manage_permission(PERMISSION_VIEW_REPORTS, ('Anonymous', ), acquire=0) | def manage_configureSecurity(self): """Configure security for surveys: - Manager + Administrator: add/manage survey templates - Contributor: add/manage questionnaires (surveys) - Anonymous + Authenticated: add answer (take survey) & view reports """ site = self.getSite() zLOG.LOG('NaayaSurvey', zLOG.INFO, 'Configuring security for surveys on site %s' % (site.absolute_url(1))) site.manage_permission(PERMISSION_MANAGE_SURVEYTEMPLATE, ('Manager', 'Administrator'), acquire=0) site.manage_permission(PERMISSION_ADD_SURVEYTEMPLATE, ('Manager', 'Administrator'), acquire=0) site.manage_permission(PERMISSION_ADD_ATTACHMENT, ('Manager', 'Administrator'), acquire=0) site.manage_permission(PERMISSION_ADD_WIDGETS, ('Manager', 'Administrator'), acquire=0) site.manage_permission(PERMISSION_ADD_REPORT, ('Manager', 'Administrator'), acquire=0) site.manage_permission(PERMISSION_ADD_STATISTICS, ('Manager', 'Administrator'), acquire=0) | 9e247f38ce4d7c42e35db84ceb62d1addbc8ab5f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/9e247f38ce4d7c42e35db84ceb62d1addbc8ab5f/SurveyTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
14895,
4368,
12,
2890,
4672,
3536,
11207,
4373,
364,
14902,
87,
30,
300,
8558,
397,
7807,
14207,
30,
527,
19,
12633,
14902,
5539,
300,
735,
19293,
30,
527,
19,
12633,
5073,
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,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
14895,
4368,
12,
2890,
4672,
3536,
11207,
4373,
364,
14902,
87,
30,
300,
8558,
397,
7807,
14207,
30,
527,
19,
12633,
14902,
5539,
300,
735,
19293,
30,
527,
19,
12633,
5073,
65... |
opts = Variables(ARGUMENTS) | opts = Variables(args=ARGUMENTS) | def SetupForSENF(env, senf_paths = []): senf_paths.extend(('senf', '../senf', os.path.dirname(os.path.dirname(__file__)), '/usr/local', '/usr')) env.Append( LIBS = [ 'senf', 'rt', '$BOOSTREGEXLIB', '$BOOSTIOSTREAMSLIB', '$BOOSTSIGNALSLIB', '$BOOSTFSLIB' ], BOOSTREGEXLIB = 'boost_regex', BOOSTIOSTREAMSLIB = 'boost_iostreams', BOOSTSIGNALSLIB = 'boost_signals', BOOSTFSLIB = 'boost_filesystem', CXXFLAGS = [ '-Wno-long-long', '$CXXFLAGS_' ], CXXFLAGS_ = BuildTypeOptions('CXXFLAGS'), CPPDEFINES = [ '$expandLogOption', '$CPPDEFINES_' ], expandLogOption = expandLogOption, CPPDEFINES_ = BuildTypeOptions('CPPDEFINES'), LINKFLAGS = [ '-rdynamic', '$LINKFLAGS_' ], LINKFLAGS_ = BuildTypeOptions('LINKFLAGS'), LOGLEVELS = [ '$LOGLEVELS_' ], LOGLEVELS_ = BuildTypeOptions('LOGLEVELS'), ) env.SetDefault( CXXFLAGS_final = [], CXXFLAGS_normal = [], CXXFLAGS_debug = [], CPPDEFINES_final = [], CPPDEFINES_normal = [], CPPDEFINES_debug = [], LINKFLAGS_final = [], LINKFLAGS_normal = [], LINKFLAGS_debug = [], LOGLEVELS_final = [], LOGLEVELS_normal = [], LOGLEVELS_debug = [], ) # Interpret command line options opts = Variables(ARGUMENTS) opts.Add( 'LOGLEVELS', 'Special log levels. Syntax: <stream>|[<area>]|<level> ...', '${"$LOGLEVELS_"+(final and "final" or "debug")}' ) opts.Add( BoolOption('final', 'Build final (optimized) build', False) ) opts.Add( BoolOption('debug', 'Link in debug symbols', False) ) opts.Update(env) env.Replace(**dict(opts.UnknownVariables())) env.Help(opts.GenerateHelpText(env)) # If we have a symbolic link (or directory) 'senf', we use it as our # senf repository for path in senf_paths: if not path.startswith('/') : sconspath = '#/%s' % path else : sconspath = path if os.path.exists(os.path.join(path,"senf/config.hh")): print "\nUsing SENF in '%s'\n" \ % ('/..' in sconspath and os.path.abspath(path) or sconspath) env.Append( LIBPATH = [ sconspath ], CPPPATH = [ sconspath ], BUNDLEDIR = sconspath ) try: env.MergeFlags(file(os.path.join(path,"senf.conf")).read()) except IOError: print "(SENF configuration file 'senf.conf' not found, assuming non-final SENF)" env.Append(CPPDEFINES = [ 'SENF_DEBUG' ]) break elif os.path.exists(os.path.join(path,"include/senf/config.hh")): print "\nUsing system SENF in '%s/'\n" % sconspath env.Append(BUNDLEDIR = os.path.join(sconspath,"lib/senf")) break else: print "\nSENF library not found .. trying build anyway !!\n" | 43a4ec7f465ca93b2dc4c4441098233e212cadab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2548/43a4ec7f465ca93b2dc4c4441098233e212cadab/senfutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10939,
1290,
1090,
26473,
12,
3074,
16,
28901,
74,
67,
4481,
273,
5378,
4672,
28901,
74,
67,
4481,
18,
14313,
12,
2668,
87,
275,
74,
2187,
25226,
87,
275,
74,
2187,
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,
10939,
1290,
1090,
26473,
12,
3074,
16,
28901,
74,
67,
4481,
273,
5378,
4672,
28901,
74,
67,
4481,
18,
14313,
12,
2668,
87,
275,
74,
2187,
25226,
87,
275,
74,
2187,
1140,
18,
803,
18,
... |
self._instancesUnrequestedTable.remove(instance) | def clearTemporary(self): """ Removes all tables only built temporarily as to satisfy build dependencies. This method is called before L{build()} terminates. If the build process is interruptes (e.g. by the user pressing Ctrl+C), this method should be called as to make sure that these temporary tables are removed and not included in later builds. """ # remove tables that where only created as build dependencies if hasattr(self, '_instancesUnrequestedTable'): for instance in self._instancesUnrequestedTable: if not self.quiet: warn("Removing table '" + instance.PROVIDES \ + "' as it was only created to solve build " \ + "dependencies") try: instance.remove() self._instancesUnrequestedTable.remove(instance) except OperationalError: pass # remove old metadata if instance.PROVIDES in self.db.tables: del self.db.tables[instance.PROVIDES] | 22c6ec91d4f40de6a2c37aea1b97e35895275a84 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/22c6ec91d4f40de6a2c37aea1b97e35895275a84/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
11685,
12,
2890,
4672,
3536,
20284,
777,
4606,
1338,
6650,
18917,
487,
358,
18866,
1361,
5030,
18,
1220,
707,
353,
2566,
1865,
511,
95,
3510,
17767,
30559,
18,
971,
326,
1361,
1207,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
11685,
12,
2890,
4672,
3536,
20284,
777,
4606,
1338,
6650,
18917,
487,
358,
18866,
1361,
5030,
18,
1220,
707,
353,
2566,
1865,
511,
95,
3510,
17767,
30559,
18,
971,
326,
1361,
1207,
... | |
self.call('execute_shell') | directory = os.getcwd() proj = self.boss.call_command('projectmanager', 'get_current_project') if proj is not None: directory = proj.source_directory self.call('execute_shell', kwdict={'directory': directory}) | def act_terminal(self, action): """Start a shell in a terminal emulator.""" self.call('execute_shell') | 21d0147f99dfe741e48c91b099b75bd4dafad50f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/21d0147f99dfe741e48c91b099b75bd4dafad50f/terminal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1328,
67,
15979,
12,
2890,
16,
1301,
4672,
3536,
1685,
279,
5972,
316,
279,
8651,
801,
11775,
12123,
365,
18,
1991,
2668,
8837,
67,
10304,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1328,
67,
15979,
12,
2890,
16,
1301,
4672,
3536,
1685,
279,
5972,
316,
279,
8651,
801,
11775,
12123,
365,
18,
1991,
2668,
8837,
67,
10304,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if self.getOption('toneMarkType') != 'Numbers': | if toneMarkType != 'Numbers': | def __init__(self, **options): """ Creates an instance of the CantoneseIPAOperator. | 3393604da067ca36b1da468c96a925bae792aff6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11128/3393604da067ca36b1da468c96a925bae792aff6/operator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
2116,
4672,
3536,
10210,
392,
791,
434,
326,
385,
970,
265,
3392,
2579,
37,
5592,
18,
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,
1001,
2738,
972,
12,
2890,
16,
2826,
2116,
4672,
3536,
10210,
392,
791,
434,
326,
385,
970,
265,
3392,
2579,
37,
5592,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.pport.setData(0xFF) self.pport.setAutoFeed(0) | epcs.pport.setData(0xFF) epcs.pport.setAutoFeed(1) epcs.clearPPDataBit(3) epcs.clearPPDataBit(2) | def close(self): self.pport.setData(0xFF) self.pport.setAutoFeed(0) #disable BB II tristate buffers to drive | 9691aa8e280dcdfb47ce8ab9d1e1bf9df0e8b837 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/714/9691aa8e280dcdfb47ce8ab9d1e1bf9df0e8b837/update.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
18,
84,
655,
18,
542,
751,
12,
20,
6356,
13,
365,
18,
84,
655,
18,
542,
4965,
8141,
12,
20,
13,
468,
8394,
21752,
23076,
433,
376,
340,
9664,
358,
14316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
18,
84,
655,
18,
542,
751,
12,
20,
6356,
13,
365,
18,
84,
655,
18,
542,
4965,
8141,
12,
20,
13,
468,
8394,
21752,
23076,
433,
376,
340,
9664,
358,
14316,
... |
OUTPUT: - an order in a quaternion algebra | OUTPUT: an order in a quaternion algebra | def right_order(self): """ Return the right order associated to this fractional ideal. | 1fe7e945a5e69662d3b79300c558387c31fea323 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/1fe7e945a5e69662d3b79300c558387c31fea323/quaternion_algebra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2145,
67,
1019,
12,
2890,
4672,
3536,
2000,
326,
2145,
1353,
3627,
358,
333,
20462,
23349,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2145,
67,
1019,
12,
2890,
4672,
3536,
2000,
326,
2145,
1353,
3627,
358,
333,
20462,
23349,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
where k_i is the degree of node i, [1]. A coefficient for | where k_i is the degree of vertex i, [1]. A coefficient for | def clustering_average(self): r""" Returns the average clustering coefficient. | 139028392b54ae237314b7536b21897e9b1d7ed3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/139028392b54ae237314b7536b21897e9b1d7ed3/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18743,
67,
15621,
12,
2890,
4672,
436,
8395,
2860,
326,
8164,
18743,
16554,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18743,
67,
15621,
12,
2890,
4672,
436,
8395,
2860,
326,
8164,
18743,
16554,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
"""Reports the current navigator object""" | def script_navigatorObject_current(self,keyPress,nextScript): """Reports the current navigator object""" curObject=api.getNavigatorObject() if not isinstance(curObject,NVDAObjects.baseType.NVDAObject): audio.speakMessage(_("no navigator object")) return curObject.speakObject() return False | c6388e71ad509ca538ed8be17f21eeb912f2f689 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/c6388e71ad509ca538ed8be17f21eeb912f2f689/_default.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2728,
67,
82,
13061,
921,
67,
2972,
12,
2890,
16,
856,
11840,
16,
4285,
3651,
4672,
662,
921,
33,
2425,
18,
588,
22817,
921,
1435,
309,
486,
1549,
12,
1397,
921,
16,
11679,
9793,
4710,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2728,
67,
82,
13061,
921,
67,
2972,
12,
2890,
16,
856,
11840,
16,
4285,
3651,
4672,
662,
921,
33,
2425,
18,
588,
22817,
921,
1435,
309,
486,
1549,
12,
1397,
921,
16,
11679,
9793,
4710,... | |
columnSQLWhitelist = "%s, %s" % (self.retcolsSQLWhitelist, columnSQLWhitelist) | columnSQLWhitelist = "`%s`, %s" % ("`, `".join(self.wherecolsWhitelist), self.retcolsSQLWhitelist) | def start(self): if self.factory == None: raise ParamError("this module need reference to fatory and database connection pool") | 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,
787,
12,
2890,
4672,
309,
365,
18,
6848,
422,
599,
30,
1002,
3014,
668,
2932,
2211,
1605,
1608,
2114,
358,
284,
8452,
471,
2063,
1459,
2845,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
309,
365,
18,
6848,
422,
599,
30,
1002,
3014,
668,
2932,
2211,
1605,
1608,
2114,
358,
284,
8452,
471,
2063,
1459,
2845,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if isinstance(doc, VariableDoc) and doc.is_public is False: | if is_private: | def write_toc_section(self, out, name, docs, fullname=True): if not docs: return | 28d88ae14617650a4a829fae94668100dc4e2b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/28d88ae14617650a4a829fae94668100dc4e2b05/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1391,
67,
3464,
12,
2890,
16,
596,
16,
508,
16,
3270,
16,
13321,
33,
5510,
4672,
309,
486,
3270,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1391,
67,
3464,
12,
2890,
16,
596,
16,
508,
16,
3270,
16,
13321,
33,
5510,
4672,
309,
486,
3270,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
pacc,accChildID=IAccessibleHandler.accessibleObjectFromEvent(docHandle,IAccessiblehandler.OBJID_CLIENT,ID) | pacc,accChildID=IAccessibleHandler.accessibleObjectFromEvent(docHandle,IAccessibleHandler.OBJID_CLIENT,ID) | def _activateField(self,docHandle,ID): try: pacc,accChildID=IAccessibleHandler.accessibleObjectFromEvent(docHandle,IAccessiblehandler.OBJID_CLIENT,ID) role=pacc.accRole(accChildID) if role in (IAccessibleHandler.ROLE_SYSTEM_COMBOBOX,IAccessibleHandler.ROLE_SYSTEM_TEXT,IAccessibleHandler.ROLE_SYSTEM_LIST): api.toggleVirtualBufferPassThrough() else: pacc.accDoDefaultAction(accChildID) except: pass | 4c3736031ccceb18a139f85dbdd5a9b975967cc6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/4c3736031ccceb18a139f85dbdd5a9b975967cc6/IAccessible.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10014,
974,
12,
2890,
16,
2434,
3259,
16,
734,
4672,
775,
30,
6790,
952,
16,
8981,
1763,
734,
33,
45,
10451,
1503,
18,
26037,
921,
1265,
1133,
12,
2434,
3259,
16,
45,
10451,
1503,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10014,
974,
12,
2890,
16,
2434,
3259,
16,
734,
4672,
775,
30,
6790,
952,
16,
8981,
1763,
734,
33,
45,
10451,
1503,
18,
26037,
921,
1265,
1133,
12,
2434,
3259,
16,
45,
10451,
1503,... |
rc, output, m = self.shell.cmd1('%s%s' % (self.__get_cmd_prefix_hack__(binary=True),cmd),allowed_exit=[0,255]) | rc, output, m = self.shell.cmd1('%s%s' % (self.__get_cmd_prefix_hack__(binary=exec_bin),cmd),allowed_exit=[0,255]) | def cancelMultiple(self, jobids): '''Cancel multiple jobs in one LCG job cancellation call''' | ccdaf9c21baff52cb6e7248f0892c69ca3083c28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/ccdaf9c21baff52cb6e7248f0892c69ca3083c28/Grid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3755,
8438,
12,
2890,
16,
1719,
2232,
4672,
9163,
6691,
3229,
6550,
316,
1245,
511,
20585,
1719,
7272,
745,
26418,
2,
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,
3755,
8438,
12,
2890,
16,
1719,
2232,
4672,
9163,
6691,
3229,
6550,
316,
1245,
511,
20585,
1719,
7272,
745,
26418,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
def test_nonexisting_u(self): self.assertRaises(OSError, startfile, "nonexisting.vbs") | def test_nonexisting_u(self): self.assertRaises(OSError, startfile, "nonexisting.vbs") | d0d16046a38b3b6b2f8c7cb9623e6d95ea4f4e10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/d0d16046a38b3b6b2f8c7cb9623e6d95ea4f4e10/test_startfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5836,
11711,
67,
89,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
4618,
668,
16,
787,
768,
16,
315,
5836,
11711,
18,
90,
2038,
7923,
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,
1842,
67,
5836,
11711,
67,
89,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
4618,
668,
16,
787,
768,
16,
315,
5836,
11711,
18,
90,
2038,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100... | |
if self.current: | if isinstance(self.current,tuple) and len(self.current) == 2: | def preWidgetRemove(self, instance): if self.current: self.current[1].onDeselect(self.session) instance.selectionChanged.get().remove(self.selectionChanged) instance.setContent(None) | 896c84d2406e5c2a16a98539f10b9695027eace9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/896c84d2406e5c2a16a98539f10b9695027eace9/ConfigList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
4609,
3288,
12,
2890,
16,
791,
4672,
309,
1549,
12,
2890,
18,
2972,
16,
8052,
13,
471,
562,
12,
2890,
18,
2972,
13,
422,
576,
30,
365,
18,
2972,
63,
21,
8009,
265,
6305,
13759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
4609,
3288,
12,
2890,
16,
791,
4672,
309,
1549,
12,
2890,
18,
2972,
16,
8052,
13,
471,
562,
12,
2890,
18,
2972,
13,
422,
576,
30,
365,
18,
2972,
63,
21,
8009,
265,
6305,
13759,
... |
def __init__(self): self.ID = '' self.DE = [] self.AN = [] self.CA = '' self.CF = [] self.CC = [] self.DI = [] self.PR = [] self.DR = [] | def __init__(self): self.ID = '' self.DE = [] self.AN = [] self.CA = '' self.CF = [] self.CC = [] self.DI = [] self.PR = [] self.DR = [] def __repr__(self): if self.ID: if self.DE: return "%s (%s, %s)" % (self.__class__.__name__, self.ID, self.DE[0]) else: return "%s (%s)" % (self.__class__.__name__, self.ID) else: return "%s ( )" % (self.__class__.__name__) def __str__(self): output = "ID: " + self.ID output += " DE: " + repr(self.DE) output += " AN: " + repr(self.AN) output += " CA: '" + self.CA + "'" output += " CF: " + repr(self.CF) output += " CC: " + repr(self.CC) output += " DI: " + repr(self.DI) output += " PR: " + repr(self.PR) output += " DR: %d Records" % len(self.DR) return output | def __init__(self): self.ID = '' self.DE = [] self.AN = [] self.CA = '' self.CF = [] self.CC = [] # one comment per line self.DI = [] self.PR = [] self.DR = [] | 6861d39781a897f3383ba47c3bbdfd115a054114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/6861d39781a897f3383ba47c3bbdfd115a054114/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
734,
273,
875,
365,
18,
1639,
273,
5378,
365,
18,
1258,
273,
5378,
365,
18,
3587,
273,
875,
365,
18,
8955,
273,
5378,
365,
18,
6743,
273,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
734,
273,
875,
365,
18,
1639,
273,
5378,
365,
18,
1258,
273,
5378,
365,
18,
3587,
273,
875,
365,
18,
8955,
273,
5378,
365,
18,
6743,
273,
53... |
keyws = [] | outlist = [] compositesOf = [] compositesList = [] compositesOUT = [] keys2drop = [] composites = {} compositesIDX = {} | def generate_keywords_rdf(textfile, dictfile, output, outwords, mode): """ A method that generates keywords from an rdf thesaurus. """ keylist = [] keyws = [] counts = {} entries = [] ns_skos = rdflib.Namespace("http://www.w3.org/2004/02/skos/core#") ns_dc=rdflib.Namespace("http://purl.org/dc/elements/1.1/") ns_rdf=rdflib.Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#") ns_concept=rdflib.Namespace("http://cain.nbii.org/thesauri/CERESTheme.rdf") store = rdflib.Graph() store.load(dictfile) size = int(os.stat(textfile).st_size) rtmp = open(textfile, 'r') if mode == 1: # Fast mode: analysing only abstract + title + middle portion of document # Abstract and title is never more than 20% of whole document. text_string = str(rtmp.read(int(size*0.2))) throw_away = str(rtmp.read(int(size*0.25))) text_string += str(rtmp.read(int(size*0.2))) else: # Slow mode: get all document text_string = str(rtmp.read()) # text_string = text_string.lower() rtmp.close() try: if text_string.find("Keywords:"): safe_keys = text_string.split("Keywords:")[1].split("\n")[0] elif text_string.find("Key words:"): safe_keys = text_string.split("Key words:")[1].split("\n")[0] elif text_string.find("Key Words:"): safe_keys = text_string.split("Key Words:")[1].split("\n")[0] except: safe_keys = "" for s,pref in store.subject_objects(ns_skos["prefLabel"]): dictOUT = 0 dictOUT_alt = 0 safeOUT = 0 alternatives = " " broaders = " " narrowers = " " relateds = " " safekey = 0 if pref[:2].isupper(): # First two letters are uppercase. This could be an acronym. Better leave case untouched pattern = sre.compile('\\b' + pref.strip() + '\\b') else: # Let's do some case insensitive search pattern = sre.compile('\\b' + pref.strip() + '\\b', sre.I) dictOUT = len(sre.findall(pattern,text_string)) safeOUT = len(sre.findall(pattern,safe_keys)) for alt in store.objects(s, ns_skos["altLabel"]): if alt[:2].isupper(): # First two letters are uppercase. This could be an acronym. Better leave case untouched pattern_alt = sre.compile('\\b' + alt.strip() + '\\b') else: # Let's do some case insensitive search pattern_alt = sre.compile('\\b' + alt.strip() + '\\b', sre.I) dictOUT_alt += len(sre.findall(pattern_alt,text_string)) safeOUT += len(sre.findall(pattern_alt,safe_keys)) alternatives += alt.strip() + ", " alternatives = alternatives[:-2] dictOUT_total = int(dictOUT) + int(dictOUT_alt) if dictOUT_total>1: if safeOUT>0: safekey = safeOUT for bro in store.objects(s, ns_skos["broader"]): bro_link = store.value(bro, ns_skos["prefLabel"], any=True) if bro_link: broaders += bro_link.strip() + ", " for nar in store.objects(s, ns_skos["narrower"]): nar_link = store.value(nar, ns_skos["prefLabel"], any=True) if nar_link: narrowers += nar_link.strip() + ", " for rel in store.objects(s, ns_skos["related"]): rel_link = store.value(rel, ns_skos["prefLabel"], any=True) if rel_link: relateds += rel_link.strip() + ", " broaders = broaders[:-2] narrowers = narrowers[:-2] relateds = relateds[:-2] keylist.append([dictOUT_total, dictOUT, dictOUT_alt, pref.strip(), alternatives, relateds, broaders, narrowers, safekey]) keylist.sort() keylist.reverse() if output == 0: details = "\n" for i in range(outwords): details += str(keylist[i][3]) + " ("+ str(keylist[i][0]) if int(keylist[i][8])>0: details += "*" details += ")\n" if len(str(keylist[i][4]))>1: details += " UF (" + str(keylist[i][2]) + "):" + str(keylist[i][4]) + "\n" if len(str(keylist[i][5]))>1: details += " RT:" + str(keylist[i][5]) + "\n" if len(str(keylist[i][6]))>1: details += " BT:" + str(keylist[i][6]) + "\n" if len(str(keylist[i][7]))>1: details += " NT:" + str(keylist[i][7]) + "\n" details += "\n" print details else: makeTagCloud(keylist, outwords) return keyws | e370f85299a0a2ebca37fc2311af0cdcffe61261 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2594/e370f85299a0a2ebca37fc2311af0cdcffe61261/bibclassifylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
11771,
67,
19299,
12,
955,
768,
16,
2065,
768,
16,
876,
16,
596,
3753,
16,
1965,
4672,
3536,
432,
707,
716,
6026,
7093,
628,
392,
9160,
286,
281,
28659,
407,
18,
3536,
498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
11771,
67,
19299,
12,
955,
768,
16,
2065,
768,
16,
876,
16,
596,
3753,
16,
1965,
4672,
3536,
432,
707,
716,
6026,
7093,
628,
392,
9160,
286,
281,
28659,
407,
18,
3536,
498,
... |
pixbuf = gtk.gdk.pixbuf_new_from_file(bgimage) | pixbuf = pb_new(bgimage) | def _set_background(self, widget, ccontext = None, bounds = None): 'Set the background of `widget` to a color or image.' if not widget.window: return False if ccontext is None: ccontext = widget.window.cairo_create() if bounds is None: bounds = widget.window.get_size() if self._black and widget is self.pres: bgtype = 'color' bgcolor1 = bgcolor2 = (0, 0, 0) elif self._logo and widget is self.pres: if not hasattr(self,"_logo_pbuf"): try: self._logo_pbuf = gtk.gdk.pixbuf_new_from_file_at_size( config.get("screen", "logo"), int(bounds[0]/1.5), int(bounds[1]/1.5)) except gobject.GError: exposong.log.error('Could not open logo "%s".', config.get('screen', 'logo')) self._logo_pbuf = None bg = c2dec(config.getcolor("screen", "logo_bg")) ccontext.set_source_rgb(bg[0], bg[1], bg[2]) ccontext.paint() if self._logo_pbuf <> None: ccontext.set_source_pixbuf(self._logo_pbuf, (bounds[0]-self._logo_pbuf.get_width())/2, (bounds[1]-self._logo_pbuf.get_height())/2) ccontext.paint() return else: bgtype = config.get("screen", "bg_type") bgimage = config.get("screen", "bg_image") bgcolor1 = config.getcolor("screen", "bg_color_1") bgcolor2 = config.getcolor("screen", "bg_color_2") if bgtype == "image": if bgimage == "": pass bgkey = str(bounds[0])+'x'+str(bounds[1]) try: if self.bg_dirty or bgkey not in self.bg_img: pixbuf = gtk.gdk.pixbuf_new_from_file(bgimage) self.bg_img[bgkey] = pixbuf.scale_simple(bounds[0], bounds[1], gtk.gdk.INTERP_BILINEAR) except gobject.GError: exposong.log.error('Could not open background file "%s".', bgimage) if hasattr(self, 'bg_img') and bgkey in self.bg_img: del self.bg_img[bgkey] config.set("screen", "bg_image", "") config.set("screen", "bg_type", "color") exposong.bgselect.bgselect.set_background_to_color() else: ccontext.set_source_pixbuf(self.bg_img[bgkey], 0, 0) ccontext.paint() return finally: self.bg_dirty = False elif bgtype == 'color': color = (c2dec(bgcolor1), c2dec(bgcolor2)) if len(color) >= 3 and isinstance(color[0], (float, int)): # Draw a solid color ccontext.set_source_rgb(color[0], color[1], color[2]) ccontext.paint() elif isinstance(color[0], tuple): # Draw a gradiant if config.get("screen", "bg_angle") == u"\u2193": #Down gr_x1 = gr_y1 = gr_x2 = 0 gr_y2 = bounds[1] elif config.get("screen", "bg_angle") == u'\u2199': #Down-Left gr_x2 = gr_y1 = 0 (gr_x1, gr_y2) = bounds elif config.get("screen", "bg_angle") == u'\u2192': #Right gr_x1 = gr_y1 = gr_y2 = 0 gr_x2 = bounds[0] else: # Down-Right gr_x1 = gr_y1 = 0 (gr_x2, gr_y2) = bounds gradient = cairo.LinearGradient(gr_x1, gr_y1, gr_x2, gr_y2) for i in range(len(color)): gradient.add_color_stop_rgb(1.0*i/(len(color)-1), color[i][0], color[i][1], color[i][2]) ccontext.rectangle(0,0, bounds[0], bounds[1]) ccontext.set_source(gradient) ccontext.fill() else: exposong.log.error('_set_background: Incorrect color `%s`.', repr(color)) | def195fbc59dc45ac51d9246f0090a00f2161242 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5029/def195fbc59dc45ac51d9246f0090a00f2161242/screen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
9342,
12,
2890,
16,
3604,
16,
276,
2472,
273,
599,
16,
4972,
273,
599,
4672,
296,
694,
326,
5412,
434,
1375,
6587,
68,
358,
279,
2036,
578,
1316,
1093,
309,
486,
3604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
9342,
12,
2890,
16,
3604,
16,
276,
2472,
273,
599,
16,
4972,
273,
599,
4672,
296,
694,
326,
5412,
434,
1375,
6587,
68,
358,
279,
2036,
578,
1316,
1093,
309,
486,
3604,
... |
max_new_combo.set_selected(value) | max_new_combo.set_selected(max_new_values.index(value)) | def _build_auto_download(channel, grid): auto_download_cbx = widgetset.Checkbox(_("Pause Auto-Downloading when this many items are unplayed:")) grid.pack(auto_download_cbx, grid.ALIGN_RIGHT) max_new_options = [ ("1", _("1 unplayed item")), ("3", _("3 unplayed items")), ("5", _("5 unplayed items")), ("10", _("10 unplayed items")), ("15", _("15 unplayed items")) ] max_new_values = [e[0] for e in max_new_options] max_new_combo = widgetset.OptionMenu([e[1] for e in max_new_options]) if channel.max_new == u"unlimited": auto_download_cbx.set_checked(False) max_new_combo.set_selected(2) max_new_combo.disable() else: auto_download_cbx.set_checked(True) value = channel.max_new if value < 1: value = 1 else: while value not in max_new_values and value > 1: value = value - 1 max_new_combo.set_selected(value) def max_new_changed(widget, index): value = max_new_options[index][0] messages.SetFeedMaxNew(channel, int(value)).send_to_backend() def checkbox_changed(widget): if widget.get_checked(): max_new_combo.enable() max_new_changed(max_new_combo, 2) else: max_new_combo.disable() max_new_changed(max_new_combo, 2) messages.SetFeedMaxNew(channel, u"unlimited").send_to_backend() grid.pack(max_new_combo, grid.ALIGN_LEFT) max_new_combo.connect('changed', max_new_changed) auto_download_cbx.connect('toggled', checkbox_changed) | 9ff90a52b32bccb8adf48128fd7d75572e26038c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/9ff90a52b32bccb8adf48128fd7d75572e26038c/feedsettingspanel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
67,
6079,
67,
7813,
12,
4327,
16,
3068,
4672,
3656,
67,
7813,
67,
7358,
92,
273,
3604,
542,
18,
21272,
24899,
2932,
19205,
8064,
17,
27217,
1347,
333,
4906,
1516,
854,
640,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3510,
67,
6079,
67,
7813,
12,
4327,
16,
3068,
4672,
3656,
67,
7813,
67,
7358,
92,
273,
3604,
542,
18,
21272,
24899,
2932,
19205,
8064,
17,
27217,
1347,
333,
4906,
1516,
854,
640,
... |
'active_uom' :fields.many2one('product.uom', string = "Active UoM"), 'state' : fields.selection([('draft','Draft'),('validated','Validated')],'State',readonly=True), 'analyzed_period1_id' : fields.many2one('stock.period' , 'Period1', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period2_id' : fields.many2one('stock.period' , 'Period2', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period3_id' : fields.many2one('stock.period' , 'Period3', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period4_id' : fields.many2one('stock.period' , 'Period4', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period5_id' : fields.many2one('stock.period' , 'Period5', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_user_id' : fields.many2one('res.users' , 'This User', required=False, readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_dept_id' : fields.many2one('hr.department' , 'This Department', required=False, \ | 'active_uom': fields.many2one('product.uom', string = "Active UoM"), 'state': fields.selection([('draft','Draft'),('validated','Validated')],'State',readonly=True), 'analyzed_period1_id': fields.many2one('stock.period' , 'Period1', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period2_id': fields.many2one('stock.period' , 'Period2', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period3_id': fields.many2one('stock.period' , 'Period3', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period4_id': fields.many2one('stock.period' , 'Period4', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period5_id': fields.many2one('stock.period' , 'Period5', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_user_id': fields.many2one('res.users' , 'This User', required=False, readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_dept_id': fields.many2one('hr.department' , 'This Department', required=False, \ | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.template') categ_ids = f.product_categ_id1.id and [f.product_categ_id1.id] or [] prod_categ_ids=prod_categ_obj.search(cr,uid,[('parent_id','child_of',categ_ids)]) templates_ids = template_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)]) products_ids = product_obj.search(cr,uid,[('product_tmpl_id','in',templates_ids)]) if len(products_ids)==0: raise osv.except_osv(_('Error !'), _('No products in selected category !')) copy = f.copy_forecast for p in product_obj.browse(cr, uid, products_ids,{}): if len(forecast_obj.search(cr, uid, [('product_id','=',p.id) , \ ('period_id','=',f.period_id1.id), \ ('user_id','=',uid), \ ('warehouse_id','=',f.warehouse_id1.id)]))== 0: forecast_qty = 0.0 | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
1405,
4155,
12,
2890,
16,
3353,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3017,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
5896,
18,
5896,
6134,
18763,
67,
2603,
33,
2890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
1405,
4155,
12,
2890,
16,
3353,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3017,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
5896,
18,
5896,
6134,
18763,
67,
2603,
33,
2890,
... |
class BytesAsStringTest(test.string_tests.BaseTest): type2test = bytearray | class FixedStringTest(test.string_tests.BaseTest): | def test_returns_new_copy(self): val = self.marshal(b'1234') # On immutable types these MAY return a reference to themselves # but on mutable types like bytearray they MUST return a new copy. for methname in ('zfill', 'rjust', 'ljust', 'center'): method = getattr(val, methname) newval = method(3) self.assertEqual(val, newval) self.assertTrue(val is not newval, methname+' returned self on a mutable object') | 2173c9b6ea125ff58e99e0718de1b65c0a64c48c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/2173c9b6ea125ff58e99e0718de1b65c0a64c48c/test_bytes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
6154,
67,
2704,
67,
3530,
12,
2890,
4672,
1244,
273,
365,
18,
3108,
12,
70,
11,
28462,
6134,
468,
2755,
11732,
1953,
4259,
490,
5255,
327,
279,
2114,
358,
20968,
468,
1496,
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,
1842,
67,
6154,
67,
2704,
67,
3530,
12,
2890,
4672,
1244,
273,
365,
18,
3108,
12,
70,
11,
28462,
6134,
468,
2755,
11732,
1953,
4259,
490,
5255,
327,
279,
2114,
358,
20968,
468,
1496,
6... |
torrent_def = load(filename) append(torrent_def.get_infohash()) | try: torrent_def = load(filename) except: print >> sys.stderr, "MetadataHandler.load_recently_collected_torrents() Invalid .torrent file", filename else: append(torrent_def.get_infohash()) | torrent_def = load(filename) | 615388664266b27ee10013729f43116dd79e46d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/615388664266b27ee10013729f43116dd79e46d1/MetadataHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
17351,
67,
536,
273,
1262,
12,
3459,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
17351,
67,
536,
273,
1262,
12,
3459,
13,
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,
... |
if connected and busy == False: | if connected and not busy: | def get_worker_count(self, connected, busy): """ Returns the number of workers. Parameters: connected -- bool busy -- bool """ if connected and busy == False: query = """SELECT workers FROM monitors WHERE connected AND NOT busy""" elif connected and busy == True: query = """SELECT workers FROM monitors WHERE connected AND busy""" elif connected: query = """SELECT workers FROM monitors WHERE connected""" else: query = "SELECT workers FROM monitors WHERE NOT connected" cur = self.con.cursor() cur.execute(query) result = cur.fetchall() return sum(w[0] for w in result) | 6db6ad8a8427866f180dfe6984c842274f2461c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/6db6ad8a8427866f180dfe6984c842274f2461c3/monitordb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
10124,
67,
1883,
12,
2890,
16,
5840,
16,
21697,
4672,
3536,
2860,
326,
1300,
434,
9798,
18,
225,
7012,
30,
5840,
1493,
1426,
21697,
1493,
1426,
225,
3536,
225,
309,
5840,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
10124,
67,
1883,
12,
2890,
16,
5840,
16,
21697,
4672,
3536,
2860,
326,
1300,
434,
9798,
18,
225,
7012,
30,
5840,
1493,
1426,
21697,
1493,
1426,
225,
3536,
225,
309,
5840,
471,
... |
@param pos Position to set the focal point | @param pos: Position to set the focal point @type pos: tuple | def setFocalPoint(self,*pos): """ Sets the focal point of the Camera with the Scene | 96b00238a8d5cd11876b111a3518775124c30a4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/96b00238a8d5cd11876b111a3518775124c30a4c/camera.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24340,
23735,
2148,
12,
2890,
16,
14,
917,
4672,
3536,
11511,
326,
284,
23735,
1634,
434,
326,
30355,
598,
326,
29347,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
24340,
23735,
2148,
12,
2890,
16,
14,
917,
4672,
3536,
11511,
326,
284,
23735,
1634,
434,
326,
30355,
598,
326,
29347,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
except (ftplib.Error, ValueError): | except (ftplib.Error, ValueError, AttributeError): | def fetch(self, ftp, item): import ftplib | 861b75208424d5414e224dc444118325e21518ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8317/861b75208424d5414e224dc444118325e21518ad/fetcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
12,
2890,
16,
13487,
16,
761,
4672,
1930,
11038,
6673,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
12,
2890,
16,
13487,
16,
761,
4672,
1930,
11038,
6673,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
toHost, toFull = self.splitTo(args[0]) | toFull = self.stripAddress(args[0]) | def onRcptTo(self, command, args): toHost, toFull = self.splitTo(args[0]) if toFull == options["smtpproxy", "spam_address"]: self.train_as_spam = True self.train_as_ham = False self.blockData = True self.push("250 OK\r\n") return None elif toFull == options["smtpproxy", "ham_address"]: self.train_as_ham = True self.train_as_spam = False self.blockData = True self.push("250 OK\r\n") return None else: self.blockData = False return "%s:%s" % (command, ' '.join(args)) | 03d20440083fb456b233dc890ae2baf7eae5ecf1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/03d20440083fb456b233dc890ae2baf7eae5ecf1/sb_smtpproxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
24599,
337,
774,
12,
2890,
16,
1296,
16,
833,
4672,
358,
5080,
273,
365,
18,
6406,
1887,
12,
1968,
63,
20,
5717,
309,
358,
5080,
422,
702,
9614,
20278,
5656,
3113,
315,
1752,
301,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
24599,
337,
774,
12,
2890,
16,
1296,
16,
833,
4672,
358,
5080,
273,
365,
18,
6406,
1887,
12,
1968,
63,
20,
5717,
309,
358,
5080,
422,
702,
9614,
20278,
5656,
3113,
315,
1752,
301,... |
RebuilddLog().info("Launching network servers") | RebuilddLog().info("Launching network server") | def daemon(self): RebuilddLog().info("Starting rebuildd %s" % __version__) self.daemonize() | 8808f04505010be04a2ec8abd7e733aeb27d45a6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5334/8808f04505010be04a2ec8abd7e733aeb27d45a6/Rebuildd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8131,
12,
2890,
4672,
868,
70,
89,
330,
449,
1343,
7675,
1376,
2932,
11715,
283,
70,
89,
330,
449,
738,
87,
6,
738,
1001,
1589,
972,
13,
365,
18,
21511,
554,
1435,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8131,
12,
2890,
4672,
868,
70,
89,
330,
449,
1343,
7675,
1376,
2932,
11715,
283,
70,
89,
330,
449,
738,
87,
6,
738,
1001,
1589,
972,
13,
365,
18,
21511,
554,
1435,
2,
-100,
-100,
-10... |
y += codomain(c)*misc.mul([ im_gens[i]**m[i] for i in range(n) ]) | y += codomain(c)*misc.mul([ im_gens[i]**m[i] for i in range(n) if m[i] ]) | def _im_gens_(self, codomain, im_gens): """ EXAMPLES: sage: R.<x,y> = PolynomialRing(QQ, 2) sage: f = R.hom([y,x], R) sage: f(x^2 + 3*y^5) 3*x^5 + y^2 """ n = self.parent().ngens() if n == 0: return codomain._coerce_(self) y = codomain(0) for (m,c) in self.element().dict().iteritems(): y += codomain(c)*misc.mul([ im_gens[i]**m[i] for i in range(n) ]) return y | 61c2105a2123ac414702636f9ca4345d04a477d6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/61c2105a2123ac414702636f9ca4345d04a477d6/multi_polynomial_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
381,
67,
23730,
67,
12,
2890,
16,
11012,
1530,
16,
709,
67,
23730,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
534,
22782,
92,
16,
93,
34,
273,
6730,
13602,
10369,
12,
53,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
381,
67,
23730,
67,
12,
2890,
16,
11012,
1530,
16,
709,
67,
23730,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
534,
22782,
92,
16,
93,
34,
273,
6730,
13602,
10369,
12,
53,
... |
def set_last_pos(self, notebook, page, page_num): self.last_pos = page_num | def select_current_tab(self, notebook, user_data, page): self.tabs.get_children()[page].set_active(True) | 38142c77f3dc358917b2a802d6e5c0620bfa67f7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11147/38142c77f3dc358917b2a802d6e5c0620bfa67f7/guake.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
67,
2972,
67,
7032,
12,
2890,
16,
14718,
16,
729,
67,
892,
16,
1363,
4672,
365,
18,
16056,
18,
588,
67,
5906,
1435,
63,
2433,
8009,
542,
67,
3535,
12,
5510,
13,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
67,
2972,
67,
7032,
12,
2890,
16,
14718,
16,
729,
67,
892,
16,
1363,
4672,
365,
18,
16056,
18,
588,
67,
5906,
1435,
63,
2433,
8009,
542,
67,
3535,
12,
5510,
13,
2,
-100,
-100,
... | |
return '<%s %s at %x>' % (self.__class__.__name__, ' '.join (status), id (self)) | return '<%s at % | def __repr__ (self): try: status = [] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr: if type(self.addr) == types.TupleType: status.append ('%s:%d' % self.addr) else: status.append (self.addr) return '<%s %s at %x>' % (self.__class__.__name__, ' '.join (status), id (self)) except: pass | e04b67a7e3880897ea72aa0effb9870b71f4f41f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e04b67a7e3880897ea72aa0effb9870b71f4f41f/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
261,
2890,
4672,
775,
30,
1267,
273,
5378,
309,
365,
18,
9436,
310,
471,
365,
18,
4793,
30,
1267,
18,
6923,
7707,
18085,
310,
6134,
1327,
365,
18,
8537,
30,
1267,
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,
12715,
972,
261,
2890,
4672,
775,
30,
1267,
273,
5378,
309,
365,
18,
9436,
310,
471,
365,
18,
4793,
30,
1267,
18,
6923,
7707,
18085,
310,
6134,
1327,
365,
18,
8537,
30,
1267,
18,... |
self.log(5, '-->Potential Provider: %s' % inst_str) | self.log(5, 'Potential Provider: %s' % inst_str) | def _requiringFromInstalled(self, requiringPkg, requirement, errorlist): """processes the dependency resolution for a dep where the requiring package is installed""" (name, arch, epoch, ver, rel) = requiringPkg (needname, needflags, needversion) = requirement niceformatneed = rpmUtils.miscutils.formatRequire(needname, needversion, needflags) checkdeps = 0 missingdep = 0 reqpkg_print = '%s.%s %s:%s-%s' % requiringPkg # we must first find out why the requirement is no longer there # we must find out what provides/provided it from the rpmdb (if anything) # then check to see if that thing is being acted upon by the transaction set # if it is then we need to find out what is being done to it and act accordingly rpmdbNames = self.rpmdb.getNamePkgList() needmode = None # mode in the transaction of the needed pkg (if any) if needname in rpmdbNames: needmode = self.tsInfo.getMode(name=needname) else: self.log(5, 'Needed Require is not a package name. Looking up: %s' % niceformatneed) providers = self.rpmdb.whatProvides(needname, needflags, needversion) for insttuple in providers: inst_str = '%s.%s %s:%s-%s' % insttuple (i_n, i_a, i_e, i_v, i_r) = insttuple self.log(5, '-->Potential Provider: %s' % inst_str) thismode = self.tsInfo.getMode(name=i_n, arch=i_a, epoch=i_e, ver=i_v, rel=i_r) if thismode is None and self.conf.getConfigOption('exactarch'): # check for mode by the same name+arch thismode = self.tsInfo.getMode(name=i_n, arch=i_a) if thismode is None and not self.conf.getConfigOption('exactarch'): # check for mode by just the name thismode = self.tsInfo.getMode(name=i_n) if thismode is not None: needmode = thismode self.log(5, '-->Mode is %s for provider of %s: %s' % (needmode, niceformatneed, inst_str)) break self.log(5, 'Mode for pkg providing %s: %s' % (niceformatneed, needmode)) if needmode in ['e']: self.log(5, 'TSINFO: %s package requiring %s marked as erase' % (reqpkg_print, needname)) pkg = packages.YumInstalledPackage(self.rpmdb.returnHeaderByTuple(requiringPkg)[0]) txmbr = self.tsInfo.addErase(pkg) txmbr.setAsDep() # I should figure out what it's depending on - grrr checkdeps = 1 if needmode in ['i', 'u']: self.doUpdateSetup() uplist = self.up.getUpdatesList(name=name) po = None # if there's an update for the reqpkg, then update it if len(uplist) > 0: if not self.conf.getConfigOption('exactarch'): pkgs = self.pkgSack.returnNewestByName(name) archs = [] for pkg in pkgs: (n,a,e,v,r) = pkg.pkgtup() archs.append(a) a = rpmUtils.arch.getBestArchFromList(archs) po = self.pkgSack.returnNewestByNameArch((n,a)) else: po = self.pkgSack.returnNewestByNameArch((name,arch)) if po.pkgtup() not in uplist: po = None | eab32cfd7b29888d5e24d1b7e70577597c3f37d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/eab32cfd7b29888d5e24d1b7e70577597c3f37d9/depsolve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4523,
11256,
1265,
16747,
12,
2890,
16,
29468,
11264,
16,
12405,
16,
555,
1098,
4672,
3536,
18675,
326,
4904,
7861,
364,
279,
5993,
1625,
326,
29468,
2181,
353,
5876,
8395,
261,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4523,
11256,
1265,
16747,
12,
2890,
16,
29468,
11264,
16,
12405,
16,
555,
1098,
4672,
3536,
18675,
326,
4904,
7861,
364,
279,
5993,
1625,
326,
29468,
2181,
353,
5876,
8395,
261,
529,
... |
elif quoted and not skipquote and char == '"' and next != '"': quoted = False elif quoted and char == '"' and next == '"': skipquote = True | elif quoted and not skipquote and char == '"': if next == '"': skipquote = 2 else: quoted = False | def parse_quoted_separated(args, separator=',', name_value=True, seplimit=0): """ Parses the given arguments according to the other parameters. If name_value is True, it parses keyword arguments (name=value) and returns the keyword arguments in the second return value (a dict) and positional arguments that occurred after any keyword argument in the third return value (a list). The first return value always contains the positional arguments, if name_value is False only it is present. Arguments can be quoted with a double-quote ('"') and the quote can be escaped by doubling it, the separator and equal sign (for keyword args) can both be quoted, when keyword args are enabled then the name of a keyword argument can also be quoted. Values that are not given are returned as None, while the empty string as a value can be achieved by quoting it; keys are never returned as None. If a name or value does not start with a quote, then the quote character looses its special meaning for that name or value. @param args: arguments to parse @param separator: the argument separator, defaults to a comma (',') @param name_value: indicates whether to parse keyword arguments @param seplimit: limits the number of parsed arguments @rtype: tuple, list @returns: if name_value is False, returns a list of arguments, otherwise a list of positional, a dict of keyword and a list of trailing arguments """ idx = 0 if not isinstance(args, unicode): raise TypeError('args must be unicode') max = len(args) ret_positional = [] # positional argument return value ret_trailing = [] # trailing arguments return value positional = ret_positional keyword = {} # keyword arguments curname = u'' # current name, initially value as well (name=value) cur = None # current value cur_quoted = False # indicates whether value was quoted, # needed None vs. u'' handling quoted = False # we're inside quotes skipquote = False # next quote is a quoted quote noquote = False # no quotes expected because word didn't start with one seplimit_reached = False # number of separators exhausted separator_count = 0 # number of separators encountered SPACE = [' ', '\t', ] nextitemsep = [separator] # used for skipping trailing space if name_value: nextitemsep.append('=') while idx < max: char = args[idx] next = None if idx + 1 < max: next = args[idx+1] if not quoted and char in SPACE: spaces = '' # accumulate all space while char in SPACE and idx < max - 1: spaces += char idx += 1 char = args[idx] # remove space if args end with it if char in SPACE and idx == max - 1: break # remove space at end of argument if char in nextitemsep: continue idx -= 1 if not cur is None: if cur: cur = cur + spaces elif curname: curname = curname + spaces elif not quoted and name_value and char == '=': if cur is None: cur = u'' cur_quoted = False else: cur += '=' noquote = False elif not quoted and not seplimit_reached and char == separator: if cur is None: cur = curname curname = None if not cur and not cur_quoted: cur = None if curname is not None: keyword[curname] = cur positional = ret_trailing else: positional.append(cur) curname = u'' cur = None noquote = False cur_quoted = False separator_count += 1 if seplimit and separator_count >= seplimit: seplimit_reached = True nextitemsep.remove(separator) elif not quoted and not noquote and char == '"': quoted = True cur_quoted = True elif quoted and not skipquote and char == '"' and next != '"': quoted = False elif quoted and char == '"' and next == '"': skipquote = True else: if cur is not None: cur = cur + char else: curname = curname + char skipquote = False noquote = True idx += 1 if cur is None: cur = curname curname = None cur_present = cur is not None if not cur and not cur_quoted: cur = None if curname is not None: keyword[curname] = cur elif cur_present: positional.append(cur) if name_value: return ret_positional, keyword, ret_trailing else: return ret_positional | d55f0e0b3558e3714bd7802a274db38f2c718ca2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/d55f0e0b3558e3714bd7802a274db38f2c718ca2/wikiutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
15179,
67,
24622,
12,
1968,
16,
4182,
33,
2187,
2187,
508,
67,
1132,
33,
5510,
16,
695,
412,
1038,
33,
20,
4672,
3536,
2280,
2420,
326,
864,
1775,
4888,
358,
326,
1308,
1472,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
15179,
67,
24622,
12,
1968,
16,
4182,
33,
2187,
2187,
508,
67,
1132,
33,
5510,
16,
695,
412,
1038,
33,
20,
4672,
3536,
2280,
2420,
326,
864,
1775,
4888,
358,
326,
1308,
1472,... |
lineno: current line number of line | def _GetPlatformUpdateAction(self, line, lineno, tests, platform): """Check the platform option and return the action needs to be taken. | 8eb26144f32b9dc19ff34c5291f421ac2bf50daa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/8eb26144f32b9dc19ff34c5291f421ac2bf50daa/test_expectations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
967,
8201,
1891,
1803,
12,
2890,
16,
980,
16,
7586,
16,
7434,
16,
4072,
4672,
3536,
1564,
326,
4072,
1456,
471,
327,
326,
1301,
4260,
358,
506,
9830,
18,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
967,
8201,
1891,
1803,
12,
2890,
16,
980,
16,
7586,
16,
7434,
16,
4072,
4672,
3536,
1564,
326,
4072,
1456,
471,
327,
326,
1301,
4260,
358,
506,
9830,
18,
2,
-100,
-100,
-100,
-100... | |
self.focusTile = tile | if self.player.game.host: tile.setFlag(QGraphicsItem.ItemIsFocusable, False) else: self.focusTile = tile | def _add(self, data): """get tile or meld from the selector board""" if isinstance(data, Meld): data.tiles = [] for pair in data.contentPairs: data.tiles.append(self.__addTile(Tile(pair.lower()))) for tile in data.tiles[1:]: if self.player.game.host == '': tile.setFlag(QGraphicsItem.ItemIsFocusable, False) self.focusTile = data.tiles[0] else: tile = Tile(data) # flower, season self.__addTile(tile) self.focusTile = tile # TODO: not if remote game self.placeTiles() | a641b2dc7be52fea34d11135378634ba97cc924a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1679/a641b2dc7be52fea34d11135378634ba97cc924a/board.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
12,
2890,
16,
501,
4672,
3536,
588,
4769,
578,
312,
488,
628,
326,
3451,
11094,
8395,
309,
1549,
12,
892,
16,
490,
488,
4672,
501,
18,
28366,
273,
5378,
364,
3082,
316,
501,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
12,
2890,
16,
501,
4672,
3536,
588,
4769,
578,
312,
488,
628,
326,
3451,
11094,
8395,
309,
1549,
12,
892,
16,
490,
488,
4672,
501,
18,
28366,
273,
5378,
364,
3082,
316,
501,... |
c.Run() | def call_instance_start(self, node, instance, extra_args): """Starts an instance. | ecfe94918845683627f97b646872fde40247176b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/ecfe94918845683627f97b646872fde40247176b/rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
1336,
67,
1937,
12,
2890,
16,
756,
16,
791,
16,
2870,
67,
1968,
4672,
3536,
11203,
392,
791,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
1336,
67,
1937,
12,
2890,
16,
756,
16,
791,
16,
2870,
67,
1968,
4672,
3536,
11203,
392,
791,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_removefield(colID, ln, fldID='', fldvID='', fmeth='', callback='yes', confirm=0): """form to remove a field from a collection. colID - the current collection, remove the field from this collection. sel_ln - remove the field with this language fldID - remove the field with this id""" if fmeth == "soo": field = "sort option" elif fmeth == "sew": field = "search field" elif fmeth == "seo": field = "search option" else: field = "field" subtitle = """<a name="6.4"><a name="7.4"><a name="8.4"></a>Remove %s""" % field output = "" col_dict = dict(get_def_name('', "collection")) fld_dict = dict(get_def_name('', "field")) res = get_fld_value() fldv_dict = dict(map(lambda x: (x[0], x[1]), res)) if colID and fldID: colID = int(colID) fldID = int(fldID) if fldvID and fldvID != "None": fldvID = int(fldvID) if confirm in ["0", 0]: text = """Do you want to remove the %s '%s' %s from the collection '%s'.""" % (field, fld_dict[fldID], (fldvID not in["", "None"] and "with value '%s'" % fldv_dict[fldvID] or ''), col_dict[colID]) output += createhiddenform(action="removefield#6.5", text=text, button="Confirm", colID=colID, fldID=fldID, fldvID=fldvID, fmeth=fmeth, confirm=1) elif confirm in ["1", 1]: res = remove_fld(colID, fldID, fldvID) output += write_outcome(res) try: body = [output, extra] except NameError: body = [output] output = "<br>" + addadminbox(subtitle, body) if fmeth == "soo": return perform_showsortoptions(colID, ln, content=output) elif fmeth == "sew": return perform_showsearchfields(colID, ln, content=output) elif fmeth == "seo": return perform_showsearchoptions(colID, ln, content=output) | 8dcf4c4b5c4b6097cd6d61f62b4123913eecc2ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/8dcf4c4b5c4b6097cd6d61f62b4123913eecc2ec/websearchadminlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
4479,
1518,
12,
1293,
734,
16,
7211,
16,
9880,
734,
2218,
2187,
9880,
90,
734,
2218,
2187,
10940,
546,
2218,
2187,
1348,
2218,
9707,
2187,
6932,
33,
20,
4672,
3536,
687,
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,
3073,
67,
4479,
1518,
12,
1293,
734,
16,
7211,
16,
9880,
734,
2218,
2187,
9880,
90,
734,
2218,
2187,
10940,
546,
2218,
2187,
1348,
2218,
9707,
2187,
6932,
33,
20,
4672,
3536,
687,
358,
... |
self.f.write(s) | self._fd.write(s) | def _send_cmd(self, *args): s = " ".join(map(str, args)) + "\n" self.f.write(s) | 8c9c6a050ae410643cad6448d45e21a5993a5657 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8495/8c9c6a050ae410643cad6448d45e21a5993a5657/protocol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4661,
67,
4172,
12,
2890,
16,
380,
1968,
4672,
272,
273,
315,
3552,
5701,
12,
1458,
12,
701,
16,
833,
3719,
397,
1548,
82,
6,
365,
18,
74,
18,
2626,
12,
87,
13,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
4661,
67,
4172,
12,
2890,
16,
380,
1968,
4672,
272,
273,
315,
3552,
5701,
12,
1458,
12,
701,
16,
833,
3719,
397,
1548,
82,
6,
365,
18,
74,
18,
2626,
12,
87,
13,
2,
-100,
-100,... |
trip.id = trip_id | trip.id = ("%s_%s") % (trip_id, line) | def ImportTrips(self, trips_file): "Imports the rec_frt.mdv file." for trip_id, trip_starttime, line, strli, direction, \ stoptime_id, schedule_id, daytype_id, restriction_id, \ dest_station_id, dest_stop_id, trip_type in \ ReadCSV(trips_file, ['FRT_FID', 'FRT_START', 'LI_NR', 'STR_LI_VAR', 'LI_RI_NR', 'FGR_NR', 'FPL_KUERZEL', 'TAGESMERKMAL_NR', 'VB', 'FRT_HP_AUS', 'HALTEPUNKT_NR_ZIEL', 'FAHRTART_NR']): if trip_type != '1': continue # 1=normal, 2=empty, 3=from depot, 4=to depot, 5=other trip = Trip() trip.id = trip_id trip.starttime = int(trip_starttime) trip.route = self.routes[line] dest_station = self.stations[dest_station_id] pattern_id = u'Pat.%s.%s.%s' % (line, strli, direction) trip.pattern = self.patterns[pattern_id] trip.stoptimes = trip.pattern.stoptimes[stoptime_id] if restriction_id: service_id = u'VB%s.%s' % (schedule_id, restriction_id) else: service_id = u'C%s.%s' % (schedule_id, daytype_id) trip.service_id = service_id assert len(self.services[service_id]) > 0 self.trips[trip.id] = trip | 6dab947c05f2f9068bc9e68f0933968782363f3a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6302/6dab947c05f2f9068bc9e68f0933968782363f3a/import_ch_zurich.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
6251,
1121,
12,
2890,
16,
433,
7146,
67,
768,
4672,
315,
13347,
326,
1950,
67,
74,
3797,
18,
1264,
90,
585,
1199,
364,
20654,
67,
350,
16,
20654,
67,
1937,
957,
16,
980,
16,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
6251,
1121,
12,
2890,
16,
433,
7146,
67,
768,
4672,
315,
13347,
326,
1950,
67,
74,
3797,
18,
1264,
90,
585,
1199,
364,
20654,
67,
350,
16,
20654,
67,
1937,
957,
16,
980,
16,
60... |
def hooke_isotrope_direct_3d(E,nu): | def hooke_direct_isotrope_3d(E,nu): | def hooke_isotrope_direct_3d(E,nu): l = E * nu / (1. + nu) / (1. - 2. * nu) m = 2. * E / (1. + nu) H = matrix([ [l+m, l , l , 0., 0., 0.], [ l , l+m, l , 0., 0., 0.], [ l , l , l+m, 0., 0., 0.], [ 0., 0., 0., m , 0., 0.], [ 0., 0., 0., 0., m , 0.], [ 0., 0., 0., 0., 0., m ], ]) return H | 402060dc3a14a004eadcae82df01dca84caae3cd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8320/402060dc3a14a004eadcae82df01dca84caae3cd/material_help.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3953,
73,
67,
7205,
67,
17693,
303,
347,
67,
23,
72,
12,
41,
16,
13053,
4672,
328,
273,
512,
380,
9244,
342,
261,
21,
18,
397,
9244,
13,
342,
261,
21,
18,
300,
576,
18,
380,
9244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3953,
73,
67,
7205,
67,
17693,
303,
347,
67,
23,
72,
12,
41,
16,
13053,
4672,
328,
273,
512,
380,
9244,
342,
261,
21,
18,
397,
9244,
13,
342,
261,
21,
18,
300,
576,
18,
380,
9244,
... |
Index '0' means the first position, '1' the second and so on. Similarly, '-1' is the last position, '-2' the second last, and so on. Using an index that does not exist on the list causes an error. The index can be either an integer or a string that can be converted to an integer. | Index '0' means the first position, '1' the second and so on. Similarly, '-1' is the last position, '-2' the second last, and so on. Using an index that does not exist on the list causes an error. The index can be either an integer or a string that can be converted to an integer. | def remove_from_list(self, L, index): """Removes and returns the value specified with an index from L. Index '0' means the first position, '1' the second and so on. Similarly, '-1' is the last position, '-2' the second last, and so on. Using an index that does not exist on the list causes an error. The index can be either an integer or a string that can be converted to an integer. Example: | ${x} = | Remove From List | ${L2} | 0 | => ${x} == 'a' ${L2} == ['b'] """ try: return L.pop(self._index_to_int(index)) except IndexError: self._index_error(L, index) | 2f5075140c0afeaf5bda26b5924aceb3478d1a14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/2f5075140c0afeaf5bda26b5924aceb3478d1a14/Collections.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
2080,
67,
1098,
12,
2890,
16,
511,
16,
770,
4672,
3536,
6220,
471,
1135,
326,
460,
1269,
598,
392,
770,
628,
511,
18,
225,
3340,
296,
20,
11,
4696,
326,
1122,
1754,
16,
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,
1206,
67,
2080,
67,
1098,
12,
2890,
16,
511,
16,
770,
4672,
3536,
6220,
471,
1135,
326,
460,
1269,
598,
392,
770,
628,
511,
18,
225,
3340,
296,
20,
11,
4696,
326,
1122,
1754,
16,
296... |
msg = queue.get(timeout=5) self.assertEqual("Message %d" % i, msg.body) | try: msg = queue.get(timeout=5) self.assertEqual("Message %d" % i, msg.body) except Empty: self.fail("Failed to find expected message containing 'Message %d'" % i) | def test_pull_from_queue(self): session = self.session | e359bd8628372d869c8180ecd9f3e2507532b10f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/198/e359bd8628372d869c8180ecd9f3e2507532b10f/federation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13469,
67,
2080,
67,
4000,
12,
2890,
4672,
1339,
273,
365,
18,
3184,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13469,
67,
2080,
67,
4000,
12,
2890,
4672,
1339,
273,
365,
18,
3184,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
notification_center.post_notification('BonjourAccountDidAddNeighbour', sender=self.account, | NotificationCenter().post_notification('BonjourAccountDidAddNeighbour', sender=self.account, | def _resolve_cb(self, file, flags, interface_index, error_code, fullname, host_target, port, txtrecord): notification_center = NotificationCenter() settings = SIPSimpleSettings() if error_code == bonjour.kDNSServiceErr_NoError: txt = bonjour.TXTRecord.parse(txtrecord) contact = txt['contact'].strip('<>') if 'contact' in txt else None if contact: display_name = txt['name'].decode('utf-8') if 'name' in txt else None host = re.match(r'^(.*?)(\.local)?\.?$', host_target).group(1) uri = FrozenSIPURI.parse(contact) transport = uri.parameters.get('transport', 'udp') if transport in settings.sip.transport_list and uri != self.account.contact[transport] and uri not in self._neighbours: self._neighbours.add(uri) notification_center.post_notification('BonjourAccountDidAddNeighbour', sender=self.account, data=TimestampedNotificationData(display_name=display_name, host=host, uri=uri)) BonjourFile(file, 'resolution').close() | dee5c0545c8ca1bc3f9219ea078ee0dca8662a2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/dee5c0545c8ca1bc3f9219ea078ee0dca8662a2c/account.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
67,
7358,
12,
2890,
16,
585,
16,
2943,
16,
1560,
67,
1615,
16,
555,
67,
710,
16,
13321,
16,
1479,
67,
3299,
16,
1756,
16,
6463,
3366,
4672,
3851,
67,
5693,
273,
8050,
844... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10828,
67,
7358,
12,
2890,
16,
585,
16,
2943,
16,
1560,
67,
1615,
16,
555,
67,
710,
16,
13321,
16,
1479,
67,
3299,
16,
1756,
16,
6463,
3366,
4672,
3851,
67,
5693,
273,
8050,
844... |
FProcessEntry32 = TProcessEntry32() FProcessEntry32.dwSize = ctypes.sizeof(TProcessEntry32) ContinueLoop = winKernel.kernel32.Process32First(FSnapshotHandle, ctypes.byref(FProcessEntry32)) appName = str() | FProcessEntry32 = processEntry32W() FProcessEntry32.dwSize = ctypes.sizeof(processEntry32W) ContinueLoop = winKernel.kernel32.Process32FirstW(FSnapshotHandle, ctypes.byref(FProcessEntry32)) appName = unicode() | def getAppNameFromProcessID(processID,includeExt=False): """Finds out the application name of the given process. @param processID: the ID of the process handle of the application you wish to get the name of. @type processID: int @param includeExt: C{True} to include the extension of the application's executable filename, C{False} to exclude it. @type window: bool @returns: application name @rtype: str """ if processID==NVDAProcessID: return "nvda.exe" if includeExt else "nvda" FSnapshotHandle = winKernel.kernel32.CreateToolhelp32Snapshot (2,0) FProcessEntry32 = TProcessEntry32() FProcessEntry32.dwSize = ctypes.sizeof(TProcessEntry32) ContinueLoop = winKernel.kernel32.Process32First(FSnapshotHandle, ctypes.byref(FProcessEntry32)) appName = str() while ContinueLoop: if FProcessEntry32.th32ProcessID == processID: appName = FProcessEntry32.szExeFile break ContinueLoop = winKernel.kernel32.Process32Next(FSnapshotHandle, ctypes.byref(FProcessEntry32)) winKernel.kernel32.CloseHandle(FSnapshotHandle) if not includeExt: appName=os.path.splitext(appName)[0].lower() log.debug("appName: %s"%appName) return appName | 60c4f26c14bf43df3043f17a7ec31366d069bed9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/60c4f26c14bf43df3043f17a7ec31366d069bed9/appModuleHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13697,
461,
1265,
2227,
734,
12,
2567,
734,
16,
6702,
2482,
33,
8381,
4672,
3536,
8947,
596,
326,
2521,
508,
434,
326,
864,
1207,
18,
632,
891,
1207,
734,
30,
326,
1599,
434,
326,
1207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13697,
461,
1265,
2227,
734,
12,
2567,
734,
16,
6702,
2482,
33,
8381,
4672,
3536,
8947,
596,
326,
2521,
508,
434,
326,
864,
1207,
18,
632,
891,
1207,
734,
30,
326,
1599,
434,
326,
1207... |
if fn.ext in ['.map', '.txt', '.s']: | if fn.ext in ['.map', '.txt', '.s', '.e', '.rgb']: | def process_files(self): from openalea.core.data import DataFactory | f9f008ef8d8def9d631bc4a1f6676d20b4e357e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/f9f008ef8d8def9d631bc4a1f6676d20b4e357e3/vlab.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2354,
12,
2890,
4672,
628,
1696,
5349,
69,
18,
3644,
18,
892,
1930,
1910,
1733,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2354,
12,
2890,
4672,
628,
1696,
5349,
69,
18,
3644,
18,
892,
1930,
1910,
1733,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
this sample. The quantity describes a value of certain type. See the units property to know more. Measurement can be None on failed tests only. >>> sample = QuantitativeSample('test-id', None, ... test_result='fail') >>> sample.measurement is None True We expect to have some value if the test was carried out correctly. ValueError is raised if this is not the case: >>> sample = QuantitativeSample('test-id', None, ... test_result='pass') Traceback (most recent call last): ... ValueError: Measurement cannot be None if the test succeeded Measurement must be a number. Either int, long or float: >>> sample.measurement = 10 >>> sample.measurement = 10L >>> sample.measurement = 10.0 | a test result. The quantity describes a value of certain type. See the units property to know more. Measurement must be a number. Either int, long, float or Decimal: >>> result = TestResult('some-test', 'unknown') >>> result.measurement = 10 >>> result.measurement = 10L >>> result.measurement = 10.0 >>> result.measurement = Decimal('10.0') | def _set_measurement(self, value): valid_types = (int, long, float, Decimal, NoneType) if not isinstance(value, valid_types): raise TypeError("Measurement must be an int, long, float, Decimal or None") self._measurement = value | 68740da0547f7b206d1f5a4417258818b8e84b36 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7382/68740da0547f7b206d1f5a4417258818b8e84b36/test_result.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
16944,
12,
2890,
16,
460,
4672,
923,
67,
2352,
273,
261,
474,
16,
1525,
16,
1431,
16,
11322,
16,
599,
559,
13,
309,
486,
1549,
12,
1132,
16,
923,
67,
2352,
4672,
1002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
16944,
12,
2890,
16,
460,
4672,
923,
67,
2352,
273,
261,
474,
16,
1525,
16,
1431,
16,
11322,
16,
599,
559,
13,
309,
486,
1549,
12,
1132,
16,
923,
67,
2352,
4672,
1002,
... |
super(BrowserView, self).__init__(context, request) | super(AnalyticsViewlet, self).__init__(context, request) | def __init__(self, context, request, view, manager): super(BrowserView, self).__init__(context, request) self.__parent__ = view self.context = context self.request = request self.view = view self.manager = manager | 4c71b4c01d3831c556984d0c2e76159bf71d4841 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12185/4c71b4c01d3831c556984d0c2e76159bf71d4841/view.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
819,
16,
590,
16,
1476,
16,
3301,
4672,
2240,
12,
15675,
1767,
1810,
16,
365,
2934,
972,
2738,
972,
12,
2472,
16,
590,
13,
365,
16186,
2938,
972,
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,
819,
16,
590,
16,
1476,
16,
3301,
4672,
2240,
12,
15675,
1767,
1810,
16,
365,
2934,
972,
2738,
972,
12,
2472,
16,
590,
13,
365,
16186,
2938,
972,
273,
... |
print request.encode("utf-8") | def _process_request(self, connection, request): """ Post the data and return the XML response """ print request.encode("utf-8") conn = urllib2.Request(url=connection, data=request.encode("utf-8")) f = urllib2.urlopen(conn) all_results = f.read() return(fromstring(all_results)) | 429a6daa5a3d3a4efbcc18ef4786db328eb0d750 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/171/429a6daa5a3d3a4efbcc18ef4786db328eb0d750/shipper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
67,
2293,
12,
2890,
16,
1459,
16,
590,
4672,
3536,
5616,
326,
501,
471,
327,
326,
3167,
766,
3536,
1487,
273,
11527,
22,
18,
691,
12,
718,
33,
4071,
16,
501,
33,
2293,
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,
389,
2567,
67,
2293,
12,
2890,
16,
1459,
16,
590,
4672,
3536,
5616,
326,
501,
471,
327,
326,
3167,
766,
3536,
1487,
273,
11527,
22,
18,
691,
12,
718,
33,
4071,
16,
501,
33,
2293,
18,... | |
l = document.body[m].find(option) | l = lines[m].find(option) | def remove_option(document, m, option): ''' removes option from line m. returns whether we did anything ''' l = document.body[m].find(option) if l == -1: return False val = document.body[m][l:].split('"')[1] document.body[m] = document.body[m][:l - 1] + document.body[m][l+len(option + '="' + val + '"'):] return True | 2d7bbab89f976fbaa4f3e7109a92ddbf721dc4c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/2d7bbab89f976fbaa4f3e7109a92ddbf721dc4c9/lyx_2_0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3482,
12,
5457,
16,
312,
16,
1456,
4672,
9163,
7157,
1456,
628,
980,
312,
18,
1135,
2856,
732,
5061,
6967,
9163,
328,
273,
2362,
63,
81,
8009,
4720,
12,
3482,
13,
309,
328,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3482,
12,
5457,
16,
312,
16,
1456,
4672,
9163,
7157,
1456,
628,
980,
312,
18,
1135,
2856,
732,
5061,
6967,
9163,
328,
273,
2362,
63,
81,
8009,
4720,
12,
3482,
13,
309,
328,
... |
newSection.load(row) | newSection.load_row(row) | def __init__(self): self.data = {} sql = "SELECT section_code, sort_order, only_registered, only_admin, only_sysadmin FROM section" cursor = db.select(sql) while (1): row = cursor.fetchone() if row==None: break newSection = Section() newSection.load(row) self.data[newSection.code] = newSection | 076b15b1c97d57e9f42e83a3568b1d2350396f3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/076b15b1c97d57e9f42e83a3568b1d2350396f3e/WebLayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
892,
273,
2618,
1847,
273,
315,
4803,
2442,
67,
710,
16,
1524,
67,
1019,
16,
1338,
67,
14327,
16,
1338,
67,
3666,
16,
1338,
67,
9499,
3666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
892,
273,
2618,
1847,
273,
315,
4803,
2442,
67,
710,
16,
1524,
67,
1019,
16,
1338,
67,
14327,
16,
1338,
67,
3666,
16,
1338,
67,
9499,
3666,
... |
def test07_EnvRemoveAndRename(self): | def test08_EnvRemoveAndRename(self): | def test07_EnvRemoveAndRename(self): if not self.env: return | 02ec8a6bc5174b4725b144ea32bc810ca238d4fa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/02ec8a6bc5174b4725b144ea32bc810ca238d4fa/test_basics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6840,
67,
3491,
3288,
1876,
16019,
12,
2890,
4672,
309,
486,
365,
18,
3074,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6840,
67,
3491,
3288,
1876,
16019,
12,
2890,
4672,
309,
486,
365,
18,
3074,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
try: import profile | try: from profile import Profile | def _profile(): try: import profile except ImportError: print >>sys.stderr, "Could not import profile module!" return try: prof = profile.Profile() prof = prof.runctx('main(*parse_arguments())', globals(), {}) except SystemExit: pass prof.dump_stats('profile.out') return # Use the pstats statistical browser. This is made unnecessarily # difficult because the whole browser is wrapped in an # if __name__=='__main__' clause. try: import pstats except ImportError: log.error("Could not import pstats -- skipping browser") try: pstats_pyfile = os.path.splitext(pstats.__file__)[0]+'.py' sys.argv = ['pstats.py', 'profile.out'] print execfile(pstats_pyfile, {'__name__':'__main__'}) except: print 'Could not run the pstats browser' print 'Profiling output is in "profile.out"' | 5d6bcb2be94a45c7d30f850d8083ca4aa45acab3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5d6bcb2be94a45c7d30f850d8083ca4aa45acab3/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5040,
13332,
775,
30,
628,
3042,
1930,
11357,
1335,
11308,
30,
1172,
1671,
9499,
18,
11241,
16,
315,
4445,
486,
1930,
3042,
1605,
4442,
327,
775,
30,
9214,
273,
3042,
18,
4029,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5040,
13332,
775,
30,
628,
3042,
1930,
11357,
1335,
11308,
30,
1172,
1671,
9499,
18,
11241,
16,
315,
4445,
486,
1930,
3042,
1605,
4442,
327,
775,
30,
9214,
273,
3042,
18,
4029,
1435... |
return ( ext, self._utranslate(msg)) def _utranslate(self, msg): context = aq_inner(self.context) return context.utranslate(msg, domain="collective.plonefinder") | context = aq_inner(self.context) return context.translate(msg, domain="collective.plonefinder") | def ul_content_types_infos (self, mediaupload): """ return some content types infos depending on mediaupload type mediaupload could be 'image', 'video', 'audio' or any extension like '*.doc' """ context = aq_inner(self.context) ext = '*.*;' msg = u'Choose files to upload' if mediaupload == 'image' : ext = '*.jpg;*.jpeg;*.gif;*.png;' msg = u'Choose images to upload' elif mediaupload == 'video' : ext = '*.flv;*.avi;*.wmv;*.mpg;' msg = u'Choose video files to upload' elif mediaupload == 'audio' : ext = '*.mp3;*.wav;*.ogg;*.mp4;*.wma;*.aif;' msg = u'Choose audio files to upload' else : ext = mediaupload msg = u'Choose file for upload : ' + ext # XXX fixme : the _ (SiteMessageFactory) doesn't work #return ( ext, _(msg)) return ( ext, self._utranslate(msg)) | c2974a3aaa5def9528fc291ed30519c23bc94720 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9052/c2974a3aaa5def9528fc291ed30519c23bc94720/finder_upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7493,
67,
1745,
67,
2352,
67,
18227,
261,
2890,
16,
3539,
6327,
4672,
3536,
327,
2690,
913,
1953,
10626,
8353,
603,
3539,
6327,
618,
3539,
6327,
3377,
506,
296,
2730,
2187,
296,
9115,
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,
7493,
67,
1745,
67,
2352,
67,
18227,
261,
2890,
16,
3539,
6327,
4672,
3536,
327,
2690,
913,
1953,
10626,
8353,
603,
3539,
6327,
618,
3539,
6327,
3377,
506,
296,
2730,
2187,
296,
9115,
21... |
'UNICODE': ('ref/strings', 'encodings unicode TYPES STRING'), | 'UNICODE': ('ref/strings', 'encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPES'), | def writedocs(dir, pkgpath='', done=None): """Write out HTML documentation for all modules in a directory tree.""" if done is None: done = {} for file in os.listdir(dir): path = os.path.join(dir, file) if ispackage(path): writedocs(path, pkgpath + file + '.', done) elif os.path.isfile(path): modname = inspect.getmodulename(path) if modname: if modname == '__init__': modname = pkgpath[:-1] # remove trailing period else: modname = pkgpath + modname if modname not in done: done[modname] = 1 writedoc(modname) | 75f2fef7a72402f7608264e0f256819e7f2c5b29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/75f2fef7a72402f7608264e0f256819e7f2c5b29/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
329,
22280,
12,
1214,
16,
3475,
803,
2218,
2187,
2731,
33,
7036,
4672,
3536,
3067,
596,
3982,
7323,
364,
777,
4381,
316,
279,
1867,
2151,
12123,
309,
2731,
353,
599,
30,
2731,
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,
2518,
329,
22280,
12,
1214,
16,
3475,
803,
2218,
2187,
2731,
33,
7036,
4672,
3536,
3067,
596,
3982,
7323,
364,
777,
4381,
316,
279,
1867,
2151,
12123,
309,
2731,
353,
599,
30,
2731,
273,... |
runfail(command) | run(command) | def create_any_object(pid): command = OSDCommand().set_create(pid) command.attr_build(OSDAttr(ATTR_GET, CUR_CMD_ATTR_PG, CCAP_OID, \ CCAP_OID_LEN)) attr = run(command) return ntohll(attr.val) | 252a7e17c8cc59b5c8fc2bda44307ecec26b1d21 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11094/252a7e17c8cc59b5c8fc2bda44307ecec26b1d21/test-collection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
2273,
67,
1612,
12,
6610,
4672,
1296,
273,
5932,
40,
2189,
7675,
542,
67,
2640,
12,
6610,
13,
1296,
18,
1747,
67,
3510,
12,
4618,
40,
3843,
12,
12043,
67,
3264,
16,
4706,
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,
752,
67,
2273,
67,
1612,
12,
6610,
4672,
1296,
273,
5932,
40,
2189,
7675,
542,
67,
2640,
12,
6610,
13,
1296,
18,
1747,
67,
3510,
12,
4618,
40,
3843,
12,
12043,
67,
3264,
16,
4706,
67... |
sage: for i in range(10): G.add_vertex(name=i) | sage: G.add_vertices(range(10)) Graph on 10 vertices | def add_path(self, vertices): """ Adds a cycle to the graph with the given vertices. If the vertices are already present, only the edges are added. | 8876590b467e53206ef240a7504b67e554522ae4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8876590b467e53206ef240a7504b67e554522ae4/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
803,
12,
2890,
16,
6928,
4672,
3536,
15605,
279,
8589,
358,
326,
2667,
598,
326,
864,
6928,
18,
971,
326,
6928,
854,
1818,
3430,
16,
1338,
326,
5231,
854,
3096,
18,
2,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
803,
12,
2890,
16,
6928,
4672,
3536,
15605,
279,
8589,
358,
326,
2667,
598,
326,
864,
6928,
18,
971,
326,
6928,
854,
1818,
3430,
16,
1338,
326,
5231,
854,
3096,
18,
2,
-100,
... |
import cStringIO s = cStringIO.StringIO() | s = [] | def make_table(self,fromlines,tolines,fromdesc='',todesc='',context=False, numlines=5): """Returns HTML table of side by side comparison with change highlights | 37a93df12625acb7635b8d1d2f949000f6eba0b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/37a93df12625acb7635b8d1d2f949000f6eba0b0/difflib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2121,
12,
2890,
16,
2080,
3548,
16,
3490,
1465,
16,
2080,
5569,
2218,
2187,
88,
369,
742,
2218,
2187,
2472,
33,
8381,
16,
818,
3548,
33,
25,
4672,
3536,
1356,
3982,
1014,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2121,
12,
2890,
16,
2080,
3548,
16,
3490,
1465,
16,
2080,
5569,
2218,
2187,
88,
369,
742,
2218,
2187,
2472,
33,
8381,
16,
818,
3548,
33,
25,
4672,
3536,
1356,
3982,
1014,
434... |
value = self._value | if value is None: value = self._value | def menu(self, size=None, height=None, showid=0, additional=[], sort_on=None, **conditions): ''' Render a form <select> list for this property. | 5b1813e3f3108a95ebc7661eae8787addf7d4e2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5b1813e3f3108a95ebc7661eae8787addf7d4e2e/templating.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3824,
12,
2890,
16,
963,
33,
7036,
16,
2072,
33,
7036,
16,
2405,
350,
33,
20,
16,
3312,
22850,
6487,
1524,
67,
265,
33,
7036,
16,
2826,
6381,
4672,
9163,
6987,
279,
646,
411,
4025,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3824,
12,
2890,
16,
963,
33,
7036,
16,
2072,
33,
7036,
16,
2405,
350,
33,
20,
16,
3312,
22850,
6487,
1524,
67,
265,
33,
7036,
16,
2826,
6381,
4672,
9163,
6987,
279,
646,
411,
4025,
3... |
gps,gps,\ | iStart,iStop,\ | def queryDB(self,gps=None,window=int(30)): """ Takes two arguments the gps time as an integer and the window to search around this time with default to 30 seconds. It returns a dictionary variable assesible via X["ifo"] which will be a list of [flag,version,start,stop,active] """ try: dbSocket=self.__createRawCursor__() except: self.__connectDB__() dbSocket=self.__createRawCursor__() results=dict() for table in self.ifoList: results[table]=list() iStart=int(gps)-int(window) iStop=int(gps)+int(window) commandString=\ "select * from %s where\ (((start<=%i) and (stop >= %i)) or\ | 573aadf480fc5908360cf32dead51191be975ef4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/573aadf480fc5908360cf32dead51191be975ef4/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
2290,
12,
2890,
16,
75,
1121,
33,
7036,
16,
5668,
33,
474,
12,
5082,
3719,
30,
3536,
23004,
2795,
1775,
326,
20985,
813,
487,
392,
3571,
471,
326,
2742,
358,
1623,
6740,
333,
813,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
2290,
12,
2890,
16,
75,
1121,
33,
7036,
16,
5668,
33,
474,
12,
5082,
3719,
30,
3536,
23004,
2795,
1775,
326,
20985,
813,
487,
392,
3571,
471,
326,
2742,
358,
1623,
6740,
333,
813,... |
disk=['tap:qcow:%s,xvda1,w'] vif = [ 'bridge=br%s,mac=%s' ] memory=%i vcpus=%i root="/dev/xvda1" extra='xencons=tty' '''%(kernel, ramdisk, image, bridge, macAddr, memory, cores) | '''%(kernel, ramdisk) | def createXenConfig(self, vmName, image, macAddr, bridge, memory, cores, hints, id): fn = os.path.join("/tmp", vmName) vmType = hints.get('vmtype', self.defaultVmType) print 'starting vm with type: ', vmType bootstr = '' if vmType == 'pvgrub': # FIXME: untested, requires Xen 3.3 bootstr = ''' | 787afd97a19dbc056f066117a0e80a968ac780eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5161/787afd97a19dbc056f066117a0e80a968ac780eb/xenpv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
60,
275,
809,
12,
2890,
16,
4268,
461,
16,
1316,
16,
5318,
3178,
16,
10105,
16,
3778,
16,
15355,
16,
13442,
16,
612,
4672,
2295,
273,
1140,
18,
803,
18,
5701,
2932,
19,
5645,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
60,
275,
809,
12,
2890,
16,
4268,
461,
16,
1316,
16,
5318,
3178,
16,
10105,
16,
3778,
16,
15355,
16,
13442,
16,
612,
4672,
2295,
273,
1140,
18,
803,
18,
5701,
2932,
19,
5645,
31... |
raise SyntaxError("duplicate argument '%s' in function definition" % arg.name) | raise SyntaxError("duplicate argument '%s' in function definition" % name) | def __init__(self, space, func, isLambda, class_name, mod): self.module = mod if isLambda: name = "<lambda>" else: assert isinstance(func, ast.Function) name = func.name # Find duplicated arguments. argnames = {} for arg in func.argnames: if isinstance(arg, ast.AssName): if arg.name in argnames: raise SyntaxError("duplicate argument '%s' in function definition" % arg.name) argnames[arg.name] = 1 elif isinstance(arg, ast.AssTuple): for name in arg.getArgNames(): if name in argnames: raise SyntaxError("duplicate argument '%s' in function definition" % arg.name) argnames[name] = 1 if 'None' in argnames: raise SyntaxError('assignment to None is not allowed') | 6f7b2eb5b9bf7bb68086caefab3cd8ce5156db31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/6f7b2eb5b9bf7bb68086caefab3cd8ce5156db31/pycodegen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3476,
16,
1326,
16,
353,
12025,
16,
667,
67,
529,
16,
681,
4672,
365,
18,
2978,
273,
681,
309,
353,
12025,
30,
508,
273,
3532,
14661,
2984,
469,
30,
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,
3476,
16,
1326,
16,
353,
12025,
16,
667,
67,
529,
16,
681,
4672,
365,
18,
2978,
273,
681,
309,
353,
12025,
30,
508,
273,
3532,
14661,
2984,
469,
30,
18... |
towrite = "hello, world\n" | towrite = b"hello, world\n" | def test_file(self): import time, rfc822, socket h = urllib2.FileHandler() o = h.parent = MockOpener() | 4fead076f64e4ca974f7b8fbab47c4adeda9d2d9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/4fead076f64e4ca974f7b8fbab47c4adeda9d2d9/test_urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
768,
12,
2890,
4672,
1930,
813,
16,
16590,
24532,
16,
2987,
366,
273,
11527,
22,
18,
28942,
1435,
320,
273,
366,
18,
2938,
273,
7867,
3817,
708,
1435,
2,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
768,
12,
2890,
4672,
1930,
813,
16,
16590,
24532,
16,
2987,
366,
273,
11527,
22,
18,
28942,
1435,
320,
273,
366,
18,
2938,
273,
7867,
3817,
708,
1435,
2,
-100,
-100,
-100,
-1... |
exts.append( Extension("itertools", ["itertoolsmodule.c"]) ) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | aee60ebe47fc679ae2c2eb07a53e154e977f0bf7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/aee60ebe47fc679ae2c2eb07a53e154e977f0bf7/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | |
u"%s - %d" % (name, self.GetCount(name))) | u"%s - %d" % (name, self._open.get(name, 0))) self._open[name] = self._open.get(name, 0) + 1 | def PutItemOnShelf(self, shelfid): """Put an item on the shelf @param shelfid: id of the ShelfItem to open | 2875f4e5101473250cc46cf390c2d34f4fb7fccf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/2875f4e5101473250cc46cf390c2d34f4fb7fccf/iface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4399,
1180,
1398,
1555,
19079,
12,
2890,
16,
699,
19079,
350,
4672,
3536,
6426,
392,
761,
603,
326,
699,
19079,
632,
891,
699,
19079,
350,
30,
612,
434,
326,
2638,
19079,
1180,
358,
1696... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4399,
1180,
1398,
1555,
19079,
12,
2890,
16,
699,
19079,
350,
4672,
3536,
6426,
392,
761,
603,
326,
699,
19079,
632,
891,
699,
19079,
350,
30,
612,
434,
326,
2638,
19079,
1180,
358,
1696... |
a permutation group G. The ordering is that given by GAP. | a permutation group `G`. The ordering is that given by GAP. | def conjugacy_classes_representatives(self): """ Returns a complete list of representatives of conjugacy classes in a permutation group G. The ordering is that given by GAP. EXAMPLES:: sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4)]]) sage: cl = G.conjugacy_classes_representatives(); cl [(), (2,4), (1,2)(3,4), (1,2,3,4), (1,3)(2,4)] sage: cl[3] in G True :: sage: G = SymmetricGroup(5) sage: G.conjugacy_classes_representatives () [(), (1,2), (1,2)(3,4), (1,2,3), (1,2,3)(4,5), (1,2,3,4), (1,2,3,4,5)] AUTHORS: | f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10550,
637,
3505,
67,
4701,
67,
28205,
8785,
12,
2890,
4672,
3536,
2860,
279,
3912,
666,
434,
2406,
8785,
434,
10550,
637,
3505,
3318,
316,
279,
17440,
1041,
1375,
43,
8338,
1021,
9543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10550,
637,
3505,
67,
4701,
67,
28205,
8785,
12,
2890,
4672,
3536,
2860,
279,
3912,
666,
434,
2406,
8785,
434,
10550,
637,
3505,
3318,
316,
279,
17440,
1041,
1375,
43,
8338,
1021,
9543,
... |
return self._DictIterator(2,self) | return self._DictIterator(2) | def itervalues(self): """ obj.itervalues() -> an iterator over the values of obj ordered by self.field_order """ return self._DictIterator(2,self) | 579d2b0d74c64f5c9a73587dd87d4cda3aafef04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/579d2b0d74c64f5c9a73587dd87d4cda3aafef04/MythBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24607,
12,
2890,
4672,
3536,
1081,
18,
2165,
2372,
1435,
317,
392,
2775,
1879,
326,
924,
434,
1081,
5901,
635,
365,
18,
1518,
67,
1019,
3536,
327,
365,
6315,
5014,
3198,
12,
22,
13,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24607,
12,
2890,
4672,
3536,
1081,
18,
2165,
2372,
1435,
317,
392,
2775,
1879,
326,
924,
434,
1081,
5901,
635,
365,
18,
1518,
67,
1019,
3536,
327,
365,
6315,
5014,
3198,
12,
22,
13,
22... |
if not check_group(node) | if not check_group(node): | def check_group(node): if node.get('groups'): groups = node.get('groups').split(',') can_see = False access_pool = self.pool.get('ir.model.access') for group in groups: can_see = can_see or access_pool.check_groups(cr, user, group) if can_see: break if not can_see: node.set('invisible', '1') if 'attrs' in node.attrib: del(node.attrib['attrs']) #avoid making field visible later del(node.attrib['groups']) return can_see | ed15d62ef5774df129160534c2a212db9c95aefc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/ed15d62ef5774df129160534c2a212db9c95aefc/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1655,
12,
2159,
4672,
309,
756,
18,
588,
2668,
4650,
11,
4672,
3252,
273,
756,
18,
588,
2668,
4650,
16063,
4939,
12,
2187,
6134,
848,
67,
5946,
273,
1083,
2006,
67,
6011,
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,
866,
67,
1655,
12,
2159,
4672,
309,
756,
18,
588,
2668,
4650,
11,
4672,
3252,
273,
756,
18,
588,
2668,
4650,
16063,
4939,
12,
2187,
6134,
848,
67,
5946,
273,
1083,
2006,
67,
6011,
273,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.