rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
return string.join(ls,',') | return string.join([str(vsrandom.randrange(0,4194304))]+ls,',') | def makeVarList(ls): """formats a list of variables to be stored in a save game for later reference""" return string.join(ls,',') | 3d999b687e07fad9dd6af794f9c23adad2fe9b2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/3d999b687e07fad9dd6af794f9c23adad2fe9b2a/dynamic_news.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1537,
682,
12,
3251,
4672,
3536,
11962,
279,
666,
434,
3152,
358,
506,
4041,
316,
279,
1923,
7920,
364,
5137,
2114,
8395,
327,
533,
18,
5701,
3816,
701,
12,
6904,
9188,
18,
7884,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1537,
682,
12,
3251,
4672,
3536,
11962,
279,
666,
434,
3152,
358,
506,
4041,
316,
279,
1923,
7920,
364,
5137,
2114,
8395,
327,
533,
18,
5701,
3816,
701,
12,
6904,
9188,
18,
7884,
... |
GnuCompile = "gcc -g -fPIC " | def Boot(): global BuildLocal BuildLocal += " -boot -keep " Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. GnuCompile = "gcc -g -fPIC " SunCompile = "cc -g -mt -xcode=pic32 -xldscope=symbolic " Compile = { "SOLsun" : SunCompile, "SPARC64_SOLARIS" : SunCompile, }.get(Target) or GnuCompile Compile = Compile + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLsun" : " -xarch=v8plus ", "SPARC32_LINUX" : " -m32 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", "SPARC64_SOLARIS" : " -xarch=v9 ", }.get(Target) or " ") SunLink = " -lrt -lm -lnsl -lsocket -lpthread " Link = Compile + ({ "ARM_DARWIN" : " ", "AMD64_DARWIN" : " ", "I386_DARWIN" : " ", "PPC_DARWIN" : " ", "PPC64_DARWIN" : " ", # SOLgnu? "SOLsun" : SunLink, "SPARC64_SOLARIS" : SunLink, "PA32_HPUX" : " -lrt -lm ", }.get(Target) or " -lm -lpthread ") # not in Link Compile += " -c " Assemble = ("as " + ({ "AMD64_LINUX" : " --64 ", "ARM_DARWIN" : " -arch armv6 ", "LINUXLIBC6" : " --32 ", "SPARC32_LINUX" : " -32 ", "SPARC64_LINUX" : " -64 ", "SPARC64_LINUX" : " -64 -Av9 ", "SOLsun" : " -s -K PIC -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -K PIC -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", }.get(Target) or "" Compile = GnuPlatformPrefix + Compile Link = GnuPlatformPrefix + Link Assemble = GnuPlatformPrefix + Assemble # # squeeze runs of spaces and spaces at end # Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) Assemble = re.sub(" +", " ", Assemble) Assemble = re.sub(" +$", "", Assemble) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] if Target == "NT386": P += ["mklib"] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Makefile.write(".SUFFIXES:\nall: cm3\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\nset -e\nset -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n") a.write("Assemble=" + Assemble + "\nCompile=" + Compile + "\nLink=" + Link + "\n") a.write("\n\n# no more editing should be needed\n\n") for a in [Make]: a.write("Assemble=\"" + Assemble + "\"\nCompile=\"" + Compile + "\"\nLink=\"" + Link + "\"\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): if (a.endswith(".ms") or a.endswith(".is") or a.endswith(".s") or a.endswith(".c")): CopyFile(os.path.join(Root, dir, Config, a), BootDir) Makefile.write("Objects += " + a + ".o\n" + a + ".o: " + a + "\n\t") if a.endswith(".c"): Command = "Compile" else: Command = "Assemble" for b in [Make, Makefile]: b.write("${" + Command + "} " + a + " -o " + a + ".o\n") if a.endswith(".h"): CopyFile(os.path.join(Root, dir, Config, a), BootDir) Makefile.write("cm3: $(Objects)\n\t") for a in [Make, Makefile]: a.write("$(Link) -o cm3 *.o\n") Common = "Common" for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/" + Common + "/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/linux-32/m3makefile", "m3-libs/m3core/src/unix/linux-64/m3makefile", "m3-libs/m3core/src/unix/freebsd-common/m3makefile", "m3-libs/m3core/src/unix/freebsd-common/Uerror.i3", "m3-libs/m3core/src/unix/freebsd-common/Usysdep.i3", "m3-libs/m3core/src/unix/freebsd-common/Uucontext.i3", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/" + Common + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Common + "/Csignal.i3", "m3-libs/m3core/src/C/" + Common + "/Cstdio.i3", "m3-libs/m3core/src/C/" + Common + "/Cstring.i3", "m3-libs/m3core/src/C/" + Common + "/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile]: a.close() _MakeArchive(BootDir[2:]) | e2ca989cc63374abbf00d2cd5424ded9b4f00af5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9328/e2ca989cc63374abbf00d2cd5424ded9b4f00af5/pylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
315,
225,
4049,
273,
315,
21,
6,
225,
468,
1220,
1779,
353,
16975,
628,
326,
642,
1390,
18,
468,
399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
315,
225,
4049,
273,
315,
21,
6,
225,
468,
1220,
1779,
353,
16975,
628,
326,
642,
1390,
18,
468,
399,
... | |
raise "Empty command" | return | def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command" | 3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
977,
67,
3076,
12,
2890,
16,
4172,
1080,
16,
5668,
4672,
309,
486,
1797,
1080,
30,
1002,
315,
1921,
1296,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
977,
67,
3076,
12,
2890,
16,
4172,
1080,
16,
5668,
4672,
309,
486,
1797,
1080,
30,
1002,
315,
1921,
1296,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
handler = self.lib.handlers['coercableKeywordWithCompatibleTypes'] assert_equals(handler._arg_coercer(['9999', '-42', 'FaLsE', '31.31']), [9999, -42, False, 31.31]) | self._test_coercion(self._handler_named('coercableKeywordWithCompatibleTypes'), ['9999', '-42', 'FaLsE', '31.31'], [9999, -42, False, 31.31]) | def test_coercion_with_compatible_types(self): handler = self.lib.handlers['coercableKeywordWithCompatibleTypes'] assert_equals(handler._arg_coercer(['9999', '-42', 'FaLsE', '31.31']), [9999, -42, False, 31.31]) | d798a90e3520a631e948b83c29999ddb51ea1790 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/d798a90e3520a631e948b83c29999ddb51ea1790/test_handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2894,
12610,
285,
67,
1918,
67,
10943,
67,
2352,
12,
2890,
4672,
1838,
273,
365,
18,
2941,
18,
11046,
3292,
2894,
12610,
429,
8736,
1190,
14599,
2016,
3546,
1815,
67,
14963,
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,
1842,
67,
2894,
12610,
285,
67,
1918,
67,
10943,
67,
2352,
12,
2890,
4672,
1838,
273,
365,
18,
2941,
18,
11046,
3292,
2894,
12610,
429,
8736,
1190,
14599,
2016,
3546,
1815,
67,
14963,
12... |
""" % (b[3], b[1], b[2], b[0], tile.z, base_path, tile.layer.name, tile.z, tile.x, tile.y, b[3], b[1], b[2], b[0], "\n".join(network_links))) | """ % (max_lod_pixels, b[3], b[1], b[2], b[0], tile.z, base_path, tile.layer.name, tile.z, tile.x, tile.y, b[3], b[1], b[2], b[0], "\n".join(network_links))) | def generate_kml_doc(self, tile, base_path="", include_wrapper = True): tiles = [ Layer.Tile(tile.layer, tile.x << 1, tile.y << 1, tile.z + 1), Layer.Tile(tile.layer, (tile.x << 1) + 1, tile.y << 1, tile.z + 1), Layer.Tile(tile.layer, (tile.x << 1) + 1, (tile.y << 1) + 1, tile.z + 1), Layer.Tile(tile.layer, tile.x << 1 , (tile.y << 1) + 1, tile.z + 1) ] network_links = [] for single_tile in tiles: b = single_tile.bounds() network_links.append("""<NetworkLink> <name>tile</name> <Region> <Lod> <minLodPixels>256</minLodPixels><maxLodPixels>-1</maxLodPixels> </Lod> <LatLonAltBox> <north>%s</north><south>%s</south> <east>%s</east><west>%s</west> </LatLonAltBox> </Region> <Link> <href>%s/1.0.0/%s/%s/%s/%s.kml</href> <viewRefreshMode>onRegion</viewRefreshMode> </Link> | a536f4f61308039e1f4012b0f362496c8dee0dbe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6188/a536f4f61308039e1f4012b0f362496c8dee0dbe/KML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
79,
781,
67,
2434,
12,
2890,
16,
4769,
16,
1026,
67,
803,
1546,
3113,
2341,
67,
8376,
273,
1053,
4672,
12568,
273,
306,
12112,
18,
9337,
12,
15368,
18,
6363,
16,
4769,
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,
2103,
67,
79,
781,
67,
2434,
12,
2890,
16,
4769,
16,
1026,
67,
803,
1546,
3113,
2341,
67,
8376,
273,
1053,
4672,
12568,
273,
306,
12112,
18,
9337,
12,
15368,
18,
6363,
16,
4769,
18,
... |
continue | def near_callback(args, geom1, geom2): global BLOCK1, BLOCK2, kicker, kicker2 contacts=ode.collide(geom1, geom2) world, contactgroup = args for c in contacts: if (geom1 in kickerGeom) or (geom2 in kickerGeom) or (geom1 in kickerGeom2) or (geom2 in kickerGeom2): c.setMu(1E5) #kickers have high friction, minimal bounce - FIXME: does not work. you still can't stop balls c.setBounce(1) if (geom1 in kickerGeom and geom2 in kickerGeom2) or (geom1 in kickerGeom2 and geom2 in kickerGeom2): pass else: if geom1 in kickerGeom or geom2 in kickerGeom: angle = kicker.getH() if ((angle < -60) and (angle>-90)) or ((angle > 60) and (angle<90)): BLOCK1 = True ballBody.setLinearVel((0,0,0)) continue else: angle = kicker2.getH() if ((angle < -60) and (angle>-90)) or ((angle > 60) and (angle<90)): BLOCK2 = True ballBody.setLinearVel((0,0,0)) continue elif (geom1 == tableGeom) or (geom2 == tableGeom): c.setMu(10) #table has little bounce, noticeable friction c.setBounce(1.5) elif (geom1 in wallGeom) or (geom2 in wallGeom): c.setMu(1) #walls have ok bounce, noticeable friction c.setBounce(2) else: #ignore anything else. I have no idea what that could be print "something undetected collided with my balls. ouch." continue j=ode.ContactJoint(world, contactgroup, c) j.attach(geom1.getBody(), geom2.getBody()) | 1594fe0ae5fd7ca96da99fe3bb0d1e113aacb831 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12834/1594fe0ae5fd7ca96da99fe3bb0d1e113aacb831/kickern.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13378,
67,
3394,
12,
1968,
16,
7364,
21,
16,
7364,
22,
4672,
2552,
14073,
21,
16,
14073,
22,
16,
417,
5448,
16,
417,
5448,
22,
14841,
33,
390,
18,
1293,
8130,
12,
10049,
21,
16,
7364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13378,
67,
3394,
12,
1968,
16,
7364,
21,
16,
7364,
22,
4672,
2552,
14073,
21,
16,
14073,
22,
16,
417,
5448,
16,
417,
5448,
22,
14841,
33,
390,
18,
1293,
8130,
12,
10049,
21,
16,
7364... | |
def setProperty(self, id, value, type='string', meta=None): | def _setProperty(self, id, value, type='string', meta=None): | def setProperty(self, id, value, type='string', meta=None): # Set a new property with the given id, value and optional type. # Note that different property sets may support different typing # systems. if not self.valid_property_id(id): raise 'Bad Request', 'Invalid property id.' self=self.v_self() if meta is None: meta={} prop={'id':id, 'type':type, 'meta':meta} self._properties=self._properties+(prop,) setattr(self, id, value) | 4439ae48b5e95794878f9c4bbfbe1eabd161d57e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4439ae48b5e95794878f9c4bbfbe1eabd161d57e/PropertySheets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
1396,
12,
2890,
16,
612,
16,
460,
16,
618,
2218,
1080,
2187,
2191,
33,
7036,
4672,
468,
1000,
279,
394,
1272,
598,
326,
864,
612,
16,
460,
471,
3129,
618,
18,
468,
3609,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
1396,
12,
2890,
16,
612,
16,
460,
16,
618,
2218,
1080,
2187,
2191,
33,
7036,
4672,
468,
1000,
279,
394,
1272,
598,
326,
864,
612,
16,
460,
471,
3129,
618,
18,
468,
3609,
71... |
dirs_in_sys_path[dircase] = 1 | _dirs_in_sys_path[dircase] = 1 | def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) | 7f5296e7c06f5a6010960f34ae7db89d8902cddb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f5296e7c06f5a6010960f34ae7db89d8902cddb/site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
803,
30857,
4481,
4672,
1577,
273,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
5701,
30857,
4481,
3719,
327,
1577,
16,
1140,
18,
803,
18,
7959,
3593,
12,
1214,
13,
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,
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,
1221,
803,
30857,
4481,
4672,
1577,
273,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
5701,
30857,
4481,
3719,
327,
1577,
16,
1140,
18,
803,
18,
7959,
3593,
12,
1214,
13,
225,
... |
ecotype_info, strain_id_label_x_offset=0.9, snp_id_label_y_offset=0.9): | ecotype_info, strain_id_label_x_offset=0.9, snp_id_label_y_offset=0.9, strain_snp_label_font_size=1): | def drawSNPMtrix(self, axe_snp_matrix, subSNPData, top_snp_data, StrainID2PCAPosInfo, SNPID2PCAPosInfo, \ ecotype_info, strain_id_label_x_offset=0.9, snp_id_label_y_offset=0.9): """ 2008-10-07 1. allele=1 no color (white), 2(red) 2. snpData.snp_id2index_type. index_type=1(polarized), shape=square. index_type=2(MAF), circle. index_type=3(weirdo), triangle 3. alpha of each cell determined by the score in top_snp_data.score_ls 4. label strain, snp plainlys """ sys.stderr.write("Drawing SNP matrix ...") no_of_snps = len(top_snp_data.snp_id_ls) max_score = max(top_snp_data.score_ls) min_score = min(top_snp_data.score_ls) cell_x_len = SNPID2PCAPosInfo.step cell_y_len = StrainID2PCAPosInfo.step radius = min(cell_x_len, cell_y_len)/2. #half of the smaller one for i in range(no_of_snps): snp_id = top_snp_data.snp_id_ls[i] #draw snp label snp_img_x_pos = SNPID2PCAPosInfo.snp_id2img_x_pos[snp_id] axe_snp_matrix.text(snp_img_x_pos, snp_id_label_y_offset, snp_id, rotation='vertical', \ horizontalalignment ='left', verticalalignment='bottom', size=2) col_index = subSNPData.col_id2col_index[snp_id] index_type = subSNPData.snp_id2index_type[snp_id] score = top_snp_data.score_ls[i] alpha = (score-min_score)/(max_score-min_score)*(1-0.2)+0.2 #alpha from 0.2 to 1. can't be low. for strain_id in StrainID2PCAPosInfo.strain_id_ls: strain_img_y_pos = StrainID2PCAPosInfo.strain_id2img_y_pos[strain_id] row_index = subSNPData.row_id2row_index[strain_id] allele = subSNPData.data_matrix[row_index][col_index] if allele==1: facecolor = 'w' elif allele==2: facecolor = 'r' else: facecolor = 'b' if i ==0: #draw strain label, first SNP ecotype_id = int(strain_id) nativename = ecotype_info.ecotypeid2nativename[ecotype_id] strain_label = '%s_%s'%(strain_id, nativename) axe_snp_matrix.text(strain_id_label_x_offset, strain_img_y_pos, strain_label, \ horizontalalignment ='left', verticalalignment='bottom', size=2) center = (snp_img_x_pos+cell_x_len/2., strain_img_y_pos+cell_y_len/2.) if index_type==1: xs = [snp_img_x_pos, snp_img_x_pos+cell_x_len, snp_img_x_pos+cell_x_len, snp_img_x_pos] ys = [strain_img_y_pos, strain_img_y_pos, strain_img_y_pos+cell_y_len, strain_img_y_pos+cell_y_len] patch = Polygon(zip(xs,ys), facecolor=facecolor, linewidth=0, alpha=alpha) # elif index_type==2: patch = Ellipse(center, cell_x_len, cell_y_len, facecolor=facecolor, linewidth=0, alpha=alpha) else: patch = Wedge(center, radius, -90, 90, facecolor=facecolor, linewidth=0, alpha=alpha) axe_snp_matrix.add_patch(patch) sys.stderr.write("Done.\n") | 8b01df4ec5dda455ad1b712723f6e5a54471503a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/8b01df4ec5dda455ad1b712723f6e5a54471503a/PlotGroupOfSNPs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
13653,
12728,
313,
697,
12,
2890,
16,
1740,
73,
67,
87,
6782,
67,
5667,
16,
720,
13653,
52,
751,
16,
1760,
67,
87,
6782,
67,
892,
16,
3978,
530,
734,
22,
3513,
37,
1616,
966,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
13653,
12728,
313,
697,
12,
2890,
16,
1740,
73,
67,
87,
6782,
67,
5667,
16,
720,
13653,
52,
751,
16,
1760,
67,
87,
6782,
67,
892,
16,
3978,
530,
734,
22,
3513,
37,
1616,
966,
... |
name = match.group(2) or match.group(3) or match.group(4) | name = (match.group(2) or match.group(3) or match.group(4)).lower() | def process_request(self, req): req.perm.assert_permission('TIMELINE_VIEW') | ae68aae6f6228aba9a386d9ad430d51549e30cee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/ae68aae6f6228aba9a386d9ad430d51549e30cee/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
11231,
67,
9827,
2668,
4684,
5997,
67,
12145,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
11231,
67,
9827,
2668,
4684,
5997,
67,
12145,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
>>> x = [pickle.PicklingError()] * 2 | >>> from pickletools import _Example >>> x = [_Example(42)] * 2 | def dis(pickle, out=None, memo=None, indentlevel=4): """Produce a symbolic disassembly of a pickle. 'pickle' is a file-like object, or string, containing a (at least one) pickle. The pickle is disassembled from the current position, through the first STOP opcode encountered. Optional arg 'out' is a file-like object to which the disassembly is printed. It defaults to sys.stdout. Optional arg 'memo' is a Python dict, used as the pickle's memo. It may be mutated by dis(), if the pickle contains PUT or BINPUT opcodes. Passing the same memo object to another dis() call then allows disassembly to proceed across multiple pickles that were all created by the same pickler with the same memo. Ordinarily you don't need to worry about this. Optional arg indentlevel is the number of blanks by which to indent a new MARK level. It defaults to 4. In addition to printing the disassembly, some sanity checks are made: + All embedded opcode arguments "make sense". + Explicit and implicit pop operations have enough items on the stack. + When an opcode implicitly refers to a markobject, a markobject is actually on the stack. + A memo entry isn't referenced before it's defined. + The markobject isn't stored in the memo. + A memo entry isn't redefined. """ # Most of the hair here is for sanity checks, but most of it is needed # anyway to detect when a protocol 0 POP takes a MARK off the stack # (which in turn is needed to indent MARK blocks correctly). stack = [] # crude emulation of unpickler stack if memo is None: memo = {} # crude emulation of unpicker memo maxproto = -1 # max protocol number seen markstack = [] # bytecode positions of MARK opcodes indentchunk = ' ' * indentlevel errormsg = None for opcode, arg, pos in genops(pickle): if pos is not None: print >> out, "%5d:" % pos, line = "%-4s %s%s" % (repr(opcode.code)[1:-1], indentchunk * len(markstack), opcode.name) maxproto = max(maxproto, opcode.proto) before = opcode.stack_before # don't mutate after = opcode.stack_after # don't mutate numtopop = len(before) # See whether a MARK should be popped. markmsg = None if markobject in before or (opcode.name == "POP" and stack and stack[-1] is markobject): assert markobject not in after if __debug__: if markobject in before: assert before[-1] is stackslice if markstack: markpos = markstack.pop() if markpos is None: markmsg = "(MARK at unknown opcode offset)" else: markmsg = "(MARK at %d)" % markpos # Pop everything at and after the topmost markobject. while stack[-1] is not markobject: stack.pop() stack.pop() # Stop later code from popping too much. try: numtopop = before.index(markobject) except ValueError: assert opcode.name == "POP" numtopop = 0 else: errormsg = markmsg = "no MARK exists on stack" # Check for correct memo usage. if opcode.name in ("PUT", "BINPUT", "LONG_BINPUT"): assert arg is not None if arg in memo: errormsg = "memo key %r already defined" % arg elif not stack: errormsg = "stack is empty -- can't store into memo" elif stack[-1] is markobject: errormsg = "can't store markobject in the memo" else: memo[arg] = stack[-1] elif opcode.name in ("GET", "BINGET", "LONG_BINGET"): if arg in memo: assert len(after) == 1 after = [memo[arg]] # for better stack emulation else: errormsg = "memo key %r has never been stored into" % arg if arg is not None or markmsg: # make a mild effort to align arguments line += ' ' * (10 - len(opcode.name)) if arg is not None: line += ' ' + repr(arg) if markmsg: line += ' ' + markmsg print >> out, line if errormsg: # Note that we delayed complaining until the offending opcode # was printed. raise ValueError(errormsg) # Emulate the stack effects. if len(stack) < numtopop: raise ValueError("tries to pop %d items from stack with " "only %d items" % (numtopop, len(stack))) if numtopop: del stack[-numtopop:] if markobject in after: assert markobject not in before markstack.append(pos) stack.extend(after) print >> out, "highest protocol among opcodes =", maxproto if stack: raise ValueError("stack not empty after STOP: %r" % stack) | 85dabbedd136635394c036f7c1e517b534237084 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/85dabbedd136635394c036f7c1e517b534237084/pickletools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1015,
12,
20847,
16,
596,
33,
7036,
16,
11063,
33,
7036,
16,
3504,
2815,
33,
24,
4672,
3536,
25884,
279,
16754,
1015,
28050,
434,
279,
13379,
18,
225,
296,
20847,
11,
353,
279,
585,
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,
1015,
12,
20847,
16,
596,
33,
7036,
16,
11063,
33,
7036,
16,
3504,
2815,
33,
24,
4672,
3536,
25884,
279,
16754,
1015,
28050,
434,
279,
13379,
18,
225,
296,
20847,
11,
353,
279,
585,
17... |
if globalVars.keyCounter!=lastKeyCount: break | def _speakSpellingGen(text): lastKeyCount=globalVars.keyCounter textLength=len(text) synth=getSynth() synthConfig=config.conf["speech"][synth.name] for count,char in enumerate(text): uppercase=char.isupper() char=processSymbol(char) if uppercase and synthConfig["sayCapForCapitals"]: char=_("cap %s")%char if uppercase and synth.isSupported("pitch") and synthConfig["raisePitchForCapitals"]: oldPitch=synthConfig["pitch"] synth.pitch=max(0,min(oldPitch+synthConfig["capPitchChange"],100)) index=count+1 log.io("Speaking character %r"%char) if len(char) == 1 and synthConfig["useSpellingFunctionality"]: synth.speakCharacter(char,index=index) else: synth.speakText(char,index=index) if uppercase and synth.isSupported("pitch") and synthConfig["raisePitchForCapitals"]: synth.pitch=oldPitch while textLength>1 and globalVars.keyCounter==lastKeyCount and (isPaused or getLastSpeechIndex()!=index): yield yield if globalVars.keyCounter!=lastKeyCount: break if uppercase and synthConfig["beepForCapitals"]: tones.beep(2000,50) | cf8afe98c4ab333e0fd150793a9c2012d082d2d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/cf8afe98c4ab333e0fd150793a9c2012d082d2d2/speech.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
87,
10244,
3389,
1165,
310,
7642,
12,
955,
4672,
29928,
1380,
33,
6347,
5555,
18,
856,
4789,
977,
1782,
33,
1897,
12,
955,
13,
6194,
451,
33,
588,
10503,
451,
1435,
6194,
451,
809... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
87,
10244,
3389,
1165,
310,
7642,
12,
955,
4672,
29928,
1380,
33,
6347,
5555,
18,
856,
4789,
977,
1782,
33,
1897,
12,
955,
13,
6194,
451,
33,
588,
10503,
451,
1435,
6194,
451,
809... | |
il=self._items_list num_items = len(il) need_remove = num_items - int(0.75 * self.max_items) for i in range(need_remove): item=il.pop(0) try: del self._items[item.address] except KeyError: pass while il and il[0].update_state()=="purged": item=il.pop(0) try: del self._items[item.address] except KeyError: pass | self._lock.acquire() try: il=self._items_list num_items = len(il) need_remove = num_items - int(0.75 * self.max_items) for i in range(need_remove): item=il.pop(0) try: del self._items[item.address] except KeyError: pass while il and il[0].update_state()=="purged": item=il.pop(0) try: del self._items[item.address] except KeyError: pass finally: self._lock.release() | def purge_items(self): """Remove purged and overlimit items from the cache. | 0565c1af1db0e5a1d306ebc4583856d6a63afa5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/0565c1af1db0e5a1d306ebc4583856d6a63afa5f/cache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
67,
3319,
12,
2890,
4672,
3536,
3288,
5405,
2423,
471,
1879,
3595,
1516,
628,
326,
1247,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
11668,
67,
3319,
12,
2890,
4672,
3536,
3288,
5405,
2423,
471,
1879,
3595,
1516,
628,
326,
1247,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.terminalProtocol.ps[0] = self.terminalProtocol.ps_init[0] | def copy_input_line(self, line=None): self.terminalProtocol.ps[0] = self.terminalProtocol.ps_init[0] self.terminalProtocol.cursorToBOL() self.terminal.eraseLine() self.terminalProtocol.drawInputLine(line) self.terminal.nextLine() | 1d514a80770cf714ff82d80db5c916c2a6fb1fba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/1d514a80770cf714ff82d80db5c916c2a6fb1fba/console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
2630,
67,
1369,
12,
2890,
16,
980,
33,
7036,
4672,
365,
18,
15979,
5752,
18,
9216,
774,
38,
1741,
1435,
365,
18,
15979,
18,
264,
448,
1670,
1435,
365,
18,
15979,
5752,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
2630,
67,
1369,
12,
2890,
16,
980,
33,
7036,
4672,
365,
18,
15979,
5752,
18,
9216,
774,
38,
1741,
1435,
365,
18,
15979,
18,
264,
448,
1670,
1435,
365,
18,
15979,
5752,
18,
... | |
def run(self): | def start(self): | def run(self): # Fix wrong type data from xmltodict when one station (*) if isinstance(self.conf['defuzz']['station'], dict): nb_stations = 1 else: nb_stations = len(self.conf['defuzz']['station']) print 'Number of stations : ' + str(nb_stations) for i in range(0,nb_stations): # Create a Queue #q = Queue.Queue(1) | ab8799f1c339289c045d33156b803d545ac43f7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12047/ab8799f1c339289c045d33156b803d545ac43f7b/defuzz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
468,
12139,
7194,
618,
501,
628,
2025,
88,
369,
933,
1347,
1245,
13282,
261,
12437,
309,
1549,
12,
2890,
18,
3923,
3292,
536,
9510,
21712,
17894,
17337,
2065,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
468,
12139,
7194,
618,
501,
628,
2025,
88,
369,
933,
1347,
1245,
13282,
261,
12437,
309,
1549,
12,
2890,
18,
3923,
3292,
536,
9510,
21712,
17894,
17337,
2065,
4672,
... |
call_info_id2fname[call_info.id] = [call_info.array.maternal_ecotype_id, call_info.filename, call_info.array_id] | if input_dir: filename = os.path.join(input_dir, os.path.basename(call_info.filename)) else: filename = call_info.filename call_info_id2fname[call_info.id] = [call_info.array.maternal_ecotype_id, filename, call_info.array_id] | def get_call_info_id2fname(cls, db, QC_method_id, call_method_id, filter_calls_QCed=1, max_call_info_mismatch_rate=1, debug=0, min_no_of_non_NA_pairs=40): """ 2008-09-05 add option min_no_of_non_NA_pairs. change the way to filter out data with too high mismatch rate. previously, if the QC with the most no_of_non_NA_pairs has mismatch_rate>max_call_info_mismatch_rate, ignore. now if any QC with min_no_of_non_NA_pairs has mismatch_rate>max_call_info_mismatch_rate, ignore. 2008-07-01 add max_call_info_mismatch_rate <1 in the condition. 2008-05-18 add array_id to the call_info_id2fname structure 2008-05-06 use sqlalchemy connection 2008-05-05 add option filter_calls_QCed 2008-04-20 call_info entries that QC haven't been done. and its corresponding maternal_ecotype_id=paternal_ecotype_id (no crosses). """ sys.stderr.write("Getting call_info_id2fname ... ") #curs.execute("select distinct c.id, c.filename, a.maternal_ecotype_id, a.paternal_ecotype_id, q.id as qc_id, q.QC_method_id \ # from %s a, %s c left join %s q on c.id=q.call_info_id where c.array_id=a.id and a.maternal_ecotype_id=a.paternal_ecotype_id and c.method_id=%s"%\ # (array_info_table, call_info_table, call_QC_table, call_method_id)) #rows = curs.fetchall() call_info_ls = CallInfo.query.filter_by(method_id=call_method_id).all() call_info_id2fname = {} call_info_ls_to_return = [] for call_info in call_info_ls: if call_info.array.maternal_ecotype_id!=call_info.array.paternal_ecotype_id: #ignore crosses continue if not call_info.array.maternal_ecotype_id: #not linked to ecotypeid yet continue ignore_this = 0 if filter_calls_QCed: for call_QC in call_info.call_qc_ls: if call_QC.qc_method_id==QC_method_id: #same QC method has been done on this ignore_this = 1 break #choose the call_QC with maximum no of non-NA pairs to get mismatch_rate if call_info.call_qc_ls and max_call_info_mismatch_rate<1: #2008-07-01 call_QC_with_max_no_of_non_NA_pairs = call_info.call_qc_ls[0] for call_QC in call_info.call_qc_ls: if call_QC.no_of_non_NA_pairs>=min_no_of_non_NA_pairs and call_QC.mismatch_rate>max_call_info_mismatch_rate: #if enough pairs and mismatch_rate too high, ignore ignore_this=1 break if call_QC.no_of_non_NA_pairs>call_QC_with_max_no_of_non_NA_pairs.no_of_non_NA_pairs: call_QC_with_max_no_of_non_NA_pairs = call_QC call_info.call_QC_with_max_no_of_non_NA_pairs = call_QC_with_max_no_of_non_NA_pairs else: call_info.call_QC_with_max_no_of_non_NA_pairs = None if ignore_this: continue call_info_id2fname[call_info.id] = [call_info.array.maternal_ecotype_id, call_info.filename, call_info.array_id] call_info_ls_to_return.append(call_info) #if debug and len(call_info_id2fname)>40: # break sys.stderr.write("%s call files. Done.\n"%(len(call_info_id2fname))) return call_info_id2fname, call_info_ls_to_return | e8a8bb38f1f872fe801dbb73dd4dc7dbd34bb539 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/e8a8bb38f1f872fe801dbb73dd4dc7dbd34bb539/QC_250k.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1991,
67,
1376,
67,
350,
22,
12749,
12,
6429,
16,
1319,
16,
2238,
39,
67,
2039,
67,
350,
16,
745,
67,
2039,
67,
350,
16,
1034,
67,
12550,
67,
53,
39,
329,
33,
21,
16,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1991,
67,
1376,
67,
350,
22,
12749,
12,
6429,
16,
1319,
16,
2238,
39,
67,
2039,
67,
350,
16,
745,
67,
2039,
67,
350,
16,
1034,
67,
12550,
67,
53,
39,
329,
33,
21,
16,
94... |
curclasses = ClassSection.objects.filter(class__parent_program = self.program, | curclasses = ClassSection.objects.filter(classsubject__parent_program = self.program, | def prepare(self, context=None): import operator | 9b11c85c31c5bb647d90a6c44b958151925c4ec7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/9b11c85c31c5bb647d90a6c44b958151925c4ec7/adminvitals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
12,
2890,
16,
819,
33,
7036,
4672,
1930,
3726,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
12,
2890,
16,
819,
33,
7036,
4672,
1930,
3726,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
groups.add(group) | def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] name: name of the stream to create [optional] yields: list of created bundle streams """ users = set() groups = set() bundle_streams = [] for stream_args in spec: initargs = { 'user': None, 'group': None, 'slug': stream_args.get('slug', ''), 'name': stream_args.get('name', '')} username = stream_args.get('user') if username: user = User.objects.get_or_create(username=username)[0] users.add(user) initargs['user'] = user groupname = stream_args.get('group') if groupname: group = Group.objects.get_or_create(name=groupname)[0] groups.add(group) initargs['group'] = group bundle_stream = BundleStream.objects.create(**initargs) bundle_stream.save() bundle_streams.append(bundle_stream) yield bundle_streams for bundle_stream in bundle_streams: bundle_stream.delete() for user in users: user.delete() for group in groups: group.delete() | 1bf7e9c81a8c80c89f5085e57e6b33bd3c945f22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12617/1bf7e9c81a8c80c89f5085e57e6b33bd3c945f22/fixtures.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2522,
67,
9991,
67,
16320,
12,
2793,
4672,
3536,
9705,
819,
3301,
716,
3414,
3440,
8205,
4888,
358,
7490,
225,
857,
353,
279,
666,
434,
16176,
598,
326,
3751,
1311,
30,
729,
30,
533,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2522,
67,
9991,
67,
16320,
12,
2793,
4672,
3536,
9705,
819,
3301,
716,
3414,
3440,
8205,
4888,
358,
7490,
225,
857,
353,
279,
666,
434,
16176,
598,
326,
3751,
1311,
30,
729,
30,
533,
1... | |
if set to 1, it is repainted and then set to 0 again if set to 2 then it is always dirty ( repainted each frame, flag is not reset) 0 means that it is not dirty and therefor not repainted again | If set to 1, it is repainted and then set to 0 again. If set to 2, it is always dirty (repainted each frame; flag is not reset). If set to 0, it is not dirty and therefore not repainted again. | def __repr__(self): return "<%s sprite(in %d groups)>" % (self.__class__.__name__, len(self.__g)) | d9760f3e4782abb02dd98080337626eefdad67ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/d9760f3e4782abb02dd98080337626eefdad67ee/sprite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
3532,
9,
87,
16839,
12,
267,
738,
72,
3252,
13,
2984,
738,
261,
2890,
16186,
1106,
972,
16186,
529,
972,
16,
562,
12,
2890,
16186,
75,
3719,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
3532,
9,
87,
16839,
12,
267,
738,
72,
3252,
13,
2984,
738,
261,
2890,
16186,
1106,
972,
16186,
529,
972,
16,
562,
12,
2890,
16186,
75,
3719,
2,
... |
common.debug("%r.process_key(%r,%r); table=%r" % (self,c,meta,self.keytable)) | def process_key(self,c,meta): common.debug("%r.process_key(%r,%r); table=%r" % (self,c,meta,self.keytable)) fun,arg=self.keytable[(c,meta)] if not isinstance(fun,KeyFunction): common.debug("funtable=%r" % (self.funtable,)) try: fun=self.lookup_function(fun) except KeyError: fun=lookup_function(fun,1) self.keytable[(c,meta)]=fun,arg fun.invoke(self.object,arg) | 6c0133a2f415a590263815ca0a1fe928e63badf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/6c0133a2f415a590263815ca0a1fe928e63badf4/keytable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
856,
12,
2890,
16,
71,
16,
3901,
4672,
225,
9831,
16,
3175,
33,
2890,
18,
856,
2121,
63,
12,
71,
16,
3901,
25887,
309,
486,
1549,
12,
12125,
16,
653,
2083,
4672,
2975,
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,
1207,
67,
856,
12,
2890,
16,
71,
16,
3901,
4672,
225,
9831,
16,
3175,
33,
2890,
18,
856,
2121,
63,
12,
71,
16,
3901,
25887,
309,
486,
1549,
12,
12125,
16,
653,
2083,
4672,
2975,
18,
... | |
if char.dead or char.gm or char.polymorph: return if not SKILLS.has_key(skill): char.log(LOG_ERROR, "Is using an unidentified skill: %u\n" % skill) return info = SKILLS[skill] skills = char.skill value = skills[skill] / 10.0 lower /= 10.0 higher /= 10.0 if char.npc and value <= 0.0: return if value < lower or value >= higher: return chance = (value - lower) / (higher - lower) cap = char.skillcap[skill] / 10.0 if cap == 0: return totalskills = 0.0 for i in range(0, ALLSKILLS): totalskills += skills[i] / 10.0 totalcap = settings.getnumber("General", "SkillCap", 700) gainchance = (totalcap - totalskills) / totalcap gainchance += (cap - value) / cap if success: gainchance += 0.5 - chance * 0.5 else: gainchance += 0.2 - chance * 0.2 gainchance /= 3.0 gainchance = max(0.01, gainchance * info[SKILL_GAINFACTOR]) if char.npc and char.tamed: gainchance *= 2 if gainchance >= random() or value < 10.0: gainskill(char, skill, totalskills, totalcap) | if char.dead or char.gm or char.polymorph: return if not SKILLS.has_key(skill): char.log(LOG_ERROR, "Is using an unidentified skill: %u\n" % skill) return info = SKILLS[skill] skills = char.skill value = skills[skill] / 10.0 lower /= 10.0 higher /= 10.0 if char.npc and value <= 0.0: return if value < lower or value >= higher: return chance = (value - lower) / (higher - lower) cap = char.skillcap[skill] / 10.0 if cap == 0: return totalskills = 0.0 for i in range(0, ALLSKILLS): totalskills += skills[i] / 10.0 totalcap = settings.getnumber("General", "SkillCap", 700) gainchance = (totalcap - totalskills) / totalcap gainchance += (cap - value) / cap if success: gainchance += 0.5 - chance * 0.5 else: gainchance += 0.2 - chance * 0.2 gainchance /= 3.0 gainchance = max(0.01, gainchance * info[SKILL_GAINFACTOR]) if char.npc and char.tamed: gainchance *= 2 if gainchance >= random() or value < 10.0: gainskill(char, skill, totalskills, totalcap) | def onSkillGain(char, skill, lower, higher, success): # See if we can gain at all # GMs don't gain skills if char.dead or char.gm or char.polymorph: return if not SKILLS.has_key(skill): char.log(LOG_ERROR, "Is using an unidentified skill: %u\n" % skill) return info = SKILLS[skill] skills = char.skill value = skills[skill] / 10.0 # Convert into float lower /= 10.0 higher /= 10.0 # NPCs only learn by using skills # they already have if char.npc and value <= 0.0: return # No gain for effortless or futile attempts if value < lower or value >= higher: return chance = (value - lower) / (higher - lower) cap = char.skillcap[skill] / 10.0 # Skills capped at zero are disabled for this character if cap == 0: return totalskills = 0.0 for i in range(0, ALLSKILLS): totalskills += skills[i] / 10.0 # Calculate the GainChance # (RunUO has a nice approach. Doing it similar) totalcap = settings.getnumber("General", "SkillCap", 700) gainchance = (totalcap - totalskills) / totalcap # How near are we to our global skill cap gainchance += (cap - value) / cap # How near are we to our skill cap # Use the difficulty to influence the skill gain if success: gainchance += 0.5 - chance * 0.5 else: gainchance += 0.2 - chance * 0.2 gainchance /= 3.0 # The average of the three values # Introduce a new "Gain Factor" # There is also a 1% minimum chance for gain gainchance = max(0.01, gainchance * info[SKILL_GAINFACTOR]) # Tamed creatures get a * 2 bonus for their gain. if char.npc and char.tamed: gainchance *= 2 # Skills below 10% always gain, otherwise take the gainchance into # account. if gainchance >= random() or value < 10.0: gainskill(char, skill, totalskills, totalcap) | 3dadc4cf470cc0c4517e6efa25eab23827fdd82c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/3dadc4cf470cc0c4517e6efa25eab23827fdd82c/skillgain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
9030,
43,
530,
12,
3001,
16,
15667,
16,
2612,
16,
10478,
16,
2216,
4672,
468,
2164,
309,
732,
848,
17527,
622,
777,
468,
611,
6947,
2727,
1404,
17527,
15667,
87,
309,
1149,
18,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
9030,
43,
530,
12,
3001,
16,
15667,
16,
2612,
16,
10478,
16,
2216,
4672,
468,
2164,
309,
732,
848,
17527,
622,
777,
468,
611,
6947,
2727,
1404,
17527,
15667,
87,
309,
1149,
18,
22... |
why = os.strerror(err.errno) | why = _strerror(err) | def ftp_RETR(self, line): """Retrieve the specified file (transfer from the server to the client) """ file = self.fs.translate(line) | 93acc72ebc75fdf3b1931c4e1f9e2f2d830514c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/93acc72ebc75fdf3b1931c4e1f9e2f2d830514c9/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
862,
4349,
12,
2890,
16,
980,
4672,
3536,
5767,
326,
1269,
585,
261,
13866,
628,
326,
1438,
358,
326,
1004,
13,
3536,
585,
273,
365,
18,
2556,
18,
13929,
12,
1369,
13,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13487,
67,
862,
4349,
12,
2890,
16,
980,
4672,
3536,
5767,
326,
1269,
585,
261,
13866,
628,
326,
1438,
358,
326,
1004,
13,
3536,
585,
273,
365,
18,
2556,
18,
13929,
12,
1369,
13,
2,
... |
digraph g { rankdir="LR" URL="." concentrate=false edge[fontsize="10" ] | digraph "dependencies_graph" { rankdir=LR charset="utf-8" URL="." concentrate=false edge[fontsize="10"] | def test_dependencies_graph(self): imports.dependencies_graph(self.dest, {'labas': ['hoho', 'yep'], 'hoho': ['yep']}) self.assertEquals(open(self.dest).read().strip(), ''' | be37bb32c08778c63ac8b2224ce032e726240d9c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/928/be37bb32c08778c63ac8b2224ce032e726240d9c/test_import_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11037,
67,
4660,
12,
2890,
4672,
10095,
18,
11037,
67,
4660,
12,
2890,
18,
10488,
16,
13666,
7411,
345,
4278,
10228,
15008,
15008,
2187,
296,
93,
881,
17337,
296,
15008,
15008,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11037,
67,
4660,
12,
2890,
4672,
10095,
18,
11037,
67,
4660,
12,
2890,
18,
10488,
16,
13666,
7411,
345,
4278,
10228,
15008,
15008,
2187,
296,
93,
881,
17337,
296,
15008,
15008,
... |
p = app.listenUDP(service.port, factory) | p = reactor.listenUDP(service.port, factory) | def main(options=None): # Parse options, read various config files if not options: options = InetdOptions() options.parseOptions() conf = inetdconf.InetdConf() conf.parseFile(open(options['file'])) rpcConf = inetdconf.RPCServicesConf() try: rpcConf.parseFile() except: # We'll survive even if we can't read /etc/rpc log.deferr() # RPC support requires running /sbin/pmap_set rpcOk = os.access('/sbin/pmap_set', os.X_OK) app = Application('tinetd') for service in conf.services: rpc = service.protocol.startswith('rpc/') protocol = service.protocol if rpc and not rpcOk: log.msg('Skipping rpc service due to lack of rpc support') continue if rpc: protocol = protocol[4:] # trim 'rpc/' # RPC has extra options, so extract that try: name, rpcVersions = service.name.split('/') except ValueError: log.msg('Bad RPC service/version: ' + service.name) continue if not rpcConf.services.has_key(name): log.msg('Unknown RPC service: ' + repr(service.name)) continue try: if '-' in rpcVersions: start, end = map(int, rpcVersions.split('-')) rpcVersions = range(start, end+1) else: rpcVersions = [int(rpcVersions)] except ValueError: log.msg('Bad RPC versions: ' + str(rpcVersions)) continue if (protocol, service.socketType) not in [('tcp', 'stream'), ('udp', 'dgram')]: log.msg('Skipping unsupported type/protocol: %s/%s' % (service.socketType, service.protocol)) continue # Convert the username into a uid (if necessary) try: service.user = int(service.user) except ValueError: try: service.user = pwd.getpwnam(service.user)[2] except KeyError: log.msg('Unknown user: ' + service.user) continue # Convert the group name into a gid (if necessary) if service.group is None: # If no group was specified, use the user's primary group service.group = pwd.getpwuid(service.user)[3] else: try: service.group = int(service.group) except ValueError: try: service.group = grp.getgrnam(service.group)[2] except KeyError: log.msg('Unknown group: ' + service.group) continue log.msg('Adding service:', service.name, service.port, protocol) if service.program == 'internal': # Internal services can use a standard ServerFactory if not internalProtocols.has_key(service.name): log.msg('Unknown internal service: ' + service.name) continue factory = ServerFactory() factory.protocol = internalProtocols[service.name] elif rpc: factory = RPCFactory(service, rpcConf[service.name], rpcVersions) else: # Non-internal non-rpc services use InetdFactory factory = InetdFactory(service) if protocol == 'tcp': p = app.listenTCP(service.port, factory) elif protocol == 'udp': p = app.listenUDP(service.port, factory) if rpc: factory.setPort(p.getHost()[2]) app.run(save=0) | 5d49965ec059765df7f8195ffeb01285d7f97c16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5d49965ec059765df7f8195ffeb01285d7f97c16/inetd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
33,
7036,
4672,
468,
2884,
702,
16,
855,
11191,
642,
1390,
309,
486,
702,
30,
702,
273,
10040,
72,
1320,
1435,
702,
18,
2670,
1320,
1435,
225,
2195,
273,
17661,
72,
392... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
33,
7036,
4672,
468,
2884,
702,
16,
855,
11191,
642,
1390,
309,
486,
702,
30,
702,
273,
10040,
72,
1320,
1435,
702,
18,
2670,
1320,
1435,
225,
2195,
273,
17661,
72,
392... |
numtrips = 3 def task2(ident): global running for i in range(numtrips): if ident == 0: delay = 0.001 else: rmutex.acquire() delay = random.random() * numtasks rmutex.release() if verbose: print 'task', ident, 'will run for', round(delay, 1), 'sec' time.sleep(delay) if verbose: print 'task', ident, 'entering barrier', i bar.enter() if verbose: print 'task', ident, 'leaving barrier', i mutex.acquire() running -= 1 finished = running == 0 mutex.release() if finished: done.release() | def enter(self): checkin, checkout = self.checkin, self.checkout | 2e81a08051b03bbe197fc96e1cbd1035123713e2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/2e81a08051b03bbe197fc96e1cbd1035123713e2/test_thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6103,
12,
2890,
4672,
866,
267,
16,
13926,
273,
365,
18,
1893,
267,
16,
365,
18,
17300,
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,
6103,
12,
2890,
4672,
866,
267,
16,
13926,
273,
365,
18,
1893,
267,
16,
365,
18,
17300,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
self.p.folder().short_issue_names = 1 | def test_short_issue_links(self): # test the full two-step linking procedure link = lambda t: self.p.renderMarkedLinksIn(self.p.markLinksIn(t)) self.p.folder().short_issue_names = 1 self.assertEquals(link('#1')[-6:], '#1</a>') self.p.createNextIssue('b') self.assertEquals(link('[#2]')[-6:], '#2</a>') self.p.createIssue('#987 test') self.assertEquals(link('[#9]')[-6:], '>?</a>') self.assertEquals(link('[#987]')[-8:],'#987</a>') self.assertEquals(link('#9'), '#9') self.assertEquals(link('#987')[-8:], '#987</a>') | acf69133db82e469c655bf35fecc93d49ca297d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/acf69133db82e469c655bf35fecc93d49ca297d8/tracker_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
6620,
67,
13882,
67,
7135,
12,
2890,
4672,
468,
1842,
326,
1983,
2795,
17,
4119,
27651,
12131,
1692,
273,
3195,
268,
30,
365,
18,
84,
18,
5902,
21486,
7100,
382,
12,
2890,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
6620,
67,
13882,
67,
7135,
12,
2890,
4672,
468,
1842,
326,
1983,
2795,
17,
4119,
27651,
12131,
1692,
273,
3195,
268,
30,
365,
18,
84,
18,
5902,
21486,
7100,
382,
12,
2890,
18... | |
name = '/'.join(['/data', entry.internal]) | name = '/'.join(('/data', entry.internal)) | def extract_content(self, output_dir=os.getcwdu()): output_dir = os.path.abspath(output_dir) try: opf_path = os.path.splitext( os.path.basename(self._stream.name))[0] + '.opf' except AttributeError: opf_path = 'content.opf' opf_path = os.path.join(output_dir, opf_path) self._ensure_dir(opf_path) with open(opf_path, 'w') as f: f.write(self.get_markup_file('/meta').encode('utf-8')) for entry in self.manifest.values(): path = os.path.join(output_dir, entry.path) self._ensure_dir(path) with open(path, 'w') as f: if 'spine' in entry.state: name = '/'.join(['/data', entry.internal, 'content']) f.write(self.get_markup_file(name).encode('utf-8')) else: name = '/'.join(['/data', entry.internal]) f.write(self.get_file(name)) | a349d763791c48d47cea1f32778b244aef794b5c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/a349d763791c48d47cea1f32778b244aef794b5c/reader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
1745,
12,
2890,
16,
876,
67,
1214,
33,
538,
18,
588,
71,
91,
2544,
1435,
4672,
876,
67,
1214,
273,
1140,
18,
803,
18,
5113,
803,
12,
2844,
67,
1214,
13,
775,
30,
1061,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
1745,
12,
2890,
16,
876,
67,
1214,
33,
538,
18,
588,
71,
91,
2544,
1435,
4672,
876,
67,
1214,
273,
1140,
18,
803,
18,
5113,
803,
12,
2844,
67,
1214,
13,
775,
30,
1061,
74... |
try: print 1,oDataOperation.getContents() sys.stdout.flush() except Exception, x: print 'getContents Exception 1' sys.stdout.flush() print x sys.stdout.flush() gLogger.exception('getConntent'+str(x)) print 'Here I am' sys.stdout.flush() | def __gfalturlsfromsurls_wrapper(self,urls,listProtocols): """ This is a function that can be reused everywhere to perform the gfal_turlsfromsurls """ gfalDict = {} gfalDict['defaultsetype'] = 'srmv2' gfalDict['no_bdii_check'] = 1 gfalDict['protocols'] = listProtocols gfalDict['srmv2_spacetokendesc'] = self.spaceToken | f5e441c3ab9241d3462727b1b293a681e5bd2781 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/f5e441c3ab9241d3462727b1b293a681e5bd2781/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
75,
74,
2390,
10518,
2080,
87,
10518,
67,
8376,
12,
2890,
16,
10518,
16,
1098,
21657,
4672,
3536,
1220,
353,
279,
445,
716,
848,
506,
23312,
3614,
6051,
358,
3073,
326,
13828,
287,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
75,
74,
2390,
10518,
2080,
87,
10518,
67,
8376,
12,
2890,
16,
10518,
16,
1098,
21657,
4672,
3536,
1220,
353,
279,
445,
716,
848,
506,
23312,
3614,
6051,
358,
3073,
326,
13828,
287,... | |
for key, item in form.items(): | for key in form: | def get_prefix_vals (form, prefix): """return a list of (key, value) pairs where ``prefix+key'' is a valid form field""" res = [] for key, item in form.items(): if key.startswith(prefix): res.append(key[len(prefix):], get_item_value(item)) return res | b03ef32dbc89abb14f57dfa6fc222add443662c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/b03ef32dbc89abb14f57dfa6fc222add443662c2/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3239,
67,
4524,
261,
687,
16,
1633,
4672,
3536,
2463,
279,
666,
434,
261,
856,
16,
460,
13,
5574,
1625,
12176,
3239,
15,
856,
6309,
353,
279,
923,
646,
652,
8395,
400,
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,
336,
67,
3239,
67,
4524,
261,
687,
16,
1633,
4672,
3536,
2463,
279,
666,
434,
261,
856,
16,
460,
13,
5574,
1625,
12176,
3239,
15,
856,
6309,
353,
279,
923,
646,
652,
8395,
400,
273,
... |
def _cmp_(self, other): | def __cmp__(self, other): | def _cmp_(self, other): """ EXAMPLES: sage: a = axiom(1); b = axiom(2) # optional sage: a == b # optional False sage: a < b # optional True sage: a > b # optional False sage: b < a # optional False sage: b > a # optional True | 6d26ee404de5ca55a472c0aa9236698863e1dee9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/6d26ee404de5ca55a472c0aa9236698863e1dee9/axiom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
279,
273,
1740,
14642,
12,
21,
1769,
324,
273,
1740,
14642,
12,
22,
13,
5375,
468,
3129,
272,
410,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9625,
972,
12,
2890,
16,
1308,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
279,
273,
1740,
14642,
12,
21,
1769,
324,
273,
1740,
14642,
12,
22,
13,
5375,
468,
3129,
272,
410,... |
yield portal.portal_linkchecker | for i in portal.objectValues(LinkChecker.meta_type): yield i | def _list_updates(self): """ Return all portals that need update """ utool = self.aq_inner.aq_parent portals = utool.getPortals() for portal in portals: if not self._verify_doc(portal): continue yield portal.portal_linkchecker | 69722a8dd7f3f817dff3adf92308192feeff00ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/69722a8dd7f3f817dff3adf92308192feeff00ea/update_link_checker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1098,
67,
14703,
12,
2890,
4672,
3536,
2000,
777,
1756,
1031,
716,
1608,
1089,
3536,
31013,
273,
365,
18,
69,
85,
67,
7872,
18,
69,
85,
67,
2938,
1756,
1031,
273,
31013,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1098,
67,
14703,
12,
2890,
4672,
3536,
2000,
777,
1756,
1031,
716,
1608,
1089,
3536,
31013,
273,
365,
18,
69,
85,
67,
7872,
18,
69,
85,
67,
2938,
1756,
1031,
273,
31013,
18,
588,
... |
represented in Singular. If this is True then this polynomial | represented in Singular, and the polynomial ring has at least one generator. If this is True then this polynomial | def can_convert_to_singular(R): """ Returns True if this ring's base field or ring can be represented in Singular. If this is True then this polynomial ring can be represented in Singular. The following base rings are supported: $GF(p)$, $GF(p^n)$, rationals, number fields, and real and complex fields. """ base_ring = R.base_ring() return ( sage.rings.ring.is_FiniteField(base_ring) or is_RationalField(base_ring) or (base_ring.is_prime_field() and base_ring.characteristic() <= 2147483647) or is_RealField(base_ring) or is_ComplexField(base_ring) or is_RealDoubleField(base_ring) or is_ComplexDoubleField(base_ring) or number_field.all.is_NumberField(base_ring) or base_ring is ZZ ) | e458d8d08d95bda7b525f1f0ea065146a1faccbc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e458d8d08d95bda7b525f1f0ea065146a1faccbc/polynomial_singular_interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
848,
67,
6283,
67,
869,
67,
17835,
12,
54,
4672,
3536,
2860,
1053,
309,
333,
9221,
1807,
1026,
652,
578,
9221,
848,
506,
10584,
316,
348,
17830,
16,
471,
326,
16991,
9221,
711,
622,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
848,
67,
6283,
67,
869,
67,
17835,
12,
54,
4672,
3536,
2860,
1053,
309,
333,
9221,
1807,
1026,
652,
578,
9221,
848,
506,
10584,
316,
348,
17830,
16,
471,
326,
16991,
9221,
711,
622,
45... |
self.members.append(tarinfo) self.membernames.append(tarinfo.name) self.chunks.append(self.offset) | self._record_member(tarinfo) | def next(self): """Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. """ self._check("ra") if self.firstmember is not None: m = self.firstmember self.firstmember = None return m | a74b881a4cd6de08399203b7b9fd0fb368fe774c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a74b881a4cd6de08399203b7b9fd0fb368fe774c/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
4672,
3536,
990,
326,
1024,
3140,
434,
326,
5052,
487,
279,
20334,
966,
733,
16,
1347,
20334,
812,
353,
10191,
364,
6453,
18,
2000,
599,
309,
1915,
353,
1158,
1898,
2319,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
4672,
3536,
990,
326,
1024,
3140,
434,
326,
5052,
487,
279,
20334,
966,
733,
16,
1347,
20334,
812,
353,
10191,
364,
6453,
18,
2000,
599,
309,
1915,
353,
1158,
1898,
2319,... |
yield check_complex_value, ncu._arg, np.nan, 0, np.nan, 0, False yield check_complex_value, ncu._arg, 0, np.nan, np.nan, 0, False yield check_complex_value, ncu._arg, np.nan, np.inf, np.nan, 0, False yield check_complex_value, ncu._arg, np.inf, np.nan, np.nan, 0, False | yield check_real_value, ncu._arg, np.nan, 0, np.nan, False yield check_real_value, ncu._arg, 0, np.nan, np.nan, False yield check_real_value, ncu._arg, np.nan, np.inf, np.nan, False yield check_real_value, ncu._arg, np.inf, np.nan, np.nan, False def check_real_value(f, x1, y1, x, exact=True): z1 = np.array([complex(x1, y1)]) if exact: assert_equal_spec(f(z1), x) else: assert_almost_equal_spec(f(z1), x) | def test_special_values(self): # carg(-np.inf +- yi) returns +-pi for finite y > 0 yield check_complex_value, ncu._arg, -np.inf, 1, np.pi, 0, False yield check_complex_value, ncu._arg, -np.inf, -1, -np.pi, 0, False | 4ad98c9779aec020b8ca848c891ecf5576ed9721 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/4ad98c9779aec020b8ca848c891ecf5576ed9721/test_umath_complex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9371,
67,
2372,
12,
2890,
4672,
468,
276,
3175,
19236,
6782,
18,
10625,
397,
17,
16805,
13,
1135,
397,
17,
7259,
364,
25922,
677,
405,
374,
2824,
866,
67,
14259,
67,
1132,
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,
1842,
67,
9371,
67,
2372,
12,
2890,
4672,
468,
276,
3175,
19236,
6782,
18,
10625,
397,
17,
16805,
13,
1135,
397,
17,
7259,
364,
25922,
677,
405,
374,
2824,
866,
67,
14259,
67,
1132,
16... |
sql += "host_category.hostID = host.id " | sql += "host_category.host_id = host.id " | def _directory_mirrors(directory, country): sql = "SELECT category.id, host_category.id, host.id " sql += "FROM category, host_category, host " sql += "WHERE category.id = host_category.category_id AND " sql += "host_category.hostID = host.id " if country is not None: sql += "AND host.country = '%s' " % country sql += "ORDER BY host.id" result = directory.queryAll(sql) | 946431bcc3f8067bccc06701688ec18feaa63669 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13031/946431bcc3f8067bccc06701688ec18feaa63669/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5149,
67,
81,
27026,
12,
5149,
16,
5251,
4672,
225,
1847,
273,
315,
4803,
3150,
18,
350,
16,
1479,
67,
4743,
18,
350,
16,
1479,
18,
350,
315,
1847,
1011,
315,
11249,
3150,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5149,
67,
81,
27026,
12,
5149,
16,
5251,
4672,
225,
1847,
273,
315,
4803,
3150,
18,
350,
16,
1479,
67,
4743,
18,
350,
16,
1479,
18,
350,
315,
1847,
1011,
315,
11249,
3150,
16,
1... |
def _format_titles(self,titles): | def _format_titles(self,titles,colsep='---'): display_window_width = 70 | def _format_titles(self,titles): lengths = [len(name)-name.find('.')-1 for (name,title) in titles] max_length = max(lengths) lines = [] for (name,title) in titles: name = name[name.find('.')+1:] w = max_length - len(name) lines.append('%s%s --- %s' % (name, w*' ', title)) return '\n'.join(lines) | 4fecd1eed369a26d6205c95648b27494965bc7c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/4fecd1eed369a26d6205c95648b27494965bc7c0/_import_tools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2139,
67,
17643,
12,
2890,
16,
17643,
16,
1293,
10814,
2218,
6062,
11,
4672,
2562,
67,
5668,
67,
2819,
273,
16647,
10917,
273,
306,
1897,
12,
529,
24950,
529,
18,
4720,
2668,
1093,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2139,
67,
17643,
12,
2890,
16,
17643,
16,
1293,
10814,
2218,
6062,
11,
4672,
2562,
67,
5668,
67,
2819,
273,
16647,
10917,
273,
306,
1897,
12,
529,
24950,
529,
18,
4720,
2668,
1093,
... |
r=Gratia.UsageRecord("Batch") r.ProbeName("glexec:%s"%host) | r=Gratia.UsageRecord("Glexec") | def send_one(el, host, # uname -n cename): r=Gratia.UsageRecord("Batch") r.ProbeName("glexec:%s"%host) r.MachineName(cename) r.Host(host) r.LocalUserId(uid2name(el['jobuid'])) # uid number if el.has_key("DN"): r.UserKeyInfo(el["DN"]) if el.has_key("VO"): r.VOName(el["VO"]) r.WallDuration(el['end']-el['start']) r.CpuDuration(el['usercpu'],'user') r.CpuDuration(el['syscpu'],'sys') r.StartTime(el['start']) r.EndTime(el['end']) #print Gratia.Send(r) Gratia.Send(r) #print host,r | 8d1fa257c326ab174b10d0c3867bd3ef6efd6461 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/637/8d1fa257c326ab174b10d0c3867bd3ef6efd6461/glexec_meter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
476,
12,
292,
16,
1479,
16,
468,
31444,
300,
82,
276,
1069,
4672,
436,
33,
43,
17048,
1155,
18,
5357,
2115,
2932,
43,
4149,
557,
7923,
436,
18,
6981,
461,
12,
71,
1069,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
476,
12,
292,
16,
1479,
16,
468,
31444,
300,
82,
276,
1069,
4672,
436,
33,
43,
17048,
1155,
18,
5357,
2115,
2932,
43,
4149,
557,
7923,
436,
18,
6981,
461,
12,
71,
1069,
13,... |
self.driver.back(); | self.driver.back() | def testNavigation(self): # Loads two pages into chrome's navigation history. self.navigate(self.NEWS) self.navigate(self.SEARCH) | bebf64c3339c8ee243bc822c538d0afdffc4a4dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bebf64c3339c8ee243bc822c538d0afdffc4a4dc/webdriver_remote_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14301,
12,
2890,
4672,
468,
4444,
87,
2795,
4689,
1368,
18167,
1807,
10394,
4927,
18,
365,
18,
82,
20698,
12,
2890,
18,
5407,
2651,
13,
365,
18,
82,
20698,
12,
2890,
18,
17251,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
14301,
12,
2890,
4672,
468,
4444,
87,
2795,
4689,
1368,
18167,
1807,
10394,
4927,
18,
365,
18,
82,
20698,
12,
2890,
18,
5407,
2651,
13,
365,
18,
82,
20698,
12,
2890,
18,
17251,
1... |
def get_ext_libname (self, ext_name): ext_path = string.split (ext_name, '.') if os.name == 'nt' and self.debug: return apply (os.path.join, ext_path) + '_d.lib' return apply (os.path.join, ext_path) + '.lib' | def get_ext_libname (self, ext_name): # create a filename for the (unneeded) lib-file. # extensions in debug_mode are named 'module_d.pyd' under windows ext_path = string.split (ext_name, '.') if os.name == 'nt' and self.debug: return apply (os.path.join, ext_path) + '_d.lib' return apply (os.path.join, ext_path) + '.lib' | 32aff731d5d1af427b5d3c03925d0814cb525144 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/32aff731d5d1af427b5d3c03925d0814cb525144/build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
408,
67,
2941,
529,
261,
2890,
16,
1110,
67,
529,
4672,
468,
752,
279,
1544,
364,
326,
261,
318,
17471,
13,
2561,
17,
768,
18,
468,
4418,
316,
1198,
67,
3188,
854,
4141,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
408,
67,
2941,
529,
261,
2890,
16,
1110,
67,
529,
4672,
468,
752,
279,
1544,
364,
326,
261,
318,
17471,
13,
2561,
17,
768,
18,
468,
4418,
316,
1198,
67,
3188,
854,
4141,
296... | |
raise GeneralProxyError((1,_generalerrors[1])) | raise GeneralProxyError((1, _generalerrors[1])) | def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setproxy method so we support the USERNAME/PASSWORD # authentication (in addition to the standard none). self.sendall("\x05\x02\x00\x02") else: # No username/password were entered, therefore we # only support connections with no authentication. self.sendall("\x05\x01\x00") # We'll receive the server's response to determine which # method was selected chosenauth = self.__recvall(2) if chosenauth[0] != "\x05": self.close() raise GeneralProxyError((1,_generalerrors[1])) # Check the chosen authentication method if chosenauth[1] == "\x00": # No authentication is required pass elif chosenauth[1] == "\x02": # Okay, we need to perform a basic username/password # authentication. self.sendall("\x01" + chr(len(self.__proxy[4])) + self.__proxy[4] + chr(len(self.__proxy[5])) + self.__proxy[5]) authstat = self.__recvall(2) if authstat[0] != "\x01": # Bad response self.close() raise GeneralProxyError((1,_generalerrors[1])) if authstat[1] != "\x00": # Authentication failed self.close() raise Socks5AuthError((3,_socks5autherrors[3])) # Authentication succeeded else: # Reaching here is always bad self.close() if chosenauth[1] == "\xFF": raise Socks5AuthError((2,_socks5autherrors[2])) else: raise GeneralProxyError((1,_generalerrors[1])) # Now we can request the actual connection req = "\x05\x01\x00" # If the given destination address is an IP address, we'll # use the IPv4 address request even if remote resolving was specified. try: ipaddr = socket.inet_aton(destaddr) req = req + "\x01" + ipaddr except socket.error: # Well it's not an IP number, so it's probably a DNS name. if self.__proxy[3]==True: # Resolve remotely ipaddr = None req = req + "\x03" + chr(len(destaddr)) + destaddr else: # Resolve locally ipaddr = socket.inet_aton(socket.gethostbyname(destaddr)) req = req + "\x01" + ipaddr req = req + self.__decode(struct.pack(">H",destport)) self.sendall(req) # Get the response resp = self.__recvall(4) if resp[0] != "\x05": self.close() raise GeneralProxyError((1,_generalerrors[1])) elif resp[1] != "\x00": # Connection failed self.close() if ord(resp[1])<=8: raise Socks5Error((ord(resp[1]),_socks5errors[ord(resp[1])])) else: raise Socks5Error((9,_socks5errors[9])) # Get the bound address/port elif resp[3] == "\x01": boundaddr = self.__recvall(4) elif resp[3] == "\x03": resp = resp + self.recv(1) boundaddr = self.__recvall(ord(resp[4])) else: self.close() raise GeneralProxyError((1,_generalerrors[1])) boundport = struct.unpack(">H",bytes(self.__recvall(2), 'utf8'))[0] self.__proxysockname = (boundaddr,boundport) if ipaddr != None: self.__proxypeername = (socket.inet_ntoa(ipaddr),destport) else: self.__proxypeername = (destaddr,destport) | 9c2eaf1c9f74544afe20a86fa591d97eeaa8921c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13138/9c2eaf1c9f74544afe20a86fa591d97eeaa8921c/socks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
4672,
3536,
972,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
13,
423,
27445,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
4672,
3536,
972,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
13,
423,
27445,
1... |
if isstring: | if own_fh: | def split_line(line): """Chop off comments, strip, and split at delimiter.""" line = asbytes(line).split(comments)[0].strip() if line: return line.split(delimiter) else: return [] | 8630830bb05bd13aab0fcd869c8339c1515460de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/8630830bb05bd13aab0fcd869c8339c1515460de/npyio.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
67,
1369,
12,
1369,
4672,
3536,
782,
556,
3397,
5678,
16,
2569,
16,
471,
1416,
622,
5654,
12123,
980,
273,
487,
3890,
12,
1369,
2934,
4939,
12,
9231,
25146,
20,
8009,
6406,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
67,
1369,
12,
1369,
4672,
3536,
782,
556,
3397,
5678,
16,
2569,
16,
471,
1416,
622,
5654,
12123,
980,
273,
487,
3890,
12,
1369,
2934,
4939,
12,
9231,
25146,
20,
8009,
6406,
1435,
... |
user_mem = int(l[1]) mem_free = int((mem_total - user_mem) / (1024*1024)) | user_mem = int(l[1]) / (1024*1024) mem_free = int(mem_total - user_mem) | def get_host_info(self, platform): host_info = {} host_info['os'] = platform if platform in ('linux', 'linux2', 'cygwin'): cpuinfo = open('/proc/cpuinfo','r').readlines() cpus = 0 for line in cpuinfo: if 'processor' in line: cpus += 1 s = line.split(':') if s != ['\n']: host_info[s[0].strip()] = s[1].strip() host_info['cpus'] = cpus uptime = open('/proc/uptime', 'r').readline().split(' ') host_info['uptime'] = uptime[0] | 8dcbaf617e2d4af9c37822e803b2cc07556fadf0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8dcbaf617e2d4af9c37822e803b2cc07556fadf0/hostinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2564,
67,
1376,
12,
2890,
16,
4072,
4672,
1479,
67,
1376,
273,
2618,
1479,
67,
1376,
3292,
538,
3546,
273,
4072,
309,
4072,
316,
7707,
20132,
2187,
296,
20132,
22,
2187,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2564,
67,
1376,
12,
2890,
16,
4072,
4672,
1479,
67,
1376,
273,
2618,
1479,
67,
1376,
3292,
538,
3546,
273,
4072,
309,
4072,
316,
7707,
20132,
2187,
296,
20132,
22,
2187,
296,
... |
x = wikipedia.Page(self.site, self.settings) | wikiPage = wikipedia.Page(self.site, self.settings) | def takesettings(self): """ Function to take the settings from the wiki. """ try: if self.settings == None: self.settingsData = None else: x = wikipedia.Page(self.site, self.settings) self.settingsData = list() try: testo = x.get() rxp = r"<------- ------->\n\*[Nn]ame ?= ?['\"](.*?)['\"]\n\*([Ff]ind|[Ff]indonly)=(.*?)\n\*[Ii]magechanges=(.*?)\n\*[Ss]ummary=['\"](.*?)['\"]\n\*[Hh]ead=['\"](.*?)['\"]\n\*[Tt]ext ?= ?['\"](.*?)['\"]\n\*[Mm]ex ?= ?['\"]?(.*?)['\"]?$" r = re.compile(rxp, re.UNICODE|re.M) number = 1 for m in r.finditer(testo): name = str(m.group(1)) find_tipe = str(m.group(2)) find = str(m.group(3)) imagechanges = str(m.group(4)) summary = str(m.group(5)) head = str(m.group(6)) text = str(m.group(7)) mexcatched = str(m.group(8)) tupla = [number, name, find_tipe, find, imagechanges, summary, head, text, mexcatched] self.settingsData += [tupla] number += 1 if self.settingsData == list(): wikipedia.output(u"You've set wrongly your settings, please take a look to the relative page. (run without them)") self.settingsData = None except wikipedia.NoPage: wikipedia.output(u"The settings' page doesn't exist!") self.settingsData = None except wikipedia.Error: # Error? Settings = None wikipedia.output(u'Problems with loading the settigs, run without them.') self.settingsData = None self.some_problem = False if self.settingsData == []: self.settingsData = None # Real-Time page loaded if self.settingsData != None: wikipedia.output(u'\t >> Loaded the real-time page... <<') # No settings found, No problem, continue. else: wikipedia.output(u'\t >> No additional settings found! <<') return self.settingsData # Useless, but it doesn't harm.. | c3a948c21ee29f736b04595b152c3dc94be1b5e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/c3a948c21ee29f736b04595b152c3dc94be1b5e3/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5530,
278,
1256,
12,
2890,
4672,
3536,
4284,
358,
4862,
326,
1947,
628,
326,
9050,
18,
3536,
775,
30,
309,
365,
18,
4272,
422,
599,
30,
365,
18,
4272,
751,
273,
599,
469,
30,
9050,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5530,
278,
1256,
12,
2890,
4672,
3536,
4284,
358,
4862,
326,
1947,
628,
326,
9050,
18,
3536,
775,
30,
309,
365,
18,
4272,
422,
599,
30,
365,
18,
4272,
751,
273,
599,
469,
30,
9050,
1... |
v = [(abs(default - self.values()[j]), j) for j in range(len(self.values()))] | v = [(abs(default[i] - self.values()[j]), j) for j in range(len(self.values()))] | def __init__(self, vmin, vmax=None, step_size=1, default=None, label=None, display_value=True): r""" An interactive slider control, which can be used in conjunction with the interact command. | 9ccf8b49a8a600d5436a55ad38b69bcd69a4619e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/9ccf8b49a8a600d5436a55ad38b69bcd69a4619e/interact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
17501,
16,
17831,
33,
7036,
16,
2235,
67,
1467,
33,
21,
16,
805,
33,
7036,
16,
1433,
33,
7036,
16,
2562,
67,
1132,
33,
5510,
4672,
436,
8395,
1922,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
17501,
16,
17831,
33,
7036,
16,
2235,
67,
1467,
33,
21,
16,
805,
33,
7036,
16,
1433,
33,
7036,
16,
2562,
67,
1132,
33,
5510,
4672,
436,
8395,
1922,
126... |
continue oldpath = oldrev = newpath = newrev = '' oldinfo = line.split(None, 2) if len(oldinfo) > 1: oldpath = oldinfo[1] if len(oldinfo) > 2: oldrev = oldinfo[2] line = lines.next() if not line.startswith('+++ '): self.log.debug('expected +++ after ---, got '+line) return None newinfo = line.split(None, 2) if len(newinfo) > 1: newpath = newinfo[1] if len(newinfo) > 2: newrev = newinfo[2] | if not line.startswith('+++ '): self.log.debug('expected +++ after ---, got '+line) return None newinfo = line.split(None, 2) if len(newinfo) > 1: newpath = newinfo[1] if len(newinfo) > 2: newrev = newinfo[2] | def htmlify(match): div, mod = divmod(len(match.group(0)), 2) return div * ' ' + mod * ' ' | 666a397557fb7a14b59c92551b1b8aa847a0488a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9317/666a397557fb7a14b59c92551b1b8aa847a0488a/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
1164,
12,
1916,
4672,
3739,
16,
681,
273,
26105,
12,
1897,
12,
1916,
18,
1655,
12,
20,
13,
3631,
576,
13,
327,
3739,
380,
5183,
10600,
31,
296,
397,
681,
380,
5183,
10600,
4359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1729,
1164,
12,
1916,
4672,
3739,
16,
681,
273,
26105,
12,
1897,
12,
1916,
18,
1655,
12,
20,
13,
3631,
576,
13,
327,
3739,
380,
5183,
10600,
31,
296,
397,
681,
380,
5183,
10600,
4359,
... |
self.del_variable(var_dict[name[0]], name[1:]) | self.del_variable(var_dict[name[0]].value, DottedName(*name[1:])) | def del_variable(self, namespace, name): if not isinstance(namespace, NamespaceDoc): return elif isinstance(namespace, ClassDoc): var_dict = namespace.local_variables else: var_dict = namespace.variables | 8ca0444b7e82785ddab055f0d90bed1ddc6cea99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/8ca0444b7e82785ddab055f0d90bed1ddc6cea99/docparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
67,
6105,
12,
2890,
16,
1981,
16,
508,
4672,
309,
486,
1549,
12,
4937,
16,
6005,
1759,
4672,
327,
1327,
1549,
12,
4937,
16,
27785,
4672,
569,
67,
1576,
273,
1981,
18,
3729,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
67,
6105,
12,
2890,
16,
1981,
16,
508,
4672,
309,
486,
1549,
12,
4937,
16,
6005,
1759,
4672,
327,
1327,
1549,
12,
4937,
16,
27785,
4672,
569,
67,
1576,
273,
1981,
18,
3729,
67,
... |
except BuildError, e: print_("Build aborted:", e) | except BuildError: print_("Build aborted:", geterror()) | def main(dependencies, msvcr90_preparation, msys_preparation): """Build the dependencies according to the command line options.""" options, args = command_line() if options.arg_help: print_("These are the Pygame library dependencies:") for dep in dependencies: print_(" ", dep.name) return 0 try: chosen_deps = choose_dependencies(dependencies, options, args) except ChooseError, e: print_(e) return 1 print_("Destination directory:", options.destination_dir) if not chosen_deps: if not args: print_("No libraries specified.") elif options.build_all: print_("All libraries excluded") chosen_deps.insert(0, msvcr90_preparation) chosen_deps.insert(0, msys_preparation) try: msys_directory = options.msys_directory except AttributeError: msys_directory = None try: m = msys.Msys(msys_directory) except msys.MsysException, e: print_(e) return 1 start_time = None return_code = 1 set_environment_variables(m, options) print_("\n=== Starting build ===") start_time = time.time() # For file timestamp checks. try: build(chosen_deps, m) except BuildError, e: print_("Build aborted:", e) else: # A successful build! return_code = 0 summary(dependencies, m, start_time, chosen_deps, options) return return_code | 5ed962a58a84830cbe0f649aee7072426feb4c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/5ed962a58a84830cbe0f649aee7072426feb4c22/msys_link_VC_2008_dlls.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
11037,
16,
4086,
90,
3353,
9349,
67,
1484,
20961,
16,
4086,
1900,
67,
1484,
20961,
4672,
3536,
3116,
326,
5030,
4888,
358,
326,
1296,
980,
702,
12123,
225,
702,
16,
833,
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,
2774,
12,
11037,
16,
4086,
90,
3353,
9349,
67,
1484,
20961,
16,
4086,
1900,
67,
1484,
20961,
4672,
3536,
3116,
326,
5030,
4888,
358,
326,
1296,
980,
702,
12123,
225,
702,
16,
833,
273,
... |
self.doclist.Delete(created_entry.GetEditLink().href) | self.editClient.Delete(created_entry.GetEditLink().href) | def testCreateAndDeleteEmptySpreadsheet(self): self.new_entry.title = gdata.atom.Title(text=self.TITLE) self.new_entry.category[0].term = gdata.docs.service.SPREADSHEET_KIND_TERM self.new_entry.category[0].label = 'spreadsheet' created_entry = self.doclist.Post(self.new_entry, '/feeds/documents/private/full') self.doclist.Delete(created_entry.GetEditLink().href) self.assertEqual(created_entry.title.text, self.TITLE) self.assertEqual(created_entry.category[0].label, 'spreadsheet') | 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,
2613,
1921,
28719,
8118,
12,
2890,
4672,
365,
18,
2704,
67,
4099,
18,
2649,
273,
314,
892,
18,
7466,
18,
4247,
12,
955,
33,
2890,
18,
14123,
13,
365,
18,
2704,
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,
1842,
1684,
1876,
2613,
1921,
28719,
8118,
12,
2890,
4672,
365,
18,
2704,
67,
4099,
18,
2649,
273,
314,
892,
18,
7466,
18,
4247,
12,
955,
33,
2890,
18,
14123,
13,
365,
18,
2704,
67,
... |
class C2ScaledRecip recip(C2Function): | class C2ScaledRecip(C2Function): | def value_with_derivatives(self, x): q=_myfuncs.sqrt(x) return native(q, 0.5/q, -0.25/(q*x)) | 32c3750c41e6f7d08d11c46d47fefde584314792 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6028/32c3750c41e6f7d08d11c46d47fefde584314792/C2Functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
460,
67,
1918,
67,
20615,
8785,
12,
2890,
16,
619,
4672,
1043,
33,
67,
4811,
17728,
18,
24492,
12,
92,
13,
327,
225,
6448,
12,
85,
16,
374,
18,
25,
19,
85,
16,
300,
20,
18,
2947,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
460,
67,
1918,
67,
20615,
8785,
12,
2890,
16,
619,
4672,
1043,
33,
67,
4811,
17728,
18,
24492,
12,
92,
13,
327,
225,
6448,
12,
85,
16,
374,
18,
25,
19,
85,
16,
300,
20,
18,
2947,
... |
filename = compiler.library_filename(libname, lib_type='shared') result = find_file(filename, std_dirs, paths) if result is not None: return result filename = compiler.library_filename(libname, lib_type='static') result = find_file(filename, std_dirs, paths) return result | result = compiler.find_library_file(std_dirs + paths, libname) if result is None: return None dirname = os.path.dirname(result) for p in std_dirs: if p.endswith(os.sep): p = p.strip(os.sep) if p == dirname: return [ ] for p in paths: if p.endswith(os.sep): p = p.strip(os.sep) if p == dirname: return [p] else: assert False, "Internal error: Path not found in std_dirs or paths" | def find_library_file(compiler, libname, std_dirs, paths): filename = compiler.library_filename(libname, lib_type='shared') result = find_file(filename, std_dirs, paths) if result is not None: return result filename = compiler.library_filename(libname, lib_type='static') result = find_file(filename, std_dirs, paths) return result | c43afc96d1c6818977ff7570f0f2992918891c21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c43afc96d1c6818977ff7570f0f2992918891c21/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
12083,
67,
768,
12,
9576,
16,
2561,
529,
16,
2044,
67,
8291,
16,
2953,
4672,
1544,
273,
5274,
18,
12083,
67,
3459,
12,
2941,
529,
16,
2561,
67,
723,
2218,
11574,
6134,
563,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12083,
67,
768,
12,
9576,
16,
2561,
529,
16,
2044,
67,
8291,
16,
2953,
4672,
1544,
273,
5274,
18,
12083,
67,
3459,
12,
2941,
529,
16,
2561,
67,
723,
2218,
11574,
6134,
563,
... |
def _zapdb(filename): if os.path.exists(filename): db = bsddb.hashopen(filename, 'c') for k in db.keys(): del db[k] db.close() | def _zapdb(filename): if os.path.exists(filename): db = bsddb.hashopen(filename, 'c') for k in db.keys(): del db[k] db.close() | d8d3d0e580cb1a2fb47a8454c25e13ad444faeb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/d8d3d0e580cb1a2fb47a8454c25e13ad444faeb5/Postfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
94,
438,
1966,
12,
3459,
4672,
309,
1140,
18,
803,
18,
1808,
12,
3459,
4672,
1319,
273,
7081,
449,
70,
18,
2816,
3190,
12,
3459,
16,
296,
71,
6134,
364,
417,
316,
1319,
18,
2452... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
94,
438,
1966,
12,
3459,
4672,
309,
1140,
18,
803,
18,
1808,
12,
3459,
4672,
1319,
273,
7081,
449,
70,
18,
2816,
3190,
12,
3459,
16,
296,
71,
6134,
364,
417,
316,
1319,
18,
2452... | |
os.setegid(sprocESS_UID) os.seteuid(sprocESS_GID) | os.setegid(self.PROCESS_UID) os.seteuid(self.PROCESS_GID) | def tearDown(self): os.setegid(sprocESS_UID) os.seteuid(sprocESS_GID) TestCase.tearDown(self) | 850553bd492cffcc2248c5d0dd1347cf938a1996 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7296/850553bd492cffcc2248c5d0dd1347cf938a1996/test_psutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
1140,
18,
542,
1332,
350,
12,
2890,
18,
16560,
67,
3060,
13,
1140,
18,
542,
73,
1911,
12,
2890,
18,
16560,
67,
28258,
13,
7766,
2449,
18,
736,
297,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
1140,
18,
542,
1332,
350,
12,
2890,
18,
16560,
67,
3060,
13,
1140,
18,
542,
73,
1911,
12,
2890,
18,
16560,
67,
28258,
13,
7766,
2449,
18,
736,
297,
4... |
"""Starts the SchoolTool HTTP server.""" | """Start the SchoolTool HTTP server.""" | def main(): """Starts the SchoolTool HTTP server.""" sys.exit(Server().main(sys.argv[1:])) | da1dca3f77b894f6d64135657128f461356526df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/da1dca3f77b894f6d64135657128f461356526df/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
1685,
326,
348,
343,
1371,
6364,
2239,
1438,
12123,
2589,
18,
8593,
12,
2081,
7675,
5254,
12,
9499,
18,
19485,
63,
21,
30,
22643,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
1685,
326,
348,
343,
1371,
6364,
2239,
1438,
12123,
2589,
18,
8593,
12,
2081,
7675,
5254,
12,
9499,
18,
19485,
63,
21,
30,
22643,
282,
2,
-100,
-100,
-100,
-100,
-100,... |
res.append(klass(dirr.name,self,self.context, dirr, {'active_id': self.res_id})) | res.append(klass(dirr.name,self,self.context, dirr, {'active_id': self.res_id})) | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 0cb5ccb45d72356e72b0fb025b06360d62a3fbf6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0cb5ccb45d72356e72b0fb025b06360d62a3fbf6/nodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3624,
67,
588,
12,
2890,
16,
4422,
16,
508,
33,
7036,
16,
2461,
33,
7036,
4672,
4314,
303,
441,
273,
365,
18,
2472,
6315,
3211,
303,
441,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3624,
67,
588,
12,
2890,
16,
4422,
16,
508,
33,
7036,
16,
2461,
33,
7036,
4672,
4314,
303,
441,
273,
365,
18,
2472,
6315,
3211,
303,
441,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
snmpTrapOID = v1.apiTrapPDU.getEnterprise(v1Pdu) + (0,) + \ (v1.apiTrapPDU.getSpecificTrap(v1Pdu),) | snmpTrapOIDParam = v1.apiTrapPDU.getEnterprise(v1Pdu) + (0,) + \ (v1.apiTrapPDU.getSpecificTrap(v1Pdu),) | def v1ToV2(v1Pdu, origV2Pdu=None): pduType = v1Pdu.tagSet v2Pdu = __v1ToV2PduMap[pduType].clone() v2c.apiPDU.setDefaults(v2Pdu) debug.logger & debug.flagPrx and debug.logger('v1ToV2: v1Pdu %s' % v1Pdu.prettyPrint()) v2VarBinds = [] # 3.1 if rfc3411.notificationClassPDUs.has_key(pduType): # 3.1.1 sysUpTime = v1.apiTrapPDU.getTimeStamp(v1Pdu) # 3.1.2 genericTrap = v1.apiTrapPDU.getGenericTrap(v1Pdu) if genericTrap == 6: snmpTrapOID = v1.apiTrapPDU.getEnterprise(v1Pdu) + (0,) + \ (v1.apiTrapPDU.getSpecificTrap(v1Pdu),) # 3.1.3 else: snmpTrapOID = __v1ToV2TrapMap[genericTrap] v2VarBinds.append((__sysUpTime, sysUpTime)) v2VarBinds.append((snmpTrapOID, __null)) v2VarBinds.append( (__snmpTrapEnterprise, v1.apiTrapPDU.getEnterprise(v1Pdu)) ) # 3.1.4 v2VarBinds.append( (__snmpTrapAddress, v1.apiTrapPDU.getAgentAddr(v1Pdu)) ) varBinds = v1.apiTrapPDU.getVarBinds(v1Pdu) else: varBinds = v1.apiPDU.getVarBinds(v1Pdu) # Translate Var-Binds for oid, v1Val in varBinds: # 2.1.1.11 if v1Val.tagSet == v1.NetworkAddress.tagSet: v1Val = v1Val.getComponent() v2VarBinds.append( (oid, __v1ToV2ValueMap[v1Val.tagSet].clone(v1Val)) ) if rfc3411.responseClassPDUs.has_key(pduType): # 4.1.2.2.1&2 errorStatus = int(v1.apiPDU.getErrorStatus(v1Pdu)) errorIndex = int(v1.apiPDU.getErrorIndex(v1Pdu)) if errorStatus == 2: # noSuchName if origV2Pdu.tagSet == v2c.GetNextRequestPDU.tagSet: v2VarBinds[errorIndex-1] = ( v2VarBinds[errorIndex-1][0], exval.endOfMib ) else: v2VarBinds[errorIndex-1] = ( v2VarBinds[errorIndex-1][0], exval.noSuchObject ) else: # one-to-one mapping v2c.apiPDU.setErrorStatus(v2Pdu, errorStatus) v2c.apiPDU.setErrorIndex(v2Pdu, errorIndex) # 4.1.2.1 --> no-op if not rfc3411.notificationClassPDUs.has_key(pduType): v2c.apiPDU.setRequestID(v2Pdu, long(v1.apiPDU.getRequestID(v1Pdu))) v2c.apiPDU.setVarBinds(v2Pdu, v2VarBinds) debug.logger & debug.flagPrx and debug.logger('v1ToV2: v2Pdu %s' % v2Pdu.prettyPrint()) return v2Pdu | 2b5e220c1b98d3f48fa9a4d22ea5425ee5b01b2a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/587/2b5e220c1b98d3f48fa9a4d22ea5425ee5b01b2a/rfc2576.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
331,
21,
774,
58,
22,
12,
90,
21,
52,
2544,
16,
1647,
58,
22,
52,
2544,
33,
7036,
4672,
21160,
559,
273,
331,
21,
52,
2544,
18,
2692,
694,
331,
22,
52,
2544,
273,
1001,
90,
21,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
331,
21,
774,
58,
22,
12,
90,
21,
52,
2544,
16,
1647,
58,
22,
52,
2544,
33,
7036,
4672,
21160,
559,
273,
331,
21,
52,
2544,
18,
2692,
694,
331,
22,
52,
2544,
273,
1001,
90,
21,
7... |
only interior nodes from vertex start to vertex end in the | only interior vertices from vertex start to vertex end in the | def interior_paths(self, start, end): """ Returns an exhaustive list of paths (also lists) through only interior nodes from vertex start to vertex end in the graph. Note -- start and end do not necessarily have to be boundary nodes. INPUT: start -- the vertex of the graph to search for paths from end -- the vertex of the graph to search for paths to EXAMPLES: sage: eg1 = Graph({0:[1,2], 1:[4], 2:[3,4], 4:[5], 5:[6]}) sage: eg1.all_paths(0,6) [[0, 1, 4, 5, 6], [0, 2, 4, 5, 6]] sage: eg2 = eg1.copy() sage: eg2.set_boundary([0,1,3]) sage: eg2.interior_paths(0,6) [[0, 2, 4, 5, 6]] sage: eg2.all_paths(0,6) [[0, 1, 4, 5, 6], [0, 2, 4, 5, 6]] sage: eg3 = graphs.PetersenGraph() sage: eg3.set_boundary([0,1,2,3,4]) sage: eg3.all_paths(1,4) [[1, 0, 4], [1, 0, 5, 8, 3, 2, 7, 9, 4], [1, 0, 5, 8, 3, 4], [1, 0, 5, 8, 6, 9, 4], [1, 0, 5, 8, 6, 9, 7, 2, 3, 4], [1, 0, 5, 7, 9, 4], [1, 0, 5, 7, 9, 6, 8, 3, 4], [1, 0, 5, 7, 2, 3, 8, 6, 9, 4], [1, 0, 5, 7, 2, 3, 4], [1, 2, 3, 8, 5, 0, 4], [1, 2, 3, 8, 5, 7, 9, 4], [1, 2, 3, 8, 6, 9, 4], [1, 2, 3, 8, 6, 9, 7, 5, 0, 4], [1, 2, 3, 4], [1, 2, 7, 9, 4], [1, 2, 7, 9, 6, 8, 3, 4], [1, 2, 7, 9, 6, 8, 5, 0, 4], [1, 2, 7, 5, 0, 4], [1, 2, 7, 5, 8, 3, 4], [1, 2, 7, 5, 8, 6, 9, 4], [1, 6, 8, 3, 2, 7, 9, 4], [1, 6, 8, 3, 2, 7, 5, 0, 4], [1, 6, 8, 3, 4], [1, 6, 8, 5, 0, 4], [1, 6, 8, 5, 7, 9, 4], [1, 6, 8, 5, 7, 2, 3, 4], [1, 6, 9, 4], [1, 6, 9, 7, 2, 3, 8, 5, 0, 4], [1, 6, 9, 7, 2, 3, 4], [1, 6, 9, 7, 5, 0, 4], [1, 6, 9, 7, 5, 8, 3, 4]] sage: eg3.interior_paths(1,4) [[1, 6, 8, 5, 7, 9, 4], [1, 6, 9, 4]] """ H = self.copy() for node in self.get_boundary(): if (node != start and node != end): H.delete_vertex(node) return H.all_paths(start, end) | e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26230,
67,
4481,
12,
2890,
16,
787,
16,
679,
4672,
3536,
2860,
392,
19575,
641,
688,
666,
434,
2953,
261,
31144,
6035,
13,
3059,
1338,
26230,
6928,
628,
5253,
787,
358,
5253,
679,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26230,
67,
4481,
12,
2890,
16,
787,
16,
679,
4672,
3536,
2860,
392,
19575,
641,
688,
666,
434,
2953,
261,
31144,
6035,
13,
3059,
1338,
26230,
6928,
628,
5253,
787,
358,
5253,
679,
316,
... |
msg.params = [sever.hostname] | msg.params = [server.hostname] | def watchConnection(self, connection, sockThread): sockThread.join() if(not connection.closed): # send a quit message if(connection.type == self.IRC_Connection.CLIENT): msg = self.IRC_Message("QUIT :Lost connection") msg.prefix = connection.user.fullUser() self.localBroadcast(msg, connection.user, connection) # this method should never attempt to send messages to the dead connection self.broadcast(msg, connection, self.IRC_Connection.SERVER) self.removeUser(connection.user) elif(connection.type == self.IRC_Connection.SERVER): for user in self.users: if(user.connection == connection): # any user which was connected to us through the lost server must quit msg = self.IRC_Message("QUIT :Lost in netsplit") msg.prefix = user.fullUser() self.localBroadcast(msg, user, connection) self.broadcast(msg, connection, self.IRC_Connection.SERVER) self.removeUser(user) for server in self.servers: if(server.connection == connection): msg = self.IRC_Message("SQUIT :Lost in netsplit") msg.prefix = self.hostname msg.params = [sever.hostname] self.broadcast(msg, connection, self.IRC_Connection.SERVER) self.removeServer(server) self.removeServer(connection.user) else: # that was fast :P connection.sock.close() self.connections.remove(connection) | 7a5c24b8ea075a8ea853887e046e2421a561161c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11670/7a5c24b8ea075a8ea853887e046e2421a561161c/IRC_Server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4267,
1952,
12,
2890,
16,
1459,
16,
7313,
3830,
4672,
7313,
3830,
18,
5701,
1435,
309,
12,
902,
1459,
18,
12204,
4672,
468,
1366,
279,
9706,
883,
309,
12,
4071,
18,
723,
422,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4267,
1952,
12,
2890,
16,
1459,
16,
7313,
3830,
4672,
7313,
3830,
18,
5701,
1435,
309,
12,
902,
1459,
18,
12204,
4672,
468,
1366,
279,
9706,
883,
309,
12,
4071,
18,
723,
422,
365,
18,
... |
search_locations.append(src_dir + "/sconsbuild/Debug/test_shell") search_locations.append(src_dir + "/out/Debug/test_shell") | def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.getenv("HOMEPATH")) search_locations.append(chrome_dir + "/Release/test_shell.exe") search_locations.append(chrome_dir + "/Debug/test_shell.exe") search_locations.append(home_dir + "/bin/test_shell/" + "test_shell.exe") if (sys.platform in ('linux', 'linux2')): search_locations.append(src_dir + "/sconsbuild/Release/test_shell") search_locations.append(src_dir + "/out/Release/test_shell") search_locations.append(src_dir + "/sconsbuild/Debug/test_shell") search_locations.append(src_dir + "/out/Debug/test_shell") search_locations.append(os.getenv("HOME") + "/bin/test_shell/test_shell") if (sys.platform == 'darwin'): search_locations.append(src_dir + "/xcodebuild/Release/TestShell.app/Contents/MacOS/TestShell") search_locations.append(src_dir + "/xcodebuild/Debug/TestShell.app/Contents/MacOS/TestShell") search_locations.append(os.getenv("HOME") + "/bin/test_shell/" + "TestShell.app/Contents/MacOS/TestShell") for loc in search_locations: if os.path.isfile(loc): return loc raise Exception("Could not find test_shell executable\n" + "**test_shell may need to be built**\n" + "Searched: \n" + "\n".join(search_locations) + "\n" + "To specify a path to test_shell use --test-shell-path") | 416261c9a80c52eb9d5047727bbce605a485cf1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/416261c9a80c52eb9d5047727bbce605a485cf1c/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4163,
4709,
13220,
13332,
468,
1220,
353,
11769,
93,
18,
2597,
353,
1399,
358,
7274,
326,
2117,
434,
326,
1842,
67,
10304,
18167,
67,
1214,
273,
1140,
18,
803,
18,
7959,
803,
24899,
1969... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4163,
4709,
13220,
13332,
468,
1220,
353,
11769,
93,
18,
2597,
353,
1399,
358,
7274,
326,
2117,
434,
326,
1842,
67,
10304,
18167,
67,
1214,
273,
1140,
18,
803,
18,
7959,
803,
24899,
1969... | |
watchList.extend([(self.item, pim.Stamp.stamp_types.name),]) | watchList.append((self.item, pim.Stamp.stamp_types.name)) | def getWatchList(self): watchList = super(ReminderTypeAreaBlock, self).getWatchList() watchList.extend([(self.item, pim.Stamp.stamp_types.name),]) return watchList | 9ffce02fc80aeed7028d60cda6cd4bba70318784 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/9ffce02fc80aeed7028d60cda6cd4bba70318784/detail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
5234,
682,
12,
2890,
4672,
4267,
682,
273,
2240,
12,
1933,
14055,
559,
5484,
1768,
16,
365,
2934,
588,
5234,
682,
1435,
4267,
682,
18,
6923,
12443,
2890,
18,
1726,
16,
293,
381,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
5234,
682,
12,
2890,
4672,
4267,
682,
273,
2240,
12,
1933,
14055,
559,
5484,
1768,
16,
365,
2934,
588,
5234,
682,
1435,
4267,
682,
18,
6923,
12443,
2890,
18,
1726,
16,
293,
381,
1... |
r1=self.datetime_rect r2=self.service_rect | r1=self.weekday_rect r2=self.datetime_rect r3=self.service_rect | def buildSimilarEntry(self, service, eventId, beginTime, service_name, duration): rec=(self.timer.isInTimer(eventId, beginTime, duration, service) > ((duration/10)*8)) r1=self.datetime_rect r2=self.service_rect res = [ None ] # no private data needed t = localtime(beginTime) res.append((eListboxPythonMultiContent.TYPE_TEXT, r1.left(), r1.top(), r1.width(), r1.height(), 0, RT_HALIGN_RIGHT, "%s %02d.%02d, %02d:%02d"%(self.days[t[6]],t[2],t[1],t[3],t[4]))) if rec: res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, r2.left(), r2.top(), 21, 21, loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, 'epgclock-fs8.png')))) res.append((eListboxPythonMultiContent.TYPE_TEXT, r2.left() + 25, r2.top(), r2.width(), r2.height(), 0, RT_HALIGN_LEFT, service_name)) else: res.append((eListboxPythonMultiContent.TYPE_TEXT, r2.left(), r2.top(), r2.width(), r2.height(), 0, RT_HALIGN_LEFT, service_name)) return res | f509eadbf08d0b7e0d5f369e4ed21a20830ab001 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/f509eadbf08d0b7e0d5f369e4ed21a20830ab001/EpgList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
16891,
1622,
12,
2890,
16,
1156,
16,
26004,
16,
2376,
950,
16,
1156,
67,
529,
16,
3734,
4672,
1950,
28657,
2890,
18,
12542,
18,
291,
382,
6777,
12,
2575,
548,
16,
2376,
950,
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,
1361,
16891,
1622,
12,
2890,
16,
1156,
16,
26004,
16,
2376,
950,
16,
1156,
67,
529,
16,
3734,
4672,
1950,
28657,
2890,
18,
12542,
18,
291,
382,
6777,
12,
2575,
548,
16,
2376,
950,
16,
... |
if parClass in self._classes: rclass, keyval = findClassForMethod(parClass, methodId, variants) elif parClass in lang.BUILTIN: rclass, keyval = True, True | rclass, keyval = findClassForMethod(parClass, methodId, variants) | def classHasOwnMethod(classAttribs, methId): candidates = {} candidates.update(classAttribs.get("members",{})) candidates.update(classAttribs.get("statics",{})) if "construct" in classAttribs: candidates.update(dict((("construct", classAttribs.get("construct")),))) if methId in candidates.keys(): return candidates[methId] # return the definition of the attribute else: return None | 9ff19efb0410dc81d659f5c53838b203cef9d775 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/9ff19efb0410dc81d659f5c53838b203cef9d775/DependencyLoader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
667,
5582,
5460,
1305,
12,
1106,
31292,
16,
7917,
548,
4672,
7965,
273,
2618,
7965,
18,
2725,
12,
1106,
31292,
18,
588,
2932,
7640,
3113,
2916,
3719,
7965,
18,
2725,
12,
1106,
31292,
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,
667,
5582,
5460,
1305,
12,
1106,
31292,
16,
7917,
548,
4672,
7965,
273,
2618,
7965,
18,
2725,
12,
1106,
31292,
18,
588,
2932,
7640,
3113,
2916,
3719,
7965,
18,
2725,
12,
1106,
31292,
18,... |
return -1 | mtime = super(FileSimpleDependency, self).get_mtime() | def get_mtime(self): try: mtime = FileSimpleDependency.get_mtime(self) except OSError: # Let's tell that the file is very old, older than 1.1.1970 if it # does not exist. return -1 return mtime | 383daed40753e5a1282c016dfbbb5dda8f9b7385 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4663/383daed40753e5a1282c016dfbbb5dda8f9b7385/make.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
10838,
12,
2890,
4672,
775,
30,
13158,
273,
1387,
5784,
7787,
18,
588,
67,
10838,
12,
2890,
13,
1335,
10002,
30,
468,
10559,
1807,
9276,
716,
326,
585,
353,
8572,
1592,
16,
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,
336,
67,
10838,
12,
2890,
4672,
775,
30,
13158,
273,
1387,
5784,
7787,
18,
588,
67,
10838,
12,
2890,
13,
1335,
10002,
30,
468,
10559,
1807,
9276,
716,
326,
585,
353,
8572,
1592,
16,
12... |
self.store[entry.tag]['all'].append(child) | self.store['all'].append(child) | def Index(self): '''Store XML data in reasonable structures''' self.store = {'Class':{'all':[]}, 'Image':{'all':[]}, 'all':[]} try: xdata = XML(self.data) except ExpatError: syslog(LOG_ERR, "Failed to parse base.xml") return for entry in xdata.getchildren(): self.store[entry.tag][entry.get('name')] = {'all':[], 'Class':{}, 'Image':{}} if entry.tag in ['Image', 'Class']: for child in entry.getchildren(): if child.tag in ['Image', 'Class']: self.store[entry.tag][entry.get('name')][child.tag][child.get('name')] = child.getchildren() else: self.store[entry.tag][entry.get('name')]['all'].append(child) else: self.store[entry.tag]['all'].append(child) | ca4407efff20b72ee31fe98fc4eb42eae4550a9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/ca4407efff20b72ee31fe98fc4eb42eae4550a9c/Base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3340,
12,
2890,
4672,
9163,
2257,
3167,
501,
316,
23589,
12597,
26418,
365,
18,
2233,
273,
13666,
797,
4278,
27828,
454,
4278,
8526,
5779,
296,
2040,
4278,
27828,
454,
4278,
8526,
5779,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3340,
12,
2890,
4672,
9163,
2257,
3167,
501,
316,
23589,
12597,
26418,
365,
18,
2233,
273,
13666,
797,
4278,
27828,
454,
4278,
8526,
5779,
296,
2040,
4278,
27828,
454,
4278,
8526,
5779,
29... |
id = self.pool.get('ir.model.data')._update(self.cr, self.uid, \ | id = self.pool.get('ir.model.data')._update(self.cr, 1, \ | def process_act_window(self, node): assert getattr(node, 'id'), "Attribute %s of act_window is empty !" % ('id',) assert getattr(node, 'name'), "Attribute %s of act_window is empty !" % ('name',) assert getattr(node, 'res_model'), "Attribute %s of act_window is empty !" % ('res_model',) self.validate_xml_id(node.id) view_id = False if node.view: view_id = self.get_id(node.view) if not node.context: node.context={} context = eval(str(node.context), self.eval_context) values = { 'name': node.name, 'type': node.type or 'ir.actions.act_window', 'view_id': view_id, 'domain': node.domain, 'context': context, 'res_model': node.res_model, 'src_model': node.src_model, 'view_type': node.view_type or 'form', 'view_mode': node.view_mode or 'tree,form', 'usage': node.usage, 'limit': node.limit, 'auto_refresh': node.auto_refresh, 'multi': getattr(node, 'multi', False), } | 9ec0865f7c8ce62032212bcee73dc1b1f39c2b04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9ec0865f7c8ce62032212bcee73dc1b1f39c2b04/yaml_import.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
621,
67,
5668,
12,
2890,
16,
756,
4672,
1815,
3869,
12,
2159,
16,
296,
350,
19899,
315,
1499,
738,
87,
434,
1328,
67,
5668,
353,
1008,
29054,
738,
7707,
350,
2187,
13,
1815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
621,
67,
5668,
12,
2890,
16,
756,
4672,
1815,
3869,
12,
2159,
16,
296,
350,
19899,
315,
1499,
738,
87,
434,
1328,
67,
5668,
353,
1008,
29054,
738,
7707,
350,
2187,
13,
1815,
... |
attributes.append(('mpco', 0)) | attributes.append(('mpco', 0)) | def make_daap_playlists(self, items): mappings = [('title', 'minm'), ('id', 'miid'), ('id', 'mper')] for x in items: attributes = [] for p, q in mappings: if isinstance(getattr(x, p), unicode): attributes.append((q, getattr(x, p).encode('utf-8'))) else: attributes.append((q, getattr(x, p))) count = len(self.get_items(playlist_id=x.id)) attributes.append(('mpco', 0)) # Parent container ID attributes.append(('mimc', count)) # Item count self.daap_playlists[x.id] = attributes | d0854cbc42b02a9b723215a904e1eca4bb1bc8e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/d0854cbc42b02a9b723215a904e1eca4bb1bc8e7/sharing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2414,
438,
67,
1601,
9772,
12,
2890,
16,
1516,
4672,
7990,
273,
306,
2668,
2649,
2187,
296,
1154,
81,
19899,
7707,
350,
2187,
296,
9197,
350,
19899,
7707,
350,
2187,
296,
81,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2414,
438,
67,
1601,
9772,
12,
2890,
16,
1516,
4672,
7990,
273,
306,
2668,
2649,
2187,
296,
1154,
81,
19899,
7707,
350,
2187,
296,
9197,
350,
19899,
7707,
350,
2187,
296,
81,
... |
upgraded[prvpkg].append(pkg) | upgraded[upgpkg].append(pkg) | def runStarting(self): Policy.runStarting(self) self._upgrading = upgrading = {} self._upgraded = upgraded = {} self._bonus = bonus = {} queue = self._trans.getQueue() for pkg in self._trans.getCache().getPackages(): # Precompute upgrade relations. for upg in pkg.upgrades: for prv in upg.providedby: for prvpkg in prv.packages: if (prvpkg.installed and self.getPriority(pkg) >= self.getPriority(prvpkg)): upgrading[pkg] = True if prvpkg in upgraded: upgraded[prvpkg].append(pkg) else: upgraded[prvpkg] = [pkg] # Downgrades are upgrades if they have a higher priority. for prv in pkg.provides: for upg in prv.upgradedby: for upgpkg in upg.packages: if (upgpkg.installed and self.getPriority(pkg) > self.getPriority(upgpkg)): upgrading[pkg] = True if upgpkg in upgraded: upgraded[prvpkg].append(pkg) else: upgraded[prvpkg] = [pkg] # Precompute bonus weight for installing packages # required for other upgrades. weight = 0 for prv in pkg.provides: for req in prv.requiredby: for reqpkg in req.packages: if queue.get(reqpkg) is UPGRADE: weight -= 3 if weight: bonus[pkg] = weight | 776c631e16b1ba88669a4fb8ae57545e09742141 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/776c631e16b1ba88669a4fb8ae57545e09742141/transaction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
11715,
12,
2890,
4672,
7436,
18,
2681,
11715,
12,
2890,
13,
365,
6315,
416,
15210,
273,
731,
15210,
273,
2618,
365,
6315,
416,
19305,
273,
31049,
273,
2618,
365,
6315,
18688,
407,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11715,
12,
2890,
4672,
7436,
18,
2681,
11715,
12,
2890,
13,
365,
6315,
416,
15210,
273,
731,
15210,
273,
2618,
365,
6315,
416,
19305,
273,
31049,
273,
2618,
365,
6315,
18688,
407,
... |
def dual_free_module(self, bound=None, anemic=True): """ | def dual_free_module(self, bound=None, anemic=True, use_star=True): r""" | def dual_free_module(self, bound=None, anemic=True): """ Compute embedded dual free module if possible. In general this won't be possible, e.g., if this space is not Hecke equivariant, possibly if it is not cuspidal, or if the characteristic is not 0. In all these cases we raise a RuntimeError exception. """ try: return self.__dual_free_module except AttributeError: if self.dimension() == 0: self.__dual_free_module = self.ambient_hecke_module().dual_free_module().zero_submodule() return self.__dual_free_module | 448402c83dbf6e87567edb0de0e4b1f151dd54f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/448402c83dbf6e87567edb0de0e4b1f151dd54f6/submodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24557,
67,
9156,
67,
2978,
12,
2890,
16,
2489,
33,
7036,
16,
392,
351,
335,
33,
5510,
16,
999,
67,
10983,
33,
5510,
4672,
436,
8395,
8155,
7488,
24557,
4843,
1605,
309,
3323,
18,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24557,
67,
9156,
67,
2978,
12,
2890,
16,
2489,
33,
7036,
16,
392,
351,
335,
33,
5510,
16,
999,
67,
10983,
33,
5510,
4672,
436,
8395,
8155,
7488,
24557,
4843,
1605,
309,
3323,
18,
225,
... |
path = "%s/patches/%s/%s/%s/%s_%s" \ % (ROOT, distro, pathhash(source["Package"]), source["Package"], source["Package"], source["Version"]) | path = "%s/%s_%s" % (patch_directory(distro, source), source["Package"], source["Version"]) | def patch_file(distro, source, slipped=False): """Return the location of a local patch file.""" path = "%s/patches/%s/%s/%s/%s_%s" \ % (ROOT, distro, pathhash(source["Package"]), source["Package"], source["Package"], source["Version"]) if slipped: return path + ".slipped-patch" else: return path + ".patch" | 25611a3aa48a730f0d474ca7140e900048fc7433 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1955/25611a3aa48a730f0d474ca7140e900048fc7433/momlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
67,
768,
12,
4413,
303,
16,
1084,
16,
272,
3169,
1845,
33,
8381,
4672,
3536,
990,
326,
2117,
434,
279,
1191,
4729,
585,
12123,
589,
273,
2213,
87,
5258,
87,
10185,
87,
6,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
67,
768,
12,
4413,
303,
16,
1084,
16,
272,
3169,
1845,
33,
8381,
4672,
3536,
990,
326,
2117,
434,
279,
1191,
4729,
585,
12123,
589,
273,
2213,
87,
5258,
87,
10185,
87,
6,
738,
... |
def __init__(self): | def __init__(self, router): | def __init__(self): super(rapidsms.app.App, self).__init__() self.name = 'Logger' | 4170c4625b8092215328fe6c48e4f3dbf453b893 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/4170c4625b8092215328fe6c48e4f3dbf453b893/app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4633,
4672,
2240,
12,
1266,
2232,
959,
18,
2910,
18,
3371,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
529,
273,
296,
3328,
11,
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,
1001,
2738,
972,
12,
2890,
16,
4633,
4672,
2240,
12,
1266,
2232,
959,
18,
2910,
18,
3371,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
529,
273,
296,
3328,
11,
2,
-100,
-100,
-100,
... |
if storagegroups.has_key(u'mythvideo'): videometadata[u'host'] = localhostname.lower() | def createVideometadataRecord(item): '''Using the details from a Miro item create a MythTV videometadata record return an dictionary of MythTV an initialised videometadata record ''' global localhostname, simulation, verbose, storagegroups, ffmpeg, channel_id, flat, image_extensions global videometadata_initialize_record, vid_graphics_dirs, channel_icon_override ffmpeg_details = getVideoDetails(item[u'videoFilename']) start_end = getStartEndTimes(ffmpeg_details[u'duration'], item[u'downloadedTime']) fieldnames = mythvideo.getTableFieldNames(u'videometadata') sympath = u'Miro' if not flat: sympath+=u"/%s" % item[u'channelTitle'] banners = u'mirobridge_banner.jpg' for ext in image_extensions: filename = u"%s_banner.%s" % (item[u'channelTitle'], ext) if os.path.isfile(vid_graphics_dirs[u'bannerdir']+filename): banners = setSymbolic(vid_graphics_dirs[u'bannerdir']+filename, u'bannerdir', item[u'channelTitle']) break else: if not os.path.isfile(vid_graphics_dirs[u'bannerdir']+banners): banners = '' fanart = u'mirobridge_fanart.jpg' for ext in image_extensions: filename = u"%s_fanart.%s" % (item[u'channelTitle'], ext) if os.path.isfile(vid_graphics_dirs[u'fanartdir']+filename): fanart = setSymbolic(vid_graphics_dirs[u'fanartdir']+filename, u'fanartdir', item[u'channelTitle']) break else: if not os.path.isfile(vid_graphics_dirs[u'fanartdir']+fanart): fanart = '' ffmpeg_details = getVideoDetails(item[u'videoFilename']) start_end = getStartEndTimes(ffmpeg_details[u'duration'], item[u'downloadedTime']) videometadata = {} for key in videometadata_initialize_record: # Initialize the videometadata record videometadata[key] = videometadata_initialize_record[key] videometadata[u'title'] = item[u'channelTitle'] videometadata[u'subtitle'] = item[u'title'] try: details = massageDescription(item[u'description'], extras=True) except TypeError: print print u"MythVideo-Channel title(%s) subtitle(%s)" % (item[u'channelTitle'], item[u'title']) print u"The 'massageDescription()' function could not remove HTML and XML tags from:" print u"Description (%s)\n\n" % item[u'description'] details = {u'plot': item[u'description']} for key in details.keys(): videometadata[key] = details[key] if item[u'releasedate'] == None: item[u'releasedate'] = item[u'downloadedTime'] try: dummy = item[u'releasedate'].strftime('%Y-%m-%d') except ValueError: item[u'releasedate'] = item[u'downloadedTime'] if item[u'releasedate'] != None: videometadata[u'year'] = item[u'releasedate'].strftime('%Y') if u'episode' in fieldnames: videometadata[u'season'] = 0 videometadata[u'episode'] = 0 videometadata[u'length'] = ffmpeg_details[u'duration']/60 videometadata[u'category'] = mythvideo.getGenreId(u'Miro') if storagegroups.has_key(u'mythvideo'): videometadata[u'host'] = localhostname.lower() if not u'copied' in item.keys(): ext = (item[u'videoFilename']) videofile = setSymbolic(item[u'videoFilename'], u'mythvideo', "%s/%s - %s" % (sympath, item[u'channelTitle'], item[u'title']), allow_symlink=True) if videofile != None: videometadata[u'filename'] = videofile else: logger.critical(u"The file (%s) must exist to create a videometadata record" % item[u'videoFilename']) sys.exit(False) else: videometadata[u'filename'] = item[u'videoFilename'] if not u'copied' in item.keys(): if item[u'channel_icon'] and not item[u'channelTitle'].lower() in channel_icon_override: if storagegroups.has_key(u'posterdir'): videometadata[u'host'] = localhostname.lower() ext = (item[u'channel_icon']) filename = setSymbolic(item[u'channel_icon'], u'posterdir', u"%s" % (item[u'channelTitle'])) if filename != None: videometadata[u'coverfile'] = filename else: if item[u'item_icon']: if storagegroups.has_key(u'posterdir'): videometadata[u'host'] = localhostname.lower() ext = (item[u'item_icon']) filename = setSymbolic(item[u'item_icon'], u'posterdir', u"%s - %s" % (item[u'channelTitle'], item[u'title'])) if filename != None: videometadata[u'coverfile'] = filename else: if storagegroups.has_key(u'posterdir'): videometadata[u'host'] = localhostname.lower() videometadata[u'coverfile'] = item[u'channel_icon'] if not item.has_key(u'copied'): if item[u'screenshot']: if storagegroups.has_key(u'episodeimagedir'): videometadata[u'host'] = localhostname.lower() ext = (item[u'screenshot']) filename = setSymbolic(item[u'screenshot'], u'episodeimagedir', u"%s - %s" % (item[u'channelTitle'], item[u'title'])) if filename != None: videometadata[u'screenshot'] = filename else: if item[u'screenshot']: if storagegroups.has_key(u'episodeimagedir'): videometadata[u'host'] = localhostname.lower() videometadata[u'screenshot'] = item[u'screenshot'] if banners != u'' and videometadata[u'subtitle'] != u'': if storagegroups.has_key(u'bannerdir'): videometadata[u'host'] = localhostname.lower() videometadata[u'banner'] = banners else: videometadata[u'banner'] = vid_graphics_dirs[u'bannerdir']+banners if fanart != u'': if storagegroups.has_key(u'fanartdir'): videometadata[u'host'] = localhostname.lower() videometadata[u'fanart'] = fanart else: videometadata[u'fanart'] = vid_graphics_dirs[u'fanartdir']+fanart return [videometadata, createOldRecordedRecord(item, start_end[0], start_end[1])] # end createVideometadataRecord() | cefa7947527c8e9e2184befa6fb1cdca04096461 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/cefa7947527c8e9e2184befa6fb1cdca04096461/mirobridge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
58,
831,
362,
1175,
2115,
12,
1726,
4672,
9163,
7736,
326,
3189,
628,
279,
490,
11373,
761,
752,
279,
8005,
451,
15579,
331,
831,
362,
1175,
1409,
327,
392,
3880,
434,
8005,
451,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
58,
831,
362,
1175,
2115,
12,
1726,
4672,
9163,
7736,
326,
3189,
628,
279,
490,
11373,
761,
752,
279,
8005,
451,
15579,
331,
831,
362,
1175,
1409,
327,
392,
3880,
434,
8005,
451,
... | |
return fields[0]+localeconv()['decimal_point']+fields[1] | res = fields[0]+localeconv()['decimal_point']+fields[1] | def format(f,val,grouping=0): """Formats a value in the same way that the % formatting would use, but takes the current locale into account. Grouping is applied if the third parameter is true.""" result = f % val fields = string.split(result, ".") if grouping: fields[0]=_group(fields[0]) if len(fields)==2: return fields[0]+localeconv()['decimal_point']+fields[1] elif len(fields)==1: return fields[0] else: raise Error, "Too many decimal points in result string" | 0d4d81590f82ee1ba817c28f0a091353a2e69b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0d4d81590f82ee1ba817c28f0a091353a2e69b59/locale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
74,
16,
1125,
16,
25592,
33,
20,
4672,
3536,
8976,
279,
460,
316,
326,
1967,
4031,
716,
326,
738,
10407,
4102,
999,
16,
1496,
5530,
326,
783,
2573,
1368,
2236,
18,
3756,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
74,
16,
1125,
16,
25592,
33,
20,
4672,
3536,
8976,
279,
460,
316,
326,
1967,
4031,
716,
326,
738,
10407,
4102,
999,
16,
1496,
5530,
326,
783,
2573,
1368,
2236,
18,
3756,
310,
... |
if stripped_line[0] == ' | if stripped_line and stripped_line[0] == ' | def handle_encoding_declaration(contents, out): """Find a Python encoding declaration in the first line of contents. If found, output it to out and return contents without first line, else output a default utf-8 declaration and return contents. EXAMPLE: sage: from sage.misc.interpreter import handle_encoding_declaration sage: import sys sage: c1='# -*- coding: latin-1 -*-\nimport os, sys\n...' sage: c2='# -*- coding: iso-8859-15 -*-\nimport os, sys\n...' sage: c3='# -*- coding: ascii -*-\nimport os, sys\n...' sage: c4='import os, sys\n...' sage: handle_encoding_declaration(c1, sys.stdout) # -*- coding: latin-1 -*- 'import os, sys\n..' sage: handle_encoding_declaration(c2, sys.stdout) # -*- coding: iso-8859-15 -*- 'import os, sys\n..' sage: handle_encoding_declaration(c3, sys.stdout) # -*- coding: ascii -*- 'import os, sys\n..' sage: handle_encoding_declaration(c4, sys.stdout) # -*- coding: utf-8 -*- 'import os, sys\n...' NOTE: Python also looks for encoding hints in the second line as a the first line could contain a shebang. Better implementation possible after importing re, and then matching the regular expression coding[=:]\s*([-\w.]+) The encoding is in the first group. See http://docs.python.org/ref/encodings.html AUTHOR: - Lars Fischer """ # shebangs could also be dealt with #if (contents[0:2] == '#!'): # pos= contents.find('\n') # out.write(contents[0:pos]+ '\n') # contents = contents[pos+1:-1] hint="coding" pos=contents.find('\n') if pos > -1: first_line = contents[0:pos] else: first_line = contents[0:] stripped_line = first_line.lstrip() if stripped_line[0] == '#': pos=stripped_line.find(hint) if (pos > -1) and (stripped_line[pos+len(hint)] in ['=', ':']) : # we found a comment with an encoding hint # we can place it in front of the file: the line is a comment # so it does not harm out.write(first_line+'\n') # use the encoding hint specified by the user return contents[len(first_line)+1:-1] # use default encoding out.write("# -*- coding: utf-8 -*-\n") #out.write("# -*- coding: ascii -*-\n") # or ascii? Python used ascii and from 2.3 on you could specify a different # encodings. # but imho utf-8 is the better default # also read the Future compatibility note # in http://docs.python.org/ref/lexical.html # we could also write a hint for the user: #out.write("# you can specify a different encoding by a line starting with '# -*- coding:'\n") # return contents | af6925ecc1cd00c1b0ddb59f7c545ed9214993a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/af6925ecc1cd00c1b0ddb59f7c545ed9214993a7/interpreter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
5999,
67,
22448,
12,
3980,
16,
596,
4672,
3536,
3125,
279,
6600,
2688,
8266,
316,
326,
1122,
980,
434,
2939,
18,
971,
1392,
16,
876,
518,
358,
596,
471,
327,
2939,
2887,
1122... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
5999,
67,
22448,
12,
3980,
16,
596,
4672,
3536,
3125,
279,
6600,
2688,
8266,
316,
326,
1122,
980,
434,
2939,
18,
971,
1392,
16,
876,
518,
358,
596,
471,
327,
2939,
2887,
1122... |
self._intgr_reflections = os.path.join( | self._intgr_hklout = os.path.join( | def _integrate_finish(self): '''Finish off the integration by running correct.''' | 0cca5f409358df88d53bf7b6d9eda83bd5c5fd95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/0cca5f409358df88d53bf7b6d9eda83bd5c5fd95/XDSIntegrater.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14970,
5141,
67,
13749,
12,
2890,
4672,
9163,
11641,
3397,
326,
12040,
635,
3549,
3434,
1093,
6309,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14970,
5141,
67,
13749,
12,
2890,
4672,
9163,
11641,
3397,
326,
12040,
635,
3549,
3434,
1093,
6309,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
"""Set up the device layer and then start the messenger | """Set up the agency layer and then start the messenger | def main(self): """Set up the device layer and then start the messenger layer running with the app main. """ self.log.info("main: setting up stomp connection.") | 89c26ae85ea06431a8c3e18f173500e3bf7a509d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12466/89c26ae85ea06431a8c3e18f173500e3bf7a509d/manager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2890,
4672,
3536,
694,
731,
326,
1737,
2075,
3018,
471,
1508,
787,
326,
31086,
3018,
3549,
598,
326,
595,
2774,
18,
225,
3536,
365,
18,
1330,
18,
1376,
2932,
5254,
30,
3637,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2890,
4672,
3536,
694,
731,
326,
1737,
2075,
3018,
471,
1508,
787,
326,
31086,
3018,
3549,
598,
326,
595,
2774,
18,
225,
3536,
365,
18,
1330,
18,
1376,
2932,
5254,
30,
3637,
... |
self.parser = template.parser self.xmldoc = template.root.tostring() | def __init__(self, template): self.code = marshal.dumps(template.func.func_code) self.defaults = len(template.func.func_defaults or ()) self.parser = template.parser self.xmldoc = template.root.tostring() self.stream = template.stream | bc20d5deeff33a4ee1fceef1fe36e55810606835 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9696/bc20d5deeff33a4ee1fceef1fe36e55810606835/translation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1542,
4672,
365,
18,
710,
273,
10893,
18,
13302,
1121,
12,
3202,
18,
644,
18,
644,
67,
710,
13,
365,
18,
7606,
273,
562,
12,
3202,
18,
644,
18,
644,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
1542,
4672,
365,
18,
710,
273,
10893,
18,
13302,
1121,
12,
3202,
18,
644,
18,
644,
67,
710,
13,
365,
18,
7606,
273,
562,
12,
3202,
18,
644,
18,
644,
... | |
plot_names, visible_plots = zip(*sorted(self.plots.items())) | plot_names, visible_plots = map(list, zip(*sorted(self.plots.items()))) | def get_preferred_size(self): """ Computes the size and position of the legend based on the maximum size of the labels, the alignment, and position of the component to overlay. """ # Gather the names of all the labels we will create if len(self.plots) == 0: return [0, 0] | 7afeced96901e486fa828a2a68d4903b1c318622 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13167/7afeced96901e486fa828a2a68d4903b1c318622/legend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
23616,
67,
1467,
12,
2890,
4672,
3536,
14169,
281,
326,
963,
471,
1754,
434,
326,
7241,
2511,
603,
326,
4207,
963,
434,
326,
3249,
16,
326,
8710,
16,
471,
1754,
434,
326,
1794... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23616,
67,
1467,
12,
2890,
4672,
3536,
14169,
281,
326,
963,
471,
1754,
434,
326,
7241,
2511,
603,
326,
4207,
963,
434,
326,
3249,
16,
326,
8710,
16,
471,
1754,
434,
326,
1794... |
so = open(os.devnull, 'a+', 0) | si = open('/dev/null', 'r') so = open('/dev/null', 'a+') os.dup2(si.fileno(), sys.stdin.fileno()) | def __init__(self,wps): """ wps - parent WPS instance """ | d9c14ac1e2bd1f336bd52a04c340279ea4bb3674 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10967/d9c14ac1e2bd1f336bd52a04c340279ea4bb3674/Execute.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
91,
1121,
4672,
3536,
341,
1121,
282,
300,
982,
678,
5857,
791,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
91,
1121,
4672,
3536,
341,
1121,
282,
300,
982,
678,
5857,
791,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
action="store_true", dest="permissive", default = None, | action="store_true", dest="permissive", default=None, | def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-guests=<user1[[,user2][,…]]>] [--delete-guests=<user1[[,user2][,…]]>]\n" \ + "\t\t[--permissive|--not-permissive] [--skel=<new skel>] [--description=<new description>]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_group')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'groups')) group = OptionGroup(parser, stylize(ST_OPTION, "Modify group options")) group.add_option("--rename", action="store", type="string", dest="newname", default = None, help="specify group's new name (not yet implemented).") group.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="specify group's new skel dir.") group.add_option("--description", action="store", type="string", dest="newdescription", default = None, help="specify new group's description") group.add_option("-p", "--permissive", "--set-permissive", action="store_true", dest="permissive", default = None, help="set the shared directory of the group permissive.") group.add_option("-P", "--not-permissive", "--set-not-permissive", action="store_false", dest="permissive", default = None, help="set the shared directory of the group not permissive.") group.add_option("--add-users", action="store", type="string", dest="users_to_add", default = [], help="Add users to the group. The users are separated by commas without spaces.") group.add_option("--del-users", action="store", type="string", dest="users_to_del", default = [], help="Delete users from the group. The users are separated by commas without spaces.") group.add_option("--add-resps", action="store", type="string", dest="resps_to_add", default = [], help="Add responsibles to the group. The responsibles are separated by commas without spaces.") group.add_option("--del-resps", action="store", type="string", dest="resps_to_del", default = [], help="Delete responsibles from the group. The responsibles are separated by commas without spaces.") group.add_option("--add-guests", action="store", type="string", dest="guests_to_add", default = [], help="Add guests to the group. The guests are separated by commas without spaces.") group.add_option("--del-guests", action="store", type="string", dest="guests_to_del", default = [], help="Delete guests from the group. The guests are separated by commas without spaces.") group.add_option("--add-granted-profiles", action="store", type="string", dest="granted_profiles_to_add", default = None, help="Add the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") group.add_option("--del-granted-profiles", action="store", type="string", dest="granted_profiles_to_del", default = None, help="Delete the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") parser.add_option_group(group) return check_opts_and_args(parser.parse_args()) | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
681,
67,
1655,
67,
2670,
67,
7099,
12,
2910,
16,
1664,
4672,
225,
4084,
67,
955,
273,
1548,
82,
64,
88,
9,
87,
1041,
1493,
529,
27127,
12306,
67,
621,
20317,
34,
306,
413,
18539,
271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
681,
67,
1655,
67,
2670,
67,
7099,
12,
2910,
16,
1664,
4672,
225,
4084,
67,
955,
273,
1548,
82,
64,
88,
9,
87,
1041,
1493,
529,
27127,
12306,
67,
621,
20317,
34,
306,
413,
18539,
271... |
elif report is not None: print "Backout changes to uuid " + dumpID r = model.Report.get_by(uuid=dumpID) r.delete() r.flush() raise | os.remove(fullpath) os.remove(dumppath) | def processDump(fullpath, dir, basename): # If there is more than one processor, they will race to process dumps # To prevent this from occuring, the processor will first attempt # to insert a record with only the ID. dumpID = basename[:basename.find(config.jsonFileSuffix)] report = None didProcess = False try: report = getReport(dumpID) if report is not None: session = sqlalchemy.object_session(report) session.clear() didProcess = runProcessor(dir, dumpID, report.id) except: if didProcess: print "did process" + dumpID dumppath = os.path.join(dir, dumpID + config.dumpFileSuffix) #os.remove(fullpath) #os.remove(dumppath) elif report is not None: # need to clear the db because we didn't process it print "Backout changes to uuid " + dumpID r = model.Report.get_by(uuid=dumpID) r.delete() r.flush() raise | 5c0d8309d6e6e31d4fdf210c4fd4e578ec474d50 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12383/5c0d8309d6e6e31d4fdf210c4fd4e578ec474d50/monitor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
10628,
12,
2854,
803,
16,
1577,
16,
4882,
4672,
468,
971,
1915,
353,
1898,
2353,
1245,
6659,
16,
2898,
903,
17996,
358,
1207,
6711,
468,
2974,
5309,
333,
628,
3334,
310,
16,
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,
1207,
10628,
12,
2854,
803,
16,
1577,
16,
4882,
4672,
468,
971,
1915,
353,
1898,
2353,
1245,
6659,
16,
2898,
903,
17996,
358,
1207,
6711,
468,
2974,
5309,
333,
628,
3334,
310,
16,
326,
... |
name_c = name + 'c' | name_c = cache_from_source(name) | def main(): silent = 0 verbose = 0 if sys.argv[1:]: if sys.argv[1] == '-v': verbose = 1 elif sys.argv[1] == '-s': silent = 1 MAGIC = imp.get_magic() if not silent: print('Using MAGIC word', repr(MAGIC)) for dirname in sys.path: try: names = os.listdir(dirname) except os.error: print('Cannot list directory', repr(dirname)) continue if not silent: print('Checking ', repr(dirname), '...') names.sort() for name in names: if name[-3:] == '.py': name = os.path.join(dirname, name) try: st = os.stat(name) except os.error: print('Cannot stat', repr(name)) continue if verbose: print('Check', repr(name), '...') name_c = name + 'c' try: f = open(name_c, 'r') except IOError: print('Cannot open', repr(name_c)) continue magic_str = f.read(4) mtime_str = f.read(4) f.close() if magic_str != MAGIC: print('Bad MAGIC word in ".pyc" file', end=' ') print(repr(name_c)) continue mtime = get_long(mtime_str) if mtime == 0 or mtime == -1: print('Bad ".pyc" file', repr(name_c)) elif mtime != st[ST_MTIME]: print('Out-of-date ".pyc" file', end=' ') print(repr(name_c)) | c7eaede21ecb5259f2bd9e160a89b82d19cfb19b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/c7eaede21ecb5259f2bd9e160a89b82d19cfb19b/checkpyc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
10404,
273,
374,
3988,
273,
374,
309,
2589,
18,
19485,
63,
21,
30,
14542,
309,
2589,
18,
19485,
63,
21,
65,
422,
2400,
90,
4278,
3988,
273,
404,
1327,
2589,
18,
19485,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
10404,
273,
374,
3988,
273,
374,
309,
2589,
18,
19485,
63,
21,
30,
14542,
309,
2589,
18,
19485,
63,
21,
65,
422,
2400,
90,
4278,
3988,
273,
404,
1327,
2589,
18,
19485,
63,... |
print info.rating | if info: print info.rating | def parse(file, dir, mplayer_files): title = mplayer_options = "" image = None playlist = [] info = [] id = [] mode = 'video' label = [] try: parser = qp_xml.Parser() box = parser.parse(open(file).read()) except: print "XML file %s corrupt" % file else: for c in box.children: if c.name == 'movie': for node in c.children: if node.name == u'title': title = node.textof().encode('latin-1') elif node.name == u'cover' and \ os.path.isfile(os.path.join(dir,node.textof())): image = os.path.join(dir, node.textof()) elif node.name == u'id': id += [node.textof()] elif node.name == u'label': label += [node.textof()] elif node.name == u'video': playlist = parseVideo(dir, mplayer_files, node) elif node.name == u'info': info = parseInfo(node) print info.rating return MovieInformation(title, image, playlist, id, label, info, file) | f1c8cadfa118ae0149c33f435e2988927a2365a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f1c8cadfa118ae0149c33f435e2988927a2365a9/movie_xml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
768,
16,
1577,
16,
312,
14872,
67,
2354,
4672,
2077,
273,
312,
14872,
67,
2116,
273,
1408,
1316,
273,
599,
16428,
273,
5378,
1123,
273,
5378,
612,
273,
5378,
1965,
273,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
768,
16,
1577,
16,
312,
14872,
67,
2354,
4672,
2077,
273,
312,
14872,
67,
2116,
273,
1408,
1316,
273,
599,
16428,
273,
5378,
1123,
273,
5378,
612,
273,
5378,
1965,
273,
296,
... |
info_files = self._get_info_files() | for path in self.parent_path: info_files.extend(self._get_info_files('*',path)) | def _init_info_modules(self, packages=None): """Initialize info_modules = {<package_name>: <package info.py module>}. """ import imp if packages is None: info_files = self._get_info_files() else: info_files = [] for package in packages: package = os.path.join(*package.split('.')) info_file = os.path.join(self.parent_path,package,'info.py') if not os.path.isfile(info_file): info_file += 'c' if os.path.isfile(info_file): info_files.append(info_file) else: self.warn('Package %r does not have info.py file. Ignoring.'\ % package) | f169e88dee50378c8accfb7a67438271a73fcc61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/f169e88dee50378c8accfb7a67438271a73fcc61/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
1376,
67,
6400,
12,
2890,
16,
5907,
33,
7036,
4672,
3536,
7520,
1123,
67,
6400,
273,
288,
32,
5610,
67,
529,
28593,
411,
5610,
1123,
18,
2074,
1605,
34,
5496,
3536,
1930... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
67,
1376,
67,
6400,
12,
2890,
16,
5907,
33,
7036,
4672,
3536,
7520,
1123,
67,
6400,
273,
288,
32,
5610,
67,
529,
28593,
411,
5610,
1123,
18,
2074,
1605,
34,
5496,
3536,
1930... |
self.sock.close() | self.flush() | def close(self): self.sock.close() del self.sock | cd259d0b401f8cdd859bd55167610230d9a44f5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd259d0b401f8cdd859bd55167610230d9a44f5d/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
18,
11330,
1435,
225,
1464,
365,
18,
15031,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
1746,
12,
2890,
4672,
365,
18,
11330,
1435,
225,
1464,
365,
18,
15031,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if isinstance(command, file): | if isinstance(command, types.FileType): | def execute(self, command, *p, **k): """Return the fd of a command; can get output (stdout/err) and exitcode""" # We might be passed a file descriptor for some reason; if so, just return it if isinstance(command, file): return command | 1082a64377c9661763a0ce90257c284a413611c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9035/1082a64377c9661763a0ce90257c284a413611c1/shell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1296,
16,
380,
84,
16,
2826,
79,
4672,
3536,
990,
326,
5194,
434,
279,
1296,
31,
848,
336,
876,
261,
10283,
19,
370,
13,
471,
2427,
710,
8395,
468,
1660,
4825,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1296,
16,
380,
84,
16,
2826,
79,
4672,
3536,
990,
326,
5194,
434,
279,
1296,
31,
848,
336,
876,
261,
10283,
19,
370,
13,
471,
2427,
710,
8395,
468,
1660,
4825,
50... |
self.copy_file("Miro.ico", os.path.join(dist_dir, "%s.ico" % template_vars['shortAppName'])) | shortappname = template_vars["shortAppName"] self.copy_file("Miro.ico", os.path.join(dist_dir, "%s.ico" % shortappname)) | def copy_ico(self): dist_dir = self.get_finalized_command('py2exe').dist_dir self.copy_file("Miro.ico", os.path.join(dist_dir, "%s.ico" % template_vars['shortAppName'])) | 16717514d85be409df247e58637855a19e0ad04f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/16717514d85be409df247e58637855a19e0ad04f/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
10764,
12,
2890,
4672,
2411,
67,
1214,
273,
365,
18,
588,
67,
6385,
1235,
67,
3076,
2668,
2074,
22,
14880,
16063,
4413,
67,
1214,
365,
18,
3530,
67,
768,
2932,
49,
11373,
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,
1610,
67,
10764,
12,
2890,
4672,
2411,
67,
1214,
273,
365,
18,
588,
67,
6385,
1235,
67,
3076,
2668,
2074,
22,
14880,
16063,
4413,
67,
1214,
365,
18,
3530,
67,
768,
2932,
49,
11373,
18,... |
if (self.wizard[currStep].has_key("listevaluation")): | if (self.wizard[self.prevStep].has_key("listevaluation")): | def finished(self, gotoStep = None, *args, **kwargs): print "finished" currStep = self.currStep | c9faacfea68f90597fb82504790dc1f7d7b71f3f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/c9faacfea68f90597fb82504790dc1f7d7b71f3f/Wizard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6708,
12,
2890,
16,
2897,
4160,
273,
599,
16,
380,
1968,
16,
2826,
4333,
4672,
1172,
315,
13527,
6,
4306,
4160,
273,
365,
18,
17016,
4160,
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,
6708,
12,
2890,
16,
2897,
4160,
273,
599,
16,
380,
1968,
16,
2826,
4333,
4672,
1172,
315,
13527,
6,
4306,
4160,
273,
365,
18,
17016,
4160,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
cmd("/bin/bash "+self.settings["livecd/runscript"]+" kernel "+list_bashify(args), "Runscript kernel build failed") | cmd("/bin/bash "+self.settings["livecd/runscript"]+" kernel "+list_bashify(args),\ "Runscript kernel build failed") | def build_kernel(self): mynames=self.settings["boot/kernel"] if type(mynames)==types.StringType: mynames=[mynames] args=[] args.append(`len(mynames)`) for kname in mynames: args.append(kname) args.append(self.settings["boot/kernel/"+kname+"/sources"]) try: if not os.path.exists(self.settings["boot/kernel/"+kname+"/config"]): self.unbind() raise CatalystError, "Can't find kernel config: " \ +self.settings["boot/kernel/"+kname+"/config"] except TypeError: raise CatalystError, "Required value boot/kernel/config not specified" """ We must support multiple configs for the same kernel, so we must manually edit the EXTRAVERSION on the kernel to allow them to coexist. The extraversion field gets appended to the current EXTRAVERSION in the kernel Makefile. Examples of this usage are UP vs SMP kernels, and on PPC64 we need a seperate pSeries, iSeries, and PPC970 (G5) kernels, all compiled off the same source, without having to release a seperate livecd for each (since other than the kernel, they are all binary compatible) """ if self.settings.has_key("boot/kernel/"+kname+"/extraversion"): # extraversion is now an optional parameter, so that don't need to # worry about it unless they have to args.append(self.settings["boot/kernel/"+kname+"/extraversion"]) else: # this value will be detected on the bash side and indicate # that EXTRAVERSION processing # should be skipped args.append("NULL_VALUE") # write out /var/tmp/kname.(use|packages) files, used for kernel USE # and extra packages settings for extra in ["use","packages","gk_kernargs"]: if self.settings.has_key("boot/kernel/"+kname+"/"+extra): myex=self.settings["boot/kernel/"+kname+"/"+extra] if type(myex)==types.ListType: myex=string.join(myex) try: myf=open(self.settings["chroot_path"]+"/var/tmp/"+kname+"."+extra,"w") except: self.unbind() raise CatalystError,"Couldn't create file /var/tmp/"+kname+"."+extra+" in chroot." # write out to the file if extra=="use": myf.write("export USE=\""+myex+"\"\n") if extra=="gk_kernargs": myf.write("export clst_livecd_gk_kernargs=\""+myex+"\"\n") else: myf.write(myex+"\n") myf.close() try: cmd("cp "+self.settings["boot/kernel/"+kname+"/config"]+" "+ \ self.settings["chroot_path"]+"/var/tmp/"+kname+".config", \ "Couldn't copy kernel config: "+self.settings["boot/kernel/"+kname+"/config"]) except CatalystError: self.unbind() | 6d35cdfbf74c77aa0d65fce7ea6dcebad63a32fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/6d35cdfbf74c77aa0d65fce7ea6dcebad63a32fd/livecd_stage2_target.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
8111,
12,
2890,
4672,
312,
878,
753,
33,
2890,
18,
4272,
9614,
7137,
19,
8111,
11929,
309,
618,
12,
81,
878,
753,
13,
631,
2352,
18,
780,
559,
30,
312,
878,
753,
22850,
81,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8111,
12,
2890,
4672,
312,
878,
753,
33,
2890,
18,
4272,
9614,
7137,
19,
8111,
11929,
309,
618,
12,
81,
878,
753,
13,
631,
2352,
18,
780,
559,
30,
312,
878,
753,
22850,
81,... |
[(inner_r,min_z)] + rz + [(inner_r, max_z)], | [(inner_r,min_z)] + rz + [(inner_r, max_z)], | def make_extrusion_with_fine_core(rz, inner_r, max_volume_inner=1e-4, max_volume_outer=5e-2, radial_subdiv=20): min_z = min(rz_pt[1] for rz_pt in rz) max_z = max(rz_pt[1] for rz_pt in rz) from meshpy.tet import MeshInfo, build from meshpy.geometry import generate_surface_of_revolution MINUS_Z_MARKER = 1 PLUS_Z_MARKER = 2 inner_points, inner_facets, inner_holes, inner_markers = \ generate_surface_of_revolution( [ (0, min_z), (inner_r, min_z), (inner_r, max_z), (0, max_z), ], ring_markers=[ MINUS_Z_MARKER, 0, PLUS_Z_MARKER ], radial_subdiv=radial_subdiv, ) inner_point_indices = tuple(range(len(inner_points))) outer_points, outer_facets, outer_holes, outer_markers = \ generate_surface_of_revolution( [(inner_r,min_z)] + rz + [(inner_r, max_z)], ring_markers=[MINUS_Z_MARKER] + [0]*(len(rz)-1) + [PLUS_Z_MARKER], point_idx_offset=len(inner_points), radial_subdiv=radial_subdiv, ring_point_indices= [ inner_point_indices[:radial_subdiv] ] + [None]*len(rz) + [inner_point_indices[radial_subdiv:]] ) mesh_info = MeshInfo() mesh_info.set_points(inner_points + outer_points) mesh_info.set_facets_ex( inner_facets + outer_facets, inner_holes + outer_holes, inner_markers + outer_markers, ) # set regional max. volume mesh_info.regions.resize(2) mesh_info.regions[0] = [0, 0, (max_z+min_z)/2, 0, max_volume_inner] mesh_info.regions[1] = [inner_r+(rz[0][0]-inner_r)/2, 0, (max_z+min_z)/2, 0, max_volume_outer] # add periodicity mesh_info.pbc_groups.resize(1) pbcg = mesh_info.pbc_groups[0] pbcg.facet_marker_1 = MINUS_Z_MARKER pbcg.facet_marker_2 = PLUS_Z_MARKER pbcg.set_transform(translation=[0,0,max_z-min_z]) mesh = build(mesh_info, verbose=True, volume_constraints=True) #print "%d elements" % len(mesh.elements) #mesh.write_vtk("gun.vtk") fvi2fm = mesh.face_vertex_indices_to_face_marker def zper_boundary_tagger(fvi, el, fn, points): face_marker = fvi2fm[frozenset(fvi)] if face_marker == MINUS_Z_MARKER: return ["minus_z"] elif face_marker == PLUS_Z_MARKER: return ["plus_z"] else: return ["shell"] from hedge.mesh import make_conformal_mesh return make_conformal_mesh(mesh.points, mesh.elements, zper_boundary_tagger, periodicity=[None, None, ("minus_z", "plus_z")]) | 592adeeb615eb5497b4dae9329f92c603720e638 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12869/592adeeb615eb5497b4dae9329f92c603720e638/geometry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
14523,
7063,
67,
1918,
67,
74,
558,
67,
3644,
12,
86,
94,
16,
3443,
67,
86,
16,
943,
67,
9491,
67,
7872,
33,
21,
73,
17,
24,
16,
943,
67,
9491,
67,
14068,
33,
25,
73,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
14523,
7063,
67,
1918,
67,
74,
558,
67,
3644,
12,
86,
94,
16,
3443,
67,
86,
16,
943,
67,
9491,
67,
7872,
33,
21,
73,
17,
24,
16,
943,
67,
9491,
67,
14068,
33,
25,
73,
... |
[{"size": disk_size, }],[{nictype: nicmode, }], memory=ram, os=os, vcpus=2, | [{"size": disk_size, }],[{nicmode: nictype, }], memory=ram, os=os, vcpus=vcpus, | def create(request, cluster_slug=None): """ Create a new instance Store in DB and Create on given cluster """ user = request.user if not(user.is_superuser or user.perms_on_any(Cluster, ['admin', 'create_vm'])): return HttpResponseForbidden() if cluster_slug is not None: cluster = get_object_or_404(Cluster, slug=cluster_slug) else: cluster = None if request.method == 'POST': form = NewVirtualMachineForm(user, None, request.POST) if form.is_valid(): data = form.cleaned_data owner = data['owner'] cluster = data['cluster'] hostname = data['hostname'] disk_template = data['disk_template'] pnode = data['pnode'] os = data['os'] # BEPARAMS vcpus = data['vcpus'] disk_size = data['disk_size'] ram = data['ram'] nictype = data['nictype'] nicmode = data['nic'] # HVPARAMS kernelpath = data['kernelpath'] rootpath = data['rootpath'] serialconsole = data['serialconsole'] bootorder = data['bootorder'] imagepath = data['imagepath'] if disk_template == 'drdb': snode = data['snode'] else: snode = None try: jobid = cluster.rapi.CreateInstance('create', hostname, disk_template, [{"size": disk_size, }],[{nictype: nicmode, }], memory=ram, os=os, vcpus=2, pnode=pnode, snode=snode, hvparams={'kernel_path': kernelpath, \ 'root_path': rootpath, \ 'serial_console':serialconsole, \ 'boot_order':bootorder, \ 'cdrom_image_path':imagepath}) # Wait for job to process as the error will not happen # right away sleep(2) jobstatus = cluster.rapi.GetJobStatus(jobid) # raise an exception if there was an error in the job if jobstatus["status"] == 'error': raise GanetiApiError(jobstatus["opresult"]) vm = VirtualMachine(cluster=cluster, owner=owner, hostname=hostname, disk_size=disk_size, ram=ram, virtual_cpus=vcpus) vm.save() # grant admin permissions to the owner data['grantee'].grant('admin', vm) return HttpResponseRedirect( \ reverse('instance-detail', args=[cluster.slug, vm.hostname])) except GanetiApiError as e: msg = 'Error creating virtual machine on this cluster: %s' % e form._errors["cluster"] = form.error_class([msg]) elif request.method == 'GET': form = NewVirtualMachineForm(user, cluster) return render_to_response('virtual_machine/create.html', { 'form': form, 'user': request.user, }, context_instance=RequestContext(request), ) | b82c234077400171b9cce6b7f73b8a6cef249e2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10509/b82c234077400171b9cce6b7f73b8a6cef249e2a/virtual_machine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2293,
16,
2855,
67,
6436,
33,
7036,
4672,
3536,
1788,
279,
394,
791,
4994,
316,
2383,
471,
1788,
603,
864,
2855,
3536,
729,
273,
590,
18,
1355,
309,
486,
12,
1355,
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,
752,
12,
2293,
16,
2855,
67,
6436,
33,
7036,
4672,
3536,
1788,
279,
394,
791,
4994,
316,
2383,
471,
1788,
603,
864,
2855,
3536,
729,
273,
590,
18,
1355,
309,
486,
12,
1355,
18,
291,
... |
or ( (len(p) > 2) and p[1] == ":") ) : | or ( (len(p) > 2) and p[1] == ":") ): | def expand_path(p): if ( ( (len(p) > 1) and p[0] == "/") \ or ( (len(p) > 2) and p[1] == ":") ) : # Unix or Windows absolute path. return os.path.normpath(p) else: prefix = os.path.dirname(get_config("path")) return os.path.normpath(os.path.join(prefix, p)) | c5b508253841f7cfab857b0678a404ff97d1ef4a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1240/c5b508253841f7cfab857b0678a404ff97d1ef4a/mnemosyne_core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
67,
803,
12,
84,
4672,
225,
309,
261,
565,
261,
261,
1897,
12,
84,
13,
405,
404,
13,
471,
293,
63,
20,
65,
422,
4016,
13,
521,
578,
261,
261,
1897,
12,
84,
13,
405,
576,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
67,
803,
12,
84,
4672,
225,
309,
261,
565,
261,
261,
1897,
12,
84,
13,
405,
404,
13,
471,
293,
63,
20,
65,
422,
4016,
13,
521,
578,
261,
261,
1897,
12,
84,
13,
405,
576,
13... |
ch2.SetSelectedItemIndex( 0 ) | ch2.SetSelectedItem( 0 ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log | 559e8e9b8c0ac49102810f4a0e2e93d1ea05e238 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/559e8e9b8c0ac49102810f4a0e2e93d1ea05e238/ColumnHeader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
982,
16,
613,
262,
30,
7075,
18,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
300,
21,
16,
2154,
33,
27226,
18,
3417,
67,
18111,
67,
862,
4066,
3217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
982,
16,
613,
262,
30,
7075,
18,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
300,
21,
16,
2154,
33,
27226,
18,
3417,
67,
18111,
67,
862,
4066,
3217,
... |
notebook.quit_idle_worksheet_processes() | def notebook_idle_check(): notebook.quit_idle_worksheet_processes() global last_idle_time t = walltime() if t > last_idle_time + idle_interval: notebook.save() last_idle_time = t | 331597f66f23f8a0a93d8b1f5d2997a84ebcd8dc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/331597f66f23f8a0a93d8b1f5d2997a84ebcd8dc/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14718,
67,
20390,
67,
1893,
13332,
2552,
1142,
67,
20390,
67,
957,
268,
273,
17662,
957,
1435,
309,
268,
405,
1142,
67,
20390,
67,
957,
397,
12088,
67,
6624,
30,
14718,
18,
5688,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14718,
67,
20390,
67,
1893,
13332,
2552,
1142,
67,
20390,
67,
957,
268,
273,
17662,
957,
1435,
309,
268,
405,
1142,
67,
20390,
67,
957,
397,
12088,
67,
6624,
30,
14718,
18,
5688,
1435,
... | |
if not (inhibit_p or self.inhibit_p or self.in_pre or self.formatter.in_p or self.no_862): | if not (inhibit_p or self.inhibit_p or self.in_pre or self.formatter.in_p): | def scan(self, line, inhibit_p=False): """ Scans one line Append text before match, invoke replace() with match, and add text after match. """ result = [] lastpos = 0 # absolute position within line line_length = len(line) | 099b5af37aecdee05032e3a30b1b70efa5ff5eb2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/099b5af37aecdee05032e3a30b1b70efa5ff5eb2/text_moin_wiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
12,
2890,
16,
980,
16,
316,
31597,
67,
84,
33,
8381,
4672,
3536,
2850,
634,
1245,
980,
6181,
977,
1865,
845,
16,
4356,
1453,
1435,
598,
845,
16,
471,
527,
977,
1839,
845,
18,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
12,
2890,
16,
980,
16,
316,
31597,
67,
84,
33,
8381,
4672,
3536,
2850,
634,
1245,
980,
6181,
977,
1865,
845,
16,
4356,
1453,
1435,
598,
845,
16,
471,
527,
977,
1839,
845,
18,
3... |
Traceback (most recent call last): ... TypeError: Unable to coerce 0.00000000000000000 (<type 'mpfr.RealNumber'>) to Rational | (0 : 0 : 1) | def __cmp__(self, other): if isinstance(other, (int, long, rings.Integer)) and other == 0: if self.is_zero(): return 0 else: return -1 return SchemePoint_projective_abelian_scheme.__cmp__(self, other) | d927ce05d7e52e248c1a7b9cba681d7cca5db79c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/d927ce05d7e52e248c1a7b9cba681d7cca5db79c/ell_point.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
261,
474,
16,
1525,
16,
26537,
18,
4522,
3719,
471,
1308,
422,
374,
30,
309,
365,
18,
291,
67,
7124,
13332,
327,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
261,
474,
16,
1525,
16,
26537,
18,
4522,
3719,
471,
1308,
422,
374,
30,
309,
365,
18,
291,
67,
7124,
13332,
327,
3... |
for i in range(numtasks): newtask() | def newtask(): global next_ident, running mutex.acquire() next_ident = next_ident + 1 if verbose: print 'creating task', next_ident thread.start_new_thread(task, (next_ident,)) running = running + 1 mutex.release() | 66865d2ebd5a877523dbc87be2d86aafb3cdc59a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/66865d2ebd5a877523dbc87be2d86aafb3cdc59a/test_thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
4146,
13332,
2552,
1024,
67,
6392,
16,
3549,
9020,
18,
1077,
1039,
1435,
1024,
67,
6392,
273,
1024,
67,
6392,
397,
404,
309,
3988,
30,
1172,
296,
23799,
1562,
2187,
1024,
67,
6392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
4146,
13332,
2552,
1024,
67,
6392,
16,
3549,
9020,
18,
1077,
1039,
1435,
1024,
67,
6392,
273,
1024,
67,
6392,
397,
404,
309,
3988,
30,
1172,
296,
23799,
1562,
2187,
1024,
67,
6392,
... | |
self._record_member(tarinfo) | self.members.append(tarinfo) | def proc_sparse(self, tarinfo): """Analyze a GNU sparse header plus extra headers. """ buf = tarinfo.tobuf() sp = _ringbuffer() pos = 386 lastpos = 0L realpos = 0L # There are 4 possible sparse structs in the # first header. for i in xrange(4): try: offset = int(buf[pos:pos + 12], 8) numbytes = int(buf[pos + 12:pos + 24], 8) except ValueError: break if offset > lastpos: sp.append(_hole(lastpos, offset - lastpos)) sp.append(_data(offset, numbytes, realpos)) realpos += numbytes lastpos = offset + numbytes pos += 24 | c23c3ef50067bbfc7538d3ea9d8f68f85cf0f577 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c23c3ef50067bbfc7538d3ea9d8f68f85cf0f577/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5418,
67,
17472,
12,
2890,
16,
8232,
1376,
4672,
3536,
31984,
279,
611,
50,
57,
9387,
1446,
8737,
2870,
1607,
18,
3536,
1681,
273,
8232,
1376,
18,
869,
4385,
1435,
1694,
273,
389,
8022,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5418,
67,
17472,
12,
2890,
16,
8232,
1376,
4672,
3536,
31984,
279,
611,
50,
57,
9387,
1446,
8737,
2870,
1607,
18,
3536,
1681,
273,
8232,
1376,
18,
869,
4385,
1435,
1694,
273,
389,
8022,
... |
ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9, self.verify_cb_new) s = SSL.Connection(ctx) try: s.connect(self.srv_addr) except SSL.SSLError, e: assert 0, e data = self.http_get(s) s.close() self.stop_server(pid) | try: ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9, self.verify_cb_new) s = SSL.Connection(ctx) try: s.connect(self.srv_addr) except SSL.SSLError, e: assert 0, e data = self.http_get(s) s.close() finally: self.stop_server(pid) | def test_verify_cb_new(self): pid = self.start_server(self.args) ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9, self.verify_cb_new) s = SSL.Connection(ctx) try: s.connect(self.srv_addr) except SSL.SSLError, e: assert 0, e data = self.http_get(s) s.close() self.stop_server(pid) self.failIf(string.find(data, 's_server -quiet -www') == -1) | 787f56abaf95d4b31f93406cbd1f766e498b370b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/787f56abaf95d4b31f93406cbd1f766e498b370b/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
8705,
67,
7358,
67,
2704,
12,
2890,
4672,
4231,
273,
365,
18,
1937,
67,
3567,
12,
2890,
18,
1968,
13,
775,
30,
1103,
273,
7419,
18,
1042,
1435,
1103,
18,
542,
67,
8705,
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,
1842,
67,
8705,
67,
7358,
67,
2704,
12,
2890,
4672,
4231,
273,
365,
18,
1937,
67,
3567,
12,
2890,
18,
1968,
13,
775,
30,
1103,
273,
7419,
18,
1042,
1435,
1103,
18,
542,
67,
8705,
12,... |
fd = open(configfile[0:-4]) | fd = open(str(configfile[0:-4])) | def convert_config(self, configfile): """ unpickles the specified file into a hash """ config_hash = None try: fd = open(configfile[0:-4]) config_hash = pickle.load(fd) fd.close() except: return # This is soooooo nasty, way too many if statements.... for key in config_hash.keys(): if key == "blogs": if len(config_hash["blogs"]) > 0: bloglist = config_hash["blogs"] for blogname in bloglist.keys(): blogentry = bloglist[blogname] blogid = blogentry["id"] if not self.has_section(blogid): self.add_section(blogid) if blogname == config_hash["selectedblog"]: if not self.has_section("main"): self.add_section("main") self.set("main", "selectedblog", blogid) self.set(blogid, "name", blogname) for blogkey in blogentry.keys(): self.set(blogid, blogkey, blogentry[blogkey]) else: if not self.has_section("main"): self.add_section("main") if key != "selectedblog": self.set("main",key, config_hash[key]) try: fd = open(configfile, "w") self.write(fd) fd.close() except: pass return | cc7a40d8695d3ec7964e0c14ff1d4ef0e06b3c7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2266/cc7a40d8695d3ec7964e0c14ff1d4ef0e06b3c7c/PyQLoggerConfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
1425,
12,
2890,
16,
642,
768,
4672,
3536,
640,
11503,
1040,
326,
1269,
585,
1368,
279,
1651,
3536,
642,
67,
2816,
273,
599,
775,
30,
5194,
273,
1696,
12,
701,
12,
1425,
768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
1425,
12,
2890,
16,
642,
768,
4672,
3536,
640,
11503,
1040,
326,
1269,
585,
1368,
279,
1651,
3536,
642,
67,
2816,
273,
599,
775,
30,
5194,
273,
1696,
12,
701,
12,
1425,
768,
... |
pb = PasswordInputBox(text=_('Enter Password'), handler=self.pass_cmp_cp) | pb = PasswordInputBox(text=_('Enter Password'), handler=self.pass_cmp_cb) | def check_password_and_build(self, arg=None, menuw=None): """ password checker """ if not self.menuw: self.menuw = menuw | b7088ab556a45d487d78a8c033b6abca6262ef3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/b7088ab556a45d487d78a8c033b6abca6262ef3d/directory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
3664,
67,
464,
67,
3510,
12,
2890,
16,
1501,
33,
7036,
16,
3824,
91,
33,
7036,
4672,
3536,
2201,
12489,
3536,
309,
486,
365,
18,
5414,
91,
30,
365,
18,
5414,
91,
273,
3824,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
3664,
67,
464,
67,
3510,
12,
2890,
16,
1501,
33,
7036,
16,
3824,
91,
33,
7036,
4672,
3536,
2201,
12489,
3536,
309,
486,
365,
18,
5414,
91,
30,
365,
18,
5414,
91,
273,
3824,
... |
return True for head in contact.profile: if head.flags & head.HEAD: widget = self.ui.headFrame else: widget = self.ui.profileTab self.process_node(head, widget) return False | missing_fields.add('profile') elif not self.loaded_profile: self.loaded_profile = True for head in contact.profile: if head.flags & head.HEAD: widget = self.ui.headFrame else: widget = self.ui.profileTab self.process_node(head, widget) return missing_fields | def gotProfile(self, backend, contact): if not backend: return | 8be616252166b349297db8cb82c5a76c6137e35c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/8be616252166b349297db8cb82c5a76c6137e35c/contacts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2363,
4029,
12,
2890,
16,
4221,
16,
5388,
4672,
309,
486,
4221,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2363,
4029,
12,
2890,
16,
4221,
16,
5388,
4672,
309,
486,
4221,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.