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
os.system("gmake MPI= >& %s/%s.make.out" % (outputDir, test))
os.system("gmake MPI= NDEBUG=t >& %s/%s.make.out" % (outputDir, test))
def test(argv): usage = """ ./test.py [--make_benchmarks comment, --no_cvs_update, --single_test test] testfile.ini arguments: testfile.ini This is the input file that defines the tests that the suite knows about. It has the format [main] sourceDir = < directory above Parallel/ and fParallel/ > testTopDir = < full path to test output directory > compareToolDir = < full path to the util/Convergence/ directory > helmeosDir = < full path to helm_table.dat > sourceTree = < Parallel or fParallel -- what type is it? > suiteName = < descriptive name (i.e. Castro) > [Sod-x] buildDir = < relative path (from sourceDir) for this problem > inputFile = < input file name > probinFile = < probin file name > needs_helmeos = < need Helmholtz eos? 0 for no, 1 for yes > useFParallel = < need fParallel sources? 0 for no, 1 for yes > dim = < dimensionality: 2 or 3 > Here, [main] lists the parameters for the test suite as a whole and [Sod-x] is a single test. There can be many more tests, each with their own unique name, following the format of [Sod-x] above. In [main], sourceDir should be the full path to the directory where the Parallel/ and fParallel/ source directories live. testTopDir is the full path to the directory that will contain the test run directories, the test web directories, and the test benchmark directories. It can be the same as sourceDir. The necessary sub- directories will be created at runtime if they don't already exist. compareToolDir is the full path to the directory containing the comparison tool. This resides in Parallel/util/Convergence/ helmeosDir is the full path to the directory containing the helm_table.dat file needed by the general EOS. sourceTree is either Parallel (for applications that live in the Parallel/ tree) or fParallel (for applications that live in the fParallel/ tree). suiteName is a descriptive name for the test run. The output directories will be named suiteName-tests/ and suiteName-web/. The benchmark directory will be suiteName-benchmarks/. For a test problem (e.g. [Sod-x]), buildDir is the relative path (wrt sourceDir) where the make command will be issued for the test problem. inputFile and probinFile are the names of the input file and associated probin file, respectively. Note, a probinFile is only required for a Parallel (not fParallel) sourceTree run. needs_helmeos is set to 1 if the Helmholtz EOS is used. This will ensure that the helm_table.dat file is copied into the run directory. useFParallel = 1 means that we also need to build the Fortran source for a Parallel/ sourceTree application. dim is the dimensionality for the problem. Each test problem should get its own [testname] block defining the problem. The name between the [..] will be how the test is referred to on the webpages. options: --make_benchmarks \"comment\" run the test suite and make the current output the new benchmarks for comparison. When run in this mode, no comparison is done. This is useful for the first time the test suite is run. \"comment\" describes the reason for the benchmark update and will be appended to the web output for future reference. --no_cvs_update skip the cvs update and run the suite on the code as it exists now. --single_test mytest run only the test named mytest Getting started: To set up a test suite, it is probably easiest to write the testfile.ini as described above and then run the test routine with the --make_benchmarks option to create the benchmark directory. Subsequent runs can be done as usual, and will compare to the newly created benchmarks. If differences arise in the comparisons due to (desired) code changes, the benchmarks can be updated using --make_benchmarks to reflect the new ``correct'' solution. """ #-------------------------------------------------------------------------- # parse the commandline arguments #-------------------------------------------------------------------------- if len(sys.argv) == 1: print usage sys.exit(2) try: opts, next = getopt.getopt(argv[1:], "", ["make_benchmarks=", "no_cvs_update", "single_test="]) except getopt.GetoptError: print "invalid calling sequence" print usage sys.exit(2) # defaults make_benchmarks = 0 no_cvs_update = 0 single_test = "" comment = "" for o, a in opts: if o == "--make_benchmarks": make_benchmarks = 1 comment = a if o == "--no_cvs_update": no_cvs_update = 1 if o == "--single_test": single_test = a try: testFile = next[0] except IndexError: print "ERROR: a test file was not specified" print usage sys.exit(2) #-------------------------------------------------------------------------- # read in the test information #-------------------------------------------------------------------------- LoadParams(testFile) # store the full path to the testFile testFilePath = os.getcwd() + '/' + testFile #-------------------------------------------------------------------------- # get the test directory parameters #-------------------------------------------------------------------------- # get the source directory if (not keyIsValid("main.sourceDir")): abortTests("ERROR: sourceDir is not defined") else: sourceDir = getParam("main.sourceDir") if (not os.path.isdir(sourceDir)): abortTests("ERROR: sourceDir is not a valid directory") # get the top-level testing directory if (not keyIsValid("main.testTopDir")): abortTests("ERROR: testTopDir is not defined") else: testTopDir = getParam("main.testTopDir") if (not os.path.isdir(testTopDir)): abortTests("ERROR: testTopDir is not a valid directory") # get the directory that contains the comparison tools if (not keyIsValid("main.compareToolDir")): abortTests("ERROR: compareToolDir is not defined") else: compareToolDir = getParam("main.compareToolDir") if (not os.path.isdir(compareToolDir)): abortTests("ERROR: compareToolDir is not a valid directory") # get the directory that contains the Helmholtz EOS if (not keyIsValid("main.helmeosDir")): abortTests("ERROR: helmeosDir is not defined") else: helmeosDir = getParam("main.helmeosDir") if (not os.path.isdir(helmeosDir)): abortTests("ERROR: helmeosDir is not a valid directory") # get the name of the test suite if (not keyIsValid("main.suiteName")): suiteName = "testdefault" else: suiteName = getParam("main.suiteName") # get the type of source we are dealing with: Parallel or fParallel # these have different Makefile styles, so we'll need to do things # slightly differently for each. if (not keyIsValid("main.sourceTree")): print "WARNING: sourceTree not set, assuming Parallel" sourceTree = "Parallel" else: sourceTree = getParam("main.sourceTree") if (not (sourceTree == "Parallel" or sourceTree == "fParallel")): abortTests("ERROR: invalid sourceTree") # get the name of the benchmarks directory benchDir = testTopDir + suiteName + "-benchmarks/" if (not os.path.isdir(benchDir)): if (make_benchmarks): os.mkdir(benchDir) else: abortTests("ERROR: benchmark directory, %s, does not exist" % (benchDir)) #-------------------------------------------------------------------------- # get the name of the individual tests #-------------------------------------------------------------------------- tests = getValidTests(sourceTree) if (not single_test == ""): if (single_test in tests): print "running only test: %s " % (single_test) tests = [single_test] else: abortTests("ERROR: %s is not a valid test" % (single_test)) #-------------------------------------------------------------------------- # create the output directories #-------------------------------------------------------------------------- os.chdir(testTopDir) todayDate = datetime.date.today() today = todayDate.__str__() # figure out what the current output directory should be maxRuns = 100 # maximum number of tests in a given day testDir = today + "/" # the test output will be stored in a directory of the format # suiteName-tests/2007-XX-XX/ -- make sure that the suiteName-tests # directory exists if (not os.path.isdir(testTopDir + suiteName + "-tests/")): os.mkdir(testTopDir + suiteName + "-tests/") fullTestDir = testTopDir + suiteName + "-tests/" + testDir i = 0 while (i < maxRuns-1 and os.path.isdir(fullTestDir)): i = i + 1 testDir = today + "-" + ("%3.3d" % i) + "/" fullTestDir = testTopDir + suiteName + "-tests/" + testDir print "testing directory is: ", testDir os.mkdir(fullTestDir) # make the web directory -- this is where all the output and HTML will be # put, so it is easy to move the entire test website to a different disk webTopDir = "%s/%s-web/" % (testTopDir, suiteName) webDir = "%s/%s-web/%s/" % (testTopDir, suiteName, testDir) if (not (os.path.isdir(webTopDir)) ): os.mkdir(webTopDir) os.mkdir(webDir) # copy the test file into the web output directory shutil.copy(testFilePath, webDir) #-------------------------------------------------------------------------- # do the CVS updates #-------------------------------------------------------------------------- now = time.localtime(time.time()) cvsTime = time.strftime("%Y-%m-%d %H:%M:%S %Z", now) os.chdir(testTopDir) if (not no_cvs_update): # Parallel print "cvs update Parallel" os.system("cvs update Parallel >& cvs.Parallel.out") print "\n" # make sure that the cvs update was not aborted -- this can happen, for # instance, if the CVSROOT was not defined try: cf = open("cvs.Parallel.out", 'r') except IOError: abortTests("ERROR: no CVS output") else: cvsLines = cf.readlines() cvsFailed = 0 for line in cvsLines: if (string.find(line, "update aborted") >= 0): cvsFailed = 1 break cf.close() if (cvsFailed): abortTests("ERROR: cvs update was aborted. See cvs.Parallel.out for details") shutil.copy("cvs.Parallel.out", webDir) # fParallel print "cvs update fParallel" os.system("cvs update fParallel >& cvs.fParallel.out") print "\n" # make sure that the cvs update was not aborted -- this can happen, for # instance, if the CVSROOT was not defined try: cf = open("cvs.fParallel.out", 'r') except IOError: abortTests("ERROR: no CVS output") else: cvsLines = cf.readlines() cvsFailed = 0 for line in cvsLines: if (string.find(line, "update aborted") >= 0): cvsFailed = 1 break cf.close() if (cvsFailed): abortTests("ERROR: cvs update was aborted. See cvs.fParallel.out for details") shutil.copy("cvs.fParallel.out", webDir) #-------------------------------------------------------------------------- # generate the ChangeLogs #-------------------------------------------------------------------------- # Parallel have_cvs2cl = 0 os.chdir(testTopDir) print "Generating ChangeLog for Parallel/" if (not os.path.isfile("Parallel/cvs2cl.pl")): if (not os.path.isfile("fParallel/scripts/cvs2cl.pl")): print "WARNING: unable to locate cvs2cl.pl script." print " no ChangeLog will be generated" else: shutil.copy("fParallel/scripts/cvs2cl.pl", "Parallel/") have_cvs2cl = 1 else: have_cvs2cl = 1 os.chdir("Parallel/") if (have_cvs2cl): os.system("./cvs2cl.pl -f ChangeLog.Parallel") else: cf = open("ChangeLog.Parallel", 'w') cf.write("unable to generate ChangeLog") cf.close() os.chdir(testTopDir) # fParallel have_cvs2cl = 0 os.chdir(testTopDir) print "Generating ChangeLog for fParallel/" if (not os.path.isfile("fParallel/cvs2cl.pl")): if (not os.path.isfile("fParallel/scripts/cvs2cl.pl")): print "WARNING: unable to locate cvs2cl.pl script." print " no ChangeLog will be generated" else: shutil.copy("fParallel/scripts/cvs2cl.pl", "fParallel/") have_cvs2cl = 1 else: have_cvs2cl = 1 os.chdir("fParallel/") if (have_cvs2cl): os.system("./cvs2cl.pl -f ChangeLog.fParallel") else: cf = open("ChangeLog.fParallel", 'w') cf.write("unable to generate ChangeLog") cf.close() os.chdir(testTopDir) shutil.copy("Parallel/ChangeLog.Parallel", webDir) shutil.copy("fParallel/ChangeLog.fParallel", webDir) #-------------------------------------------------------------------------- # build the comparison tool #-------------------------------------------------------------------------- print "building the comparison tools..." os.chdir(compareToolDir) os.system("gmake EBASE=DiffSameGrid2 DIM=2 executable=DiffSameGrid2_2d.exe " + "COMP=Intel FCOMP=Intel >& " + fullTestDir + "/make_difftool_2d.out") os.system("gmake EBASE=DiffSameGrid2 DIM=3 executable=DiffSameGrid2_3d.exe " + "COMP=Intel FCOMP=Intel >& " + fullTestDir + "/make_difftool_3d.out") shutil.copy("DiffSameGrid2_2d.exe", fullTestDir) shutil.copy("DiffSameGrid2_3d.exe", fullTestDir) print "\n" #-------------------------------------------------------------------------- # do a make clean, only once per build directory #-------------------------------------------------------------------------- allBuildDirs = findBuildDirs(tests) print "make clean in ..." for dir in allBuildDirs: print " %s..." % (dir) os.chdir(sourceDir + dir) if (sourceTree == "Parallel"): os.system("gmake DIM=2 executable=%s2d.exe clean" % (suiteName) ) os.system("gmake DIM=3 executable=%s3d.exe clean" % (suiteName) ) else: os.system("gmake MPI= clean") print "\n" os.chdir(testTopDir) #-------------------------------------------------------------------------- # main loop over tests #-------------------------------------------------------------------------- for test in tests: print "working on " + test + " test" #---------------------------------------------------------------------- # make the run directory #---------------------------------------------------------------------- outputDir = fullTestDir + test + '/' os.mkdir(outputDir) #---------------------------------------------------------------------- # compile the code #---------------------------------------------------------------------- buildDir = getParam(test + ".buildDir") os.chdir(sourceDir + buildDir) print " building..." if (sourceTree == "Parallel"): use_fParallel = getParam(test + ".useFParallel") dim = getParam(test + ".dim") executable = "%s%dd.exe" % (suiteName, dim) if (use_fParallel): os.system("gmake DIM=%d executable=%s FBOXLIB_HOME=%s/fParallel >& %s/%s.make.out" % (dim, executable, sourceDir, outputDir, test)) else: os.system("gmake DIM=%d executable=%s FBOXLIB_HOME= >& %s/%s.make.out" % (dim, executable, outputDir, test)) elif (sourceTree == "fParallel"): os.system("gmake MPI= >& %s/%s.make.out" % (outputDir, test)) # we need a better way to get the executable name here executable = "main.Linux.Intel.exe" #---------------------------------------------------------------------- # copy the necessary files over to the run directory #---------------------------------------------------------------------- print " copying files to run directory..." inputsFile = getParam(test + ".inputFile") shutil.copy(executable, outputDir) shutil.copy(inputsFile, outputDir) # if we are a "Parallel" build, we need the probin file if (sourceTree == "Parallel"): probinFile = getParam(test + ".probinFile") shutil.copy(probinFile, outputDir) # if we are using the Helmholtz EOS, we need the input table needs_helmeos = getParam(test + ".needs_helmeos") if (needs_helmeos): helmeosFile = helmeosDir + "helm_table.dat" shutil.copy(helmeosFile, outputDir) # copy any other auxillary files that are needed at runtime auxFiles = getAuxFiles(test) for file in auxFiles: shutil.copy(file, outputDir) #---------------------------------------------------------------------- # run the test #---------------------------------------------------------------------- print " running the test..." os.chdir(outputDir) if (sourceTree == "Parallel"): os.system("./%s %s amr.plot_file=%s_plt >& %s.run.out" % (executable, inputsFile, test, test)) elif (sourceTree == "fParallel"): os.system("./%s %s --plot_base_name %s_plt >& %s.run.out" % (executable, inputsFile, test, test)) #---------------------------------------------------------------------- # do the comparison #---------------------------------------------------------------------- plotNum = -1 # start by finding the last plotfile for file in os.listdir(outputDir): if (file.startswith("%s_plt" % (test))): key = "_plt" index = string.rfind(file, key) plotNum = max(int(file[index+len(key):]), plotNum) if (plotNum == -1): print "WARNING: test did not produce any output" compareFile = "" else: compareFile = "%s_plt%4.4d" % (test, plotNum) if (not make_benchmarks): print " doing the comparison..." print " comparison file: ", compareFile # the benchmark file should have the same name -- see if it exists # note, with BoxLib, the plotfiles are actually directories benchFile = benchDir + compareFile if (not os.path.isdir(benchFile)): print "WARNING: no corresponding benchmark found" benchFile = "" cf = open("%s.compare.out" % (test), 'w') cf.write("WARNING: no corresponding benchmark found\n") cf.write(" unable to do a comparison\n") cf.close() else: if (not compareFile == ""): dim = getParam(test + ".dim") os.system("../DiffSameGrid2_%dd.exe norm=0 infile1=%s infile2=%s >& %s.compare.out" % (dim, benchFile, compareFile, test)) else: print "WARNING: unable to do a comparison" cf = open("%s.compare.out" % (test), 'w') cf.write("WARNING: run did not produce any output\n") cf.write(" unable to do a comparison\n") cf.close() else: print " storing output of %s as the new benchmark..." % (test) print " new benchmark file: ", compareFile os.system("cp -rf %s %s" % (compareFile, benchDir)) cf = open("%s.benchmark.out" % (test), 'w') cf.write("benchmarks updated. New file: %s\n" % (compareFile) ) cf.close() #---------------------------------------------------------------------- # move the output files into the web directory #---------------------------------------------------------------------- if (not make_benchmarks): shutil.copy("%s.run.out" % (test), webDir) shutil.copy("%s.make.out" % (test), webDir) shutil.copy("%s.compare.out" % (test), webDir) shutil.copy(inputsFile, "%s/%s.%s" % (webDir, test, inputsFile) ) if (sourceTree == "Parallel"): shutil.copy(probinFile, "%s/%s.%s" % (webDir, test, probinFile) ) for file in auxFiles: shutil.copy(file, "%s/%s.%s" % (webDir, test, file) ) else: shutil.copy("%s.benchmark.out" % (test), webDir) #---------------------------------------------------------------------- # write the report for this test #---------------------------------------------------------------------- if (not make_benchmarks): print " creating problem test report ..." reportSingleTest(sourceTree, test, testDir, webDir) print "\n" #-------------------------------------------------------------------------- # write the report for this instance of the test suite #-------------------------------------------------------------------------- print "creating new test report..." reportThisTestRun(suiteName, make_benchmarks, comment, cvsTime, tests, testDir, testFile, webDir) #-------------------------------------------------------------------------- # generate the master report for all test instances #-------------------------------------------------------------------------- reportAllRuns(suiteName, webTopDir)
b05d74bcee80de2e495e2107bbe5e27c3c48b71d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5861/b05d74bcee80de2e495e2107bbe5e27c3c48b71d/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 19485, 4672, 225, 4084, 273, 3536, 263, 19, 3813, 18, 2074, 306, 413, 6540, 67, 70, 9737, 87, 2879, 16, 1493, 2135, 67, 71, 6904, 67, 2725, 16, 1493, 7526, 67, 3813, 1842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 19485, 4672, 225, 4084, 273, 3536, 263, 19, 3813, 18, 2074, 306, 413, 6540, 67, 70, 9737, 87, 2879, 16, 1493, 2135, 67, 71, 6904, 67, 2725, 16, 1493, 7526, 67, 3813, 1842, ...
self.data_file.put_ucdmesh(mname, ndims, coordnames, coords,
self.data_file.put_ucdmesh(mname, coordnames, coords,
def put_ucdmesh(self, mname, ndims, coordnames, coords, nzones, zonel_name, facel_name, optlist): self.data_file.put_ucdmesh(mname, ndims, coordnames, coords, nzones, zonel_name, facel_name, optlist)
607627a9559fa630bdb04b5161460f83c5b19858 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12867/607627a9559fa630bdb04b5161460f83c5b19858/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 89, 4315, 15557, 12, 2890, 16, 312, 529, 16, 30908, 16, 2745, 1973, 16, 6074, 16, 290, 14203, 16, 998, 265, 292, 67, 529, 16, 5853, 292, 67, 529, 16, 2153, 1098, 4672, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 89, 4315, 15557, 12, 2890, 16, 312, 529, 16, 30908, 16, 2745, 1973, 16, 6074, 16, 290, 14203, 16, 998, 265, 292, 67, 529, 16, 5853, 292, 67, 529, 16, 2153, 1098, 4672, 365,...
yield ("<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s" ";compiler=%s%s;plain=true' title='Switch to bland, non-javascript," " unstyled view'>Plain View</a></p>" % (myself, host, tree, compiler, rev_var)) yield "<div id='actionList'>\n"
yield "<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s"\ ";compiler=%s%s;plain=true' title='Switch to bland, non-javascript,"\ " unstyled view'>Plain View</a></p>" % (myself, host, tree, compiler, rev_var) yield "<div id='actionList'>"
def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail"""
6f759d61aa9f4714f83d32476fcc23e0c846d5e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/6f759d61aa9f4714f83d32476fcc23e0c846d5e7/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 3399, 2890, 16, 2151, 16, 1479, 16, 5274, 16, 5588, 16, 7351, 67, 10011, 33, 8381, 4672, 3536, 1945, 1245, 1361, 316, 7664, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 3399, 2890, 16, 2151, 16, 1479, 16, 5274, 16, 5588, 16, 7351, 67, 10011, 33, 8381, 4672, 3536, 1945, 1245, 1361, 316, 7664, 8395, 2, -100, -100, -100, -100, -100, -...
thumbDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\
imageDictAQ[sngl.ifo]=fnmatch.filter(filesAnalyze,\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime.png"\ %(sngl.ifo,timeString)) thumbDictAQ[sngl.ifo]=fnmatch.filter(filesAnalyze,\
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.exists(wikiFilename) and maxCount < 15: sys.stdout.write("File %s already exists.\n"%\ os.path.split(wikiFilename)[1]) wikiFilename=wikiFilename+".wiki" maxCount=maxCount+1 # #Create the wikipage object etc # wikiPage=wiki(wikiFilename) # # Create top two trigger params tables # cTable=wikiPage.wikiTable(2,9) cTable.data=[ ["Trigger Type", "Rank", "FAR", "SNR", "IFOS(Coinc)", "Instruments(Active)", "Coincidence Time (s)", "Total Mass (mSol)", "Chirp Mass (mSol)" ], ["%s"%(wikiCoinc.type), "%s"%(wikiCoinc.rank), "%s"%(wikiCoinc.far), "%s"%(wikiCoinc.snr), "%s"%(wikiCoinc.ifos), "%s"%(wikiCoinc.instruments), "%s"%(wikiCoinc.time), "%s"%(wikiCoinc.mass), "%s"%(wikiCoinc.mchirp) ] ] pTable=wikiPage.wikiTable(len(wikiCoinc.sngls_in_coinc())+1,7) pTable.data[0]=[ "IFO", "GPS Time(s)", "SNR", "CHISQR", "Mass 1", "Mass 2", "Chirp Mass" ] for row,cSngl in enumerate(wikiCoinc.sngls_in_coinc()): pTable.data[row+1]=[ "%s"%(cSngl.ifo), "%s"%(cSngl.time), "%s"%(cSngl.snr), "%s"%(cSngl.chisqr), "%s"%(cSngl.mass1), "%s"%(cSngl.mass2), "%s"%(cSngl.mchirp) ] #Write the tables into the Wiki object wikiPage.putText("Coincident Trigger Event Information: %s\n"\ %(stfu_pipe.gpsTimeToReadableDate(wikiCoinc.time))) wikiPage.insertTable(cTable) wikiPage.putText("Corresponding Coincident Single IFO Trigger Information\n") wikiPage.insertTable(pTable) #Generate a table of contents to appear after candidate params table wikiPage.tableOfContents(3) #Begin including each checklist item as section with subsections wikiPage.section("Follow-up Checklist") #Put each checklist item wikiPage.subsection("Checklist Summary") wikiPage.subsubsection("Does this candidate pass this checklist?") wikiPage.subsubsection("Answer") wikiPage.subsubsection("Relevant Information and Comments") wikiPage.insertHR() # #First real checklist item wikiPage.subsection("#0 False Alarm Probability") wikiPage.subsubsection("Question") wikiPage.putText("What is the false alarm rate associated with this candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") farTable=wikiPage.wikiTable(2,1) farTable.setTableStyle("background-color: yellow; text-align center;") farTable.data[0][0]="False Alarm Rate" farTable.data[1][0]="%s"%(wikiCoinc.far) wikiPage.insertTable(farTable) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#1 Data Quality Flags") wikiPage.subsubsection("Question") wikiPage.putText("Can the data quality flags coincident with this candidate be safely disregarded?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPath=os.path.split(wikiFilename)[0] dqFileList=wikiFileFinder.get_findFlags() if len(dqFileList) != 1: sys.stdout.write("Warning: DQ flags data product import problem.\n") print "Found %i files."%len(dqFileList) for mf in dqFileList: print mf for myFile in dqFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#2 Veto Investigations") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate survive the veto investigations performed at its time?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") vetoFileList=wikiFileFinder.get_findVetos() if len(vetoFileList) != 1: sys.stdout.write("Warning: Veto flags data product import problem.\n") for myFile in vetoFileList:print myFile for myFile in vetoFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#3 IFO Status") wikiPage.subsubsection("Question") wikiPage.putText("Are the interferometers operating normally with a reasonable level of sensitivity around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") #Add link to Daily Stats if wikiCoinc.time <= endOfS5: statsLink=wikiPage.makeExternalLink("http://blue.ligo-wa.caltech.edu/scirun/S5/DailyStatistics/",\ "S5 Daily Stats Page") else: statsLink="This should be a link to S6 Daily Stats!\n" wikiPage.putText(statsLink) #Link figures of merit #Get link for all members of wikiCoinc wikiPage.putText("Figures of Merit\n") if wikiCoinc.time > endOfS5: fomLinks=dict() elems=0 for wikiSngl in wikiCoinc.sngls: if not(wikiSngl.ifo.upper().rstrip().lstrip() == 'V1'): fomLinks[wikiSngl.ifo]=stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo) elems=elems+len(fomLinks[wikiSngl.ifo]) else: for myLabel,myLink,myThumb in stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo): wikiPage.putText("%s\n"%(wikiPage.makeExternalLink(myLink,myLabel))) cols=4 rows=(elems/3)+1 fTable=wikiPage.wikiTable(rows,cols) fTable.data[0]=["IFO,Shift","FOM1","FOM2","FOM3"] currentIndex=0 for myIFOKey in fomLinks.keys(): for label,link,thumb in fomLinks[myIFOKey]: myRow=currentIndex/int(3)+1 myCol=currentIndex%int(3)+1 fTable.data[myRow][0]=label thumbURL=thumb fTable.data[myRow][myCol]="%s"%(wikiPage.linkedRemoteImage(thumb,link)) currentIndex=currentIndex+1 wikiPage.insertTable(fTable) else: wikiPage.putText("Can not automatically fetch S5 FOM links.") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#4 Candidate Appearance") wikiPage.subsubsection("Question") wikiPage.putText("Do the Qscan figures show what we would expect for a gravitational-wave event?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() for sngl in wikiCoinc.sngls: frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'hoft') indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*/%s/*/%s/*index.html"%(frametype,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened.png"\ %(sngl.time,channelName)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened?thumb.png"\ %(sngl.time,channelName)) # #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("GW data channel scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >= 1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >= 1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: Candidate appearance plot import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#5 Seismic Plots") wikiPage.subsubsection("Question") wikiPage.putText("Is the seismic activity insignificant around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() # for sngl in wikiCoinc.sngls_in_coinc(): indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*index.html"%(sngl.ifo,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if (len(zValueFiles) > 0): for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Search for analyzeQscan files #/L1-analyseQscan_L1_932797512_687_seis_rds_L1_SEI-ETMX_X_z_scat-unspecified-gpstime.png timeString=str(float(sngl.time)).replace(".","_") zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.txt"%(sngl.ifo,timeString)) indexDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.html"%(sngl.ifo,timeString)) thumbDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime_thumb.png"\ %(sngl.ifo,timeString)) imageDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime.png"\ %(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse keeping SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Seismic scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: Seismic plots product import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#6 Other environmental causes") wikiPage.subsubsection("Question") wikiPage.putText("Were the environmental disturbances (other than seismic) insignificant at the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only PEM channels for sngl in wikiCoinc.sngls_in_coinc(): imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping PEM and not SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) for chan in zValueDictAQ[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(imageDict[sngl.ifo]) < 1: wikiPage.putText("PEM scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: PEM plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#7 Auxiliary degree of freedom") wikiPage.subsubsection("Question") wikiPage.putText("Were the auxiliary channel transients coincident with the candidate insignificant?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only AUX channels for sngl in wikiCoinc.sngls: imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") #H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.html for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Other scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: AUX plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#8 Electronic Log Book") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the comments posted by the sci-mons or the operators in the e-log?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiLinkLHOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"H1"), "Hanford eLog") wikiLinkLLOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"L1"), "Livingston eLog") wikiPage.putText("%s\n\n%s\n\n"%(wikiLinkLHOlog,wikiLinkLLOlog)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#9 Glitch Report") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the weekly glitch report?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") if int(wikiCoinc.time) >= endOfS5: wikiLinkGlitch=wikiPage.makeExternalLink( "https://www.lsc-group.phys.uwm.edu/twiki/bin/view/DetChar/GlitchStudies", "Glitch Reports for S6" ) else: wikiLinkGlitch=wikiPage.makeExternalLink( "http://www.lsc-group.phys.uwm.edu/glitch/investigations/s5index.html#shift", "Glitch Reports for S5" ) wikiPage.putText("%s\n"%(wikiLinkGlitch)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#10 Snr versus time") wikiPage.subsubsection("Question") wikiPage.putText("Is this trigger significant in a SNR versus time plot of all triggers in its analysis chunk?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#11 Parameters of the candidate") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate have a high likelihood of being a gravitational-wave according to its parameters?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Effective Distance Ratio Test\n") effDList=wikiFileFinder.get_effDRatio() if len(effDList) != 1: sys.stdout.write("Warning: Effective Distance Test import problem.\n") for myFile in effDList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#12 Snr and Chisq") wikiPage.subsubsection("Question") wikiPage.putText("Are the SNR and CHISQ time series consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") # #Put plots SNR and Chi sqr # indexList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*.html") thumbList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_snr-*thumb.png") thumbList.extend(fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_chisq-*thumb.png")) thumbList.sort() indexList=[file2URL.convert(x) for x in indexList] thumbList=[file2URL.convert(x) for x in thumbList] #Two thumb types possible "_thumb.png" or ".thumb.png" imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] ifoCount=len(wikiCoinc.sngls) rowLabel={"SNR":1,"CHISQ":2} rowCount=len(rowLabel) colCount=ifoCount if len(indexList) >= 1: snrTable=wikiPage.wikiTable(rowCount+1,colCount+1) for i,sngl in enumerate(wikiCoinc.sngls): myIndex="" for indexFile in indexList: if indexFile.__contains__("_pipe_%s_FOLLOWUP_"%sngl.ifo): myIndex=indexFile if myIndex=="": snrTable.data[0][i+1]=" %s "%sngl.ifo else: snrTable.data[0][i+1]=wikiPage.makeExternalLink(myIndex,sngl.ifo) for col,sngl in enumerate(wikiCoinc.sngls): for row,label in enumerate(rowLabel.keys()): snrTable.data[row+1][0]=label for k,image in enumerate(imageList): if (image.__contains__("_%s-"%label.lower()) \ and image.__contains__("pipe_%s_FOLLOWUP"%sngl.ifo)): snrTable.data[row+1][col+1]=" %s "%(wikiPage.linkedRemoteImage(thumbList[k],thumbList[k])) wikiPage.insertTable(snrTable) else: sys.stdout.write("Warning: SNR and CHISQ plots not found.\n") wikiPage.putText("SNR and CHISQ plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#13 Template bank veto") wikiPage.subsubsection("Question") wikiPage.putText("Is the bank veto value consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#14 Coherent studies") wikiPage.subsubsection("Question") wikiPage.putText("Are the triggers found in multiple interferometers coherent with each other?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") indexList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),"*.html") if len(indexList) >= 1: myIndex=file2URL.convert(indexList[0]) wikiPage.putText(wikiPage.makeExternalLink(myIndex,\ "%s Coherence Study Results"%(wikiCoinc.ifos))) thumbList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),\ "PLOT_CHIA_%s_snr-squared*thumb.png"%(wikiCoinc.time)) imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] rowCount=len(imageList) colCount=1 cohSnrTimeTable=wikiPage.wikiTable(rowCount+1,colCount) cohSnrTimeTable.data[0][0]="%s Coherent SNR Squared Times Series"%(wikiCoinc.ifos) for i,image in enumerate(imageList): cohSnrTimeTable.data[i+1][0]=wikiPage.linkedRemoteImage(image,thumbList[i]) wikiPage.insertTable(cohSnrTimeTable) else: sys.stdout.write("Warning: Coherent plotting jobs not found.\n") wikiPage.putText("Coherent Studies plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#15 Segmentation Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in segmentation?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#16 Calibration Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in calibration that are consistent with systematic uncertainties?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #
481b556f895e5b0b4caf0acaf35400d2993db8e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/481b556f895e5b0b4caf0acaf35400d2993db8e5/makeCheckListWiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1564, 1098, 12, 13044, 5359, 33, 7036, 16, 13044, 27055, 71, 33, 7036, 16, 13044, 2471, 33, 7036, 16, 768, 22, 1785, 33, 7036, 4672, 3536, 2985, 358, 2911, 279, 866, 1098, 1625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1564, 1098, 12, 13044, 5359, 33, 7036, 16, 13044, 27055, 71, 33, 7036, 16, 13044, 2471, 33, 7036, 16, 768, 22, 1785, 33, 7036, 4672, 3536, 2985, 358, 2911, 279, 866, 1098, 1625, ...
raise err
raise
def testfile(self): try: execfile(self.filename, {'display': self.display}) except KeyboardInterrupt: raise RuntimeError('Keyboard interrupt') except NotAvailable, err: # Only non-zero error codes are failures if err.code: raise err
098306705f866ef7dcae810ad5fb5d793e04f3ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1380/098306705f866ef7dcae810ad5fb5d793e04f3ab/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 768, 12, 2890, 4672, 775, 30, 1196, 768, 12, 2890, 18, 3459, 16, 13666, 5417, 4278, 365, 18, 5417, 6792, 1335, 19424, 30, 1002, 7265, 2668, 17872, 13123, 6134, 1335, 2288, 5268, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 768, 12, 2890, 4672, 775, 30, 1196, 768, 12, 2890, 18, 3459, 16, 13666, 5417, 4278, 365, 18, 5417, 6792, 1335, 19424, 30, 1002, 7265, 2668, 17872, 13123, 6134, 1335, 2288, 5268, 16...
a = u'C\u0338' * 20 + 'C\u0327' b = u'C\u0338' * 20 + '\xC7'
a = u'C\u0338' * 20 + u'C\u0327' b = u'C\u0338' * 20 + u'\xC7'
def test_issue10254(self): # Crash reported in #10254 a = u'C\u0338' * 20 + 'C\u0327' b = u'C\u0338' * 20 + '\xC7' self.assertEqual(self.db.normalize('NFC', a), b)
d898a500cff711d962ef83949ee8aa8c45c9c00f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/d898a500cff711d962ef83949ee8aa8c45c9c00f/test_unicodedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13882, 2163, 26261, 12, 2890, 4672, 468, 14998, 961, 14010, 316, 468, 2163, 26261, 279, 273, 582, 11, 39, 64, 89, 15265, 28, 11, 380, 4200, 225, 397, 582, 11, 39, 64, 89, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13882, 2163, 26261, 12, 2890, 4672, 468, 14998, 961, 14010, 316, 468, 2163, 26261, 279, 273, 582, 11, 39, 64, 89, 15265, 28, 11, 380, 4200, 225, 397, 582, 11, 39, 64, 89, 2...
print md
def getMetadata(self, authToken, clientVersion, troveList, language): metadata = {} # XXX optimize this to one SQL query downstream for troveName, branch, version in troveList: branch = self.toBranch(branch) if version: version = self.toVersion(version) else: version = None print troveName, branch, version, language md = self.repos.troveStore.getMetadata(troveName, branch, version, language) if md: metadata[troveName] = md print md return metadata
95d895ff48a5b4c56e11fd3e9dbd45e2a42f19b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/95d895ff48a5b4c56e11fd3e9dbd45e2a42f19b2/netserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11159, 12, 2890, 16, 24050, 16, 1004, 1444, 16, 23432, 537, 682, 16, 2653, 4672, 1982, 273, 2618, 225, 468, 11329, 10979, 333, 358, 1245, 3063, 843, 18186, 364, 23432, 537, 461, 16, 3803...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11159, 12, 2890, 16, 24050, 16, 1004, 1444, 16, 23432, 537, 682, 16, 2653, 4672, 1982, 273, 2618, 225, 468, 11329, 10979, 333, 358, 1245, 3063, 843, 18186, 364, 23432, 537, 461, 16, 3803...
open(directory+'epydoc-index.html', 'w').write(str)
open(filename, 'w').write(str)
def write(self, directory=None, progress_callback=None): """ Write the documentation to the given directory.
dd7fc26b7d69af6d4765be2a892edca4603899ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/dd7fc26b7d69af6d4765be2a892edca4603899ee/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1867, 33, 7036, 16, 4007, 67, 3394, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1867, 33, 7036, 16, 4007, 67, 3394, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
ownerser = "invalid"
ownerser = "-1"
def charinfo( socket, char ): if not char or not socket: return page_ = 0 pages = 0 if char.npc: pages = 5 else: pages = 5 gump = cGump( 0, 0, 0, 0, 40 ) gump.setCallback( "commands.info.charinfo_response" ) gump.setArgs( [char] ) gump.startPage( page_ ) gump.addResizeGump( 0, 40, 0xA28, 450, 350 ) # Background gump.addGump( 105, 18, 0x58B ) # Fancy top-bar gump.addGump( 182, 0, 0x589 ) # "Button" like gump
446f6a3007b6c351324097cb5aa350acc2235bce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/446f6a3007b6c351324097cb5aa350acc2235bce/info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1149, 1376, 12, 2987, 16, 1149, 262, 30, 309, 486, 1149, 578, 486, 2987, 30, 327, 225, 1363, 67, 273, 374, 4689, 273, 374, 309, 1149, 18, 82, 2436, 30, 4689, 273, 1381, 469, 30, 4689...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1149, 1376, 12, 2987, 16, 1149, 262, 30, 309, 486, 1149, 578, 486, 2987, 30, 327, 225, 1363, 67, 273, 374, 4689, 273, 374, 309, 1149, 18, 82, 2436, 30, 4689, 273, 1381, 469, 30, 4689...
for key in to_add: handler = cache.get(key)
for key in self.added: handler = self.cache.get(key)
def _save_changes(self, data): cache = self.cache fs = self.fs path = self.path to_add = self._to_add
3faba4a24cd4eaf0a1e3725c3cf35e7e68fc661b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/3faba4a24cd4eaf0a1e3725c3cf35e7e68fc661b/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 6329, 12, 2890, 16, 501, 4672, 1247, 273, 365, 18, 2493, 2662, 273, 365, 18, 2556, 589, 273, 365, 18, 803, 358, 67, 1289, 273, 365, 6315, 869, 67, 1289, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 6329, 12, 2890, 16, 501, 4672, 1247, 273, 365, 18, 2493, 2662, 273, 365, 18, 2556, 589, 273, 365, 18, 803, 358, 67, 1289, 273, 365, 6315, 869, 67, 1289, 2, -100, -100,...
_fl_create_canvas = cfuncproto(so_libforms, "fl_create_canvas",
_fl_create_canvas = cfuncproto(so_libforms, "fl_create_canvas",
def fl_add_canvas(type, x, y, w, h, label): """ fl_add_canvas(type, x, y, w, h, label) -> object """ retval = _fl_add_canvas(type, x, y, w, h, label) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 1289, 67, 15424, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 15424, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 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, 1183, 67, 1289, 67, 15424, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 15424, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 13, ...
"""
"""
def compile_mappers(): """Compile all mappers that have been defined. This is equivalent to calling ``compile()`` on any individual mapper. """ for m in list(_mapper_registry): m.compile()
8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 1458, 10422, 13332, 3536, 9937, 777, 852, 10422, 716, 1240, 2118, 2553, 18, 225, 1220, 353, 7680, 358, 4440, 12176, 11100, 1435, 10335, 603, 1281, 7327, 5815, 18, 225, 3536, 364,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4074, 67, 1458, 10422, 13332, 3536, 9937, 777, 852, 10422, 716, 1240, 2118, 2553, 18, 225, 1220, 353, 7680, 358, 4440, 12176, 11100, 1435, 10335, 603, 1281, 7327, 5815, 18, 225, 3536, 364,...
print >>sw, '<%s%s%s>%s</%s>' % (n, attrtext, tstr, val, n)
i = n.find('xmlns') if i > 0: ctag = '</%s>' % n[:i - 1] else: ctag = '</%s>' % n print >>sw, '<%s%s%s>%s%s' % (n, attrtext, tstr, val, ctag)
def serialize(self, sw, pyobj, name=None, attrtext='', **kw): if type(pyobj) in _floattypes or type(pyobj) in _inttypes: pyobj = time.gmtime(pyobj) n = name or self.oname or ('E%x' % id(pyobj)) d = {} pyobj = tuple(pyobj) if 1 in map(lambda x: x < 0, pyobj[0:6]): pyobj = map(abs, pyobj) d['neg'] = '-' else: d['neg'] = ''
b5a995f7338a91abb1cfe9c35b6926a2d07d7d9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/b5a995f7338a91abb1cfe9c35b6926a2d07d7d9d/TCtimes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 12, 2890, 16, 1352, 16, 2395, 2603, 16, 508, 33, 7036, 16, 1604, 955, 2218, 2187, 2826, 9987, 4672, 309, 618, 12, 2074, 2603, 13, 316, 389, 5659, 2352, 578, 618, 12, 2074, 2603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 12, 2890, 16, 1352, 16, 2395, 2603, 16, 508, 33, 7036, 16, 1604, 955, 2218, 2187, 2826, 9987, 4672, 309, 618, 12, 2074, 2603, 13, 316, 389, 5659, 2352, 578, 618, 12, 2074, 2603, ...
for scatter_label in combined_scatter_data[0]: exp_label_temp = split("~",combined_scatter_data[0][scatter_counter]) mod_label_temp = split("~",combined_scatter_data[1][scatter_counter])
for scatter_label in combined_scatter_data_labels[0]: exp_label_temp = [] mod_label_temp = [] exp_label_temp = split("~",combined_scatter_data_labels[0][scatter_counter]) mod_label_temp = split("~",combined_scatter_data_labels[1][scatter_counter])
def extract_comp_data(comp_file_info): ## Read in d line dict from config file and Process data from source .csv files. exp_data = [] mod_data = [] exp_data_dict = {} mod_data_dict = {} exp_scatter_data_labels = [] mod_scatter_data_labels = [] #List of variables from configuration file column names. exp_data_filename = comp_file_info['Exp_Filename'] #String of filename exp_column_name_row_index = int(comp_file_info['Exp_Col_Name_Row'])-1 #Experimental Data Column Name Row Number exp_data_row_index = int(comp_file_info['Exp_Data_Row'])-1 #Experimental Data Starting Row Number exp_start_time_data_val = comp_file_info['Exp_Start_(min.)'] #String in minutes to start exp plot data exp_stop_time_data_val = comp_file_info['Exp_End_(min.)'] #String in minutes to stop exp plot data exp_start_time_comp_val = comp_file_info['Exp_Comp_Start_(min.)'] #String in minutes to start exp compare data exp_stop_time_comp_val = comp_file_info['Exp_Comp_End_(min.)'] #String in minutes to start exp compare data exp_initial_value = comp_file_info['Exp_Intitial_Value'] #Initial Value for Quantity exp_column_name_value = comp_file_info['Exp_Col_Name'].strip() #Experimental Data Column Name mod_data_filename = comp_file_info['Mod_Filename'] #String of filename mod_column_name_row_index = int(comp_file_info['Mod_Col_Name_Row'])-1 #Modeling Data Column Name Row Number mod_data_row_index = int(comp_file_info['Mod_Data_Row'])-1 #Modeling Data Starting Row Number mod_start_time_data_val = comp_file_info['Mod_Start_(min.)'] #String in minutes to start mod plot data mod_stop_time_data_val = comp_file_info['Mod_End_(min.)'] #String in minutes to stop mod plot data mod_start_time_comp_val = comp_file_info['Mod_Comp_Start_(min.)'] #String in minutes to start mod compare data mod_stop_time_comp_val = comp_file_info['Mod_Comp_End_(min.)'] #String in minutes to start mod compare data mod_initial_value = comp_file_info['Mod_Intitial_Value'] #Initial Value for Quantity mod_column_name_value = comp_file_info['Mod_Col_Name'].strip() #Modeling Data Column Name # Create Scatter Data Labels for the comparison results. if exp_column_name_value[0] == '[': print "Exp Column Name List Detected" exp_compound_col_names = eval(exp_column_name_value) print "Exp Compound Column Names:", exp_compound_col_names for name in exp_compound_col_names: print "Exp Sub-Column Name:", name exp_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+name) else: print "Single Exp. Column Name:", exp_column_name_value exp_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+exp_column_name_value) if mod_column_name_value[0] == '[': print "Mod Column Name List Detected" mod_compound_col_names = eval(mod_column_name_value) for name in mod_compound_col_names: print "Mod Sub-Column Name:", name mod_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+name) else: print "Single Mod. Column Name:", mod_column_name_value mod_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+mod_column_name_value) print "Exp Data Labels:\n", exp_scatter_data_labels print "Mod Data Labels:\n", mod_scatter_data_labels combined_scatter_data = [exp_scatter_data_labels,mod_scatter_data_labels] #print "Combined Scatter Data:",combined_scatter_data min_max = comp_file_info['max/min'] #String indicating if min or max value is required. group_value = int(comp_file_info['Group']) try: exp_file_object = open(data_directory+exp_data_filename, "U") except: print "!!! Experimental "+exp_data_filename+" Data File will not open. !!!" exit() try: mod_file_object = open(data_directory+mod_data_filename, "U") except: print "!!! Modeling "+mod_data_filename+" Data File will not open. !!!" exit() ## Start File Processing #Read in experimental data and flip lists from rows to columns. print "Reading in:", exp_data_filename exp_data_cols = zip(*csv.reader(exp_file_object)) #Convert tuples to lists. exp_data_list = [list(sublist) for sublist in exp_data_cols] #Pull the Time column name out and strip whitespace. Assumes that Time is in first column. exp_time_col_name = exp_data_list[0][exp_column_name_row_index].strip() #Build Experimental Data Dictionary. #Catch errors if conversion of data from string to float fails. for exp_list in exp_data_list: try: temp_list = [] for x in exp_list[exp_data_row_index:]: if x == 'Null' or x == '' or x == 'NaN' or x == 'inf' or x == '-inf': list_value = 'Null' else: list_value = float(x) temp_list.append(list_value) exp_data_dict[exp_list[exp_column_name_row_index].strip()] = temp_list except: print "!!! Exp Data Conversion in Column Name "+exp_list[exp_column_name_row_index].strip()+". !!!" exit() #Read in model data and flip lists from rows to columns. print "Reading in:", mod_data_filename mod_data_cols = zip(*csv.reader(mod_file_object)) #Convert tuples to lists. mod_data_list = [list(sublist) for sublist in mod_data_cols] #Pull the Time column name out and strip whitespace from ends of string. mod_time_col_name = mod_data_list[0][mod_column_name_row_index].strip() #Build Prediction/Model Data Dictionary #Catch errors if conversion of data from string to float fails. for mod_list in mod_data_list: try: temp_list = [] for x in mod_list[mod_data_row_index:]: if x == 'Null' or x == '' or x == 'NaN' or x == 'inf' or x == '-inf': list_value = 'Null' else: list_value = float(x) temp_list.append(list_value) mod_data_dict[mod_list[mod_column_name_row_index].strip()] = temp_list except: print "!!! Mod Data Conversion in Column Name "+mod_list[mod_column_name_row_index].strip()+". !!!" exit() # Assuming that all column time ranges are the same. Passing in the first Column Name. exp_comp_ranges = find_start_stop_index(exp_data_dict,exp_time_col_name,exp_start_time_data_val,exp_stop_time_data_val,exp_start_time_comp_val,exp_stop_time_comp_val) mod_comp_ranges = find_start_stop_index(mod_data_dict,mod_time_col_name,mod_start_time_data_val,mod_stop_time_data_val,mod_start_time_comp_val,mod_stop_time_comp_val) #print exp_comp_ranges #print mod_comp_ranges #### Begin Column specific operations. scatter_counter = 0 for scatter_label in combined_scatter_data[0]: exp_label_temp = split("~",combined_scatter_data[0][scatter_counter]) mod_label_temp = split("~",combined_scatter_data[1][scatter_counter]) ##Find max or min values. exp_data_values_comp = exp_data_dict[exp_label_temp[3]][exp_comp_ranges[2]:exp_comp_ranges[3]] mod_data_values_comp = mod_data_dict[mod_label_temp[3]][mod_comp_ranges[2]:mod_comp_ranges[3]] # This allows the d line Quantity value to be set to 0 when either model or experimental data is missing. if comp_file_info['Quantity'] == str(0): print "Quantity set to 0, no comparison made." else: if min_max == 'max': print "*** Rise Computed ***" temp_exp_data_values = [x for x in exp_data_values_comp if x != 'Null'] exp_rise_value = max(temp_exp_data_values) - float(exp_initial_value) temp_mod_data_values = [x for x in mod_data_values_comp if x != 'Null'] mod_rise_value = max(temp_mod_data_values) - float(mod_initial_value) print "Experimental Initial Value is:", exp_initial_value print "Experimental Rise Value is:", exp_rise_value print "Model Initial Value is:", mod_initial_value print "Model Rise Value is:", mod_rise_value print "\n*** Computing Relative Difference ***" try: relative_difference = ((mod_rise_value-exp_rise_value)/exp_rise_value) print "Relative Difference is:", relative_difference #Append Rise Values to Global Scatter Data Dictionary. scatter_data_dict[combined_scatter_data[0][scatter_counter]] = [exp_rise_value,mod_rise_value,relative_difference] except: print "!!! Computation of relative_difference failed. !!!\nCheck source data for columns listed above." exit() elif min_max == 'min': print "*** Drop Computed ***" temp_exp_data_values = [x for x in exp_data_values_comp if x != 'Null'] exp_drop_value = float(exp_initial_value) - min(temp_exp_data_values) temp_mod_data_values = [x for x in mod_data_values_comp if x != 'Null'] mod_drop_value = float(mod_initial_value) - min(temp_mod_data_values) print "Experimental Initial Value is:", exp_initial_value print "Experimental Drop Value is:", exp_drop_value print "Model Initial Value is:", mod_initial_value print "Model Drop Value is:", mod_drop_value print "\n*** Computing Relative Difference ***" try: relative_difference = ((mod_drop_value-exp_drop_value)/exp_drop_value) print "Relative Difference is:", relative_difference #Append Drop Values to Global Scatter Data Dictionary. scatter_data_dict[combined_scatter_data[0][scatter_counter]] = [exp_drop_value,mod_drop_value,relative_difference] except: print "!!! Computation of relative_difference failed. !!!\nCheck source data for columns listed above." exit() else: print "!!! Min or Max is undefined in the input file. !!!" exit() #Create data lists based on specified ranges exp_data_seconds = zip(exp_data_dict[exp_time_col_name][exp_comp_ranges[0]:exp_comp_ranges[1]], exp_data_dict[exp_label_temp[3]][exp_comp_ranges[0]:exp_comp_ranges[1]]) #print exp_data_seconds mod_data_seconds = zip(mod_data_dict[mod_time_col_name][mod_comp_ranges[0]:mod_comp_ranges[1]], mod_data_dict[mod_label_temp[3]][mod_comp_ranges[0]:mod_comp_ranges[1]]) #print mod_data_seconds #Convert time to minutes from seconds. exp_data.append([[x[0] / 60, x[1]] for x in exp_data_seconds]) #print exp_data mod_data.append([[x[0] / 60, x[1]] for x in mod_data_seconds]) #print mod_data scatter_counter =+ 1 # Close files exp_file_object.close() mod_file_object.close() return [exp_data,mod_data]
8b29e6ed42f5e5e45bcb0f60f033670da998a673 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/8b29e6ed42f5e5e45bcb0f60f033670da998a673/Validation_Data_Processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 2919, 67, 892, 12, 2919, 67, 768, 67, 1376, 4672, 7541, 2720, 316, 302, 980, 2065, 628, 642, 585, 471, 4389, 501, 628, 1084, 263, 6715, 1390, 18, 225, 1329, 67, 892, 273, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 2919, 67, 892, 12, 2919, 67, 768, 67, 1376, 4672, 7541, 2720, 316, 302, 980, 2065, 628, 642, 585, 471, 4389, 501, 628, 1084, 263, 6715, 1390, 18, 225, 1329, 67, 892, 273, 5...
title_base The prefix of the title displayed in the title bar
def _set_initial_values_to_member_variables(self): """ Instance variables usage:
f9ba1251fba4c6e1fd79f0257c2701642e518762 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/f9ba1251fba4c6e1fd79f0257c2701642e518762/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 6769, 67, 2372, 67, 869, 67, 5990, 67, 7528, 12, 2890, 4672, 3536, 5180, 3152, 4084, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 6769, 67, 2372, 67, 869, 67, 5990, 67, 7528, 12, 2890, 4672, 3536, 5180, 3152, 4084, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if ident not in self.entries:
if ident not in self.entries and posixpath.isfile(epath):
def HandleEvent(self, event): '''Unified FAM event handler for DirShadow''' action = event.code2str() if event.filename[0] == '/': return epath = "".join([self.data, self.handles[event.requestID], event.filename]) if posixpath.isdir(epath): ident = self.handles[event.requestID] + event.filename else: ident = self.handles[event.requestID][:-1]
18f8668b60cea58fa26ae96c81e201e321547e1a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/18f8668b60cea58fa26ae96c81e201e321547e1a/Plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5004, 1133, 12, 2890, 16, 871, 4672, 9163, 984, 939, 478, 2192, 871, 1838, 364, 8446, 12957, 26418, 1301, 273, 871, 18, 710, 22, 701, 1435, 309, 871, 18, 3459, 63, 20, 65, 422, 2023, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5004, 1133, 12, 2890, 16, 871, 4672, 9163, 984, 939, 478, 2192, 871, 1838, 364, 8446, 12957, 26418, 1301, 273, 871, 18, 710, 22, 701, 1435, 309, 871, 18, 3459, 63, 20, 65, 422, 2023, ...
os.makedirs( os.dirname( file ) )
os.makedirs( os.path.dirname( file ) )
def getShifterProxy( type, file = False ): """ This method returns a shifter's proxy - type : ProductionManager / DataManager... """ if file: try: os.makedirs( os.dirname( file ) ) except: pass shifterSection = "/Operations/Shifter/%s" % type userName = gConfig.getValue( '%s/User' % shifterSection, '' ) if not userName: return S_ERROR( "No shifter defined in %s/User" % shifterSection ) result = CS.getDNForUsername( userName ) if not result[ 'OK' ]: return result userDN = result[ 'Value' ][0] userGroup = gConfig.getValue( '%s/Group' % shifterSection, 'lhcb_prod' ) gLogger.info( "Getting proxy for shifter %s@%s (%s)" % ( userName, userGroup, userDN ) ) result = gProxyManager.downloadVOMSProxy( userDN, userGroup, requiredTimeLeft = 4*43200 ) if not result[ 'OK' ]: return result chain = result[ 'Value' ] result = gProxyManager.dumpProxyToFile( chain, destinationFile = file ) if not result[ 'OK' ]: return result fileName = result[ 'Value' ] return S_OK( { 'DN' : userDN, 'username' : userName, 'group' : userGroup, 'chain' : chain, 'proxyFile' : fileName } )
c810b91f99e8068741b9cf9594d5e0b4b224bc1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c810b91f99e8068741b9cf9594d5e0b4b224bc1b/Shifter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7932, 430, 387, 3886, 12, 618, 16, 585, 273, 1083, 262, 30, 3536, 1220, 707, 1135, 279, 699, 430, 387, 1807, 2889, 300, 618, 294, 10856, 349, 1318, 342, 1910, 1318, 2777, 3536, 309, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7932, 430, 387, 3886, 12, 618, 16, 585, 273, 1083, 262, 30, 3536, 1220, 707, 1135, 279, 699, 430, 387, 1807, 2889, 300, 618, 294, 10856, 349, 1318, 342, 1910, 1318, 2777, 3536, 309, 58...
if (not ch_util_lib.SafeSave(path_in)):
if (not util_lib.SafeSave(path_in)):
def WriteString(path_in, str_in): # verify existance (if the file doesn't exist, then there's no way # we're writing back modified information from it if not (os.path.exists(path_in) and os.path.isfile(path_in)): return False; # verify this is safe if (not ch_util_lib.SafeSave(path_in)): return False; # open the file for writing out_file = open(path_in, 'w'); # write the file print >> out_file, str_in; # close the file out_file.close(); return True;
6289af17f46fb2f11aea9d918dd0880dd1e18af8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4025/6289af17f46fb2f11aea9d918dd0880dd1e18af8/ch_clean_asp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7879, 12, 803, 67, 267, 16, 609, 67, 267, 4672, 225, 468, 3929, 1005, 1359, 261, 430, 326, 585, 3302, 1404, 1005, 16, 1508, 1915, 1807, 1158, 4031, 468, 282, 732, 4565, 7410, 1473, 435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7879, 12, 803, 67, 267, 16, 609, 67, 267, 4672, 225, 468, 3929, 1005, 1359, 261, 430, 326, 585, 3302, 1404, 1005, 16, 1508, 1915, 1807, 1158, 4031, 468, 282, 732, 4565, 7410, 1473, 435...
result[lib[1]] = False
result[lib[1]] = 0
cont += configString('/* #undef %s */' % t[1], desc = description)
f3016d70d952f295e30601e06998d95d2867a6ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/f3016d70d952f295e30601e06998d95d2867a6ea/scons_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 466, 1011, 642, 780, 2668, 20308, 468, 318, 536, 738, 87, 1195, 11, 738, 268, 63, 21, 6487, 225, 3044, 273, 2477, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 466, 1011, 642, 780, 2668, 20308, 468, 318, 536, 738, 87, 1195, 11, 738, 268, 63, 21, 6487, 225, 3044, 273, 2477, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
msg += "Details: %s" % str(ex)
msg += "Details: %s\n" % str(ex) msg += "Traceback: %s\n" % traceback.format_exc()
def __call__(self, event, payload): """ _operator()_
f37988b53203252b7c2fe00a234ca3abedd8895c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/f37988b53203252b7c2fe00a234ca3abedd8895c/JobCreatorComponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 871, 16, 2385, 4672, 3536, 389, 9497, 1435, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 871, 16, 2385, 4672, 3536, 389, 9497, 1435, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return True
return
def writeArgumentUnboxing(f, i, name, type, haveCcx, optional, rvdeclared): # f - file to write to # i - int or None - Indicates the source jsval. If i is an int, the source # jsval is argv[i]; otherwise it is *vp. But if Python i >= C++ argc, # which can only happen if optional is True, the argument is missing; # use JSVAL_NULL as the source jsval instead. # name - str - name of the native C++ variable to create. # type - xpidl.{Interface,Native,Builtin} - IDL type of argument # optional - bool - True if the parameter is optional. # rvdeclared - bool - False if no |nsresult rv| has been declared earlier. isSetter = (i is None) if isSetter: argPtr = "vp" argVal = "*vp" elif optional: argPtr = '! /* TODO - optional parameter of this type not supported */' argVal = "(%d < argc ? argv[%d] : JSVAL_NULL)" % (i, i) else: argVal = "argv[%d]" % i argPtr = "&" + argVal params = { 'name': name, 'argVal': argVal, 'argPtr': argPtr } typeName = getBuiltinOrNativeTypeName(type) if typeName is not None: template = argumentUnboxingTemplates.get(typeName) if template is not None: if optional and ("${argPtr}" in template): warn("Optional parameters of type %s are not supported." % type.name) f.write(substitute(template, params)) return rvdeclared # else fall through; the type isn't supported yet. elif isInterfaceType(type): if type.name == 'nsIVariant': # Totally custom. assert haveCcx template = ( " nsCOMPtr<nsIVariant> ${name}(already_AddRefed<nsIVariant>(" "XPCVariant::newVariant(ccx, ${argVal})));\n" " if (!${name})\n" " return JS_FALSE;\n") f.write(substitute(template, params)) return rvdeclared elif type.name == 'nsIAtom': # Should have special atomizing behavior. Fall through. pass else: if not rvdeclared: f.write(" nsresult rv;\n"); f.write(" nsCOMPtr<%s> %s;\n" % (type.name, name)) f.write(" rv = xpc_qsUnwrapArg<%s>(" "cx, %s, getter_AddRefs(%s));\n" % (type.name, argVal, name)) f.write(" if (NS_FAILED(rv)) {\n") if isSetter: f.write(" xpc_qsThrowBadSetterValue(" "cx, rv, JSVAL_TO_OBJECT(*tvr.addr()), id);\n") elif haveCcx: f.write(" xpc_qsThrowBadArgWithCcx(ccx, rv, %d);\n" % i) else: f.write(" xpc_qsThrowBadArg(cx, rv, vp, %d);\n" % i) f.write(" return JS_FALSE;\n" " }\n") return True warn("Unable to unbox argument of type %s" % type.name) if i is None: src = '*vp' else: src = 'argv[%d]' % i f.write(" !; // TODO - Unbox argument %s = %s\n" % (name, src)) return rvdeclared
6f558ca9eddc5be4f0e7a99f5054cd7d74be2155 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/6f558ca9eddc5be4f0e7a99f5054cd7d74be2155/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 1379, 984, 2147, 310, 12, 74, 16, 277, 16, 508, 16, 618, 16, 1240, 39, 71, 92, 16, 3129, 16, 5633, 16571, 4672, 468, 284, 300, 585, 358, 1045, 358, 468, 277, 300, 509, 578, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 1379, 984, 2147, 310, 12, 74, 16, 277, 16, 508, 16, 618, 16, 1240, 39, 71, 92, 16, 3129, 16, 5633, 16571, 4672, 468, 284, 300, 585, 358, 1045, 358, 468, 277, 300, 509, 578, 5...
out += '<li><a href="%(weburl)s/admin/webcomment/webcommentadmin.py/comments?ln=%(ln)s&amp;reviews=1">%(reported_rev_label)s</a></li>' %\
out += '<li><a href="%(weburl)s/admin/webcomment/webcommentadmin.py/comments?ln=%(ln)s&amp;reviews=1">%(reported_rev_label)s</a></li>' % \
def tmpl_admin_index(self, ln): """ """ # load the right message language _ = gettext_set_language(ln)
4dda1758fb5bc9c9536ba57262a213caa97dca4e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3302/4dda1758fb5bc9c9536ba57262a213caa97dca4e/webcomment_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 3666, 67, 1615, 12, 2890, 16, 7211, 4672, 3536, 3536, 468, 1262, 326, 2145, 883, 2653, 389, 273, 24972, 67, 542, 67, 4923, 12, 2370, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 3666, 67, 1615, 12, 2890, 16, 7211, 4672, 3536, 3536, 468, 1262, 326, 2145, 883, 2653, 389, 273, 24972, 67, 542, 67, 4923, 12, 2370, 13, 2, -100, -100, -100, -100, -100, -10...
raise DataFailure, "No kstat command '%s'" %(KSTAT_CMD)
raise datacollect.DataFailure, "No kstat command '%s'" %(KSTAT_CMD)
def collectData(self):
5f8c9d304ef25c457e249816b8c3018dd56da6c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/5f8c9d304ef25c457e249816b8c3018dd56da6c9/diskdevice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 751, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 751, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
ef = codecs.EncodedFile(f, 'utf-16', 'utf-8')
ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8')
def test_basic(self): f = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80') ef = codecs.EncodedFile(f, 'utf-16', 'utf-8') self.assertEquals(ef.read(), '\xff\xfe\\\xd5\n\x00\x00\xae')
b8205a11882161968fe9b67871d4000c4b3efb08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8205a11882161968fe9b67871d4000c4b3efb08/test_codecs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13240, 12, 2890, 4672, 284, 273, 15777, 18, 780, 4294, 2668, 64, 92, 329, 64, 92, 8778, 64, 92, 29, 71, 64, 82, 64, 6554, 69, 64, 6114, 28, 64, 92, 3672, 6134, 20986, 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, 1842, 67, 13240, 12, 2890, 4672, 284, 273, 15777, 18, 780, 4294, 2668, 64, 92, 329, 64, 92, 8778, 64, 92, 29, 71, 64, 82, 64, 6554, 69, 64, 6114, 28, 64, 92, 3672, 6134, 20986, 273...
include(fn, s, data, False)
if force: include(fn, s, data, "include required") else include(fn, s, data, False)
def handleInclude(m, fn, lineno, data, force): s = bb.data.expand(m.group(1), data) bb.msg.debug(3, bb.msg.domain.Parsing, "CONF %s:%d: including %s" % (fn, lineno, s)) include(fn, s, data, False)
7a4579e7cbc26714771ecb5854702b240a9daca8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/7a4579e7cbc26714771ecb5854702b240a9daca8/ConfHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 8752, 12, 81, 16, 2295, 16, 7586, 16, 501, 16, 2944, 4672, 272, 273, 7129, 18, 892, 18, 12320, 12, 81, 18, 1655, 12, 21, 3631, 501, 13, 7129, 18, 3576, 18, 4148, 12, 23, 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, 1640, 8752, 12, 81, 16, 2295, 16, 7586, 16, 501, 16, 2944, 4672, 272, 273, 7129, 18, 892, 18, 12320, 12, 81, 18, 1655, 12, 21, 3631, 501, 13, 7129, 18, 3576, 18, 4148, 12, 23, 16, ...
if job.is_example:
if job.is_example or job.is_pyexample:
def run_tests(): # # Run waf to make sure that everything is built, configured and ready to go # unless we are explicitly told not to. We want to be careful about causing # our users pain while waiting for extraneous stuff to compile and link, so # we allow users that know what they''re doing to not invoke waf at all. # if not options.nowaf: # # If the user is running the "kinds" or "list" options, there is an # implied dependency on the test-runner since we call that program # if those options are selected. We will exit after processing those # options, so if we see them, we can safely only build the test-runner. # # If the user has constrained us to running only a particular type of # file, we can only ask waf to build what we know will be necessary. # For example, if the user only wants to run BVT tests, we only have # to build the test-runner and can ignore all of the examples. # # If the user only wants to run a single example, then we can just build # that example. # # If there is no constraint, then we have to build everything since the # user wants to run everything. # if options.kinds or options.list or (len(options.constrain) and options.constrain in core_kinds): if sys.platform == "win32": waf_cmd = "waf --target=test-runner" else: waf_cmd = "./waf --target=test-runner" elif len(options.example): if sys.platform == "win32": waf_cmd = "waf --target=%s" % os.path.basename(options.example) else: waf_cmd = "./waf --target=%s" % os.path.basename(options.example) else: if sys.platform == "win32": waf_cmd = "waf" else: waf_cmd = "./waf" if options.verbose: print "Building: %s" % waf_cmd proc = subprocess.Popen(waf_cmd, shell = True) proc.communicate() # # Pull some interesting configuration information out of waf, primarily # so we can know where executables can be found, but also to tell us what # pieces of the system have been built. This will tell us what examples # are runnable. # read_waf_active_variant() read_waf_config() make_library_path() # # If lots of logging is enabled, we can crash Python when it tries to # save all of the text. We just don't allow logging to be turned on when # test.py runs. If you want to see logging output from your tests, you # have to run them using the test-runner directly. # os.environ["NS_LOG"] = "" # # There are a couple of options that imply we can to exit before starting # up a bunch of threads and running tests. Let's detect these cases and # handle them without doing all of the hard work. # if options.kinds: path_cmd = os.path.join("utils", "test-runner --kinds") (rc, standard_out, standard_err, et) = run_job_synchronously(path_cmd, os.getcwd(), False, False) print standard_out if options.list: path_cmd = os.path.join("utils", "test-runner --list") (rc, standard_out, standard_err, et) = run_job_synchronously(path_cmd, os.getcwd(), False, False) print standard_out if options.kinds or options.list: return # # We communicate results in two ways. First, a simple message relating # PASS, FAIL, CRASH or SKIP is always written to the standard output. It # is expected that this will be one of the main use cases. A developer can # just run test.py with no options and see that all of the tests still # pass. # # The second main use case is when detailed status is requested (with the # --text or --html options). Typicall this will be text if a developer # finds a problem, or HTML for nightly builds. In these cases, an # XML file is written containing the status messages from the test suites. # This file is then read and translated into text or HTML. It is expected # that nobody will really be interested in the XML, so we write it somewhere # with a unique name (time) to avoid collisions. In case an error happens, we # provide a runtime option to retain the temporary files. # # When we run examples as smoke tests, they are going to want to create # lots and lots of trace files. We aren't really interested in the contents # of the trace files, so we also just stash them off in the temporary dir. # The retain option also causes these unchecked trace files to be kept. # date_and_time = time.strftime("%Y-%m-%d-%H-%M-%S-CUT", time.gmtime()) if not os.path.exists(TMP_OUTPUT_DIR): os.makedirs(TMP_OUTPUT_DIR) testpy_output_dir = os.path.join(TMP_OUTPUT_DIR, date_and_time); if not os.path.exists(testpy_output_dir): os.makedirs(testpy_output_dir) # # Create the main output file and start filling it with XML. We need to # do this since the tests will just append individual results to this file. # xml_results_file = os.path.join(testpy_output_dir, "results.xml") f = open(xml_results_file, 'w') f.write('<?xml version="1.0"?>\n') f.write('<TestResults>\n') f.close() # # We need to figure out what test suites to execute. We are either given one # suite or example explicitly via the --suite or --example/--pyexample option, # or we need to call into the test runner and ask it to list all of the available # test suites. Further, we need to provide the constraint information if it # has been given to us. # # This translates into allowing the following options with respect to the # suites # # ./test,py: run all of the suites and examples # ./test.py --constrain=core: run all of the suites of all kinds # ./test.py --constrain=unit: run all unit suites # ./test,py --suite=some-test-suite: run a single suite # ./test,py --example=udp/udp-echo: run no test suites # ./test,py --pyexample=wireless/mixed-wireless.py: run no test suites # ./test,py --suite=some-suite --example=some-example: run the single suite # # We can also use the --constrain option to provide an ordering of test # execution quite easily. # if len(options.suite): suites = options.suite + "\n" elif len(options.example) == 0 and len(options.pyexample) == 0: if len(options.constrain): path_cmd = os.path.join("utils", "test-runner --list --constrain=%s" % options.constrain) (rc, suites, standard_err, et) = run_job_synchronously(path_cmd, os.getcwd(), False, False) else: path_cmd = os.path.join("utils", "test-runner --list") (rc, suites, standard_err, et) = run_job_synchronously(path_cmd, os.getcwd(), False, False) else: suites = "" # # suite_list will either a single test suite name that the user has # indicated she wants to run or a list of test suites provided by # the test-runner possibly according to user provided constraints. # We go through the trouble of setting up the parallel execution # even in the case of a single suite to avoid having two process the # results in two different places. # suite_list = suites.split('\n') # # We now have a possibly large number of test suites to run, so we want to # run them in parallel. We're going to spin up a number of worker threads # that will run our test jobs for us. # input_queue = Queue.Queue(0) output_queue = Queue.Queue(0) jobs = 0 threads=[] # # In Python 2.6 you can just use multiprocessing module, but we don't want # to introduce that dependency yet; so we jump through a few hoops. # processors = 1 if sys.platform != "win32": if 'SC_NPROCESSORS_ONLN'in os.sysconf_names: processors = os.sysconf('SC_NPROCESSORS_ONLN') else: proc = subprocess.Popen("sysctl -n hw.ncpu", shell = True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout_results, stderr_results = proc.communicate() if len(stderr_results) == 0: processors = int(stdout_results) # # Now, spin up one thread per processor which will eventually mean one test # per processor running concurrently. # for i in range(processors): thread = worker_thread(input_queue, output_queue) threads.append(thread) thread.start() # # Keep track of some summary statistics # total_tests = 0 skipped_tests = 0 # # We now have worker threads spun up, and a list of work to do. So, run # through the list of test suites and dispatch a job to run each one. # # Dispatching will run with unlimited speed and the worker threads will # execute as fast as possible from the queue. # # Note that we actually dispatch tests to be skipped, so all of the # PASS, FAIL, CRASH and SKIP processing is done in the same place. # for test in suite_list: test = test.strip() if len(test): job = Job() job.set_is_example(False) job.set_is_pyexample(False) job.set_display_name(test) job.set_tmp_file_name(os.path.join(testpy_output_dir, "%s.xml" % test)) job.set_cwd(os.getcwd()) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) if (options.multiple): multiple = " --multiple" else: multiple = "" path_cmd = os.path.join("utils", "test-runner --suite=%s%s" % (test, multiple)) job.set_shell_command(path_cmd) if options.valgrind and test in core_valgrind_skip_tests: job.set_is_skip(True) if options.verbose: print "Queue %s" % test input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 # # We've taken care of the discovered or specified test suites. Now we # have to deal with examples run as smoke tests. We have a list of all of # the example programs it makes sense to try and run. Each example will # have a condition associated with it that must evaluate to true for us # to try and execute it. This is used to determine if the example has # a dependency that is not satisfied. For example, if an example depends # on NSC being configured by waf, that example should have a condition # that evaluates to true if NSC is enabled. For example, # # ("tcp-nsc-zoo", "ENABLE_NSC == True"), # # In this case, the example "tcp-nsc-zoo" will only be run if we find the # waf configuration variable "ENABLE_NSC" to be True. # # We don't care at all how the trace files come out, so we just write them # to a single temporary directory. # # XXX As it stands, all of the trace files have unique names, and so file # collisions can only happen if two instances of an example are running in # two versions of the test.py process concurrently. We may want to create # uniquely named temporary traces directories to avoid this problem. # # We need to figure out what examples to execute. We are either given one # suite or example explicitly via the --suite or --example option, or we # need to walk the list of examples looking for available example # conditions. # # This translates into allowing the following options with respect to the # suites # # ./test,py: run all of the examples # ./test.py --constrain=unit run no examples # ./test.py --constrain=example run all of the examples # ./test.py --suite=some-test-suite: run no examples # ./test.py --example=some-example: run the single example # ./test.py --suite=some-suite --example=some-example: run the single example # # XXX could use constrain to separate out examples used for performance # testing # if len(options.suite) == 0 and len(options.example) == 0 and len(options.pyexample) == 0: if len(options.constrain) == 0 or options.constrain == "example": if ENABLE_EXAMPLES: for test, do_run, do_valgrind_run in example_tests: if eval(do_run): job = Job() job.set_is_example(True) job.set_is_pyexample(False) job.set_display_name(test) job.set_tmp_file_name("") job.set_cwd(testpy_output_dir) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) job.set_shell_command("examples/%s" % test) if options.valgrind and not eval(do_valgrind_run): job.set_is_skip (True) if options.verbose: print "Queue %s" % test input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 elif len(options.example): # # If you tell me to run an example, I will try and run the example # irrespective of any condition. # job = Job() job.set_is_example(True) job.set_is_pyexample(False) job.set_display_name(options.example) job.set_tmp_file_name("") job.set_cwd(testpy_output_dir) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) job.set_shell_command("examples/%s" % options.example) if options.verbose: print "Queue %s" % options.example input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 # # Run some Python examples as smoke tests. We have a list of all of # the example programs it makes sense to try and run. Each example will # have a condition associated with it that must evaluate to true for us # to try and execute it. This is used to determine if the example has # a dependency that is not satisfied. # # We don't care at all how the trace files come out, so we just write them # to a single temporary directory. # # We need to figure out what python examples to execute. We are either # given one pyexample explicitly via the --pyexample option, or we # need to walk the list of python examples # # This translates into allowing the following options with respect to the # suites # # ./test.py --constrain=pyexample run all of the python examples # ./test.py --pyexample=some-example.py: run the single python example # if len(options.suite) == 0 and len(options.example) == 0 and len(options.pyexample) == 0: if len(options.constrain) == 0 or options.constrain == "pyexample": if ENABLE_EXAMPLES: for test, do_run in python_tests: if eval(do_run): job = Job() job.set_is_example(False) job.set_is_pyexample(True) job.set_display_name(test) job.set_tmp_file_name("") job.set_cwd(testpy_output_dir) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) job.set_shell_command("examples/%s" % test) if options.valgrind and not eval(do_valgrind_run): job.set_is_skip (True) if options.verbose: print "Queue %s" % test input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 elif len(options.pyexample): # # If you tell me to run a python example, I will try and run the example # irrespective of any condition. # job = Job() job.set_is_pyexample(True) job.set_display_name(options.pyexample) job.set_tmp_file_name("") job.set_cwd(testpy_output_dir) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) job.set_shell_command("examples/%s" % options.pyexample) if options.verbose: print "Queue %s" % options.pyexample input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 # # Tell the worker threads to pack up and go home for the day. Each one # will exit when they see their is_break task. # for i in range(processors): job = Job() job.set_is_break(True) input_queue.put(job) # # Now all of the tests have been dispatched, so all we have to do here # in the main thread is to wait for them to complete. Keyboard interrupt # handling is broken as mentioned above. We use a signal handler to catch # sigint and set a global variable. When the worker threads sense this # they stop doing real work and will just start throwing jobs back at us # with is_break set to True. In this case, there are no real results so we # ignore them. If there are real results, we always print PASS or FAIL to # standard out as a quick indication of what happened. # passed_tests = 0 failed_tests = 0 crashed_tests = 0 valgrind_errors = 0 for i in range(jobs): job = output_queue.get() if job.is_break: continue if job.is_example: kind = "Example" elif job.is_pyexample: kind = "PythonExample" else: kind = "TestSuite" if job.is_skip: status = "SKIP" skipped_tests = skipped_tests + 1 else: if job.returncode == 0: status = "PASS" passed_tests = passed_tests + 1 elif job.returncode == 1: failed_tests = failed_tests + 1 status = "FAIL" elif job.returncode == 2: valgrind_errors = valgrind_errors + 1 status = "VALGR" else: crashed_tests = crashed_tests + 1 status = "CRASH" print "%s: %s %s" % (status, kind, job.display_name) if job.is_example or job.is_pyexample: # # Examples are the odd man out here. They are written without any # knowledge that they are going to be run as a test, so we need to # cook up some kind of output for them. We're writing an xml file, # so we do some simple XML that says we ran the example. # # XXX We could add some timing information to the examples, i.e. run # them through time and print the results here. # f = open(xml_results_file, 'a') f.write('<Example>\n') example_name = " <Name>%s</Name>\n" % job.display_name f.write(example_name) if status == "PASS": f.write(' <Result>PASS</Result>\n') elif status == "FAIL": f.write(' <Result>FAIL</Result>\n') elif status == "VALGR": f.write(' <Result>VALGR</Result>\n') elif status == "SKIP": f.write(' <Result>SKIP</Result>\n') else: f.write(' <Result>CRASH</Result>\n') f.write(' <ElapsedTime>%.3f</ElapsedTime>\n' % job.elapsed_time) f.write('</Example>\n') f.close() else: # # If we're not running an example, we're running a test suite. # These puppies are running concurrently and generating output # that was written to a temporary file to avoid collisions. # # Now that we are executing sequentially in the main thread, we can # concatenate the contents of the associated temp file to the main # results file and remove that temp file. # # One thing to consider is that a test suite can crash just as # well as any other program, so we need to deal with that # possibility as well. If it ran correctly it will return 0 # if it passed, or 1 if it failed. In this case, we can count # on the results file it saved being complete. If it crashed, it # will return some other code, and the file should be considered # corrupt and useless. If the suite didn't create any XML, then # we're going to have to do it ourselves. # # Another issue is how to deal with a valgrind error. If we run # a test suite under valgrind and it passes, we will get a return # code of 0 and there will be a valid xml results file since the code # ran to completion. If we get a return code of 1 under valgrind, # the test case failed, but valgrind did not find any problems so the # test case return code was passed through. We will have a valid xml # results file here as well since the test suite ran. If we see a # return code of 2, this means that valgrind found an error (we asked # it to return 2 if it found a problem in run_job_synchronously) but # the suite ran to completion so there is a valid xml results file. # If the suite crashes under valgrind we will see some other error # return code (like 139). If valgrind finds an illegal instruction or # some other strange problem, it will die with its own strange return # code (like 132). However, if the test crashes by itself, not under # valgrind we will also see some other return code. # # If the return code is 0, 1, or 2, we have a valid xml file. If we # get another return code, we have no xml and we can't really say what # happened -- maybe the TestSuite crashed, maybe valgrind crashed due # to an illegal instruction. If we get something beside 0-2, we assume # a crash and fake up an xml entry. After this is all done, we still # need to indicate a valgrind error somehow, so we fake up an xml entry # with a VALGR result. Thus, in the case of a working TestSuite that # fails valgrind, we'll see the PASS entry for the working TestSuite # followed by a VALGR failing test suite of the same name. # if job.is_skip: f = open(xml_results_file, 'a') f.write("<TestSuite>\n") f.write(" <SuiteName>%s</SuiteName>\n" % job.display_name) f.write(' <SuiteResult>SKIP</SuiteResult>\n') f.write(' <SuiteTime>Execution times not available</SuiteTime>\n') f.write("</TestSuite>\n") f.close() else: if job.returncode == 0 or job.returncode == 1 or job.returncode == 2: f_to = open(xml_results_file, 'a') f_from = open(job.tmp_file_name) f_to.write(f_from.read()) f_to.close() f_from.close() else: f = open(xml_results_file, 'a') f.write("<TestSuite>\n") f.write(" <SuiteName>%s</SuiteName>\n" % job.display_name) f.write(' <SuiteResult>CRASH</SuiteResult>\n') f.write(' <SuiteTime>Execution times not available</SuiteTime>\n') f.write("</TestSuite>\n") f.close() if job.returncode == 2: f = open(xml_results_file, 'a') f.write("<TestSuite>\n") f.write(" <SuiteName>%s</SuiteName>\n" % job.display_name) f.write(' <SuiteResult>VALGR</SuiteResult>\n') f.write(' <SuiteTime>Execution times not available</SuiteTime>\n') f.write("</TestSuite>\n") f.close() # # We have all of the tests run and the results written out. One final # bit of housekeeping is to wait for all of the threads to close down # so we can exit gracefully. # for thread in threads: thread.join() # # Back at the beginning of time, we started the body of an XML document # since the test suites and examples were going to just write their # individual pieces. So, we need to finish off and close out the XML # document # f = open(xml_results_file, 'a') f.write('</TestResults>\n') f.close() # # Print a quick summary of events # print "%d of %d tests passed (%d passed, %d skipped, %d failed, %d crashed, %d valgrind errors)" % (passed_tests, total_tests, passed_tests, skipped_tests, failed_tests, crashed_tests, valgrind_errors) # # The last things to do are to translate the XML results file to "human # readable form" if the user asked for it (or make an XML file somewhere) # if len(options.html): translate_to_html(xml_results_file, options.html) if len(options.text): translate_to_text(xml_results_file, options.text) if len(options.xml): shutil.copyfile(xml_results_file, options.xml) # # If we have been asked to retain all of the little temporary files, we # don't delete tm. If we do delete the temporary files, delete only the # directory we just created. We don't want to happily delete any retained # directories, which will probably surprise the user. # if not options.retain: shutil.rmtree(testpy_output_dir) if passed_tests + skipped_tests == total_tests: return 0 # success else: return 1 # catchall for general errors
3b1b272bb1c3237a1f16270589eb6b66a463624c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7746/3b1b272bb1c3237a1f16270589eb6b66a463624c/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 13332, 468, 468, 1939, 24103, 358, 1221, 3071, 716, 7756, 353, 6650, 16, 4351, 471, 5695, 358, 1960, 468, 3308, 732, 854, 8122, 268, 1673, 486, 358, 18, 225, 1660, 2545,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 13332, 468, 468, 1939, 24103, 358, 1221, 3071, 716, 7756, 353, 6650, 16, 4351, 471, 5695, 358, 1960, 468, 3308, 732, 854, 8122, 268, 1673, 486, 358, 18, 225, 1660, 2545,...
def search(self, cr, user, args, offset=0, limit=None, order=None,
def search(self, cr, uid, args, offset=0, limit=None, order=None,
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): if context and context.has_key('user_prefence') and context['user_prefence']: cmp_ids = [] data_user = self.pool.get('res.users').browse(cr, user, [user], context=context) map(lambda x: cmp_ids.append(x.id), data_user[0].company_ids) return [data_user[0].company_id.id] + cmp_ids return super(res_company, self).search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
60f1981def2ffbdfc6ac94e8b0a1cd4dba2161da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/60f1981def2ffbdfc6ac94e8b0a1cd4dba2161da/res_company.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 4555, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 309, 819, 471, 819, 18, 5332, 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, 1623, 12, 2890, 16, 4422, 16, 4555, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 309, 819, 471, 819, 18, 5332, 67...
if self.scheme == 'http': conn = httplib.HTTPConnection(self.host) elif self.scheme == 'https': conn = httplib.HTTPSConnection(self.host)
conn = self.getConnection()
def resolveRedirect(self, useHEAD = True): ''' Requests the header from the server. If the page is an HTTP redirect, returns the redirect target URL as a string. Otherwise returns None. If useHEAD is true, uses the HTTP HEAD method, which saves bandwidth by not downloading the body. Otherwise, the HTTP GET method is used. ''' if self.scheme == 'http': conn = httplib.HTTPConnection(self.host) elif self.scheme == 'https': conn = httplib.HTTPSConnection(self.host) try: if useHEAD: conn.request('HEAD', '%s%s' % (self.path, self.query), None, self.header) else: conn.request('GET', '%s%s' % (self.path, self.query), None, self.header) response = conn.getresponse() except httplib.BadStatusLine: # Some servers don't seem to handle HEAD requests properly, # e.g. http://www.radiorus.ru/ which is running on a very old # Apache server. Using GET instead works on these (but it uses # more bandwidth). return self.resolveRedirect(useHEAD = False) if response.status >= 300 and response.status <= 399: #print response.getheaders() redirTarget = response.getheader('Location') #print "redirTarget:", redirTarget if redirTarget: if redirTarget.startswith('http://') or redirTarget.startswith('https://'): self.changeUrl(redirTarget) return True elif redirTarget.startswith('/'): self.changeUrl('%s://%s%s' % (self.protocol, self.host, redirTarget)) return True else: # redirect to relative position # cut off filename directory = self.path[:self.path.rindex('/') + 1] # handle redirect to parent directory while redirTarget.startswith('../'): redirTarget = redirTarget[3:] # change /foo/bar/ to /foo/ directory = directory[:-1] directory = directory[:directory.rindex('/') + 1] self.changeUrl('%s://%s%s%s' % (self.protocol, self.host, directory, redirTarget)) return True else: return False # not a redirect
763214c6cb28ef1d9c4d9f0ee9688cb0e493675c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/763214c6cb28ef1d9c4d9f0ee9688cb0e493675c/weblinkchecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 5961, 12, 2890, 16, 999, 12458, 273, 1053, 4672, 9163, 7090, 326, 1446, 628, 326, 1438, 18, 971, 326, 1363, 353, 392, 2239, 3136, 16, 1135, 326, 3136, 1018, 1976, 487, 279, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 5961, 12, 2890, 16, 999, 12458, 273, 1053, 4672, 9163, 7090, 326, 1446, 628, 326, 1438, 18, 971, 326, 1363, 353, 392, 2239, 3136, 16, 1135, 326, 3136, 1018, 1976, 487, 279, 533, ...
def __str__(self): n = _color2name(self) return n and ('%r ie %s' % (self,n)) or repr(self)
def __repr__(self): return "Color(%s)" % fp_str(*(self.red, self.green, self.blue,self.alpha)).replace(' ',',')
2aa51291cdd7348e1b256d2be8f78af88d7dd7ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3878/2aa51291cdd7348e1b256d2be8f78af88d7dd7ad/colors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 315, 2957, 9275, 87, 2225, 738, 4253, 67, 701, 12, 21556, 2890, 18, 1118, 16, 365, 18, 11571, 16, 365, 18, 14081, 16, 2890, 18, 5429, 13, 2934, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 12715, 972, 12, 2890, 4672, 327, 315, 2957, 9275, 87, 2225, 738, 4253, 67, 701, 12, 21556, 2890, 18, 1118, 16, 365, 18, 11571, 16, 365, 18, 14081, 16, 2890, 18, 5429, 13, 2934, ...
form.AddItem('<hr>')
form.AddItem('<hr>')
def show_results(mlist, doc, category, category_suffix, cgidata): # Produce the results page adminurl = mlist.GetScriptURL('admin') categories = mlist.GetConfigCategories() label = _(categories[category][0]) # Set up the document's headers realname = mlist.real_name doc.SetTitle(_('%(realname)s Administration (%(label)s)')) doc.AddItem(Center(Header(2, _( '%(realname)s mailing list administration<br>%(label)s Section')))) doc.AddItem('<hr>') # This holds the two columns of links linktable = Table(valign='top', width='100%') linktable.AddRow([Center(Bold(_("Configuration Categories"))), Center(Bold(_("Other Administrative Activities")))]) linktable.AddCellInfo(linktable.GetCurrentRowIndex(), 0, colspan=2) # The `other links' are stuff in the right column. otherlinks = UnorderedList() otherlinks.AddItem(Link(mlist.GetScriptURL('admindb'), _('Tend to pending moderator requests'))) otherlinks.AddItem(Link(mlist.GetScriptURL('listinfo'), _('Go to the general list information page'))) otherlinks.AddItem(Link(mlist.GetScriptURL('edithtml'), _('Edit the public HTML pages'))) otherlinks.AddItem(Link(mlist.GetBaseArchiveURL(), _('Go to list archives')).Format() + '<br>&nbsp;<br>') if mm_cfg.OWNERS_CAN_DELETE_THEIR_OWN_LISTS: otherlinks.AddItem(Link(mlist.GetScriptURL('rmlist'), _('Delete this mailing list')).Format() + _(' (requires confirmation)<br>&nbsp;<br>')) otherlinks.AddItem(Link('%s/logout' % adminurl, # BAW: What I really want is a blank line, but # adding an &nbsp; won't do it because of the # bullet added to the list item. '<FONT SIZE="+2"><b>%s</b></FONT>' % _('Logout'))) # These are links to other categories and live in the left column categorylinks_1 = categorylinks = UnorderedList() categorylinks_2 = '' categorykeys = categories.keys() half = len(categorykeys) / 2 counter = 0 for k in categorykeys: label = _(categories[k][0]) url = '%s/%s' % (adminurl, k) if k == category: # Handle subcategories subcats = mlist.GetConfigSubCategories(k) if subcats: subcat = Utils.GetPathPieces()[-1] for k, v in subcats: if k == subcat: break else: # The first subcategory in the list is the default subcat = subcats[0][0] subcat_items = [] for sub, text in subcats: if sub == subcat: text = Bold('[%s]' % text).Format() subcat_items.append(Link(url + '/' + sub, text)) categorylinks.AddItem( Bold(label).Format() + UnorderedList(*subcat_items).Format()) else: categorylinks.AddItem(Link(url, Bold('[%s]' % label))) else: categorylinks.AddItem(Link(url, label)) counter += 1 if counter > half: categorylinks_2 = categorylinks = UnorderedList() counter = -len(categorykeys) # Add all the links to the links table... linktable.AddRow([categorylinks_1, categorylinks_2, otherlinks]) linktable.AddRowInfo(linktable.GetCurrentRowIndex(), valign='top') # ...and add the links table to the document. doc.AddItem(linktable) doc.AddItem('<hr>') # Now we need to craft the form that will be submitted, which will contain # all the variable settings, etc. This is a bit of a kludge because we # know that the autoreply and members categories supports file uploads. if category_suffix: encoding = None if category_suffix in ('autoreply', 'members'): # These have file uploads encoding = 'multipart/form-data' form = Form('%s/%s' % (adminurl, category_suffix), encoding=encoding) else: form = Form(adminurl) # The general category supports changing the password. if category == 'general': andpassmsg = _(' (You can change your password there, too.)') else: andpassmsg = '' form.AddItem( _('''Make your changes in the following section, then submit them using the <em>Submit Your Changes</em> button below.''') + andpassmsg + '<p>') if category == 'members': # Figure out which subcategory we should display subcat = Utils.GetPathPieces()[-1] if subcat not in ('list', 'add', 'remove'): subcat = 'list' # Add member category specific tables form.AddItem(membership_options(mlist, subcat, cgidata, doc, form)) form.AddItem(Center(submit_button())) form.AddItem('<hr>') # In "list" subcategory, we can also search for members if subcat == 'list': form.AddItem(_('''Find members by <a href="http://www.python.org/doc/current/lib/re-syntax.html">Python regular expression</a>:''')) form.AddItem(TextBox('findmember', value=cgidata.getvalue('findmember', ''), size='50%')) form.AddItem(SubmitButton('findmember_btn', _('Search...'))) form.AddItem('<hr>') else: form.AddItem(show_variables(mlist, category, cgidata, doc)) if category == 'general': form.AddItem(Center(password_inputs())) form.AddItem(Center(submit_button())) form.AddItem('<hr>') # And add the form doc.AddItem(form) doc.AddItem(linktable) doc.AddItem(mlist.GetMailmanFooter())
b969c06333609c7b8e91fddefcd917749ee90d0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/b969c06333609c7b8e91fddefcd917749ee90d0b/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4717, 12, 781, 376, 16, 997, 16, 3150, 16, 3150, 67, 8477, 16, 14947, 350, 396, 4672, 468, 23278, 326, 1686, 1363, 3981, 718, 273, 312, 1098, 18, 967, 3651, 1785, 2668, 3666,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4717, 12, 781, 376, 16, 997, 16, 3150, 16, 3150, 67, 8477, 16, 14947, 350, 396, 4672, 468, 23278, 326, 1686, 1363, 3981, 718, 273, 312, 1098, 18, 967, 3651, 1785, 2668, 3666,...
self.face = "times" self.size = 10
self.face = style.fontName self.size = style.fontSize
def __init__(self, style, parsedText=None, bulletText=None, state=None, context=None, baseindent=0): #print id(self), "para", parsedText self.baseindent = baseindent if context is None: context = defaultContext() self.context = context self.parsedText = parsedText self.bulletText = bulletText self.style1 = style # make sure Flowable doesn't use this unless wanted! call it style1 NOT style #self.spaceBefore = self.spaceAfter = 0 self.program = [] # program before layout self.formattedProgram = [] # after layout self.remainder = None # follow on paragraph if any self.state = state # initial formatting state (for completions) if not state: self.spaceBefore = style.spaceBefore self.spaceAfter = style.spaceAfter #self.spaceBefore = "invalid value" #if hasattr(self, "spaceBefore") and debug: # print "spaceBefore is", self.spaceBefore, self.parsedText self.bold = 0 self.italic = 0 self.face = "times" self.size = 10
041e2d265f4d145658b08edc02ff501d425029d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/041e2d265f4d145658b08edc02ff501d425029d6/para.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2154, 16, 2707, 1528, 33, 7036, 16, 31650, 1528, 33, 7036, 16, 919, 33, 7036, 16, 819, 33, 7036, 16, 1026, 9355, 33, 20, 4672, 468, 1188, 612, 12, 2890...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2154, 16, 2707, 1528, 33, 7036, 16, 31650, 1528, 33, 7036, 16, 919, 33, 7036, 16, 819, 33, 7036, 16, 1026, 9355, 33, 20, 4672, 468, 1188, 612, 12, 2890...
Search.__init__(self, api_key, api_secret, session_key)
_Search.__init__(self, api_key, api_secret, session_key)
def __init__(self, artist_name, api_key, api_secret, session_key): Search.__init__(self, api_key, api_secret, session_key) self._artist_name = artist_name
903c9b1622fe56617e5099f20abdc69f2090f8e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/903c9b1622fe56617e5099f20abdc69f2090f8e0/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 15469, 67, 529, 16, 1536, 67, 856, 16, 1536, 67, 5875, 16, 1339, 67, 856, 4672, 389, 2979, 16186, 2738, 972, 12, 2890, 16, 1536, 67, 856, 16, 1536, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 15469, 67, 529, 16, 1536, 67, 856, 16, 1536, 67, 5875, 16, 1339, 67, 856, 4672, 389, 2979, 16186, 2738, 972, 12, 2890, 16, 1536, 67, 856, 16, 1536, 67,...
ScrolledList.__init__(self, master, width=80)
if macosxSupport.runningAsOSXApp(): ScrolledList.__init__(self, master) else: ScrolledList.__init__(self, master, width=80)
def __init__(self, master, flist, gui): ScrolledList.__init__(self, master, width=80) self.flist = flist self.gui = gui self.stack = []
22dbc52762f42f1933a8521bbe579476f5887f0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/22dbc52762f42f1933a8521bbe579476f5887f0d/Debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 284, 1098, 16, 13238, 4672, 309, 5318, 538, 92, 6289, 18, 8704, 1463, 4618, 60, 3371, 13332, 565, 2850, 25054, 682, 16186, 2738, 972, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 284, 1098, 16, 13238, 4672, 309, 5318, 538, 92, 6289, 18, 8704, 1463, 4618, 60, 3371, 13332, 565, 2850, 25054, 682, 16186, 2738, 972, 12, 2890, ...
_fl_initial_wingeometry = cfuncproto(so_libforms, "fl_initial_wingeometry", None, [FL_Coord, FL_Coord, FL_Coord, FL_Coord], """void fl_initial_wingeometry(FL_Coord x, FL_Coord y,
_fl_initial_wingeometry = cfuncproto(so_libforms, "fl_initial_wingeometry", None, [FL_Coord, FL_Coord, FL_Coord, FL_Coord], """void fl_initial_wingeometry(FL_Coord x, FL_Coord y,
def fl_wingeometry(x, y, w, h): """ fl_wingeometry(x, y, w, h) """ _fl_wingeometry(x, y, w, h)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 91, 310, 3586, 12, 92, 16, 677, 16, 341, 16, 366, 4672, 3536, 1183, 67, 91, 310, 3586, 12, 92, 16, 677, 16, 341, 16, 366, 13, 3536, 225, 389, 2242, 67, 91, 310, 3586, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 67, 91, 310, 3586, 12, 92, 16, 677, 16, 341, 16, 366, 4672, 3536, 1183, 67, 91, 310, 3586, 12, 92, 16, 677, 16, 341, 16, 366, 13, 3536, 225, 389, 2242, 67, 91, 310, 3586, 1...
rowIdx = 0
rowIdx = 0
def draw(self): # normalize slice data g = Group()
5130e273e1910e8bcd7f7573c7c822ebaec823fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/5130e273e1910e8bcd7f7573c7c822ebaec823fb/spider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 468, 3883, 2788, 501, 314, 273, 3756, 1435, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 468, 3883, 2788, 501, 314, 273, 3756, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
elif compiler == "gcc" or compiler == "g++":
elif compiler[:3] == "gcc" or compiler[:3] == "g++":
def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php # ?func=detail&aid=445902&group_id=5470&atid=105470 # Linkers on different platforms need different options to # specify that directories need to be added to the list of # directories searched for dependencies when a dynamic library # is sought. GCC has to be told to pass the -R option through # to the linker, whereas other compilers just know this. # Other compilers may need something slightly different. At # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so # we use this hack. compiler = os.path.basename(sysconfig.get_config_var("CC")) if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif compiler == "gcc" or compiler == "g++": return "-Wl,-R" + dir else: return "-R" + dir
b2b4a971a32bc5d3080812f59fa731e468696290 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b2b4a971a32bc5d3080812f59fa731e468696290/unixccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3099, 67, 12083, 67, 1214, 67, 3482, 12, 2890, 16, 1577, 4672, 468, 11329, 670, 484, 1468, 16, 622, 326, 8572, 4520, 18, 225, 2164, 6600, 7934, 468, 6334, 6162, 3103, 30, 468, 1062, 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, 3099, 67, 12083, 67, 1214, 67, 3482, 12, 2890, 16, 1577, 4672, 468, 11329, 670, 484, 1468, 16, 622, 326, 8572, 4520, 18, 225, 2164, 6600, 7934, 468, 6334, 6162, 3103, 30, 468, 1062, 22...
if plone.startswith("3.0"):
if plone.startswith("3."):
def pre(self, command, output_dir, vars): plone=vars["plone"] if plone.startswith("3.0"): vars["plone_recipe"]="plone.recipe.plone" vars["plone_recipe_version"]=plone else: vars["plone_recipe"]="plone.recipe.plone25install" vars["plone_url"]=plone25s[plone]
672d9278e2d3930cffd00998ddff401bf4047689 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11358/672d9278e2d3930cffd00998ddff401bf4047689/hosting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 12, 2890, 16, 1296, 16, 876, 67, 1214, 16, 4153, 4672, 886, 476, 33, 4699, 9614, 412, 476, 11929, 309, 886, 476, 18, 17514, 1918, 2932, 23, 1199, 4672, 4153, 9614, 412, 476, 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, 675, 12, 2890, 16, 1296, 16, 876, 67, 1214, 16, 4153, 4672, 886, 476, 33, 4699, 9614, 412, 476, 11929, 309, 886, 476, 18, 17514, 1918, 2932, 23, 1199, 4672, 4153, 9614, 412, 476, 67, ...
res = storageElement.getFile(pfn,fileSizes[lfn])
res = storageElement.getFile(pfn)
def getFile(self,lfn): """ Get a local copy of a LFN from Storage Elements.
74e26f2e5fa7c9a5822e4921d00ea0c54f2378a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/74e26f2e5fa7c9a5822e4921d00ea0c54f2378a5/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 12, 2890, 16, 80, 4293, 4672, 3536, 968, 279, 1191, 1610, 434, 279, 18803, 50, 628, 5235, 17219, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 12, 2890, 16, 80, 4293, 4672, 3536, 968, 279, 1191, 1610, 434, 279, 18803, 50, 628, 5235, 17219, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if not grid_id: raise except_osv('No grid avaible !', 'No grid matching for this carrier !')
if not grid_id: raise wizard.except_wizard('No grid avaible !', 'No grid matching for this carrier !')
def _delivery_set(self, cr, uid, data, context): order_obj = pooler.get_pool(cr.dbname).get('sale.order') line_obj = pooler.get_pool(cr.dbname).get('sale.order.line') order_objs = order_obj.browse(cr, uid, data['ids'], context) for order in order_objs: grid_id = pooler.get_pool(cr.dbname).get('delivery.carrier').grid_get(cr, uid, [data['form']['carrier_id']],order.partner_shipping_id.id) if not grid_id: raise except_osv('No grid avaible !', 'No grid matching for this carrier !') grid = pooler.get_pool(cr.dbname).get('delivery.grid').browse(cr, uid, [grid_id])[0] line_obj.create(cr, uid, { 'order_id': order.id, 'name': grid.carrier_id.name, 'product_uom_qty': 1, 'product_uom': grid.carrier_id.product_id.uom_id.id, 'product_id': grid.carrier_id.product_id.id, 'price_unit': grid.get_price(cr, uid, grid.id, order, time.strftime('%Y-%m-%d'), context), 'tax_id': [(6,0,[ x.id for x in grid.carrier_id.product_id.taxes_id])], 'type': 'make_to_stock' }) return {}
8bd47e7d613c6327c92093de3c65fbda06c28770 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/8bd47e7d613c6327c92093de3c65fbda06c28770/delivery_sale_order.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15703, 67, 542, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1353, 67, 2603, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 87, 5349, 18, 1019...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15703, 67, 542, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1353, 67, 2603, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 87, 5349, 18, 1019...
return S_ERROR('Implement me')
return S_OK(resDict)
def readLink(self,link): if type(link) == types.StringType: links = [link] elif type(link) == types.ListType: links = link else: return S_ERROR('LFCClient.removeLink: Must supply a link list of link') # If we have less than three lfns to query a session doesn't make sense if len(links) > 2: self.__openSession() failed = {} successful = {} for link in links: fullLink = '%s%s' % (self.prefix,link) """ The next six lines of code should be hung, drawn and quartered """ strBuff = '' for i in range(256): strBuff+=' ' value = lfc.lfc_readlink(fullLink,strBuff,256) if value == 0: successful[link] = a.replace('\x00','').strip().replace(self.prefix,'') else: errno = lfc.cvar.serrno failed[link] = lfc.sstrerror(errno) if self.session: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_ERROR('Implement me')
95f2ea774520863ead2cd9f2cf913232cd97cf6b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/95f2ea774520863ead2cd9f2cf913232cd97cf6b/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2098, 12, 2890, 16, 1232, 4672, 309, 618, 12, 1232, 13, 422, 1953, 18, 780, 559, 30, 4716, 273, 306, 1232, 65, 1327, 618, 12, 1232, 13, 422, 1953, 18, 19366, 30, 4716, 273, 1692...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2098, 12, 2890, 16, 1232, 4672, 309, 618, 12, 1232, 13, 422, 1953, 18, 780, 559, 30, 4716, 273, 306, 1232, 65, 1327, 618, 12, 1232, 13, 422, 1953, 18, 19366, 30, 4716, 273, 1692...
max=-1, request_queue_size=5, timeout=10):
max=-1, request_queue_size=5, timeout=10, shutdown_timeout=5):
def __init__(self, bind_addr, wsgi_app, numthreads=10, server_name=None, max=-1, request_queue_size=5, timeout=10): self.requests = Queue.Queue(max) if callable(wsgi_app): # We've been handed a single wsgi_app, in CP-2.1 style. # Assume it's mounted at "". self.mount_points = [("", wsgi_app)] else: # We've been handed a list of (mount_point, wsgi_app) tuples, # so that the server can call different wsgi_apps, and also # correctly set SCRIPT_NAME. self.mount_points = wsgi_app self.mount_points.sort() self.mount_points.reverse() self.bind_addr = bind_addr self.numthreads = numthreads or 1 if not server_name: server_name = socket.gethostname() self.server_name = server_name self.request_queue_size = request_queue_size self._workerThreads = [] self.timeout = timeout
c1b60ffa36125d073b6d7cc572a61908146aa23d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/82/c1b60ffa36125d073b6d7cc572a61908146aa23d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1993, 67, 4793, 16, 341, 17537, 67, 2910, 16, 818, 12495, 33, 2163, 16, 1438, 67, 529, 33, 7036, 16, 943, 29711, 21, 16, 590, 67, 4000, 67, 1467, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1993, 67, 4793, 16, 341, 17537, 67, 2910, 16, 818, 12495, 33, 2163, 16, 1438, 67, 529, 33, 7036, 16, 943, 29711, 21, 16, 590, 67, 4000, 67, 1467, 33, ...
targets = set(value for value, label in settings.TARGET_LANGUAGES)
targets = set(value for value, label in CHOICES_TARGET_LANGUAGES)
def missing(content_object): ''' returns missing translation codes for a content object''' targets = set(value for value, label in settings.TARGET_LANGUAGES) done = set(t.language for t in content_object.translations.all()) return targets-done
92792e9ea7c9f4ef09beda76f0a430df00980d15 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12441/92792e9ea7c9f4ef09beda76f0a430df00980d15/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3315, 12, 1745, 67, 1612, 4672, 9163, 1135, 3315, 4794, 6198, 364, 279, 913, 733, 26418, 5774, 273, 444, 12, 1132, 364, 460, 16, 1433, 316, 6469, 51, 11774, 55, 67, 16374, 67, 15547, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3315, 12, 1745, 67, 1612, 4672, 9163, 1135, 3315, 4794, 6198, 364, 279, 913, 733, 26418, 5774, 273, 444, 12, 1132, 364, 460, 16, 1433, 316, 6469, 51, 11774, 55, 67, 16374, 67, 15547, 5...
exception_string = efile.getvalue() if not isinstance(exception_string, unicode): exception_string = exception_string.decode('utf8', 'replace')
exception_string = u''.join(unicodify(s) for s in efile.buflist)
def execute(self, source): """ Get the source code to execute (a unicode string). Compile it. If there was a syntax error, return (False, (msg, line, col)). If compilation was successful, return (True, None), then run the code and then send (is_success, res_no, res_str, exception_string, rem_stdin). is_success - True if there was no exception. res_no - number of the result in the history count, or None if there was no result or there's no history. res_str - a string representation of the result. exception_string - description of the exception, or None if is_success. rem_stdin - data that was sent into stdin and wasn't consumed. """ if ast: success, r = self.compile_ast(source) else: success, r = self.compile_no_ast(source) if not success: yield False, r return else: yield True, None codeobs = r self.last_res = None try: # Execute for codeob in codeobs: exec codeob in self.locs # Work around http://bugs.python.org/issue8213 - stdout buffered # in Python 3. sys.stdout.flush() sys.stderr.flush() # Convert the result to a string. This is here because exceptions # may be raised here. if self.last_res is not None: if self.is_pprint: res_str = unicode(pprint.pformat(self.last_res)) else: res_str = unicode(repr(self.last_res)) else: res_str = None except (Exception, KeyboardInterrupt): sys.stdout.flush() linecache.checkcache() efile = StringIO() typ, val, tb = excinfo = sys.exc_info() sys.last_type, sys.last_value, sys.last_traceback = excinfo tbe = traceback.extract_tb(tb) if tbe[-1][0] != __file__: # If the last entry is from this file, don't remove # anything. Otherwise, remove lines before the current # frame. for i in xrange(len(tbe)-2, -1, -1): if tbe[i][0] == __file__: tbe = tbe[i+1:] break print>>efile, 'Traceback (most recent call last):' traceback.print_list(tbe, file=efile) lines = traceback.format_exception_only(typ, val) for line in lines: print>>efile, line, is_success = False exception_string = efile.getvalue() if not isinstance(exception_string, unicode): exception_string = exception_string.decode('utf8', 'replace') res_no = None res_str = None else: is_success = True exception_string = None if self.last_res is not None: res_no = self.store_in_reshist(self.last_res) else: res_no = None # Discard the reference to the result self.last_res = None # Send back any data left on stdin. rem_stdin = [] if sys.platform == 'linux2': while select([sys.stdin], [], [], 0)[0]: r = os.read(sys.stdin.fileno(), 8192) if not r: # File may be in error state break rem_stdin.append(r) elif sys.platform == 'win32': fd = sys.stdin.fileno() handle = get_osfhandle(fd) avail = c_ulong(0) PeekNamedPipe(handle, None, 0, None, byref(avail), None) nAvail = avail.value if nAvail > 0: rem_stdin.append(os.read(fd, nAvail)) else: # I don't know how to do this in Jython. pass
6e14868e1c4403ba9b5ff6b3ea6014f5f8011072 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10932/6e14868e1c4403ba9b5ff6b3ea6014f5f8011072/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1084, 4672, 3536, 968, 326, 1084, 981, 358, 1836, 261, 69, 5252, 533, 2934, 16143, 518, 18, 971, 1915, 1703, 279, 6279, 555, 16, 327, 261, 8381, 16, 261, 3576, 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, 1836, 12, 2890, 16, 1084, 4672, 3536, 968, 326, 1084, 981, 358, 1836, 261, 69, 5252, 533, 2934, 16143, 518, 18, 971, 1915, 1703, 279, 6279, 555, 16, 327, 261, 8381, 16, 261, 3576, 16, ...
if self.parameters_dialog.run(self.parameters.translation) != gtk.RESPONSE_OK:
if self.parameters_dialog.run(self.parameters) != gtk.RESPONSE_OK:
def ask_parameters(self): cache = context.application.cache last = cache.last parent = cache.parent_of_translated_nodes if isinstance(last, Vector): b = last.children[0].translation_relative_to(parent) e = last.children[1].translation_relative_to(parent) if (b is not None) and (e is not None): self.parameters.translation = Translation(e - b) else: self.parameters = self.last_parameters() if self.parameters_dialog.run(self.parameters.translation) != gtk.RESPONSE_OK: self.parameters.clear()
b6d2f2ec087e5c98b8480ff3feaec41c4358b750 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11052/b6d2f2ec087e5c98b8480ff3feaec41c4358b750/transform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6827, 67, 3977, 12, 2890, 4672, 1247, 273, 819, 18, 3685, 18, 2493, 1142, 273, 1247, 18, 2722, 982, 273, 1247, 18, 2938, 67, 792, 67, 22899, 67, 4690, 309, 1549, 12, 2722, 16, 5589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6827, 67, 3977, 12, 2890, 4672, 1247, 273, 819, 18, 3685, 18, 2493, 1142, 273, 1247, 18, 2722, 982, 273, 1247, 18, 2938, 67, 792, 67, 22899, 67, 4690, 309, 1549, 12, 2722, 16, 5589, ...
return os.read(fd, 10)
return os.read(fd, 4192)
def getchar(): global old fd = sys.stdin.fileno() if os.isatty(fd): old = termios.tcgetattr(fd) new = termios.tcgetattr(fd) new[3] = new[3] & ~termios.ICANON & ~termios.ECHO new[6][termios.VMIN] = '\000' try: termios.tcsetattr(fd, termios.TCSADRAIN, new) if select.select([fd], [], [], None)[0]: return sys.stdin.read(10) finally: termios_restore() else: return os.read(fd, 10)
05b98ca600c16fade42a04b4bafc0a45c291d129 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3449/05b98ca600c16fade42a04b4bafc0a45c291d129/sip_publish_presence.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3001, 13332, 2552, 1592, 5194, 273, 2589, 18, 21772, 18, 7540, 5764, 1435, 309, 1140, 18, 291, 270, 4098, 12, 8313, 4672, 1592, 273, 2481, 7441, 18, 5111, 588, 1747, 12, 8313, 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, 336, 3001, 13332, 2552, 1592, 5194, 273, 2589, 18, 21772, 18, 7540, 5764, 1435, 309, 1140, 18, 291, 270, 4098, 12, 8313, 4672, 1592, 273, 2481, 7441, 18, 5111, 588, 1747, 12, 8313, 13, ...
sys.exit(*args, **kwargs)
print >>sys.stderr, 'panic:', string sys.exit(1)
def panic(*args, **kwargs): sys.exit(*args, **kwargs)
db63017232515e2c2be1a9dddc39336b0fb65a75 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7385/db63017232515e2c2be1a9dddc39336b0fb65a75/m5config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3933, 30857, 1968, 16, 2826, 4333, 4672, 1172, 1671, 9499, 18, 11241, 16, 296, 7355, 335, 30, 2187, 533, 2589, 18, 8593, 12, 21, 13, 225, 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, 3933, 30857, 1968, 16, 2826, 4333, 4672, 1172, 1671, 9499, 18, 11241, 16, 296, 7355, 335, 30, 2187, 533, 2589, 18, 8593, 12, 21, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -...
if hasattr(elev,'filled'): if allowmask: np = numpy.ma else: elev = elev.filled(0.)
if hasattr(elev,'_mask'): mask = elev._mask[:,numpy.newaxis,...] elev = elev.filled(0.)
def getNcData(self,bounds=None,allowmask=True): # Return values from cache if available. if 'z' in self.store.cachedcoords: if bounds is None: return self.store.cachedcoords[self.dimname] else: return self.store.cachedcoords[self.dimname][bounds]
35296bc8b4b1e8efa77e656fef37900d621a50b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/381/35296bc8b4b1e8efa77e656fef37900d621a50b3/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11069, 71, 751, 12, 2890, 16, 10576, 33, 7036, 16, 5965, 4455, 33, 5510, 4672, 468, 2000, 924, 628, 1247, 309, 2319, 18, 309, 296, 94, 11, 316, 365, 18, 2233, 18, 7097, 9076, 30, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11069, 71, 751, 12, 2890, 16, 10576, 33, 7036, 16, 5965, 4455, 33, 5510, 4672, 468, 2000, 924, 628, 1247, 309, 2319, 18, 309, 296, 94, 11, 316, 365, 18, 2233, 18, 7097, 9076, 30, 309...
<h1>File Report</h1>
<h3> <a href="/">Summary</a> > <a href="/report-%(report)s.html">Report %(report)s</a> > File Bug</h3>
def send_report(self, report): try: keys = self.load_report(report) except IOError: return self.send_error(400, 'Invalid report.')
0244e62e8481eebedc56b0e3320baa3b139ff660 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11986/0244e62e8481eebedc56b0e3320baa3b139ff660/ScanView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 6006, 12, 2890, 16, 2605, 4672, 775, 30, 1311, 273, 365, 18, 945, 67, 6006, 12, 6006, 13, 1335, 8340, 30, 327, 365, 18, 4661, 67, 1636, 12, 16010, 16, 296, 1941, 2605, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 6006, 12, 2890, 16, 2605, 4672, 775, 30, 1311, 273, 365, 18, 945, 67, 6006, 12, 6006, 13, 1335, 8340, 30, 327, 365, 18, 4661, 67, 1636, 12, 16010, 16, 296, 1941, 2605, 1093...
newparams = macoefs.copy()
def _invtransparams(self, params): """ Inverse of the Jones reparameterization """ p,q,k = self.p, self.q, self.k arcoefs = params[k:k+p] macoefs = params[k+p:] # AR coeffs if p != 0: tmp = arcoefs.copy() newparams = arcoefs.copy() for j in range(p-1,0,-1): a = newparams[j] for k in range(j): tmp[k] = (newparams[k] + a * newparams[j-k-1])/(1-a**2) newparams[:j] = tmp[:j] invarcoefs = -log((1-newparams)/(1+newparams)) start_params[k:k+p] = invarcoefs # MA coeffs if q != 0: tmp = macoefs.copy() newparams = macoefs.copy() for j in range(q-1,0,-1): b = newparams[j] for k in range(j): tmp[k] = (newparams[k] - b * newparams[j-k-1])/(1-b**2) newparams[:j] = tmp[:j] invmacoefs = -log((1-newparams)/(1+newparams)) start_params[k+p:k+p+q] = invmacoefs return start_params
1605048ab16600ba699073d25d3520de0f02e555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/1605048ab16600ba699073d25d3520de0f02e555/kalmanf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5768, 2338, 2010, 12, 2890, 16, 859, 4672, 3536, 657, 2476, 434, 326, 804, 5322, 283, 6775, 1588, 3536, 293, 16, 85, 16, 79, 273, 365, 18, 84, 16, 365, 18, 85, 16, 365, 18, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5768, 2338, 2010, 12, 2890, 16, 859, 4672, 3536, 657, 2476, 434, 326, 804, 5322, 283, 6775, 1588, 3536, 293, 16, 85, 16, 79, 273, 365, 18, 84, 16, 365, 18, 85, 16, 365, 18, 79...
A->G B->G C->G D->G E->G F->G G->G H->G I->G J->G K->G L->G M->G
A->G B->G C->G D->G E->G F->G G->G H->G I->G J->G K->G L->G M->G
... def __str__(self):
0665f7d932e15bc75f6d745c6e03e0762451c536 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/0665f7d932e15bc75f6d745c6e03e0762451c536/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 701, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 701, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
circ.routers.append(rq) rq.circuits.append(circ) tc_session.update(rq) tc_session.save_or_update(circ)
circ.routers.append(rq) tc_session.add(circ)
def circ_status_event(self, c): if self.track_parent and c.cird_id not in self.parent_handler.circuits: return # Ignore circuits that aren't ours # TODO: Hrmm, consider making this sane in TorCtl. if c.reason: lreason = c.reason else: lreason = "NONE" if c.remote_reason: rreason = c.remote_reason else: rreason = "NONE" reason = c.event_name+":"+c.status+":"+lreason+":"+rreason
c8ad6cda0735bca71a66e2ae8dc82c8034ffc7ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3224/c8ad6cda0735bca71a66e2ae8dc82c8034ffc7ce/SQLSupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18956, 67, 2327, 67, 2575, 12, 2890, 16, 276, 4672, 309, 365, 18, 4101, 67, 2938, 471, 276, 18, 71, 6909, 67, 350, 486, 316, 365, 18, 2938, 67, 4176, 18, 11614, 30091, 30, 327, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18956, 67, 2327, 67, 2575, 12, 2890, 16, 276, 4672, 309, 365, 18, 4101, 67, 2938, 471, 276, 18, 71, 6909, 67, 350, 486, 316, 365, 18, 2938, 67, 4176, 18, 11614, 30091, 30, 327, 468, ...
if not self.locks.has_key(newid) : self.locks[newid] = threading.Lock()
self.locks.create_lock(newid)
def new_task_id(self) : newid = self.backend.new_task_id() if not newid : k = 0 pid = self.dic["pid"] newid = "%s@%s" %(k,pid) while self.tasks.has_key(str(newid)) : k += 1 newid = "%s@%s" %(k,pid) if not self.locks.has_key(newid) : self.locks[newid] = threading.Lock() return newid
e35810ddde335129f02faa9bf338b48cec8074ef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/e35810ddde335129f02faa9bf338b48cec8074ef/datastore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 4146, 67, 350, 12, 2890, 13, 294, 394, 350, 273, 365, 18, 9993, 18, 2704, 67, 4146, 67, 350, 1435, 309, 486, 394, 350, 294, 417, 273, 374, 4231, 273, 365, 18, 15859, 9614, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4146, 67, 350, 12, 2890, 13, 294, 394, 350, 273, 365, 18, 9993, 18, 2704, 67, 4146, 67, 350, 1435, 309, 486, 394, 350, 294, 417, 273, 374, 4231, 273, 365, 18, 15859, 9614, ...
print("NAME: %s WANTED: %s" % (name, wanted))
def get(self, argv, cmd): wanted = argv[0] p = NamespacedOptionParser(argv[1:]) for name, worker, _ in multi_args(p, cmd): print("NAME: %s WANTED: %s" % (name, wanted)) if name == wanted: print(" ".join(worker)) return
5194fabcae5ea77360ac1483a5c0352ebe1665fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/5194fabcae5ea77360ac1483a5c0352ebe1665fc/celeryd_multi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 5261, 16, 1797, 4672, 15504, 273, 5261, 63, 20, 65, 293, 273, 6005, 72, 1895, 2678, 12, 19485, 63, 21, 30, 5717, 364, 508, 16, 4322, 16, 389, 316, 3309, 67, 1968, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 5261, 16, 1797, 4672, 15504, 273, 5261, 63, 20, 65, 293, 273, 6005, 72, 1895, 2678, 12, 19485, 63, 21, 30, 5717, 364, 508, 16, 4322, 16, 389, 316, 3309, 67, 1968, ...
To read a patch from standard input, use "-" as the patch name.
To read a patch from standard input, use "-" as the patch name. If a URL is specified, the patch will be downloaded from it.
def import_(ui, repo, patch1, *patches, **opts): """import an ordered set of patches Import a list of patches and commit them individually. If there are outstanding changes in the working directory, import will abort unless given the -f/--force flag. You can import a patch straight from a mail message. Even patches as attachments work (to use the body part, it must have type text/plain or text/x-patch). From and Subject headers of email message are used as default committer and commit message. All text/plain body parts before first diff are added to commit message. If the imported patch was generated by hg export, user and description from patch override values from message headers and body. Values given on command line with -m/--message and -u/--user override these. If --exact is specified, import will set the working directory to the parent of each patch before applying it, and will abort if the resulting changeset has a different ID than the one recorded in the patch. This may happen due to character set problems or other deficiencies in the text patch format. With -s/--similarity, hg will attempt to discover renames and copies in the patch in the same way as 'addremove'. To read a patch from standard input, use "-" as the patch name. See 'hg help dates' for a list of formats valid for -d/--date. """ patches = (patch1,) + patches date = opts.get('date') if date: opts['date'] = util.parsedate(date) try: sim = float(opts.get('similarity') or 0) except ValueError: raise util.Abort(_('similarity must be a number')) if sim < 0 or sim > 100: raise util.Abort(_('similarity must be between 0 and 100')) if opts.get('exact') or not opts.get('force'): cmdutil.bail_if_changed(repo) d = opts["base"] strip = opts["strip"] wlock = lock = None try: wlock = repo.wlock() lock = repo.lock() for p in patches: pf = os.path.join(d, p) if pf == '-': ui.status(_("applying patch from stdin\n")) pf = sys.stdin else: ui.status(_("applying %s\n") % p) pf = url.open(ui, pf) data = patch.extract(ui, pf) tmpname, message, user, date, branch, nodeid, p1, p2 = data if tmpname is None: raise util.Abort(_('no diffs found')) try: cmdline_message = cmdutil.logmessage(opts) if cmdline_message: # pickup the cmdline msg message = cmdline_message elif message: # pickup the patch msg message = message.strip() else: # launch the editor message = None ui.debug(_('message:\n%s\n') % message) wp = repo.parents() if opts.get('exact'): if not nodeid or not p1: raise util.Abort(_('not a Mercurial patch')) p1 = repo.lookup(p1) p2 = repo.lookup(p2 or hex(nullid)) if p1 != wp[0].node(): hg.clean(repo, p1) repo.dirstate.setparents(p1, p2) elif p2: try: p1 = repo.lookup(p1) p2 = repo.lookup(p2) if p1 == wp[0].node(): repo.dirstate.setparents(p1, p2) except error.RepoError: pass if opts.get('exact') or opts.get('import_branch'): repo.dirstate.setbranch(branch or 'default') files = {} try: patch.patch(tmpname, ui, strip=strip, cwd=repo.root, files=files, eolmode=None) finally: files = patch.updatedir(ui, repo, files, similarity=sim/100.) if not opts.get('no_commit'): m = cmdutil.matchfiles(repo, files or []) n = repo.commit(message, opts.get('user') or user, opts.get('date') or date, match=m, editor=cmdutil.commiteditor) if opts.get('exact'): if hex(n) != nodeid: repo.rollback() raise util.Abort(_('patch is damaged' ' or loses information')) # Force a dirstate write so that the next transaction # backups an up-do-date file. repo.dirstate.write() finally: os.unlink(tmpname) finally: release(lock, wlock)
b06aeb88f047d3085fd36f1d1e7e68ee25618cf1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/b06aeb88f047d3085fd36f1d1e7e68ee25618cf1/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 12, 4881, 16, 3538, 16, 4729, 21, 16, 380, 30278, 16, 2826, 4952, 4672, 3536, 5666, 392, 5901, 444, 434, 16482, 225, 6164, 279, 666, 434, 16482, 471, 3294, 2182, 28558, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 12, 4881, 16, 3538, 16, 4729, 21, 16, 380, 30278, 16, 2826, 4952, 4672, 3536, 5666, 392, 5901, 444, 434, 16482, 225, 6164, 279, 666, 434, 16482, 471, 3294, 2182, 28558, 18, 2...
self.hypervisor.vbox.unregisterCallback(self.hypervisor.cb)
def __del__(self): self.hypervisor.vbox.unregisterCallback(self.hypervisor.cb) del self.machine
d9e80712040f977a65437d98198220eeff4f916b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1208/d9e80712040f977a65437d98198220eeff4f916b/ufovboxapi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 1464, 365, 18, 9149, 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, 1001, 3771, 972, 12, 2890, 4672, 1464, 365, 18, 9149, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
"--start-delete=%s" % _WDIFF_DEL, "--end-delete=%s" % _WDIFF_END, "--start-insert=%s" % _WDIFF_ADD, "--end-insert=%s" % _WDIFF_END,
"--start-delete=%s" % self._WDIFF_DEL, "--end-delete=%s" % self._WDIFF_END, "--start-insert=%s" % self._WDIFF_ADD, "--end-insert=%s" % self._WDIFF_END,
def _wdiff_command(self): executable = self._path_to_wdiff() return [executable, "--start-delete=%s" % _WDIFF_DEL, "--end-delete=%s" % _WDIFF_END, "--start-insert=%s" % _WDIFF_ADD, "--end-insert=%s" % _WDIFF_END, actual_filename, expected_filename]
134c1efc0756ca1bd17415036238ccba90880392 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/134c1efc0756ca1bd17415036238ccba90880392/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3623, 3048, 67, 3076, 12, 2890, 4672, 9070, 273, 365, 6315, 803, 67, 869, 67, 3623, 3048, 1435, 327, 306, 17751, 16, 5238, 1937, 17, 3733, 5095, 87, 6, 738, 365, 6315, 59, 2565, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3623, 3048, 67, 3076, 12, 2890, 4672, 9070, 273, 365, 6315, 803, 67, 869, 67, 3623, 3048, 1435, 327, 306, 17751, 16, 5238, 1937, 17, 3733, 5095, 87, 6, 738, 365, 6315, 59, 2565, ...
Returns a list of the irreducible characters of self.
Returns a list of the irreducible characters of ``self``.
def irreducible_characters(self): r""" Returns a list of the irreducible characters of self. EXAMPLES:: sage: irr = SymmetricGroup(3).irreducible_characters() sage: [x.values() for x in irr] [[1, -1, 1], [2, 0, -1], [1, 1, 1]] """ Irr = self._gap_().Irr() L = [] for irr in Irr: L.append(ClassFunction(self, irr)) return L
6ac30ecf5071d4fb909072e90d2311932d8c2165 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6ac30ecf5071d4fb909072e90d2311932d8c2165/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9482, 1118, 5286, 1523, 67, 20558, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 434, 326, 9482, 1118, 5286, 1523, 3949, 434, 12176, 2890, 68, 8338, 225, 5675, 8900, 11386, 2866, 225, 272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9482, 1118, 5286, 1523, 67, 20558, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 434, 326, 9482, 1118, 5286, 1523, 3949, 434, 12176, 2890, 68, 8338, 225, 5675, 8900, 11386, 2866, 225, 272, ...
int(vat[1:])
int(vat[1:8])
def check_vat_es(self, vat): ''' Check Spain VAT number. ''' if len(vat) != 9: return False
3de195d3730638334f30e9d665f903ccad28a417 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/3de195d3730638334f30e9d665f903ccad28a417/partner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 25012, 67, 281, 12, 2890, 16, 17359, 4672, 9163, 2073, 5878, 530, 776, 789, 1300, 18, 9163, 309, 562, 12, 25012, 13, 480, 2468, 30, 327, 1083, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 25012, 67, 281, 12, 2890, 16, 17359, 4672, 9163, 2073, 5878, 530, 776, 789, 1300, 18, 9163, 309, 562, 12, 25012, 13, 480, 2468, 30, 327, 1083, 2, -100, -100, -100, -100, -100,...
(NULL, ?, ?,?)", (self.cloner[0], session.p_id, time()))
(NULL, ?, ?,?)", (self.cloner[0], session.p_id, time.time()))
def do_clone(self, session, line): cu.execute("select id,name from objects where name = ?", (line.lower(),)) self.obj = cu.fetchone() cu.execute("select id,name from npcs where name = ?", (line.lower(),)) self.npc = cu.fetchone() if self.obj: cu.execute("select id,name from objects where name = ?", (line.lower(),)) self.cloner = cu.fetchone() cu.execute("insert into obj_instances(id,o_id,owner,creation) values\ (NULL, ?, ?,?)", (self.cloner[0], session.p_id, time())) session.push("%s has been cloned.\r\n" % str(self.cloner[1])) elif self.npc: cu.execute("select id,name from npcs where name = ?", (line.lower(),)) self.cloner = cu.fetchone() cu.execute("insert into npcs_instances(id,o_id,owner,creation) values\ (NULL, ?, ?,?)", (self.cloner[0], session.p_id, time())) session.push("%s has been cloned.\r\n" % str(self.cloner[1])) else: session.push("No such object or NPC.\r\n")
1c5998314c3422331a3066a24ceb4a4b4eb8d1de /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5020/1c5998314c3422331a3066a24ceb4a4b4eb8d1de/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 14056, 12, 2890, 16, 1339, 16, 980, 4672, 15985, 18, 8837, 2932, 4025, 612, 16, 529, 628, 2184, 1625, 508, 273, 692, 3113, 261, 1369, 18, 8167, 9334, 3719, 365, 18, 2603, 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, 741, 67, 14056, 12, 2890, 16, 1339, 16, 980, 4672, 15985, 18, 8837, 2932, 4025, 612, 16, 529, 628, 2184, 1625, 508, 273, 692, 3113, 261, 1369, 18, 8167, 9334, 3719, 365, 18, 2603, 273,...
os.close(self.int_w) os.close(self.int_r)
def _create(self): # Creating pipes [self.ext_r, self.int_w] = os.pipe() [self.int_r, self.ext_w] = os.pipe()
bf291c1c46a94087b5d6a33aea2672704b43731a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2934/bf291c1c46a94087b5d6a33aea2672704b43731a/child.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 12, 2890, 4672, 468, 21837, 16062, 306, 2890, 18, 408, 67, 86, 16, 365, 18, 474, 67, 91, 65, 273, 1140, 18, 14772, 1435, 306, 2890, 18, 474, 67, 86, 16, 365, 18, 408, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 12, 2890, 4672, 468, 21837, 16062, 306, 2890, 18, 408, 67, 86, 16, 365, 18, 474, 67, 91, 65, 273, 1140, 18, 14772, 1435, 306, 2890, 18, 474, 67, 86, 16, 365, 18, 408, 67...
pass
if (self.zoneId): return self.zoneId else: return 0
def getComponentL(self): pass
ca1774c6a01511dd2e7a21acfbcfdf9ee091538b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7242/ca1774c6a01511dd2e7a21acfbcfdf9ee091538b/DistributedSmoothNodeAI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10322, 48, 12, 2890, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10322, 48, 12, 2890, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
'unicode_paths' : os.path.supports_unicode_filenames, 'case_insensitive_paths' : os.path.normcase('Aa') == 'aa',
'unicode_paths' : True, 'case_insensitive_paths' : False,
def __nonzero__(self): return False
3ed0ce6ac986c63870c141f122f42abc1dd24317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5578/3ed0ce6ac986c63870c141f122f42abc1dd24317/zipfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 26449, 972, 12, 2890, 4672, 327, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 26449, 972, 12, 2890, 4672, 327, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if nodeName in ("select", "colgroup", "head", "frameset"):
if nodeName in ("select", "colgroup", "head", "frameset", "html"):
def resetInsertionMode(self): # The name of this method is mostly historical. (It's also used in the # specification.) last = False newModes = { "select":"inSelect", "td":"inCell", "th":"inCell", "tr":"inRow", "tbody":"inTableBody", "thead":"inTableBody", "tfoot":"inTableBody", "caption":"inCaption", "colgroup":"inColumnGroup", "table":"inTable", "head":"inBody", "body":"inBody", "frameset":"inFrameset" } for node in self.tree.openElements[::-1]: nodeName = node.name if node == self.tree.openElements[0]: last = True if nodeName not in ['td', 'th']: # XXX assert self.innerHTML nodeName = self.innerHTML # Check for conditions that should only happen in the innerHTML # case if nodeName in ("select", "colgroup", "head", "frameset"): # XXX assert self.innerHTML if nodeName in newModes: self.phase = self.phases[newModes[nodeName]] break elif node.namespace in (namespaces["mathml"], namespaces["svg"]): self.phase = self.phases["inForeignContent"] self.secondaryPhase = self.phases["inBody"] break elif nodeName == "html": if self.tree.headPointer is None: self.phase = self.phases["beforeHead"] else: self.phase = self.phases["afterHead"] break elif last: self.phase = self.phases["inBody"] break
f6c270353a56490f7ddbd3b7ba3730e2971930a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9368/f6c270353a56490f7ddbd3b7ba3730e2971930a4/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 29739, 2309, 12, 2890, 4672, 468, 1021, 508, 434, 333, 707, 353, 23958, 23922, 18, 261, 7193, 1807, 2546, 1399, 316, 326, 468, 7490, 12998, 1142, 273, 1083, 394, 18868, 273, 288, 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, 2715, 29739, 2309, 12, 2890, 4672, 468, 1021, 508, 434, 333, 707, 353, 23958, 23922, 18, 261, 7193, 1807, 2546, 1399, 316, 326, 468, 7490, 12998, 1142, 273, 1083, 394, 18868, 273, 288, 3...
if (self.path.find("/cache/no-transform") != 0):
if not self._ShouldHandleRequest("/cache/no-transform"):
def CacheNoTransformHandler(self): """This request handler yields a page with the title set to the current system time, and does not allow the content to transformed during user-agent caching"""
41f6cf83747d6ca25a473f2e42d08288be9d7a5d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/41f6cf83747d6ca25a473f2e42d08288be9d7a5d/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4379, 2279, 4059, 1503, 12, 2890, 4672, 3536, 2503, 590, 1838, 16932, 279, 1363, 598, 326, 2077, 444, 358, 326, 783, 2619, 813, 16, 471, 1552, 486, 1699, 326, 913, 358, 10220, 4982, 729,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4379, 2279, 4059, 1503, 12, 2890, 4672, 3536, 2503, 590, 1838, 16932, 279, 1363, 598, 326, 2077, 444, 358, 326, 783, 2619, 813, 16, 471, 1552, 486, 1699, 326, 913, 358, 10220, 4982, 729,...
a = tcn.shared_constructor(rng.rand(*shape), 'a')
a = tcn.shared_constructor(theano._asarray(rng.rand(*shape),dtype='float32'), 'a')
def test_elemwise2(): """ Several kinds of elemwise expressions with dimension permutations """ rng = numpy.random.RandomState(int(time.time())) print 'random?', rng.rand(3) shape = (3,5) for pattern in [(0,1), (1,0)]: a = tcn.shared_constructor(rng.rand(*shape), name=None) b = tensor.Tensor(dtype='float32', broadcastable=[0]*len(shape))() f = pfunc([b], [], updates=[(a, (a+b).dimshuffle(pattern))], mode=mode_with_gpu) has_elemwise = False for i, node in enumerate(f.maker.env.toposort()): print >> sys.stdout, i, node has_elemwise = has_elemwise or isinstance(node.op, tensor.Elemwise) assert not has_elemwise #let debugmode catch errors print >> sys.stdout, 'pattern', pattern f(rng.rand(*shape)*.3) shape = (3,4,5,6) a = tcn.shared_constructor(rng.rand(*shape), 'a') b = tensor.Tensor(dtype='float32', broadcastable=[0]*len(shape))() f = pfunc([b], [], updates=[(a, (a+b).dimshuffle([2,0,3,1]) * tensor.exp(b**a).dimshuffle([2,0,3,1]))], mode=mode_with_gpu) has_elemwise = False for i, node in enumerate(f.maker.env.toposort()): print i, node has_elemwise = has_elemwise or isinstance(node.op, tensor.Elemwise) assert not has_elemwise #let debugmode catch errors f(rng.rand(*shape))
8975b933b1f7fb5791fd7798b5420b449782a292 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/8975b933b1f7fb5791fd7798b5420b449782a292/test_basic_ops.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10037, 2460, 22, 13332, 3536, 3265, 502, 287, 21961, 434, 3659, 2460, 8041, 598, 4968, 26468, 3536, 11418, 273, 3972, 18, 9188, 18, 8529, 1119, 12, 474, 12, 957, 18, 957, 1435,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10037, 2460, 22, 13332, 3536, 3265, 502, 287, 21961, 434, 3659, 2460, 8041, 598, 4968, 26468, 3536, 11418, 273, 3972, 18, 9188, 18, 8529, 1119, 12, 474, 12, 957, 18, 957, 1435,...
Markup('<a href="%s" accesskey="5">Build Status</a>', req.href.build()))
Markup('<a href="%s" accesskey="5">Build Status</a>') % req.href.build())
def get_navigation_items(self, req): """Return the navigation item for access the build status overview from the Trac navigation bar.""" if not req.perm.has_permission('BUILD_VIEW'): return yield ('mainnav', 'build', \ Markup('<a href="%s" accesskey="5">Build Status</a>', req.href.build()))
1f3bedef7ba2ffeb2fd0768e987fb5ca36c62b46 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4547/1f3bedef7ba2ffeb2fd0768e987fb5ca36c62b46/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 19537, 67, 3319, 12, 2890, 16, 1111, 4672, 3536, 990, 326, 10394, 761, 364, 2006, 326, 1361, 1267, 18471, 628, 326, 2197, 71, 10394, 4653, 12123, 309, 486, 1111, 18, 12160, 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, 336, 67, 19537, 67, 3319, 12, 2890, 16, 1111, 4672, 3536, 990, 326, 10394, 761, 364, 2006, 326, 1361, 1267, 18471, 628, 326, 2197, 71, 10394, 4653, 12123, 309, 486, 1111, 18, 12160, 18, ...
parser.add_option('--debug', action='store_const', dest='loglevel', const=logging.DEBUG, help='enable debugging output')
def main(): """Main entry point for running the build slave.""" from bitten import __version__ as VERSION from optparse import OptionParser parser = OptionParser(usage='usage: %prog [options] url', version='%%prog %s' % VERSION) parser.add_option('--name', action='store', dest='name', help='name of this slave (defaults to host name)') parser.add_option('-f', '--config', action='store', dest='config', metavar='FILE', help='path to configuration file') parser.add_option('-d', '--work-dir', action='store', dest='work_dir', metavar='DIR', help='working directory for builds') parser.add_option('-k', '--keep-files', action='store_true', dest='keep_files', help='don\'t delete files after builds') parser.add_option('-l', '--log', dest='logfile', metavar='FILENAME', help='write log messages to FILENAME') parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run', help='don\'t report results back to master') parser.add_option('--debug', action='store_const', dest='loglevel', const=logging.DEBUG, help='enable debugging output') parser.add_option('-v', '--verbose', action='store_const', dest='loglevel', const=logging.INFO, help='print as much as possible') parser.add_option('-q', '--quiet', action='store_const', dest='loglevel', const=logging.ERROR, help='print as little as possible') parser.add_option('-s', '--single', action='store_true', dest='single_build', help='exit after completing a single build') parser.add_option('-u', '--user', dest='username', help='the username to use for authentication') parser.add_option('-p', '--password', dest='password', help='the password to use when authenticating') parser.set_defaults(dry_run=False, keep_files=False, loglevel=logging.WARNING, single_build=False) options, args = parser.parse_args() if len(args) < 1: parser.error('incorrect number of arguments') url = args[0] logger = logging.getLogger('bitten') logger.setLevel(options.loglevel) handler = logging.StreamHandler() handler.setLevel(options.loglevel) formatter = logging.Formatter('[%(levelname)-8s] %(message)s') handler.setFormatter(formatter) logger.addHandler(handler) if options.logfile: handler = logging.FileHandler(options.logfile) handler.setLevel(options.loglevel) formatter = logging.Formatter('%(asctime)s [%(name)s] %(levelname)s: ' '%(message)s') handler.setFormatter(formatter) logger.addHandler(handler) slave = BuildSlave(url, name=options.name, config=options.config, dry_run=options.dry_run, work_dir=options.work_dir, keep_files=options.keep_files, single_build=options.single_build, username=options.username, password=options.password) try: try: slave.run() except KeyboardInterrupt: slave.quit() except ExitSlave: pass if not options.work_dir: log.debug('Removing temporary directory %s' % slave.work_dir) shutil.rmtree(slave.work_dir)
e4122dbc45005358a1a0af81fd884741e494cf6f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4547/e4122dbc45005358a1a0af81fd884741e494cf6f/slave.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 1241, 1634, 364, 3549, 326, 1361, 11735, 12123, 628, 2831, 2253, 1930, 1001, 1589, 972, 487, 8456, 628, 2153, 2670, 1930, 18862, 225, 2082, 273, 18862, 12, 9167, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 1241, 1634, 364, 3549, 326, 1361, 11735, 12123, 628, 2831, 2253, 1930, 1001, 1589, 972, 487, 8456, 628, 2153, 2670, 1930, 18862, 225, 2082, 273, 18862, 12, 9167, 2...
result = result + '<p>%s\n' % self.small(doc)
result = result + '<p>%s</p>\n' % self.small(doc)
def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) filelink = '<a href="file:%s">%s</a>' % (path, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink)
74c8389b13d177e8560524598e1bc08247df81b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74c8389b13d177e8560524598e1bc08247df81b5/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 4672, 3536, 25884, 3982, 7323, 364, 279, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275, 17, 267, 508, 2140, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 4672, 3536, 25884, 3982, 7323, 364, 279, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275, 17, 267, 508, 2140, 27...
sites = widgets.MultipleSelectField(options=get_sites_options, size=15)
sites = widgets.MultipleSelectField(options=get_sites_options, size=15, validator=validators.NotEmpty())
def get_sites_options(): return [(s.id, s.name) for s in Site.select(orderBy='name')]
36cae7d5848a1a425a0a699907bdcca03a37b0ed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13031/36cae7d5848a1a425a0a699907bdcca03a37b0ed/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12180, 67, 2116, 13332, 327, 306, 12, 87, 18, 350, 16, 272, 18, 529, 13, 364, 272, 316, 9063, 18, 4025, 12, 26323, 2218, 529, 6134, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12180, 67, 2116, 13332, 327, 306, 12, 87, 18, 350, 16, 272, 18, 529, 13, 364, 272, 316, 9063, 18, 4025, 12, 26323, 2218, 529, 6134, 65, 2, -100, -100, -100, -100, -100, -100...
if new_prob > EPSILON and probability > 0.01:
if new_prob > EPSILON and probability > 0.15:
def find(list, item): for i in range(len(list)): if list[i] == item: return i return -1
15d8cfb52a73d01e96e1e99f84df0ddb0e75b1ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/15d8cfb52a73d01e96e1e99f84df0ddb0e75b1ce/shuffle-interpolate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 12, 1098, 16, 761, 4672, 364, 277, 316, 1048, 12, 1897, 12, 1098, 3719, 30, 309, 666, 63, 77, 65, 422, 761, 30, 327, 277, 327, 300, 21, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 12, 1098, 16, 761, 4672, 364, 277, 316, 1048, 12, 1897, 12, 1098, 3719, 30, 309, 666, 63, 77, 65, 422, 761, 30, 327, 277, 327, 300, 21, 2, -100, -100, -100, -100, -100, -100, ...
time_diff = (datetime.now() - last_post.created).seconds / 60
delta = (datetime.now() - last_post.created) time_diff = delta.seconds / 60
def add_post_ctx(request, forum_id, topic_id): forum = None topic = None if forum_id: forum = get_object_or_404(Forum, pk=forum_id) elif topic_id: topic = get_object_or_404(Topic, pk=topic_id) if (topic and topic.closed) or request.user.pybb_profile.is_banned(): return HttpResponseRedirect(topic.get_absolute_url()) try: quote_id = int(request.GET.get('quote_id')) except TypeError: quote = '' else: post = get_object_or_404(Post, pk=quote_id) quote = quote_text(post.body_text, request.user.pybb_profile.markup, post.user.username) ip = request.META.get('REMOTE_ADDR', '') form_kwargs = dict(topic=topic, forum=forum, user=request.user, ip=ip, initial={'body': quote}) if request.method == 'POST': form = AddPostForm(request.POST, request.FILES, **form_kwargs) else: form = AddPostForm(**form_kwargs) if topic and form.is_valid(): last_post = topic.last_post time_diff = (datetime.now() - last_post.created).seconds / 60 timeout = pybb_settings.POST_AUTOJOIN_TIMEOUT if last_post.user == request.user and time_diff < timeout: if request.LANGUAGE_CODE.startswith('ru') and pytils_enabled: join_message = u"Добавлено спустя %s %s" % (time_diff, pytils.numeral.choose_plural(time_diff, (u"минуту", u"минуты", u"минут"))) else: join_message = ungettext(u"Added after %s minute", u"Added after %s minutes", time_diff) % time_diff if last_post.markup == "bbcode": join_message = "[b]%s[/b]" % join_message elif last_post.markup == "markdown": join_message = "**%s**" % join_message last_post.body += u"\n\n%s:\n\n%s" % (join_message, form.cleaned_data["body"]) last_post.updated = datetime.now() last_post.save() return HttpResponseRedirect(last_post.get_absolute_url()) if form.is_valid(): post = form.save(); return HttpResponseRedirect(post.get_absolute_url()) return {'form': form, 'topic': topic, 'forum': forum, }
92f968d96224b0681ff2bb95191a6d1c067db61a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12938/92f968d96224b0681ff2bb95191a6d1c067db61a/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2767, 67, 5900, 12, 2293, 16, 11283, 67, 350, 16, 3958, 67, 350, 4672, 11283, 273, 599, 3958, 273, 599, 225, 309, 11283, 67, 350, 30, 11283, 273, 336, 67, 1612, 67, 280, 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, 527, 67, 2767, 67, 5900, 12, 2293, 16, 11283, 67, 350, 16, 3958, 67, 350, 4672, 11283, 273, 599, 3958, 273, 599, 225, 309, 11283, 67, 350, 30, 11283, 273, 336, 67, 1612, 67, 280, 67,...
cls_pointee = mb.class_( cpointee )
try: cls_pointee = mb.class_( cpointee ) except RuntimeError: print "could not find class %s for set/getDefault" % cpointee continue
def export_functions( mb ): """export utility functions.""" ## include all membership functions mb.namespace("alignlib").free_functions().include() # set call policies for functions that return the same object # from the first argument for prefix in ("fill", "add", "substitute", "reset", "copy", "combine", "complement", "rescore", "flatten", "filter", "readAlignmentPairs", "calculateAffineScore",
17694f712e3a6083ccc3dcd42f7ac85d1ed3158c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8012/17694f712e3a6083ccc3dcd42f7ac85d1ed3158c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 10722, 12, 4903, 262, 30, 3536, 6530, 12788, 4186, 12123, 7541, 2341, 777, 12459, 4186, 4903, 18, 4937, 2932, 7989, 2941, 20387, 9156, 67, 10722, 7675, 6702, 1435, 225, 468, 444,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 10722, 12, 4903, 262, 30, 3536, 6530, 12788, 4186, 12123, 7541, 2341, 777, 12459, 4186, 4903, 18, 4937, 2932, 7989, 2941, 20387, 9156, 67, 10722, 7675, 6702, 1435, 225, 468, 444,...
a = theano.shared(_a) b = theano.shared(_b)
a = cuda_ndarray.shared_constructor(_a) b = cuda_ndarray.shared_constructor(_b)
def test_opt_gpujoin_joinvectors_elemwise_then_minusone(): # from a bug in gpu normal sampling _a = numpy.asarray([1,2,3,4],dtype='float32') _b = numpy.asarray([5,6,7,8],dtype='float32') a = theano.shared(_a) b = theano.shared(_b) a_prime = tensor.cos(a) b_prime = tensor.sin(b) c = tensor.join(0,a_prime,b_prime) d = c[:-1] f = theano.function([], d) #theano.printing.debugprint(f) graph_nodes = f.maker.env.toposort() assert isinstance(graph_nodes[-1].op, cuda.HostFromGpu) assert isinstance(graph_nodes[-2].op, cuda.GpuSubtensor) assert isinstance(graph_nodes[-3].op, cuda.GpuJoin) concat = numpy.concatenate([numpy.cos(_a),numpy.sin(_b)],axis=1) concat = concat[:-1] assert numpy.allclose(numpy.asarray(f()), concat)
80dbd1aeb6bbbcb08694dcb5b0499b1b01333111 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/80dbd1aeb6bbbcb08694dcb5b0499b1b01333111/test_opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3838, 67, 23162, 5701, 67, 5701, 18535, 67, 10037, 2460, 67, 15991, 67, 19601, 476, 13332, 468, 628, 279, 7934, 316, 21810, 2212, 11558, 389, 69, 273, 3972, 18, 345, 1126, 3816...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3838, 67, 23162, 5701, 67, 5701, 18535, 67, 10037, 2460, 67, 15991, 67, 19601, 476, 13332, 468, 628, 279, 7934, 316, 21810, 2212, 11558, 389, 69, 273, 3972, 18, 345, 1126, 3816...
__slots__ = Flow.__slots__
__slots__ = Flow.__slots__ + ('data',)
def __str__(self, arrow='>'): p = net.proto_ntoa(self.p) if self.dport is not None: if self.sport is None: # XXX - ICMP return '%s %s %s %s:%s' % (p, self.src, arrow, self.dst, self.dport) return '%s %s:%s %s %s:%s' % \ (p, self.src, self.sport, arrow, self.dst, self.dport) return '%s %s %s %s' % (p, self.src, arrow, self.dst)
afed8d16b530e93fd515556ffb8a467e0e5af508 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3554/afed8d16b530e93fd515556ffb8a467e0e5af508/flow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 16, 12274, 2218, 1870, 4672, 293, 273, 2901, 18, 9393, 67, 496, 11867, 12, 2890, 18, 84, 13, 309, 365, 18, 72, 655, 353, 486, 599, 30, 309, 365, 18, 87, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 16, 12274, 2218, 1870, 4672, 293, 273, 2901, 18, 9393, 67, 496, 11867, 12, 2890, 18, 84, 13, 309, 365, 18, 72, 655, 353, 486, 599, 30, 309, 365, 18, 87, 6...
return suite
return setAllLayers(suite, ATSiteLayer)
def test_suite(): from unittest import TestSuite, makeSuite from Testing.ZopeTestCase import FunctionalDocFileSuite as FileSuite suite = TestSuite() suite.addTest(makeSuite(TestFunctionalObjectCreation)) files = ( 'traversal.txt', 'traversal_4981.txt', 'folder_marshall.txt', 'reindex_sanity_plone21.txt', 'webdav_operations.txt', ) for file in files: suite.addTest(FileSuite(file, package="Products.Archetypes.tests", test_class=ATFunctionalSiteTestCase) ) return suite
13a1950ea7b18ec1fd97119463236abe8701328e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/13a1950ea7b18ec1fd97119463236abe8701328e/test_functional.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30676, 13332, 628, 2836, 3813, 1930, 7766, 13587, 16, 1221, 13587, 628, 7766, 310, 18, 62, 1306, 4709, 2449, 1930, 4284, 287, 1759, 812, 13587, 487, 1387, 13587, 11371, 273, 7766...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 30676, 13332, 628, 2836, 3813, 1930, 7766, 13587, 16, 1221, 13587, 628, 7766, 310, 18, 62, 1306, 4709, 2449, 1930, 4284, 287, 1759, 812, 13587, 487, 1387, 13587, 11371, 273, 7766...
None
pass
def show_entryform(request): time_now = datetime.datetime.now() + datetime.timedelta(minutes=30) time_now -= datetime.timedelta(minutes=int(time_now.strftime("%M"))%30) def_date = time_now.strftime("%Y-%m-%d") def_time = time_now.strftime("%H:%M") duration = u'00:00' edit_page = u'' title = u'' time_opts = unicode() categories = categories = request.form.get('categories', [rc['timetrack']])[0] if request.form.has_key('date'): def_date = request.form.get('date')[0].encode() elif request.form.has_key('edit'): edit = request.form.get('edit')[0].encode() edit_page = u'<input type="hidden" name="edit" value="%s">' % edit def_date = edit.split('_')[0] #categories = ','.join(categories) pagelist, metakeys, styles = metatable_parseargs(request, categories, get_all_keys=True) meta = get_metas(request, edit, metakeys, display=False, checkAccess=True) if meta[u'Date']: if meta.has_key(u'Duration'): try: duration = meta[u'Duration'][0] except: None if meta.has_key(u'Time'): try: def_time = meta[u'Time'][0] except: None body = PageEditor(request, edit).get_raw_body() if '----' in body: title = body.split('----')[0] temp = list() for line in title.split("\n"): if not line.startswith("#acl"): temp.append(line) title = " ".join(temp) for h in range(24): for m in ['00','30']: t = u'"%02d:%s"' % (h,m) if t.find(def_time) != -1: t += ' selected' time_opts += u'<option value=%s>%02d:%s</option>\n' % (t,h,m) tasklist = unicode() for task in pages_in_category(request, rc['task']): tasktitle = Task(request, task).title() if not tasktitle: tasktitle = task tasklist += " <option value='%s'>%s</option>\n" % (task, tasktitle) pass html = u'''
1636607e83070b1850fefef779872b8fd3bbec85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/888/1636607e83070b1850fefef779872b8fd3bbec85/editTimeTrackEntry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4099, 687, 12, 2293, 4672, 813, 67, 3338, 273, 3314, 18, 6585, 18, 3338, 1435, 397, 3314, 18, 31295, 12, 17916, 33, 5082, 13, 813, 67, 3338, 3947, 3314, 18, 31295, 12, 17916,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4099, 687, 12, 2293, 4672, 813, 67, 3338, 273, 3314, 18, 6585, 18, 3338, 1435, 397, 3314, 18, 31295, 12, 17916, 33, 5082, 13, 813, 67, 3338, 3947, 3314, 18, 31295, 12, 17916,...
if reading_line[startpos] in (".", ":", ";"): startpos += 1 if reading_line[startpos] == ")": startpos += 1
try: if reading_line[startpos] in (".", ":", ";"): startpos += 1 except IndexError: pass try: if reading_line[startpos] == ")": startpos += 1 except IndexError: pass
def add_tagged_title(reading_line, len_title, matched_title, previous_match, startpos, true_replacement_index, extras, standardised_titles): """In rebuilding the line, add an identified periodical TITLE (standardised and tagged) into the line. @param reading_line: (string) The reference line before capitalization was performed, and before REPORT-NUMBERs and TITLEs were stipped out. @param len_title: (integer) the length of the matched TITLE. @param matched_title: (string) the matched TITLE text. @previous_match: (string) the previous periodical TITLE citation to have been matched in the current reference line. It is used when replacing an IBID instance in the line. @param startpos: (integer) the pointer to the next position in the reading-line from which to start rebuilding. @param true_replacement_index: (integer) the replacement index of the matched TITLE in the reading-line, with stripped punctuation and whitespace accounted for. @param extras: (integer) extras to be added into the replacement index. @param standardised_titles: (dictionary) the standardised versions of periodical titles, keyed by their various non-standard versions. @return: (tuple) containing a string (the rebuilt line segment), an integer (the next 'startpos' in the reading-line), and an other string (the newly updated previous-match). """ ## Fill 'rebuilt_line' (the segment of the line that is being rebuilt to include the ## tagged and standardised periodical TITLE) with the contents of the reading-line, ## up to the point of the matched TITLE: rebuilt_line = reading_line[startpos:true_replacement_index] ## Test to see whether a title or an "IBID" was matched: if matched_title.upper().find("IBID") != -1: ## This is an IBID ## Try to replace the IBID with a title: if previous_match != "": ## A title has already been replaced in this line - IBID can be replaced meaninfully ## First, try to get the series number/letter of this IBID: m_ibid = sre_matched_ibid.search(matched_title) try: series = m_ibid.group(1) except IndexError: series = u"" if series is None: series = u"" ## Replace this IBID with the previous title match, if possible: (replaced_ibid_segment, previous_match) = \ add_tagged_title_in_place_of_IBID(matched_title, previous_match, series) rebuilt_line += replaced_ibid_segment ## Update start position for next segment of original line: startpos = true_replacement_index + len_title + extras ## Skip past any punctuation at the end of the replacement that was just made: if reading_line[startpos] in (".", ":", ";"): startpos += 1 else: ## no previous title-replacements in this line - IBID refers to something unknown and ## cannot be replaced: rebuilt_line += \ reading_line[true_replacement_index:true_replacement_index + len_title + extras] startpos = true_replacement_index + len_title + extras else: ## This is a normal title, not an IBID rebuilt_line += "<cds.TITLE>%(title)s</cds.TITLE>" % { 'title' : standardised_titles[matched_title] } previous_match = standardised_titles[matched_title] startpos = true_replacement_index + len_title + extras ## Skip past any punctuation at the end of the replacement that was just made: if reading_line[startpos] in (".", ":", ";"): startpos += 1 if reading_line[startpos] == ")": startpos += 1 ## return the rebuilt line-segment, the position (of the reading line) from which the ## next part of the rebuilt line should be started, and the newly updated previous match. return (rebuilt_line, startpos, previous_match)
053a65f6c7b50c059122fa452f389f4dba46af6f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/053a65f6c7b50c059122fa452f389f4dba46af6f/refextract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 23023, 67, 2649, 12, 21803, 67, 1369, 16, 562, 67, 2649, 16, 4847, 67, 2649, 16, 2416, 67, 1916, 16, 787, 917, 16, 638, 67, 24394, 67, 1615, 16, 11875, 16, 4529, 5918, 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, 527, 67, 23023, 67, 2649, 12, 21803, 67, 1369, 16, 562, 67, 2649, 16, 4847, 67, 2649, 16, 2416, 67, 1916, 16, 787, 917, 16, 638, 67, 24394, 67, 1615, 16, 11875, 16, 4529, 5918, 67, ...
statsPHP4,
statsPHP4,
def makePage( _T, _N, _M, MIRRORS_DATA, lang, charset ): navigation = Tree \ ( [ P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['home'], href=makeURL( '', lang ))] ), Tree \ ( [ P ( contents = [ Img( src = '/images/englishlogo.png' ), A( 'English', href='%(BASE)s' )]), P ( contents = [ Img( src = '/images/germanylogo.png' ), A( 'Deutsch', href='%(BASE)sde/' )]), P ( contents = [ Img( src = '/images/francelogo.png' ), A( 'Fran&#231;ais', href='%(BASE)sfr/' )]), P ( contents = [ Img( src = '/images/italylogo.png' ), A( 'Italiano', href='%(BASE)sit/' )]), P ( contents = [ Img( src = '/images/netherlandslogo.png' ), A( 'Nederlands', href='%(BASE)snl/' )]), P ( contents = [ Img( src = '/images/polandlogo.png' ), A( 'Polski', href='%(BASE)spl/' )]), P ( contents = [ Img( src = '/images/portugallogo.png' ), A( 'Portugu&#234;s', href='%(BASE)spt/' )]), P ( contents = [ Img( src = '/images/russialogo.png' ), A( '&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;', href='%(BASE)sru/' )]), P ( contents = [ Img( src = '/images/finlandlogo.png' ), A( 'Suomi', href='%(BASE)sfi/' )]), P ( contents = [ Img( src = '/images/swedenlogo.png' ), A( 'Svenska', href='%(BASE)ssv/' )]) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['news'], href=makeURL( 'news/', lang ) )]), Tree ( A( _N['archive'], href=makeURL( 'news/archive/', lang ) ) ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['introduction'], href=makeURL( 'introduction/', lang ) ) ]), Tree \ ( [ #A( _N['status'], href=makeURL('introduction/status/everything.html' ), A( _N['screenshots'], href=makeURL( 'pictures/screenshots/', lang) ), A( _N['ports'], href=makeURL( 'introduction/ports', lang ) ), A( _N['license'], href='%(BASE)slicense.html' ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['download'], href=makeURL( 'download', lang ) )]), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), _N['documentation'] ]), Tree \ ( [ A( _N['users'], href=makeURL( 'documentation/users/', lang ) ), Tree \ ( [ A( _N['installation'], href=makeURL( 'documentation/users/installation', lang ) ), A( _N['using'], href=makeURL( 'documentation/users/using', lang ) ), A( _N['shell'], href=makeURL( 'documentation/users/shell/index', lang ) ), A( _N['faq'], href=makeURL( 'documentation/users/faq', lang ) ), #_N['ports'], #A( _N['links'], href=makeURL( 'documentation/users/links', lang ) ) ] ), A( _N['developers'], href=makeURL( 'documentation/developers/index', lang ) ), Tree \ ( [ A( _N['contribute'], href=makeURL( 'documentation/developers/contribute', lang ) ), A( 'Roadmap', href=makeURL( 'documentation/developers/roadmap', lang ) ), A( _N['bug-tracker'], href='http://sourceforge.net/tracker/?atid=439463&group_id=43586&func=browse' ), A( _N['working-with-subversion'], href=makeURL( 'documentation/developers/svn', lang ) ), A( _N['compiling'], href=makeURL( 'documentation/developers/compiling', lang ) ), A( _N['application-development-manual'], href=makeURL( 'documentation/developers/app-dev/index', lang ) ), A( _N['zune-application-development-manual'], href=makeURL( 'documentation/developers/zune-application-development', lang ) ), A( _N['system-development-manual'], href=makeURL( 'documentation/developers/system-development', lang ) ), A( _N['debugging-manual'], href=makeURL( 'documentation/developers/debugging', lang ) ), A( _N['reference'], href=makeURL( 'documentation/developers/autodocs/index', lang ) ), A( _N['specifications'], href=makeURL( 'documentation/developers/specifications/', lang ) ), A( _N['ui-style-guide'], href=makeURL( 'documentation/developers/ui', lang ) ), A( _N['documenting'], href=makeURL( 'documentation/developers/documenting', lang ) ), A( _N['porting'], href=makeURL( 'documentation/developers/porting', lang ) ), #A( _N['translating'], href=makeURL( 'documentation/developers/translating', lang ) ), A( _N['summaries'], href=makeURL( 'documentation/developers/summaries/', lang ) ), A( _N['links'], href=makeURL( 'documentation/developers/links', lang ) ) ] ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['contact'], href=makeURL( 'contact', lang ) )]), Tree \ ( [ A( _N['mailing-lists'], href=makeURL( 'contact', lang, 'mailing-lists' ) ), #A( _N['forums'], href=makeURL( 'contact', lang, 'forums' ) ), A( _N['irc-channels'], href=makeURL( 'contact', lang, 'irc-channels' ) ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['credits'], href=makeURL( 'credits', lang ) )]), P ( contents = [ Img( src = '/images/pointer.png' ), A( 'Acknowledgements', href=makeURL( 'acknowledgements', lang ) )]), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), _N['pictures']]), Tree \ ( [ A( _N['developers'], href=makeURL( 'pictures/developers/', lang ) ), A( _N['developers-together'], href=makeURL( 'pictures/developers-together/', lang ) ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['sponsors'], href=makeURL( 'sponsors', lang ) )]), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['linking'], href=makeURL( 'linking', lang ) )]), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['links'], href=makeURL( 'links', lang ) )]) ] ) counter = Img( src = 'http://www.hepe.com/cgi-bin/wwwcount.cgi?df=aros.dat&dd=E&ft=0' ) sponsors = Table\ ( cellspacing = 5, cellpadding = 0, contents = [ TR ( TD ( A ( Img( src = '%(ROOT)simages/trustec-small.png', border = 0 ), href = 'http://www.trustsec.de/' ) ) ), TR ( TD ( A ( Img( src = '%(ROOT)simages/genesi-small.gif', border = 0 ), href = 'http://www.pegasosppc.com/' ) ) ), TR ( TD ( A \ ( Img \ ( src = 'http://sflogo.sourceforge.net/sflogo.php?group_id=43586&type=1', width = 88, height = 31, border = 0, alt = 'SourceForge Logo' ), href = 'http://sourceforge.net/' ) ) ) ] ) bar = Table( border = 0, cellpadding = 2, cellspacing = 2, width = 171, valign = 'top', contents = [ TR( valign = 'top', contents = [ TD( rowspan = 8, width=15 ), TD() ] ), TR( valign = 'top', contents = TD( navigation ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = counter ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = sponsors ) ), TR( TD(), height=30 ), TR \ ( valign = 'top', contents = TD \ ( align = 'center', contents = A \ ( Img \ ( src = '%(ROOT)simages/noeupatents-small.png', border = 0 ), href = 'http://petition.eurolinux.org/' ) ) ) ] ) statsPHP = ''' <?php //define("_BBC_PAGE_NAME", "my page title"); define("_BBCLONE_DIR", "%(ROOT)smybbclone/"); define("COUNTER", _BBCLONE_DIR."index.php"); if (file_exists(COUNTER)) include_once(COUNTER); ?> ''' statsPHP2 = ''' <?php echo date("m.d.y"); ?> ''' statsPHP3 = ''' <?php echo "<map name=\\"map\\">"; echo "<area shape=\\"rect\\" coords=\\"11,80,82,95\\" alt=\\"http://www.aros.org\\" href=\\"http://www.aros.org\\">"; echo "<area shape=\\"rect\\" coords=\\"87,78,165,95\\" alt=\\"AROS-Exec\\" href=\\"http://www.aros-exec.org\\">"; echo "<area shape=\\"rect\\" coords=\\"244,77,323,95166,77,240,95\\" alt=\\"Team AROS\\" href=\\"http://www.teamaros.org\\">"; echo "<area shape=\\"rect\\" coords=\\"166,77,240,95\\" alt=\\"AROS-Exec Archives\\" href=\\"http://archives.aros-exec.org\\">"; echo "</map>"; ?> ''' statsPHP4 = ''' <?php echo "<table width=\\"100%%\\"><tr><td>"; echo "<div style=\\"text-align: right;\\">"; echo "<font color=\\"#aaaaaa\\">"; ?> ''' statsPHP6 = ''' <?php echo "</font></div>"; echo "</p></tr></td></table>"; ?> ''' statsPHP5= ''' <?php include( '/home/groups/a/ar/aros/htdocs/rsfeed/browserdetect.php'); $win_ie56 = (browser_detection('browser') == 'ie' ) && (browser_detection('number') >= 5 ) && (browser_detection('number') < 7 ); if ($win_ie56) { echo \"<img src=\\"/images/kittymascot.gif\\" style=\\"float:right\\" border=\\"0\\"></img><img src=\\"/images/toplogomenu.gif\\" border=\\"0\\" usemap=\\"#map\\"></img>"; } else { echo \"<img src=\\"/images/kittymascot.png\\" style=\\"float:right\\" border=\\"0\\"></img><img src=\\"/images/toplogomenu.png\\" border=\\"0\\" usemap=\\"#map\\"></img>"; } ?> ''' page = HTML( [ Head( [ Charset( charset ), Title( 'AROS Research Operating System' ), Link( href = '%(ROOT)saros.css', type = 'text/css', rel = 'stylesheet' ), Meta( name = 'keywords', content = 'AROS, OS, operating system, research, open source, portage' ) ] ), Body( style = 'margin: 0px;', bgcolor = '#ffffff', contents = [ statsPHP3, Table( border = 0, cellspacing = 0, cellpadding = 0, width = '100%%', contents = [ TR( [ TD( halign = 'top', width = '100%%', height = 109, background='/images/backgroundtop.png' ,rowspan = 4, contents = statsPHP5)
846194f3836b7e3473a516c54c1f17757297aebf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4747/846194f3836b7e3473a516c54c1f17757297aebf/page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1964, 12, 389, 56, 16, 389, 50, 16, 389, 49, 16, 490, 7937, 2784, 55, 67, 4883, 16, 3303, 16, 4856, 262, 30, 10394, 273, 4902, 521, 261, 306, 453, 261, 2939, 273, 306, 2221, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1964, 12, 389, 56, 16, 389, 50, 16, 389, 49, 16, 490, 7937, 2784, 55, 67, 4883, 16, 3303, 16, 4856, 262, 30, 10394, 273, 4902, 521, 261, 306, 453, 261, 2939, 273, 306, 2221, ...
self.set_attribute_id(el, _get_idstr(pyobj))
self.set_attribute_id(el, objid)
def serialize(self, elt, sw, pyobj, name=None, childnames=None, **kw): debug = self.logger.debugOn() if debug: self.logger.debug("serialize: %r" %pyobj) if self.mutable is False and sw.Known(pyobj): return objid = _get_idstr(pyobj) n = name or self.pname or ('E' + objid) el = elt.createAppendElement(self.nspname, n)
7345179294b76759ddb897d4d80aefa2d01212cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/7345179294b76759ddb897d4d80aefa2d01212cc/TCcompound.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 12, 2890, 16, 11572, 16, 1352, 16, 2395, 2603, 16, 508, 33, 7036, 16, 1151, 1973, 33, 7036, 16, 2826, 9987, 4672, 1198, 273, 365, 18, 4901, 18, 4148, 1398, 1435, 309, 1198, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 12, 2890, 16, 11572, 16, 1352, 16, 2395, 2603, 16, 508, 33, 7036, 16, 1151, 1973, 33, 7036, 16, 2826, 9987, 4672, 1198, 273, 365, 18, 4901, 18, 4148, 1398, 1435, 309, 1198, 30, ...
elif optarg is None and option.acceptsArgument():
else:
def do_longs(self, opts, opt, longopts, args): """ Parse a long option
99a6a54b64b769a0c5ccc2fcc84966d39d39f4fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7864/99a6a54b64b769a0c5ccc2fcc84966d39d39f4fb/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 80, 7260, 12, 2890, 16, 1500, 16, 2153, 16, 1525, 4952, 16, 833, 4672, 3536, 2884, 279, 1525, 1456, 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, 741, 67, 80, 7260, 12, 2890, 16, 1500, 16, 2153, 16, 1525, 4952, 16, 833, 4672, 3536, 2884, 279, 1525, 1456, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
assert conn.pow(2,3) == 8 assert conn.os.path.join("a", "b") == "a/b" version = conn.reval("lambda: Globals.version")
assert conn.Globals.get('current_time') is None assert type(conn.os.getuid()) is int version = conn.Globals.get('version')
def test_connection(conn_number): """Test connection. conn_number 0 is the local connection""" print "Testing server started by: ", __conn_remote_cmds[conn_number] conn = Globals.connections[conn_number] try: assert conn.pow(2,3) == 8 assert conn.os.path.join("a", "b") == "a/b" version = conn.reval("lambda: Globals.version") except: sys.stderr.write("Server tests failed\n") raise if not version == Globals.version: print """Server may work, but there is a version mismatch:
a5b72ab2b18c1f9e36f2d5fc6177308a3268eaae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8033/a5b72ab2b18c1f9e36f2d5fc6177308a3268eaae/SetConnections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4071, 12, 4646, 67, 2696, 4672, 3536, 4709, 1459, 18, 225, 1487, 67, 2696, 374, 353, 326, 1191, 1459, 8395, 1172, 315, 22218, 1438, 5746, 635, 30, 3104, 1001, 4646, 67, 7222, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4071, 12, 4646, 67, 2696, 4672, 3536, 4709, 1459, 18, 225, 1487, 67, 2696, 374, 353, 326, 1191, 1459, 8395, 1172, 315, 22218, 1438, 5746, 635, 30, 3104, 1001, 4646, 67, 7222, ...
def refresh(self, repo, msg=None, short=False):
def refresh(self, repo, msg='', short=False):
def refresh(self, repo, msg=None, short=False): if len(self.applied) == 0: self.ui.write("No patches applied\n") return wlock = repo.wlock() self.check_toppatch(repo) (top, patch) = (self.applied[-1].rev, self.applied[-1].name) top = revlog.bin(top) cparents = repo.changelog.parents(top) patchparent = self.qparents(repo, top) message, comments, user, date, patchfound = self.readheaders(patch)
cc665da59721a9e3227176be79757544d794638f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/cc665da59721a9e3227176be79757544d794638f/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 12, 2890, 16, 3538, 16, 1234, 2218, 2187, 3025, 33, 8381, 4672, 309, 562, 12, 2890, 18, 438, 3110, 13, 422, 374, 30, 365, 18, 4881, 18, 2626, 2932, 2279, 16482, 6754, 64, 82, 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, 4460, 12, 2890, 16, 3538, 16, 1234, 2218, 2187, 3025, 33, 8381, 4672, 309, 562, 12, 2890, 18, 438, 3110, 13, 422, 374, 30, 365, 18, 4881, 18, 2626, 2932, 2279, 16482, 6754, 64, 82, 7...
num = forms.ChoiceField(choices=get_vessel_choices)
num = forms.ChoiceField(choices=get_vessel_choices, error_messages={'required' : 'Please enter the number of vessels to acquire'})
def gen_get_form(geni_user,req_post=None): """ <Purpose> Dynamically generates a GetVesselsForm that has the right number vessels (the allowed number of vessels a user may acquire). Possibly generate a GetVesselsForm from an HTTP POST request. <Arguments> geni_user: geni_user object req_post: An HTTP POST request (django) object from which a GetVesselsForm may be instantiated. If this argument is not supplied, a blank form will be created <Exceptions> None? <Side Effects> None. <Returns> A GetVesselsForm object that is instantiated with a req_post (if given). None is returned if the user cannot acquire any more vessels. """
735d9fee6c6d0c6b2f36302a6b6c6e8f994a6bdc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/735d9fee6c6d0c6b2f36302a6b6c6e8f994a6bdc/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 588, 67, 687, 12, 4507, 77, 67, 1355, 16, 3658, 67, 2767, 33, 7036, 4672, 3536, 411, 10262, 4150, 34, 12208, 1230, 6026, 279, 968, 58, 403, 10558, 1204, 716, 711, 326, 2145, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 588, 67, 687, 12, 4507, 77, 67, 1355, 16, 3658, 67, 2767, 33, 7036, 4672, 3536, 411, 10262, 4150, 34, 12208, 1230, 6026, 279, 968, 58, 403, 10558, 1204, 716, 711, 326, 2145, ...
self.read_single()
self.read_urlencoded()
def __init__(self, fp=None, headers=None, outerboundary="", environ=os.environ, keep_blank_values=0, strict_parsing=0): """Constructor. Read multipart/* until last part.
a34762ab857cc7e2fd37ac84ca5ccf58b2cfcbe6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/a34762ab857cc7e2fd37ac84ca5ccf58b2cfcbe6/cgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4253, 33, 7036, 16, 1607, 33, 7036, 16, 6390, 16604, 1546, 3113, 5473, 33, 538, 18, 28684, 16, 3455, 67, 12111, 67, 2372, 33, 20, 16, 5490, 67, 24979, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4253, 33, 7036, 16, 1607, 33, 7036, 16, 6390, 16604, 1546, 3113, 5473, 33, 538, 18, 28684, 16, 3455, 67, 12111, 67, 2372, 33, 20, 16, 5490, 67, 24979, ...
self.__azimutahl_err2__=kwargs["azimuthal_err2"] if self.__azimutahl__==None:
self.__azimuthal_err2__=kwargs["azimuthal_err2"] if self.__azimuthal__==None:
def __init__(self,**kwargs): # primary flight path try: self.__L0=kwargs["primary"] except KeyError: self.__L0=None #secondary flight path try: self.__secondary__=kwargs["secondary"] except KeyError: self.__secondary__=None try: self.__secondary_err2__=kwargs["secondary_err2"] if self.__secondary__==None: raise AssertionError,"Cannot set uncertainty in secondary "\ +"flight path without value" except KeyError: self.__secondary_err2__=None
85efe6249df4893f9ec2c9f7cf08b1ecd20986f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/762/85efe6249df4893f9ec2c9f7cf08b1ecd20986f2/instrument.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 636, 4333, 4672, 468, 3354, 25187, 589, 775, 30, 365, 16186, 48, 20, 33, 4333, 9614, 8258, 11929, 1335, 4999, 30, 365, 16186, 48, 20, 33, 7036, 225, 468,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 636, 4333, 4672, 468, 3354, 25187, 589, 775, 30, 365, 16186, 48, 20, 33, 4333, 9614, 8258, 11929, 1335, 4999, 30, 365, 16186, 48, 20, 33, 7036, 225, 468,...
def _login(self, *args, **kwargs): d = self.factory.login(self.creds, None) d.addCallback(self._LoginConnected3) return d factory = ClientFactory(_login, (), {}) factory.continueTrying = False self.connection = reactor.connectTCP(self.hostname, self.port, factory)
d = self.factory.login(self.creds, None) d.addCallback(self._LoginConnected3) return d
def _login(self, *args, **kwargs): d = self.factory.login(self.creds, None) d.addCallback(self._LoginConnected3) return d
53db6e6d94620c51267e1f2f876662c701f8b791 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/53db6e6d94620c51267e1f2f876662c701f8b791/test_remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5819, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 302, 273, 365, 18, 6848, 18, 5819, 12, 2890, 18, 29260, 16, 599, 13, 302, 18, 1289, 2428, 12, 2890, 6315, 5358, 8932, 23, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5819, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 302, 273, 365, 18, 6848, 18, 5819, 12, 2890, 18, 29260, 16, 599, 13, 302, 18, 1289, 2428, 12, 2890, 6315, 5358, 8932, 23, 13...
return []
def querydb(sql): try: return postgisdb.query(sql).dictresult() except: errors.write("\n-----------\nSQL: %s\n" % (sql,) ) traceback.print_exc(file=errors) errors.write("\n-----------\n") return []
fc7ab07d0f5e394e5c03fb92bbba721fd3f93c13 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11186/fc7ab07d0f5e394e5c03fb92bbba721fd3f93c13/meso_afd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 1966, 12, 4669, 4672, 775, 30, 327, 1603, 15761, 1966, 18, 2271, 12, 4669, 2934, 1576, 2088, 1435, 1335, 30, 1334, 18, 2626, 31458, 82, 13849, 64, 82, 3997, 30, 738, 87, 64, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 1966, 12, 4669, 4672, 775, 30, 327, 1603, 15761, 1966, 18, 2271, 12, 4669, 2934, 1576, 2088, 1435, 1335, 30, 1334, 18, 2626, 31458, 82, 13849, 64, 82, 3997, 30, 738, 87, 64, 82, ...
using_appends = (self.bin and (len(object) > 1)) if (using_appends): write(MARK + LIST + MARK)
if (self.bin): write(EMPTY_LIST)
def save_list(self, object): d = id(object)
971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 1098, 12, 2890, 16, 733, 4672, 302, 273, 612, 12, 1612, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1923, 67, 1098, 12, 2890, 16, 733, 4672, 302, 273, 612, 12, 1612, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def setJobParameters_old(self,jobID,parameters):
def setJobParameters_old( self, jobID, parameters ):
def setJobParameters_old(self,jobID,parameters): """ Set parameters specified by a list of name/value pairs for the job JobID """
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2278, 2402, 67, 1673, 12, 365, 16, 28913, 16, 1472, 262, 30, 3536, 1000, 1472, 1269, 635, 279, 666, 434, 508, 19, 1132, 5574, 364, 326, 1719, 22137, 3536, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2278, 2402, 67, 1673, 12, 365, 16, 28913, 16, 1472, 262, 30, 3536, 1000, 1472, 1269, 635, 279, 666, 434, 508, 19, 1132, 5574, 364, 326, 1719, 22137, 3536, 2, -100, -100, -100, -10...
import profiling.lsprofcalltree as lsprofcalltree
import Pootle.profiling.lsprofcalltree as lsprofcalltree
def profile_runner(server, options): import cProfile import profiling.lsprofcalltree as lsprofcalltree def write_cache_grind(profiler, file): k_cache_grind = lsprofcalltree.KCacheGrind(profiler) k_cache_grind.output(file) file.close() def do_profile_run(file): profiler = cProfile.Profile() try: profiler.runcall(simplewebserver.run, server, options) finally: write_cache_grind(profiler, file) try: profile_file = open(options.profile, "w+") do_profile_run(profile_file) except IOError, _e: print "Could not open profiling file %s" % (options.profile,)
6d6cf19a67a11a66bc23985c6450b5f7376e433f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11388/6d6cf19a67a11a66bc23985c6450b5f7376e433f/pootle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3042, 67, 18156, 12, 3567, 16, 702, 4672, 1930, 276, 4029, 1930, 453, 1632, 298, 18, 16121, 4973, 18, 3251, 16121, 1991, 3413, 487, 7180, 16121, 1991, 3413, 225, 1652, 1045, 67, 2493, 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, 3042, 67, 18156, 12, 3567, 16, 702, 4672, 1930, 276, 4029, 1930, 453, 1632, 298, 18, 16121, 4973, 18, 3251, 16121, 1991, 3413, 487, 7180, 16121, 1991, 3413, 225, 1652, 1045, 67, 2493, 67...
' ON DELETE RESTRICT' % (auxTable, auxTable) )
' ON DELETE RESTRICT' % ( auxTable, auxTable ) )
def _createTables( self, tableDict, force=False ): """ tableDict: tableName: { 'Fields' : { 'Field': 'Description' }, 'ForeignKeys': {'Field': 'Table' }, 'PrimaryKey': 'Id', 'Indexes': { 'Index': [] }, 'UniqueIndexes': { 'Index': [] }, 'Engine': 'InnoDB' } only 'Fields' is a mandatory key.
0e53f5944800e7e4e2a93a0c3f1aefa6be7f7b08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/0e53f5944800e7e4e2a93a0c3f1aefa6be7f7b08/MySQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 6905, 12, 365, 16, 1014, 5014, 16, 2944, 33, 8381, 262, 30, 3536, 1014, 5014, 30, 4775, 30, 288, 296, 2314, 11, 294, 288, 296, 974, 4278, 296, 3291, 11, 19879, 296, 28285, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2640, 6905, 12, 365, 16, 1014, 5014, 16, 2944, 33, 8381, 262, 30, 3536, 1014, 5014, 30, 4775, 30, 288, 296, 2314, 11, 294, 288, 296, 974, 4278, 296, 3291, 11, 19879, 296, 28285, ...
def delete(rhn, list):
def delete(rhn, list, noconfirm=False):
def delete(rhn, list): for server in list: print "Removing %s..." % server["name"] rhn.system.deleteSystems(int(server["id"]))
e47487d5b3431057f21545aceaa0cd7e573e5e4f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5055/e47487d5b3431057f21545aceaa0cd7e573e5e4f/oldSystems.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 30138, 82, 16, 666, 16, 290, 16550, 74, 3985, 33, 8381, 4672, 364, 1438, 316, 666, 30, 1172, 315, 18939, 738, 87, 7070, 738, 1438, 9614, 529, 11929, 6259, 82, 18, 4299, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 30138, 82, 16, 666, 16, 290, 16550, 74, 3985, 33, 8381, 4672, 364, 1438, 316, 666, 30, 1172, 315, 18939, 738, 87, 7070, 738, 1438, 9614, 529, 11929, 6259, 82, 18, 4299, 18, ...
assert(ps.getLeaf("Gr08").allCertain())
assert(not ps.getLeaf("Gr08").allCertain())
def testPredictSplits7(self): print "\ntest 7 begins" ps = PredictSplits("Gr", "Gr08", ['Titan', 'Angel', 'Gargoyle', 'Gargoyle', 'Centaur', 'Centaur', 'Ogre', 'Ogre']) ps.printLeaves()
29f105858f8a8c5d94f98471fb58ccd85ebaa865 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3755/29f105858f8a8c5d94f98471fb58ccd85ebaa865/test_predictsplits.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21362, 16582, 27, 12, 2890, 4672, 1172, 1548, 496, 395, 2371, 17874, 6, 4250, 273, 19166, 933, 16582, 2932, 20799, 3113, 315, 20799, 6840, 3113, 10228, 56, 305, 304, 2187, 296, 22757...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21362, 16582, 27, 12, 2890, 4672, 1172, 1548, 496, 395, 2371, 17874, 6, 4250, 273, 19166, 933, 16582, 2932, 20799, 3113, 315, 20799, 6840, 3113, 10228, 56, 305, 304, 2187, 296, 22757...
output = []
output = []
def sort_fields(input, full=True): output = [] for group in field_order: output += [k for k in fields[group] if k in input] if full: output += [k for k in input if k not in output] return output
7bfdd6cf843f7c280052f64576adefce4057c648 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4609/7bfdd6cf843f7c280052f64576adefce4057c648/accdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 2821, 12, 2630, 16, 1983, 33, 5510, 4672, 876, 273, 5378, 364, 1041, 316, 652, 67, 1019, 30, 876, 1011, 306, 79, 364, 417, 316, 1466, 63, 1655, 65, 309, 417, 316, 810, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 2821, 12, 2630, 16, 1983, 33, 5510, 4672, 876, 273, 5378, 364, 1041, 316, 652, 67, 1019, 30, 876, 1011, 306, 79, 364, 417, 316, 1466, 63, 1655, 65, 309, 417, 316, 810, 65, ...
self.cur_saved_r = 1 self.cur_saved_c = 1
self.cur_saved_r = 1 self.cur_saved_c = 1
def __init__ (self, r=24,c=80): self.rows = r self.cols = c self.cur_r = 1 self.cur_c = 1
cfa572ed6a74538df062e539442271b2ff84abec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/cfa572ed6a74538df062e539442271b2ff84abec/ansi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 436, 33, 3247, 16, 71, 33, 3672, 4672, 365, 18, 3870, 273, 436, 365, 18, 6842, 273, 276, 365, 18, 1397, 67, 86, 273, 404, 365, 18, 1397, 67, 71, 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, 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, 261, 2890, 16, 436, 33, 3247, 16, 71, 33, 3672, 4672, 365, 18, 3870, 273, 436, 365, 18, 6842, 273, 276, 365, 18, 1397, 67, 86, 273, 404, 365, 18, 1397, 67, 71, 273...
values.clear() for category, value in ratings.items(): if category not in ["generic", "modified"]: values[category] = {value: True}
values[category] = {} for value in catdata['rvalues']: values[category][value] = False
def _reset_ratings (): ratings.clear() for category, catdata in service['categories'].items(): if catdata['rvalues']: ratings[category] = catdata['rvalues'][0] else: ratings[category] = "" values.clear() for category, value in ratings.items(): if category not in ["generic", "modified"]: values[category] = {value: True} rating_modified.clear()
bfc4984cb80cf8fabc9960826812d18008675f28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/bfc4984cb80cf8fabc9960826812d18008675f28/rating_html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6208, 67, 17048, 899, 1832, 30, 15183, 899, 18, 8507, 1435, 364, 3150, 16, 6573, 892, 316, 1156, 3292, 8995, 29489, 3319, 13332, 309, 6573, 892, 3292, 86, 2372, 3546, 30, 15183, 899...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6208, 67, 17048, 899, 1832, 30, 15183, 899, 18, 8507, 1435, 364, 3150, 16, 6573, 892, 316, 1156, 3292, 8995, 29489, 3319, 13332, 309, 6573, 892, 3292, 86, 2372, 3546, 30, 15183, 899...
n.append(nodes.inline(text=t))
n.append(nodes.Text(t))
def mol_role(role, rawtext, text, lineno, inliner, options={}, content=[]): n = [] t = '' while text: if text[0] == '_': n.append(nodes.inline(text=t)) t = '' n.append(nodes.subscript(text=text[1])) text = text[2:] else: t += text[0] text = text[1:] n.append(nodes.inline(text=t)) return n, []
e06b3f55fb1de0d9075490f87b30f18c00eabdf5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/e06b3f55fb1de0d9075490f87b30f18c00eabdf5/ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12629, 67, 4615, 12, 4615, 16, 1831, 955, 16, 977, 16, 7586, 16, 316, 7511, 264, 16, 702, 28793, 913, 33, 8526, 4672, 290, 273, 5378, 268, 273, 875, 1323, 977, 30, 309, 977, 63, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12629, 67, 4615, 12, 4615, 16, 1831, 955, 16, 977, 16, 7586, 16, 316, 7511, 264, 16, 702, 28793, 913, 33, 8526, 4672, 290, 273, 5378, 268, 273, 875, 1323, 977, 30, 309, 977, 63, 20, ...
""" Clear the variable named var. """ if self._expect is None: return try: self._expect.sendline('kill(%s);'%var) self._expect.expect(self._prompt) except: pass
""" Clear the variable named var. """ if self._expect is None: return try: self._expect.sendline('kill(%s);\n'%var) except: pass
def clear(self, var): """ Clear the variable named var. """ if self._expect is None: return try: self._expect.sendline('kill(%s);'%var) self._expect.expect(self._prompt) except: # program around weirdness in pexpect pass
a18f00b7298faee6265f602cf0953040536edf21 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a18f00b7298faee6265f602cf0953040536edf21/maxima.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 12, 2890, 16, 569, 4672, 3536, 10121, 326, 2190, 4141, 569, 18, 3536, 309, 365, 6315, 12339, 353, 599, 30, 327, 775, 30, 365, 6315, 12339, 18, 4661, 1369, 2668, 16418, 9275, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 12, 2890, 16, 569, 4672, 3536, 10121, 326, 2190, 4141, 569, 18, 3536, 309, 365, 6315, 12339, 353, 599, 30, 327, 775, 30, 365, 6315, 12339, 18, 4661, 1369, 2668, 16418, 9275, 87, ...
portfolio_entry = PortfolioEntry.objects.filter(person=person, project=project)[0]
portfolio_entry = mysite.profile.models.PortfolioEntry.objects.filter(person=person, project=project)[0]
def create_citations_from_github_results(dia_id, results, override_contrib=None): repos, dict_mapping_repos_to_languages = results dia = DataImportAttempt.objects.get(id=dia_id) person = dia.person for repo in repos: (project, _) = Project.objects.get_or_create(name=repo.name) # FIXME: Populate project description, name, etc. if PortfolioEntry.objects.filter(person=person, project=project).count() == 0: portfolio_entry = PortfolioEntry(person=person, project=project, project_description=repo.description) portfolio_entry.save() portfolio_entry = PortfolioEntry.objects.filter(person=person, project=project)[0] citation = Citation() citation.languages = "" # FIXME ", ".join(result['languages']) if repo.fork: citation.contributor_role = 'Forked' else: citation.contributor_role = 'Started' if override_contrib: citation.contributor_role = override_contrib citation.portfolio_entry = portfolio_entry citation.data_import_attempt = dia citation.url = 'http://github.com/%s/%s/' % (urllib.quote_plus(repo.owner), urllib.quote_plus(repo.name)) citation.save_and_check_for_duplicates() person.last_polled = datetime.datetime.now() person.save() dia.completed = True dia.save()
f1d0d2222a9a25e0a8611c6a5776e209776dcdc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/f1d0d2222a9a25e0a8611c6a5776e209776dcdc0/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 71, 18282, 67, 2080, 67, 6662, 67, 4717, 12, 72, 1155, 67, 350, 16, 1686, 16, 3849, 67, 26930, 33, 7036, 4672, 13686, 16, 2065, 67, 6770, 67, 15564, 67, 869, 67, 14045, 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, 752, 67, 71, 18282, 67, 2080, 67, 6662, 67, 4717, 12, 72, 1155, 67, 350, 16, 1686, 16, 3849, 67, 26930, 33, 7036, 4672, 13686, 16, 2065, 67, 6770, 67, 15564, 67, 869, 67, 14045, 273,...
def __init__(self): pass
def __init__(self): pass
8a200e74bea2fe385e2d07999447d7dffb53bffc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8a200e74bea2fe385e2d07999447d7dffb53bffc/cursesclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...