rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
(rc,exists) = semanage_seuser_exists(self.sh, k) | (rc, exists) = semanage_seuser_exists(self.sh, k) | def __delete(self, name): (rc,k) = semanage_seuser_key_create(self.sh, name) if rc < 0: raise ValueError(_("Could not create a key for %s") % name) | 8ad29a27255b6eb5a4f8e1083ce9832034f3e205 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7147/8ad29a27255b6eb5a4f8e1083ce9832034f3e205/seobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
12,
2890,
16,
508,
4672,
261,
1310,
16,
79,
13,
273,
6111,
304,
410,
67,
307,
1355,
67,
856,
67,
2640,
12,
2890,
18,
674,
16,
508,
13,
309,
4519,
411,
374,
30,
1002,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
12,
2890,
16,
508,
4672,
261,
1310,
16,
79,
13,
273,
6111,
304,
410,
67,
307,
1355,
67,
856,
67,
2640,
12,
2890,
18,
674,
16,
508,
13,
309,
4519,
411,
374,
30,
1002,
20... |
((1, 3), 2) ((1, 0), 2) ((0, 2), 3) | def in_degree_iterator(self, vertices=None, labels=False): """ Same as degree_iterator, but for in degree. EXAMPLES: sage: D = graphs.Grid2dGraph(2,4).to_directed() sage: for i in D.in_degree_iterator(): ... print i 3 3 2 2 3 2 2 3 sage: for i in D.in_degree_iterator(labels=True): ... print i ((0, 1), 3) ((1, 2), 3) ((0, 0), 2) ((0, 3), 2) ((1, 1), 3) ((1, 3), 2) ((1, 0), 2) ((0, 2), 3) | c6ee9b8c95a50319119e91b8cfe37d340af4ae88 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c6ee9b8c95a50319119e91b8cfe37d340af4ae88/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
67,
21361,
67,
9838,
12,
2890,
16,
6928,
33,
7036,
16,
3249,
33,
8381,
4672,
3536,
17795,
487,
10782,
67,
9838,
16,
1496,
364,
316,
10782,
18,
225,
5675,
8900,
11386,
30,
272,
410... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
67,
21361,
67,
9838,
12,
2890,
16,
6928,
33,
7036,
16,
3249,
33,
8381,
4672,
3536,
17795,
487,
10782,
67,
9838,
16,
1496,
364,
316,
10782,
18,
225,
5675,
8900,
11386,
30,
272,
410... | |
self.selectAtomsDashboard.setGeometry(QRect(0,0,85,16)) | self.selectAtomsDashboard.setGeometry(QRect(0,0,94,19)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | 12c8fe24cb1ace55e7caf0b09c7238554087208a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/12c8fe24cb1ace55e7caf0b09c7238554087208a/MainWindowUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
2242,
273,
374,
4672,
2238,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
2242,
13,
365,
18,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
2242,
273,
374,
4672,
2238,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
2242,
13,
365,
18,
23... |
def __addInstanceHistory( self, instanceID, status, load=0.0 ): | def __addInstanceHistory( self, instanceID, status, load = 0.0 ): | def __addInstanceHistory( self, instanceID, status, load=0.0 ): """ Insert a History Record """ self._insert( 'vm_History' , [ 'VMInstanceID', 'Status', 'Load', 'Update' ], [ instanceID, status, load, DIRAC.Time.toString() ] ) return | ffd68308bfb470792ef1da9755f9b63d0515e44e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12038/ffd68308bfb470792ef1da9755f9b63d0515e44e/VirtualMachineDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
1442,
5623,
12,
365,
16,
23283,
16,
1267,
16,
1262,
273,
374,
18,
20,
262,
30,
3536,
8040,
279,
16058,
5059,
3536,
365,
6315,
6387,
12,
296,
3489,
67,
5623,
11,
269,
306,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
1442,
5623,
12,
365,
16,
23283,
16,
1267,
16,
1262,
273,
374,
18,
20,
262,
30,
3536,
8040,
279,
16058,
5059,
3536,
365,
6315,
6387,
12,
296,
3489,
67,
5623,
11,
269,
306,
... |
if (lsKey == "") and (requestFile.find("LSRegisterRequest.xml") > 0): | if requestFile.find("LSRegisterRequest.xml") > 0: | def main(): global verbose, requestDir, options hostName = ifAddr = ifName = key = src = dst = maKey = lsKey = "" options = getOptions() inputFile, testDescription, expectedOutput, getAllRequest = loadTestConfigFile(options.configFile) #print inputFile #print testDescription #print expectedOutput # catch stdout of execed programs here logfname = "%s/%s.%d.log" % (logdir,os.path.basename(sys.argv[0]), os.getuid()) fd = open(logfname, 'a') if options.csv: try: csvFile = open(timingResultsFile, "a") except: print "Error opening file %s " % timingResultsFile sys.exit(-1) if getAllRequest != "": # 1st get list of interfaces rf = requestDir + "/" + getAllRequest print "Getting list of all Interfaces from the MA at %s using request file: %s " % (options.PS_url, rf) data,t = timeIt(runClient,fd,logfname,options.PS_url, rf) # save results to file resultFile = logdir + os.path.basename(getAllRequest) + ".reply" if verbose > 0: print "Creating reply file (%d lines of data): %s" % (len(data), resultFile) file = open(resultFile, "w") # updated file with actual data file.writelines(data) file.close() if options.PS_url.find("perfSONARBOUY") > 0 or options.PS_url.find("pSB") > 0 or options.PS_url.find("pinger") > 0: src, dst, key, nr = pickEndPointPair(resultFile) print "Using src/dst randomly selected interface: %s : %s (key = %s)" % ( src, dst, key) else: hostName, ifAddr, ifName, key, nr = pickInterface(resultFile) print "Using interface randomly selected interface %s:%s (key=%s)" % (hostName, ifName, key) if options.csv: csvFile.write("\n%s\n" % options.PS_url) csvFile.write("TestNum, Timing, DataSize, Description \n\n") csvFile.write("%d, %f, %d %s\n" % (1, float(t), nr, "Get All Metadata")) testNum = total_pass = total_fail = 0 for requestFile in inputFile: print "-----------------------------------------" print "Testing using file: ", requestFile rf = requestDir + "/" + requestFile try: tree = ElementTree.parse(rf) except: print "Error parsing request file %s" % rf sys.exit(-1) now = int(time.time()) # replace elements in test request files as necessary #if hostName == "": # needed for PingER tests, maybe (XXX) # hostName = src; # NOTE: could make sure these are only called for the appropriate request types, # but its easier to just call them every time even if not needed replaceElementTopoAttribute(tree, "src", "value", src) replaceElementTopoAttribute(tree, "dst", "value", dst) replaceElement(tree, "ifAddress", ifAddr) replaceElement(tree, "hostName", hostName) replaceElement(tree, "ifName", ifName) replaceXQuery(tree, "subject", lsKey) # for LS queries replaceElementAttribute(tree, "parameter", "maKey", key) replaceElementAttribute(tree, "parameter", "lsKey", lsKey) if options.PS_url.find("pinger") > 0: # only do 1 hour for PingER replaceElementAttribute(tree, "parameter", "startTime", "%s" % (now - (3600)) ) # 1 hrs ago else: replaceElementAttribute(tree, "parameter", "startTime", "%s" % (now - (3600 * 12)) ) # 12 hrs ago replaceElementAttribute(tree, "parameter", "endTime", "%s" % (now - 600) ) # 10 min ago #write out the modified XML testFile = logdir + os.path.basename(requestFile) + ".test" file = open(testFile, "w") # updated file with actual data tree.write(file) file.close() if verbose > 0: print "Running test %d: %s " % (testNum, testDescription[testNum]) print "using request file: ", testFile data,t = timeIt(runClient,fd,logfname, options.PS_url, testFile) #print "Got reply: %d lines " % len(data) # save results to file resultFile = logdir + os.path.basename(requestFile) + ".reply" file = open(resultFile, "w") # updated file with actual data file.writelines(data) file.close() # now use xpath to make sure the reply looks OK. tree = ElementTree.parse(resultFile) if options.debug: # print out results print "------------------------------------------------------" ElementTree.dump(tree) print "------------------------------------------------------" found_error = 0 # check for errors for e in tree.findall("//%seventType/" % NMWG): if e != None and e.text.find("error") >= 0: error = tree.find("//%sdatum/" % NMWGR).text print "Got error message: ", error print "Test Failed!" found_error = 1 #sys.exit() # sometimes useful for debugging break # special handling for LS: need to save the lsKey returned by LSRegisterRequest-key.xml if (lsKey == "") and (requestFile.find("LSRegisterRequest.xml") > 0): #print " *** looking for LS key" for e in tree.findall("//%sparameter" % NMWG): if e.get("name") == "lsKey": print " *** found LS key to use in remaining tests *** = %s " % e.text lsKey = e.text if lsKey == "": # cant continue if not found print "Error: no lsKey found. Exiting " sys.exit(-1) if found_error == 0: result = CheckResult(testNum, expectedOutput[testNum], tree) else: result = 0 if result > 0: total_pass += 1 else: total_fail += 1 if options.csv: csvFile.write("%d, %f, %d, %s \n" % (testNum+2, float(t), result, testDescription[testNum])) testNum += 1 print "\nTotal of %d tests passed and %d tests failed. " % (total_pass, total_fail) if options.csv: print "results can be found in file: ", timingResultsFile print "Done." sys.exit(1) | d8ca081b079b75948e42361b2b9d6ab8fdaacb30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4678/d8ca081b079b75948e42361b2b9d6ab8fdaacb30/test_PS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
2552,
3988,
16,
590,
1621,
16,
702,
19266,
273,
309,
3178,
273,
309,
461,
273,
498,
273,
1705,
273,
3046,
273,
10843,
653,
273,
7180,
653,
273,
1408,
702,
273,
9849,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
2552,
3988,
16,
590,
1621,
16,
702,
19266,
273,
309,
3178,
273,
309,
461,
273,
498,
273,
1705,
273,
3046,
273,
10843,
653,
273,
7180,
653,
273,
1408,
702,
273,
9849,
... |
editor = config_parser.get(SECTION_HEADER, 'spreadsheet_editor') | editor = config_parser.safe_get(SECTION_HEADER, 'spreadsheet_editor') | def get_editor(doctype_label, config_parser): """Return editor for file based on entry type and preferences file. Editor is determined in an order of preference: 1) Try to load the editor for the specific type (spreadsheet, document, etc.) 2) If no specification, try to load the "editor" option from config file. 3) If no default editor, try to load the EDITOR environment variable. 4) If no EDITOR variable, return None. Keyword arguments: doctype_label: A string representing the type of document to edit. Returns: Editor to use to edit the document. """ LOG.debug('In get_editor, doctype_label: ' + str(doctype_label)) editor = None if doctype_label == SPREADSHEET_LABEL: editor = config_parser.get(SECTION_HEADER, 'spreadsheet_editor') elif doctype_label == DOCUMENT_LABEL: editor = config_parser.get(SECTION_HEADER, 'document_editor') elif doctype_label == PDF_LABEL: editor = config_parser.get(SECTION_HEADER, 'pdf_editor') elif doctype_label == PRESENTATION_LABEL: editor = config_parser.get(SECTION_HEADER, 'presentation_editor') elif doctype_label is not None: LOG.error('Unknown document type label: %s' % doctype_label) if not editor: editor = config_parser.safe_get(SECTION_HEADER, 'editor') if not editor: editor = os.getenv('EDITOR') return editor | 266c861e7b5fdbf8d6ff0cbcf313b29b0b0c3ff9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/266c861e7b5fdbf8d6ff0cbcf313b29b0b0c3ff9/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9177,
12,
2896,
12387,
67,
1925,
16,
642,
67,
4288,
4672,
3536,
990,
4858,
364,
585,
2511,
603,
1241,
618,
471,
12750,
585,
18,
225,
18451,
353,
11383,
316,
392,
1353,
434,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9177,
12,
2896,
12387,
67,
1925,
16,
642,
67,
4288,
4672,
3536,
990,
4858,
364,
585,
2511,
603,
1241,
618,
471,
12750,
585,
18,
225,
18451,
353,
11383,
316,
392,
1353,
434,
11... |
if patchmode: message("Patch preview mode not implemented for `%s'" % fname) | def processfile(fname): """Process a single file, looking for updates and any other checks we have enabled for all the files.""" if not fname: return None debug(2, "Processing file `%s'" % fname) if os.path.isdir(fname): # We don't do anything with directories. Symlinks and other # files which stand a chance of being readable as plain text are # ok, but directories don't really make sense here, so skip them. debug(2, "Skipping directory `%s'" % fname) return None retval = None info = fileinfo(fname) if info: r = fname if tuplemode: print info else: checkinfo(info) if patchmode: # XXX: Add `patchmode' handling here, to show the diffs of the # XXX: original English text. message("Patch preview mode not implemented for `%s'" % fname) return retval | 55adb7a418beb183b02ccdbe96b3417c597ac2a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11671/55adb7a418beb183b02ccdbe96b3417c597ac2a5/checkupdate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
768,
12,
12749,
4672,
3536,
2227,
279,
2202,
585,
16,
7849,
364,
4533,
471,
1281,
1308,
4271,
732,
1240,
3696,
364,
777,
326,
1390,
12123,
225,
309,
486,
5299,
30,
327,
599,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
768,
12,
12749,
4672,
3536,
2227,
279,
2202,
585,
16,
7849,
364,
4533,
471,
1281,
1308,
4271,
732,
1240,
3696,
364,
777,
326,
1390,
12123,
225,
309,
486,
5299,
30,
327,
599,
225,
... | |
DIRAC.exit(exitCode) | DIRAC.exit( exitCode ) | def usage(): print 'Usage: %s <JobID> [<JobID>]' %(Script.scriptName) DIRAC.exit(2) | b88356c8571ab409f104405a01e9407cfe8f8ed6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b88356c8571ab409f104405a01e9407cfe8f8ed6/dirac-admin-get-job-pilot-output.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
296,
5357,
30,
738,
87,
411,
2278,
734,
34,
306,
32,
2278,
734,
34,
3864,
8975,
3651,
18,
4263,
461,
13,
18544,
2226,
18,
8593,
12,
22,
13,
225,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
296,
5357,
30,
738,
87,
411,
2278,
734,
34,
306,
32,
2278,
734,
34,
3864,
8975,
3651,
18,
4263,
461,
13,
18544,
2226,
18,
8593,
12,
22,
13,
225,
2,
-100,
-100,
-10... |
if args is None: | if not len(args): | def name_search(self, cr, user, name, args=None, operator='ilike', context={}): if args is None: args = [] ids = [] if name: ids = self.search(cr, user, [('obj_num','=',int(name))] + args) if not ids: ids = self.search(cr, user, [('name',operator,name)] + args) return self.name_get(cr, user, ids) | 2fa9a707fadac0f3604cd823b2ec1acf0cb8c95d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2fa9a707fadac0f3604cd823b2ec1acf0cb8c95d/auction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
3072,
12,
2890,
16,
4422,
16,
729,
16,
508,
16,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
12938,
4672,
309,
486,
562,
12,
1968,
4672,
833,
273,
5378,
3258,
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,
508,
67,
3072,
12,
2890,
16,
4422,
16,
729,
16,
508,
16,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
12938,
4672,
309,
486,
562,
12,
1968,
4672,
833,
273,
5378,
3258,
273,
5... |
def strlen(str): | def strlen(s): | def strlen(str): raise DeprecatedIDCError, "strlen() is deprecated. Use python string operations instead." | 4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3203,
12,
87,
4672,
1002,
9336,
734,
39,
668,
16,
315,
10835,
1435,
353,
6849,
18,
2672,
5790,
533,
5295,
3560,
1199,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3203,
12,
87,
4672,
1002,
9336,
734,
39,
668,
16,
315,
10835,
1435,
353,
6849,
18,
2672,
5790,
533,
5295,
3560,
1199,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.state = CInterval.SFinal self.intervalDone() | self.privFinalize() | def privInstant(self): self.privInitialize(self.getDuration()) self.state = CInterval.SFinal self.intervalDone() | 35605ce9ed0bacaeedef1c7b8e831a2c2da73027 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/35605ce9ed0bacaeedef1c7b8e831a2c2da73027/ParticleInterval.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6015,
10675,
12,
2890,
4672,
365,
18,
11365,
7520,
12,
2890,
18,
588,
5326,
10756,
365,
18,
11365,
7951,
554,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6015,
10675,
12,
2890,
4672,
365,
18,
11365,
7520,
12,
2890,
18,
588,
5326,
10756,
365,
18,
11365,
7951,
554,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.emit('ROT_TWO') self.visit(k) | self.emit('ROT_THREE') | def visitDict(self, node): lineno = getattr(node, 'lineno', None) if lineno: self.emit('SET_LINENO', lineno) self.emit('BUILD_MAP', 0) for k, v in node.items: lineno2 = getattr(node, 'lineno', None) if lineno2 is not None and lineno != lineno2: self.emit('SET_LINENO', lineno2) lineno = lineno2 self.emit('DUP_TOP') self.visit(v) self.emit('ROT_TWO') self.visit(k) self.emit('STORE_SUBSCR') | 41e6b957e33735d3fcfcc9511d3ce9ed55b4dc99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41e6b957e33735d3fcfcc9511d3ce9ed55b4dc99/pycodegen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
5014,
12,
2890,
16,
756,
4672,
7586,
273,
3869,
12,
2159,
16,
296,
17782,
2187,
599,
13,
309,
7586,
30,
365,
18,
18356,
2668,
4043,
67,
20663,
1157,
51,
2187,
7586,
13,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
5014,
12,
2890,
16,
756,
4672,
7586,
273,
3869,
12,
2159,
16,
296,
17782,
2187,
599,
13,
309,
7586,
30,
365,
18,
18356,
2668,
4043,
67,
20663,
1157,
51,
2187,
7586,
13,
365,
18,
... |
callback(data) finally: self._receivelock.release() | queue.put(data) else: callback(data) | def _local_receive(self, id, data): # executes in receiver thread self._receivelock.acquire() try: try: callback, endmarker = self._callbacks[id] except KeyError: channel = self._channels.get(id) queue = channel and channel._items if queue is None: pass # drop data else: queue.put(data) else: callback(data) # even if channel may be already closed finally: self._receivelock.release() | a5bfb8e501203c8e51497d9683602631bf98cb56 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7009/a5bfb8e501203c8e51497d9683602631bf98cb56/gateway_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3729,
67,
18149,
12,
2890,
16,
612,
16,
501,
4672,
468,
11997,
316,
5971,
2650,
365,
6315,
8606,
427,
292,
975,
18,
1077,
1039,
1435,
775,
30,
775,
30,
1348,
16,
679,
11145,
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,
389,
3729,
67,
18149,
12,
2890,
16,
612,
16,
501,
4672,
468,
11997,
316,
5971,
2650,
365,
6315,
8606,
427,
292,
975,
18,
1077,
1039,
1435,
775,
30,
775,
30,
1348,
16,
679,
11145,
273,
... |
'unit_amount': fields.float('Unit Price', readonly=True, states={'draft':[('readonly',False)]}), 'unit_quantity': fields.float('Quantities', readonly=True, states={'draft':[('readonly',False)]}), 'product_id': fields.many2one('product.product', 'Product', readonly=True, states={'draft':[('readonly',False)]}), 'uom_id': fields.many2one('product.uom', 'UoM', readonly=True, states={'draft':[('readonly',False)]}), | 'unit_amount': fields.float('Unit Price'), 'unit_quantity': fields.float('Quantities' ), 'product_id': fields.many2one('product.product', 'Product' ), 'uom_id': fields.many2one('product.uom', 'UoM' ), | def _amount(self, cr, uid, ids, field_name, arg, context): if not len(ids): return {} id_set = ",".join(map(str, ids)) cr.execute("SELECT l.id,COALESCE(SUM(l.unit_amount*l.unit_quantity),0) AS amount FROM hr_expense_line l WHERE id IN ("+id_set+") GROUP BY l.id ") res = dict(cr.fetchall()) return res | 55d142f3259c4a8d9b801326716ec2d577d6a00a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/55d142f3259c4a8d9b801326716ec2d577d6a00a/hr_expense.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
309,
486,
562,
12,
2232,
4672,
327,
2618,
612,
67,
542,
273,
5753,
18,
5701,
12,
1458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
309,
486,
562,
12,
2232,
4672,
327,
2618,
612,
67,
542,
273,
5753,
18,
5701,
12,
1458,
... |
argv = [] | argv = None | def get_fork_params(self): """Return all parameters to be passed to the fork_command method of a vte terminal. """ argv = [] shell = self.client.get_string(KEY('/general/default_shell')) or 'sh' login_shell = self.client.get_bool(KEY('/general/use_login_shell')) if login_shell: argv.append('-') | 4c3249ae933490bae2947df246d18404dcec59d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11147/4c3249ae933490bae2947df246d18404dcec59d6/guake.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
23335,
67,
2010,
12,
2890,
4672,
3536,
990,
777,
1472,
358,
506,
2275,
358,
326,
12515,
67,
3076,
707,
434,
279,
331,
736,
8651,
18,
3536,
5261,
273,
599,
5972,
273,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
23335,
67,
2010,
12,
2890,
4672,
3536,
990,
777,
1472,
358,
506,
2275,
358,
326,
12515,
67,
3076,
707,
434,
279,
331,
736,
8651,
18,
3536,
5261,
273,
599,
5972,
273,
365,
18,
... |
def generate_model(self, i, smooth_wind=50, var_wind=30, var_smooth_wind=30): if datasets[i] is None: | def generate_model(self, perception, smooth_wind=None, var_wind=None, var_smooth_wind=None): model_list = self.datasets[perception] import pdb; pdb.set_trace() if model_list is None: | def generate_model(self, i, smooth_wind=50, var_wind=30, var_smooth_wind=30): if datasets[i] is None: log("No data to generate model for") return None | 8c860a65b7d3d0c4154b79977b181d0ece64761d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8117/8c860a65b7d3d0c4154b79977b181d0ece64761d/perception_monitor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
2103,
67,
2284,
12,
2890,
16,
1534,
472,
16,
11957,
67,
10094,
33,
7036,
16,
569,
67,
10094,
33,
7036,
16,
569,
67,
26647,
67,
10094,
33,
7036,
4672,
225,
938,
67,
1098,
273,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
2103,
67,
2284,
12,
2890,
16,
1534,
472,
16,
11957,
67,
10094,
33,
7036,
16,
569,
67,
10094,
33,
7036,
16,
569,
67,
26647,
67,
10094,
33,
7036,
4672,
225,
938,
67,
1098,
273,
36... |
super(self, GuardianInfo).save(*args, **kwargs) | super(GuardianInfo, self).save(*args, **kwargs) | def save(self, *args, **kwargs): super(self, GuardianInfo).save(*args, **kwargs) from esp.mailman import add_list_member add_list_member('announcements', self.user) | 4d511bf30448572fd10e62a9f6b55b42659b08a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12041/4d511bf30448572fd10e62a9f6b55b42659b08a7/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
2240,
12,
16709,
2779,
966,
16,
365,
2934,
5688,
30857,
1968,
16,
2826,
4333,
13,
628,
5001,
84,
18,
4408,
4728,
1930,
527,
67,
109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
2240,
12,
16709,
2779,
966,
16,
365,
2934,
5688,
30857,
1968,
16,
2826,
4333,
13,
628,
5001,
84,
18,
4408,
4728,
1930,
527,
67,
109... |
return SystemCommand.__call__(self, output=output, | return SystemCommand.__call__(self, output=output, | def __call__(self, output=None, dry_run=False, **kwargs): log = open(self.working_dir + "/MT/log", "w"); | ce2dc58fefe09b170cf07c16260340b4a40af598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/ce2dc58fefe09b170cf07c16260340b4a40af598/monotone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
876,
33,
7036,
16,
10299,
67,
2681,
33,
8381,
16,
2826,
4333,
4672,
613,
273,
1696,
12,
2890,
18,
20478,
67,
1214,
397,
2206,
6152,
19,
1330,
3113,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
876,
33,
7036,
16,
10299,
67,
2681,
33,
8381,
16,
2826,
4333,
4672,
613,
273,
1696,
12,
2890,
18,
20478,
67,
1214,
397,
2206,
6152,
19,
1330,
3113,
315,
... |
if uri[0] == '/': | if uri and uri[0] == '/': | def _get_dburi(self, uri): uri = urlparse.urlsplit(uri)[2] if uri[0] == '/': uri = uri[1:] dbname, uri = (uri.split('/', 1) + [None])[0:2] return dbname, uri | 612daa6a8bcaec8fa1fa90ea24810286b6113745 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/612daa6a8bcaec8fa1fa90ea24810286b6113745/webdavsvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1966,
1650,
12,
2890,
16,
2003,
4672,
2003,
273,
15185,
18,
718,
4939,
12,
1650,
25146,
22,
65,
309,
2003,
471,
2003,
63,
20,
65,
422,
2023,
30,
2003,
273,
2003,
63,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1966,
1650,
12,
2890,
16,
2003,
4672,
2003,
273,
15185,
18,
718,
4939,
12,
1650,
25146,
22,
65,
309,
2003,
471,
2003,
63,
20,
65,
422,
2023,
30,
2003,
273,
2003,
63,
21... |
signal.alarm(3) | signal_alarm(3) | def test_main(): if imp.lock_held(): # If the import lock is held, the threads will hang raise TestSkipped("can't run when import lock is held") test.test_support.run_unittest(SocketServerTest) | 3d83d2bcdfd4a178974be1629cb35b7c208f29ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/3d83d2bcdfd4a178974be1629cb35b7c208f29ba/test_socketserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
309,
1646,
18,
739,
67,
76,
488,
13332,
468,
971,
326,
1930,
2176,
353,
15770,
16,
326,
7403,
903,
25733,
1002,
7766,
16425,
2932,
4169,
1404,
1086,
1347,
1930,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
309,
1646,
18,
739,
67,
76,
488,
13332,
468,
971,
326,
1930,
2176,
353,
15770,
16,
326,
7403,
903,
25733,
1002,
7766,
16425,
2932,
4169,
1404,
1086,
1347,
1930,
21... |
γεμάτος περιπέτειες, γεμάτος γνώσεις. [...] </small>''' | γεμάτος περιπέτειες, γεμάτος γνώσεις. [...] </small>''' % weburl | def setUp(self): """Prepare some ideal outputs""" | 8e9466aff4b3b55478b17bc559b21d034ec18350 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2763/8e9466aff4b3b55478b17bc559b21d034ec18350/bibformat_regression_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
3536,
7543,
2690,
23349,
6729,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
3536,
7543,
2690,
23349,
6729,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
mock.util.rmtree(self.basedir, selinux=self.selinux) | self._unlock_and_rm_chroot() | def scrub(self, scrub_opts): """clean out chroot and/or cache dirs with extreme prejudice :)""" self.tryLockBuildRoot() self.state("clean") self._callHooks('clean') for scrub in scrub_opts: if scrub == 'all': mock.util.rmtree(self.basedir, selinux=self.selinux) self.chrootWasCleaned = True mock.util.rmtree(self.cachedir, selinux=self.selinux) elif scrub == 'chroot': mock.util.rmtree(self.basedir, selinux=self.selinux) self.chrootWasCleaned = True elif scrub == 'cache': mock.util.rmtree(self.cachedir, selinux=self.selinux) elif scrub == 'c-cache': mock.util.rmtree(os.path.join(self.cachedir, 'ccache'), selinux=self.selinux) elif scrub == 'root-cache': mock.util.rmtree(os.path.join(self.cachedir, 'root_cache'), selinux=self.selinux) elif scrub == 'yum-cache': mock.util.rmtree(os.path.join(self.cachedir, 'yum_cache'), selinux=self.selinux) | 6c003bc0a39b4a0523a16923101192757ce08d47 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7328/6c003bc0a39b4a0523a16923101192757ce08d47/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11991,
373,
12,
2890,
16,
11991,
373,
67,
4952,
4672,
3536,
6200,
596,
462,
3085,
471,
19,
280,
1247,
7717,
598,
23755,
73,
675,
78,
1100,
1812,
294,
15574,
365,
18,
698,
2531,
3116,
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,
11991,
373,
12,
2890,
16,
11991,
373,
67,
4952,
4672,
3536,
6200,
596,
462,
3085,
471,
19,
280,
1247,
7717,
598,
23755,
73,
675,
78,
1100,
1812,
294,
15574,
365,
18,
698,
2531,
3116,
2... |
series += specific_subtags(f, 'av') | series += ' -- '.join(specific_subtags(f, 'av')) | def find_series(r, edition): series = [] for tag in ('440', '490', '830'): for f in r.get_fields(tag): series += specific_subtags(f, 'av') if series: edition["series"] = series | da804bedd5a86ca4953a76539728719f215e8cf0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/da804bedd5a86ca4953a76539728719f215e8cf0/parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
10222,
12,
86,
16,
28432,
4672,
4166,
273,
5378,
364,
1047,
316,
7707,
6334,
20,
2187,
296,
7616,
20,
2187,
296,
28,
5082,
11,
4672,
364,
284,
316,
436,
18,
588,
67,
2821,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
10222,
12,
86,
16,
28432,
4672,
4166,
273,
5378,
364,
1047,
316,
7707,
6334,
20,
2187,
296,
7616,
20,
2187,
296,
28,
5082,
11,
4672,
364,
284,
316,
436,
18,
588,
67,
2821,
... |
cr.execute('update use_control_time set uploaded=True where (not uploaded) or (uploaded is null)') | cr.execute('update use_control_time set uploaded=%s where (uploaded = %s) or (uploaded is null)', (True, False)) | def data_get(self, password, db): security.check_super(password) cr = pooler.get_db(db).cursor() cr.execute('''select to_char(t.date, 'YYYY-MM-DD') as date, u.name as username, u.login as login, sum(t.duration) as hours from use_control_time t left join res_users u on (u.id=t.user_id) where (not uploaded) or (uploaded is null) group by to_char(t.date, 'YYYY-MM-DD'), u.name, u.login ''') data = cr.fetchall() cr.execute('update use_control_time set uploaded=True where (not uploaded) or (uploaded is null)') cr.execute('select name from ir_module_module where state=%s', ('installed',)) modules = map(lambda x: x[0], cr.fetchall()) | f429c1177bd0cdcd22cab3106e3fc5a22e018232 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/f429c1177bd0cdcd22cab3106e3fc5a22e018232/services.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
501,
67,
588,
12,
2890,
16,
2201,
16,
1319,
4672,
4373,
18,
1893,
67,
9565,
12,
3664,
13,
4422,
273,
2845,
264,
18,
588,
67,
1966,
12,
1966,
2934,
9216,
1435,
4422,
18,
8837,
2668,
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,
501,
67,
588,
12,
2890,
16,
2201,
16,
1319,
4672,
4373,
18,
1893,
67,
9565,
12,
3664,
13,
4422,
273,
2845,
264,
18,
588,
67,
1966,
12,
1966,
2934,
9216,
1435,
4422,
18,
8837,
2668,
6... |
self.connected = 1 | self.connected = True | def __init__(self, fd): dispatcher.__init__(self) self.connected = 1 # set it to non-blocking mode flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0) flags = flags | os.O_NONBLOCK fcntl.fcntl(fd, fcntl.F_SETFL, flags) self.set_file(fd) | f94fbfa5fad912cd8d3e8c9796714e413449545b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f94fbfa5fad912cd8d3e8c9796714e413449545b/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5194,
4672,
7393,
16186,
2738,
972,
12,
2890,
13,
365,
18,
8537,
273,
1053,
468,
444,
518,
358,
1661,
17,
18926,
1965,
2943,
273,
30894,
18,
7142,
16681,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5194,
4672,
7393,
16186,
2738,
972,
12,
2890,
13,
365,
18,
8537,
273,
1053,
468,
444,
518,
358,
1661,
17,
18926,
1965,
2943,
273,
30894,
18,
7142,
16681,
... |
escape(logfile[len(self.basedir)+1:])) | re.escape(logfile[len(self.basedir)+1:])) | def _prepareTargetRepository(self): """ Create the base directory if it doesn't exist, and execute ``darcs initialize`` if needed. """ | 5e5b4967e89c99046884bacd6b13974d01087474 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/5e5b4967e89c99046884bacd6b13974d01087474/darcs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9366,
2326,
3305,
12,
2890,
4672,
3536,
1788,
326,
1026,
1867,
309,
518,
3302,
1404,
1005,
16,
471,
1836,
12176,
72,
297,
2143,
4046,
10335,
309,
3577,
18,
3536,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9366,
2326,
3305,
12,
2890,
4672,
3536,
1788,
326,
1026,
1867,
309,
518,
3302,
1404,
1005,
16,
471,
1836,
12176,
72,
297,
2143,
4046,
10335,
309,
3577,
18,
3536,
2,
-100,
-100,
-100... |
logging.FileHandler.__init__(self, filename, mode, encoding) | logging.FileHandler.__init__(self, filename) | def __init__(self, filename, mode='a', encoding=None): # XXX: The delay option removed to work with python < 2.6 logging.FileHandler.__init__(self, filename, mode, encoding) if not os.path.exists(self.baseFilename): self.dev, self.ino = -1, -1 else: stat = os.stat(self.baseFilename) self.dev, self.ino = stat[ST_DEV], stat[ST_INO] | b081b3ec1e9d978d455880e2afaca5871e68e43c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5056/b081b3ec1e9d978d455880e2afaca5871e68e43c/WatchedFileHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1544,
16,
1965,
2218,
69,
2187,
2688,
33,
7036,
4672,
468,
11329,
30,
1021,
4624,
1456,
3723,
358,
1440,
598,
5790,
411,
576,
18,
26,
2907,
18,
28942,
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,
1001,
2738,
972,
12,
2890,
16,
1544,
16,
1965,
2218,
69,
2187,
2688,
33,
7036,
4672,
468,
11329,
30,
1021,
4624,
1456,
3723,
358,
1440,
598,
5790,
411,
576,
18,
26,
2907,
18,
28942,
16... |
self._ctype = 'uint8_t' | self._ctype = 'ev_uint8_t' | def __init__(self, type, name, tag, length): # Init base class Entry.__init__(self, type, name, tag) | 78d4429cef4baac9bcdfc2396ce157016621c416 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/78d4429cef4baac9bcdfc2396ce157016621c416/event_rpcgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
1047,
16,
769,
4672,
468,
4378,
1026,
667,
3841,
16186,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
1047,
13,
2,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
1047,
16,
769,
4672,
468,
4378,
1026,
667,
3841,
16186,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
1047,
13,
2,
-100,
-100,
-100,
-10... |
rospy.logerror('failed to find link %s'%req.hand_frame_id) | rospy.logerr('failed to find link %s'%req.hand_frame_id) | def MoveToHandPositionFn(req): with env: (robot_trans,robot_rot) = listener.lookupTransform(baseframe, robot.GetLinks()[0].GetName(), rospy.Time(0)) Trobot = matrixFromQuat([robot_rot[3],robot_rot[0],robot_rot[1],robot_rot[2]]) Trobot[0:3,3] = robot_trans hand = listener.transformPose(baseframe, req.hand_goal) o = hand.pose.orientation p = hand.pose.position Thandgoal = matrixFromQuat([o.w,o.x,o.y,o.z]) Thandgoal[0:3,3] = [p.x,p.y,p.z] with valueslock: robot.SetTransformWithDOFValues(Trobot,values) if len(req.manip_name) > 0: manip = robot.GetManipulator(req.manip_name) if manip is None: rospy.logerror('failed to find manipulator %s'%req.manip_name) return None else: manips = [manip for manip in robot.GetManipulators() if manip.GetEndEffector().GetName()==req.hand_frame_id] if len(manips) == 0: rospy.logerror('failed to find manipulator end effector %s'%req.hand_frame_id) return None manip = manips[0] | 475a3ad4bd90de109c5f4d2b05921306e58c8c9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7881/475a3ad4bd90de109c5f4d2b05921306e58c8c9d/armplanning_openrave.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9933,
774,
1144,
2555,
5372,
12,
3658,
4672,
598,
1550,
30,
261,
28870,
67,
2338,
16,
28870,
67,
8342,
13,
273,
2991,
18,
8664,
4059,
12,
1969,
3789,
16,
14386,
18,
967,
7100,
1435,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9933,
774,
1144,
2555,
5372,
12,
3658,
4672,
598,
1550,
30,
261,
28870,
67,
2338,
16,
28870,
67,
8342,
13,
273,
2991,
18,
8664,
4059,
12,
1969,
3789,
16,
14386,
18,
967,
7100,
1435,
63... |
self.assertRaises(UnicodeError, 'g\xe2teau'.__contains__, u'\xe2') | self.assertRaises(UnicodeDecodeError, 'g\xe2teau'.__contains__, u'\xe2') self.assertRaises(UnicodeDecodeError, u'g\xe2teau'.__contains__, '\xe2') | def test_contains(self): # Testing Unicode contains method self.assertTrue('a' in u'abdb') self.assertTrue('a' in u'bdab') self.assertTrue('a' in u'bdaba') self.assertTrue('a' in u'bdba') self.assertTrue('a' in u'bdba') self.assertTrue(u'a' in u'bdba') self.assertTrue(u'a' not in u'bdb') self.assertTrue(u'a' not in 'bdb') self.assertTrue(u'a' in 'bdba') self.assertTrue(u'a' in ('a',1,None)) self.assertTrue(u'a' in (1,None,'a')) self.assertTrue(u'a' in (1,None,u'a')) self.assertTrue('a' in ('a',1,None)) self.assertTrue('a' in (1,None,'a')) self.assertTrue('a' in (1,None,u'a')) self.assertTrue('a' not in ('x',1,u'y')) self.assertTrue('a' not in ('x',1,None)) self.assertTrue(u'abcd' not in u'abcxxxx') self.assertTrue(u'ab' in u'abcd') self.assertTrue('ab' in u'abc') self.assertTrue(u'ab' in 'abc') self.assertTrue(u'ab' in (1,None,u'ab')) self.assertTrue(u'' in u'abc') self.assertTrue('' in u'abc') | c4f0c6513ac875cc6a46258862d0c934b154c0ea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/c4f0c6513ac875cc6a46258862d0c934b154c0ea/test_unicode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12298,
12,
2890,
4672,
468,
7766,
310,
9633,
1914,
707,
365,
18,
11231,
5510,
2668,
69,
11,
316,
582,
11,
378,
1966,
6134,
365,
18,
11231,
5510,
2668,
69,
11,
316,
582,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12298,
12,
2890,
4672,
468,
7766,
310,
9633,
1914,
707,
365,
18,
11231,
5510,
2668,
69,
11,
316,
582,
11,
378,
1966,
6134,
365,
18,
11231,
5510,
2668,
69,
11,
316,
582,
11,
... |
self.safe_remove(ABSTFN) self.safe_remove(ABSTFN+"1") self.safe_remove(ABSTFN+"2") | test_support.unlink(ABSTFN) test_support.unlink(ABSTFN+"1") test_support.unlink(ABSTFN+"2") | def test_realpath_symlink_loops(self): # Bug #930024, return the path unchanged if we get into an infinite # symlink loop. try: old_path = abspath('.') os.symlink(ABSTFN, ABSTFN) self.assertEqual(realpath(ABSTFN), ABSTFN) | a11ac07dffa1601eaedcb5c761a2ded5e280c53b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/a11ac07dffa1601eaedcb5c761a2ded5e280c53b/test_posixpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7688,
803,
67,
21278,
67,
383,
4473,
12,
2890,
4672,
468,
16907,
468,
11180,
713,
3247,
16,
327,
326,
589,
14827,
309,
732,
336,
1368,
392,
14853,
468,
10563,
2798,
18,
775,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7688,
803,
67,
21278,
67,
383,
4473,
12,
2890,
4672,
468,
16907,
468,
11180,
713,
3247,
16,
327,
326,
589,
14827,
309,
732,
336,
1368,
392,
14853,
468,
10563,
2798,
18,
775,
... |
archivemail.options.no_compress = 1 archivemail.options.quiet = 1 | def testOld(self): """archiving an old mailbox uncompressed""" for execute in ("package", "system"): self.mbox_name = make_mbox(messages=3, hours_old=(24 * 181)) self.mbox_mode = os.stat(self.mbox_name)[stat.ST_MODE] self.copy_name = tempfile.mktemp() shutil.copyfile(self.mbox_name, self.copy_name) if execute == "package": archivemail.options.no_compress = 1 archivemail.options.quiet = 1 archivemail.archive(self.mbox_name) elif execute == "system": run = "./archivemail.py --no-compress --quiet %s" % \ self.mbox_name self.assertEqual(os.system(run), 0) else: sys.exit(1) assert(os.path.exists(self.mbox_name)) self.assertEqual(os.path.getsize(self.mbox_name), 0) new_mode = os.stat(self.mbox_name)[stat.ST_MODE] self.assertEqual(self.mbox_mode, new_mode) archive_name = self.mbox_name + "_archive" assert(os.path.exists(archive_name)) assert(filecmp.cmp(archive_name, self.copy_name, shallow=0)) assert(not os.path.exists(archive_name + ".gz")) self.tearDown() | 7ae1b7bb3f82dbf160411305096fe282e18c5fce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1746/7ae1b7bb3f82dbf160411305096fe282e18c5fce/test_archivemail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7617,
12,
2890,
4672,
3536,
991,
9288,
392,
1592,
14187,
20560,
8395,
364,
1836,
316,
7566,
5610,
3113,
315,
4299,
6,
4672,
365,
18,
81,
2147,
67,
529,
273,
1221,
67,
81,
2147,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7617,
12,
2890,
4672,
3536,
991,
9288,
392,
1592,
14187,
20560,
8395,
364,
1836,
316,
7566,
5610,
3113,
315,
4299,
6,
4672,
365,
18,
81,
2147,
67,
529,
273,
1221,
67,
81,
2147,
1... | |
raise SerialException("could not open port %s: %s" % (self._portstr, msg)) | raise SerialException("could not open port %s: %s" % (self.portstr, msg)) | def open(self): """Open port with current settings. This may throw a SerialException if the port cannot be opened.""" if self._port is None: raise SerialException("Port must be configured before it can be used.") self.hComPort = None try: self.hComPort = win32file.CreateFile(self.makeDeviceName(self.portstr), win32con.GENERIC_READ | win32con.GENERIC_WRITE, 0, # exclusive access None, # no security win32con.OPEN_EXISTING, win32con.FILE_ATTRIBUTE_NORMAL | win32con.FILE_FLAG_OVERLAPPED, None) except Exception, msg: self.hComPort = None #'cause __del__ is called anyway raise SerialException("could not open port %s: %s" % (self._portstr, msg)) # Setup a 4k buffer win32file.SetupComm(self.hComPort, 4096, 4096) | 320a966153e53d33464ebc5f01f4c15ed26de180 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10955/320a966153e53d33464ebc5f01f4c15ed26de180/serialwin32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
4672,
3536,
3678,
1756,
598,
783,
1947,
18,
1220,
2026,
604,
279,
7366,
503,
309,
326,
1756,
2780,
506,
10191,
12123,
309,
365,
6315,
655,
353,
599,
30,
1002,
7366,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
4672,
3536,
3678,
1756,
598,
783,
1947,
18,
1220,
2026,
604,
279,
7366,
503,
309,
326,
1756,
2780,
506,
10191,
12123,
309,
365,
6315,
655,
353,
599,
30,
1002,
7366,
503,
... |
self.buffer.append(value.encode('utf-8')) | self.buffer.append(val) | def __setitem__(self, key, value): # {{{ real_line = self.get_real_idx(key) | f6c78af86306a42095386dfebb7a645beb81d16d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4294/f6c78af86306a42095386dfebb7a645beb81d16d/conque_screen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
468,
10179,
95,
2863,
67,
1369,
273,
365,
18,
588,
67,
7688,
67,
3465,
12,
856,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
468,
10179,
95,
2863,
67,
1369,
273,
365,
18,
588,
67,
7688,
67,
3465,
12,
856,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
print "All actions completed.\n" | print timestamp(), "All actions completed.\n" | def main(): if options.demo: key = False current_channels = {} current_channel_labels = ['rhel-x86_64-server-5'] else: # Login to Satellite server key = login(options.user, options.password) # Build existing channel list current_channels = client.channel.list_all_channels(key) current_channel_labels = [] for channel in current_channels: current_channel_labels.append(channel['label']) if options.debug: print "DEBUG: Channels on current Satellite server:", current_channel_labels if client.api.get_version() < 5.1: # TODO: Haven't tested with Spacewalk, not sure how it is reported print "This script uses features not available with Satellite versions older than 5.1" sys.exit(1) if not options.client_actions_only: # This begins the server actions section if not os.path.exists(options.localdir): try: os.makedirs(options.localdir) except: print "Error: Unable to create %s" % (options.localdir) raise if (not options.delete) and (not options.no_rsync): # Sync local Dell repo with public Dell repo returncode = get_dell_repo(DELL_REPO_URL, options.localdir) if not returncode == 0: print "rsync process exited with returncode:", returncode # Build child channels based on dell repo as needed systems = build_channel_list(options.localdir, SYSTEM_VENDOR_ID) systems['platform_independent'] = PLATFORM_INDEPENDENT # Iterate through list of supported RHEL versions and archs, create parent channels if needed channels = {} print "Checking base channels on Satellite server" for parent in SUPPORTED_CHANNELS: if options.verbose: print "Checking base channel", parent # Check each supported base channel, skip if it does not exist on Satellite server if parent not in current_channel_labels: if options.verbose: print "-%s is not a current base channel, skipping." % (parent) continue else: channels[parent] = SUPPORTED_CHANNELS[parent] channels[parent]['child_channels'] = [] # Initialize key for child channels if options.verbose: print "+%s found on Satellite server, checking child channels." % (parent) if channels[parent]['arch'] == 'i386': # This is because Satellite stores x86 as 'ia32' arch = 'channel-ia32' else: arch = 'channel-' + channels[parent]['arch'] subdir = channels[parent]['subdir'] print " Checking child channels for %s" % parent for system in systems: # use system name plus parent to create a unique child channel c_label = DELL_INFO['label'] + '-' + system + '-' + parent c_name = DELL_INFO['name'] + ' on ' + systems[system] + ' for ' + parent c_summary = DELL_INFO['summary'] + ' on ' + systems[system] + ' running ' + parent c_arch = arch c_dir = options.localdir + system + '/' + subdir if options.verbose: print " Checking child channel:", c_label if channel_exists(key, c_label, current_channels): if options.delete: # Delete child channels if requested if options.demo: print "Deleting channel:", c_label else: delete_channel(key, c_label) else: if options.debug: print "DEBUG: checking for dir:", c_dir if options.verbose: print "Child channel already exists:", c_label if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) else: if not options.delete: # Build child channels if needed if options.debug: print "DEBUG: checking for dir:", c_dir if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) if options.debug: print "DEBUG: %s exists for %s, creating channel" % (subdir, system) if options.demo: if options.verbose: print "Creating child channel:", c_label else: create_channel(key, c_label, c_name, c_summary, c_arch, parent) else: if options.debug: print "DEBUG: %s does not exists for %s" % (subdir, system) if (not options.delete) and (not options.no_packages): # Iterate through channels, pushing rpms from the local repo as needed # TODO: check if rpm is already uploaded and orphaned or part of another channel if options.debug: print "DEBUG: Channel mapping:", channels print "Syncing rpms as needed" for parent in channels: print " Syncing rpms for child channels in %s" % parent for child in channels[parent]['child_channels']: dir = options.localdir + child + '/' + channels[parent]['subdir'] channel = DELL_INFO['label'] + '-' + child + '-' + parent if options.verbose: print " Syncing rpms to child channel", channel if options.debug: print "DEBUG: Looking for rpms in", dir rpms = gen_rpm_list(dir) # Get all packages in child channel existing_packages = client.channel.software.list_all_packages(key, channel) if options.debug: print "DEBUG: Existing packages in", channel, existing_packages for rpm in rpms: if options.debug: print "DEBUG: Working on:", rpm # Strip off '.rpm' at end of file to match against existing entries rpm_name = rpm.split('.rpm')[0] # Now strip off any preceeding paths rpm_name = rpm_name.split('/')[-1] # Iterate through existing packages, and skip existing ones if options.verbose: print "Checking if %s is already on the Satellite server in %s" % (rpm_name, channel) for package in existing_packages: existing_rpm_name = reconstruct_name(package) if options.debug: print "DEBUG: Checking match for %s and %s" % (rpm_name, existing_rpm_name) if existing_rpm_name == rpm_name: # This means the intended rpm is already in Satellite, so skip if options.verbose: print "- %s already in Satellite, skipping" % (rpm_name) break else: if options.verbose: print "+ %s is not in Satellite, adding" % (rpm_name) if options.debug: print "DEBUG: Calling: push_rpm(",rpm, channel, options.user, options.password, options.satserver, ")" returncode = push_rpm(rpm, channel, options.user, options.password, options.satserver) if not returncode == 0: print "rhnpush process exited with returncode:", returncode if returncode == 255: print "You may force package uploads with --force" sys.exit(1) print "Completed uploading rpms." if (not options.server_actions_only) and (not options.demo) and (not options.delete): # This is the client actions section print "Subscribing registered systems to the %s channel" % (PLATFORM_INDEPENDENT) client_systems = subscribe_clients(key) print "Scheduling software installation and actions on clients" client_systems = schedule_actions(key, client_systems) print "Waiting for client actions to complete" client_systems = get_action_results(key, client_systems) print "All actions completed.\n" show_client_results(client_systems) if not options.demo: logout(key) | 07e2421549e748ccb09a392c60834eaea3e54917 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/07e2421549e748ccb09a392c60834eaea3e54917/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... |
if self.focused_widgets and connect_modifier_used: | if self.focused_widgets and self._connect_modifier_used(mods): | def _mouse_down(self, e): mods = pygame.key.get_mods() connect_modifier_used = (mods & pygame.KMOD_SHIFT) multiselect = (mods & self.multiselect_modifier) if (not multiselect or (self.focused_widgets and self.hovered_widget not in self.focused_widgets)): # The or part is to allow people to use a first click-drag # on the last widget of a multiselect group to # connect. Otherwise, the connection group would not # include that last widget. super(GraphApp, self)._mouse_down(e) if self.focused_widgets and connect_modifier_used: if e.button == 1: self.connecting = True self.connecting_sources = [w.node for w in self.focused_widgets if isinstance(w, NodeWidget)] elif e.button == 3: self.disconnecting = True self.disconnecting_sources = [w.node for w in self.focused_widgets if isinstance(w, NodeWidget)] self.unset_focus() if multiselect: super(GraphApp, self)._mouse_down(e) | 268d099f6fd0e3f4c5d4f92400b45c6a75ee605a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5406/268d099f6fd0e3f4c5d4f92400b45c6a75ee605a/GraphApp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11697,
67,
2378,
12,
2890,
16,
425,
4672,
15546,
273,
2395,
13957,
18,
856,
18,
588,
67,
22760,
1435,
3077,
67,
20597,
67,
3668,
273,
261,
22760,
473,
2395,
13957,
18,
47,
6720,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11697,
67,
2378,
12,
2890,
16,
425,
4672,
15546,
273,
2395,
13957,
18,
856,
18,
588,
67,
22760,
1435,
3077,
67,
20597,
67,
3668,
273,
261,
22760,
473,
2395,
13957,
18,
47,
6720,
6... |
a,b = search_tree(self, partition, dig=self.loops()) | a,b = search_tree(self, partition, dig=self.loops(), verbosity=verbosity) | def canonical_label(self, partition=None, proof=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. EXAMPLE: sage: D = graphs.DodecahedralGraph() sage: E = D.canonical_label(); E Dodecahedron: Graph on 20 vertices sage: D.canonical_label(proof=True) (Dodecahedron: Graph on 20 vertices, {0: 0, 1: 19, 2: 16, 3: 15, 4: 9, 5: 1, 6: 10, 7: 8, 8: 14, 9: 12, 10: 17, 11: 11, 12: 5, 13: 6, 14: 2, 15: 4, 16: 3, 17: 7, 18: 13, 19: 18}) sage: D.is_isomorphic(E) True | d67a023472152bc59356bb215a37f04255fdd99a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/d67a023472152bc59356bb215a37f04255fdd99a/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7378,
67,
1925,
12,
2890,
16,
3590,
33,
7036,
16,
14601,
33,
8381,
4672,
3536,
2860,
326,
7378,
1433,
598,
8762,
358,
326,
3590,
18,
971,
1158,
3590,
353,
864,
16,
4692,
326,
2836,
359... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7378,
67,
1925,
12,
2890,
16,
3590,
33,
7036,
16,
14601,
33,
8381,
4672,
3536,
2860,
326,
7378,
1433,
598,
8762,
358,
326,
3590,
18,
971,
1158,
3590,
353,
864,
16,
4692,
326,
2836,
359... |
nodes = [] nodes.extend(flatten_nodes(self.items)) return tuple(nodes) | nodelist = [] nodelist.extend(flatten_nodes(self.items)) return tuple(nodelist) | def getChildNodes(self): nodes = [] nodes.extend(flatten_nodes(self.items)) return tuple(nodes) | 101b9307b0d9de62f324ef9ffa6e83f8040af642 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/101b9307b0d9de62f324ef9ffa6e83f8040af642/ast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23895,
12,
2890,
4672,
2199,
273,
5378,
2199,
18,
14313,
12,
16940,
67,
4690,
12,
2890,
18,
3319,
3719,
327,
3193,
12,
4690,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23895,
12,
2890,
4672,
2199,
273,
5378,
2199,
18,
14313,
12,
16940,
67,
4690,
12,
2890,
18,
3319,
3719,
327,
3193,
12,
4690,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print 'DONE SETTING STUFF' | def gui_trans_cb_conv2(self, event, data1, data2, data3): # return > 0 means to go ahead and replace/install ignoring, etc # return == 0 means to stop print 'Question:', (event, data1, data2, data3) | bf537fd3d1ac4461514247e8581927628058ef89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2759/bf537fd3d1ac4461514247e8581927628058ef89/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13238,
67,
2338,
67,
7358,
67,
4896,
22,
12,
2890,
16,
871,
16,
501,
21,
16,
501,
22,
16,
501,
23,
4672,
468,
327,
405,
374,
4696,
358,
1960,
17510,
471,
1453,
19,
5425,
14398,
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,
13238,
67,
2338,
67,
7358,
67,
4896,
22,
12,
2890,
16,
871,
16,
501,
21,
16,
501,
22,
16,
501,
23,
4672,
468,
327,
405,
374,
4696,
358,
1960,
17510,
471,
1453,
19,
5425,
14398,
16,
... | |
execute_script(uinstall_script) | execute_script(uninstall_script) | def _run_pre_uninstall(self, installed_egg_path): """ run any pre-uninstall scripts in the installed egg defined by the package passed in (the package is either a string defining a package name or package requirement spec, or a package object containing info about the package. """ tmp_unpack_dir = "" | ed9ebd795fcf8f6cb7db67919d8ebca24bf9586e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7707/ed9ebd795fcf8f6cb7db67919d8ebca24bf9586e/easy_install.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2681,
67,
1484,
67,
28872,
12,
2890,
16,
5876,
67,
23171,
67,
803,
4672,
3536,
1086,
1281,
675,
17,
28872,
8873,
316,
326,
5876,
25144,
2553,
635,
326,
2181,
2275,
316,
261,
5787,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2681,
67,
1484,
67,
28872,
12,
2890,
16,
5876,
67,
23171,
67,
803,
4672,
3536,
1086,
1281,
675,
17,
28872,
8873,
316,
326,
5876,
25144,
2553,
635,
326,
2181,
2275,
316,
261,
5787,
... |
([], []), | ([], [()]), | def test_product(self): for args, result in [ ([], []), # zero iterables ??? is this correct (['ab'], [('a',), ('b',)]), # one iterable ([range(2), range(3)], [(0,0), (0,1), (0,2), (1,0), (1,1), (1,2)]), # two iterables ([range(0), range(2), range(3)], []), # first iterable with zero length ([range(2), range(0), range(3)], []), # middle iterable with zero length ([range(2), range(3), range(0)], []), # last iterable with zero length ]: self.assertEqual(list(product(*args)), result) for r in range(4): self.assertEqual(list(product(*(args*r))), list(product(*args, **dict(repeat=r)))) self.assertEqual(len(list(product(*[range(7)]*6))), 7**6) self.assertRaises(TypeError, product, range(6), None) argtypes = ['', 'abc', '', xrange(0), xrange(4), dict(a=1, b=2, c=3), set('abcdefg'), range(11), tuple(range(13))] for i in range(100): args = [random.choice(argtypes) for j in range(random.randrange(5))] n = reduce(operator.mul, map(len, args), 1) if args else 0 self.assertEqual(len(list(product(*args))), n) args = map(iter, args) self.assertEqual(len(list(product(*args))), n) | 607f70f7e750824edcf97db01d1950e1dd890f14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/607f70f7e750824edcf97db01d1950e1dd890f14/test_itertools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5896,
12,
2890,
4672,
364,
833,
16,
563,
316,
306,
23265,
6487,
306,
1435,
65,
3631,
15604,
468,
3634,
27447,
282,
5317,
35,
353,
333,
3434,
261,
3292,
378,
17337,
306,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5896,
12,
2890,
4672,
364,
833,
16,
563,
316,
306,
23265,
6487,
306,
1435,
65,
3631,
15604,
468,
3634,
27447,
282,
5317,
35,
353,
333,
3434,
261,
3292,
378,
17337,
306,
2668,
... |
pfx = '%s.changes.%d' % (self.prefix, self.changeno) | self.changeno += 1 pfx = '%s.changes.%d.line' % (self.prefix, self.changeno) | def writeline(self, text): match = header_re.search(text) if match: self.hdf.setValue('%s.name.old' % self.prefix, match.group(1)) self.hdf.setValue('%s.name.new' % self.prefix, match.group(2)) return self.count = self.count + 1 if self.count < 3: return match = line_re.search(text) if match: pfx = '%s.changes.%d' % (self.prefix, self.changeno) self.print_block() self.hdf.setValue('%s.old' % pfx, match.group(1)) self.hdf.setValue('%s.new' % pfx, match.group(3)) self.changeno += 1 return ttype = text[0] text = text[1:] text = space_re.sub(' ', text.expandtabs(8)) if ttype == self.ttype: self.block.append(text) else: if ttype == '+' and self.ttype == '-': self.p_block = self.block self.p_type = self.ttype else: self.print_block() self.block = [text] self.ttype = ttype | 812ce6a416cd586498edc1c16e16b38d98564ca0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/812ce6a416cd586498edc1c16e16b38d98564ca0/Changeset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
3027,
12,
2890,
16,
977,
4672,
845,
273,
1446,
67,
266,
18,
3072,
12,
955,
13,
309,
845,
30,
365,
18,
26428,
18,
542,
620,
29909,
87,
18,
529,
18,
1673,
11,
738,
365,
18,
323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
3027,
12,
2890,
16,
977,
4672,
845,
273,
1446,
67,
266,
18,
3072,
12,
955,
13,
309,
845,
30,
365,
18,
26428,
18,
542,
620,
29909,
87,
18,
529,
18,
1673,
11,
738,
365,
18,
323... |
self.text.GetParent().Raise() def get(self): | parent.Raise() if wxIsBusy(): wxEndBusyCursor() def get(self): | def OnBrowse(self, event): filename = gui_util.directory_dialog(self.text) if filename: self.text.SetValue(filename) self.text.GetParent().Raise() | 7f12af70d31f52193d49f39c8ba22b6647875073 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/7f12af70d31f52193d49f39c8ba22b6647875073/args_gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
27304,
12,
2890,
16,
871,
4672,
225,
1544,
273,
13238,
67,
1367,
18,
5149,
67,
12730,
12,
2890,
18,
955,
13,
309,
1544,
30,
365,
18,
955,
18,
694,
620,
12,
3459,
13,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
27304,
12,
2890,
16,
871,
4672,
225,
1544,
273,
13238,
67,
1367,
18,
5149,
67,
12730,
12,
2890,
18,
955,
13,
309,
1544,
30,
365,
18,
955,
18,
694,
620,
12,
3459,
13,
365,
18,
... |
cfg.SetDiskID(node_disk, node) | lu.cfg.SetDiskID(node_disk, node) | def _AssembleInstanceDisks(instance, cfg, ignore_secondaries=False): """Prepare the block devices for an instance. This sets up the block devices on all nodes. Args: instance: a ganeti.objects.Instance object ignore_secondaries: if true, errors on secondary nodes won't result in an error return from the function Returns: false if the operation failed list of (host, instance_visible_name, node_visible_name) if the operation suceeded with the mapping from node devices to instance devices """ device_info = [] disks_ok = True iname = instance.name # With the two passes mechanism we try to reduce the window of # opportunity for the race condition of switching DRBD to primary # before handshaking occured, but we do not eliminate it # The proper fix would be to wait (with some limits) until the # connection has been made and drbd transitions from WFConnection # into any other network-connected state (Connected, SyncTarget, # SyncSource, etc.) # 1st pass, assemble on all nodes in secondary mode for inst_disk in instance.disks: for node, node_disk in inst_disk.ComputeNodeTree(instance.primary_node): cfg.SetDiskID(node_disk, node) result = rpc.call_blockdev_assemble(node, node_disk, iname, False) if not result: logger.Error("could not prepare block device %s on node %s" " (is_primary=False, pass=1)" % (inst_disk.iv_name, node)) if not ignore_secondaries: disks_ok = False # FIXME: race condition on drbd migration to primary # 2nd pass, do only the primary node for inst_disk in instance.disks: for node, node_disk in inst_disk.ComputeNodeTree(instance.primary_node): if node != instance.primary_node: continue cfg.SetDiskID(node_disk, node) result = rpc.call_blockdev_assemble(node, node_disk, iname, True) if not result: logger.Error("could not prepare block device %s on node %s" " (is_primary=True, pass=2)" % (inst_disk.iv_name, node)) disks_ok = False device_info.append((instance.primary_node, inst_disk.iv_name, result)) # leave the disks configured for the primary node # this is a workaround that would be fixed better by # improving the logical/physical id handling for disk in instance.disks: cfg.SetDiskID(disk, instance.primary_node) return disks_ok, device_info | b9bddb6bdf7ac5841c732845ce0122c64bb026b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/b9bddb6bdf7ac5841c732845ce0122c64bb026b1/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1463,
10045,
1442,
22021,
12,
1336,
16,
2776,
16,
2305,
67,
8538,
5646,
33,
8381,
4672,
3536,
7543,
326,
1203,
7166,
364,
392,
791,
18,
225,
1220,
1678,
731,
326,
1203,
7166,
603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1463,
10045,
1442,
22021,
12,
1336,
16,
2776,
16,
2305,
67,
8538,
5646,
33,
8381,
4672,
3536,
7543,
326,
1203,
7166,
364,
392,
791,
18,
225,
1220,
1678,
731,
326,
1203,
7166,
603,
... |
gDxeSmmEntryPointString = [ """ const UINT32 _gUefiDriverRevision = ${EfiSpecVersion}; const UINT32 _gDxeRevision = ${PiSpecVersion}; EFI_STATUS EFIAPI ProcessModuleEntryPointList ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { return EFI_SUCCESS; } """, """ const UINT32 _gUefiDriverRevision = ${EfiSpecVersion}; const UINT32 _gDxeRevision = ${PiSpecVersion}; | gDxeSmmEntryPointPrototype = """ | #ifndef _AUTOGENH_${Guid} | c0df5fc3f54d659cf283e68f6c5e03b271e178cb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/c0df5fc3f54d659cf283e68f6c5e03b271e178cb/GenC.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
430,
82,
536,
389,
18909,
16652,
44,
67,
18498,
22549,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
430,
82,
536,
389,
18909,
16652,
44,
67,
18498,
22549,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Write the DAG entry for this node to the DAG file descriptor fh = descriptor of open DAG file | Write the DAG entry for this node to the DAG file descriptor. fh = descriptor of open DAG file. | def write(self,fh): """ Write the DAG entry for this node to the DAG file descriptor fh = descriptor of open DAG file """ fh.write( 'JOB ' + self.__name + ' ' + self.__job.get_sub_file() + '\n' ) fh.write( 'RETRY ' + self.__name + ' ' + str(self.__retry) + '\n' ) if self.__vars.keys(): fh.write( 'VARS ' + self.__name ) for k in self.__vars.keys(): fh.write( ' ' + str(k) + '="' + str(self.__vars[k]) + '"' ) fh.write( '\n' ) for parent in self.__parents: fh.write( 'PARENT ' + parent + ' CHILD ' + str(self) + '\n' ) | 43adc4d722e280c921ddb7c38f99393e57936591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/43adc4d722e280c921ddb7c38f99393e57936591/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
19260,
4672,
3536,
2598,
326,
463,
1781,
1241,
364,
333,
756,
358,
326,
463,
1781,
585,
4950,
18,
7625,
273,
4950,
434,
1696,
463,
1781,
585,
18,
3536,
7625,
18,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
19260,
4672,
3536,
2598,
326,
463,
1781,
1241,
364,
333,
756,
358,
326,
463,
1781,
585,
4950,
18,
7625,
273,
4950,
434,
1696,
463,
1781,
585,
18,
3536,
7625,
18,
26... |
'''build a cache of name lookups from client IP addresses''' if cip in self.namecache: if self.namecache[cip]: return self.namecache[cip] else: raise socket.gaierror else: try: rvlookup = socket.gethostbyaddr(cip) if rvlookup[0]: self.namecache[cip] = [rvlookup[0]] else: self.namecache[cip] = [] self.namecache[cip].extend(rvlookup[1]) return self.namecache[cip] except socket.gaierror: self.namecache[cip] = False self.logger.error("Failed to find any names associated with IP address %s" % cip) raise | '''build a cache of name lookups from client IP addresses''' if cip in self.namecache: if self.namecache[cip]: return self.namecache[cip] else: raise socket.gaierror else: try: rvlookup = socket.gethostbyaddr(cip) if rvlookup[0]: self.namecache[cip] = [rvlookup[0]] else: self.namecache[cip] = [] self.namecache[cip].extend(rvlookup[1]) return self.namecache[cip] except socket.gaierror: self.namecache[cip] = False self.logger.error("Failed to find any names associated with IP address %s" % cip) raise | def get_namecache_entry(self, cip): | f7cdad6b141b86eeb6e52c0ba590f475d166aa65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/f7cdad6b141b86eeb6e52c0ba590f475d166aa65/SSHbase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
529,
2493,
67,
4099,
12,
2890,
16,
276,
625,
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,
... | [
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,
336,
67,
529,
2493,
67,
4099,
12,
2890,
16,
276,
625,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
del context[objid] | del context[objid] | def __format(self, object, stream, indent, allowance, context, level): level = level + 1 if context.has_key(id(object)): object = _Recursion(object) self.__recursive = 1 rep = self.__repr(object, context, level - 1) objid = id(object) context[objid] = 1 typ = type(object) sepLines = len(rep) > (self.__width - 1 - indent - allowance) | 0719a0e1387c096f8190ea96048beb52ea6b017f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0719a0e1387c096f8190ea96048beb52ea6b017f/pprint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2139,
12,
2890,
16,
733,
16,
1407,
16,
3504,
16,
1699,
1359,
16,
819,
16,
1801,
4672,
1801,
273,
1801,
397,
404,
309,
819,
18,
5332,
67,
856,
12,
350,
12,
1612,
3719,
30,
733,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2139,
12,
2890,
16,
733,
16,
1407,
16,
3504,
16,
1699,
1359,
16,
819,
16,
1801,
4672,
1801,
273,
1801,
397,
404,
309,
819,
18,
5332,
67,
856,
12,
350,
12,
1612,
3719,
30,
733,
... |
self.icon_geolocalization = gtk.Image() self.icon_geolocalization.set_from_pixbuf(pixbuf_geolocalization) self.icon_geolocalization.show() | def __init__(self): self.geoclue = Geoclue.DiscoverLocation() self.geoclue.connect(self.location_changed) self.geoclue.init() self.location = self.geoclue.get_location_info() self.location_filter = [] self.plugin_path = os.path.dirname(os.path.abspath(__file__)) self.glade_file = os.path.join(self.plugin_path, "geolocalized.glade") # the preference menu for the plugin self.menu_item = gtk.MenuItem("Geolocalized-tasks Preferences") # toolbar button for the new Location view # create the pixbuf with the icon and it's size. # 24,24 is the TaskEditor's toolbar icon size image_geolocalization_path = os.path.join(self.plugin_path, "icons/hicolor/24x24/geolocalization.png") pixbuf_geolocalization = gtk.gdk.pixbuf_new_from_file_at_size(image_geolocalization_path, 24, 24) image_assign_location_path = os.path.join(self.plugin_path, "icons/hicolor/16x16/assign-location.png") pixbug_assign_location = gtk.gdk.pixbuf_new_from_file_at_size(image_assign_location_path, 16, 16) # create the image and associate the pixbuf self.icon_geolocalization = gtk.Image() self.icon_geolocalization.set_from_pixbuf(pixbuf_geolocalization) self.icon_geolocalization.show() image_assign_location = gtk.Image() image_assign_location.set_from_pixbuf(pixbug_assign_location) image_assign_location.show() # the menu intem for the tag context self.context_item = gtk.ImageMenuItem("Assign a location to this tag") self.context_item.set_image(image_assign_location) # TODO: add a short cut to the menu # toolbar button for the location_view self.btn_location_view = gtk.ToggleToolButton() self.btn_location_view.set_icon_widget(self.icon_geolocalization) self.btn_location_view.set_label("Location View") self.PROXIMITY_FACTOR = 5 # 5 km self.LOCATION_ACCURACY = 3 # Locality self.LOCATION_DETERMINATION_METHOD = ["network", "gps", "cellphone"] #for provider in self.geoclue.get_available_providers(): # if provider['position'] and (provider['provider'] != "Example Provider" and provider['provider'] != "Plazes"): # self.LOCATION_DETERMINATION_METHOD.append(provider["provider"]) | 65b1d29adf1985ce8ef776ee0df81e368b232e5b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/65b1d29adf1985ce8ef776ee0df81e368b232e5b/geolocalized_tasks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
908,
504,
80,
344,
273,
15391,
504,
80,
344,
18,
26082,
2735,
1435,
365,
18,
908,
504,
80,
344,
18,
3612,
12,
2890,
18,
3562,
67,
6703,
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,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
908,
504,
80,
344,
273,
15391,
504,
80,
344,
18,
26082,
2735,
1435,
365,
18,
908,
504,
80,
344,
18,
3612,
12,
2890,
18,
3562,
67,
6703,
13,
... | |
fn = self.shlib_compiler.library_filename(fn,'shared') print "shlib",fn return fn | return self.shlib_compiler.library_filename(fn,'shared') | def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self,fullname) for ext in self.shlibs: if self.get_ext_fullname(ext.name)==fullname: fn, ext = os.path.splitext(filename) fn = self.shlib_compiler.library_filename(fn,'shared') print "shlib",fn return fn return filename | 59e6023baf87bd578ca73bd534d35917592f3a76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/495/59e6023baf87bd578ca73bd534d35917592f3a76/build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
408,
67,
3459,
12,
2890,
16,
13321,
4672,
1544,
273,
389,
3510,
67,
408,
18,
588,
67,
408,
67,
3459,
12,
2890,
16,
21885,
13,
364,
1110,
316,
365,
18,
674,
21571,
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,
336,
67,
408,
67,
3459,
12,
2890,
16,
13321,
4672,
1544,
273,
389,
3510,
67,
408,
18,
588,
67,
408,
67,
3459,
12,
2890,
16,
21885,
13,
364,
1110,
316,
365,
18,
674,
21571,
30,
309,
... |
gLogger.error(errStr,lfn) return S_ERROR(errStr) gLogger.info("ReplicaManager.__initializeReplication: File size determined to be %s." % catalogueSize) | gLogger.error( errStr, lfn ) return S_ERROR( errStr ) gLogger.info( "ReplicaManager.__initializeReplication: File size determined to be %s." % catalogueSize ) | def __initializeReplication(self,lfn,sourceSE,destSE): ########################################################### # Check that the destination storage element is sane and resolve its name gLogger.verbose("ReplicaManager.__initializeReplication: Verifying destination Storage Element validity (%s)." % destSE) destStorageElement = StorageElement(destSE) res = destStorageElement.isValid() if not res['OK']: errStr = "ReplicaManager.__initializeReplication: The storage element is not currently valid." gLogger.error(errStr,"%s %s" % (destSE,res['Message'])) return S_ERROR(errStr) destSE = destStorageElement.getStorageElementName()['Value'] gLogger.info("ReplicaManager.__initializeReplication: Destination Storage Element verified.") ########################################################### # Get the LFN replicas from the file catalogue gLogger.verbose("ReplicaManager.__initializeReplication: Attempting to obtain replicas for %s." % lfn) res = self.fileCatalogue.getReplicas(lfn) if not res['OK']: errStr = "ReplicaManager.__initializeReplication: Completely failed to get replicas for LFN." gLogger.error(errStr,"%s %s" % (lfn,res['Message'])) return res if not res['Value']['Successful'].has_key(lfn): errStr = "ReplicaManager.__initializeReplication: Failed to get replicas for LFN." gLogger.error(errStr,"%s %s" % (lfn,res['Value']['Failed'][lfn])) return S_ERROR("%s %s" % (errStr,res['Value']['Failed'][lfn])) gLogger.info("ReplicaManager.__initializeReplication: Successfully obtained replicas for LFN.") lfnReplicas = res['Value']['Successful'][lfn] ########################################################### # If the file catalogue size is zero fail the transfer gLogger.verbose("ReplicaManager.__initializeReplication: Attempting to obtain size for %s." % lfn) res = self.fileCatalogue.getFileSize(lfn) if not res['OK']: errStr = "ReplicaManager.__initializeReplication: Completely failed to get size for LFN." gLogger.error(errStr,"%s %s" % (lfn,res['Message'])) return res if not res['Value']['Successful'].has_key(lfn): errStr = "ReplicaManager.__initializeReplication: Failed to get size for LFN." gLogger.error(errStr,"%s %s" % (lfn,res['Value']['Failed'][lfn])) return S_ERROR("%s %s" % (errStr,res['Value']['Failed'][lfn])) catalogueSize = res['Value']['Successful'][lfn] if catalogueSize == 0: errStr = "ReplicaManager.__initializeReplication: Registered file size is 0." gLogger.error(errStr,lfn) return S_ERROR(errStr) gLogger.info("ReplicaManager.__initializeReplication: File size determined to be %s." % catalogueSize) ########################################################### # Check whether the destination storage element is banned gLogger.verbose("ReplicaManager.__initializeReplication: Determining whether %s is banned." % destSE) configStr = '/Resources/StorageElements/BannedTarget' bannedTargets = gConfig.getValue(configStr,[]) if destSE in bannedTargets: infoStr = "ReplicaManager.__initializeReplication: Destination Storage Element is currently banned." gLogger.info(infoStr,destSE) return S_ERROR(infoStr) gLogger.info("ReplicaManager.__initializeReplication: Destination site not banned.") ########################################################### # Check whether the supplied source SE is sane gLogger.verbose("ReplicaManager.__initializeReplication: Determining whether source Storage Element is sane.") configStr = '/Resources/StorageElements/BannedSource' bannedSources = gConfig.getValue(configStr,[]) if sourceSE: if not lfnReplicas.has_key(sourceSE): errStr = "ReplicaManager.__initializeReplication: LFN does not exist at supplied source SE." gLogger.error(errStr,"%s %s" % (lfn,sourceSE)) return S_ERROR(errStr) elif sourceSE in bannedSources: infoStr = "ReplicaManager.__initializeReplication: Supplied source Storage Element is currently banned." gLogger.info(infoStr,sourceSE) return S_ERROR(errStr) gLogger.info("ReplicaManager.__initializeReplication: Replication initialization successful.") resDict = {'DestStorage':destStorageElement,'DestSE':destSE,'Replicas':lfnReplicas,'CatalogueSize':catalogueSize} return S_OK(resDict) | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11160,
8309,
12,
2890,
16,
80,
4293,
16,
3168,
1090,
16,
10488,
1090,
4672,
19709,
5516,
3228,
1189,
468,
2073,
716,
326,
2929,
2502,
930,
353,
30426,
471,
2245,
2097,
508,
314,
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,
11160,
8309,
12,
2890,
16,
80,
4293,
16,
3168,
1090,
16,
10488,
1090,
4672,
19709,
5516,
3228,
1189,
468,
2073,
716,
326,
2929,
2502,
930,
353,
30426,
471,
2245,
2097,
508,
314,
33... |
freq = [[0.08, 0.15], [0.12, 0.24], [0.15, 0.27]] | freq = [[0.05, 0.15], [0.05, 0.24], [0.15, 0.30]] | def fitness1(gen, frq): return [1, 1+gen/10000., 1+gen/5000.] | c6555a3012cf82c2ffa9eec5c8420e187c283edd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/401/c6555a3012cf82c2ffa9eec5c8420e187c283edd/test_05_matings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20351,
21,
12,
4507,
16,
3812,
85,
4672,
327,
306,
21,
16,
404,
15,
4507,
19,
23899,
12990,
404,
15,
4507,
19,
25,
3784,
18,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20351,
21,
12,
4507,
16,
3812,
85,
4672,
327,
306,
21,
16,
404,
15,
4507,
19,
23899,
12990,
404,
15,
4507,
19,
25,
3784,
18,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if n < 0 or n >= len(self): raise IndexError, "n = (%s) must be between %s and %s"%(n, 0, len(self)-1) return ExpectElement.__getitem__(self, n+1) | if n <= 0 or n > len(self): raise IndexError, "index out of range" P = self._check_valid() if not isinstance(n, tuple): return P.new('%s(%s)'%(self._name, n)) else: return P.new('%s(%s)'%(self._name, str(n)[1:-1])) | def __getitem__(self, n): r""" Return the n-th element of this list. | 0024e3d6e2e182d4eb67b1e9bb08b4eb9dbe85bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0024e3d6e2e182d4eb67b1e9bb08b4eb9dbe85bb/axiom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
290,
4672,
436,
8395,
2000,
326,
290,
17,
451,
930,
434,
333,
666,
18,
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,
1001,
31571,
972,
12,
2890,
16,
290,
4672,
436,
8395,
2000,
326,
290,
17,
451,
930,
434,
333,
666,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
_columns = { 'project_id' : fields.many2one('project.project', 'Project', size=64), 'bug_ids' : fields.one2many('crm.case', 'case_id', 'Latest Bugs'), } | def _get_latest_cases(self, cr, uid, ids_cases, context={}, *arg): if not ids_cases: return {} result = {} for id in ids_cases: result[id] = { 'bug_ids': '', 'feature_ids': '', 'support_ids': '', 'announce_ids': '', } for case in self.browse(cr, uid, ids_cases, context): cr.execute("""select c.id from crm_case c \ left join project_project p on p.id = c.project_id \ where c.section_id = p.section_bug_id and c.date >= %s """, (time.strftime('%Y-%m-01'),)) list_case = map(lambda x: x[0], cr.fetchall()) result[case.id]['bug_ids'] = list_case cr.execute("""select c.id from crm_case c \ left join project_project p on p.id = c.project_id \ where c.section_id = p.section_feature_id and c.date >= %s """, (time.strftime('%Y-%m-01'),)) list_case = map(lambda x: x[0], cr.fetchall()) result[case.id]['feature_ids'] = list_case cr.execute("""select c.id from crm_case c \ left join project_project p on p.id = c.project_id \ where c.section_id = p.section_support_id and c.date >= %s """, (time.strftime('%Y-%m-01'),)) list_case = map(lambda x: x[0], cr.fetchall()) result[case.id]['support_ids'] = list_case cr.execute("""select c.id from crm_case c \ left join project_project p on p.id = c.project_id \ where c.section_id = p.section_annouce_id and c.date >= %s """, (time.strftime('%Y-%m-01'),)) list_case = map(lambda x: x[0], cr.fetchall()) result[case.id]['announce_ids'] = list_case return result _columns = { 'project_id' : fields.many2one('project.project', 'Project'), 'bug_ids' : fields.function(_get_latest_cases,type='one2many', relation='crm.case', method=True , string= 'Latest Bugs', multi='case'), 'feature_ids' : fields.function(_get_latest_cases,type='one2many', relation='crm.case', method=True , string='Latest Features', multi='case'), 'support_ids' : fields.function(_get_latest_cases,type='one2many', relation='crm.case', method=True , string='Latest Supports', multi='case'), 'announce_ids' : fields.function(_get_latest_cases,type='one2many', relation='crm.case', method=True , string= 'Latest Announces', multi='case'), } | def _get_hours(self, cr, uid, ids, context={}, *arg): res = {} if not ids: return {} for id in ids: for acc in self.browse(cr, uid, ids, context): cr.execute("""select id from account_analytic_line where \ account_id in (select category_id from project_project where id = %s)""" %id) line_id = map(lambda x: x[0], cr.fetchall()) res[acc.id] = line_id return res | decd3e10e851a4c271a55db6d8154f195528896d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/decd3e10e851a4c271a55db6d8154f195528896d/portal_project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
16814,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
28793,
380,
3175,
4672,
400,
273,
2618,
309,
486,
3258,
30,
327,
2618,
364,
612,
316,
3258,
30,
364,
4078,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
16814,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
28793,
380,
3175,
4672,
400,
273,
2618,
309,
486,
3258,
30,
327,
2618,
364,
612,
316,
3258,
30,
364,
4078,
316,
... |
print command | debug(command) | def run(command, inputdata=None, **kwargs): """Run a command and return standard output""" print command popen = subprocess.Popen(command, **kwargs) outputdata, errdata = popen.communicate(inputdata) return outputdata, errdata | a5d6ce65315a1255fe2c5bee6037e28b7e52abe8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9246/a5d6ce65315a1255fe2c5bee6037e28b7e52abe8/youtube-upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
3076,
16,
810,
892,
33,
7036,
16,
2826,
4333,
4672,
3536,
1997,
279,
1296,
471,
327,
4529,
876,
8395,
1198,
12,
3076,
13,
30925,
273,
6652,
18,
52,
3190,
12,
3076,
16,
2826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
3076,
16,
810,
892,
33,
7036,
16,
2826,
4333,
4672,
3536,
1997,
279,
1296,
471,
327,
4529,
876,
8395,
1198,
12,
3076,
13,
30925,
273,
6652,
18,
52,
3190,
12,
3076,
16,
2826,
... |
RewriteRule ^/%(instance)s/(.*) %(cgidir)s/%(instance)s.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%%1,t=application/x-httpd-cgi,l] | RewriteRule ^/%(instance)s($|/)(.*) %(cgidir)s/%(instance)s.cgi/$2 [e=HTTP_CGI_AUTHORIZATION:%%1,t=application/x-httpd-cgi,l] | def createfile(pretend, fname, contents): if pretend: print "cat >%(fname)s <__EOF__\n%(contents)s__EOF__" % vars() else: f = open(fname, "w") f.write(contents) f.close() | 6403954cfb4d34ae7b2b4169aff1265fcbba2445 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12503/6403954cfb4d34ae7b2b4169aff1265fcbba2445/zope-install.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
768,
12,
15089,
409,
16,
5299,
16,
2939,
4672,
309,
675,
17445,
30,
1172,
315,
2574,
405,
17105,
12749,
13,
87,
411,
972,
12706,
972,
64,
82,
17105,
3980,
13,
87,
972,
12706,
1443... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
768,
12,
15089,
409,
16,
5299,
16,
2939,
4672,
309,
675,
17445,
30,
1172,
315,
2574,
405,
17105,
12749,
13,
87,
411,
972,
12706,
972,
64,
82,
17105,
3980,
13,
87,
972,
12706,
1443... |
self.LabelGemQuality, self.LabelGemPoints, self.LabelGemCost, self.LabelGemName, self.QualDrop, | self.QualDrop, self.LabelGemQuality, self.LabelGemPoints, self.LabelGemCost, self.LabelGemName, | def initLayout(self): testfont = QFontMetrics(QApplication.font()) | e9cb97a07852b15f89969cefa507f1e097a1c9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/e9cb97a07852b15f89969cefa507f1e097a1c9a8/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
3744,
12,
2890,
4672,
1842,
5776,
273,
2238,
5711,
5653,
12,
53,
3208,
18,
5776,
10756,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
3744,
12,
2890,
4672,
1842,
5776,
273,
2238,
5711,
5653,
12,
53,
3208,
18,
5776,
10756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.failUnless("debug_test:%i" % lineno in output, "Didn't find line %i in %s" % (lineno, output)) | self.failUnless("%s:%i" % (__name__, lineno) in output, "Didn't find line %i in %s" % (lineno, output)) | def test_line_global(self): global GLOBAL_VAR sys.stdout = StringIO() GLOBAL_VAR = debug.Spew() f = sys._getframe() GLOBAL_VAR(f, "line", None) lineno = f.f_lineno - 1 # -1 here since we called with frame f in the line above output = sys.stdout.getvalue() self.failUnless("debug_test:%i" % lineno in output, "Didn't find line %i in %s" % (lineno, output)) self.failUnless("f=<frame object at" in output) self.failUnless("GLOBAL_VAR" in f.f_globals) self.failUnless("GLOBAL_VAR=<eventlet.debug.Spew object at" in output) del GLOBAL_VAR | c3ae82d3743df7edc77a004475a82b9645360b6a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10078/c3ae82d3743df7edc77a004475a82b9645360b6a/debug_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1369,
67,
6347,
12,
2890,
4672,
2552,
7779,
67,
7716,
2589,
18,
10283,
273,
15777,
1435,
7779,
67,
7716,
273,
1198,
18,
55,
347,
91,
1435,
284,
273,
2589,
6315,
588,
3789,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1369,
67,
6347,
12,
2890,
4672,
2552,
7779,
67,
7716,
2589,
18,
10283,
273,
15777,
1435,
7779,
67,
7716,
273,
1198,
18,
55,
347,
91,
1435,
284,
273,
2589,
6315,
588,
3789,
14... |
self.inNetwork = net | self.in_network = net | def setNetwork(self, net): self.inNetwork = net | cd667906d81f50c59a31a1d4e98077bb9b404cc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/cd667906d81f50c59a31a1d4e98077bb9b404cc7/OWPythonScript.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3906,
12,
2890,
16,
2901,
4672,
365,
18,
267,
67,
5185,
273,
2901,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
444,
3906,
12,
2890,
16,
2901,
4672,
365,
18,
267,
67,
5185,
273,
2901,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
{'dyne':'CGS unit for force defined to be gram*centimeter/second^2.\nEqual to 10^-5 newtons.', 'gram_weight':'Defined to be the magnitude of the force exerted on one gram of mass by a 9.80665 meter/second^2 gravitational field.\nEqual to 1/1000 of a kilogram weight.\nEqual to 0.00980665 newtons.', 'kilogram_force':'Equivalent to a kilogram weight.\nEqual to 9.80665 newtons.', 'kilogram_weight':'Defined to be the magnitude of the force exerted on one kilogram of mass by a 9.80665 meter/second^2 gravitational field.\nEqual to 9.80665 newtons.', 'newton':'SI derived unit of force.\nDefined to be kilogram*meter/second^2.', 'pound_force':'Equivalent to a pound weight.\nApproximately equal to 4.44822 newtons.', 'pound_weight':'Defined to be the magnitude of the force exerted on one pound of mass by a 9.80665 meter/second^2 gravitational field.\nApproximately equal to 4.44822 newtons.', 'poundal':'Defined to be pound*foot/second^2.\nApproximately equal to 0.13825 newtons.', 'ton_force':'Defined to be the magnitude of the force exerted on one ton of mass (2000 pounds) by a 9.80665 meter/second^2 gravitational field.\nApproximately equal to 8896.4432 newtons.'}, | {'dyne':'CGS unit for force defined to be gram*centimeter/second^2.\nEqual to 10^-5 newtons.', 'gram_weight':'Defined to be the magnitude of the force exerted on one gram of mass by a 9.80665 meter/second^2 gravitational field.\nEqual to 1/1000 of a kilogram weight.\nEqual to 0.00980665 newtons.', 'kilogram_force':'Equivalent to a kilogram weight.\nEqual to 9.80665 newtons.', 'kilogram_weight':'Defined to be the magnitude of the force exerted on one kilogram of mass by a 9.80665 meter/second^2 gravitational field.\nEqual to 9.80665 newtons.', 'newton':'SI derived unit of force.\nDefined to be kilogram*meter/second^2.', 'pound_force':'Equivalent to a pound weight.\nApproximately equal to 4.44822 newtons.', 'pound_weight':'Defined to be the magnitude of the force exerted on one pound of mass by a 9.80665 meter/second^2 gravitational field.\nApproximately equal to 4.44822 newtons.', 'poundal':'Defined to be pound*foot/second^2.\nApproximately equal to 0.13825 newtons.', 'ton_force':'Defined to be the magnitude of the force exerted on one ton of mass (2000 pounds) by a 9.80665 meter/second^2 gravitational field.\nApproximately equal to 8896.4432 newtons.'}, | def evalunitdict(): """ Replace all the string values of the unitdict variable by their evaluated forms, and builds some other tables for ease of use. This function is mainly used internally, for efficiency (and flexibility) purposes, making it easier to describe the units. EXAMPLES:: sage: sage.symbolic.units.evalunitdict() """ from sage.misc.all import sage_eval for key, value in unitdict.iteritems(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.iteritems()]) # FEATURE IDEA: create a function that would allow users to add # new entries to the table without having to know anything about # how the table is stored internally. # # Format the table for easier use. # for k, v in unitdict.iteritems(): for a in v: unit_to_type[a] = k for w in unitdict.iterkeys(): for j in unitdict[w].iterkeys(): if type(unitdict[w][j]) == tuple: unitdict[w][j] = unitdict[w][j][0] value_to_unit[w] = dict(zip(unitdict[w].itervalues(), unitdict[w].iterkeys())) | d9145e61c2e167a847618a21778e0e532a04af5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d9145e61c2e167a847618a21778e0e532a04af5d/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
4873,
1576,
13332,
3536,
6910,
777,
326,
533,
924,
434,
326,
2836,
1576,
2190,
635,
3675,
12697,
10138,
16,
471,
10736,
2690,
1308,
4606,
364,
28769,
434,
999,
18,
1220,
445,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
4873,
1576,
13332,
3536,
6910,
777,
326,
533,
924,
434,
326,
2836,
1576,
2190,
635,
3675,
12697,
10138,
16,
471,
10736,
2690,
1308,
4606,
364,
28769,
434,
999,
18,
1220,
445,
353,
... |
shutil.rmtree(noisymsroot+".sd.ms") shutil.copytree(msfile,noisymsroot+".sd.ms") | shutil.rmtree(noisymsroot+".sd.ms") shutil.copytree(sdmsfile,noisymsroot+".sd.ms") | def simdata2( project=None, modifymodel=None, skymodel=None, inbright=None, indirection=None, incell=None, incenter=None, inwidth=None, # innchan=None, setpointings=None, ptgfile=None, integration=None, direction=None, mapsize=None, maptype=None, pointingspacing=None, caldirection=None, calflux=None, predict=None, refdate=None, complist=None, totaltime=None, antennalist=None, sdantlist=None, sdant=None, thermalnoise=None, user_pwv=None, t_ground=None, t_sky=None, tau0=None, leakage=None, image=None, vis=None, modelimage=None, cell=None, imsize=None, niter=None, threshold=None, weighting=None, outertaper=None, stokes=None, analyze=None, showarray=None, showuv=None, showpsf=None, showmodel=None, showconvolved=None, showclean=None, showresidual=None, showdifference=None, showfidelity=None, graphics=None, verbose=None, overwrite=None, async=False): # RI TODO for inbright=unchanged, need to scale input image to jy/pix casalog.origin('simdata') if verbose: casalog.filter(level="DEBUG2") # some hardcoded variables that may be reintroduced in future development relmargin=.5 # number of PB between edge of model and pointing centers scanlength=1 # number of integrations per scan # as of 20100507, newfig will delete the previous one # create the utility object: util=simutil(direction) # this is the dir of the observation - could be "" if verbose: util.verbose=True msg=util.msg if type(skymodel)==type([]): skymodel=skymodel[0] skymodel=skymodel.replace('$project',project) if((not os.path.exists(skymodel)) and (not os.path.exists(complist))): msg("No sky input found. At least one of skymodel or complist must be set.",priority="error") return False grscreen=False grfile=False if graphics=="both": grscreen=True grfile=True if graphics=="screen": grscreen=True if graphics=="file": grfile=True | 52e387b4756b7cbdfd6ca092f5ae01e7d40af507 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/52e387b4756b7cbdfd6ca092f5ae01e7d40af507/task_simdata2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3142,
892,
22,
12,
1984,
33,
7036,
16,
5612,
2284,
33,
7036,
16,
15513,
2284,
33,
7036,
16,
316,
31070,
33,
7036,
16,
1547,
2769,
33,
7036,
16,
316,
3855,
33,
7036,
16,
316,
5693,
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,
3142,
892,
22,
12,
1984,
33,
7036,
16,
5612,
2284,
33,
7036,
16,
15513,
2284,
33,
7036,
16,
316,
31070,
33,
7036,
16,
1547,
2769,
33,
7036,
16,
316,
3855,
33,
7036,
16,
316,
5693,
33... |
write_action(asset, True); output_file.write(" ],\n") | write_action(asset, True) output_file.write(""" ], }, { 'target_name': 'copy_samples', 'type': 'none', 'dependencies': [ 'convert_samples', ], 'copies': [\n""") | def write_action(asset, webgl_mode): filename = posixpath.splitext(posixpath.basename(asset['path']))[0] filename = filename.replace('.','_') filename = filename.replace('-','_') filename = filename.lower() name = "convert_" + filename if webgl_mode: name = name + "_webgl" output = asset['path'].replace('convert_', '') output_base = posixpath.splitext(output)[0] output_tgz = output_base + ".o3dtgz" output_json = output_base + "/scene.json" output = output_tgz if webgl_mode: output = output_json output_dir = posixpath.dirname(output) output_file.write(" {\n") output_file.write(" 'action_name': '%s',\n" % name) output_file.write(" 'inputs': [\n") output_file.write(" '<(PRODUCT_DIR)/o3dConverter',\n") output_file.write(" '../o3d_assets/samples/%s',\n" % asset['path']) output_file.write(" ],\n") output_file.write(" 'outputs': [\n") if sys.platform[:5] == 'linux': # TODO(gspencer): This is a HACK! We shouldn't need to put the # absolute path here, but currently on Linux (scons), it is unable # to copy generated items out of the source tree (because the # repository mojo fails to find it and puts in the wrong path). output_file.write(" '%s',\n" % posixpath.abspath(output)) else: output_file.write(" '../samples/%s',\n" % output) output_file.write(" ],\n") output_file.write(" 'action': [\n") output_file.write(" '<(PRODUCT_DIR)/o3dConverter',\n") output_file.write(" '--no-condition',\n") output_file.write(" '--up-axis=%s',\n" % asset['up']) if webgl_mode: output_file.write(" '--no-binary',\n") output_file.write(" '--no-archive',\n") output_file.write(" '--convert-dds-to-png',\n") output_file.write(" '--convert-cg-to-glsl',\n") output_file.write(" '../o3d_assets/samples/%s',\n" % asset['path']) if webgl_mode: output_file.write(" '../samples/%s',\n" % output_tgz) else: output_file.write(" '<(_outputs)',\n") output_file.write(" ],\n") output_file.write(" },\n") | 51cf61ff968587decf4da988cafbff403b2ef34b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/51cf61ff968587decf4da988cafbff403b2ef34b/samples_gen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1128,
12,
9406,
16,
3311,
7043,
67,
3188,
4672,
1544,
273,
16366,
803,
18,
4939,
408,
12,
24463,
803,
18,
13909,
12,
9406,
3292,
803,
3546,
3719,
63,
20,
65,
1544,
273,
1544,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1128,
12,
9406,
16,
3311,
7043,
67,
3188,
4672,
1544,
273,
16366,
803,
18,
4939,
408,
12,
24463,
803,
18,
13909,
12,
9406,
3292,
803,
3546,
3719,
63,
20,
65,
1544,
273,
1544,... |
self.alive = False | self.alive.clear() | def StopThread(self): """Stop the receiver thread, wait util it's finished.""" if self.thread is not None: self.alive = False #set termination flag for thread self.thread.join() #wait until thread has finished self.thread = None | 3df461ebbf6aac508e7b497f9ca64fb1f9736861 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/3df461ebbf6aac508e7b497f9ca64fb1f9736861/wxTerminal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5131,
3830,
12,
2890,
4672,
3536,
4947,
326,
5971,
2650,
16,
2529,
1709,
518,
1807,
6708,
12123,
309,
365,
18,
5930,
353,
486,
599,
30,
365,
18,
11462,
18,
8507,
1435,
1850,
468,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5131,
3830,
12,
2890,
4672,
3536,
4947,
326,
5971,
2650,
16,
2529,
1709,
518,
1807,
6708,
12123,
309,
365,
18,
5930,
353,
486,
599,
30,
365,
18,
11462,
18,
8507,
1435,
1850,
468,
542,
... |
sage: M.free_module() | sage: M.module() | def module(self): """ Return the underlying free module corresponding to this space of modular forms. This is a free module (viewed as a tuple space) of the same dimension as this space over the same base ring. EXAMPLES:: sage: m = ModularForms(Gamma1(13),10) sage: m.free_module() Vector space of dimension 69 over Rational Field sage: ModularForms(Gamma1(13),4, GF(49,'b')).free_module() Vector space of dimension 27 over Finite Field in b of size 7^2 | 743a5dfece56682597da5b0a9fba47a5c4f01bcb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/743a5dfece56682597da5b0a9fba47a5c4f01bcb/ambient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1605,
12,
2890,
4672,
3536,
2000,
326,
6808,
4843,
1605,
4656,
358,
333,
3476,
434,
681,
2490,
10138,
18,
1220,
353,
279,
4843,
1605,
261,
1945,
329,
487,
279,
3193,
3476,
13,
434,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1605,
12,
2890,
4672,
3536,
2000,
326,
6808,
4843,
1605,
4656,
358,
333,
3476,
434,
681,
2490,
10138,
18,
1220,
353,
279,
4843,
1605,
261,
1945,
329,
487,
279,
3193,
3476,
13,
434,
326,
... |
if r in txmbr.po.provides_names or r in txmbr.po.filelist: potential_providers.append(txmbr.po) for provpo in potential_providers: if provpo.pkgtup in self._removing: continue if self.tsInfo.getMembers(provpo.pkgtup, TS_REMOVE_STATES): continue if not provpo.checkPrco('provides', (r, f, v)): continue other_provider = True if other_provider: return [] potential_remove = self.rpmdb.searchRequires(r) for txmbr in self.tsInfo.getMembers(None, TS_INSTALL_STATES): if r in txmbr.po.requires_names: | if r in txmbr.po.requires_names and txmbr.pkgtup not in self._removing: | def _requiredByPkg(self, prov): """check to see if anything will or does require the provide, return list of requiring pkg objects if so""" # check if anything installed needs it # make sure installed item is not set to be removed/obsoleted # make sure nothing else provides the same thing just as well # check if anything in the ts set to be installed/updated requires it # make sure nothing else provides the same thing just as well (r, f, v) = prov removeList = [] | f1cb8ebcece59486f7e684f34d76fb2119a9d221 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5445/f1cb8ebcece59486f7e684f34d76fb2119a9d221/depsolve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4718,
858,
11264,
12,
2890,
16,
17197,
4672,
3536,
1893,
358,
2621,
309,
6967,
903,
578,
1552,
2583,
326,
5615,
16,
327,
666,
434,
29468,
3475,
2184,
309,
1427,
8395,
225,
468,
866,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4718,
858,
11264,
12,
2890,
16,
17197,
4672,
3536,
1893,
358,
2621,
309,
6967,
903,
578,
1552,
2583,
326,
5615,
16,
327,
666,
434,
29468,
3475,
2184,
309,
1427,
8395,
225,
468,
866,... |
formatstring += shortcut + ':' | formatstring += shortcut if not isinstance(default, bool): formatstring += ':' | func, doc, arg_def = actions[args.pop(0)] | e790ea05a3471ea98e3e3b4628d13936fc4c387e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14437/e790ea05a3471ea98e3e3b4628d13936fc4c387e/script.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1326,
16,
997,
16,
1501,
67,
536,
273,
4209,
63,
1968,
18,
5120,
12,
20,
25887,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1326,
16,
997,
16,
1501,
67,
536,
273,
4209,
63,
1968,
18,
5120,
12,
20,
25887,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
omit = attribute("omit-tag", expressions.value) | omit = attribute("omit-tag", expressions.value, u"") | def _attributes(self): """Aggregate static, dynamic and translatable attributes.""" | 908f4f968ae1b2846be834576f71831f909e59d1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9696/908f4f968ae1b2846be834576f71831f909e59d1/translation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4350,
12,
2890,
4672,
3536,
11490,
760,
16,
5976,
471,
21884,
1677,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4350,
12,
2890,
4672,
3536,
11490,
760,
16,
5976,
471,
21884,
1677,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
parents.pop() | childnumber = 1 dprint("lc") if len(parents): parents.pop() | def handleHeading(): global linePtr, lines, level, v, exitlevel, parents v["%%"] = lstrip(rstrip(lines[linePtr])) if getHeadingType(linePtr) == 'normal': if isFirstChild(linePtr): level = level + 1 print subVars("Headings","before-headings") print subVars("Headings","heading") if isParent(linePtr): parents.append(linePtr) linePtr = linePtr + 1 dprint("ho:",linePtr) handleObjects() dprint("xl:",level) dprint("lp:",linePtr,"ml:",level) if isLastChild(linePtr,level): print subVars("Headings","after-headings") level = level - 1 exitlevel = 1 dprint("lc") parents.pop() elif getHeadingType(linePtr) == 'bulleted': v["%%"] = dashStrip(v["%%"]) if isFirstChild(linePtr): level = level + 1 print subVars("Headings","before-bulleted-headings") print subVars("Headings","bulleted-heading") if isParent(linePtr): parents.append(linePtr) linePtr = linePtr + 1 handleObjects() if isLastChild(linePtr,level): print subVars("Headings","after-bulleted-headings") level = level - 1 exitlevel = 1 parents.pop() elif getHeadingType(linePtr) == 'numbered': v["%%"] = plusStrip(v["%%"]) if isFirstChild(linePtr): level = level + 1 print subVars("Headings","before-numbered-headings") print subVars("Headings","numbered-heading") if isParent(linePtr): parents.append(linePtr) linePtr = linePtr + 1 handleObjects() if isLastChild(linePtr,level): print subVars("Headings","after-numbered-headings") level = level - 1 exitlevel = 1 parents.pop() else: print print "Error: unknown heading type" sys.exit(1) | ee9b6de81c1ba03a51715d840d91e079fc45b8cd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6154/ee9b6de81c1ba03a51715d840d91e079fc45b8cd/otl2tags.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
21867,
13332,
225,
2552,
980,
5263,
16,
2362,
16,
1801,
16,
331,
16,
431,
1280,
941,
16,
6298,
225,
331,
9614,
11438,
11929,
273,
14730,
12,
86,
6406,
12,
3548,
63,
1369,
5263,
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,
1640,
21867,
13332,
225,
2552,
980,
5263,
16,
2362,
16,
1801,
16,
331,
16,
431,
1280,
941,
16,
6298,
225,
331,
9614,
11438,
11929,
273,
14730,
12,
86,
6406,
12,
3548,
63,
1369,
5263,
2... |
ans = self._check_nans(other, context) if ans: return ans | if (self._is_special or other and other._is_special): ans = self._check_nans(other, context) if ans: return ans | def compare(self, other, context=None): """Compares one to another. | 323d0b30a64964b89a85e1b02e8fcc4017ce9fa7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/323d0b30a64964b89a85e1b02e8fcc4017ce9fa7/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
19199,
1245,
358,
4042,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
19199,
1245,
358,
4042,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
join information_schema.key_column_usage fk_cols | join information_schema.key_column_usage fk_cols | def get_relations(self, cursor, table_name): source_field_dict = self._name_to_index(cursor, table_name) sql = """ | 672a3bf79aaf9caebe9d1386b47cf42345466cd3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1254/672a3bf79aaf9caebe9d1386b47cf42345466cd3/introspection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
15018,
12,
2890,
16,
3347,
16,
1014,
67,
529,
4672,
1084,
67,
1518,
67,
1576,
273,
365,
6315,
529,
67,
869,
67,
1615,
12,
9216,
16,
1014,
67,
529,
13,
225,
1847,
273,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
15018,
12,
2890,
16,
3347,
16,
1014,
67,
529,
4672,
1084,
67,
1518,
67,
1576,
273,
365,
6315,
529,
67,
869,
67,
1615,
12,
9216,
16,
1014,
67,
529,
13,
225,
1847,
273,
3536,
... |
bits are greater than the input bits. | bits are greater than the input bits:: | def polynomials(self, X=None, Y=None, degree=2, groebner=False): r""" Return a list of polynomials satisfying this S-box. | 722300ff09b8199db5acea36fda4b2778a4c12e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/722300ff09b8199db5acea36fda4b2778a4c12e9/sbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16991,
87,
12,
2890,
16,
1139,
33,
7036,
16,
1624,
33,
7036,
16,
10782,
33,
22,
16,
314,
303,
24008,
1224,
33,
8381,
4672,
436,
8395,
2000,
279,
666,
434,
16991,
87,
9281,
14946,
333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16991,
87,
12,
2890,
16,
1139,
33,
7036,
16,
1624,
33,
7036,
16,
10782,
33,
22,
16,
314,
303,
24008,
1224,
33,
8381,
4672,
436,
8395,
2000,
279,
666,
434,
16991,
87,
9281,
14946,
333,
... |
c = pygame.midi.get_default_input_id() | c = pygame.midi.get_default_input_id() | def test_get_default_input_id(self): | 0d0cca67108feaa7810ce5497797000d19f5b226 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1298/0d0cca67108feaa7810ce5497797000d19f5b226/midi_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
1886,
67,
2630,
67,
350,
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,
... | [
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,
1842,
67,
588,
67,
1886,
67,
2630,
67,
350,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
rawval = d[option] | value = d[option] | def get(self, section, option, raw=0, vars=None): """Get an option value for a given section. | 92ed640936b92665295d98ba8eae84e2874ec357 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/92ed640936b92665295d98ba8eae84e2874ec357/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
2442,
16,
1456,
16,
1831,
33,
20,
16,
4153,
33,
7036,
4672,
3536,
967,
392,
1456,
460,
364,
279,
864,
2442,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
2442,
16,
1456,
16,
1831,
33,
20,
16,
4153,
33,
7036,
4672,
3536,
967,
392,
1456,
460,
364,
279,
864,
2442,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sys.setrecursionlimit(100) | def run(): # Read the arguments. try: opts, args = getopt.getopt(sys.argv[1:], 'htdbzp:l:u:') except getopt.error, msg: print >>sys.stderr, str(msg) + '\n\n' + __doc__ sys.exit() for opt, arg in opts: if opt == '-h': print >>sys.stderr, __doc__ sys.exit() elif opt == '-b': state.launchUI = True elif opt == '-d': state.useDB = True elif opt == '-p': state.databaseFilename = arg elif opt == '-l': state.proxyPorts = [int(arg)] elif opt == '-u': state.uiPort = int(arg) # Do whatever we've been asked to do... state.createWorkers() main(state.uiPort, state.launchUI) | d319917072174781f46b53caa571a8bdd023d80f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/d319917072174781f46b53caa571a8bdd023d80f/proxytrainer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
13332,
468,
2720,
326,
1775,
18,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
647,
1966,
94,
84,
30,
80,
30,
89,
2497,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13332,
468,
2720,
326,
1775,
18,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
647,
1966,
94,
84,
30,
80,
30,
89,
2497,
1... | |
help="show information about package(s)") | help="show information about a package") | def main(): from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] [name] [version]", description=__doc__) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force install the main package " "(not it's dependencies, see --forceall)") p.add_option("--forceall", action="store_true", help="force install of all packages " "(i.e. including dependencies)") p.add_option('-i', "--info", action="store_true", help="show information about package(s)") p.add_option('-l', "--list", action="store_true", help="list the packages currently installed on the system") p.add_option('-n', "--dry-run", action="store_true", help="show what would have been downloaded/removed/installed") p.add_option('-N', "--no-deps", action="store_true", help="neither download nor install dependencies") p.add_option("--path", action="store_true", help="based on the configuration, display how to set the " "PATH and PYTHONPATH environment variables") p.add_option("--prefix", action="store", help="install prefix (disregarding of any settings in " "the config file)", metavar='PATH') p.add_option("--proxy", action="store", help="use a proxy for downloads", metavar='URL') p.add_option("--remove", action="store_true", help="remove a package") p.add_option('-s', "--search", action="store_true", help="search the index in the repo (chain) of packages " "and display versions available.") p.add_option("--sys-prefix", action="store_true", help="use sys.prefix as the install prefix") p.add_option('-v', "--verbose", action="store_true") p.add_option('--version', action="store_true") opts, args = p.parse_args() if len(args) > 0 and (opts.config or opts.path): p.error("Option takes no arguments") if opts.prefix and opts.sys_prefix: p.error("Options --prefix and --sys-prefix exclude each ohter") if opts.force and opts.forceall: p.error("Options --force and --forceall exclude each ohter") pat = None if (opts.list or opts.search) and args: pat = re.compile(args[0], re.I) if opts.version: # --version from enstaller import __version__ print "Enstaller version:", __version__ return if opts.config: # --config config.print_config() return if opts.proxy: # --proxy from proxy.api import setup_proxy setup_proxy(opts.proxy) if config.get_path() is None: # create config file if it dosn't exist config.write(opts.proxy) conf = config.read() # conf if (not opts.proxy) and conf['proxy']: from proxy.api import setup_proxy setup_proxy(conf['proxy']) global prefix, dry_run, noapp, version # set globals if opts.sys_prefix: prefix = sys.prefix elif opts.prefix: prefix = opts.prefix else: prefix = conf['prefix'] dry_run = opts.dry_run noapp = conf['noapp'] version = opts.version if opts.path: # --path print_path() return if opts.list: # --list list_option(pat) return c = Chain(conf['IndexedRepos'], verbose) # init chain if opts.search: # --search search(c, pat) return if len(args) == 0: p.error("Requirement (name and optional version) missing") if len(args) > 2: p.error("A requirement is a name and an optional version") req = Req(' '.join(args)) if opts.info: # --info if len(args) != 1: p.error("Option requires one argument (the name)") info_option(conf['info_url'], c, req.name) return print "prefix:", prefix check_write() if opts.remove: # --remove remove_req(req) return dists = get_dists(c, req, # dists recur=not opts.no_deps) # Warn the user about packages which depend on what will be updated depend_warn([filename_dist(d) for d in dists]) # Packages which are installed currently sys_inst = set(egginst.get_installed(sys.prefix)) if prefix == sys.prefix: prefix_inst = sys_inst else: prefix_inst = set(egginst.get_installed(prefix)) all_inst = sys_inst | prefix_inst # These are the packahes which are being excluded from being installed if opts.forceall: exclude = set() else: exclude = all_inst if opts.force: exclude.discard(filename_dist(dists[-1])) # Fetch distributions if not isdir(conf['local']): os.makedirs(conf['local']) for dist, fn in iter_dists_excl(dists, exclude): c.fetch_dist(dist, conf['local'], check_md5=opts.force or opts.forceall, dry_run=dry_run) # Remove packages (in reverse install order) for dist in dists[::-1]: fn = filename_dist(dist) if fn in all_inst: # if the distribution (which needs to be installed) is already # installed don't remove it continue cname = cname_fn(fn) # Only remove packages installed in prefix for fn_inst in prefix_inst: if cname == cname_fn(fn_inst): call_egginst(fn_inst, remove=True) # Install packages installed_something = False for dist, fn in iter_dists_excl(dists, exclude): installed_something = True call_egginst(join(conf['local'], fn)) if not installed_something: print "No update necessary, %s is up-to-date." % req print_installed_info(req.name) | 57ab89d9c43316efb5f03f17026cbdc655c2efd8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/57ab89d9c43316efb5f03f17026cbdc655c2efd8/enpkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
628,
2153,
2670,
1930,
18862,
225,
293,
273,
18862,
12,
9167,
1546,
9167,
30,
738,
14654,
306,
2116,
65,
306,
529,
65,
306,
1589,
65,
3113,
2477,
33,
972,
2434,
972,
13,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
628,
2153,
2670,
1930,
18862,
225,
293,
273,
18862,
12,
9167,
1546,
9167,
30,
738,
14654,
306,
2116,
65,
306,
529,
65,
306,
1589,
65,
3113,
2477,
33,
972,
2434,
972,
13,
2... |
self.pool = processes.ProcessPool('python', ['-c', 'print "y"; import time; time.sleep(0.1); print "y"'], max_size=1) | self.pool = processes.ProcessPool(sys.executable, ['-c', 'print "y"; import time; time.sleep(0.4); print "y"'], max_size=1) | def setUp(self): self.pool = processes.ProcessPool('python', ['-c', 'print "y"; import time; time.sleep(0.1); print "y"'], max_size=1) | c7728ee4a137dee176d27fb0d021905ed693dfc1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10078/c7728ee4a137dee176d27fb0d021905ed693dfc1/processes_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
6011,
273,
8488,
18,
2227,
2864,
2668,
8103,
2187,
10228,
17,
71,
2187,
296,
1188,
315,
93,
14432,
1930,
813,
31,
813,
18,
19607,
12,
20,
18,
21,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24292,
12,
2890,
4672,
365,
18,
6011,
273,
8488,
18,
2227,
2864,
2668,
8103,
2187,
10228,
17,
71,
2187,
296,
1188,
315,
93,
14432,
1930,
813,
31,
813,
18,
19607,
12,
20,
18,
21,
1769,
... |
self.reset() | self.mpd.getStatus() | def AddSongs(self, x, y, songs): index = self._getDropIndex(x, y) dprint("At (%d,%d), index=%d, adding %s" % (x, y, index, songs)) # Looks like the MPD protocol is a bit limited in that you # can't add a song at a particular spot; only at the end. So, # we'll have to add them all and then move them (potential # race condition if there's another mpd client adding songs at # the some time. list_count = self.GetItemCount() highlight = [] for song in songs: if type(song) == int: sid = self.playlist_cache[song] dprint("Moving id=%d (index=%d) to %d" % (sid, song, index)) self.mpd.moveid(sid, index) if song >= index: index += 1 highlight.append(sid) else: ret = self.mpd.addid(song) sid = int(ret['id']) self.mpd.moveid(sid, index) index += 1 highlight.append(sid) self.reset() self.setSelected(highlight) | 5d0654c6ed59c9ed6c325bb83e8a022b3bc88ff9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/5d0654c6ed59c9ed6c325bb83e8a022b3bc88ff9/mpd_major_mode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
55,
7260,
12,
2890,
16,
619,
16,
677,
16,
272,
7260,
4672,
770,
273,
365,
6315,
588,
7544,
1016,
12,
92,
16,
677,
13,
302,
1188,
2932,
861,
6142,
72,
15529,
72,
3631,
770,
5095... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
55,
7260,
12,
2890,
16,
619,
16,
677,
16,
272,
7260,
4672,
770,
273,
365,
6315,
588,
7544,
1016,
12,
92,
16,
677,
13,
302,
1188,
2932,
861,
6142,
72,
15529,
72,
3631,
770,
5095... |
'stream' : (pid, lfn), 'query' : '' | 'stream' : [(pid, lfn)], 'query' : '', 'orderedcol' : ['process_id', 'lfn' ] | def set_lfn(self,lfn): """ Add an LFN table to a parsed LIGO_LW XML document. | 11f3be9cb0e00c5513314015209b804cfd234bc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/11f3be9cb0e00c5513314015209b804cfd234bc0/ldbd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
80,
4293,
12,
2890,
16,
80,
4293,
4672,
3536,
1436,
392,
18803,
50,
1014,
358,
279,
2707,
511,
3047,
51,
67,
48,
59,
3167,
1668,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
80,
4293,
12,
2890,
16,
80,
4293,
4672,
3536,
1436,
392,
18803,
50,
1014,
358,
279,
2707,
511,
3047,
51,
67,
48,
59,
3167,
1668,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
b.pack(side = LEFT) label = TLabel(tbar, image = "toolbar_sep") label.pack(side = LEFT) | b.pack(side=LEFT) label = TLabel(tbar, image="toolbar_sep") label.pack(side=LEFT) | def build_toolbar(self): tbar = self.tbar canvas = self.canvas commands = self.commands label = TLabel(tbar, image = "toolbar_left") label.pack(side = LEFT) | 5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
18849,
12,
2890,
4672,
268,
3215,
273,
365,
18,
88,
3215,
5953,
273,
365,
18,
15424,
4364,
273,
365,
18,
7847,
225,
1433,
273,
399,
2224,
12,
88,
3215,
16,
1316,
273,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
18849,
12,
2890,
4672,
268,
3215,
273,
365,
18,
88,
3215,
5953,
273,
365,
18,
15424,
4364,
273,
365,
18,
7847,
225,
1433,
273,
399,
2224,
12,
88,
3215,
16,
1316,
273,
315,
... |
security.declareProtected(CMFCorePermissions.View, 'copy') | security.declareProtected(permissions.View, 'copy') | def __add__(self, other): c = BasicSchema() # We can't use update and keep the order so we do it manually for field in self.fields(): c.addField(field) for field in other.fields(): c.addField(field) # Need to be smarter when joining layers # and internal props c._props.update(self._props) return c | 209dd0431121be615174f562fcf89fd6fae6c083 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/209dd0431121be615174f562fcf89fd6fae6c083/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
1308,
4672,
276,
273,
7651,
3078,
1435,
468,
1660,
848,
1404,
999,
1089,
471,
3455,
326,
1353,
1427,
732,
741,
518,
10036,
364,
652,
316,
365,
18,
2821,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
1308,
4672,
276,
273,
7651,
3078,
1435,
468,
1660,
848,
1404,
999,
1089,
471,
3455,
326,
1353,
1427,
732,
741,
518,
10036,
364,
652,
316,
365,
18,
2821,
... |
return [fti.getId() for fti in self.getDefaultAddableTypes()] | return [fti.getId() for fti in self.getDefaultAddableTypes(context)] | def getLocallyAllowedTypes(self): """If enableTypeRestrictions is ENABLE, return the list of types set. If it is ACQUIRE, get the types set on the parent so long as the parent is of the same type - if not, use the same behaviuor as DISABLE: return the types allowable in the item. """ mode = self.getConstrainTypesMode() | 0b2ea0603f7e6900b84ba8d42d6d3949e0d860b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/0b2ea0603f7e6900b84ba8d42d6d3949e0d860b9/constraintypes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1333,
1230,
5042,
2016,
12,
2890,
4672,
3536,
2047,
4237,
559,
26175,
353,
6693,
2782,
16,
327,
326,
666,
434,
1953,
444,
18,
971,
518,
353,
12048,
28689,
16,
336,
326,
1953,
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,
336,
1333,
1230,
5042,
2016,
12,
2890,
4672,
3536,
2047,
4237,
559,
26175,
353,
6693,
2782,
16,
327,
326,
666,
434,
1953,
444,
18,
971,
518,
353,
12048,
28689,
16,
336,
326,
1953,
444,
... |
spaceline = spaceline.replace('\'s', ' s') | def display_summary(self, rec, paramDict, proxInfo=None, highlight=1): global nonAsciiRe, asciiFriendly, overescapedAmpRe, unescapeCharent recid = rec.id self.logger.log('Summary requested for record: %s' % (recid)) # highlight search terms in rec.sax if (proxInfo) and highlight: nodeIdxs = proxInfo[::2] wordIdxs = proxInfo[1::2] xps = {} tree = rec.dom.getroottree() walker = rec.dom.getiterator() for x, n in enumerate(walker): if x in nodeIdxs: xps[x] = tree.getpath(n) for x, ni in enumerate(nodeIdxs): wi = wordIdxs[x] wordCount = 0 xp = xps[ni] el = rec.dom.xpath(xp)[0] located = None for c in el.getiterator(): if c.text: spaceline = punctuationRe.sub(' ', c.text) spaceline = spaceline.replace('\'s', ' s') # Words ending in 's are treated as 2 words in proximityInfo - make it so! words = wordRe.findall(spaceline) try: start = sum(map(len, words[:wi - wordCount])) end = start + len(words[wi - wordCount]) except IndexError: wordCount += len(words) else: located = 'text' break if c.tail: spaceline = punctuationRe.sub(' ', c.tail) spaceline = spaceline.replace('\'s', ' s') # Words ending in 's are treated as 2 words in proximityInfo - make it so! words = wordRe.findall(spaceline) try: start = sum(map(len, words[:wi - wordCount])) end = start + len(words[wi - wordCount]) except IndexError: wordCount += len(words) else: located = 'tail' break if located: wp = 0 while words[wi - wordCount][wp] == ' ': wp += 1 start += wp if located == 'text': c.text = c.text[:start] + 'HGHLGHT' + c.text[start:end] + 'THGLHGH' + c.text[end:] elif located == 'tail': c.tail = c.tail[:start] + 'HGHLGHT' + c.tail[start:end] + 'THGLHGH' + c.tail[end:] else: # woops something went seriously wrong raise ValueError(located) | 51c4864bb9efdde7305f1cca91b49e2220b7771c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11263/51c4864bb9efdde7305f1cca91b49e2220b7771c/eadSearchHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
67,
7687,
12,
2890,
16,
1950,
16,
579,
5014,
16,
8617,
966,
33,
7036,
16,
8839,
33,
21,
4672,
2552,
1661,
21363,
426,
16,
11384,
19730,
16,
1879,
16502,
26895,
426,
16,
15568,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
67,
7687,
12,
2890,
16,
1950,
16,
579,
5014,
16,
8617,
966,
33,
7036,
16,
8839,
33,
21,
4672,
2552,
1661,
21363,
426,
16,
11384,
19730,
16,
1879,
16502,
26895,
426,
16,
15568,
78... | |
def mk_csh_script(script_nm): | def mk_csh_script(script_nm, rsfroot): | def mk_csh_script(script_nm): 'Write the (t)csh environments setup script' global dpath csh = open(script_nm, 'w') csh.write('''#!/bin/csh | 6f411a9c2ac1ce299e662eba6482fb564978eb19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3143/6f411a9c2ac1ce299e662eba6482fb564978eb19/setenv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
67,
71,
674,
67,
4263,
12,
4263,
67,
15094,
16,
3597,
74,
3085,
4672,
296,
3067,
326,
261,
88,
13,
71,
674,
15900,
3875,
2728,
11,
2552,
302,
803,
225,
276,
674,
273,
1696,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
67,
71,
674,
67,
4263,
12,
4263,
67,
15094,
16,
3597,
74,
3085,
4672,
296,
3067,
326,
261,
88,
13,
71,
674,
15900,
3875,
2728,
11,
2552,
302,
803,
225,
276,
674,
273,
1696,
12,... |
self.link_shared_object (objects, "lib%s%s" % (output_libname, SO)) | self.link_shared_object (objects, "lib%s%s" % \ (output_libname, self._shared_lib_ext), build_info=build_info) | def link_shared_lib (self, objects, output_libname, libraries=None, library_dirs=None): # XXX should we sanity check the library name? (eg. no # slashes) self.link_shared_object (objects, "lib%s%s" % (output_libname, SO)) | de6a1e2939e1379adf884ed5fd5b6f676885d387 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/de6a1e2939e1379adf884ed5fd5b6f676885d387/unixccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
67,
11574,
67,
2941,
261,
2890,
16,
2184,
16,
876,
67,
2941,
529,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
4672,
468,
11329,
1410,
732,
16267,
866,
326,
5313,
508,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
67,
11574,
67,
2941,
261,
2890,
16,
2184,
16,
876,
67,
2941,
529,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
4672,
468,
11329,
1410,
732,
16267,
866,
326,
5313,
508,
35,
... |
'subject': self.newticket and subject or 'Re: ' + subject, | 'subject': subject, | def notify(self, ticket, newticket=True, modtime=None): self.ticket = ticket self.modtime = modtime self.newticket = newticket | f6093facf4885762484879a0d77883d9dadab7c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f6093facf4885762484879a0d77883d9dadab7c9/notification.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
12,
2890,
16,
9322,
16,
394,
16282,
33,
5510,
16,
681,
957,
33,
7036,
4672,
365,
18,
16282,
273,
9322,
365,
18,
1711,
957,
273,
681,
957,
365,
18,
2704,
16282,
273,
394,
16282,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
12,
2890,
16,
9322,
16,
394,
16282,
33,
5510,
16,
681,
957,
33,
7036,
4672,
365,
18,
16282,
273,
9322,
365,
18,
1711,
957,
273,
681,
957,
365,
18,
2704,
16282,
273,
394,
16282,
... |
if isinstance(r, UpServer): | if isinstance(server, UpServer): | def updateServerState(rackId, host, server): global serversByRack if rackId in serversByRack: # we really need a find_if() for r in serversByRack[rackId]: if r.host == host: if isinstance(r, UpServer): r.overloaded = server.overloaded r.wasStarted = 1 if hasattr(server, 'stillDown'): r.isDown = server.stillDown if r.isDown: r.overloaded = 0 | a31d0a4dbd264cec5d425b6a3f99a5e799c723e6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4466/a31d0a4dbd264cec5d425b6a3f99a5e799c723e6/kfsstatus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
2081,
1119,
12,
21580,
548,
16,
1479,
16,
1438,
4672,
2552,
7084,
858,
54,
484,
309,
19495,
548,
316,
7084,
858,
54,
484,
30,
468,
732,
8654,
1608,
279,
1104,
67,
430,
1435,
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,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
2081,
1119,
12,
21580,
548,
16,
1479,
16,
1438,
4672,
2552,
7084,
858,
54,
484,
309,
19495,
548,
316,
7084,
858,
54,
484,
30,
468,
732,
8654,
1608,
279,
1104,
67,
430,
1435,
364,... |
""" | """ | def getType(self, parameter): """ Created: 29.05.2006, KP Description: Return the type of the parameter """ if parameter in ["Lower", "Upper"]: return GUIBuilder.THRESHOLD elif "Radius" in parameter: return types.IntType return GUIBuilder.PIXELS | 6d7b572696d4ecdce2049b45a6e109836f3272c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/6d7b572696d4ecdce2049b45a6e109836f3272c9/SegmentationFilters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3130,
12,
2890,
16,
1569,
4672,
3536,
12953,
30,
12899,
18,
6260,
18,
6976,
26,
16,
1475,
52,
6507,
30,
2000,
326,
618,
434,
326,
1569,
3536,
309,
1569,
316,
8247,
4070,
3113,
315,
598... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3130,
12,
2890,
16,
1569,
4672,
3536,
12953,
30,
12899,
18,
6260,
18,
6976,
26,
16,
1475,
52,
6507,
30,
2000,
326,
618,
434,
326,
1569,
3536,
309,
1569,
316,
8247,
4070,
3113,
315,
598... |
activity = SystemActivity(system.user, 'VIA %s' % None, 'Provision', 'Distro', "", "Success: %s" % distro.install_name) system.activity.append(activity) | system.activity.append(SystemActivity(system.user, 'VIA %s' % None, 'Provision', 'Distro', "", "Success: %s" % distro.install_name)) | def commandBoot(self, commands): """ NetBoot Compat layer for old RHTS Scheduler """ repos = [] bootargs = None kickstart = None packages = [] runtest_url = None testrepo = None hostname = None distro_name = None SETENV = re.compile(r'SetEnvironmentVar\s+([^\s]+)\s+"*([^"]+)') BOOTARGS = re.compile(r'BootArgs\s+(.*)') KICKSTART = re.compile(r'Kickstart\s+(.*)') ADDREPO = re.compile(r'AddRepo\s+([^\s]+)') TESTREPO = re.compile(r'TestRepo\s+([^\s]+)') INSTALLPACKAGE = re.compile(r'InstallPackage\s+([^\s]+)') | 13378f18ea70c7a6084a36c1ca141cc0b2dadb9e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14755/13378f18ea70c7a6084a36c1ca141cc0b2dadb9e/controllers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
15817,
12,
2890,
16,
4364,
4672,
3536,
8503,
15817,
5427,
270,
3018,
364,
1592,
534,
5062,
55,
12620,
3536,
13686,
273,
5378,
4835,
1968,
273,
599,
23228,
1937,
273,
599,
5907,
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,
1296,
15817,
12,
2890,
16,
4364,
4672,
3536,
8503,
15817,
5427,
270,
3018,
364,
1592,
534,
5062,
55,
12620,
3536,
13686,
273,
5378,
4835,
1968,
273,
599,
23228,
1937,
273,
599,
5907,
273,
... |
amp_val = paz2AmpValueOfFreqResp(woodander) / paz2AmpValueOfFreqResp(paz) | amp_val = paz2AmpValueOfFreqResp(woodander, freq) / paz2AmpValueOfFreqResp(paz, freq) | def estimateMagnitude(paz, amplitude, timespan, h_dist): """ Estimates local magnitude from poles and zeros of given instrument, the peak to peak amplitude and the period in which it is measured :param paz: PAZ of the instrument :param amplitude: Peak to peak amplitude :param timespan: Timespan of peak to peak amplitude :param h_dist: Horizontal distance to epicenter XXX: Not sure if this is right, need to check tommorrow """ woodander = {'poles': [-6.283 + 4.7124j, -6.283 - 4.7124], 'zeros': [0j], 'gain': 2080} freq = 1 / (2 * timespan) amp_val = paz2AmpValueOfFreqResp(woodander) / paz2AmpValueOfFreqResp(paz) amp_val *= 1000 # convert to mm # analog to spr_mag.c,v line 523 magnitude = np.log10(amp_val) + np.log10(h_dist/100.0) + \ 0.00301*(h_dist - 100.0) + 3.0 return magnitude | 8c95dc74272bbe478a95326fe52e03708a201909 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/8c95dc74272bbe478a95326fe52e03708a201909/invsim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11108,
11372,
10754,
12,
84,
1561,
16,
26607,
16,
4124,
7355,
16,
366,
67,
4413,
4672,
3536,
17787,
29678,
1191,
13463,
628,
2952,
281,
471,
4922,
434,
864,
10353,
16,
326,
11148,
358,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11108,
11372,
10754,
12,
84,
1561,
16,
26607,
16,
4124,
7355,
16,
366,
67,
4413,
4672,
3536,
17787,
29678,
1191,
13463,
628,
2952,
281,
471,
4922,
434,
864,
10353,
16,
326,
11148,
358,
1... |
def _rec_get(ids): | def _rec_get(ids, table, parent): if not ids: return [] if 'active' in table._columns: ids2 = table.search(cr, user, [(parent,'in',ids),('active','in', [True, False])]) else: ids2 = table.search(cr, user, [(parent, 'in', ids)]) return ids + _rec_get(ids2, table, parent) def _rec_convert(ids): | def _rec_get(ids): if not len(ids): return [] cr.execute('select '+field._id1+' from '+field._rel+' where '+field._id2+' in ('+','.join(map(str,ids))+')') ids = [x[0] for x in cr.fetchall()] return ids + _rec_get(ids) | 5ef2194dc0cce8f143370d1f7f6f9aede7148905 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/5ef2194dc0cce8f143370d1f7f6f9aede7148905/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
309,
296,
3535,
11,
316,
1014,
6315,
5112,
30,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
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,
1,
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,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
309,
296,
3535,
11,
316,
1014,
6315,
5112,
30,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
729,... |
[NOTE: this test currently FAILS due to trac \ essentially correct though. Should be revisited when that bug is resolved.] | def padic_sigma(self, p, N=20, E2=None, check=False, check_hypotheses=True): r""" Computes the p-adic sigma function with respect to the standard invariant differential $dx/(2y + a_1 x + a_3)$, as defined by Mazur and Tate, as a power series in the usual uniformiser $t$ at the origin. | f06b34a4df7347d15a5cc8350a6afab53e4b6cae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f06b34a4df7347d15a5cc8350a6afab53e4b6cae/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4627,
335,
67,
13201,
12,
2890,
16,
293,
16,
423,
33,
3462,
16,
512,
22,
33,
7036,
16,
866,
33,
8381,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4627,
335,
67,
13201,
12,
2890,
16,
293,
16,
423,
33,
3462,
16,
512,
22,
33,
7036,
16,
866,
33,
8381,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281,
... | |
if field_number is not None: if field_number < 1 or field_number > 14: gdal.Debug( "pgufont", 'invalid field number (%s), should be 1-14' % field_number) else: result = self.parts[field_number] if field_name is not None: if self.xlfd_field_names.count(field_name) == 0: gdal.Debug( "pgufont", 'invalid field name (%s), should be one of %s' \ % (field_name, self.xlfd_field_names) ) else: result = self.parts[self.xlfd_field_names.index(field_name)] return result def set_font_part(self, field_name, value): """ set a part of the font description """ self.pango_desc = None if self.xlfd_field_names.count(field_name) != 0: self.parts[self.xlfd_field_names.index(field_name)] = value | if field_number and field_number <= 14: result = self.parts[field_number] else: gdal.Debug( "pgufont", 'invalid field number (%s), should be 1-14' % field_number) fnames = self.xlfd_field_names if field_name and field_name in fnames: result = self.parts[fnames.index(field_name)] | def get_font_part(self, field_name=None, field_number=None): """ Get one part of the font description by field name or number. If both are specified, the result of the field name will be returned if it is valid, or if invalid, the field number, or if that is also invalid, the an empty string. """ result = '' if field_number is not None: if field_number < 1 or field_number > 14: gdal.Debug( "pgufont", 'invalid field number (%s), should be 1-14' % field_number) else: result = self.parts[field_number] | 6cfe0b0ebc1d4511b611dddafdec6dc059fe54b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11090/6cfe0b0ebc1d4511b611dddafdec6dc059fe54b2/pgufont.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5776,
67,
2680,
12,
2890,
16,
652,
67,
529,
33,
7036,
16,
652,
67,
2696,
33,
7036,
4672,
3536,
968,
1245,
1087,
434,
326,
3512,
2477,
635,
652,
508,
578,
1300,
18,
225,
971,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5776,
67,
2680,
12,
2890,
16,
652,
67,
529,
33,
7036,
16,
652,
67,
2696,
33,
7036,
4672,
3536,
968,
1245,
1087,
434,
326,
3512,
2477,
635,
652,
508,
578,
1300,
18,
225,
971,... |
plugin_api.remove_task_toolbar_item(self.tb_button) plugin_api.remove_task_toolbar_item(self.separator) | plugin_api.remove_toolbar_item(self.tb_button) plugin_api.remove_toolbar_item(self.separator) | def deactivate(self, plugin_api): plugin_api.remove_menu_item(self.menu_item) plugin_api.remove_task_toolbar_item(self.tb_button) plugin_api.remove_task_toolbar_item(self.separator) self.txtImport = None | c9bb015212786dbe5ba0d03ef671ce8dbf2c24d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c9bb015212786dbe5ba0d03ef671ce8dbf2c24d5/import_json.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18790,
12,
2890,
16,
1909,
67,
2425,
4672,
1909,
67,
2425,
18,
4479,
67,
5414,
67,
1726,
12,
2890,
18,
5414,
67,
1726,
13,
1909,
67,
2425,
18,
4479,
67,
18849,
67,
1726,
12,
2890,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18790,
12,
2890,
16,
1909,
67,
2425,
4672,
1909,
67,
2425,
18,
4479,
67,
5414,
67,
1726,
12,
2890,
18,
5414,
67,
1726,
13,
1909,
67,
2425,
18,
4479,
67,
18849,
67,
1726,
12,
2890,
18... |
if inspect.isroutine(object): returnself.docroutine(*args) | if inspect.isroutine(object): return self.docroutine(*args) | def document(self, object, name=None, *args): """Generate documentation for an object.""" args = (object, name) + args if inspect.ismodule(object): return self.docmodule(*args) if inspect.isclass(object): return self.docclass(*args) if inspect.isroutine(object): returnself.docroutine(*args) return self.docother(*args) | b47666ec97002f3117aa19c4e117aea8cdc7475a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b47666ec97002f3117aa19c4e117aea8cdc7475a/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1668,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
380,
1968,
4672,
3536,
4625,
7323,
364,
392,
733,
12123,
833,
273,
261,
1612,
16,
508,
13,
397,
833,
309,
5334,
18,
291,
2978,
12,
161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1668,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
380,
1968,
4672,
3536,
4625,
7323,
364,
392,
733,
12123,
833,
273,
261,
1612,
16,
508,
13,
397,
833,
309,
5334,
18,
291,
2978,
12,
161... |
w_exp = space.lshift(w_dem, w_exp) | w_exp = space.lshift(w_den, w_exp) | def float_as_integer_ratio__Float(space, w_float): value = w_float.floatval if isinf(value): w_msg = space.wrap("cannot pass infinity to as_integer_ratio()") raise OperationError(space.w_OverflowError, w_msg) elif isnan(value): w_msg = space.wrap("cannot pass nan to as_integer_ratio()") raise OperationError(space.w_ValueError, w_msg) float_part, exp = math.frexp(value) for i in range(300): if float_part == math.floor(float_part): break float_part *= 2.0 exp -= 1 w_num = W_LongObject.fromfloat(float_part) w_dem = space.newlong(1) w_exp = space.newlong(abs(exp)) w_exp = space.lshift(w_dem, w_exp) if exp > 0: w_num = space.mul(w_num, w_exp) else: w_dem = w_exp # Try to return int. return space.newtuple([space.int(w_num), space.int(w_dem)]) | c47979bdb1d789a6ae07a4c922ebb6023895e41e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/c47979bdb1d789a6ae07a4c922ebb6023895e41e/floatobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1431,
67,
345,
67,
7745,
67,
9847,
972,
4723,
12,
2981,
16,
341,
67,
5659,
4672,
460,
273,
341,
67,
5659,
18,
5659,
1125,
309,
353,
10625,
12,
1132,
4672,
341,
67,
3576,
273,
3476,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1431,
67,
345,
67,
7745,
67,
9847,
972,
4723,
12,
2981,
16,
341,
67,
5659,
4672,
460,
273,
341,
67,
5659,
18,
5659,
1125,
309,
353,
10625,
12,
1132,
4672,
341,
67,
3576,
273,
3476,
1... |
self.addFactoryArguments(profileDir=profileDir, extraArgs=extraArgs, appOverride=appOverride, testURL=testURL, timeout=timeout, logfile=logfile, logParser=logParser) self.profileDir = profileDir | self.addFactoryArguments(extraArgs=extraArgs, logfile=logfile) | def __init__(self, profileDir=None, extraArgs=None, appOverride=None, testURL=None, timeout=45, logfile=None, logParser=None, **kwargs): ShellCommand.__init__(self, **kwargs) | 6f3bfb3203d11bf02161facc3f6a3774fe464823 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/6f3bfb3203d11bf02161facc3f6a3774fe464823/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3042,
1621,
33,
7036,
16,
2870,
2615,
33,
7036,
16,
595,
6618,
33,
7036,
16,
1842,
1785,
33,
7036,
16,
2021,
33,
7950,
16,
15204,
33,
7036,
16,
613,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3042,
1621,
33,
7036,
16,
2870,
2615,
33,
7036,
16,
595,
6618,
33,
7036,
16,
1842,
1785,
33,
7036,
16,
2021,
33,
7950,
16,
15204,
33,
7036,
16,
613,
26... |
cur.execute("select checkType('blob', ?)", (buffer("blob"),)) | cur.execute("select checkType('blob', ?)", (buffer(b"blob"),)) | def CheckAggrCheckParamBlob(self): cur = self.con.cursor() cur.execute("select checkType('blob', ?)", (buffer("blob"),)) val = cur.fetchone()[0] self.failUnlessEqual(val, 1) | 5a5b6f717b4919e367822510ff3c5e83365749d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/5a5b6f717b4919e367822510ff3c5e83365749d8/userfunctions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
2577,
3197,
1564,
786,
9405,
12,
2890,
4672,
662,
273,
365,
18,
591,
18,
9216,
1435,
662,
18,
8837,
2932,
4025,
23008,
2668,
10721,
2187,
692,
2225,
16,
261,
4106,
12,
70,
6,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
2577,
3197,
1564,
786,
9405,
12,
2890,
4672,
662,
273,
365,
18,
591,
18,
9216,
1435,
662,
18,
8837,
2932,
4025,
23008,
2668,
10721,
2187,
692,
2225,
16,
261,
4106,
12,
70,
6,
107... |
def test_search_page_context_includes_recommendations(self): | @mock.patch('mysite.search.controllers.Query.get_or_create_cached_hit_count') def test_search_page_context_includes_recommendations(self, mocked_hit_counter): mocked_hit_counter.return_value = 1 | def test_search_page_context_includes_recommendations(self): client = self.login_with_client() response = client.get('/search/') | 9bd081a2704e673312ed9121a88dbb068ed1e741 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/9bd081a2704e673312ed9121a88dbb068ed1e741/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
632,
22851,
18,
2272,
2668,
81,
1900,
1137,
18,
3072,
18,
20171,
18,
1138,
18,
588,
67,
280,
67,
2640,
67,
7097,
67,
15989,
67,
1883,
6134,
1652,
1842,
67,
3072,
67,
2433,
67,
2472,
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,
225,
632,
22851,
18,
2272,
2668,
81,
1900,
1137,
18,
3072,
18,
20171,
18,
1138,
18,
588,
67,
280,
67,
2640,
67,
7097,
67,
15989,
67,
1883,
6134,
1652,
1842,
67,
3072,
67,
2433,
67,
2472,
6... |
configfile = self.configuser | f = open(self.configuser, "w") f.write("%s %s %s\n" % (self.model, self.layout, self.variant)) f.close() | def new(self): m = self.model l = self.layout v = self.variant if v == "Standard": v = '""' | ea0b76f38a72ecb51a6a2599ad45946a2a8b892f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2375/ea0b76f38a72ecb51a6a2599ad45946a2a8b892f/xkmap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
2890,
4672,
312,
273,
365,
18,
2284,
328,
273,
365,
18,
6741,
331,
273,
365,
18,
8688,
309,
331,
422,
315,
8336,
6877,
331,
273,
2119,
5187,
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,
394,
12,
2890,
4672,
312,
273,
365,
18,
2284,
328,
273,
365,
18,
6741,
331,
273,
365,
18,
8688,
309,
331,
422,
315,
8336,
6877,
331,
273,
2119,
5187,
2,
-100,
-100,
-100,
-100,
-100,
... |
self.SortRecurse(item) | self.sortRecurse(item) | def SortRecurse(self, parent=None): if parent is None: parent = self.GetRootItem() self.SortChildren(parent) item, cookie = self.GetFirstChild(parent) while item: self.SortRecurse(item) item, cookie = self.GetNextChild(parent, cookie) | e529bf7052e4d682be76cb28de0c6a80688a2b73 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/e529bf7052e4d682be76cb28de0c6a80688a2b73/userparams.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5928,
426,
17682,
12,
2890,
16,
982,
33,
7036,
4672,
309,
982,
353,
599,
30,
982,
273,
365,
18,
967,
2375,
1180,
1435,
365,
18,
4416,
4212,
12,
2938,
13,
761,
16,
3878,
273,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5928,
426,
17682,
12,
2890,
16,
982,
33,
7036,
4672,
309,
982,
353,
599,
30,
982,
273,
365,
18,
967,
2375,
1180,
1435,
365,
18,
4416,
4212,
12,
2938,
13,
761,
16,
3878,
273,
365,
18,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.