rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
if namespace is not None and namespace.strip(): | if namespace is not None and not namespace.strip(): | def update_registry(self, module, identifier, name, namespace, base_descriptor): if namespace is not None and namespace.strip(): namespace = None | b4dfc2201453244e1316ef69a2da21aff0fa9b93 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/b4dfc2201453244e1316ef69a2da21aff0fa9b93/module_registry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
9893,
12,
2890,
16,
1605,
16,
2756,
16,
508,
16,
1981,
16,
1026,
67,
12628,
4672,
309,
1981,
353,
486,
599,
471,
486,
1981,
18,
6406,
13332,
1981,
273,
599,
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,
1089,
67,
9893,
12,
2890,
16,
1605,
16,
2756,
16,
508,
16,
1981,
16,
1026,
67,
12628,
4672,
309,
1981,
353,
486,
599,
471,
486,
1981,
18,
6406,
13332,
1981,
273,
599,
2,
-100,
-100,
... |
w.add(bg_color_button) bg_color_button.show() | w.add(self.bg_color_button) self.bg_color_button.show() | def update_toggle(ui, active): if len(ui.widget.get_proxies()) > 0: widget = ui.widget.get_proxies()[0] widget.set_active(active) | 6a20630f7b699f43d5153d9e5d6c94c1bfe1ce6e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4738/6a20630f7b699f43d5153d9e5d6c94c1bfe1ce6e/editor_richtext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
14401,
12,
4881,
16,
2695,
4672,
309,
562,
12,
4881,
18,
6587,
18,
588,
67,
20314,
606,
10756,
405,
374,
30,
3604,
273,
5915,
18,
6587,
18,
588,
67,
20314,
606,
1435,
63,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
14401,
12,
4881,
16,
2695,
4672,
309,
562,
12,
4881,
18,
6587,
18,
588,
67,
20314,
606,
10756,
405,
374,
30,
3604,
273,
5915,
18,
6587,
18,
588,
67,
20314,
606,
1435,
63,
2... |
logger.Error("Can't change syncer rate: %s " % result.fail_reason) | logger.Error("Can't change syncer rate: %s - %s" % (result.fail_reason, result.output)) | def SetSyncSpeed(self, kbytes): """Set the speed of the DRBD syncer. | 6c896e2ffcdf4889279d9b6607e23d61bab96bc4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/6c896e2ffcdf4889279d9b6607e23d61bab96bc4/bdev.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4047,
16562,
12,
2890,
16,
417,
3890,
4672,
3536,
694,
326,
8632,
434,
326,
16801,
18096,
3792,
264,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4047,
16562,
12,
2890,
16,
417,
3890,
4672,
3536,
694,
326,
8632,
434,
326,
16801,
18096,
3792,
264,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"] | def Interrogate(ipath=0, opts=0, outd=0, outc=0, src=0, module=0, library=0, files=0): if ((ipath==0)|(opts==0)|(outd==0)|(outc==0)|(src==0)|(module==0)|(library==0)|(files==0)): sys.exit("syntax error in Interrogate directive") ALLIN.append(outd) ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"] outd = PREFIX+"/pandac/input/"+outd outc = PREFIX+"/tmp/"+outc paths = xpaths(src+"/",files,"") dep = CxxCalcDependenciesAll(paths, ipath) dotdots = "" for i in range(0,src.count("/")+1): dotdots = dotdots + "../" building = 0 for x in opts: if (x[:9]=="BUILDING_"): building = x[9:] if (older(outc, dep) or older(outd, dep)): if (COMPILER=="MSVC7"): cmd = dotdots + PREFIX + "/bin/interrogate.exe" cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32' cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' -DFORCE_INLINING' if (OPTIMIZE==4): cmd = cmd + ' -DFORCE_INLINING' cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc' cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include' for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/win-libs-vc7/" + pkg.lower() + "/include" if (COMPILER=="LINUXA"): cmd = dotdots + PREFIX + '/bin/interrogate' cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' ' if (OPTIMIZE==4): cmd = cmd + ' ' cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc -S/usr/include' cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include' for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/linux-libs-a/" + pkg.lower() + "/include" cmd = cmd + ' -oc ' + dotdots + outc + ' -od ' + dotdots + outd cmd = cmd + ' -fnames -string -refcount -assert -python' for x in ipath: cmd = cmd + ' -I' + dotdots + x if (building): cmd = cmd + " -DBUILDING_"+building if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA" cmd = cmd + ' -module ' + module + ' -library ' + library if ((COMPILER=="MSVC7") and opts.count("DXSDK")): cmd = cmd + ' -I"' + DIRECTXSDK + '/include"' for ver in ["MAYA5","MAYA6","MAYA65"]: if ((COMPILER=="MSVC7") and opts.count(ver)): cmd = cmd + ' -I"' + MAYASDK[ver] + '/include"' for x in files: cmd = cmd + ' ' + x oslocalcmd(src, cmd) updatefiledate(outd) updatefiledate(outc) | a7a6d72930ad9abe29a3a3863f5e83ab3573bc1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/a7a6d72930ad9abe29a3a3863f5e83ab3573bc1a/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5294,
15283,
12,
625,
421,
33,
20,
16,
1500,
33,
20,
16,
596,
72,
33,
20,
16,
596,
71,
33,
20,
16,
1705,
33,
20,
16,
1605,
33,
20,
16,
5313,
33,
20,
16,
1390,
33,
20,
4672,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5294,
15283,
12,
625,
421,
33,
20,
16,
1500,
33,
20,
16,
596,
72,
33,
20,
16,
596,
71,
33,
20,
16,
1705,
33,
20,
16,
1605,
33,
20,
16,
5313,
33,
20,
16,
1390,
33,
20,
4672,
309... | |
def receiver(): s = openmcastsock(MYGROUP, MYPORT) | def receiver(group): group_ip = ipaddr.IP(group) s = socket.socket(_sockfam(group_ip), socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('', MYPORT)) if group_ip.version == 4: mreq = group_ip.packed + struct.pack('=I', socket.INADDR_ANY) s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq) else: mreq = group_ip.packed + struct.pack('@I', 0) s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq) | def sender(flag): s = socket(AF_INET, SOCK_DGRAM) if flag == '-b': s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) mygroup = '<broadcast>' else: mygroup = MYGROUP ttl = struct.pack('b', 1) # Time-to-live s.setsockopt(IPPROTO_IP, IP_MULTICAST_TTL, ttl) while 1: data = repr(time.time()) | 6493d788f0e6b96cd7d2ed70e8e39f8b8b7ec8d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/6493d788f0e6b96cd7d2ed70e8e39f8b8b7ec8d8/mcast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5793,
12,
6420,
4672,
272,
273,
2987,
12,
6799,
67,
18819,
16,
20834,
67,
40,
15370,
13,
309,
2982,
422,
2400,
70,
4278,
272,
18,
4424,
27844,
12,
19815,
67,
25699,
16,
7460,
67,
38,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5793,
12,
6420,
4672,
272,
273,
2987,
12,
6799,
67,
18819,
16,
20834,
67,
40,
15370,
13,
309,
2982,
422,
2400,
70,
4278,
272,
18,
4424,
27844,
12,
19815,
67,
25699,
16,
7460,
67,
38,
... |
HTTP.Request(art, cacheTime=CACHE_1MONTH) return art | def GetArtistArt(vevo_id, mimetype='image/jpeg'): try: info = JSON.ObjectFromURL(VEVO_TITLE_INFO % ( vevo_id, authToken ), cacheTime=CACHE_1MONTH) art = info['video']['mainArtists'][0]['imageUrl'] +'?width=1280&height=720&crop=auto' HTTP.Request(art, cacheTime=CACHE_1MONTH) return art image = HTTP.Request(art, cacheTime=CACHE_1MONTH) if art[-4:4] == '.png': mimetype = 'image/png' return DataObject(image, mimetype) except: return R(ART) | 0c15350d232d9a4a2232c61bb720c6defb82a9f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14804/0c15350d232d9a4a2232c61bb720c6defb82a9f5/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4411,
376,
4411,
12,
537,
12307,
67,
350,
16,
12595,
2218,
2730,
19,
14423,
11,
4672,
775,
30,
1123,
273,
1796,
18,
921,
1265,
1785,
12,
3412,
16169,
67,
14123,
67,
5923,
738,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4411,
376,
4411,
12,
537,
12307,
67,
350,
16,
12595,
2218,
2730,
19,
14423,
11,
4672,
775,
30,
1123,
273,
1796,
18,
921,
1265,
1785,
12,
3412,
16169,
67,
14123,
67,
5923,
738,
261... | |
duration = util.TimeDeltaToMilliseconds(datetime.datetime.now() - start_time) return (response, duration, exc) | duration = timer() - start_time return (response, duration*1000, exc) | def TimedRequest(self, type_string, record_string, timeout=None): """Make a DNS request, returning the reply and duration it took. | e6e6c3fada66a7e5bdd87bdf2cb59f6206791e4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4170/e6e6c3fada66a7e5bdd87bdf2cb59f6206791e4c/nameserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23925,
691,
12,
2890,
16,
618,
67,
1080,
16,
1409,
67,
1080,
16,
2021,
33,
7036,
4672,
3536,
6464,
279,
8858,
590,
16,
5785,
326,
4332,
471,
3734,
518,
23151,
18,
2,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23925,
691,
12,
2890,
16,
618,
67,
1080,
16,
1409,
67,
1080,
16,
2021,
33,
7036,
4672,
3536,
6464,
279,
8858,
590,
16,
5785,
326,
4332,
471,
3734,
518,
23151,
18,
2,
-100,
-100,
-100,
... |
callback_url = lambda url: msg('update', urllib.unquote( url)) | def update(): callback_url = lambda url: msg('update', urllib.unquote( url)) callback_error = lambda s: msg('error', s) return update_channels(callback_url = callback_url, callback_error = callback_error) | 114d141c167d66427c1de465f8f050eaab116914 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/114d141c167d66427c1de465f8f050eaab116914/console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
13332,
1348,
67,
1636,
273,
3195,
272,
30,
1234,
2668,
1636,
2187,
272,
13,
225,
327,
1089,
67,
9114,
12,
3394,
67,
718,
273,
1348,
67,
718,
16,
1348,
67,
1636,
273,
1348,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
13332,
1348,
67,
1636,
273,
3195,
272,
30,
1234,
2668,
1636,
2187,
272,
13,
225,
327,
1089,
67,
9114,
12,
3394,
67,
718,
273,
1348,
67,
718,
16,
1348,
67,
1636,
273,
1348,
67,
... | |
print "Error: %s" % ": ".join(parts[1:]) failures.setdefault("SUBMIT", []).append(data) | print "Error in GET: %s" % ": ".join(parts[1:]) failures.setdefault("GET", []).append(data) | def test_single_task_life_cycle(self): submitted = [] failures = {} s = self.socket for l in [0, 1, 4, 16, 63, 64, 65, 2047, 2048, 2049, 2050, 16*1024-8, 64*1024, 1024*1024-4]: if l > self.params['max_input_size']: continue data = " " * l s.send('SUBMIT "%s"\n' % data) parts = self.read_reply() if parts[0] == "ERR": print "At data length %d" % l, print "Error: %s" % ": ".join(parts[1:]) failures.setdefault("SUBMIT", []).append(data) continue submitted.append(parts[1]) for cmd in ['SUBMIT']: if not cmd in failures: self.successes[cmd] = 1 if failures: return 1 return 0 | 6f4afcda014a36e955c7cd4a9ca97db6ca0edbd6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/310/6f4afcda014a36e955c7cd4a9ca97db6ca0edbd6/test_netschedule_smoke.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7526,
67,
4146,
67,
10256,
73,
67,
13946,
12,
2890,
4672,
9638,
273,
5378,
11720,
273,
2618,
272,
273,
365,
18,
7814,
364,
328,
316,
306,
20,
16,
404,
16,
1059,
16,
2872,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7526,
67,
4146,
67,
10256,
73,
67,
13946,
12,
2890,
4672,
9638,
273,
5378,
11720,
273,
2618,
272,
273,
365,
18,
7814,
364,
328,
316,
306,
20,
16,
404,
16,
1059,
16,
2872,
1... |
while os.path.lexists(name): | while os.path.exists(name): | def getTempFile(self): name=DV.tmp_path+str(random.random())+'.tmp' while os.path.lexists(name): name=DV.tmp_path+str(random.random())+'.tmp' return name | a23aab3cca4213a18f7de633eeab28f6386139ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/a23aab3cca4213a18f7de633eeab28f6386139ab/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
20181,
12,
2890,
4672,
508,
33,
30199,
18,
5645,
67,
803,
15,
701,
12,
9188,
18,
9188,
10756,
6797,
18,
5645,
11,
1323,
1140,
18,
803,
18,
1808,
12,
529,
4672,
508,
33,
30199,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
20181,
12,
2890,
4672,
508,
33,
30199,
18,
5645,
67,
803,
15,
701,
12,
9188,
18,
9188,
10756,
6797,
18,
5645,
11,
1323,
1140,
18,
803,
18,
1808,
12,
529,
4672,
508,
33,
30199,
1... |
def list_files_in_directory(self, path, pattern=None, pattern_type='simple', absolute=False): | def list_files_in_directory(self, path, pattern=None, pattern_type='simple', absolute=False): | def list_files_in_directory(self, path, pattern=None, pattern_type='simple', absolute=False): """A wrapper for `List Directory` that returns only files.""" files = self._list_files_in_dir(path, pattern, pattern_type, absolute) for f in files: self._info(f) return files | 6f8bd1e5c5b0db8d92d174d89dc27677542321fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/6f8bd1e5c5b0db8d92d174d89dc27677542321fb/OperatingSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
2354,
67,
267,
67,
5149,
12,
2890,
16,
589,
16,
1936,
33,
7036,
16,
1936,
67,
723,
2218,
9647,
2187,
4967,
33,
8381,
4672,
3536,
37,
4053,
364,
1375,
682,
8930,
68,
716,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2354,
67,
267,
67,
5149,
12,
2890,
16,
589,
16,
1936,
33,
7036,
16,
1936,
67,
723,
2218,
9647,
2187,
4967,
33,
8381,
4672,
3536,
37,
4053,
364,
1375,
682,
8930,
68,
716,
113... |
def start_tag(self, indent): """ See the source code for an explanation. """ return indent + "<%s Name=\"%s\" Type=\"%s\" Delimiter=\"%s\">" % (self.tagName, self.getAttribute("Name"), self.getAttribute("Type"), self.getAttribute("Delimiter")) | def write(self, file = sys.stdout, indent = ""): columninfo = [(c.getAttribute("Type") in StringTypes, StripColumnName(c.getAttribute("Name"))) for c in self.parentNode.getElementsByTagName(ligolw.Column.tagName)] | 0b885a9349d0c06b88b02c7943dcbec10a0f29d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/0b885a9349d0c06b88b02c7943dcbec10a0f29d5/metaio.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
585,
273,
2589,
18,
10283,
16,
3504,
273,
1408,
4672,
1057,
1376,
273,
306,
12,
71,
18,
588,
1499,
2932,
559,
7923,
316,
514,
2016,
16,
15589,
8516,
12,
71,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
585,
273,
2589,
18,
10283,
16,
3504,
273,
1408,
4672,
1057,
1376,
273,
306,
12,
71,
18,
588,
1499,
2932,
559,
7923,
316,
514,
2016,
16,
15589,
8516,
12,
71,
18,
5... | |
from sugarcrm.sugarsoap_services_types import * from sugarcrm.sugarsoap_services import * | def open(self): super(sugarcrm_connector, self).open() from sugarcrm.sugarsoap_services_types import * from sugarcrm.sugarsoap_services import * loc = sugarsoapLocator(); request = loginRequest(); | 44fa23f0e9be8b03599759a14d4f3d6090e57f3a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/44fa23f0e9be8b03599759a14d4f3d6090e57f3a/sugarcrm_connector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
4672,
2240,
12,
87,
18481,
3353,
81,
67,
23159,
16,
365,
2934,
3190,
1435,
225,
1515,
273,
26178,
19215,
5786,
5621,
590,
273,
3925,
691,
5621,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
4672,
2240,
12,
87,
18481,
3353,
81,
67,
23159,
16,
365,
2934,
3190,
1435,
225,
1515,
273,
26178,
19215,
5786,
5621,
590,
273,
3925,
691,
5621,
2,
-100,
-100,
-100,
-100,... | |
self._restore(fsFile, realPath, | self._restore(fsFile, realPath, newTroveInfo, | def _singleTrove(self, repos, troveCs, changeSet, baseTrove, fsTrove, root, removalHints, flags): | 22f9a9101585ff5ecfc72cfcc17af08af913547a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/22f9a9101585ff5ecfc72cfcc17af08af913547a/update.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7526,
56,
303,
537,
12,
2890,
16,
13686,
16,
23432,
537,
14272,
16,
26104,
16,
1026,
56,
303,
537,
16,
2662,
56,
303,
537,
16,
1365,
16,
14817,
13368,
16,
2943,
4672,
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,
389,
7526,
56,
303,
537,
12,
2890,
16,
13686,
16,
23432,
537,
14272,
16,
26104,
16,
1026,
56,
303,
537,
16,
2662,
56,
303,
537,
16,
1365,
16,
14817,
13368,
16,
2943,
4672,
2,
-100,
-... |
worst_arr = np.array([i for (i,c,f) in worst_list], 'i') | worst_arr = np.array([j for (j,c,f) in worst_list], 'i') | #def DE2arr(func, lb, ub, itermax=1000, NP=100, F=0.8, Cr=0.5, strategy=(1, 1, 1, 1), constraints=None): | 46cbf0d3bbdebf5f16d2363e287678a73ce62d6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6196/46cbf0d3bbdebf5f16d2363e287678a73ce62d6c/de_oo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
536,
2030,
22,
5399,
12,
644,
16,
7831,
16,
13910,
16,
1400,
1896,
33,
18088,
16,
423,
52,
33,
6625,
16,
478,
33,
20,
18,
28,
16,
14998,
33,
20,
18,
25,
16,
6252,
28657,
21,
16,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
536,
2030,
22,
5399,
12,
644,
16,
7831,
16,
13910,
16,
1400,
1896,
33,
18088,
16,
423,
52,
33,
6625,
16,
478,
33,
20,
18,
28,
16,
14998,
33,
20,
18,
25,
16,
6252,
28657,
21,
16,
4... |
'--revision', revision, | def sendchange(branch, revision, username, master, configfile): """Send the change to buildbot to kick off the release automation""" cmd = [ 'buildbot', 'sendchange', '--username', username, '--master', master, '--branch', branch, '--revision', revision, '-p', 'release_config:mozilla/%s' % configfile, 'release_build' ] log.info("Executing: %s" % cmd) run_cmd(cmd) | bcd1a19d3fcb1f7ce62273ae637a60ab2502c500 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/bcd1a19d3fcb1f7ce62273ae637a60ab2502c500/release_sanity.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
3427,
12,
7500,
16,
6350,
16,
2718,
16,
4171,
16,
642,
768,
4672,
3536,
3826,
326,
2549,
358,
1361,
4819,
358,
23228,
3397,
326,
3992,
17539,
8395,
1797,
273,
306,
296,
3510,
4819,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
3427,
12,
7500,
16,
6350,
16,
2718,
16,
4171,
16,
642,
768,
4672,
3536,
3826,
326,
2549,
358,
1361,
4819,
358,
23228,
3397,
326,
3992,
17539,
8395,
1797,
273,
306,
296,
3510,
4819,... | |
security.declareProtected(ManageCollector, 'migrate_issue_workflow') | security.declareProtected(ManageCollector, 'migrate_issue_workflow_histories') | def register_issue_uids(self, RESPONSE=None): """ Issues imported through a .zexp file don't have UIDs anymore. They must be re-registered with the reference_catalog of AT. """ | 18564875fa2e4592a5a027e58419ff573d9ab274 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/18564875fa2e4592a5a027e58419ff573d9ab274/Collector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
67,
13882,
67,
21428,
12,
2890,
16,
20645,
33,
7036,
4672,
3536,
9310,
3610,
9101,
3059,
279,
263,
94,
2749,
585,
2727,
1404,
1240,
587,
5103,
16828,
18,
16448,
1297,
506,
283,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1744,
67,
13882,
67,
21428,
12,
2890,
16,
20645,
33,
7036,
4672,
3536,
9310,
3610,
9101,
3059,
279,
263,
94,
2749,
585,
2727,
1404,
1240,
587,
5103,
16828,
18,
16448,
1297,
506,
283,
17,... |
print >> sys.stderr, msg | print >> out, msg | def usage(code, msg=''): print >> sys.stderr, __doc__ % globals() if msg: print >> sys.stderr, msg sys.exit(code) | e25e6b825bd2ebd0cfbfe1c52c484ec6571c4ef5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/e25e6b825bd2ebd0cfbfe1c52c484ec6571c4ef5/pep2html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
12,
710,
16,
1234,
2218,
11,
4672,
1172,
1671,
2589,
18,
11241,
16,
1001,
2434,
972,
738,
10941,
1435,
309,
1234,
30,
1172,
1671,
596,
16,
1234,
2589,
18,
8593,
12,
710,
13,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4084,
12,
710,
16,
1234,
2218,
11,
4672,
1172,
1671,
2589,
18,
11241,
16,
1001,
2434,
972,
738,
10941,
1435,
309,
1234,
30,
1172,
1671,
596,
16,
1234,
2589,
18,
8593,
12,
710,
13,
565,... |
self._substructure_finder.set_n_sites( | self._substructure_finder.substructure_find_set_n_sites( | def _get_substructure_finder(self): if self._substructure_finder is None: self._substructure_finder = SubstructureFinder() | 89ebf7f6a97369e713f5185fab4b66b002a8bcd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3290/89ebf7f6a97369e713f5185fab4b66b002a8bcd8/XCrystal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1717,
7627,
67,
15356,
12,
2890,
4672,
309,
365,
6315,
1717,
7627,
67,
15356,
353,
599,
30,
365,
6315,
1717,
7627,
67,
15356,
273,
2592,
7627,
8441,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1717,
7627,
67,
15356,
12,
2890,
4672,
309,
365,
6315,
1717,
7627,
67,
15356,
353,
599,
30,
365,
6315,
1717,
7627,
67,
15356,
273,
2592,
7627,
8441,
1435,
2,
-100,
-100,
... |
remote.send("pong"); | remote.send("pong") | def slave(self): # Clip out the master host in the barrier, remove any # trailing local identifier following a #. This allows # multiple members per host which is particularly helpful # in testing. master = (self.members[0].split('#'))[0] | c3ee2a91e59f395d7cc1c6317bbd1faf77f611e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/c3ee2a91e59f395d7cc1c6317bbd1faf77f611e1/barrier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11735,
12,
2890,
4672,
468,
385,
3169,
596,
326,
4171,
1479,
316,
326,
24651,
16,
1206,
1281,
468,
7341,
1191,
2756,
3751,
279,
468,
18,
225,
1220,
5360,
468,
3229,
4833,
1534,
1479,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11735,
12,
2890,
4672,
468,
385,
3169,
596,
326,
4171,
1479,
316,
326,
24651,
16,
1206,
1281,
468,
7341,
1191,
2756,
3751,
279,
468,
18,
225,
1220,
5360,
468,
3229,
4833,
1534,
1479,
149... |
CopyAllFiles("built/lib/", STDTHIRDPARTY + pkg.lower() + "/lib/") | CopyAllFiles(PREFIX+"/lib/", STDTHIRDPARTY + pkg.lower() + "/lib/") | if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n" | aa9700942409f59dfc63d4542d0bad0a01230726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/aa9700942409f59dfc63d4542d0bad0a01230726/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
1125,
422,
296,
2124,
12904,
11,
4672,
2195,
273,
2195,
397,
6619,
318,
536,
315,
397,
498,
397,
1548,
82,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
1125,
422,
296,
2124,
12904,
11,
4672,
2195,
273,
2195,
397,
6619,
318,
536,
315,
397,
498,
397,
1548,
82,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.sendDataType = 0; self.sendOnChange = 1 self.sendPredictions = 0 self.sendSelection = 1 self.rbest = 0 | self.sendOnChange = 1 self.classes = [] self.selectedClasses = [] | def __init__(self, parent=None, signalManager = None): OWWidget.__init__(self, parent, signalManager, "Predictions") | 63e34d56e155a4f1aba288f36a71868771294735 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/63e34d56e155a4f1aba288f36a71868771294735/OWPredictions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
16,
4277,
1318,
273,
599,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
315,
20766,
87,
7923,
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,
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,
982,
33,
7036,
16,
4277,
1318,
273,
599,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
315,
20766,
87,
7923,
2,
-100,
-100,... |
print kwargs | def plot(self, bonds=False, **kwargs): import pylab | 33df799b08e3bc01756365d3d03df0b539fd3eaf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/33df799b08e3bc01756365d3d03df0b539fd3eaf/extras.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
12,
2890,
16,
15692,
33,
8381,
16,
2826,
4333,
4672,
1930,
2395,
7411,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
12,
2890,
16,
15692,
33,
8381,
16,
2826,
4333,
4672,
1930,
2395,
7411,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
tbl = skytools.fq_name(tbl) if tbl in subscriber_tables: self.log.info("Removing: %s" % tbl) self.subscriber_remove_one_table(tbl) else: self.log.info("Table %s already removed" % tbl) | tbls = self.get_subscriber_table_list(skytools.fq_name(tbl)) for tbl in tbls: if tbl in subscriber_tables: self.log.info("Removing: %s" % tbl) self.subscriber_remove_one_table(tbl) else: self.log.info("Table %s already removed" % tbl) | def subscriber_remove_tables(self, table_list): subscriber_tables = self.get_subscriber_table_list() if not table_list and self.options.all: table_list = subscriber_tables for tbl in table_list: tbl = skytools.fq_name(tbl) if tbl in subscriber_tables: self.log.info("Removing: %s" % tbl) self.subscriber_remove_one_table(tbl) else: self.log.info("Table %s already removed" % tbl) | 284fa9a4cbf1e2c69ebf17bbe3a4fd6ace8a2e18 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14597/284fa9a4cbf1e2c69ebf17bbe3a4fd6ace8a2e18/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9467,
67,
4479,
67,
9373,
12,
2890,
16,
1014,
67,
1098,
4672,
9467,
67,
9373,
273,
365,
18,
588,
67,
26410,
67,
2121,
67,
1098,
1435,
309,
486,
1014,
67,
1098,
471,
365,
18,
2116,
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,
9467,
67,
4479,
67,
9373,
12,
2890,
16,
1014,
67,
1098,
4672,
9467,
67,
9373,
273,
365,
18,
588,
67,
26410,
67,
2121,
67,
1098,
1435,
309,
486,
1014,
67,
1098,
471,
365,
18,
2116,
18... |
colorB = r.floatPrimVar( ipe.B() ) self.assert_( ( V3f( colorR, colorG, colorB ) - V3f( 0.5 - 1./1024, 0.5 - 1./512, 0.0 ) ).length() < 1.e-3 ) foundClosest = ipe.closestPoint( V3f( -256, 128, 0 ), r ) | colorB = r.floatPrimVar( ipe.B() ) self.assert_( ( V3f( colorR, colorG, colorB ) - V3f( 0.5, 0.5, 0.0 ) ).length() < 1.e-3 ) foundClosest = ipe.closestPoint( V3f( -256, 127.5, 0 ), r ) | def testSimpleImage( self ) : """ Test ImagePrimitiveEvaluator with simple gradient""" random.seed( 1 ) # Get an image which goes from black to red in the ascending X direction, # and from black to green in the ascending Y direction, and check that # its oriented correctly. reader = Reader.create( "test/IECore/data/exrFiles/uvMap.512x256.exr" ) img = reader.read() ipe = PrimitiveEvaluator.create( img ) self.assert_( ipe.isInstanceOf( "ImagePrimitiveEvaluator" ) ) self.assert_( ipe.R() ) self.assert_( ipe.G() ) self.assert_( ipe.B() ) self.failIf( ipe.A() ) self.assertEqual( ipe.surfaceArea(), 2 * 512 * 256 ) self.assertEqual( ipe.volume(), 0.0 ) self.assertEqual( ipe.centerOfGravity(), V3f( 0, 0, 0 ) ) r = ipe.createResult() foundClosest = ipe.closestPoint( V3f( 0, 0, 0 ), r ) self.assert_( foundClosest ) self.assertEqual( r.uv(), V2f( 0.5, 0.5 ) ) self.assertEqual( r.normal(), V3f( 0.0, 0.0, 1.0 ) ) colorR = r.floatPrimVar( ipe.R() ) colorG = r.floatPrimVar( ipe.G() ) colorB = r.floatPrimVar( ipe.B() ) self.assert_( ( V3f( colorR, colorG, colorB ) - V3f( 0.5 - 1./1024, 0.5 - 1./512, 0.0 ) ).length() < 1.e-3 ) foundClosest = ipe.closestPoint( V3f( -256, 128, 0 ), r ) self.assert_( foundClosest ) self.assertEqual( r.uv(), V2f( 0.0, 1.0 ) ) self.assertEqual( r.normal(), V3f( 0.0, 0.0, 1.0 ) ) colorR = r.floatPrimVar( ipe.R() ) colorG = r.floatPrimVar( ipe.G() ) colorB = r.floatPrimVar( ipe.B() ) self.assertEqual( Color3f( colorR, colorG, colorB ), Color3f( 0.0, 1.0, 0.0 ) ) foundClosest = ipe.closestPoint( V3f( 256, -128, 0 ), r ) self.assert_( foundClosest ) self.assertEqual( r.uv(), V2f( 1.0, 0.0 ) ) self.assertEqual( r.normal(), V3f( 0.0, 0.0, 1.0 ) ) colorR = r.floatPrimVar( ipe.R() ) colorG = r.floatPrimVar( ipe.G() ) colorB = r.floatPrimVar( ipe.B() ) self.assertEqual( Color3f( colorR, colorG, colorB ), Color3f( 1.0, 0.0, 0.0 ) ) foundClosest = ipe.closestPoint( V3f( 256, 128, 0 ), r ) self.assert_( foundClosest ) self.assertEqual( r.uv(), V2f( 1.0, 1.0 ) ) self.assertEqual( r.normal(), V3f( 0.0, 0.0, 1.0 ) ) colorR = r.floatPrimVar( ipe.R() ) colorG = r.floatPrimVar( ipe.G() ) colorB = r.floatPrimVar( ipe.B() ) self.assertEqual( Color3f( colorR, colorG, colorB ), Color3f( 1.0, 1.0, 0.0 ) ) found = ipe.pointAtPixel( V2i( 511, 255 ), r ) self.assert_( found ) self.assertEqual( r.pixel(), V2i( 511, 255 ) ) self.assertEqual( r.uv(), V2f( 1.0, 1.0 ) ) self.assertEqual( r.normal(), V3f( 0.0, 0.0, 1.0 ) ) colorR = r.floatPrimVar( ipe.R() ) colorG = r.floatPrimVar( ipe.G() ) colorB = r.floatPrimVar( ipe.B() ) self.assertEqual( Color3f( colorR, colorG, colorB ), Color3f( 1.0, 1.0, 0.0 ) ) # Check that red ascends over X randomY = int( random.uniform ( 0, 255 ) ) lastR = None for x in range( 0, 512 ): found = ipe.pointAtPixel( V2i( x, randomY ), r ) self.assert_( found ) if lastR : self.assert_( r.floatPrimVar( ipe.R() ) > lastR ) else : lastR = r.floatPrimVar( ipe.R() ) # Check that green ascends over Y randomX = int( random.uniform ( 0, 511 ) ) lastG = None for y in range( 0, 256 ): found = ipe.pointAtPixel( V2i( randomX, y ), r ) self.assert_( found ) if lastG : self.assert_( r.floatPrimVar( ipe.G() ) > lastG ) else : lastG = r.floatPrimVar( ipe.G() ) | 58fb77e98f3635e6cbde51fe2007926b7d5d0fd4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/58fb77e98f3635e6cbde51fe2007926b7d5d0fd4/ImagePrimitiveEvaluator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5784,
2040,
12,
365,
262,
294,
3536,
7766,
3421,
9840,
15876,
598,
4143,
10292,
8395,
225,
2744,
18,
12407,
12,
404,
262,
225,
468,
968,
392,
1316,
1492,
13998,
628,
7721,
358,
175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5784,
2040,
12,
365,
262,
294,
3536,
7766,
3421,
9840,
15876,
598,
4143,
10292,
8395,
225,
2744,
18,
12407,
12,
404,
262,
225,
468,
968,
392,
1316,
1492,
13998,
628,
7721,
358,
175... |
return data | return File.StringHandle(data) | def __getitem__(self, key): """Retrieve an item from the indexed file. """ data = self._search[key] # run the data through the parser if one is specified if self._parser is not None: return self._parser.parse(File.StringHandle(data)) | f3cb1d095cc82799ffe4add64a377c003cdd2310 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/f3cb1d095cc82799ffe4add64a377c003cdd2310/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
3536,
5767,
392,
761,
628,
326,
8808,
585,
18,
3536,
501,
273,
365,
6315,
3072,
63,
856,
65,
225,
468,
1086,
326,
501,
3059,
326,
2082,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
3536,
5767,
392,
761,
628,
326,
8808,
585,
18,
3536,
501,
273,
365,
6315,
3072,
63,
856,
65,
225,
468,
1086,
326,
501,
3059,
326,
2082,
309,
... |
self.done[url].append(origin) | if origin not in self.done[url]: self.done[url].append(origin) | def newdonelink(self, url, origin): self.done[url].append(origin) | 5445e352b244db461527b895255328eaa1a7dc6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5445e352b244db461527b895255328eaa1a7dc6f/wcnew.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
19752,
27269,
12,
2890,
16,
880,
16,
4026,
4672,
365,
18,
8734,
63,
718,
8009,
6923,
12,
10012,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
19752,
27269,
12,
2890,
16,
880,
16,
4026,
4672,
365,
18,
8734,
63,
718,
8009,
6923,
12,
10012,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.templates = templates() | self.templates = Templates() | def __init__(self, kernelversion): self.config = ConfigReader() self.templates = templates() self.kernelversion = kernelversion | 136c33d961d0ff02562a22ebb9d444eca0f3f543 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5794/136c33d961d0ff02562a22ebb9d444eca0f3f543/gencontrol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5536,
1589,
4672,
365,
18,
1425,
273,
1903,
2514,
1435,
365,
18,
8502,
273,
26212,
1435,
365,
18,
8111,
1589,
273,
5536,
1589,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5536,
1589,
4672,
365,
18,
1425,
273,
1903,
2514,
1435,
365,
18,
8502,
273,
26212,
1435,
365,
18,
8111,
1589,
273,
5536,
1589,
2,
-100,
-100,
-100,
-100,
... |
Y = [n for n in X if not (n in self.__coefficients.keys())] | Y = [n for n in X if not (n in self.__coefficients.keys())] | def coefficients(self, X): """ The coefficients a_n of self, for integers n>=0 in the list X. | f9fb1a64c34d6355e6ab054e3c07cff20c82fcc0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/f9fb1a64c34d6355e6ab054e3c07cff20c82fcc0/element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14229,
12,
2890,
16,
1139,
4672,
3536,
1021,
14229,
279,
67,
82,
434,
365,
16,
364,
12321,
290,
34,
33,
20,
316,
326,
666,
1139,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14229,
12,
2890,
16,
1139,
4672,
3536,
1021,
14229,
279,
67,
82,
434,
365,
16,
364,
12321,
290,
34,
33,
20,
316,
326,
666,
1139,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.doclist.Delete(updated_acl_entry.GetEditLink().href) | self.editClient.Delete(updated_acl_entry.GetEditLink().href) | def testCreateAndUpdateAndDeleteAcl(self): # Add new ACL scope = gdata.docs.Scope(value=self.EMAIL, type=self.SCOPE_TYPE) role = gdata.docs.Role(value=self.ROLE_VALUE) | 76de6e666a2dc6ba3f703b89b870266619bcabd4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10620/76de6e666a2dc6ba3f703b89b870266619bcabd4/service_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1684,
1876,
1891,
1876,
2613,
13538,
12,
2890,
4672,
468,
1436,
394,
10098,
2146,
273,
314,
892,
18,
8532,
18,
3876,
12,
1132,
33,
2890,
18,
14686,
16,
618,
33,
2890,
18,
19444,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1684,
1876,
1891,
1876,
2613,
13538,
12,
2890,
4672,
468,
1436,
394,
10098,
2146,
273,
314,
892,
18,
8532,
18,
3876,
12,
1132,
33,
2890,
18,
14686,
16,
618,
33,
2890,
18,
19444,
... |
The combinatorial class of all of the subsets of size k of a multiset s. Note that each subset is represented by a list of the elements rather than a set since we can have multiplicities (no multiset data structure yet in | The combinatorial class of the subsets of size k of a multiset s. Note that each subset is represented by a list of the elements rather than a set since we can have multiplicities (no multiset data structure yet in | def iterator(self): """ Iterate through the subsets of the multiset ``self._s``. Note that each subset is represented by a list of its elements rather than a set since we can have multiplicities (no multiset data structure yet in sage). | ecce0130e3c3f48b019825889b4a6c40b64059ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/ecce0130e3c3f48b019825889b4a6c40b64059ff/subset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2775,
12,
2890,
4672,
3536,
11436,
3059,
326,
30760,
434,
326,
22945,
278,
12176,
2890,
6315,
87,
68,
8338,
225,
3609,
716,
1517,
7931,
353,
10584,
635,
279,
666,
434,
2097,
2186,
9178,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2775,
12,
2890,
4672,
3536,
11436,
3059,
326,
30760,
434,
326,
22945,
278,
12176,
2890,
6315,
87,
68,
8338,
225,
3609,
716,
1517,
7931,
353,
10584,
635,
279,
666,
434,
2097,
2186,
9178,
... |
if not isspecific(mypkgdep[1:]): | if not isspecific(mypkgdep[2:]): | def dep_depreduce(mypkgdep): if mypkgdep[0]=="!": if isinstalled(mypkgdep[1:]): return 0 else: return 1 elif mypkgdep[0]=="=": if isspecific(mypkgdep[1:]): if isinstalled(mypkgdep[1:]): return 1 else: return 0 else: return None elif mypkgdep[0:2]==">=": if not isspecific(mypkgdep[2:]): return None if isinstalled(getgeneral(mypkgdep[2:])): if installedcmp(mypkgdep[2:])<=0: return 1 return 0 elif mypkgdep[0:2]=="<=": if not isspecific(mypkgdep[2:]): return None if isinstalled(getgeneral(mypkgdep[2:])): if installedcmp(mypkgdep[2:])>=0: return 1 return 0 elif mypkgdep[0]=="<": if not isspecific(mypkgdep[1:]): return None if isinstalled(getgeneral(mypkgdep[1:])): if installedcmp(mypkgdep[1:])>0: return 1 return 0 elif mypkgdep[0]==">": if not isspecific(mypkgdep[1:]): return None if isinstalled(getgeneral(mypkgdep[1:])): if installedcmp(mypkgdep[1:])<0: return 1 return 0 if not isspecific(mypkgdep): if isinstalled(mypkgdep): return 1 else: return 0 else: return None | 89268f330fdfe435c9ad2ced21f6552bdacff1f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/89268f330fdfe435c9ad2ced21f6552bdacff1f2/portage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5993,
67,
323,
6510,
3965,
12,
81,
879,
14931,
15037,
4672,
309,
312,
879,
14931,
15037,
63,
20,
65,
31713,
4442,
30,
309,
353,
13435,
12,
81,
879,
14931,
15037,
63,
21,
26894,
4672,
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,
5993,
67,
323,
6510,
3965,
12,
81,
879,
14931,
15037,
4672,
309,
312,
879,
14931,
15037,
63,
20,
65,
31713,
4442,
30,
309,
353,
13435,
12,
81,
879,
14931,
15037,
63,
21,
26894,
4672,
3... |
if furthestBlock.parent: furthestBlock.parent.removeChild(furthestBlock) | def endTagFormatting(self, token): """The much-feared adoption agency algorithm""" # http://www.whatwg.org/specs/web-apps/current-work/#adoptionAgency # XXX Better parseError messages appreciated. name = token["name"] while True: # Step 1 paragraph 1 afeElement = self.tree.elementInActiveFormattingElements( token["name"]) if not afeElement or (afeElement in self.tree.openElements and not self.tree.elementInScope(afeElement.name)): self.parser.parseError("adoption-agency-1.1", {"name": token["name"]}) return | 7e7686e91270f27c65b22567b65f62d9d143d444 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4487/7e7686e91270f27c65b22567b65f62d9d143d444/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
23974,
12,
2890,
16,
1147,
4672,
3536,
1986,
9816,
17,
3030,
2258,
1261,
3482,
1737,
2075,
4886,
8395,
468,
1062,
2207,
5591,
18,
23770,
18197,
18,
3341,
19,
15115,
19,
4875,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
23974,
12,
2890,
16,
1147,
4672,
3536,
1986,
9816,
17,
3030,
2258,
1261,
3482,
1737,
2075,
4886,
8395,
468,
1062,
2207,
5591,
18,
23770,
18197,
18,
3341,
19,
15115,
19,
4875,
17,
... | |
value += self._safe_read(amt) | value.append(self._safe_read(amt)) | def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = '' | 469e40b614d390891d1b038fd22295ac6951dbcd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/469e40b614d390891d1b038fd22295ac6951dbcd/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
67,
6551,
329,
12,
2890,
16,
25123,
4672,
1815,
365,
18,
6551,
329,
480,
389,
14737,
2441,
67,
4482,
273,
365,
18,
6551,
67,
4482,
460,
273,
875,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
67,
6551,
329,
12,
2890,
16,
25123,
4672,
1815,
365,
18,
6551,
329,
480,
389,
14737,
2441,
67,
4482,
273,
365,
18,
6551,
67,
4482,
460,
273,
875,
2,
-100,
-100,
-100,
-100,
... |
raise 'FATAL', '(param, l) = %r' % ((param, l),) | raise ValueError('(param, l) = %r' % ((param, l),)) | def _compute_len(param): mant, l = math.frexp(float(param)) bitmask = 1 << l if bitmask <= param: raise 'FATAL', '(param, l) = %r' % ((param, l),) while l: bitmask = bitmask >> 1 if param & bitmask: break l = l - 1 return l | 3cd6537beb7df1831fcd7cfdc6d74616648feddf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/3cd6537beb7df1831fcd7cfdc6d74616648feddf/bitvec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
1897,
12,
891,
4672,
20414,
16,
328,
273,
4233,
18,
74,
266,
23829,
12,
5659,
12,
891,
3719,
24941,
273,
404,
2296,
328,
309,
24941,
1648,
579,
30,
1002,
2068,
2668,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
1897,
12,
891,
4672,
20414,
16,
328,
273,
4233,
18,
74,
266,
23829,
12,
5659,
12,
891,
3719,
24941,
273,
404,
2296,
328,
309,
24941,
1648,
579,
30,
1002,
2068,
2668,
12,... |
if value: | if value is not None: | def login(self, request, user_obj, **kw): username = kw.get('username') password = kw.get('password') _ = request.getText | 25fa76333278694ff3c9e08daea6542b6d801afc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/25fa76333278694ff3c9e08daea6542b6d801afc/ldap_login.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
2890,
16,
590,
16,
729,
67,
2603,
16,
2826,
9987,
4672,
2718,
273,
5323,
18,
588,
2668,
5053,
6134,
2201,
273,
5323,
18,
588,
2668,
3664,
6134,
389,
273,
590,
18,
588,
1528,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3925,
12,
2890,
16,
590,
16,
729,
67,
2603,
16,
2826,
9987,
4672,
2718,
273,
5323,
18,
588,
2668,
5053,
6134,
2201,
273,
5323,
18,
588,
2668,
3664,
6134,
389,
273,
590,
18,
588,
1528,
... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 920) else quickfix.DoubleField.__init__(self, 920, 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,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
2468,
3462,
13,
469,
9549,
904,
18,
5265,
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,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
2468,
3462,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... |
aid = request.POST['id'] | aid = int(request.POST['id']) | def program_makeaclass(request, tl, one, two, module, extra, prog): """ Create a new class """ from esp.web.views import program for thing in ['title', 'class_info', 'class_size_min', 'class_size_max', 'grade_min', 'grade_max', 'Time']: if not request.POST.has_key(thing) or request.POST[thing] == None or request.POST[thing] == 'None' or request.POST[thing].strip() == "": return program(request, tl, one, two, "teacherreg", extra = "oops") if request.POST.has_key('id'): aid = request.POST['id'] else: aid = None if aid is None: cobj = Class() else: theclass = Class.objects.filter(id=aid) if theclass == [] or theclass is None: cobj = Class() else: cobj = theclass[0] title = request.POST['title'] try: cobj.grade_max = int(request.POST["grade_max"]) except ValueError: cobj.grade_max = None cobj.grade_min = int(request.POST["grade_min"]) cobj.class_size_min = int(request.POST['class_size_min']) cobj.class_size_max = int(request.POST['class_size_max']) cobj.class_info = request.POST['class_info'] cobj.message_for_directors = request.POST['message_for_directors'] cobj.parent_program = prog cobj.anchor = prog.anchor.tree_create(['Classes', "".join(title.split(" "))]) cobj.anchor.friendly_name = title cobj.anchor.save() time_sets = [] for id in request.POST.getlist('Time'): for x in DataTree.objects.filter(id=int(id)): time_sets.append(x) if len(time_sets) == 0: assert False, "Error: Invalid time_set : " + str(time_sets) + ' ' + str(request.POST['Time']) #cobj.event_template = time_sets[0] v = GetNode( 'V/Administer/Edit') ub = UserBit() ub.user = request.user ub.qsc = cobj.anchor ub.verb = v ub.save() #TimeSlot cat = ClassCategories.objects.filter(id=request.POST['Category'])[0] cobj.category = cat cobj.enrollment = 0 cobj.save() cobj.viable_times.clear() for t in time_sets: cobj.viable_times.add(t) cobj.save() return render_to_response('program/registered', {'request': request, 'logged_in': request.user.is_authenticated(), 'navbar_list': makeNavBar(request.user, prog.anchor), 'preload_images': preload_images}) | e9ff1768939587e6184a8ecdbe4a486bba5ef152 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12041/e9ff1768939587e6184a8ecdbe4a486bba5ef152/program.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5402,
67,
6540,
1077,
459,
12,
2293,
16,
8332,
16,
1245,
16,
2795,
16,
1605,
16,
2870,
16,
11243,
4672,
3536,
1788,
279,
394,
667,
3536,
628,
5001,
84,
18,
4875,
18,
7061,
1930,
5402,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5402,
67,
6540,
1077,
459,
12,
2293,
16,
8332,
16,
1245,
16,
2795,
16,
1605,
16,
2870,
16,
11243,
4672,
3536,
1788,
279,
394,
667,
3536,
628,
5001,
84,
18,
4875,
18,
7061,
1930,
5402,
... |
cmd_opts[command] = ("command line", value) | cmd_opts[name] = ("command line", value) | def _parse_command_opts (self, parser, args): | 474607777d10562679b1640d3831290b0c4284f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/474607777d10562679b1640d3831290b0c4284f7/dist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
3076,
67,
4952,
261,
2890,
16,
2082,
16,
833,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
3076,
67,
4952,
261,
2890,
16,
2082,
16,
833,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def debugprint(r, prefix='', depth=-1, done=None, print_type=False, file=sys.stdout): | def debugprint(r, prefix='', depth=-1, done=None, print_type=False, file=sys.stdout, print_destroy_map=False, print_view_map=False): | def debugprint(r, prefix='', depth=-1, done=None, print_type=False, file=sys.stdout): """Print the graph leading to `r` to given depth. :param r: Variable instance :param prefix: prefix to each line (typically some number of spaces) :param depth: maximum recursion depth (Default -1 for unlimited). :param done: set of Apply instances that have already been printed :param print_type: wether to print the Variable type after the other infos :param file: file-like object to which to print """ if depth==0: return if done is None: done = set() if print_type: type_str = ' <%s>' % r.type else: type_str = '' if hasattr(r.owner, 'op'): # this variable is the output of computation, # so just print out the apply a = r.owner r_name = getattr(r, 'name', '') # normally if the name isn't set, it'll be None, so # r_name == None here if r_name is None: r_name = '' if len(a.outputs) == 1: print >> file, '%s%s [@%i]%s \'%s\'' % (prefix, a.op, id(r), \ type_str, r_name) else: print >> file, '%s%s.%i [@%i]%s \'%s\'' % (prefix, a.op, \ a.outputs.index(r), id(r), type_str, r_name) if id(a) not in done: done.add(id(a)) for i in a.inputs: debugprint(i, prefix+' |', depth=depth-1, done=done, print_type=print_type, file=file) else: #this is a variable print >> file, '%s%s [@%i]%s' % (prefix, r, id(r), type_str) return file | 7097093a880acaefd4ef7d83fa2b08e39ff7faf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/7097093a880acaefd4ef7d83fa2b08e39ff7faf0/debugmode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
1188,
12,
86,
16,
1633,
2218,
2187,
3598,
29711,
21,
16,
2731,
33,
7036,
16,
1172,
67,
723,
33,
8381,
16,
585,
33,
9499,
18,
10283,
16,
1172,
67,
11662,
67,
1458,
33,
8381,
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,
1198,
1188,
12,
86,
16,
1633,
2218,
2187,
3598,
29711,
21,
16,
2731,
33,
7036,
16,
1172,
67,
723,
33,
8381,
16,
585,
33,
9499,
18,
10283,
16,
1172,
67,
11662,
67,
1458,
33,
8381,
16,... |
self["key_green"].setText(_("Undo\nInstall")) | self["key_green"].setText(_("Undo install")) | def selectionChanged(self): current = self["list"].getCurrent() self["status"].setText("") if current: if self.currList == "packages": self["key_red"].setText(_("Back")) if current[4] == 'installed': self["key_green"].setText(_("Remove")) elif current[4] == 'installable': self["key_green"].setText(_("Install")) elif current[4] == 'remove': self["key_green"].setText(_("Undo\nRemove")) elif current[4] == 'install': self["key_green"].setText(_("Undo\nInstall")) self["key_yellow"].setText(_("View details")) self["key_blue"].setText("") if len(self.selectedFiles) == 0 and self.available_updates is not 0: self["status"].setText(_("There are at least ") + str(self.available_updates) + _(" updates available.")) elif len(self.selectedFiles) is not 0: self["status"].setText(str(len(self.selectedFiles)) + _(" packages selected.")) else: self["status"].setText(_("There is nothing to be done.")) elif self.currList == "category": self["key_red"].setText(_("Close")) self["key_green"].setText("") self["key_yellow"].setText("") self["key_blue"].setText("") if len(self.selectedFiles) == 0 and self.available_updates is not 0: self["status"].setText(_("There are at least ") + str(self.available_updates) + _(" updates available.")) self["key_yellow"].setText(_("Update")) elif len(self.selectedFiles) is not 0: self["status"].setText(str(len(self.selectedFiles)) + _(" packages selected.")) self["key_yellow"].setText(_("Process")) else: self["status"].setText(_("There is nothing to be done.")) | 018534fa7bf9be0885b2ffc753d8d6fc5b56143c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/018534fa7bf9be0885b2ffc753d8d6fc5b56143c/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4421,
5033,
12,
2890,
4672,
783,
273,
365,
9614,
1098,
6,
8009,
588,
3935,
1435,
365,
9614,
2327,
6,
8009,
542,
1528,
2932,
7923,
309,
783,
30,
309,
365,
18,
17016,
682,
422,
315,
1030... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4421,
5033,
12,
2890,
4672,
783,
273,
365,
9614,
1098,
6,
8009,
588,
3935,
1435,
365,
9614,
2327,
6,
8009,
542,
1528,
2932,
7923,
309,
783,
30,
309,
365,
18,
17016,
682,
422,
315,
1030... |
username=quote(username) | username=_quote(username) | def _make_response(self,charset,realms,nonce): """Make a response for the first challenge from the server. | 1e1db4225095c220966b09e2e9bd16f3ebaf7760 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/1e1db4225095c220966b09e2e9bd16f3ebaf7760/digest_md5.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
2740,
12,
2890,
16,
9999,
16,
7688,
959,
16,
12824,
4672,
3536,
6464,
279,
766,
364,
326,
1122,
12948,
628,
326,
1438,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
2740,
12,
2890,
16,
9999,
16,
7688,
959,
16,
12824,
4672,
3536,
6464,
279,
766,
364,
326,
1122,
12948,
628,
326,
1438,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
d['usepty'] = 0 | def get_default_options(slavename): d = {'slavename': quote_option(slavename)} header = DEFAULT_HEADER footer = DEFAULT_FOOTER basedir = None buildmaster_host = None if 'moz2' in slavename or 'xserve' in slavename or 'try-' in slavename or \ slavename.startswith('win32') or slavename.startswith('mw32'): if 'try-' in slavename: buildmaster_host = TRY_BUILDMASTER d['port'] = 9982 else: buildmaster_host = BUILD_BUILDMASTER if 'linux' in slavename or 'darwin9' in slavename or \ 'xserve' in slavename or 'mac' in slavename: basedir = '/builds/slave' elif 'win32' in slavename or 'mw32' in slavename: basedir = 'e:\\builds\\moz2_slave' elif 'talos' in slavename or '-try' in slavename: buildmaster_host = TALOS_BUILDMASTER footer = TALOS_FOOTER if '-try' in slavename: d['port'] = 9011 if 'r3' in slavename: d['port'] = 9012 d['usepty'] = 0 if 'linux' in slavename or 'ubuntu' in slavename or 'fed' in slavename: basedir = '/home/cltbld/talos-slave' elif 'tiger' in slavename or 'leopard' in slavename or \ 'snow' in slavename: basedir = '/Users/cltbld/talos-slave' elif 'xp' in slavename or 'w7' in slavename: basedir = 'C:\\talos-slave' # quote_option will throw if defaults couldn't be found for either of these # These are processed separately because they should be unset if a default # wasn't found. try: d['buildmaster_host'] = quote_option(buildmaster_host) except TypeError: # Don't error out, because missing values may have been passed to # the program pass try: d['basedir'] = quote_option(basedir, raw=True) except TypeError: pass return d, header, footer | 5447d59900d55f771a33ee2259a4a8f049101df5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/5447d59900d55f771a33ee2259a4a8f049101df5/buildbot-tac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1886,
67,
2116,
12,
2069,
842,
1069,
4672,
302,
273,
13666,
2069,
842,
1069,
4278,
3862,
67,
3482,
12,
2069,
842,
1069,
16869,
1446,
273,
3331,
67,
7557,
9860,
273,
3331,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1886,
67,
2116,
12,
2069,
842,
1069,
4672,
302,
273,
13666,
2069,
842,
1069,
4278,
3862,
67,
3482,
12,
2069,
842,
1069,
16869,
1446,
273,
3331,
67,
7557,
9860,
273,
3331,
67,
... | |
checked_deps = set([]) | checked_deps = {} | def runtest(self): | fdaf4c739372bb2a573823fa0779dc82dc60ac67 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7392/fdaf4c739372bb2a573823fa0779dc82dc60ac67/testdistcc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
def build_index(directory, labels): | def build_index(directory, x_labels, y_labels): | def build_index(directory, labels): utils.trace("Creating report index ...") html_path = os.path.join(directory, 'index.html') template = pagetemplatefile.PageTemplateFile('label.pt') open(html_path, 'w').write(template(labels=labels)) utils.trace("done: \n") utils.trace("file://%s\n" % html_path) return html_path | 75dc54f059b4cc18b4f9732a1256f97f54a02006 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9007/75dc54f059b4cc18b4f9732a1256f97f54a02006/label.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
1615,
12,
5149,
16,
619,
67,
5336,
16,
677,
67,
5336,
4672,
2990,
18,
5129,
2932,
11092,
2605,
770,
1372,
7923,
1729,
67,
803,
273,
1140,
18,
803,
18,
5701,
12,
5149,
16,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
1615,
12,
5149,
16,
619,
67,
5336,
16,
677,
67,
5336,
4672,
2990,
18,
5129,
2932,
11092,
2605,
770,
1372,
7923,
1729,
67,
803,
273,
1140,
18,
803,
18,
5701,
12,
5149,
16,
2... |
return http.Response(stream = s) | return HTMLResponse(stream = s) | def render(self, ctx): id = self.id(ctx) W = self.worksheet if len(W.compute_cell_id_list()) <= 1: s = 'ignore' else: prev_id = W.delete_cell_with_id(id) s = encode_list(['delete', id, prev_id, W.cell_id_list()]) return http.Response(stream = s) | 5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
612,
273,
365,
18,
350,
12,
5900,
13,
678,
273,
365,
18,
1252,
8118,
309,
562,
12,
59,
18,
9200,
67,
3855,
67,
350,
67,
1098,
10756,
1648,
404,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
612,
273,
365,
18,
350,
12,
5900,
13,
678,
273,
365,
18,
1252,
8118,
309,
562,
12,
59,
18,
9200,
67,
3855,
67,
350,
67,
1098,
10756,
1648,
404,
30,
... |
if dia.query == 'asheesh@asheesh.org': | if username == 'asheesh@asheesh.org': | def get_info_for_launchpad_username(username): """This figures out what the named person has been involved with. It returns a dictionary like this: { 'F-Spot': { 'url': 'http://launchpad.net/f-spot', 'involvement_types': ['Bug Management', 'Bazaar Branches'], 'languages' : ['python', 'shell script'] } } """ if dia.query == 'paulproteus': time.sleep(random.randrange(0, 2)) return {'CtrlProxy': {'involvement_types': set(['Bug Management']), 'languages': ['C'], 'url': 'https://launchpad.net/ctrlproxy'}, 'Makesad networks runs rose.makesad.us and perhaps other things': {'involvement_types': set(['Bug Management']), 'languages': [], 'url': 'https://launchpad.net/rose'}, 'Ubuntu': {'involvement_types': set(['Bug Management', 'Soyuz']), 'languages': [], 'url': 'https://launchpad.net/ubuntu'}, 'Web Team projects': {'involvement_types': set(['Bug Management']), 'languages': [], 'url': 'https://launchpad.net/web'}, 'django-openid-auth': {'involvement_types': set(['Bazaar Branches']), 'languages': ['Python'], 'url': 'https://launchpad.net/django-openid-auth'}} if dia.query == 'asheesh@asheesh.org': time.sleep(random.randrange(0, 2)) return {} try: b = mechanize_get('https://launchpad.net/~%s' % urllib.quote(username)) except urllib2.HTTPError, e: if str(e.code) == '404': return {} else: raise # not a 404? Bubble-up the explosion. doc = b.response().read() doc_u = unicode(doc, 'utf-8') tree = lxml.html.document_fromstring(doc_u) ret = {} # Expecting html like this: # <table class='contributions'> # <tr> # ... # <img title='Bug Management' /> for row in tree.cssselect('.contributions tr'): project_link = row.cssselect('a')[0] project_name = project_link.text_content().strip() project_url_relative = project_link.attrib['href'] project_url = urlparse.urljoin(b.geturl(), project_url_relative) involvement_types = [i.attrib.get('title', '').strip() for i in row.cssselect('img')] languages = project2languages(project_url) ret[project_name] = { 'involvement_types': set([k for k in involvement_types if k]), 'url': project_url, 'languages': languages } return ret | c167ebd910ce4bc64bda175ec0eefcbfc0744459 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/c167ebd910ce4bc64bda175ec0eefcbfc0744459/lp_grabber.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1376,
67,
1884,
67,
20738,
6982,
67,
5053,
12,
5053,
4672,
3536,
2503,
4291,
1823,
596,
4121,
326,
4141,
6175,
711,
2118,
24589,
598,
18,
2597,
1135,
279,
3880,
3007,
333,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1376,
67,
1884,
67,
20738,
6982,
67,
5053,
12,
5053,
4672,
3536,
2503,
4291,
1823,
596,
4121,
326,
4141,
6175,
711,
2118,
24589,
598,
18,
2597,
1135,
279,
3880,
3007,
333,
30,
... |
f.write(text) | f.write(text.encode('utf-8')) | def _do_wiki_export(self, page, filename=''): data = self.db_query("SELECT text FROM wiki WHERE name=%s " "ORDER BY version DESC LIMIT 1", params=[page]) text = data.next()[0] if not filename: print text else: if os.path.isfile(filename): raise Exception("File '%s' exists" % filename) f = open(filename,'w') f.write(text) f.close() | 24819e6c1057eabf2301a2db7a1429a29397de8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/24819e6c1057eabf2301a2db7a1429a29397de8f/admin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
13044,
67,
6530,
12,
2890,
16,
1363,
16,
1544,
2218,
11,
4672,
501,
273,
365,
18,
1966,
67,
2271,
2932,
4803,
977,
4571,
9050,
4852,
508,
5095,
87,
315,
315,
7954,
6953,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2896,
67,
13044,
67,
6530,
12,
2890,
16,
1363,
16,
1544,
2218,
11,
4672,
501,
273,
365,
18,
1966,
67,
2271,
2932,
4803,
977,
4571,
9050,
4852,
508,
5095,
87,
315,
315,
7954,
6953,... |
raise Exception('No working themes found in "/usr/share/dockbarx/themes" or "~/.dockbarx/themes"') | md = gtk.MessageDialog(None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, 'No working themes found in "/usr/share/dockbarx/themes" or "~/.dockbarx/themes"') md.run() md.destroy() sys.exit(1) | def find_themes(self): # Reads the themes from /usr/share/dockbarx/themes and ~/.dockbarx/themes # and returns a dict of the theme names and paths so that # a theme can be loaded themes = {} theme_paths = [] dirs = ["/usr/share/dockbarx/themes", self.dockbar_folder+"/themes"] for dir in dirs: if os.path.exists(dir): for f in os.listdir(dir): if f[-7:] == '.tar.gz': theme_paths.append(dir+"/"+f) for theme_path in theme_paths: name = Theme.check(theme_path) if name != None: name = str(name) themes[name] = theme_path if not themes: raise Exception('No working themes found in "/usr/share/dockbarx/themes" or "~/.dockbarx/themes"') return themes | f61cda18cfa3774cf24c7f1b53e09da9de0c4691 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7075/f61cda18cfa3774cf24c7f1b53e09da9de0c4691/dockbarx.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
17328,
12,
2890,
4672,
468,
29185,
326,
15455,
628,
342,
13640,
19,
14419,
19,
72,
975,
3215,
92,
19,
17328,
471,
4871,
15865,
72,
975,
3215,
92,
19,
17328,
468,
471,
1135,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
17328,
12,
2890,
4672,
468,
29185,
326,
15455,
628,
342,
13640,
19,
14419,
19,
72,
975,
3215,
92,
19,
17328,
471,
4871,
15865,
72,
975,
3215,
92,
19,
17328,
468,
471,
1135,
2... |
def responseString(self, source): | def responseString(self, document): | def responseString(self, source): raise NotImplementedError | 3b14c655b07ad4ef53f5808b444994bf55d99683 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5033/3b14c655b07ad4ef53f5808b444994bf55d99683/parsetree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
766,
780,
12,
2890,
16,
1668,
4672,
1002,
11206,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
766,
780,
12,
2890,
16,
1668,
4672,
1002,
11206,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
(last_run_at.hour < max(self.hour) or execute_this_hour)) | last_run_at.hour < max(self.hour)) | def remaining_estimate(self, last_run_at): """Returns when the periodic task should run next as a timedelta.""" weekday = last_run_at.isoweekday() execute_this_hour = (weekday in self.day_of_week and last_run_at.hour in self.hour and last_run_at.minute < max(self.minute)) | cfb2c96386741db4fe2e24cd603b2db9cd7f7340 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/cfb2c96386741db4fe2e24cd603b2db9cd7f7340/schedules.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4463,
67,
23562,
12,
2890,
16,
1142,
67,
2681,
67,
270,
4672,
3536,
1356,
1347,
326,
17478,
1562,
1410,
1086,
1024,
487,
279,
10661,
12123,
7560,
273,
1142,
67,
2681,
67,
270,
18,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4463,
67,
23562,
12,
2890,
16,
1142,
67,
2681,
67,
270,
4672,
3536,
1356,
1347,
326,
17478,
1562,
1410,
1086,
1024,
487,
279,
10661,
12123,
7560,
273,
1142,
67,
2681,
67,
270,
18,
291,
... |
self.socket.connect(hostname, port) | self.socket.connect((hostname, port)) | def __init__(self, hostname, port): self.host = hostname self.port = port self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.connect(hostname, port) self.open = 1 | 77cd1324fe455934d631ab8d65a65574466fcc58 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10452/77cd1324fe455934d631ab8d65a65574466fcc58/x88.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5199,
16,
1756,
4672,
365,
18,
2564,
273,
5199,
365,
18,
655,
273,
1756,
365,
18,
7814,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5199,
16,
1756,
4672,
365,
18,
2564,
273,
5199,
365,
18,
655,
273,
1756,
365,
18,
7814,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
1... |
bp = bdb.Breakpoint.bpbynumber[bpnum] | try: bp = bdb.Breakpoint.bpbynumber[bpnum] except IndexError: print >>self.stdout, 'Breakpoint index %r is not valid' % args[0] return | def do_condition(self, arg): # arg is breakpoint number and condition args = arg.split(' ', 1) try: bpnum = int(args[0].strip()) except ValueError: # something went wrong print >>self.stdout, \ 'Breakpoint index %r is not a number' % args[0] return try: cond = args[1] except: cond = None bp = bdb.Breakpoint.bpbynumber[bpnum] if bp: bp.cond = cond if not cond: print >>self.stdout, 'Breakpoint', bpnum, print >>self.stdout, 'is now unconditional.' | 2faa9e146681bb4d5ea2b795dfaade35a1d1c2df /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/2faa9e146681bb4d5ea2b795dfaade35a1d1c2df/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
4175,
12,
2890,
16,
1501,
4672,
468,
1501,
353,
18820,
1300,
471,
2269,
833,
273,
1501,
18,
4939,
2668,
2265,
404,
13,
775,
30,
9107,
2107,
273,
509,
12,
1968,
63,
20,
8009,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
4175,
12,
2890,
16,
1501,
4672,
468,
1501,
353,
18820,
1300,
471,
2269,
833,
273,
1501,
18,
4939,
2668,
2265,
404,
13,
775,
30,
9107,
2107,
273,
509,
12,
1968,
63,
20,
8009,
... |
iscontent = lambda text:text in ("bodyContent", "mainContent") content = SoupStrainer("div", id=iscontent) | content = SoupStrainer("div", id=self.site().family.content_id) | def getReferences(self, follow_redirects=True, withTemplateInclusion=True, onlyTemplateInclusion=False, redirectsOnly=False): """ Yield all pages that link to the page. If you need a full list of referring pages, use this: | b0aabc06351064e8b26863db1c754a0ededcc537 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/b0aabc06351064e8b26863db1c754a0ededcc537/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
2980,
12,
2890,
16,
2805,
67,
22715,
33,
5510,
16,
598,
2283,
382,
15335,
33,
5510,
16,
1338,
2283,
382,
15335,
33,
8381,
16,
18064,
3386,
33,
8381,
4672,
3536,
31666,
777,
4689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
2980,
12,
2890,
16,
2805,
67,
22715,
33,
5510,
16,
598,
2283,
382,
15335,
33,
5510,
16,
1338,
2283,
382,
15335,
33,
8381,
16,
18064,
3386,
33,
8381,
4672,
3536,
31666,
777,
4689,
... |
return self._lambdas[ 0 ]( *args, **kw ) | from zExceptions import Unauthorized allowed = self._lambdas[ 0 ]( *args, **kw ) if not allowed: raise Unauthorized return 1 | def validate( self, *args, **kw ): return self._lambdas[ 0 ]( *args, **kw ) | 75bca269d84d9dd10b7e4dc26db9f5982187b4bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/75bca269d84d9dd10b7e4dc26db9f5982187b4bb/testCopySupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1954,
12,
365,
16,
380,
1968,
16,
2826,
9987,
262,
30,
327,
365,
6315,
80,
2536,
28831,
63,
374,
308,
12,
380,
1968,
16,
2826,
9987,
262,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1954,
12,
365,
16,
380,
1968,
16,
2826,
9987,
262,
30,
327,
365,
6315,
80,
2536,
28831,
63,
374,
308,
12,
380,
1968,
16,
2826,
9987,
262,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
logger.debug("caller run, name : %s", name) | logger.debug("caller run, names : %s", name) | def run(self,parent, number, name=None): """show the Caller window | 3b7541c4d1bd4c40a045a540534f065b82ee78ea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/3b7541c4d1bd4c40a045a540534f065b82ee78ea/tele.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
2938,
16,
1300,
16,
508,
33,
7036,
4672,
3536,
4500,
326,
20646,
2742,
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,
1086,
12,
2890,
16,
2938,
16,
1300,
16,
508,
33,
7036,
4672,
3536,
4500,
326,
20646,
2742,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
header = True | headscan = True | def parse(self, stream): """ parse unified diff """ self.source = [] self.target = [] self.hunks = [] self.hunkends = [] | f546591a6b402ba31daf9a9b0af9f220102590b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4098/f546591a6b402ba31daf9a9b0af9f220102590b8/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
1407,
4672,
3536,
1109,
27136,
3122,
3536,
365,
18,
3168,
273,
5378,
365,
18,
3299,
273,
5378,
365,
18,
76,
1683,
87,
273,
5378,
365,
18,
76,
1683,
5839,
273,
5378,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
12,
2890,
16,
1407,
4672,
3536,
1109,
27136,
3122,
3536,
365,
18,
3168,
273,
5378,
365,
18,
3299,
273,
5378,
365,
18,
76,
1683,
87,
273,
5378,
365,
18,
76,
1683,
5839,
273,
5378,... |
self._ensure_header_written(0) if self._datalength != self._datawritten: self._patchheader() self._file.flush() self._file = None | if self._file: self._ensure_header_written(0) if self._datalength != self._datawritten: self._patchheader() self._file.flush() self._file = None if self._i_opened_the_file: self._i_opened_the_file.close() self._i_opened_the_file = None | def close(self): self._ensure_header_written(0) if self._datalength != self._datawritten: self._patchheader() self._file.flush() self._file = None | cfc4178e843f5f2b0f190bacd222c0f72ab91e53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cfc4178e843f5f2b0f190bacd222c0f72ab91e53/wave.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
6315,
15735,
67,
3374,
67,
9748,
12,
20,
13,
309,
365,
6315,
72,
3145,
1288,
480,
365,
6315,
892,
9748,
30,
365,
6315,
2272,
3374,
1435,
365,
6315,
768,
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,
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,
6315,
15735,
67,
3374,
67,
9748,
12,
20,
13,
309,
365,
6315,
72,
3145,
1288,
480,
365,
6315,
892,
9748,
30,
365,
6315,
2272,
3374,
1435,
365,
6315,
768,
18,
... |
success = do_autotrace_one ("char.pbm", '%s-%d' % (fontname, a)) | success = do_autotrace_one ("char.pbm", '%s-%d' % (gf_fontname, a)) | def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph testing. # glyphs = [] for a in glyphs: valid = metric.has_char (a) if not valid: continue valid = make_pbm (gf_fontname, 'char.pbm', a) if not valid: continue (w,h, xo, yo) = read_gf_dims (gf_fontname, a) if not verbose_p: sys.stderr.write('[%d' % a) sys.stderr.flush() success = do_autotrace_one ("char.pbm", '%s-%d' % (fontname, a)) if not success : sys.stderr.write ("(skipping character)]") sys.stderr.flush () continue if not verbose_p: sys.stderr.write(']') sys.stderr.flush() tw = int (round (metric.get_char (a).width / metric.design_size * 1000)) (bbox, t1o) = autotrace_path_to_type1_ops ("char.eps", (h, w, xo, yo), tw) if t1o == '' : continue font_bbox = update_bbox_with_bbox (font_bbox, bbox) t1os.append ('/%s %s ' % (encoding[a] , t1o )) progress ('\n') if pfa_p or ttf_p: to_type1 (t1os, font_bbox, fontname, encoding, magnification, 1) if ttf_p: shutil.copy2 (fontname + '.pfa', fontname + '.pfx') if pfb_p: to_type1 (t1os, font_bbox, fontname, encoding, magnification, 0) | 6261a7b0062c0861bc1125b26df3ac4d557024b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11856/6261a7b0062c0861bc1125b26df3ac4d557024b5/mftrace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3656,
5129,
67,
5776,
261,
5776,
529,
16,
3999,
16,
23404,
16,
2688,
16,
28160,
1480,
4672,
2552,
13828,
67,
5776,
529,
309,
486,
13828,
67,
5776,
529,
30,
1026,
273,
225,
3157,
67,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3656,
5129,
67,
5776,
261,
5776,
529,
16,
3999,
16,
23404,
16,
2688,
16,
28160,
1480,
4672,
2552,
13828,
67,
5776,
529,
309,
486,
13828,
67,
5776,
529,
30,
1026,
273,
225,
3157,
67,
11... |
Get job sandbox """ print request.params | def getSandbox( self ): """ Get job sandbox """ | 199606dbc22ba175bb1a6b03dc22cc34147b8e91 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12767/199606dbc22ba175bb1a6b03dc22cc34147b8e91/JobAdministrator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
9069,
12,
365,
262,
30,
3536,
968,
1719,
15202,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1322,
9069,
12,
365,
262,
30,
3536,
968,
1719,
15202,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
Translate 2d plot options into 3d plot options. | Translate 2D plot options into 3D plot options. | def _plot3d_options(self, options=None): """ Translate 2d plot options into 3d plot options. | 491c09a369949b6e74fc7c4ffb9f16ae1baf2a2b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/491c09a369949b6e74fc7c4ffb9f16ae1baf2a2b/primitive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4032,
23,
72,
67,
2116,
12,
2890,
16,
702,
33,
7036,
4672,
3536,
16820,
576,
72,
3207,
702,
1368,
890,
72,
3207,
702,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4032,
23,
72,
67,
2116,
12,
2890,
16,
702,
33,
7036,
4672,
3536,
16820,
576,
72,
3207,
702,
1368,
890,
72,
3207,
702,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
n = newNode | def _textual(self, node): rc = '' for n in node.childNodes: if n.nodeType == node.ELEMENT_NODE: if n.localName == 'getName': newNode = self.doc.dom.createTextNode(self.styles.names.get(n.getAttribute('id'),'Unknown name')) node.insertBefore(newNode, n) node.removeChild(n) n = newNode elif n.localName == 'pageNumber': newNode = self.doc.dom.createTextNode(str(self.doc.canvas.getPageNumber())) node.insertBefore(newNode, n) node.removeChild(n) n = newNode else: #CHECKME: I wonder if this is useful since we don't stock the result. Maybe for the getName tag? self._textual(n) rc += n.toxml() elif n.nodeType in (node.CDATA_SECTION_NODE, node.TEXT_NODE): rc += str2xml(n.data) return rc.encode(encoding, 'replace') | 45305377fa86de2508db7c9c9130b612aea6a9df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/45305377fa86de2508db7c9c9130b612aea6a9df/trml2pdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
955,
1462,
12,
2890,
16,
756,
4672,
4519,
273,
875,
364,
290,
316,
756,
18,
3624,
3205,
30,
309,
290,
18,
2159,
559,
422,
756,
18,
10976,
67,
8744,
30,
309,
290,
18,
3729,
461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
955,
1462,
12,
2890,
16,
756,
4672,
4519,
273,
875,
364,
290,
316,
756,
18,
3624,
3205,
30,
309,
290,
18,
2159,
559,
422,
756,
18,
10976,
67,
8744,
30,
309,
290,
18,
3729,
461,
... | |
try: for x in xrange(1, len(rebuilt_lines)): m = p_refmarker.match(rebuilt_lines[x]) try: if int(m.group("marknum")) == last_marknum + 1: fixed.append(rebuilt_lines[x]) last_marknum += 1 continue elif len(rebuilt_lines[x][m.end():].strip()) == 0: fixed[len(fixed) - 1] += rebuilt_lines[x] continue else: m_fix = p_refmarker.search(rebuilt_lines[x][m.end():]) if m_fix is not None and int(m_fix.group("marknum")) == last_marknum + 1: | for x in xrange(1, len(rebuilt_lines)): m = p_refmarker.match(rebuilt_lines[x]) try: curline_mark_num = m.group("marknum") except AttributeError: fixed[len(fixed) - 1] += rebuilt_lines[x] else: if int(curline_mark_num) == last_marknum + 1: fixed.append(rebuilt_lines[x]) last_marknum += 1 elif len(rebuilt_lines[x][m.end():].strip()) == 0: fixed[len(fixed) - 1] += rebuilt_lines[x] else: current_line = rebuilt_lines[x] m_next_mark = p_refmarker.search(current_line[m.end():]) while m_next_mark is not None: if int(m_next_mark.group("marknum")) == \ last_marknum + 1: | def correct_rebuilt_lines(rebuilt_lines, p_refmarker): """Try to correct any cases where a reference line has been incorrectly split based upon a wrong numeration marker. That is to say, given the following situation: [1] Smith, J blah blah [2] Brown, N blah blah see reference [56] for more info [3] Wills, A blah blah ... The first part of the 3rd line clearly belongs with line 2. This function will try to fix this situation, to have the following situation: [1] Smith, J blah blah [2] Brown, N blah blah see reference [56] for more info [3] Wills, A blah blah If it cannot correctly guess the correct break-point in such a line, it will give up and the original list of reference lines will be returned. @param rebuilt_lines: (list) the rebuilt reference lines @param p_refmarker: (compiled regex pattern object) the pattern used to match regex line numeration markers. **MUST HAVE A GROUP 'marknum' to encapsulate the mark number!** (e.g. r'\[(?P<marknum>\d+)\]') @return: (list) of strings. If necessary, the corrected reference lines. Else the orginal 'rebuilt' lines. """ fixed = [] unsafe = 0 try: m = p_refmarker.match(rebuilt_lines[0]) last_marknum = int(m.group("marknum")) if last_marknum != 1: ## Even the first mark isnt 1 - probaby too dangerous to try to repair return rebuilt_lines except (IndexError, AttributeError, ValueError): ## Sometihng went wrong. Either no references, not a numbered line marker (int() failed), or ## no reference line marker (NoneType was passed). In any case, unable to test for correct ## reference line numberring - just return the lines as they were. return rebuilt_lines ## Loop through each line in "rebuilt_lines" and test the mark at the beginning. ## If current-line-mark = previous-line-mark + 1, the line will be taken to be correct and appended ## to the list of fixed-lines. If not, then the loop will attempt to test whether the current line ## marker is actually part of the previous line by looking in the current line for another marker ## that has the numeric value of previous-marker + 1. If found, that marker will be taken as the true ## marker for the line and the leader of the line (up to the point of this marker) will be appended ## to the revious line. E.g.: ## [1] Smith, J blah blah ## [2] Brown, N blah blah see reference ## [56] for more info [3] Wills, A blah blah ## ... ## ## ...will be transformed into: ## [1] Smith, J blah blah ## [2] Brown, N blah blah see reference [56] for more info ## [3] Wills, A blah blah ## ... ## first line is correct, to put it into fixed: fixed.append(rebuilt_lines[0]) try: for x in xrange(1, len(rebuilt_lines)): m = p_refmarker.match(rebuilt_lines[x]) try: if int(m.group("marknum")) == last_marknum + 1: ## The marker number for this reference line is correct. ## Append it to the 'fixed' lines and move on. fixed.append(rebuilt_lines[x]) last_marknum += 1 continue elif len(rebuilt_lines[x][m.end():].strip()) == 0: ## This line consists of a marker-number only - it is not a ## correct marker. Append it to the last line. fixed[len(fixed) - 1] += rebuilt_lines[x] continue else: ## This marker != previous-marker + 1. ## May have taken some of the last line into this line. Can we find the ## next marker in this line? ## Test for this situation: ## [54] for more info [3] Wills, A blah blah m_fix = p_refmarker.search(rebuilt_lines[x][m.end():]) if m_fix is not None and int(m_fix.group("marknum")) == last_marknum + 1: ## found next marker in line. Test to see that marker is followed by ## something meaningful i.e. a letter at least (name). ## I.e. We want to fix this: ## [54] for more info [3] Wills, A blah blah ## ## but we don't want to fix this: ## [54] for more info or even reference [3] ## ## as that would be unsafe. m_test_nxt_mark_not_eol = \ sre.search(sre.escape(m_fix.group()) + '\s*[A-Za-z]', rebuilt_lines[x]) if m_test_nxt_mark_not_eol is not None: ## move this section back to its real line: ## get the segment of this line to be moved to the previous line ## (append a newline to it too): movesect = rebuilt_lines[x][0:m_test_nxt_mark_not_eol.start()] + "\n" ## Now get the previous line into a variable (without its newline at the end): previous_line = fixed[len(fixed) - 1].rstrip("\n") ## Now append the section to be moved to the previous line variable. ## Check the last character of the previous line. If it's a space, then ## just directly append this new section. Else, append a space then this new section. previous_line += "%s%s" % ((previous_line[len(previous_line) - 1] != " " and " ") or (""), movesect) fixed[len(fixed) - 1] = previous_line ## Now append the remainder of the current line to the list of fixed lines, and move on to the ## next line: fixed.append(rebuilt_lines[x][m_test_nxt_mark_not_eol.start():]) last_marknum += 1 continue else: ## The next marker in the line was not followed by text. It is unsafe to move it. ## Give up trying to correct these reference lines - it's not safe to continue. unsafe = 1 break else: ## Unable to find another marker in the line that starts with the incorrect marker. ## It is therefore unsafe to attempt to correct the lines: just return the original lines. unsafe = 1 break except AttributeError: ## This line does not have a line marker at the start! This line shall be added to the end of the previous line. fixed[len(fixed) - 1] += rebuilt_lines[x] continue except IndexError: ## Somewhere, the boundaries of the list of references were over-stepped. Just return the original set of reference lines. unsafe = 1 if unsafe: ## return the original set of references. return rebuilt_lines else: ## return the newly corrected references. return fixed | 11ccb10bc99c9907d6df324bad7c06a4d678afe0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/11ccb10bc99c9907d6df324bad7c06a4d678afe0/refextract.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3434,
67,
266,
12406,
67,
3548,
12,
266,
12406,
67,
3548,
16,
293,
67,
1734,
11145,
4672,
3536,
7833,
358,
3434,
1281,
6088,
1625,
279,
2114,
980,
711,
2118,
25621,
1416,
2511,
12318,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3434,
67,
266,
12406,
67,
3548,
12,
266,
12406,
67,
3548,
16,
293,
67,
1734,
11145,
4672,
3536,
7833,
358,
3434,
1281,
6088,
1625,
279,
2114,
980,
711,
2118,
25621,
1416,
2511,
12318,
27... |
self.context = xmlconfig.file("mail.zcml", zope.sendmail.tests) | here = os.path.dirname(__file__) zcmlfile = open(os.path.join(here, "mail.zcml"), 'r') zcml = zcmlfile.read() zcmlfile.close() self.context = xmlconfig.string(zcml.replace('path/to/tmp/mailbox', self.mailbox)) | def setUp(self): super(DirectivesTest, self).setUp() self.testMailer = Mailer() | a953102b8fa966699f2007d8a65e5846028f7ebf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9710/a953102b8fa966699f2007d8a65e5846028f7ebf/test_directives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
2240,
12,
25343,
4709,
16,
365,
2934,
542,
1211,
1435,
365,
18,
3813,
23666,
273,
11542,
264,
1435,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
2240,
12,
25343,
4709,
16,
365,
2934,
542,
1211,
1435,
365,
18,
3813,
23666,
273,
11542,
264,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.c_func_name = arg | self.c_func_name = repr(arg) | def trace_dispatch_i(self, frame, event, arg): timer = self.timer t = timer() - self.t - self.bias | cc01e4956521e86f264c1ac685aac3acb259c0c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/cc01e4956521e86f264c1ac685aac3acb259c0c4/profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
67,
10739,
67,
77,
12,
2890,
16,
2623,
16,
871,
16,
1501,
4672,
5441,
273,
365,
18,
12542,
268,
273,
5441,
1435,
300,
365,
18,
88,
300,
365,
18,
13931,
2,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
67,
10739,
67,
77,
12,
2890,
16,
2623,
16,
871,
16,
1501,
4672,
5441,
273,
365,
18,
12542,
268,
273,
5441,
1435,
300,
365,
18,
88,
300,
365,
18,
13931,
2,
-100,
-100,
-100,
-10... |
lib_dir, inc_dir, bin_dir = path_locations(home_dir) | home_dir, lib_dir, inc_dir, bin_dir = path_locations(home_dir) | def create_environment(home_dir, site_packages=True, clear=False, unzip_setuptools=False): """ Creates a new environment in ``home_dir``. If ``site_packages`` is true (the default) then the global ``site-packages/`` directory will be on the path. If ``clear`` is true (default False) then the environment will first be cleared. """ lib_dir, inc_dir, bin_dir = path_locations(home_dir) py_executable = install_python( home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear) install_distutils(lib_dir, home_dir) install_setuptools(py_executable, unzip=unzip_setuptools) install_activate(home_dir, bin_dir) | dc6dda8f6c595f40e2cfb5c2db467fabc291d631 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12981/dc6dda8f6c595f40e2cfb5c2db467fabc291d631/virtualenv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
10274,
12,
8712,
67,
1214,
16,
2834,
67,
10308,
33,
5510,
16,
2424,
33,
8381,
16,
20259,
67,
542,
30693,
33,
8381,
4672,
3536,
10210,
279,
394,
3330,
316,
12176,
8712,
67,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10274,
12,
8712,
67,
1214,
16,
2834,
67,
10308,
33,
5510,
16,
2424,
33,
8381,
16,
20259,
67,
542,
30693,
33,
8381,
4672,
3536,
10210,
279,
394,
3330,
316,
12176,
8712,
67,
121... |
self.color_, self.line_width, self.outline_color_) | self.color_, self.line_width, self.outline_color_, self.custom_symbol) | def _render(self, gc, points, icon_mode=False): """ This same method is used both to render the scatterplot and to draw just the iconified version of this plot, with the latter simply requiring that a few steps be skipped. """ | 3dd02a2822d486b7aa5eca736b85056a1305253e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13167/3dd02a2822d486b7aa5eca736b85056a1305253e/scatterplot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
12,
2890,
16,
8859,
16,
3143,
16,
4126,
67,
3188,
33,
8381,
4672,
3536,
1220,
1967,
707,
353,
1399,
3937,
358,
1743,
326,
14644,
4032,
471,
358,
3724,
2537,
326,
4126,
939,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
12,
2890,
16,
8859,
16,
3143,
16,
4126,
67,
3188,
33,
8381,
4672,
3536,
1220,
1967,
707,
353,
1399,
3937,
358,
1743,
326,
14644,
4032,
471,
358,
3724,
2537,
326,
4126,
939,
... |
self.parent += msg | messages.append(msg) | def underline(self, match, context, next_state): """Section title.""" lineno = self.state_machine.abs_line_number() if not self.state_machine.match_titles: blocktext = context[0] + '\n' + self.state_machine.line msg = self.reporter.severe( 'Unexpected section title at line %s.' % lineno, '', nodes.literal_block(blocktext, blocktext)) self.parent += msg return [], next_state, [] title = context[0].rstrip() underline = match.string.rstrip() source = title + '\n' + underline if len(title) > len(underline): blocktext = context[0] + '\n' + self.state_machine.line msg = self.reporter.info( 'Title underline too short at line %s.' % lineno, '', nodes.literal_block(blocktext, blocktext)) self.parent += msg style = underline[0] context[:] = [] self.section(title, source, style, lineno - 1) return [], next_state, [] | 3b276ab058f6fea3778175ae2d6e97f9f883e4ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/3b276ab058f6fea3778175ae2d6e97f9f883e4ca/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25985,
12,
2890,
16,
845,
16,
819,
16,
1024,
67,
2019,
4672,
3536,
5285,
2077,
12123,
7586,
273,
365,
18,
2019,
67,
9149,
18,
5113,
67,
1369,
67,
2696,
1435,
309,
486,
365,
18,
2019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25985,
12,
2890,
16,
845,
16,
819,
16,
1024,
67,
2019,
4672,
3536,
5285,
2077,
12123,
7586,
273,
365,
18,
2019,
67,
9149,
18,
5113,
67,
1369,
67,
2696,
1435,
309,
486,
365,
18,
2019,
... |
Deletes vertex, removing all incident edges. | Deletes vertex, removing all incident edges. Deleting a non-existant vertex will raise an exception. | def delete_vertex(self, vertex): """ Deletes vertex, removing all incident edges. | 191e77a0bf2525c8c088fd2c0fb6301984c87062 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/191e77a0bf2525c8c088fd2c0fb6301984c87062/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
15281,
12,
2890,
16,
5253,
4672,
3536,
17973,
5253,
16,
9427,
777,
22933,
5231,
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,
1430,
67,
15281,
12,
2890,
16,
5253,
4672,
3536,
17973,
5253,
16,
9427,
777,
22933,
5231,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
data = quopri.decode(data) | decoded = cStringIO.StringIO() quopri.decode(part.fp, decoded) data = decoded.getvalue() | def handle_message(self, message): ''' message - a Message instance | c559531b2814b00cf98d06402ad97aff0b464cb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c559531b2814b00cf98d06402ad97aff0b464cb8/mailgw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2150,
12,
2890,
16,
883,
4672,
9163,
883,
300,
279,
2350,
791,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
67,
2150,
12,
2890,
16,
883,
4672,
9163,
883,
300,
279,
2350,
791,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Either integers `n,d` such that `d>0`, `gcd(n,d)=1`, `n/d=u (mod m)`, and `T*d*|n|< m`, or ``None``. | Either integers `n,d` such that `d>0`, `\mathop{\mathrm{gcd}}(n,d)=1`, `n/d=u \bmod m`, and `T \* d \* |n| < m`, or ``None``. | def mqrr_rational_reconstruction(u, m, T): r""" Maximal Quotient Rational Reconstruction. FOR research purposes only - this is pure Python, so slow. INPUT: - ``u, m, T`` - integers such that `m > u \ge 0,` `T > 0`. OUTPUT: Either integers `n,d` such that `d>0`, `gcd(n,d)=1`, `n/d=u (mod m)`, and `T*d*|n|< m`, or ``None``. Reference: Monagan, Maximal Quotient Rational Reconstruction: An Almost Optimal Algorithm for Rational Reconstruction (page 11) This algorithm is probabilistic. EXAMPLES:: sage: mqrr_rational_reconstruction(21,3100,13) (21, 1) """ if u == 0: if m > T: return (0,1) else: return None n, d = 0, 0 t0, r0 = 0, m t1, r1 = 1, u while r1 != 0 and r0 > T: q = r0/r1 # C division implicit floor if q > T: n, d, T = r1, t1, q r0, r1 = r1, r0 - q*r1 t0, t1 = t1, t0 - q*t1 if d != 0 and GCD(n,d) == 1: return (n,d) return None | 2bbe2334c6ee2df9794388e492bb1effd39e27d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/2bbe2334c6ee2df9794388e492bb1effd39e27d2/arith.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18327,
523,
67,
7034,
287,
67,
266,
591,
4549,
12,
89,
16,
312,
16,
399,
4672,
436,
8395,
4238,
2840,
4783,
352,
1979,
534,
8371,
868,
591,
4549,
18,
225,
12108,
283,
3072,
13694,
1338... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18327,
523,
67,
7034,
287,
67,
266,
591,
4549,
12,
89,
16,
312,
16,
399,
4672,
436,
8395,
4238,
2840,
4783,
352,
1979,
534,
8371,
868,
591,
4549,
18,
225,
12108,
283,
3072,
13694,
1338... |
if self.token=="DISCARDABLE": self.getToken() if self.token=="MOVEABLE": self.getToken() self.getToken() | while not self.token.startswith('"'): self.getToken() | def parse_bitmap_or_icon(self, name, dic): self.getToken() if self.token=="DISCARDABLE": self.getToken() if self.token=="MOVEABLE": self.getToken() # PURE self.getToken() # bmpname bmf = self.token[1:-1] # quotes dic[name] = bmf | 6607b8df7f10522d254a3356f18efd66dfcaef31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/6607b8df7f10522d254a3356f18efd66dfcaef31/win32rcparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3682,
1458,
67,
280,
67,
3950,
12,
2890,
16,
508,
16,
11681,
4672,
365,
18,
588,
1345,
1435,
309,
365,
18,
2316,
31713,
2565,
2312,
8085,
2782,
6877,
365,
18,
588,
1345,
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,
1109,
67,
3682,
1458,
67,
280,
67,
3950,
12,
2890,
16,
508,
16,
11681,
4672,
365,
18,
588,
1345,
1435,
309,
365,
18,
2316,
31713,
2565,
2312,
8085,
2782,
6877,
365,
18,
588,
1345,
1435... |
if not s.wait: q.put(s) | def add_dep(self, q, *deps): self.wait += len(deps) for s in deps: s.rdeps.append(self) if not s.wait: q.put(s) | 31a172669051f612c39ad10e813c996483107c44 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6150/31a172669051f612c39ad10e813c996483107c44/hectic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
15037,
12,
2890,
16,
1043,
16,
380,
14877,
4672,
365,
18,
7048,
1011,
562,
12,
14877,
13,
364,
272,
316,
8740,
30,
272,
18,
86,
14877,
18,
6923,
12,
2890,
13,
309,
486,
272,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
67,
15037,
12,
2890,
16,
1043,
16,
380,
14877,
4672,
365,
18,
7048,
1011,
562,
12,
14877,
13,
364,
272,
316,
8740,
30,
272,
18,
86,
14877,
18,
6923,
12,
2890,
13,
309,
486,
272,... | |
return self.tk.call(self._w, 'show', 'entry', entry) | return self.tk.call(self._w, 'show', 'entry', entry) | def show_entry(self, entry): | 22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
4099,
12,
2890,
16,
1241,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
4099,
12,
2890,
16,
1241,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
file_handler = logging.handlers.FileHandler(filename, "w") root_logger.addHandler(file_handler) | file_handler = logging.FileHandler(filename, "w") pyreadline_logger.addHandler(file_handler) | def start_file_log(filename): global file_handler file_handler = logging.handlers.FileHandler(filename, "w") root_logger.addHandler(file_handler) | 5d2f4c4c341a80eafd16226a0eb73a0ee192fb32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12063/5d2f4c4c341a80eafd16226a0eb73a0ee192fb32/logger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
768,
67,
1330,
12,
3459,
4672,
2552,
585,
67,
4176,
585,
67,
4176,
273,
2907,
18,
28942,
12,
3459,
16,
315,
91,
7923,
2395,
896,
1369,
67,
4901,
18,
1289,
1503,
12,
768,
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,
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,
67,
768,
67,
1330,
12,
3459,
4672,
2552,
585,
67,
4176,
585,
67,
4176,
273,
2907,
18,
28942,
12,
3459,
16,
315,
91,
7923,
2395,
896,
1369,
67,
4901,
18,
1289,
1503,
12,
768,
67,... |
""" | """ % arg | def do_help(self, arg): msg = """ | 27e83a3774587a84532112eaada08ead41debbe9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/27e83a3774587a84532112eaada08ead41debbe9/shell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5201,
12,
2890,
16,
1501,
4672,
1234,
273,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
741,
67,
5201,
12,
2890,
16,
1501,
4672,
1234,
273,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
encodedFilename = filename.encode(self.targetSite.encoding()) | def process_filename(self): # Isolate the pure name filename = self.url if '/' in filename: filename = filename.split('/')[-1] if '\\' in filename: filename = filename.split('\\')[-1] if self.urlEncoding: filename = urllib.unquote(filename.decode(self.urlEncoding)) if self.useFilename: filename = self.useFilename if not self.keepFilename: wikipedia.output(u"The filename on the target wiki will default to: %s" % filename) # ask newfn until it's valid ok = False # FIXME: these 2 belong somewhere else, presumably in family forbidden = '/' # to be extended allowed_formats = (u'gif', u'jpg', u'jpeg', u'mid', u'midi', u'ogg', u'png', u'svg', u'xcf', u'djvu') while not ok: ok = True newfn = wikipedia.input(u'Enter a better name, or press enter to accept:') if newfn == "": newfn = filename ext = os.path.splitext(newfn)[1].lower().strip('.') for c in forbidden: if c in newfn: print "Invalid character: %s. Please try again" % c ok = False if ext not in allowed_formats and ok: choice = wikipedia.inputChoice(u"File format is not one of [%s], but %s. Continue?" % (u' '.join(allowed_formats), ext), ['yes', 'no'], ['y', 'N'], 'N') if choice == 'n': ok = False if newfn != '': filename = newfn # MediaWiki doesn't allow spaces in the file name. # Replace them here to avoid an extra confirmation form filename = filename.replace(' ', '_') # Convert the filename (currently Unicode) to the encoding used on the # target wiki encodedFilename = filename.encode(self.targetSite.encoding()) # A proper description for the submission. wikipedia.output(u"The suggested description is:") wikipedia.output(self.description) if self.verifyDescription: newDescription = u'' choice = wikipedia.inputChoice(u'Do you want to change this description?', ['Yes', 'No'], ['y', 'N'], 'n') if choice == 'y': import editarticle editor = editarticle.TextEditor() newDescription = editor.edit(self.description) # if user saved / didn't press Cancel if newDescription: self.description = newDescription | 0e14ce78a459ccc07571a16bcb85c7af55f5de78 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/0e14ce78a459ccc07571a16bcb85c7af55f5de78/upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
3459,
12,
2890,
4672,
468,
2585,
30144,
326,
16618,
508,
1544,
273,
365,
18,
718,
225,
309,
2023,
316,
1544,
30,
1544,
273,
1544,
18,
4939,
2668,
2473,
13,
18919,
21,
65,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
3459,
12,
2890,
4672,
468,
2585,
30144,
326,
16618,
508,
1544,
273,
365,
18,
718,
225,
309,
2023,
316,
1544,
30,
1544,
273,
1544,
18,
4939,
2668,
2473,
13,
18919,
21,
65,
225... | |
tag = message[4:].strip().replace(' ','_') | tag = message[4:].strip().split('\n')[0].replace(' ','_') | def log(s): logsock.write("[%s] %s" % (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()), s)) logsock.flush() | 4360d96213698afa858bcf0412a499115af9b897 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8703/4360d96213698afa858bcf0412a499115af9b897/darcs-fast-export.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
12,
87,
4672,
5963,
975,
18,
2626,
2932,
14451,
87,
65,
738,
87,
6,
738,
261,
957,
18,
701,
9982,
27188,
61,
6456,
81,
6456,
72,
738,
44,
5319,
49,
5319,
55,
3113,
813,
18,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
12,
87,
4672,
5963,
975,
18,
2626,
2932,
14451,
87,
65,
738,
87,
6,
738,
261,
957,
18,
701,
9982,
27188,
61,
6456,
81,
6456,
72,
738,
44,
5319,
49,
5319,
55,
3113,
813,
18,
37... |
self.assertEqual (db.full_tag_path ('/tags/%s/foo/rating' % user), | self.assertEqual(db.full_tag_path('/tags/%s/foo/rating' % user), | def testFullTagPath (self): db = self.db user = db.credentials.username self.assertEqual (db.full_tag_path ('rating'), '/tags/%s/rating' % user) self.assertEqual (db.full_tag_path ('/%s/rating' % user), '/tags/%s/rating' % user) self.assertEqual (db.full_tag_path ('/tags/%s/rating' % user), '/tags/%s/rating' % user) self.assertEqual (db.full_tag_path ('foo/rating'), '/tags/%s/foo/rating' % user) self.assertEqual (db.full_tag_path ('/%s/foo/rating' % user), '/tags/%s/foo/rating' % user) self.assertEqual (db.full_tag_path ('/tags/%s/foo/rating' % user), '/tags/%s/foo/rating' % user) | e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5080,
1805,
743,
261,
2890,
4672,
1319,
273,
365,
18,
1966,
729,
273,
1319,
18,
11687,
18,
5053,
365,
18,
11231,
5812,
261,
1966,
18,
2854,
67,
2692,
67,
803,
7707,
17326,
19899,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5080,
1805,
743,
261,
2890,
4672,
1319,
273,
365,
18,
1966,
729,
273,
1319,
18,
11687,
18,
5053,
365,
18,
11231,
5812,
261,
1966,
18,
2854,
67,
2692,
67,
803,
7707,
17326,
19899,
... |
class planet: | class Planet: | def __str__(self): if self.i == None or self.j == None: return "Nowhere" return "%s - %s" % (self.i+1, self.j+1) | e571d502c19abfb5a3320300c347793da7b43d05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/e571d502c19abfb5a3320300c347793da7b43d05/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
309,
365,
18,
77,
422,
599,
578,
365,
18,
78,
422,
599,
30,
327,
315,
8674,
14852,
6,
327,
2213,
87,
300,
738,
87,
6,
738,
261,
2890,
18,
77,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
309,
365,
18,
77,
422,
599,
578,
365,
18,
78,
422,
599,
30,
327,
315,
8674,
14852,
6,
327,
2213,
87,
300,
738,
87,
6,
738,
261,
2890,
18,
77,
15,
... |
raise SMTPRecipientsRefused(string.join( map(lambda x:"%s: %s" % (x[0], x[1][1]), senderrs.items()), '; ')) code=self.data(msg) if code <>250 : | raise SMTPRecipientsRefused(senderrs) (code,resp)=self.data(msg) if code <> 250: | def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """This command performs an entire mail transaction. | 053a07b597f875016b8bc478c8a905c8baf4efe4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/053a07b597f875016b8bc478c8a905c8baf4efe4/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4408,
12,
2890,
16,
628,
67,
4793,
16,
358,
67,
23305,
16,
1234,
16,
4791,
67,
2116,
22850,
6487,
4519,
337,
67,
2116,
33,
8526,
4672,
3536,
2503,
1296,
11199,
392,
7278,
4791,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4408,
12,
2890,
16,
628,
67,
4793,
16,
358,
67,
23305,
16,
1234,
16,
4791,
67,
2116,
22850,
6487,
4519,
337,
67,
2116,
33,
8526,
4672,
3536,
2503,
1296,
11199,
392,
7278,
4791,
2... |
source.close() | def test_checkcache(self): getline = linecache.getline try: # Create a source file and cache its contents source_name = support.TESTFN + '.py' with open(source_name, 'w') as source: source.write(SOURCE_1) source.close() getline(source_name, 1) | 9958c56eb0e2b71c1bea5abcc627899d0bed17dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/9958c56eb0e2b71c1bea5abcc627899d0bed17dc/test_linecache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1893,
2493,
12,
2890,
4672,
336,
1369,
273,
4739,
557,
807,
18,
588,
1369,
775,
30,
468,
1788,
279,
1084,
585,
471,
1247,
2097,
2939,
1084,
67,
529,
273,
2865,
18,
16961,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1893,
2493,
12,
2890,
4672,
336,
1369,
273,
4739,
557,
807,
18,
588,
1369,
775,
30,
468,
1788,
279,
1084,
585,
471,
1247,
2097,
2939,
1084,
67,
529,
273,
2865,
18,
16961,
197... | |
objects.append(pointer.address[0]) | def add_reachable_to_stack2(self, obj, objects, target_addr, source_addr): size_gc_header = self.gcheaderbuilder.size_gc_header gc_info = obj - size_gc_header hdr = llmemory.cast_adr_to_ptr(gc_info, self.HDRPTR) if hdr.typeid & 1: return typeid = hdr.typeid >> 1 offsets = self.offsets_to_gc_pointers(typeid) i = 0 while i < len(offsets): pointer = obj + offsets[i] objects.append(pointer.address[0]) # ------------------------------------------------- # begin difference from collect if pointer.address[0] == target_addr: pointer.address[0] = source_addr # end difference from collect # ------------------------------------------------- i += 1 if self.is_varsize(typeid): offset = self.varsize_offset_to_variable_part( typeid) length = (obj + self.varsize_offset_to_length(typeid)).signed[0] obj += offset offsets = self.varsize_offsets_to_gcpointers_in_var_part(typeid) itemlength = self.varsize_item_sizes(typeid) i = 0 while i < length: item = obj + itemlength * i j = 0 while j < len(offsets): objects.append((item + offsets[j]).address[0]) # ------------------------------------------------- # begin difference from collect pointer = item + offsets[j] if pointer.address[0] == target_addr: pointer.address[0] = source_addr ## end difference from collect # ------------------------------------------------- j += 1 i += 1 | 21591058a5d5e5ea0a2e29862bef780d185bf55d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/21591058a5d5e5ea0a2e29862bef780d185bf55d/gc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
17246,
67,
869,
67,
3772,
22,
12,
2890,
16,
1081,
16,
2184,
16,
1018,
67,
4793,
16,
1084,
67,
4793,
4672,
963,
67,
13241,
67,
3374,
273,
365,
18,
75,
343,
18105,
9574,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
17246,
67,
869,
67,
3772,
22,
12,
2890,
16,
1081,
16,
2184,
16,
1018,
67,
4793,
16,
1084,
67,
4793,
4672,
963,
67,
13241,
67,
3374,
273,
365,
18,
75,
343,
18105,
9574,
18,
... | |
for f in new_furnishings: | for f in furnishings: | def save_classroom(self, program): """ Steps for saving a classroom: - Find the previous list of resources - Create a new list of resources - Move over resource assignments - Delete old resources """ | f3b5b7f97286580553bc413f4a464b43d8cd7ffc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/f3b5b7f97286580553bc413f4a464b43d8cd7ffc/resources.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
1106,
13924,
12,
2890,
16,
5402,
4672,
3536,
7780,
1121,
364,
12392,
279,
667,
13924,
30,
300,
282,
4163,
326,
2416,
666,
434,
2703,
300,
282,
1788,
279,
394,
666,
434,
2703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
1106,
13924,
12,
2890,
16,
5402,
4672,
3536,
7780,
1121,
364,
12392,
279,
667,
13924,
30,
300,
282,
4163,
326,
2416,
666,
434,
2703,
300,
282,
1788,
279,
394,
666,
434,
2703,
... |
curl.perform() | try: curl.perform() except: print 'Error retrieving', url | def run(self): while 1: url, html, handle = self.queue.get() if url == None: break b = cStringIO.StringIO() curl = pycurl.Curl() curl.setopt(pycurl.WRITEFUNCTION, b.write) curl.setopt(pycurl.FOLLOWLOCATION, 1) curl.setopt(pycurl.MAXREDIRS, 5) curl.setopt(pycurl.URL, url) curl.perform() curl.close() threads_enter() html.write(handle, b.getvalue()) html.end(handle, HTML_STREAM_OK) threads_leave() | 0b588b6558655c350e5625a4b6113395b7461e97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10805/0b588b6558655c350e5625a4b6113395b7461e97/gtkhtml_demo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1323,
404,
30,
880,
16,
1729,
16,
1640,
273,
365,
18,
4000,
18,
588,
1435,
309,
880,
422,
599,
30,
898,
324,
273,
276,
780,
4294,
18,
780,
4294,
1435,
3363,
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,
1086,
12,
2890,
4672,
1323,
404,
30,
880,
16,
1729,
16,
1640,
273,
365,
18,
4000,
18,
588,
1435,
309,
880,
422,
599,
30,
898,
324,
273,
276,
780,
4294,
18,
780,
4294,
1435,
3363,
273... |
elif type == "radioButton": type, widget, value, callback = self._guiElements[index] setattr(self, value, not self.getdeepattr(value)) if callback: callback() elif type in ["hSlider", "qwtHSlider", "spin"]: type, widget, value, min, max, step, callback = self._guiElements[index] currentValue = self.getdeepattr(value) if currentValue == min: setattr(self, value, currentValue+step) elif currentValue == max: setattr(self, value, currentValue-step) else: setattr(self, value, currentValue + [-step,step][random.randint(0,1)]) if callback: callback() elif type == "comboBox": type, widget, value, sendSelectedValue, valueType, callback = self._guiElements[index] if widget.count(): pos = random.randint(0, widget.count()-1) if sendSelectedValue: setattr(self, value, valueType(str(widget.text(pos)))) else: setattr(self, value, pos) | elif type == "listBox": type, widget, value, callback = self._guiElements[index] if widget.count(): itemIndex = random.randint(0, widget.count()-1) newValue = "Listbox %s. Changed selection of item %d to %s" % (value, itemIndex, not widget.isSelected(itemIndex)) widget.setSelected(itemIndex, not widget.isSelected(itemIndex)) if callback: callback() elif type == "radioButtonsInBox": type, widget, value, callback = self._guiElements[index] radioIndex = random.randint(0, len(widget.buttons)-1) if widget.buttons[radioIndex].isEnabled(): newValue = "Set radio button %s to index %d" % (value, radioIndex) setattr(self, value, radioIndex) if callback: callback() elif type == "radioButton": type, widget, value, callback = self._guiElements[index] setattr(self, value, not self.getdeepattr(value)) newValue = "Set radio button %s to %d" % (value, self.getdeepattr(value)) | def randomlyChangeSettings(self): if len(self._guiElements) == 0: return index = random.randint(0, len(self._guiElements)-1) type, widget = self._guiElements[index][0], self._guiElements[index][1] if not widget.isEnabled(): return if type == "checkBox": type, widget, value, callback = self._guiElements[index] setattr(self, value, not self.getdeepattr(value)) if callback: callback() elif type == "button": type, widget, callback = self._guiElements[index] if widget.isToggleButton(): widget.setOn(not widget.isOn()) if callback: callback() elif type == "listBox": type, widget, value, callback = self._guiElements[index] if widget.count(): itemIndex = random.randint(0, widget.count()-1) widget.setSelected(itemIndex, not widget.isSelected(itemIndex)) if callback: callback() elif type == "radioButtonsInBox": type, widget, value, callback = self._guiElements[index] radioIndex = random.randint(0, len(widget.buttons)-1) if widget.buttons[radioIndex].isEnabled(): setattr(self, value, radioIndex) if callback: callback() elif type == "radioButton": type, widget, value, callback = self._guiElements[index] setattr(self, value, not self.getdeepattr(value)) if callback: callback() elif type in ["hSlider", "qwtHSlider", "spin"]: type, widget, value, min, max, step, callback = self._guiElements[index] currentValue = self.getdeepattr(value) if currentValue == min: setattr(self, value, currentValue+step) elif currentValue == max: setattr(self, value, currentValue-step) else: setattr(self, value, currentValue + [-step,step][random.randint(0,1)]) if callback: callback() elif type == "comboBox": type, widget, value, sendSelectedValue, valueType, callback = self._guiElements[index] if widget.count(): pos = random.randint(0, widget.count()-1) if sendSelectedValue: setattr(self, value, valueType(str(widget.text(pos)))) else: setattr(self, value, pos) if callback: callback() | 06680e1d0b3d35030b3ed380885403a9dc197a15 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/06680e1d0b3d35030b3ed380885403a9dc197a15/OWBaseWidget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20153,
3043,
2628,
12,
2890,
4672,
309,
562,
12,
2890,
6315,
20292,
3471,
13,
422,
374,
30,
327,
225,
770,
273,
2744,
18,
7884,
474,
12,
20,
16,
562,
12,
2890,
6315,
20292,
3471,
24950... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20153,
3043,
2628,
12,
2890,
4672,
309,
562,
12,
2890,
6315,
20292,
3471,
13,
422,
374,
30,
327,
225,
770,
273,
2744,
18,
7884,
474,
12,
20,
16,
562,
12,
2890,
6315,
20292,
3471,
24950... |
fileList.prepend(fileName) | fileList.prepend(fileName) | def _updateRecentFileList(self, fileName): '''Add the <fileName> into the recent file list ''' LIST_CAPACITY = 4 #This could be set by user preference, not added yet from MWsemantics import recentfiles_use_QSettings #bruce 050919 debug code #####@@@@@ if recentfiles_use_QSettings: prefsSetting = QSettings() fileList = prefsSetting.readListEntry('/Nanorex/nE-1/recentFiles')[0] else: fileName = str(fileName) prefsSetting = preferences.prefs_context() fileList = prefsSetting.get('/Nanorex/nE-1/recentFiles', []) if len(fileList) > 0: if fileName == fileList[0]: return else: for ii in range(len(fileList)): if fileList[ii] == fileName: ## Put this one at the top del fileList[ii] break if recentfiles_use_QSettings: fileList.prepend(fileName) else: fileList.insert(0, fileName) fileList = fileList[:LIST_CAPACITY] if recentfiles_use_QSettings: prefsSetting.writeEntry('/Nanorex/nE-1/recentFiles', fileList) else: prefsSetting['/Nanorex/nE-1/recentFiles'] = fileList del prefsSetting self._createRecentFilesList() | 826f4ef4a94ba0f35d121a8803805349b4eb1eb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/826f4ef4a94ba0f35d121a8803805349b4eb1eb3/ops_files.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
17076,
26098,
12,
2890,
16,
3968,
4672,
9163,
986,
326,
411,
17812,
34,
1368,
326,
8399,
585,
666,
9163,
15130,
67,
17296,
30041,
273,
1059,
468,
2503,
3377,
506,
444,
635,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2725,
17076,
26098,
12,
2890,
16,
3968,
4672,
9163,
986,
326,
411,
17812,
34,
1368,
326,
8399,
585,
666,
9163,
15130,
67,
17296,
30041,
273,
1059,
468,
2503,
3377,
506,
444,
635,
72... |
stageSig = ipIsr.ISR_ILLUM, | stageSig = isrLib.ISR_ILLUM, | def IlluminationCorrection(exposure, illum, policy, stageSig = ipIsr.ISR_ILLUM, stageName = 'lsst.ip.isr.illuminationcorrection'): # common input test metadata = exposure.getMetadata() if chunkMetadata.exists(stageSig): pexLog.Trace(stageName, 4, '%s has already been run' % (stageSig)) return imetadata = illum.getMetadata() filenameKeyword = policy.getString('filenameKeyword') filename = imetadata(filenameKeyword) scalingKeyword = policy.getString('illumScaleKeyword') # e.g. MEAN illumscaling = dmetadata.getDouble(scalingKeyword) mi = exposure.getMaskedImage() #imi = afwImage.MaskedImageF(illum.getMaskedImage(), True) #if illumscaling != 1.: # imi /= illumscaling #mi /= imi mi.scaledDivides(1./illumscaling, illum.getMaskedImage()) # common outputs stageSummary = 'using %s with scale=%.2f' % (filename, flatscaling) pexLog.Trace(stageName, 4, '%s %s' % (stageSig, stageSummary)) metadata.setString(stageSig, '%s; %s' % (stageSummary, time.asctime())) | 9178ba52aa57399136f285c8a065b1707c990801 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6526/9178ba52aa57399136f285c8a065b1707c990801/IsrStages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
467,
13376,
1735,
20884,
12,
22739,
16,
277,
13376,
16,
3329,
16,
6009,
8267,
225,
273,
353,
86,
5664,
18,
5127,
54,
67,
15125,
2799,
16,
6009,
461,
273,
296,
3251,
334,
18,
625,
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,
467,
13376,
1735,
20884,
12,
22739,
16,
277,
13376,
16,
3329,
16,
6009,
8267,
225,
273,
353,
86,
5664,
18,
5127,
54,
67,
15125,
2799,
16,
6009,
461,
273,
296,
3251,
334,
18,
625,
18,
... |
def poll(self, _deadstate=None): | def _internal_poll(self, _deadstate=None): | def poll(self, _deadstate=None): """Check if child process has terminated. Returns returncode attribute.""" if self.returncode is None: if WaitForSingleObject(self._handle, 0) == WAIT_OBJECT_0: self.returncode = GetExitCodeProcess(self._handle) return self.returncode | b93764dbf95774117c067d54bb934ffa05ad406d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/b93764dbf95774117c067d54bb934ffa05ad406d/subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7236,
67,
13835,
12,
2890,
16,
389,
22097,
2019,
33,
7036,
4672,
3536,
1564,
309,
1151,
1207,
711,
14127,
18,
225,
2860,
18125,
1566,
12123,
309,
365,
18,
2463,
710,
353,
599,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7236,
67,
13835,
12,
2890,
16,
389,
22097,
2019,
33,
7036,
4672,
3536,
1564,
309,
1151,
1207,
711,
14127,
18,
225,
2860,
18125,
1566,
12123,
309,
365,
18,
2463,
710,
353,
599,
30,
... |
self.log.info("BACKENDS: %r" % (self.backends)) self.log.info("APPS: %r" % (self.apps)) self.log.info("SERVING FOREVER...") | self.info("BACKENDS: %r" % (self.backends)) self.info("APPS: %r" % (self.apps)) self.info("SERVING FOREVER...") | def start (self): # dump some debug info for now self.log.info("BACKENDS: %r" % (self.backends)) self.log.info("APPS: %r" % (self.apps)) self.log.info("SERVING FOREVER...") | 736bb30cfa3926d5cec9bec857a8a48c0b5cdc7d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/736bb30cfa3926d5cec9bec857a8a48c0b5cdc7d/router.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
261,
2890,
4672,
468,
4657,
2690,
1198,
1123,
364,
2037,
365,
18,
1330,
18,
1376,
2932,
8720,
1157,
3948,
30,
738,
86,
6,
738,
261,
2890,
18,
823,
5839,
3719,
365,
18,
1330,
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,
787,
261,
2890,
4672,
468,
4657,
2690,
1198,
1123,
364,
2037,
365,
18,
1330,
18,
1376,
2932,
8720,
1157,
3948,
30,
738,
86,
6,
738,
261,
2890,
18,
823,
5839,
3719,
365,
18,
1330,
18,
... |
return issns.get(journal_name, 'def') | return issns.get(journal_name, '') | def format(bfo): """ Returns the ISSN of the record, if known.<br/> Note that you HAVE to pre-generate the correspondances journal->ISSN if you want this element to return something (Run <code>python bfe_issn.py -h</code> to get help). """ issns = { 'acta phys. pol. a': '0587-4246', 'adv. colloid interface sci.': '0001-8686', 'appl. phys.': '0340-3793', 'asimmetrie': '1827-1383', 'atom': '0004-7015', 'biophys. chem.': '0301-4622', 'bulg. j. phys.': '1310-0157', 'curr. appl. phys.': '1567-1739', 'curr. opin. colloid. interface sci.': '1359-0294', 'electron. j. theor. phys.': '1729-5254', 'eur. j. solid state inorg. chem.': '0992-4361', 'eur. trans. electr. power': '1546-3109', 'eur. union': '1472-3395', 'high energy density phys.': '1574-1818', 'hit j. sci. eng.': '1565-5008', 'int. j. appl. electromagn. mech.': '1383-5416', 'int. j. hum.-comput. stud.': '1071-5819', 'int. j. mass spectrom.': '1387-3806', 'int. j. mass spectrom. ion process.': '0168-1176', 'int. j. prod. econ.': '0925-5273', 'int. j. radiat. appl. instrum. a': '0883-2889', 'int. j. rock mech. min. sci.': '1365-1609', 'int. j. therm. sci.': '1290-0729', 'ipn sci.': '1622-5120', 'itbm-rbm': '1297-9562', 'itbm-rbm news': '1297-9570', 'j. colloid interface sci.': '0021-9797', 'j. fluids struct.': '0889-9746', 'j. interlibr. loan doc. deliv. electron. reserve': '1072-303X', 'j. magn. reson.': '1090-7807', 'j. magn. reson. a': '1064-1858', 'j. magn. reson. b': '1064-1866', 'j. microcomput. appl.': '0745-7138', 'j. netw. comput. appl.': '1084-8045', 'j. non-newton. fluid mech.': '0377-0257', 'j. oper. manage.': '0272-6963', 'j. sound vib.': '0022-460X', 'j. vis. commun. image represent.': '1047-3203', 'jpn. j. appl. phys.': '1347-4065', 'kek news': '1343-3547', 'magn. reson. imaging': '0730-725X', 'mech. syst. signal process.': '0888-3270', 'netw. comput.': '1046-4468', 'nucl. eng. technol.': '1738-5733', 'nucl. phys. news': '1050-6896', 'nucl. tracks': '0191-278X', 'nucl. tracks radiat. meas.': '0191-278X', 'opt. fiber technol.': '1068-5200', 'opt. switch. netw.': '1573-4277', 'optik': '0030-4026', 'philips j. res.': '0165-5817', 'photonics nanostruct., fundam. appl.': '1569-4410', 'phys. life rev.': '1571-0645', 'phys. rev.': '0031-899X', 'phys. rev. (ser. i)': '0031-899X', 'plasmas ions': '1288-3255', 'polym. gels netw.': '0966-7822', 'prog. nucl. magn. reson. spectrosc.': '0079-6565', 'rbm-news': '0222-0776', 'real time imaging': '1077-2014', 'res. inf.': '1744-8026', 'rev. g\xc3\xa9n. therm.': '0035-3159', 'rom. rep. phys.': '1841-8759', 'sens. actuators b': '0925-4005', 'simul. model. pract. theory': '1569-190X', 'solid state sci.': '1293-2558', 'stat. sci.': '0883-4237', 'superlattices microstruct.': '0749-6036', 'tsinghua sci. technol.': '1007-0214', 'world pat. inf.': '0172-2190', 'z. phys.': '0044-3328'} journal_name = bfo.field('210__%') # Here you might want to process journal name # by doing the same operation that has been # done when saving the mappings journal_name = journal_name.lower().strip() if journal_name.endswith("[online]"): journal_name = journal_name[:-8].rstrip() return issns.get(journal_name, 'def') | dfcf49680940de37bce783df8f7ede7e1dec915a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/dfcf49680940de37bce783df8f7ede7e1dec915a/bfe_issn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
70,
617,
4672,
3536,
2860,
326,
467,
1260,
50,
434,
326,
1409,
16,
309,
4846,
22782,
2848,
21259,
3609,
716,
1846,
21926,
3412,
358,
675,
17,
7163,
326,
4325,
6872,
13001,
2122,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
70,
617,
4672,
3536,
2860,
326,
467,
1260,
50,
434,
326,
1409,
16,
309,
4846,
22782,
2848,
21259,
3609,
716,
1846,
21926,
3412,
358,
675,
17,
7163,
326,
4325,
6872,
13001,
2122,... |
try: isFlavor = obj.hasStereotype('flavor', umlprofile=self.uml_profile) except AttributeError: isFlavor = False if isFlavor == True: | if obj.hasStereoType('flavor'): | def _getFieldSpecFromAssoc(self, rel, classelement, indent_level=0, back=False): """Return the schema field code.""" | d80ab06e0950cf5094eaf5a4d7448aea04f8e9fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11941/d80ab06e0950cf5094eaf5a4d7448aea04f8e9fb/ArchetypesGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
974,
1990,
1265,
16974,
12,
2890,
16,
1279,
16,
667,
2956,
16,
3504,
67,
2815,
33,
20,
16,
1473,
33,
8381,
4672,
3536,
990,
326,
1963,
652,
981,
12123,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
974,
1990,
1265,
16974,
12,
2890,
16,
1279,
16,
667,
2956,
16,
3504,
67,
2815,
33,
20,
16,
1473,
33,
8381,
4672,
3536,
990,
326,
1963,
652,
981,
12123,
2,
-100,
-100,
-100,
... |
line = f.readline() | line = f.readline().strip() | def verifyEntry(self, f, time=None, subsys=None, severity=None, summary=None, detail=None, error=None): # skip to the beginning of next entry line = f.readline() while line != "------\n": if not line: self.fail("can't find entry in log file") line = f.readline() line = f.readline().strip() _time, rest = line.split(" ", 1) if time is not None: self.assertEqual(_time, time) if subsys is not None: self.assert_(rest.find(subsys) != -1, "subsystem mismatch") if severity is not None and severity >= self._severity: s = severity_string[severity] self.assert_(rest.find(s) != -1, "severity mismatch") if summary is not None: self.assert_(rest.find(summary) != -1, "summary mismatch") if detail is not None: line = f.readline() self.assert_(line.find(detail) != -1, "missing detail") if error is not None: line = f.readline() self.assert_(line.startswith('Traceback'), "missing traceback") last = "%s: %s\n" % (error[0], error[1]) if last.startswith("exceptions."): last = last[len("exceptions."):] while 1: line = f.readline() if not line: self.fail("couldn't find end of traceback") if line == "------\n": self.fail("couldn't find end of traceback") if line == last: break | 9924a490be5015de4c951b6e5d15183582e55271 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9656/9924a490be5015de4c951b6e5d15183582e55271/testzLog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
1622,
12,
2890,
16,
284,
16,
813,
33,
7036,
16,
720,
9499,
33,
7036,
16,
11426,
33,
7036,
16,
4916,
33,
7036,
16,
7664,
33,
7036,
16,
555,
33,
7036,
4672,
468,
2488,
358,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
1622,
12,
2890,
16,
284,
16,
813,
33,
7036,
16,
720,
9499,
33,
7036,
16,
11426,
33,
7036,
16,
4916,
33,
7036,
16,
7664,
33,
7036,
16,
555,
33,
7036,
4672,
468,
2488,
358,
326,
... |
self.__getParamConfigFile() self.__getParamLongArg() self.__getParamShortArg() | self.loadConfig(self.configFile) self.processArgs() | def getParam(self, noDialog=None, nCol = 1, checkArgs=True, useTkinter=None, verbose=False): ''' Get parameters from commandline option, configuration file, a parameter input dialog (if ``tkInter`` or ``wxPython`` is available and if *noDialog* is ``False``), and from interactive user input. ''' if noDialog in [True, False]: self.noDialog = noDialog elif '--noDialog' in sys.argv: self.noDialog = True else: self.noDialog = False # if useTkinter in [True, False]: self.useTkinter = useTkinter elif '--useTkinter' in sys.argv: self.useTkinter = True else: self.useTkinter = None # first try to use wxPython if not self.useTkinter: try: # wxPython might not exist imp.find_module('wx') except: self.useWxPython = False else: self.useWxPython = True # then tkInter if self.useTkinter or not self.useWxPython: # Tkinter should almost always exists, but ... try: imp.find_module('Tkinter') except: print "Tkinter can not be loaded. Please check your Python installation." self.useTkinter = False else: self.useTkinter = True # if self.noDialog or '-h' in sys.argv[1:] or '--help' in sys.argv[1:] \ or True not in map(lambda x:x.has_key('label'), self.options): return self.__termGetParam(False, True) else: # first assign values from non-GUI sources self.processedArgs = [] if self.configFile is not None: self.__getParamConfigFile() self.__getParamLongArg() self.__getParamShortArg() # for opt in self.options: if opt.has_key('separator'): continue if opt['value'] is None and opt.has_key('default'): opt['value'] = opt['default'] # look if any argument was not processed for i in range(1, len(sys.argv)): if (not sys.argv[i] in allowed_commandline_options) and (not i in self.processedArgs): raise exceptions.ValueError("Unprocessed command line argument: " + sys.argv[i]) # call dialog title = os.path.split(sys.argv[0])[-1] if self.useTkinter: return _tkParamDialog(self.options, title, self.doc, self.details, nCol).getParam() elif self.useWxPython: return _wxParamDialog(self.options, title, self.doc, self.details, nCol).getParam() else: return self.__termGetParam(self.options, False, True) return False | 84f4cb18ad1ca1b3b2af57319388a364da1f8f6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/401/84f4cb18ad1ca1b3b2af57319388a364da1f8f6a/simuOpt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9027,
12,
2890,
16,
1158,
6353,
33,
7036,
16,
290,
914,
273,
404,
16,
866,
2615,
33,
5510,
16,
999,
56,
79,
2761,
33,
7036,
16,
3988,
33,
8381,
4672,
9163,
968,
1472,
628,
28305,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9027,
12,
2890,
16,
1158,
6353,
33,
7036,
16,
290,
914,
273,
404,
16,
866,
2615,
33,
5510,
16,
999,
56,
79,
2761,
33,
7036,
16,
3988,
33,
8381,
4672,
9163,
968,
1472,
628,
28305,
145... |
if comment.attribHas("type"): | if comment.attribHas(attrib, "type"): | def handleClassDefinition(docTree, item): params = item.getChild("params") paramsLen = len(params.children); if paramsLen == 1: superClassName = "Object" ctorItem = None elif paramsLen == 2: superClassName = "Object" ctorItem = params.children[1] elif paramsLen == 3: superClassName = assembleVariable(params.children[1]) ctorItem = params.children[2] else: raise DocException("defineClass call has more than three parameters: " + str(len(params.children)), item) className = params.children[0].get("value") classNode = getClassNode(docTree, className) if superClassName != "Object": superClassNode = getClassNode(docTree, superClassName) childClasses = superClassNode.get("childClasses", False) if childClasses: childClasses += "," + className else: childClasses = className superClassNode.set("childClasses", childClasses) classNode.set("superClass", superClassName) commentAttributes = comment.parseNode(item) for attrib in commentAttributes: if attrib["category"] == "event": # Add the event if comment.attribHas("type"): addEventNode(classNode, item, attrib); else: addError(classNode, "Documentation contains malformed event attribute.", item) # Add the constructor if ctorItem and ctorItem.type == "function": ctor = handleFunction(ctorItem, commentAttributes, classNode) ctor.set("isCtor", True) classNode.addListChild("constructor", ctor) # Check for methods defined in the constructor # (for method definition style that supports real private methods) ctorBlock = ctorItem.getChild("body").getChild("block") if ctorBlock.hasChildren(): for item in ctorBlock.children: if item.type == "assignment": leftItem = item.getFirstListChild("left") rightItem = item.getFirstListChild("right") # It's a method definition if leftItem.type == "variable" and len(leftItem.children) == 2 and (leftItem.children[0].get("name") == "this" or leftItem.children[0].get("name") == "self") and rightItem.type == "function": handleMethodDefinition(item, False, classNode) elif ctorItem and ctorItem.type == "map": for keyvalueItem in ctorItem.children: valueItem = keyvalueItem.getChild("value").getFirstChild() if (valueItem.type == "function"): handleMethodDefinition(keyvalueItem, True, classNode) else: handleConstantDefinition(keyvalueItem, classNode) return classNode; | 8c21679870f9bbaac5b35e37c93cad5bb8ab73ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/8c21679870f9bbaac5b35e37c93cad5bb8ab73ba/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
797,
1852,
12,
2434,
2471,
16,
761,
4672,
859,
273,
761,
18,
588,
1763,
2932,
2010,
7923,
225,
859,
2891,
273,
562,
12,
2010,
18,
5906,
1769,
309,
859,
2891,
422,
404,
30,
2240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
797,
1852,
12,
2434,
2471,
16,
761,
4672,
859,
273,
761,
18,
588,
1763,
2932,
2010,
7923,
225,
859,
2891,
273,
562,
12,
2010,
18,
5906,
1769,
309,
859,
2891,
422,
404,
30,
2240,
... |
""" fl_add_event_callback(win, ev, py_wincb, user_data) -> event callback ref. | """ fl_add_event_callback(win, ev, py_wincb, user_data) -> event callback | def fl_add_event_callback(win, ev, py_wincb, user_data): """ fl_add_event_callback(win, ev, py_wincb, user_data) -> event callback ref. """ c_wincb = FL_APPEVENT_CB(py_wincb) retval = _fl_add_event_callback(win, ev, c_wincb, user_data) _cfunc_refs[tmpval1] = c_wincb return retval | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
1289,
67,
2575,
67,
3394,
12,
8082,
16,
2113,
16,
2395,
67,
8082,
7358,
16,
729,
67,
892,
4672,
3536,
1183,
67,
1289,
67,
2575,
67,
3394,
12,
8082,
16,
2113,
16,
2395,
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,
1183,
67,
1289,
67,
2575,
67,
3394,
12,
8082,
16,
2113,
16,
2395,
67,
8082,
7358,
16,
729,
67,
892,
4672,
3536,
1183,
67,
1289,
67,
2575,
67,
3394,
12,
8082,
16,
2113,
16,
2395,
67,
... |
subtype = list(attr_types) | subtype = attr_types[:] | def ifa_split_no_confusion(cl, dcpa, varnum, classes_nr, nr_classes, csites, allnodes, split): '''creation sites on single path: split them off, possibly reusing contour''' attr_types = nr_classes[dcpa] noconf = set([n for n in csites if len(n.paths)==1]) others = len(csites) - len(noconf) subtype_csites = {} for node in noconf: assign_set = node.paths[0] if len(attr_types) == 1 and list(attr_types)[0] == assign_set: # XXX only one var others += 1 else: subtype = list(attr_types) subtype[varnum] = assign_set subtype = tuple(subtype) try: subtype_csites[subtype].append(node) except KeyError: subtype_csites[subtype] = [node] items = subtype_csites.items() if not others: items = items[1:] for subtype, csites in subtype_csites.iteritems(): if subtype in classes_nr: # reuse contour nr = classes_nr[subtype] split.append((cl, dcpa, csites, nr)) cl.splits[nr] = dcpa else: # create new contour classes_nr[subtype] = cl.newdcpa ifa_split_class(cl, dcpa, csites, split) | 1e46cb49994e29bdac7a6514502ee2e2b0d5d451 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4470/1e46cb49994e29bdac7a6514502ee2e2b0d5d451/infer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
309,
69,
67,
4939,
67,
2135,
67,
3923,
7063,
12,
830,
16,
302,
4057,
69,
16,
569,
2107,
16,
3318,
67,
11611,
16,
9884,
67,
4701,
16,
2873,
2997,
16,
777,
4690,
16,
1416,
4672,
9163,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
309,
69,
67,
4939,
67,
2135,
67,
3923,
7063,
12,
830,
16,
302,
4057,
69,
16,
569,
2107,
16,
3318,
67,
11611,
16,
9884,
67,
4701,
16,
2873,
2997,
16,
777,
4690,
16,
1416,
4672,
9163,
... |
def __getReplicaManager(self): | def __getReplicaManager( self ): | def __getReplicaManager(self): if not self.rm: self.rm = ReplicaManager() | 203b3f482634aa69b2569c32c04bfbf6f7a10c51 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/203b3f482634aa69b2569c32c04bfbf6f7a10c51/PutAndRegister.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
14222,
1318,
12,
365,
262,
30,
309,
486,
365,
18,
8864,
30,
365,
18,
8864,
273,
16928,
1318,
1435,
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,
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,
1001,
588,
14222,
1318,
12,
365,
262,
30,
309,
486,
365,
18,
8864,
30,
365,
18,
8864,
273,
16928,
1318,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
output.stat = bps / 1e9 | output.stat = (etherdev.rxBandwidth + etherdev.txBandwidth) / 1e9 | def display(): if options.graph: output.graph(command, options.graphdir, proxy) else: output.display(command, options.binned, options.printmode) | 29f50d934549f10b073a5492bd0d441d71534ace /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6787/29f50d934549f10b073a5492bd0d441d71534ace/stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
13332,
309,
702,
18,
4660,
30,
876,
18,
4660,
12,
3076,
16,
702,
18,
4660,
1214,
16,
2889,
13,
469,
30,
876,
18,
5417,
12,
3076,
16,
702,
18,
4757,
11748,
16,
702,
18,
1188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2562,
13332,
309,
702,
18,
4660,
30,
876,
18,
4660,
12,
3076,
16,
702,
18,
4660,
1214,
16,
2889,
13,
469,
30,
876,
18,
5417,
12,
3076,
16,
702,
18,
4757,
11748,
16,
702,
18,
1188,
... |
print 'Opened %s' % format_title(d) | log.debug('Opened %s' % d.file_name) | def dict_opened(d): progress.setValue(progress.value() + 1) print 'Opened %s' % format_title(d) if d not in self.dictionaries: self.dictionaries.append(d) | 67a3086e42b74c3a053a1f3d5818584b41ba19d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14305/67a3086e42b74c3a053a1f3d5818584b41ba19d4/qtui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2065,
67,
25304,
12,
72,
4672,
4007,
18,
542,
620,
12,
8298,
18,
1132,
1435,
397,
404,
13,
613,
18,
4148,
2668,
23115,
738,
87,
11,
738,
302,
18,
768,
67,
529,
13,
309,
302,
486,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2065,
67,
25304,
12,
72,
4672,
4007,
18,
542,
620,
12,
8298,
18,
1132,
1435,
397,
404,
13,
613,
18,
4148,
2668,
23115,
738,
87,
11,
738,
302,
18,
768,
67,
529,
13,
309,
302,
486,
3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.