rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
print ('Warning: could not find UID for L{%s} in %r' % | print ('Warning: could not find UID for L{%s} in %s' % | def _dom_link_to_html(self, target, name, container): uid = findUID(target, container, self._docmap) if uid is None: print ('Warning: could not find UID for L{%s} in %r' % (target, container)) return self._uid_to_href(uid, name, 'link') | 7e1af2abc702612461ceeb001b4b551d49cb71d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7e1af2abc702612461ceeb001b4b551d49cb71d3/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9859,
67,
1232,
67,
869,
67,
2620,
12,
2890,
16,
1018,
16,
508,
16,
1478,
4672,
4555,
273,
1104,
3060,
12,
3299,
16,
1478,
16,
365,
6315,
2434,
1458,
13,
309,
4555,
353,
599,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9859,
67,
1232,
67,
869,
67,
2620,
12,
2890,
16,
1018,
16,
508,
16,
1478,
4672,
4555,
273,
1104,
3060,
12,
3299,
16,
1478,
16,
365,
6315,
2434,
1458,
13,
309,
4555,
353,
599,
30... |
print "<OL type=\"I\">" | print "<ol type=\"I\">" | def processLine(linein): global level, formatMode, slides, hideComments, inBodyText, styleSheet, inlineStyle if (lstrip(linein) == ""): return lineLevel = getLineLevel(linein) if ((hideComments == 0) or (lineLevel != (find(linein,"[")+1))): if (formatMode == "simple"): print "<H" + str(lineLevel) + ">" + lstrip(linein) + "</H" + str(lineLevel) + ">" else: if (lineLevel > level): while (lineLevel > level): if (formatMode == "bullets"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<UL>" elif (formatMode == "roman"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<OL type=\"I\">" elif (formatMode == "numeric"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<OL type=\"1\">" elif (formatMode == "alpha"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<OL type=\"A\">" elif (formatMode == "indent"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<OL>" else: sys.exit("Error! Unknown formatMode type") level = level + 1 elif (lineLevel < level): while (lineLevel < level): if (formatMode == "bullets"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "</UL>" else: if (inBodyText == 1): print"</p>" inBodyText = 0 print "</OL>" level = level - 1 else: print if (lstrip(rstrip(linein)) == "----------------------------------------"): print "<br><br><hr><br>" else: if (slides == 0): if (lineLevel == find(linein," ") +1 ) or \ (lineLevel == find(linein,":") +1 ): if (inBodyText == 0): handleBodyText(linein,lineLevel) else: print colonStrip(rstrip(lstrip(linein))), else: if (inBodyText == 1): print"</p>" inBodyText = 0 print "<LI", if (styleSheet != ""): print " class=\"L" + str(lineLevel) + "\"", print ">" + rstrip(lstrip(linein)), else: if (lineLevel == 1): if (linein[0] == " "): if (inBodyText == 0): handleBodyText(linein,lineLevel) else: print rstrip(lstrip(linein)), else: print "<address>" print rstrip(lstrip(linein)), print "</address>\n" else: if (lineLevel == find(linein," ") +1 ) or \ (lineLevel == find(linein,":") +1 ): if (inBodyText == 0): handleBodyText(linein,lineLevel) else: print rstrip(lstrip(linein)), else: if (inBodyText == 1): print"</p>" inBodyText = 0 print "<LI", if (styleSheet != ""): print " class=\"LI.L" + str(lineLevel) + "\"", print ">" + rstrip(lstrip(linein)), | 7af5c2bb8f0372438a2b397a27fa3bf97585fc33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6154/7af5c2bb8f0372438a2b397a27fa3bf97585fc33/otl2html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1670,
12,
1369,
267,
4672,
2552,
1801,
16,
740,
2309,
16,
30119,
16,
6853,
9051,
16,
316,
2250,
1528,
16,
2154,
8229,
16,
6370,
2885,
309,
261,
80,
6406,
12,
1369,
267,
13,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1670,
12,
1369,
267,
4672,
2552,
1801,
16,
740,
2309,
16,
30119,
16,
6853,
9051,
16,
316,
2250,
1528,
16,
2154,
8229,
16,
6370,
2885,
309,
261,
80,
6406,
12,
1369,
267,
13,
422,
... |
yield "Version :", v | yield "Version : %s" %v | def formatInfo(self, trove): """ returns iteratore of format lines about this local trove """ # TODO: it'd be nice if this were set up to do arbitrary # formats... | 9a1fe2c57ddfa1825bf89e931655be5fc0268690 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/9a1fe2c57ddfa1825bf89e931655be5fc0268690/display.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
966,
12,
2890,
16,
23432,
537,
4672,
3536,
1135,
1400,
270,
479,
434,
740,
2362,
2973,
333,
1191,
23432,
537,
3536,
468,
2660,
30,
518,
14271,
506,
13752,
309,
333,
4591,
444,
731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
966,
12,
2890,
16,
23432,
537,
4672,
3536,
1135,
1400,
270,
479,
434,
740,
2362,
2973,
333,
1191,
23432,
537,
3536,
468,
2660,
30,
518,
14271,
506,
13752,
309,
333,
4591,
444,
731,
... |
print "Nick is okay" | LOG.debug( "Nick is okay" ) | def checkIncomingNick(self, n): try: inick = dc_to_irc(n.nick) | 1a57390c60627da9e810a0212997b3f88d2873a4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11503/1a57390c60627da9e810a0212997b3f88d2873a4/dtella_bridgeserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
20370,
29756,
12,
2890,
16,
290,
4672,
775,
30,
316,
1200,
273,
6744,
67,
869,
67,
481,
71,
12,
82,
18,
17091,
13,
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,
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,
866,
20370,
29756,
12,
2890,
16,
290,
4672,
775,
30,
316,
1200,
273,
6744,
67,
869,
67,
481,
71,
12,
82,
18,
17091,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
p_navtrail = """<a href="/submit">%(submit)s</a> > <a href="/submit?doctype=%(doctype)s\">%(docname)s</a> """ % { | p_navtrail = """<a href="/submit" class="navtrail">%(submit)s</a> > <a href="/submit?doctype=%(doctype)s" class="navtrail">%(docname)s</a> """ % { | def interface(req, c=cdsname, ln=cdslang, doctype="", act="", startPg=1, indir="", access="", mainmenu="", fromdir="", file="", nextPg="", nbPg="", curpage=1): """This function is called after a user has visited a document type's "homepage" and selected the type of "action" to perform. Having clicked an action-button (e.g. "Submit a New Record"), this function will be called . It performs the task of initialising a new submission session (retrieving information about the submission, creating a working submission-directory, etc), and "drawing" a submission page containing the WebSubmit form that the user uses to input the metadata to be submitted. When a user moves between pages in the submission interface, this function is recalled so that it can save the metadata entered into the previous page by the user, and draw the current submission-page. Note: During a submission, for each page refresh, this function will be called while the variable "step" (a form variable, seen by websubmit_webinterface, which calls this function) is 0 (ZERO). In other words, this function handles the FRONT-END phase of a submission, BEFORE the WebSubmit functions are called. @param req: (apache request object) *** NOTE: Added into this object, is a variable called "form" (req.form). This is added into the object in the index function of websubmit_webinterface. It contains a "mod_python.util.FieldStorage" instance, that contains the form-fields found on the previous submission page. @param c: (string), defaulted to cdsname. The name of the CDS Invenio installation. @param ln: (string), defaulted to cdslang. The language in which to display the pages. @param doctype: (string) - the doctype ID of the doctype for which the submission is being made. @param act: (string) - The ID of the action being performed (e.g. submission of bibliographic information; modification of bibliographic information, etc). @param startPg: (integer) - Starting page for the submission? Defaults to 1. @param indir: (string) - the directory used to store all submissions of the given "type" of this submission. For example, if the submission is of the type "modify bibliographic information", this variable would contain "modify". @param access: (string) - the "access" number for the submission (e.g. 1174062451_7010). This number is also used as the name for the current working submission directory. @param mainmenu: (string) - contains the URL (minus the CDS Invenio home stem) for the submission's home-page. (E.g. If this submission is "PICT", the "mainmenu" file would contain "/submit?doctype=PICT". @param fromdir: (integer) @param file: (string) @param nextPg: (string) @param nbPg: (string) @param curpage: (integer) - the current submission page number. Defaults to 1. """ ln = wash_language(ln) # load the right message language _ = gettext_set_language(ln) sys.stdout = req # get user ID: try: uid = getUid(req) uid_email = get_email(uid) except Error, e: return errorMsg(e, req, c, ln) # variable initialisation t = "" field = [] fieldhtml = [] level = [] fullDesc = [] text = [] check = [] select = [] radio = [] upload = [] txt = [] noPage = [] # Preliminary tasks # check that the user is logged in if uid_email == "" or uid_email == "guest": return warningMsg(websubmit_templates.tmpl_warning_message( ln = ln, msg = _("Sorry, you must log in to perform this action.") ), req, ln) # warningMsg("""<center><font color="red"></font></center>""",req, ln) # check we have minimum fields if "" in (doctype, act, access): ## We don't have all the necessary information to go ahead ## with this submission: return errorMsg(_("Invalid parameter"), req, c, ln) ## Before continuing to display the submission form interface, ## verify that this submission has not already been completed: if submission_is_finished(doctype, act, access, uid_email): ## This submission has already been completed. ## This situation can arise when, having completed a submission, ## the user uses the browser's back-button to go back to the form ## stage of the submission and then tries to submit once more. ## This is unsafe and should not be allowed. Instead of re-displaying ## the submission forms, display an error message to the user: wrnmsg = """<b>This submission has been completed. Please go to the""" \ """ <a href="/submit?doctype=%(doctype)s&ln=%(ln)s">""" \ """main menu</a> to start a new submission.</b>""" \ % { 'doctype' : doctype, 'ln' : ln } return warningMsg(wrnmsg, req) ## retrieve the action and doctype data: ## Concatenate action ID and doctype ID to make the submission ID: subname = "%s%s" % (act, doctype) if indir == "": ## Get the submission storage directory from the DB: submission_dir = get_storage_directory_of_action(act) if submission_dir not in ("", None): indir = submission_dir else: ## Unable to determine the submission-directory: return errorMsg(_("Unable to find the submission directory."), req, c, ln) ## get the document type's long-name: doctype_lname = get_longname_of_doctype(doctype) if doctype_lname is not None: ## Got the doctype long-name: replace spaces with HTML chars: docname = doctype_lname.replace(" ", " ") else: ## Unknown document type: return errorMsg(_("Unknown document type"), req, c, ln) ## get the action's long-name: action_lname = get_longname_of_action(act) if action_lname is not None: ## Got the action long-name: replace spaces with HTML chars: actname = action_lname.replace(" ", " ") else: ## Unknown action: return errorMsg(_("Unknown action"), req, c, ln) ## Get the number of pages for this submission: num_submission_pages = get_num_pages_of_submission(subname) if num_submission_pages is not None: nbpages = num_submission_pages else: ## Unable to determine the number of pages for this submission: return errorMsg(_("Unable to determine the number of submission pages."), req, c, ln) ## If unknown, get the current page of submission: if startPg != "" and curpage in ("", 0): curpage = startPg ## retrieve the name of the file in which the reference of ## the submitted document will be stored rn_filename = get_parameter_value_for_doctype(doctype, "edsrn") if rn_filename is not None: edsrn = rn_filename else: ## Unknown value for edsrn - set it to an empty string: edsrn = "" ## This defines the path to the directory containing the action data curdir = "%s/%s/%s/%s" % (storage, indir, doctype, access) ## if this submission comes from another one (fromdir is then set) ## We retrieve the previous submission directory and put it in the proper one if fromdir != "": olddir = "%s/%s/%s/%s" % (storage, fromdir, doctype, access) if os.path.exists(olddir): os.rename(olddir, curdir) ## If the submission directory still does not exist, we create it if not os.path.exists(curdir): try: os.makedirs(curdir) except: return errorMsg(_("Unable to create a directory for this submission."), req, c, ln) # retrieve the original main menu url and save it in the "mainmenu" file if mainmenu != "": fp = open("%s/mainmenu" % curdir, "w") fp.write(mainmenu) fp.close() # and if the file containing the URL to the main menu exists # we retrieve it and store it in the $mainmenu variable if os.path.exists("%s/mainmenu" % curdir): fp = open("%s/mainmenu" % curdir, "r"); mainmenu = fp.read() fp.close() else: mainmenu = "%s/submit" % (urlpath,) # various authentication related tasks... if uid_email != "guest" and uid_email != "": #First save the username (email address) in the SuE file. This way bibconvert will be able to use it if needed fp = open("%s/SuE" % curdir, "w") fp.write(uid_email) fp.close() # is user authorized to perform this action? (auth_code, auth_message) = acc_authorize_action(req, "submit", verbose=0, doctype=doctype, act=act) if acc_is_role("submit", doctype=doctype, act=act) and auth_code != 0: return warningMsg("""<center><font color="red">%s</font></center>""" % auth_message, req) ## update the "journal of submission": ## Does the submission already exist in the log? submission_exists = \ submission_exists_in_log(doctype, act, access, uid_email) if submission_exists == 1: ## update the modification-date of this submission in the log: update_submission_modified_date_in_log(doctype, act, access, uid_email) else: ## Submission doesn't exist in log - create it: log_new_pending_submission(doctype, act, access, uid_email) # Save the form fields entered in the previous submission page # If the form was sent with the GET method form = req.form value = "" # we parse all the form variables for key in form.keys(): formfields = form[key] if re.search("\[\]", key): filename = key.replace("[]", "") else: filename = key # the field is an array if isinstance(formfields, types.ListType): fp = open("%s/%s" % (curdir, filename), "w") for formfield in formfields: #stripslashes(value) value = specialchars(formfield) fp.write(value+"\n") fp.close() # the field is a normal string elif isinstance(formfields, types.StringTypes) and formfields != "": value = formfields fp = open("%s/%s" % (curdir, filename), "w") fp.write(specialchars(value)) fp.close() # the field is a file elif hasattr(formfields,"filename") and formfields.filename is not None: if not os.path.exists("%s/files/%s" % (curdir, key)): try: os.makedirs("%s/files/%s" % (curdir, key)) except: return errorMsg(_("Cannot create submission directory."), req, c, ln) filename = formfields.filename if filename != "": # This may be dangerous if the file size is bigger than the available memory data = formfields.file.read() fp = open("%s/files/%s/%s" % (curdir, key, filename), "w") fp.write(data) fp.close() fp = open("%s/lastuploadedfile" % curdir, "w") fp.write(filename) fp.close() fp = open("%s/%s" % (curdir, key), "w") fp.write(filename) fp.close() ## if the found field is the reference of the document, ## save this value in the "journal of submissions": if uid_email != "" and uid_email != "guest": if key == edsrn: update_submission_reference_in_log(doctype, access, uid_email, value) ## create the interface: subname = "%s%s" % (act, doctype) ## Get all of the form fields that appear on this page, ordered by fieldnum: form_fields = get_form_fields_on_submission_page(subname, curpage) full_fields = [] values = [] for field_instance in form_fields: full_field = {} ## Retrieve the field's description: element_descr = get_element_description(field_instance[3]) if element_descr is None: ## The form field doesn't seem to exist - return with error message: return \ errorMsg(_("Unknown form field found on submission page."), \ req, c, ln) if element_descr[8] is None: val = "" else: val = element_descr[8] ## we also retrieve and add the javascript code of the checking function, if needed ## Set it to empty string to begin with: full_field['javascript'] = '' if field_instance[7] != '': check_descr = get_element_check_description(field_instance[7]) if check_descr is not None: ## Retrieved the check description: full_field['javascript'] = check_descr full_field['type'] = element_descr[3] full_field['name'] = field_instance[3] full_field['rows'] = element_descr[5] full_field['cols'] = element_descr[6] full_field['val'] = val full_field['size'] = element_descr[4] full_field['maxlength'] = element_descr[7] full_field['htmlcode'] = element_descr[9] full_field['typename'] = field_instance[1] ## TODO: Investigate this, Not used? ## It also seems to refer to pagenum. # The 'R' fields must be executed in the engine's environment, # as the runtime functions access some global and local # variables. if full_field ['type'] == 'R': co = compile (full_field ['htmlcode'].replace("\r\n","\n"), "<string>", "exec") exec(co) else: text = websubmit_templates.tmpl_submit_field (ln = ln, field = full_field) # we now determine the exact type of the created field if full_field['type'] not in [ 'D','R']: field.append(full_field['name']) level.append(field_instance[5]) fullDesc.append(field_instance[4]) txt.append(field_instance[6]) check.append(field_instance[7]) # If the field is not user-defined, we try to determine its type # (select, radio, file upload...) # check whether it is a select field or not if re.search("SELECT", text, re.IGNORECASE) is not None: select.append(1) else: select.append(0) # checks whether it is a radio field or not if re.search(r"TYPE=[\"']?radio", text, re.IGNORECASE) is not None: radio.append(1) else: radio.append(0) # checks whether it is a file upload or not if re.search(r"TYPE=[\"']?file", text, re.IGNORECASE) is not None: upload.append(1) else: upload.append(0) # if the field description contains the "<COMBO>" string, replace # it by the category selected on the document page submission page combofile = "combo%s" % doctype if os.path.exists("%s/%s" % (curdir, combofile)): f = open("%s/%s" % (curdir, combofile), "r") combo = f.read() f.close() else: combo="" text = text.replace("<COMBO>", combo) # if there is a <YYYY> tag in it, replace it by the current year year = time.strftime("%Y"); text = text.replace("<YYYY>", year) # if there is a <TODAY> tag in it, replace it by the current year today = time.strftime("%d/%m/%Y"); text = text.replace("<TODAY>", today) fieldhtml.append(text) else: select.append(0) radio.append(0) upload.append(0) # field.append(value) - initial version, not working with JS, taking a submitted value field.append(field_instance[3]) level.append(field_instance[5]) txt.append(field_instance[6]) fullDesc.append(field_instance[4]) check.append(field_instance[7]) fieldhtml.append(text) full_field['fullDesc'] = field_instance[4] full_field['text'] = text # If a file exists with the name of the field we extract the saved value text = '' if os.path.exists("%s/%s" % (curdir, full_field['name'])): file = open("%s/%s" % (curdir, full_field['name']), "r"); text = file.read() text = re.compile("[\n\r]*$").sub("", text) text = re.compile("\n").sub("\\n", text) text = re.compile("\r").sub("", text) file.close() values.append(text) full_fields.append(full_field) returnto = {} if int(curpage) == int(nbpages): subname = "%s%s" % (act, doctype) other_form_fields = \ get_form_fields_not_on_submission_page(subname, curpage) nbFields = 0 message = "" fullcheck_select = [] fullcheck_radio = [] fullcheck_upload = [] fullcheck_field = [] fullcheck_level = [] fullcheck_txt = [] fullcheck_noPage = [] fullcheck_check = [] for field_instance in other_form_fields: if field_instance[5] == "M": ## If this field is mandatory, get its description: element_descr = get_element_description(field_instance[3]) if element_descr is None: ## The form field doesn't seem to exist - return with error message: return \ errorMsg(_("Unknown form field found on one of the submission pages."), \ req, c, ln) if element_descr[3] in ['D', 'R']: if element_descr[3] == "D": text = element_descr[9] else: text = eval(element_descr[9]) formfields = text.split(">") for formfield in formfields: match = re.match("name=([^ <>]+)", formfield, re.IGNORECASE) if match is not None: names = match.groups for value in names: if value != "": value = re.compile("[\"']+").sub("", value) fullcheck_field.append(value) fullcheck_level.append(field_instance[5]) fullcheck_txt.append(field_instance[6]) fullcheck_noPage.append(field_instance[1]) fullcheck_check.append(field_instance[7]) nbFields = nbFields + 1 else: fullcheck_noPage.append(field_instance[1]) fullcheck_field.append(field_instance[3]) fullcheck_level.append(field_instance[5]) fullcheck_txt.append(field_instance[6]) fullcheck_check.append(field_instance[7]) nbFields = nbFields+1 # tests each mandatory field fld = 0 res = 1 for i in range (0, nbFields): res = 1 if not os.path.exists("%s/%s" % (curdir, fullcheck_field[i])): res=0 else: file = open("%s/%s" % (curdir, fullcheck_field[i]), "r") text = file.read() if text == '': res=0 else: if text == "Select:": res=0 if res == 0: fld = i break if not res: returnto = { 'field' : fullcheck_txt[fld], 'page' : fullcheck_noPage[fld], } t += websubmit_templates.tmpl_page_interface( ln = ln, docname = docname, actname = actname, curpage = curpage, nbpages = nbpages, file = file, nextPg = nextPg, access = access, nbPg = nbPg, doctype = doctype, act = act, indir = indir, fields = full_fields, javascript = websubmit_templates.tmpl_page_interface_js( ln = ln, upload = upload, field = field, fieldhtml = fieldhtml, txt = txt, check = check, level = level, curdir = curdir, values = values, select = select, radio = radio, curpage = curpage, nbpages = nbpages, images = images, returnto = returnto, ), images = images, mainmenu = mainmenu, ) # start display: req.content_type = "text/html" req.send_http_header() p_navtrail = """<a href="/submit">%(submit)s</a> > <a href="/submit?doctype=%(doctype)s\">%(docname)s</a> """ % { 'submit' : _("Submit"), 'doctype' : doctype, 'docname' : docname, } return page(title= actname, body = t, navtrail = p_navtrail, description = "submit documents", keywords = "submit", uid = uid, language = ln, req = req, navmenuid='submit') | 3e4796b3f0059dd6a6d19d554434683ac5ac782f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/3e4796b3f0059dd6a6d19d554434683ac5ac782f/websubmit_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1560,
12,
3658,
16,
276,
33,
71,
2377,
529,
16,
7211,
33,
4315,
2069,
539,
16,
24909,
1546,
3113,
1328,
1546,
3113,
787,
27265,
33,
21,
16,
316,
1214,
1546,
3113,
2006,
1546,
3113,
277... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1560,
12,
3658,
16,
276,
33,
71,
2377,
529,
16,
7211,
33,
4315,
2069,
539,
16,
24909,
1546,
3113,
1328,
1546,
3113,
787,
27265,
33,
21,
16,
316,
1214,
1546,
3113,
2006,
1546,
3113,
277... |
class AssertRaisesContext: | class AssertRaisesContext(object): | def __repr__(self): return "<%s run=%i errors=%i failures=%i>" % \ (_strclass(self.__class__), self.testsRun, len(self.errors), len(self.failures)) | 53a23f492fdb323f97d2bed8feb3634ca3947266 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/53a23f492fdb323f97d2bed8feb3634ca3947266/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
3532,
9,
87,
1086,
5095,
77,
1334,
5095,
77,
11720,
5095,
77,
2984,
738,
521,
261,
67,
701,
1106,
12,
2890,
16186,
1106,
972,
3631,
365,
18,
1634... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
3532,
9,
87,
1086,
5095,
77,
1334,
5095,
77,
11720,
5095,
77,
2984,
738,
521,
261,
67,
701,
1106,
12,
2890,
16186,
1106,
972,
3631,
365,
18,
1634... |
"""Apply a function on each sequence in a multiple FASTA file (OBSOLETE). file - filename of a FASTA format file function - the function you wish to invoke on each record *args - any extra arguments you want passed to the function This function will iterate over each record in a FASTA file as SeqRecord objects, calling your function with the record (and supplied args) as arguments. This function returns a list. For those records where your function returns a value, this is taken as a sequence and used to construct a FASTA format string. If your function never has a return value, this means apply_on_multi_fasta will return an empty list. """ try: f = globals()[function] except: raise NotImplementedError("%s not implemented" % function) handle = open(file, 'r') records = SeqIO.parse(handle, "fasta") results = [] for record in records: arguments = [record.sequence] for arg in args: arguments.append(arg) result = f(*arguments) if result: results.append('>%s\n%s' % (record.name, result)) handle.close() return results | """Apply a function on each sequence in a multiple FASTA file (OBSOLETE). file - filename of a FASTA format file function - the function you wish to invoke on each record *args - any extra arguments you want passed to the function This function will iterate over each record in a FASTA file as SeqRecord objects, calling your function with the record (and supplied args) as arguments. This function returns a list. For those records where your function returns a value, this is taken as a sequence and used to construct a FASTA format string. If your function never has a return value, this means apply_on_multi_fasta will return an empty list. """ try: f = globals()[function] except: raise NotImplementedError("%s not implemented" % function) handle = open(file, 'r') records = SeqIO.parse(handle, "fasta") results = [] for record in records: arguments = [record.sequence] for arg in args: arguments.append(arg) result = f(*arguments) if result: results.append('>%s\n%s' % (record.name, result)) handle.close() return results | def apply_on_multi_fasta(file, function, *args): """Apply a function on each sequence in a multiple FASTA file (OBSOLETE). file - filename of a FASTA format file function - the function you wish to invoke on each record *args - any extra arguments you want passed to the function This function will iterate over each record in a FASTA file as SeqRecord objects, calling your function with the record (and supplied args) as arguments. This function returns a list. For those records where your function returns a value, this is taken as a sequence and used to construct a FASTA format string. If your function never has a return value, this means apply_on_multi_fasta will return an empty list. """ try: f = globals()[function] except: raise NotImplementedError("%s not implemented" % function) handle = open(file, 'r') records = SeqIO.parse(handle, "fasta") results = [] for record in records: arguments = [record.sequence] for arg in args: arguments.append(arg) result = f(*arguments) if result: results.append('>%s\n%s' % (record.name, result)) handle.close() return results | 5bda9415e27684507bab22a4200e9bb5e1c6792a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/5bda9415e27684507bab22a4200e9bb5e1c6792a/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
265,
67,
7027,
67,
13294,
12,
768,
16,
445,
16,
380,
1968,
4672,
3536,
7001,
279,
445,
603,
1517,
3102,
316,
279,
3229,
24239,
37,
585,
261,
5704,
3584,
4311,
2934,
225,
585,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
265,
67,
7027,
67,
13294,
12,
768,
16,
445,
16,
380,
1968,
4672,
3536,
7001,
279,
445,
603,
1517,
3102,
316,
279,
3229,
24239,
37,
585,
261,
5704,
3584,
4311,
2934,
225,
585,... |
>>> entry.msgid 'Thursday' | >>> print entry.msgid Thursday | def find(self, st, by='msgid'): """ Find entry which msgid (or property identified by the *by* attribute) matches the string *st*. | dda4d3f6263a4b81a841864a82766d4573d9eb92 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/dda4d3f6263a4b81a841864a82766d4573d9eb92/polib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
12,
2890,
16,
384,
16,
635,
2218,
3576,
350,
11,
4672,
3536,
4163,
1241,
1492,
24389,
261,
280,
1272,
9283,
635,
326,
380,
1637,
14,
1566,
13,
1885,
326,
533,
380,
334,
11146,
2,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
12,
2890,
16,
384,
16,
635,
2218,
3576,
350,
11,
4672,
3536,
4163,
1241,
1492,
24389,
261,
280,
1272,
9283,
635,
326,
380,
1637,
14,
1566,
13,
1885,
326,
533,
380,
334,
11146,
2,... |
if self.owner.id.val == self._conn.getEventContext().userId: return True else: return False | try: if self.owner.id.val == self._conn.getEventContext().userId: return True except: logger.error(traceback.format_exc()) return False | def isOwned(self): if self.owner.id.val == self._conn.getEventContext().userId: return True else: return False | e91d61d97fcc0a81f80eb20711b85d4a52361c20 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/e91d61d97fcc0a81f80eb20711b85d4a52361c20/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
5460,
329,
12,
2890,
4672,
775,
30,
309,
365,
18,
8443,
18,
350,
18,
1125,
422,
365,
6315,
4646,
18,
588,
1133,
1042,
7675,
18991,
30,
327,
1053,
1335,
30,
1194,
18,
1636,
12,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
5460,
329,
12,
2890,
4672,
775,
30,
309,
365,
18,
8443,
18,
350,
18,
1125,
422,
365,
6315,
4646,
18,
588,
1133,
1042,
7675,
18991,
30,
327,
1053,
1335,
30,
1194,
18,
1636,
12,
2... |
buf = win32gui.PyMakeBuffer(struct.calcsize(format), lparam) | buf = win32gui.PyGetMemory(lparam, struct.calcsize(format)) | def UnpackLVDISPINFO(lparam): format = "iii40s" buf = win32gui.PyMakeBuffer(struct.calcsize(format), lparam) hwndFrom, id, code, buf_item = struct.unpack(format, buf) item = UnpackLVITEM(buf_item) return hwndFrom, id, code, item | a909c8b58e524b3c1df5415e90cf7c118248295d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/677/a909c8b58e524b3c1df5415e90cf7c118248295d/win32gui_struct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25411,
48,
58,
2565,
3118,
5923,
12,
80,
891,
4672,
740,
273,
315,
2835,
77,
7132,
87,
6,
1681,
273,
5657,
1578,
20292,
18,
9413,
967,
6031,
12,
80,
891,
16,
1958,
18,
12448,
1467,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25411,
48,
58,
2565,
3118,
5923,
12,
80,
891,
4672,
740,
273,
315,
2835,
77,
7132,
87,
6,
1681,
273,
5657,
1578,
20292,
18,
9413,
967,
6031,
12,
80,
891,
16,
1958,
18,
12448,
1467,
1... |
result ={} for propo in self.browse(cr,uid,ids): | result = {} for propo in self.browse(cr, uid, ids): | def _quantity_wanted_get(self, cr, uid, ids, name, args, context={}): result ={} for propo in self.browse(cr,uid,ids): if not propo.segment_ids: result[propo.id]='No segments defined' continue qty = 0 numeric=True for segment in propo.segment_ids: if segment.all_add_avail: result[propo.id]='AAA for a Segment' numeric=False continue if not segment.quantity_wanted: result[propo.id]='Wanted Quantity missing in a Segment' numeric=False continue qty += segment.quantity_wanted if numeric: result[propo.id]=str(qty) return result | 7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16172,
67,
25861,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
12938,
4672,
563,
273,
2618,
364,
450,
1631,
316,
365,
18,
25731,
12,
3353,
16,
455... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16172,
67,
25861,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
12938,
4672,
563,
273,
2618,
364,
450,
1631,
316,
365,
18,
25731,
12,
3353,
16,
455... |
self.logger.info("Found %d total services" % (len(allsrv))) | def FindExtra(self): '''Find Extra SMF Services''' allsrv = [name for name, version in \ [srvc.split() for srvc in self.cmd.run("/usr/bin/svcs -a -H -o FMRI,STATE")[1]] if version != 'disabled'] | f7f7dbcd3183911d6b9a9641e2a07565c5a5630f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/f7f7dbcd3183911d6b9a9641e2a07565c5a5630f/SMF.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4163,
7800,
12,
2890,
4672,
9163,
3125,
13592,
12014,
42,
12826,
26418,
777,
20818,
273,
306,
529,
364,
508,
16,
1177,
316,
521,
306,
11254,
4227,
18,
4939,
1435,
364,
9133,
4227,
316,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4163,
7800,
12,
2890,
4672,
9163,
3125,
13592,
12014,
42,
12826,
26418,
777,
20818,
273,
306,
529,
364,
508,
16,
1177,
316,
521,
306,
11254,
4227,
18,
4939,
1435,
364,
9133,
4227,
316,
3... | |
if self.ent.y < self.desired_y and self.ent.last_flap > 1: | if self.ent.y < self.desired_y and self.ent.last_flap > 10: | def get_actions(self): if self.ent.y < self.desired_y and self.ent.last_flap > 1: return set([Action.FLAP]) return set() | d93b4add9b0de9ed9d46483fe5504d8cf76e47fe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2482/d93b4add9b0de9ed9d46483fe5504d8cf76e47fe/behaviour.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4905,
12,
2890,
4672,
309,
365,
18,
319,
18,
93,
411,
365,
18,
30458,
67,
93,
471,
365,
18,
319,
18,
2722,
67,
2242,
438,
405,
1728,
30,
327,
444,
3816,
1803,
18,
19054,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4905,
12,
2890,
4672,
309,
365,
18,
319,
18,
93,
411,
365,
18,
30458,
67,
93,
471,
365,
18,
319,
18,
2722,
67,
2242,
438,
405,
1728,
30,
327,
444,
3816,
1803,
18,
19054,
2... |
(Defaults to 1) clamp - If 1, change exponents if too high (Default 0) | _clamp - If 1, change exponents if too high (Default 0) | def __deepcopy__(self, memo): if type(self) == Decimal: return self # My components are also immutable return self.__class__(str(self)) | 27fd2ad2c7b189325007dffe8b6c4c4b37bcbe7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/27fd2ad2c7b189325007dffe8b6c4c4b37bcbe7b/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
16589,
3530,
972,
12,
2890,
16,
11063,
4672,
309,
618,
12,
2890,
13,
422,
11322,
30,
327,
365,
377,
468,
8005,
4085,
854,
2546,
11732,
327,
365,
16186,
1106,
972,
12,
701,
12,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
16589,
3530,
972,
12,
2890,
16,
11063,
4672,
309,
618,
12,
2890,
13,
422,
11322,
30,
327,
365,
377,
468,
8005,
4085,
854,
2546,
11732,
327,
365,
16186,
1106,
972,
12,
701,
12,
28... |
c.execute("""DELETE FROM artists""") self.db_conn.commit() | def __populate_artists_dict(self): """Populates self.artist.dict with all artists and artists id's""" values = {'action' : 'artists', 'auth' : self.auth, } data = urllib.urlencode(values) try: response = urllib2.urlopen(self.xml_rpc, data) dom = xml.dom.minidom.parseString(response.read()) except: # The data pulled from Ampache was invalid print "Error Pulling Data! -- Check Ampache" return False try: # try to get the list of artists root = dom.getElementsByTagName('root')[0] nodes = root.getElementsByTagName('artist') except: # something failed, try to reauth and do it again if self.authenticate(): return self.__populate_artists_dict() else: # couldn't authenticate return False try: # add the artists to the database c = self.db_conn.cursor() c.execute("""DELETE FROM artists""") self.db_conn.commit() for child in nodes: artist_name = child.getElementsByTagName('name')[0].childNodes[0].data artist_id = int(child.getAttribute('id')) custom_artist_name = re.sub('^the |^a ', '', artist_name.lower()) c.execute("""INSERT INTO artists (artist_id, name, custom_name) VALUES (?, ?, ?)""", [artist_id, artist_name, custom_artist_name]) self.db_conn.commit() c.close() except: # something failed return False return True | c35baeeea87ef15dd2d097e85482d2dfa79ead9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11350/c35baeeea87ef15dd2d097e85482d2dfa79ead9f/AmpacheSession.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
19936,
67,
485,
1486,
67,
1576,
12,
2890,
4672,
3536,
29193,
365,
18,
25737,
18,
1576,
598,
777,
3688,
1486,
471,
3688,
1486,
612,
1807,
8395,
924,
273,
13666,
1128,
11,
294,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
19936,
67,
485,
1486,
67,
1576,
12,
2890,
4672,
3536,
29193,
365,
18,
25737,
18,
1576,
598,
777,
3688,
1486,
471,
3688,
1486,
612,
1807,
8395,
924,
273,
13666,
1128,
11,
294,
296,
... | |
states = <dtml-var "mtype.getTaggedValue('active_workflow_states',['private','public'])"> | states = <dtml-var "[s.strip() for s in mtype.getTaggedValue('active_workflow_states','private,public').split(',')]"> | def setupMemberTypes(context): | 7b33c7f6ee6b2ef5a75bdcd6be13bac8dee5fb2d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11941/7b33c7f6ee6b2ef5a75bdcd6be13bac8dee5fb2d/setuphandlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
4419,
2016,
12,
2472,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
4419,
2016,
12,
2472,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
conv.location = locationGroup.group(1).strip() if locationGroup else "" | conv.location = unescape(locationGroup.group(1).strip() if locationGroup else "") | def _parse_voicemail(self, voicemailHtml): splitVoicemail = self._seperateVoicemailsRegex.split(voicemailHtml) for messageId, messageHtml in itergroup(splitVoicemail[1:], 2): conv = Conversation() conv.type = Conversation.TYPE_VOICEMAIL conv.id = messageId.strip() | f657f6d492a299f3f7157196ee034996c0886de1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13096/f657f6d492a299f3f7157196ee034996c0886de1/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
25993,
4408,
12,
2890,
16,
15063,
4408,
4353,
4672,
1416,
14572,
4408,
273,
365,
6315,
307,
457,
340,
14572,
4408,
87,
6628,
18,
4939,
12,
25993,
4408,
4353,
13,
364,
1909... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2670,
67,
25993,
4408,
12,
2890,
16,
15063,
4408,
4353,
4672,
1416,
14572,
4408,
273,
365,
6315,
307,
457,
340,
14572,
4408,
87,
6628,
18,
4939,
12,
25993,
4408,
4353,
13,
364,
1909... |
$(obj)/%.o: %.S FORCE_DO_CMD | $(obj)/%.o: $(srcdir)/%.S FORCE_DO_CMD | ifdef V quiet= | f9714e7e6a79a21e64d4d4ea1dd8802d988134a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/f9714e7e6a79a21e64d4d4ea1dd8802d988134a9/make.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
536,
776,
10902,
33,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
536,
776,
10902,
33,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
raise XendError("Invalid trigger: %s", trigger_name) | raise XendError("Invalid trigger: %s" % trigger_name) | def domain_send_trigger(self, domid, trigger_name, vcpu = 0): """Send trigger to a domain. | 1c2ed530a14e625fcc7829c5136c9ceb7cc4ddba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/1c2ed530a14e625fcc7829c5136c9ceb7cc4ddba/XendDomain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2461,
67,
4661,
67,
10668,
12,
2890,
16,
4092,
350,
16,
3080,
67,
529,
16,
331,
11447,
273,
374,
4672,
3536,
3826,
3080,
358,
279,
2461,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2461,
67,
4661,
67,
10668,
12,
2890,
16,
4092,
350,
16,
3080,
67,
529,
16,
331,
11447,
273,
374,
4672,
3536,
3826,
3080,
358,
279,
2461,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
for item in tree.find("channel").findall("item"): | for i, item in enumerate(tree.find("channel").findall("item")): | def read_rss(filename, title, link, description): """Read an RSS feed, or generate a new one.""" rss = ElementTree.Element("rss", version="2.0") channel = ElementTree.SubElement(rss, "channel") e = ElementTree.SubElement(channel, "title") e.text = title e = ElementTree.SubElement(channel, "link") e.text = link e = ElementTree.SubElement(channel, "description") e.text = description now = time.gmtime() e = ElementTree.SubElement(channel, "pubDate") e.text = time.strftime(RSS_TIME_FORMAT, now) e = ElementTree.SubElement(channel, "lastBuildDate") e.text = time.strftime(RSS_TIME_FORMAT, now) e = ElementTree.SubElement(channel, "generator") e.text = "Merge-o-Matic" if os.path.isfile(filename): cutoff = datetime.datetime.utcnow() - datetime.timedelta(days=7) tree = ElementTree.parse(filename) for item in tree.find("channel").findall("item"): dt = datetime.datetime(*time.strptime(item.findtext("pubDate"), RSS_TIME_FORMAT)[:6]) if dt > cutoff: channel.append(item) return rss | 25611a3aa48a730f0d474ca7140e900048fc7433 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1955/25611a3aa48a730f0d474ca7140e900048fc7433/momlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
25151,
12,
3459,
16,
2077,
16,
1692,
16,
2477,
4672,
3536,
1994,
392,
31481,
4746,
16,
578,
2103,
279,
394,
1245,
12123,
18817,
273,
22566,
18,
1046,
2932,
25151,
3113,
1177,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
25151,
12,
3459,
16,
2077,
16,
1692,
16,
2477,
4672,
3536,
1994,
392,
31481,
4746,
16,
578,
2103,
279,
394,
1245,
12123,
18817,
273,
22566,
18,
1046,
2932,
25151,
3113,
1177,
15... |
return tableCreateSQLs | return tableCreateSQLs or [] | def createSQL(self, soClass): tableCreateSQLs = getattr(soClass.sqlmeta, 'createSQL', None) if tableCreateSQLs: assert isinstance(tableCreateSQLs,(str,list,dict,tuple)), ( '%s.sqlmeta.createSQL must be a str, list, dict or tuple.' % (soClass.__name__)) if isinstance(tableCreateSQLs, dict): tableCreateSQLs = tableCreateSQLs.get(soClass._connection.dbName, []) if isinstance(tableCreateSQLs, str): tableCreateSQLs = [tableCreateSQLs] if isinstance(tableCreateSQLs, tuple): tableCreateSQLs = list(tableCreateSQLs) assert isinstance(tableCreateSQLs,list), ( 'Unable to create a list from %s.sqlmeta.createSQL' % (soClass.__name__)) return tableCreateSQLs | 006ae8cfa32650b2794cc5fca6921de24e7ec11f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/006ae8cfa32650b2794cc5fca6921de24e7ec11f/dbconnection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
3997,
12,
2890,
16,
1427,
797,
4672,
1014,
1684,
3997,
87,
273,
3869,
12,
2048,
797,
18,
4669,
3901,
16,
296,
2640,
3997,
2187,
599,
13,
309,
1014,
1684,
3997,
87,
30,
1815,
1549,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3997,
12,
2890,
16,
1427,
797,
4672,
1014,
1684,
3997,
87,
273,
3869,
12,
2048,
797,
18,
4669,
3901,
16,
296,
2640,
3997,
2187,
599,
13,
309,
1014,
1684,
3997,
87,
30,
1815,
1549,... |
algorithm -- (default: 'bober') | algorithm -- (default: 'default') | def number_of_partitions(n,k=None, algorithm='bober'): r""" Returns the size of partitions_list(n,k). INPUT: n -- an integer k -- (default: None); if specified, instead returns the cardinality of the set of all (unordered) partitions of the positive integer n into sums with k summands. algorithm -- (default: 'bober') 'bober' -- use Jonathon Bober's implementation (*very* fast, but new and not well tested yet). 'gap' -- use GAP (VERY *slow*) 'pari' -- use PARI. Speed seems the same as GAP until $n$ is in the thousands, in which case PARI is faster. *But* PARI has a bug, e.g., on 64-bit Linux PARI-2.3.2 outputs numbpart(147007)%1000 as 536, but it should be 533!. So do not use this option. IMPLEMENTATION: Wraps GAP's NrPartitions or PARI's numbpart function. Use the function \code{partitions(n)} to return a generator over all partitions of $n$. It is possible to associate with every partition of the integer n a conjugacy class of permutations in the symmetric group on n points and vice versa. Therefore p(n) = NrPartitions(n) is the number of conjugacy classes of the symmetric group on n points. EXAMPLES: sage: v = list(partitions(5)); v [(1, 1, 1, 1, 1), (1, 1, 1, 2), (1, 2, 2), (1, 1, 3), (2, 3), (1, 4), (5,)] sage: len(v) 7 sage: number_of_partitions(5, algorithm='gap') 7 sage: number_of_partitions(5, algorithm='pari') 7 sage: number_of_partitions(5, algorithm='bober') 7 The input must be a nonnegative integer or a ValueError is raised. sage: number_of_partitions(-5) Traceback (most recent call last): ... ValueError: n (=-5) must be a nonnegative integer sage: number_of_partitions(10,2) 5 sage: number_of_partitions(10) 42 sage: number_of_partitions(3) 3 sage: number_of_partitions(10) 42 sage: number_of_partitions(3, algorithm='pari') 3 sage: number_of_partitions(10, algorithm='pari') 42 sage: number_of_partitions(40) 37338 sage: number_of_partitions(100) 190569292 A generating function for p(n) is given by the reciprocal of Euler's function: \[ \sum_{n=0}^\infty p(n)x^n = \prod_{k=1}^\infty \left(\frac {1}{1-x^k} \right). \] We use SAGE to verify that the first several coefficients do instead agree: sage: q = PowerSeriesRing(QQ, 'q', default_prec=9).gen() sage: prod([(1-q^k)^(-1) for k in range(1,9)]) ## partial product of 1 + q + 2*q^2 + 3*q^3 + 5*q^4 + 7*q^5 + 11*q^6 + 15*q^7 + 22*q^8 + O(q^9) sage: [number_of_partitions(k) for k in range(2,10)] [2, 3, 5, 7, 11, 15, 22, 30] REFERENCES: http://en.wikipedia.org/wiki/Partition_%28number_theory%29 """ n = ZZ(n) if n < 0: raise ValueError, "n (=%s) must be a nonnegative integer"%n elif n == 0: return ZZ(1) if algorithm == 'gap': if k==None: ans=gap.eval("NrPartitions(%s)"%(ZZ(n))) else: ans=gap.eval("NrPartitions(%s,%s)"%(ZZ(n),ZZ(k))) return ZZ(ans) elif algorithm == 'bober': return partitions_ext.number_of_partitions(n) elif algorithm == 'pari': if not k is None: raise ValueError, "cannot specify second argument k if the algorithm is PARI" return ZZ(pari(ZZ(n)).numbpart()) raise ValueError, "unknown algorithm '%s'"%algorithm | 4cc3f05f5cf99be80998a3f6634f66fabd095d5d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/4cc3f05f5cf99be80998a3f6634f66fabd095d5d/combinat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1300,
67,
792,
67,
21275,
12,
82,
16,
79,
33,
7036,
16,
4886,
2218,
1075,
744,
11,
4672,
436,
8395,
2860,
326,
963,
434,
10060,
67,
1098,
12,
82,
16,
79,
2934,
225,
12943,
30,
290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1300,
67,
792,
67,
21275,
12,
82,
16,
79,
33,
7036,
16,
4886,
2218,
1075,
744,
11,
4672,
436,
8395,
2860,
326,
963,
434,
10060,
67,
1098,
12,
82,
16,
79,
2934,
225,
12943,
30,
290,
... |
def setOptions(yumconf={}, repo=None): | def setOptions(yumconf={}, repo=None): | def setOptions(yumconf={}, repo=None): # Default values: o = { "timeout": "20.0", "keepalive": "1", "retries": "3", "http_caching": "all", "proxy": None, "proxy_username": None, "proxy_password": None, # Set the proxy settings from above into urlgrabber data: "proxies": {}, "http_headers": None } # Override with "main" settings: for (key, value) in yumconf.get("main", {}).iteritems(): o[key] = value # Override with repo-specific settings: for (key, value) in yumconf.get(repo, {}).iteritems(): o[key] = value # Set proxy items: setProxyOptions(o) # Set http headers: cache = o["http_caching"] != "all" headers = [] # If we should not cache and we don't already contain # a Pragma header, then add it... nocache = ("Pragma", "no-cache") if not cache and nocache not in headers: headers.append(nocache) o["http_headers"] = headers return o | e88bd7c78ae123c185f17919515d68d29510e836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/e88bd7c78ae123c185f17919515d68d29510e836/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16526,
12,
93,
379,
3923,
28793,
3538,
33,
7036,
4672,
468,
2989,
924,
30,
320,
273,
288,
315,
4538,
6877,
315,
3462,
18,
20,
3113,
315,
10102,
11462,
6877,
315,
21,
3113,
315,
15215,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16526,
12,
93,
379,
3923,
28793,
3538,
33,
7036,
4672,
468,
2989,
924,
30,
320,
273,
288,
315,
4538,
6877,
315,
3462,
18,
20,
3113,
315,
10102,
11462,
6877,
315,
21,
3113,
315,
15215,
... |
retdesc = string.strip(retdesc) desc = string.strip(desc) if quiet == 0: | retdesc = string.strip(retdesc) desc = string.strip(desc) if quiet == 0: | def mergeFunctionComment(self, name, description, quiet = 0): if name == 'main': quiet = 1 if name[0:2] == '__': quiet = 1 | c7d1398e49a7858195b4b8e0b9832ded1fb9f169 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3857/c7d1398e49a7858195b4b8e0b9832ded1fb9f169/apibuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
2083,
4469,
12,
2890,
16,
508,
16,
2477,
16,
10902,
273,
374,
4672,
309,
508,
422,
296,
5254,
4278,
10902,
273,
404,
309,
508,
63,
20,
30,
22,
65,
422,
4940,
4278,
10902,
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,
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,
2691,
2083,
4469,
12,
2890,
16,
508,
16,
2477,
16,
10902,
273,
374,
4672,
309,
508,
422,
296,
5254,
4278,
10902,
273,
404,
309,
508,
63,
20,
30,
22,
65,
422,
4940,
4278,
10902,
273,
... |
if change: new_denum.append(candidate) | new_denum.append(candidate) | def local_greedy_distributor(node): """ This optimization tries to apply distributivity of multiplication to addition in order to reduce the number of multiplications and/or divisions that must be done. The algorithm weighs division more than multiplication to account for the former's slightly greater computational cost. The following expressions are simplified: 1. ((a/x + b/y) * x * y) --> a*y + b*x 2. ((a/x + b) * x) --> a + b*x The following expressions are not simplified: 3. ((a + b) * x) -/-> a*x + b*x This optimization aims to reduce computational cost. It may also increase numerical stability, e.g. when x and/or y tend to 0 in example 1. """ out = node.outputs[0] num, denum = local_mul_canonizer.get_num_denum(out) if len(num) == 1 and not denum: return False new_num, new_denum = [], [] change = False for candidate in list(num): if candidate not in num: continue num.remove(candidate) _change, candidate, num, denum = attempt_distribution(candidate, num, denum) change |= _change if change: new_num.append(candidate) for candidate in list(denum): if candidate not in denum: continue denum.remove(candidate) _change, candidate, denum, num = attempt_distribution(candidate, denum, num) change |= _change if change: new_denum.append(candidate) if not change: return False new_num += num new_denum += denum return [local_mul_canonizer.merge_num_denum(new_num, new_denum)] | 99c5c2d22878ba7c5eec342de3b527814de4b990 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/99c5c2d22878ba7c5eec342de3b527814de4b990/opt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
67,
11556,
24009,
67,
2251,
19293,
12,
2159,
4672,
3536,
1220,
14850,
9327,
358,
2230,
1015,
665,
322,
2818,
434,
23066,
358,
2719,
316,
1353,
358,
5459,
326,
1300,
434,
23066,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
67,
11556,
24009,
67,
2251,
19293,
12,
2159,
4672,
3536,
1220,
14850,
9327,
358,
2230,
1015,
665,
322,
2818,
434,
23066,
358,
2719,
316,
1353,
358,
5459,
326,
1300,
434,
23066,
87,
... |
return self.check(cr, uid, ids, roles[0]) | return self.check(cr, uid, ids, roles) | def check(self, cr, uid, ids, role_id): if role_id in ids: return True cr.execute('select parent_id from res_roles where id=%d', (role_id,)) roles = cr.fetchone()[0] if roles: return self.check(cr, uid, ids, roles[0]) return False | ad7ab86b807b9b6a48b7c0256a74a199a6236ab5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/ad7ab86b807b9b6a48b7c0256a74a199a6236ab5/res_user.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
2478,
67,
350,
4672,
309,
2478,
67,
350,
316,
3258,
30,
327,
1053,
4422,
18,
8837,
2668,
4025,
982,
67,
350,
628,
400,
67,
7774,
1625... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
2478,
67,
350,
4672,
309,
2478,
67,
350,
316,
3258,
30,
327,
1053,
4422,
18,
8837,
2668,
4025,
982,
67,
350,
628,
400,
67,
7774,
1625... |
i = ss.length | i = len(ss) - 1 | def Variables(tokenizer, compilerContext, letBlock): """Parses a comma-separated list of var declarations (and maybe initializations).""" builder = compilerContext.builder if tokenizer.token.type == VAR: build = builder.VAR__build addDecl = builder.VAR__addDecl finish = builder.VAR__finish s = compilerContext elif tokenizer.token.type == CONST: build = builder.CONST__build addDecl = builder.CONST__addDecl finish = builder.CONST__finish s = compilerContext elif tokenizer.token.type == LET or tokenizer.token.type == LEFT_PAREN: build = builder.LET__build addDecl = builder.LET__addDecl finish = builder.LET__finish if not letBlock: ss = compilerContext.stmtStack i = ss.length # a BLOCK *must* be found. while ss[--i].type !== BLOCK: pass # Lets at the def toplevel are just vars, at least in SpiderMonkey. if i == 0: build = builder.VAR__build addDecl = builder.VAR__addDecl finish = builder.VAR__finish s = compilerContext else: s = ss[i] else: s = letBlock node = build.call(builder, tokenizer) initializers = [] while True: tokenType = tokenizer.get() # FIXME Should have a special DECLARATION node instead of overloading # IDENTIFIER to mean both identifier declarations and destructured # declarations. childNode = builder.DECL__build(tokenizer) if tokenType == LEFT_BRACKET or tokenType == LEFT_CURLY: # Pass in s if we need to add each pattern matched into # its varDecls, else pass in compilerContext. data = null # Need to unget to parse the full destructured expression. tokenizer.unget() builder.DECL__setName(childNode, DestructuringExpression(tokenizer, compilerContext, True, s)) if compilerContext.inForLoopInit and tokenizer.peek() == IN: addDecl.call(builder, node, childNode, s) continue tokenizer.mustMatch(ASSIGN) if (tokenizer.token.assignOp) raise SyntaxError("Invalid variable initialization", tokenizer) # Parse the init as a normal assignment. n3 = builder.ASSIGN__build(tokenizer) builder.ASSIGN__addOperand(n3, childNode.name) builder.ASSIGN__addOperand(n3, AssignExpression(tokenizer, compilerContext)) builder.ASSIGN__finish(n3) # But only add the rhs as the initializer. builder.DECL__setInitializer(childNode, n3[1]) builder.DECL__finish(childNode) addDecl.call(builder, node, childNode, s) continue if tokenType != IDENTIFIER: raise SyntaxError("Missing variable name", tokenizer) builder.DECL__setName(childNode, tokenizer.token.value) builder.DECL__setReadOnly(childNode, node.type == CONST) addDecl.call(builder, node, childNode, s) if tokenizer.match(ASSIGN): if tokenizer.token.assignOp: raise SyntaxError("Invalid variable initialization", tokenizer) # Parse the init as a normal assignment. id = mkIdentifier(childNode.tokenizer, childNode.name, True) n3 = builder.ASSIGN__build(tokenizer) builder.ASSIGN__addOperand(n3, id) builder.ASSIGN__addOperand(n3, AssignExpression(tokenizer, compilerContext)) builder.ASSIGN__finish(n3) initializers.push(n3) # But only add the rhs as the initializer. builder.DECL__setInitializer(childNode, n3[1]) builder.DECL__finish(childNode) s.varDecls.push(childNode) if not tokenizer.match(COMMA): break finish.call(builder, node) return node | e84674e67dd665fd11d61644e7a7afffaad25771 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/e84674e67dd665fd11d61644e7a7afffaad25771/Parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23536,
12,
2316,
1824,
16,
5274,
1042,
16,
2231,
1768,
4672,
3536,
6656,
279,
8716,
17,
24622,
666,
434,
569,
12312,
261,
464,
6944,
2172,
7089,
13,
12123,
225,
2089,
273,
5274,
1042,
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,
23536,
12,
2316,
1824,
16,
5274,
1042,
16,
2231,
1768,
4672,
3536,
6656,
279,
8716,
17,
24622,
666,
434,
569,
12312,
261,
464,
6944,
2172,
7089,
13,
12123,
225,
2089,
273,
5274,
1042,
18... |
class CreateProfileWin(createProfile): | class CreateProfileWin(CreateProfile): | def evaluateCommand(self, cmd): superResult = ShellCommand.evaluateCommand(self, cmd) if SUCCESS != superResult: return WARNINGS if re.search('FAIL -', cmd.logs['stdio'].getText()): return WARNINGS if re.search('FAIL Exited', cmd.logs['stdio'].getText()): return WARNINGS return SUCCESS | cb690ee939a5e9d81c900cb49a19382a3397db0d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/cb690ee939a5e9d81c900cb49a19382a3397db0d/mozbuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5956,
2189,
12,
2890,
16,
1797,
4672,
2240,
1253,
273,
19433,
2189,
18,
21024,
2189,
12,
2890,
16,
1797,
13,
309,
16561,
480,
2240,
1253,
30,
327,
9744,
55,
309,
283,
18,
3072,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5956,
2189,
12,
2890,
16,
1797,
4672,
2240,
1253,
273,
19433,
2189,
18,
21024,
2189,
12,
2890,
16,
1797,
13,
309,
16561,
480,
2240,
1253,
30,
327,
9744,
55,
309,
283,
18,
3072,
2668,
1... |
self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 60) | self.assertTrue(u.fp.raw.fp._sock.gettimeout(), 60) | def test_http_NoneWithdefault(self): prev = socket.getdefaulttimeout() socket.setdefaulttimeout(60) try: u = urllib2.urlopen("http://www.python.org", timeout=None) self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 60) finally: socket.setdefaulttimeout(prev) | cf2f41919c226d1ac04ea74a0138eae3af030554 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/cf2f41919c226d1ac04ea74a0138eae3af030554/test_urllib2net.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2505,
67,
7036,
1190,
1886,
12,
2890,
4672,
2807,
273,
2987,
18,
588,
1886,
4538,
1435,
2987,
18,
542,
1886,
4538,
12,
4848,
13,
775,
30,
582,
273,
11527,
22,
18,
295,
18589,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2505,
67,
7036,
1190,
1886,
12,
2890,
4672,
2807,
273,
2987,
18,
588,
1886,
4538,
1435,
2987,
18,
542,
1886,
4538,
12,
4848,
13,
775,
30,
582,
273,
11527,
22,
18,
295,
18589,... |
return '<sequence with same elements as \'%s\'>' % self._expected_seq | return '<sequence with same elements as \'%s\'>' % self._expected_list | def __repr__(self): return '<sequence with same elements as \'%s\'>' % self._expected_seq | 973bab79851df146d4e49c2cb410eb85ed535bf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10629/973bab79851df146d4e49c2cb410eb85ed535bf0/mox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
2368,
6178,
598,
1967,
2186,
487,
15413,
87,
3730,
1870,
738,
365,
6315,
3825,
67,
5436,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
2368,
6178,
598,
1967,
2186,
487,
15413,
87,
3730,
1870,
738,
365,
6315,
3825,
67,
5436,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
dashboardInfo.addDestination( self.usingDashboard['address'], self.usingDashboard['port'] ) logging.debug("dashboardinfo: %s" % dashboardInfo.__str__()) dashboardInfo.write( dashboardInfoFile ) | except Exception, ex: logging.error("Error writing %s" % dashboardInfoFile) try: | def publishSubmitToDashboard( self ): """ _publishSubmitToDashboard_ | 3593267e60c3b0c7f75211a792db60f99db6166d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/3593267e60c3b0c7f75211a792db60f99db6166d/BossLiteBulkInterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3808,
11620,
774,
14830,
12,
365,
262,
30,
3536,
389,
6543,
11620,
774,
14830,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
3808,
11620,
774,
14830,
12,
365,
262,
30,
3536,
389,
6543,
11620,
774,
14830,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print _("%s: OK" % name) | print _("%s: OK") % name | def print_dep(self, name, value): """Print Status of dependency""" if value: print _("%s: OK" % name) else: print _("%s: missing" % name) | dfadefc5e19fb2e275d600e3ffc7257cb494cc18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/dfadefc5e19fb2e275d600e3ffc7257cb494cc18/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
15037,
12,
2890,
16,
508,
16,
460,
4672,
3536,
5108,
2685,
434,
4904,
8395,
309,
460,
30,
1172,
389,
27188,
87,
30,
7791,
7923,
738,
508,
469,
30,
1172,
389,
27188,
87,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
15037,
12,
2890,
16,
508,
16,
460,
4672,
3536,
5108,
2685,
434,
4904,
8395,
309,
460,
30,
1172,
389,
27188,
87,
30,
7791,
7923,
738,
508,
469,
30,
1172,
389,
27188,
87,
30,
... |
ctx = SSL.Context() s = SSL.Connection(ctx) try: s.connect(self.srv_addr) except SSL.SSLError, e: self.failUnlessEqual(e[0], 'sslv3 alert handshake failure') s.close() self.stop_server(pid) | try: ctx = SSL.Context() s = SSL.Connection(ctx) try: s.connect(self.srv_addr) except SSL.SSLError, e: self.failUnlessEqual(e[0], 'sslv3 alert handshake failure') s.close() finally: self.stop_server(pid) | def test_no_weak_cipher(self): self.args = self.args + ['-cipher', 'EXP'] pid = self.start_server(self.args) ctx = SSL.Context() s = SSL.Connection(ctx) try: s.connect(self.srv_addr) except SSL.SSLError, e: self.failUnlessEqual(e[0], 'sslv3 alert handshake failure') s.close() self.stop_server(pid) | 6d956155dfc0f9670dea38b076c5bfe3b3bf8e6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/6d956155dfc0f9670dea38b076c5bfe3b3bf8e6a/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2135,
67,
26008,
67,
17094,
12,
2890,
4672,
365,
18,
1968,
273,
365,
18,
1968,
397,
10228,
17,
17094,
2187,
296,
16109,
3546,
4231,
273,
365,
18,
1937,
67,
3567,
12,
2890,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2135,
67,
26008,
67,
17094,
12,
2890,
4672,
365,
18,
1968,
273,
365,
18,
1968,
397,
10228,
17,
17094,
2187,
296,
16109,
3546,
4231,
273,
365,
18,
1937,
67,
3567,
12,
2890,
18... |
def SetType(ea, type): | def SetType(ea, newtype): | def SetType(ea, type): """ Set type of function/variable @param ea: the address of the object @param type: the type string in C declaration form. Must contain the closing ';' if specified as an empty string, then the assciated with 'ea' will be deleted @return: 1-ok, 0-failed. """ return idaapi.apply_cdecl(ea, type) | 76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
559,
12,
24852,
16,
394,
723,
4672,
3536,
1000,
618,
434,
445,
19,
6105,
225,
632,
891,
24164,
30,
326,
1758,
434,
326,
733,
632,
891,
618,
30,
326,
618,
533,
316,
385,
8266,
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,
1000,
559,
12,
24852,
16,
394,
723,
4672,
3536,
1000,
618,
434,
445,
19,
6105,
225,
632,
891,
24164,
30,
326,
1758,
434,
326,
733,
632,
891,
618,
30,
326,
618,
533,
316,
385,
8266,
6... |
canvas.saveState() | def beforeDrawPage(self,canvas,doc): canvas.setFont(serif_font,10) canvas.setLineWidth(0) canvas.saveState() #header canvas.line(header_margin_hor, page_height - header_margin_vert, page_width - header_margin_hor, page_height - header_margin_vert ) if pdfstyles.show_page_header: canvas.saveState() canvas.resetTransforms() canvas.translate(header_margin_hor, page_height - header_margin_vert - 0.1*cm) p = Paragraph(font_switcher.fontifyText(self.title), text_style()) p.canv = canvas p.wrap(page_width - header_margin_hor*2.5, page_height) # add an extra 0.5 margin to have enough space for page number p.drawPara() canvas.restoreState() canvas.drawRightString(page_width - header_margin_hor, page_height - header_margin_vert + 0.1 * cm, "%d" % doc.page) | fdd9dc8e10626c7b4bbf78e764f6cdc5afd4b2ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12390/fdd9dc8e10626c7b4bbf78e764f6cdc5afd4b2ee/pagetemplates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1865,
6493,
1964,
12,
2890,
16,
15424,
16,
2434,
4672,
5953,
18,
542,
5711,
12,
550,
430,
67,
5776,
16,
2163,
13,
5953,
18,
542,
1670,
2384,
12,
20,
13,
468,
3374,
5953,
18,
1369,
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,
1865,
6493,
1964,
12,
2890,
16,
15424,
16,
2434,
4672,
5953,
18,
542,
5711,
12,
550,
430,
67,
5776,
16,
2163,
13,
5953,
18,
542,
1670,
2384,
12,
20,
13,
468,
3374,
5953,
18,
1369,
12... | |
if item.get_filename() in known_files: | if os.path.normcase(item.get_filename()) in known_files: | def update(self): self.ufeed.confirmDBThread() movies_dir = config.get(prefs.MOVIES_DIRECTORY) # files known about by real feeds known_files = set() for item in views.toplevelItems: if item.feed_id is not self.ufeed.id: known_files.add(item.get_filename()) if item.isContainerItem: item.find_new_children() | aedbddccb2bdc8b7d3dc76f1f46bcbd63f21cc86 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/aedbddccb2bdc8b7d3dc76f1f46bcbd63f21cc86/feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
365,
18,
696,
73,
329,
18,
10927,
2290,
3830,
1435,
7344,
29028,
67,
1214,
273,
642,
18,
588,
12,
1484,
2556,
18,
5980,
4136,
3991,
67,
17229,
13,
468,
1390,
4846... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
4672,
365,
18,
696,
73,
329,
18,
10927,
2290,
3830,
1435,
7344,
29028,
67,
1214,
273,
642,
18,
588,
12,
1484,
2556,
18,
5980,
4136,
3991,
67,
17229,
13,
468,
1390,
4846... |
if sys.version_info[:2] < (2, 2): def isinstance(obj, clsinfo): import __builtin__ if type(clsinfo) in (tuple, list): for cls in clsinfo: if cls is type: cls = types.ClassType if __builtin__.isinstance(obj, cls): return 1 return 0 else: return __builtin__.isinstance(obj, clsinfo) | def testMultiply(self): self.assertEquals((0 * 10), 0) self.assertEquals((5 * 8), 40) | 53a23f492fdb323f97d2bed8feb3634ca3947266 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/53a23f492fdb323f97d2bed8feb3634ca3947266/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
26040,
12,
2890,
4672,
365,
18,
11231,
8867,
12443,
20,
380,
1728,
3631,
374,
13,
365,
18,
11231,
8867,
12443,
25,
380,
1725,
3631,
8063,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
26040,
12,
2890,
4672,
365,
18,
11231,
8867,
12443,
20,
380,
1728,
3631,
374,
13,
365,
18,
11231,
8867,
12443,
25,
380,
1725,
3631,
8063,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,... | |
m = RE_GPS.match(f_val) | m = RE_GPS.search(f_val) | def get_info(id, verbose=False): """ Get a dictionary of info about a particular entry. At a minimum, the entry will have an 'id' and a 'title' attribute. verbose: print out the page headers & parsed HTML for debugging purposes. """ page = urllib2.urlopen(URL_REGISTER % id) if verbose: print >>sys.stderr, page.info() content = page.read() try: soup = BeautifulSoup(content, convertEntities=BeautifulSoup.HTML_ENTITIES) except: if verbose: # Unicode or serious parse errors, so dump the raw HTML print >>sys.stderr, content raise if verbose: print >>sys.stderr, soup.prettify() page_info = { u'id': int(id), } # the site returns 200-OK responses where it means 404 # FIXME: Checking for a title is the best way to test an entry? tn = soup.find('td', {'class':"ListingHeader"}) if tn: page_info[u'title'] = strip_ws(tn.renderContents()) else: raise Exception("No title! (probably 404, but the website sucks)") tn = soup.find('td', {'class':"ListingSubHeader"}) if tn: page_info[u'subtitle'] = strip_ws(tn.renderContents()) else: print >>sys.stderr, "Subtitle not found" for field in soup.findAll('td', {'class':'listingfieldname'}): f_str = strip_ws(field.string) f_val = strip_ws(field.nextSibling.renderContents()) f_key = FIELD_MAP.get(f_str.lower()) if not f_key: # new field, we should add it to the FIELD_MAP print >>sys.stderr, 'Field not found in map: "%s"' % f_str continue if f_key == u'gps_ref': # parse the GPS references into X & Y values # TODO: are this in NZTM? NZMG? m = RE_GPS.match(f_val) if m: page_info['gps_x'] = int(m.group(1)) page_info['gps_y'] = int(m.group(2)) else: page_info[f_key] = f_val return page_info | c5d9546708294ccfeef22209675b7c7287ba704f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4573/c5d9546708294ccfeef22209675b7c7287ba704f/historic-places-scraper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1376,
12,
350,
16,
3988,
33,
8381,
4672,
3536,
968,
279,
3880,
434,
1123,
2973,
279,
6826,
1241,
18,
2380,
279,
5224,
16,
326,
1241,
903,
1240,
392,
296,
350,
11,
471,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1376,
12,
350,
16,
3988,
33,
8381,
4672,
3536,
968,
279,
3880,
434,
1123,
2973,
279,
6826,
1241,
18,
2380,
279,
5224,
16,
326,
1241,
903,
1240,
392,
296,
350,
11,
471,
279,
... |
methodType = target.appendChild(self._createNode('type')) | methodType = self._createNode('type') | def _translate_memberdef_function_type( self, resultType, target=None, **kwargs ): methodType = target.appendChild(self._createNode('type')) self._translate_type(resultType,target=methodType) return methodType | 86d8ad3a39dfed9cb4f4a2b54fe59e5b8c4d5e39 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9981/86d8ad3a39dfed9cb4f4a2b54fe59e5b8c4d5e39/doxproc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
13929,
67,
5990,
536,
67,
915,
67,
723,
12,
365,
16,
25820,
16,
1018,
33,
7036,
16,
2826,
4333,
262,
30,
707,
559,
273,
365,
6315,
2640,
907,
2668,
723,
6134,
365,
6315,
13929,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
13929,
67,
5990,
536,
67,
915,
67,
723,
12,
365,
16,
25820,
16,
1018,
33,
7036,
16,
2826,
4333,
262,
30,
707,
559,
273,
365,
6315,
2640,
907,
2668,
723,
6134,
365,
6315,
13929,
... |
child_var_doc.is_imported = None | child_var_doc.is_imported = 'unknown' | def inspect_module(self, module, moduledoc): # Record the current module name, to restrict the set # of children that we'll inspect. self._current_module = moduledoc.dotted_name # Record the module's docstring & docformat. if hasattr(module, '__doc__'): moduledoc.docstring = module.__doc__ if hasattr(module, '__docformat__'): moduledoc.docformat = module.__docformat__ | 27e95397474553a903485c80c0a000ff3e611df8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/27e95397474553a903485c80c0a000ff3e611df8/docinspector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5334,
67,
2978,
12,
2890,
16,
1605,
16,
1605,
2434,
4672,
468,
5059,
326,
783,
1605,
508,
16,
358,
13108,
326,
444,
468,
434,
2325,
716,
732,
5614,
5334,
18,
365,
6315,
2972,
67,
2978,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5334,
67,
2978,
12,
2890,
16,
1605,
16,
1605,
2434,
4672,
468,
5059,
326,
783,
1605,
508,
16,
358,
13108,
326,
444,
468,
434,
2325,
716,
732,
5614,
5334,
18,
365,
6315,
2972,
67,
2978,... |
outfile.write(infile.read()) | lines = infile.readlines() | def BuildO3DExternsFile(js_files_dir, extra_externs_file, externs_file): outfile = open(externs_file, 'w') filenames = (glob.glob(os.path.join(js_files_dir, '*.js')) + [extra_externs_file]) for filename in filenames: infile = open(filename, 'r') outfile.write(infile.read()) infile.close() outfile.close() | b0fc79df77f4573ebdac8a98475137c1269cfcbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/b0fc79df77f4573ebdac8a98475137c1269cfcbe/build_docs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
51,
23,
40,
29764,
87,
812,
12,
2924,
67,
2354,
67,
1214,
16,
2870,
67,
338,
798,
87,
67,
768,
16,
18885,
87,
67,
768,
4672,
8756,
273,
1696,
12,
338,
798,
87,
67,
768,
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,
3998,
51,
23,
40,
29764,
87,
812,
12,
2924,
67,
2354,
67,
1214,
16,
2870,
67,
338,
798,
87,
67,
768,
16,
18885,
87,
67,
768,
4672,
8756,
273,
1696,
12,
338,
798,
87,
67,
768,
16,
... |
strings.extend( self[subflag].toDepStrings(prefix=prefix, topflag=topflag)) | strings.extend(self[subflag].toDepStrings(prefix=prefix, topflag=topflag)) | def toDepStrings(self, prefix=None, topflag=None): strings = [] namelist = [] if topflag is None: topflag = self cur = self while cur != topflag: namelist.insert(0, cur._name) cur = cur._parent name = ".".join(namelist) if prefix: name = '.'.join((prefix, name)) if self._value is not None: if self._value: if self._required: strings.append(name) else: strings.append('~' + name) else: strings.append('~!' + name) for subflag in self.iterkeys(): strings.extend( self[subflag].toDepStrings(prefix=prefix, topflag=topflag)) return strings | a003a2d126941d940bb074ffb33e47b25b256a19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a003a2d126941d940bb074ffb33e47b25b256a19/use.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
16316,
7957,
12,
2890,
16,
1633,
33,
7036,
16,
1760,
6420,
33,
7036,
4672,
2064,
273,
5378,
15135,
5449,
273,
5378,
309,
1760,
6420,
353,
599,
30,
1760,
6420,
273,
365,
662,
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,
358,
16316,
7957,
12,
2890,
16,
1633,
33,
7036,
16,
1760,
6420,
33,
7036,
4672,
2064,
273,
5378,
15135,
5449,
273,
5378,
309,
1760,
6420,
353,
599,
30,
1760,
6420,
273,
365,
662,
273,
... |
im = self.ax.imshow(self.image, origin="lower", extent=extent, cmap=colormap, interpolation="nearest") | kwargs.setdefault("origin", "lower") kwargs.setdefault("interpolation", "nearest") im = self.ax.imshow(self.image, extent=extent, **kwargs) | def finalize(self, colormap=None, colorbar=True): if self.image is None: raise ValueError, "nothing to finalize" | 0a4cf68c0ff5a790931c0527a12a1aa4edb6871b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/0a4cf68c0ff5a790931c0527a12a1aa4edb6871b/plotutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
12,
2890,
16,
24806,
33,
7036,
16,
20644,
33,
5510,
4672,
309,
365,
18,
2730,
353,
599,
30,
1002,
2068,
16,
315,
30874,
358,
12409,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
12,
2890,
16,
24806,
33,
7036,
16,
20644,
33,
5510,
4672,
309,
365,
18,
2730,
353,
599,
30,
1002,
2068,
16,
315,
30874,
358,
12409,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
for indicator in Indicator.objects.all(): | if indicator_list: all_indicators = Indicator.objects.filter(name__in=indicator_list) else: all_indicators = Indicator.objects.all() for indicator in all_indicators: | indicator_def = self.prep_indicator_definition(metadata) | 063e799591ad2cfd23f86b44192dc2fc40ae681c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12153/063e799591ad2cfd23f86b44192dc2fc40ae681c/load.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
10664,
67,
536,
273,
365,
18,
19109,
67,
18741,
67,
6907,
12,
4165,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
10664,
67,
536,
273,
365,
18,
19109,
67,
18741,
67,
6907,
12,
4165,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
os.path.join(self.build_temp, clib_file[1]), target_dir) | os.path.join(self.build_temp, fname), target_dir) | def build_extensions(self): # Is there a better way than this? # Just one GUIDS.CPP and it gives trouble on mainwin too # Maybe I should just rename the file, but a case-only rename is likely to be # worse! if ".CPP" not in self.compiler.src_extensions: self.compiler._cpp_extensions.append(".CPP") self.compiler.src_extensions.append(".CPP") | 1676731f523f4afba3b3d8b88d046e8c40ab5777 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/1676731f523f4afba3b3d8b88d046e8c40ab5777/setup_win32all.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
9489,
12,
2890,
4672,
468,
2585,
1915,
279,
7844,
4031,
2353,
333,
35,
468,
12526,
1245,
20322,
55,
18,
4258,
52,
471,
518,
14758,
23432,
1255,
603,
2774,
8082,
4885,
468,
1402... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
9489,
12,
2890,
4672,
468,
2585,
1915,
279,
7844,
4031,
2353,
333,
35,
468,
12526,
1245,
20322,
55,
18,
4258,
52,
471,
518,
14758,
23432,
1255,
603,
2774,
8082,
4885,
468,
1402... |
result += '<a href="%s">Eventlite changeset %s: %s</a>' % (url, rev, changeset) | result += '<a href="%s">gevent changeset %s: %s</a>' % (url, rev, changeset) | def format_header(rev, changeset, pyversion): result = '<table width=99%%><tr><td>' url = '%s/changeset/%s' % (REPO_URL, changeset) result += '<a href="%s">Eventlite changeset %s: %s</a>' % (url, rev, changeset) result += '</td><tr><tr><td>Python version: %s</td><tr></table><p>' % pyversion return result | 7f322896a94f36014f0aec5b7a71837d86444a99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10423/7f322896a94f36014f0aec5b7a71837d86444a99/generate_report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
3374,
12,
9083,
16,
22463,
16,
2395,
1589,
4672,
563,
273,
2368,
2121,
1835,
33,
2733,
11438,
4438,
313,
4438,
4465,
1870,
880,
273,
1995,
87,
19,
6329,
278,
5258,
87,
11,
738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
3374,
12,
9083,
16,
22463,
16,
2395,
1589,
4672,
563,
273,
2368,
2121,
1835,
33,
2733,
11438,
4438,
313,
4438,
4465,
1870,
880,
273,
1995,
87,
19,
6329,
278,
5258,
87,
11,
738... |
Returns the Huffman tree corresponding to the current encoding | Returns the Huffman tree corresponding to the current encoding. INPUT: - None. | def tree(self): r""" Returns the Huffman tree corresponding to the current encoding | 0aa5d0e07206199e4e64708c13056046cecfe083 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0aa5d0e07206199e4e64708c13056046cecfe083/huffman.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2151,
12,
2890,
4672,
436,
8395,
2860,
326,
670,
28581,
2151,
4656,
358,
326,
783,
2688,
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,
2151,
12,
2890,
4672,
436,
8395,
2860,
326,
670,
28581,
2151,
4656,
358,
326,
783,
2688,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
debug(" cookie expired") | _debug(" cookie expired") | def return_ok_expires(self, cookie, request): if cookie.is_expired(self._now): debug(" cookie expired") return False return True | 15f04d8bbaf4e2b7d0d25228ce9bc84f1e501e81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/15f04d8bbaf4e2b7d0d25228ce9bc84f1e501e81/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
327,
67,
601,
67,
12431,
12,
2890,
16,
3878,
16,
590,
4672,
309,
3878,
18,
291,
67,
15820,
12,
2890,
6315,
3338,
4672,
389,
4148,
2932,
282,
3878,
7708,
7923,
327,
1083,
327,
1053,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
327,
67,
601,
67,
12431,
12,
2890,
16,
3878,
16,
590,
4672,
309,
3878,
18,
291,
67,
15820,
12,
2890,
6315,
3338,
4672,
389,
4148,
2932,
282,
3878,
7708,
7923,
327,
1083,
327,
1053,
2,
... |
self.assertEquals(py_item.__name__, value.name, ignore) | self.assertEquals(py_item.__name__, value.name, ignore) except: print >>sys.stderr, "class=%s" % py_item raise | def checkModule(self, moduleName, module=None, ignore=()): ''' succeed iff pyclbr.readmodule_ex(modulename) corresponds to the actual module object, module. Any identifiers in ignore are ignored. If no module is provided, the appropriate module is loaded with __import__.''' | 39e2d376cc78754548026969ed2493e4b643f498 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/39e2d376cc78754548026969ed2493e4b643f498/test_pyclbr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
3120,
12,
2890,
16,
9780,
16,
1605,
33,
7036,
16,
2305,
33,
1435,
4672,
9163,
12897,
21437,
2395,
830,
2848,
18,
896,
2978,
67,
338,
12,
1711,
332,
1069,
13,
13955,
358,
326,
3214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
3120,
12,
2890,
16,
9780,
16,
1605,
33,
7036,
16,
2305,
33,
1435,
4672,
9163,
12897,
21437,
2395,
830,
2848,
18,
896,
2978,
67,
338,
12,
1711,
332,
1069,
13,
13955,
358,
326,
3214... |
def confirm(s): | def confirm(s, denial): | def confirm(s): if not prompt(s, default = 'y', rest = '? ').lower().startswith('y'): raise ValueError | 5efaf64550972f2f962ae5e4a18753910b2430fc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/5efaf64550972f2f962ae5e4a18753910b2430fc/patchbomb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6932,
12,
87,
16,
5545,
649,
4672,
309,
486,
6866,
12,
87,
16,
805,
273,
296,
93,
2187,
3127,
273,
13023,
296,
2934,
8167,
7675,
17514,
1918,
2668,
93,
11,
4672,
1002,
2068,
2,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6932,
12,
87,
16,
5545,
649,
4672,
309,
486,
6866,
12,
87,
16,
805,
273,
296,
93,
2187,
3127,
273,
13023,
296,
2934,
8167,
7675,
17514,
1918,
2668,
93,
11,
4672,
1002,
2068,
2,
-100,
... |
why = os.strerror(err.errno) | why = _strerror(err) | def ftp_RNTO(self, line): """Rename file (destination name only, source is specified with RNFR).""" if not self.fs.rnfr: self.respond("503 Bad sequence of commands: use RNFR first.") return | 93acc72ebc75fdf3b1931c4e1f9e2f2d830514c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/93acc72ebc75fdf3b1931c4e1f9e2f2d830514c9/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
54,
1784,
51,
12,
2890,
16,
980,
4672,
3536,
16019,
585,
261,
10590,
508,
1338,
16,
1084,
353,
1269,
598,
534,
50,
9981,
13,
12123,
309,
486,
365,
18,
2556,
18,
27639,
4840,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
54,
1784,
51,
12,
2890,
16,
980,
4672,
3536,
16019,
585,
261,
10590,
508,
1338,
16,
1084,
353,
1269,
598,
534,
50,
9981,
13,
12123,
309,
486,
365,
18,
2556,
18,
27639,
4840,... |
def remove_rows_with_too_many_NAs(cls, data_matrix, row_cutoff, debug=0): """ | def remove_rows_with_too_many_NAs(cls, data_matrix, row_cutoff, cols_with_too_many_NAs_set=None, NA_set=Set([0, -2]), debug=0): """ 2008-05-12 made more robust add cols_with_too_many_NAs_set add NA_set | def remove_rows_with_too_many_NAs(cls, data_matrix, row_cutoff, debug=0): """ 2008-05-08 become classmethod """ sys.stderr.write("Removing rows with too many NAs...") no_of_rows, no_of_cols = data_matrix.shape rows_with_too_many_NAs_set = Set() strain_index2no_of_NAs = {} for i in range(no_of_rows): no_of_NAs = 0.0 for j in range(no_of_cols): if data_matrix[i][j] == 0: no_of_NAs += 1 NA_ratio = no_of_NAs/no_of_cols strain_index2no_of_NAs[i] = NA_ratio if NA_ratio >= row_cutoff: rows_with_too_many_NAs_set.add(i) if debug: print print 'rows_with_too_many_NAs_set' print rows_with_too_many_NAs_set sys.stderr.write("%s strains removed, done.\n"%len(rows_with_too_many_NAs_set)) return rows_with_too_many_NAs_set, strain_index2no_of_NAs | 9c37de4822440ddecb9d7de412265d707bdb9dbc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/9c37de4822440ddecb9d7de412265d707bdb9dbc/FilterStrainSNPMatrix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3870,
67,
1918,
67,
16431,
67,
9353,
67,
50,
1463,
12,
6429,
16,
501,
67,
5667,
16,
1027,
67,
16131,
16,
5347,
67,
1918,
67,
16431,
67,
9353,
67,
50,
1463,
67,
542,
33,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3870,
67,
1918,
67,
16431,
67,
9353,
67,
50,
1463,
12,
6429,
16,
501,
67,
5667,
16,
1027,
67,
16131,
16,
5347,
67,
1918,
67,
16431,
67,
9353,
67,
50,
1463,
67,
542,
33,
7... |
caller.statusbar.resize() | def do_resize(caller): """This needs to hack around readline and curses not playing nicely together. See also gethw() above.""" global DO_RESIZE h, w = gethw() if not h: | 4a82f5f09bb7e653a67c969608ad51544e4ab12c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6932/4a82f5f09bb7e653a67c969608ad51544e4ab12c/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
15169,
12,
16140,
4672,
3536,
2503,
4260,
358,
11769,
6740,
12023,
471,
30436,
486,
23982,
11562,
2357,
9475,
18,
2164,
2546,
336,
20701,
1435,
5721,
12123,
2552,
5467,
67,
862,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
15169,
12,
16140,
4672,
3536,
2503,
4260,
358,
11769,
6740,
12023,
471,
30436,
486,
23982,
11562,
2357,
9475,
18,
2164,
2546,
336,
20701,
1435,
5721,
12123,
2552,
5467,
67,
862,
4... | |
r'|this|throw|try|vararg|while|with|yield)', Keyword ), (r'(false|true|null)', Keyword.Constant), | r'|this|throw|try|vararg|while|with|yield)\b', Keyword), (r'(false|true|null)\b', Keyword.Constant), | def get_tokens_unprocessed(self, text): for index, token, value in \ RegexLexer.get_tokens_unprocessed(self, text): if token is Name: if value in self._functions: yield index, Name.Function, value continue elif '.' in value: a, b = value.split('.') yield index, Name, a yield index + len(a), Punctuation, u'.' yield index + len(a) + 1, Name, b continue yield index, token, value | 1b8032e7b4392351a70d7b6bb775c2f5caabb2a5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2885/1b8032e7b4392351a70d7b6bb775c2f5caabb2a5/agile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7860,
67,
318,
11005,
12,
2890,
16,
977,
4672,
364,
770,
16,
1147,
16,
460,
316,
521,
15078,
13356,
18,
588,
67,
7860,
67,
318,
11005,
12,
2890,
16,
977,
4672,
309,
1147,
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,
336,
67,
7860,
67,
318,
11005,
12,
2890,
16,
977,
4672,
364,
770,
16,
1147,
16,
460,
316,
521,
15078,
13356,
18,
588,
67,
7860,
67,
318,
11005,
12,
2890,
16,
977,
4672,
309,
1147,
35... |
email_address = models.EmailField(help_text='Email address used to contact artist.') telephone_number = PhoneNumberField(help_text='Telephone number where the artist can be reached.') pay_to_the_order_of = models.CharField(max_length=128, help_text='Name the check should be made out to.') address1 = models.CharField(max_length=512, help_text='Address line 1 to mail check to.') address2 = models.CharField(max_length=512, blank=True, null=True, help_text='Address line 2 to mail check to.') city = models.CharField(max_length=128, help_text='The city portion of the address to mail check to.') | pay_to_the_order_of = models.CharField( max_length=128, help_text='Name the check should be made out to.') address1 = models.CharField( max_length=512, help_text='Address line 1 to mail check to.') address2 = models.CharField( max_length=512, blank=True, null=True, help_text='Address line 2 to mail check to.') city = models.CharField( max_length=128, help_text='The city portion of the address to mail check to.') | def upload_to(instance, filename): """ Given an instance of a Photo or Video as well as the filename, generate an appropriate storage location for this photo. """ return "artist/%s/%s" % (instance.artist.name, filename) | 10d3cb3eea3d43cbc19c1f0cf59d425b0af97026 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10992/10d3cb3eea3d43cbc19c1f0cf59d425b0af97026/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
67,
869,
12,
1336,
16,
1544,
4672,
3536,
16803,
392,
791,
434,
279,
26867,
578,
14030,
487,
5492,
487,
326,
1544,
16,
2103,
392,
5505,
2502,
2117,
364,
333,
10701,
18,
3536,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
67,
869,
12,
1336,
16,
1544,
4672,
3536,
16803,
392,
791,
434,
279,
26867,
578,
14030,
487,
5492,
487,
326,
1544,
16,
2103,
392,
5505,
2502,
2117,
364,
333,
10701,
18,
3536,
327,
... |
print self.__camera.strobeduration | def setStrobe(): self.__camera.strobeduration += 10 print self.__camera.strobeduration | d43da534769e8bae562d32156a211d69d618611d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7300/d43da534769e8bae562d32156a211d69d618611d/TestCamera.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
510,
303,
2196,
13332,
365,
16186,
26426,
18,
334,
303,
2992,
872,
1011,
1728,
1172,
365,
16186,
26426,
18,
334,
303,
2992,
872,
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,
0,
0,
0,
0,
0,
0,
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,
510,
303,
2196,
13332,
365,
16186,
26426,
18,
334,
303,
2992,
872,
1011,
1728,
1172,
365,
16186,
26426,
18,
334,
303,
2992,
872,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
self.Logger.error("Need primary source"); return(False); | raise pyDCPU.ModuleSetup("No primary source given!"); | def setup(self): self.Logger.info("Setup Agilent 5462X Module"); if not self.Parameters.has_key('PSource'): self.Logger.error("Need primary source"); return(False); if not self.Parameters.has_key('SSource'): self.Logger.error("Need secondary source"); return(False); self.__Source = LibAgi.Source(self.Parameters['PSource'], self.Parameters['SSource']); if not self.__Source.IsValid(): self.Logger.error("Invalid source format"); return(False); return(True); | 2797f7cc5dfc35cdc1823b3697093c4c7e49463b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2439/2797f7cc5dfc35cdc1823b3697093c4c7e49463b/AGI54622A.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
4672,
365,
18,
3328,
18,
1376,
2932,
7365,
5495,
8125,
1381,
8749,
22,
60,
5924,
8863,
309,
486,
365,
18,
2402,
18,
5332,
67,
856,
2668,
52,
1830,
11,
4672,
1002,
2395,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
4672,
365,
18,
3328,
18,
1376,
2932,
7365,
5495,
8125,
1381,
8749,
22,
60,
5924,
8863,
309,
486,
365,
18,
2402,
18,
5332,
67,
856,
2668,
52,
1830,
11,
4672,
1002,
2395,... |
options.time_out_ms = 20000 | options.time_out_ms = '20000' | def main(options, args): """Run the tests. Will call sys.exit when complete. Args: options: a dictionary of command line options args: a list of sub directories or files to test """ if options.sources: options.verbose = True # Set up our logging format. log_level = logging.INFO if options.verbose: log_level = logging.DEBUG logging.basicConfig(level=log_level, format='%(asctime)s %(filename)s:%(lineno)-3d' ' %(levelname)s %(message)s', datefmt='%y%m%d %H:%M:%S') if not options.target: if options.debug: options.target = "Debug" else: options.target = "Release" if options.results_directory.startswith("/"): # Assume it's an absolute path and normalize options.results_directory = path_utils.GetAbsolutePath( options.results_directory) else: # If it's a relative path, make the output directory relative to Debug or # Release. basedir = path_utils.WebKitRoot() basedir = os.path.join(basedir, options.target) options.results_directory = path_utils.GetAbsolutePath( os.path.join(basedir, options.results_directory)) if options.platform is None: options.platform = path_utils.PlatformDir() if not options.num_test_shells: # For now, only run Windows-Release in parallel until we make other # configurations more stable. if sys.platform in ('win32', 'cygwin') and options.target == 'Release': cpus = 1 if sys.platform in ('win32', 'cygwin'): cpus = int(os.environ.get('NUMBER_OF_PROCESSORS', 1)) elif (hasattr(os, "sysconf") and os.sysconf_names.has_key("SC_NPROCESSORS_ONLN")): # Linux & Unix: ncpus = os.sysconf("SC_NPROCESSORS_ONLN") if isinstance(ncpus, int) and ncpus > 0: cpus = ncpus elif sys.platform in ('darwin'): # OSX: cpus = int(os.popen2("sysctl -n hw.ncpu")[1].read()) # TODO: Do timing tests on a single-core machine. options.num_test_shells = 2 * cpus # Some HTTP tests start timing out when tests are run in parallel. # TODO(ojan): Impelement per-test-timeouts instead. http://crbug.com/9613 if not options.time_out_ms: options.time_out_ms = 20000 else: options.num_test_shells = 1 # Include all tests if none are specified. paths = args if not paths: paths = [] if options.test_list: paths += ReadTestFiles(options.test_list) if not paths: paths = ['.'] test_runner = TestRunner(options, paths) if options.lint_test_files: # Just creating the TestRunner checks the syntax of the test lists. print "If there are no fail messages or exceptions, the lint succeeded." return try: test_shell_binary_path = path_utils.TestShellBinaryPath(options.target) except path_utils.PathNotFound: print "\nERROR: test_shell is not found. Be sure that you have built it" print "and that you are using the correct build. This script will run the" print "Release one by default. Use --debug to use the Debug build.\n" sys.exit(1) logging.info("Using platform '%s'" % options.platform) logging.info("Placing test results in %s" % options.results_directory) if options.new_baseline: logging.info("Placing new baselines in %s" % os.path.join(path_utils.PlatformResultsDir(options.platform), options.platform)) logging.info("Using %s build at %s" % (options.target, test_shell_binary_path)) if not options.no_pixel_tests: logging.info("Running pixel tests") if 'cygwin' == sys.platform: logging.warn("#" * 40) logging.warn("# UNEXPECTED PYTHON VERSION") logging.warn("# This script should be run using the version of python") logging.warn("# in third_party/python_24/") logging.warn("#" * 40) sys.exit(1) # Delete the disk cache if any to ensure a clean test run. cachedir = os.path.split(test_shell_binary_path)[0] cachedir = os.path.join(cachedir, "cache") if os.path.exists(cachedir): shutil.rmtree(cachedir) test_runner.AddTestType(text_diff.TestTextDiff) test_runner.AddTestType(simplified_text_diff.SimplifiedTextDiff) if not options.no_pixel_tests: test_runner.AddTestType(image_diff.ImageDiff) if options.fuzzy_pixel_tests: test_runner.AddTestType(fuzzy_image_diff.FuzzyImageDiff) has_new_failures = test_runner.Run() logging.info("Exit status: %d" % has_new_failures) sys.exit(has_new_failures) | 22fd3e78eeb619a06bad137d9a19e05bb354be2f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/22fd3e78eeb619a06bad137d9a19e05bb354be2f/run_webkit_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
16,
833,
4672,
3536,
1997,
326,
7434,
18,
225,
9980,
745,
2589,
18,
8593,
1347,
3912,
18,
225,
6634,
30,
702,
30,
279,
3880,
434,
1296,
980,
702,
833,
30,
279,
666,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
16,
833,
4672,
3536,
1997,
326,
7434,
18,
225,
9980,
745,
2589,
18,
8593,
1347,
3912,
18,
225,
6634,
30,
702,
30,
279,
3880,
434,
1296,
980,
702,
833,
30,
279,
666,
4... |
cmd = ('FreezePython --include-modules=sip,dbhash --exclude-modules=OpenGL --install-dir=' + os.path.join(self.buildSourcePath, 'program') + ' --target-name=' + self.appName + ' atom.py') | cmd = ('FreezePython --include-modules=sip,dbhash' + ' --exclude-modules=OpenGL' + ' --install-dir=' + self.progPath + ' --target-name=' + self.appName + ' atom.py') | def freezePythonExecutable(self): # Mandrake calls it 'libsip', not 'sip' ... when did this happen? wware 051212 try: cmd = ('FreezePython --include-modules=libsip,dbhash --exclude-modules=OpenGL --install-dir=' + os.path.join(self.buildSourcePath, 'program') + ' --target-name=' + self.appName + ' atom.py') system(cmd) except: # Mandriva 2006 calls it "sip" cmd = ('FreezePython --include-modules=sip,dbhash --exclude-modules=OpenGL --install-dir=' + os.path.join(self.buildSourcePath, 'program') + ' --target-name=' + self.appName + ' atom.py') system(cmd) #Copy OpenGL package into buildSource/program copytree(os.path.join(PYLIBPATH, 'site-packages', 'OpenGL'), os.path.join(self.buildSourcePath, 'program/OpenGL')) | 6728a69ffc45db1f28ed5da274018ce8ecb9e189 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/6728a69ffc45db1f28ed5da274018ce8ecb9e189/autoBuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16684,
15774,
17709,
12,
2890,
4672,
468,
490,
14285,
4491,
4097,
518,
296,
21571,
625,
2187,
486,
296,
28477,
11,
1372,
1347,
5061,
333,
5865,
35,
225,
341,
2726,
374,
13757,
2138,
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,
16684,
15774,
17709,
12,
2890,
4672,
468,
490,
14285,
4491,
4097,
518,
296,
21571,
625,
2187,
486,
296,
28477,
11,
1372,
1347,
5061,
333,
5865,
35,
225,
341,
2726,
374,
13757,
2138,
775,
... |
control.SCIEnsureVisible(control.LineFromChar(foundSel)) | control.SCIEnsureVisible(control.LineFromChar(foundSel[0])) | def _FindIt(control, searchParams): global lastSearch control = _GetControl(control) # Move to the next char, so we find the next one. flags = 0 if searchParams.matchWords: flags = flags | win32con.FR_WHOLEWORD if searchParams.matchCase: flags = flags | win32con.FR_MATCHCASE if searchParams.sel == (-1,-1): sel = control.GetSel() # If the position is the same as we found last time, # then we assume it is a "FindNext" if sel==lastSearch.sel: sel = sel[0]+1, sel[0]+1 else: sel = searchParams.sel if sel[0]==sel[1]: sel=sel[0], control.GetTextLength() rc = FOUND_NOTHING # (Old edit control will fail here!) posFind, foundSel = control.FindText(flags, sel, searchParams.findText) lastSearch = SearchParams(searchParams) if posFind >= 0: rc = FOUND_NORMAL lineno = control.LineFromChar(posFind) control.SCIEnsureVisible(lineno) control.SetSel(foundSel) control.SetFocus() win32ui.SetStatusText(win32ui.LoadString(afxres.AFX_IDS_IDLEMESSAGE)) if rc == FOUND_NOTHING and lastSearch.acrossFiles: # Loop around all documents. First find this document. try: try: doc = control.GetDocument() except AttributeError: try: doc = control.GetParent().GetDocument() except AttributeError: print "Cant find a document for the control!" doc = None if doc is not None: template = doc.GetDocTemplate() alldocs = template.GetDocumentList() mypos = lookpos = alldocs.index(doc) while 1: lookpos = (lookpos+1) % len(alldocs) if lookpos == mypos: break view = alldocs[lookpos].GetFirstView() posFind, foundSel = view.FindText(flags, (0, view.GetTextLength()), searchParams.findText) if posFind >= 0: nChars = foundSel[1]-foundSel[0] lineNo = view.LineFromChar(posFind) # zero based. lineStart = view.LineIndex(lineNo) colNo = posFind - lineStart # zero based. scriptutils.JumpToDocument(alldocs[lookpos].GetPathName(), lineNo+1, colNo+1, nChars) rc = FOUND_NEXT_FILE break except win32ui.error: pass if rc == FOUND_NOTHING: # Loop around this control - attempt to find from the start of the control. posFind, foundSel = control.FindText(flags, (0, sel[0]-1), searchParams.findText) if posFind >= 0: control.SCIEnsureVisible(control.LineFromChar(foundSel)) control.SetSel(foundSel) control.SetFocus() win32ui.SetStatusText("Not found! Searching from the top of the file.") rc = FOUND_LOOPED_BACK else: lastSearch.sel=-1,-1 win32ui.SetStatusText("Can not find '%s'" % searchParams.findText ) if rc != FOUND_NOTHING: lastSearch.sel = foundSel return rc | feff34ea77dcf55e372ed1e10bcd697410a537fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/feff34ea77dcf55e372ed1e10bcd697410a537fc/find.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3125,
7193,
12,
7098,
16,
1623,
1370,
4672,
2552,
1142,
2979,
3325,
273,
389,
967,
3367,
12,
7098,
13,
225,
468,
9933,
358,
326,
1024,
1149,
16,
1427,
732,
1104,
326,
1024,
1245,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3125,
7193,
12,
7098,
16,
1623,
1370,
4672,
2552,
1142,
2979,
3325,
273,
389,
967,
3367,
12,
7098,
13,
225,
468,
9933,
358,
326,
1024,
1149,
16,
1427,
732,
1104,
326,
1024,
1245,
... |
return S_ERROR("Transformation %s did not exist" % transName) return S_OK(res['Value'][0]) def getTransformationParameters(self,transName,parameters,connection=False): | return S_ERROR( "Transformation %s did not exist" % transName ) return S_OK( res['Value'][0] ) def getTransformationParameters( self, transName, parameters, connection = False ): | def getTransformation(self,transName,extraParams=False,connection=False): """Get Transformation definition and parameters of Transformation identified by TransformationID """ res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] res = self.getTransformations(condDict = {'TransformationID':transID},extraParams=extraParams,connection=connection) if not res['OK']: return res if not res['Value']: return S_ERROR("Transformation %s did not exist" % transName) return S_OK(res['Value'][0]) | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
15292,
12,
2890,
16,
2338,
461,
16,
7763,
1370,
33,
8381,
16,
4071,
33,
8381,
4672,
3536,
967,
21274,
2379,
471,
1472,
434,
21274,
9283,
635,
21274,
734,
3536,
400,
273,
365,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15292,
12,
2890,
16,
2338,
461,
16,
7763,
1370,
33,
8381,
16,
4071,
33,
8381,
4672,
3536,
967,
21274,
2379,
471,
1472,
434,
21274,
9283,
635,
21274,
734,
3536,
400,
273,
365,
6315,
... |
for item in rootdse.Get("SupportedLDAPVersion"): print "%s supports ldap version %s" % (path, item) attributes = ["CurrentTime", "defaultNamingContext"] for attr in attributes: val = rootdse.Get(attr) print " %s=%s" % (attr, val) | class ADSIEnumerator: def __init__(self, ob): self._cont_ = ob.QueryInterface(IID_IADsContainer) self._oleobj_ = ADsBuildEnumerator(self._cont_) self.index = -1 def __getitem__(self, index): return self.__GetIndex(index) def __call__(self, index): return self.__GetIndex(index) def __GetIndex(self, index): if type(index)!=type(0): raise TypeError, "Only integer indexes are supported for enumerators" if index != self.index + 1: raise ValueError, "You must index this object sequentially" self.index = index result = ADsEnumerateNext(self._oleobj_, 1) if len(result): return _get_good_ret(result[0]) self.index = -1 self._oleobj_ = ADsBuildEnumerator(self._cont_) raise IndexError, "list index out of range" | def DumpRoot(): "Dumps the root DSE" path = "LDAP://%srootDSE" % server rootdse = ADsGetObject(path) for item in rootdse.Get("SupportedLDAPVersion"): print "%s supports ldap version %s" % (path, item) attributes = ["CurrentTime", "defaultNamingContext"] for attr in attributes: val = rootdse.Get(attr) print " %s=%s" % (attr, val) | 5333c5760a720e138b5aeca5b1ba10fdbc8632c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/5333c5760a720e138b5aeca5b1ba10fdbc8632c6/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18242,
2375,
13332,
315,
29225,
326,
1365,
463,
1090,
6,
589,
273,
315,
15496,
23155,
87,
3085,
40,
1090,
6,
738,
1438,
1365,
72,
307,
273,
11738,
87,
967,
921,
12,
803,
13,
225,
667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18242,
2375,
13332,
315,
29225,
326,
1365,
463,
1090,
6,
589,
273,
315,
15496,
23155,
87,
3085,
40,
1090,
6,
738,
1438,
1365,
72,
307,
273,
11738,
87,
967,
921,
12,
803,
13,
225,
667,
... |
while i < ramdisks or devices: op = random.randint(0,1) if (not devices or op) and i < ramdisks: i += 1 devname = "/dev/xvda%d" % i phy = "/dev/ram%d" % i print "Attaching %s to %s" % (devname, phy) status, msg = attach( phy, devname ) | detached = range(0, ramdisk_cnt) attached = [] def attach_device(): n = random.choice(detached) status, msg = attach("ram%d" % n, "xvda%d" % n) | def detach(devname): block_detach(domain, devname) run = console.runCmd("cat /proc/partitions") if re.search(basename(devname), run["output"]): return -2, "Failed to detach block device: /proc/partitions still showing that!" return 0, None | 60a55e6d55238f973aa477c2d311d7955be41024 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/60a55e6d55238f973aa477c2d311d7955be41024/10_block_attach_dettach_multiple_devices.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10199,
12,
5206,
529,
4672,
1203,
67,
8238,
497,
12,
4308,
16,
4461,
529,
13,
225,
1086,
273,
2983,
18,
2681,
5931,
2932,
2574,
342,
9381,
19,
21275,
7923,
309,
283,
18,
3072,
12,
1390... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10199,
12,
5206,
529,
4672,
1203,
67,
8238,
497,
12,
4308,
16,
4461,
529,
13,
225,
1086,
273,
2983,
18,
2681,
5931,
2932,
2574,
342,
9381,
19,
21275,
7923,
309,
283,
18,
3072,
12,
1390... |
if diff > 0: self.append_cell(odf_create_cell(repeated=diff)) | if diff >= 0: if diff > 0: self.append_cell(odf_create_cell(repeated=diff)) | def insert_cell(self, x, cell=None): """Insert the given cell at position "x" starting from 0. If no cell is given, an empty one is created. | f03ab2c3edfee9766627e5b6f6b51733fc7ca42a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10612/f03ab2c3edfee9766627e5b6f6b51733fc7ca42a/table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
3855,
12,
2890,
16,
619,
16,
2484,
33,
7036,
4672,
3536,
4600,
326,
864,
2484,
622,
1754,
315,
92,
6,
5023,
628,
374,
18,
971,
1158,
2484,
353,
864,
16,
392,
1008,
1245,
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,
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,
2243,
67,
3855,
12,
2890,
16,
619,
16,
2484,
33,
7036,
4672,
3536,
4600,
326,
864,
2484,
622,
1754,
315,
92,
6,
5023,
628,
374,
18,
971,
1158,
2484,
353,
864,
16,
392,
1008,
1245,
35... |
if hasattr( o, 'area_color'): | if hasattr( o, 'area_color') and self.area_color.color: | def done( self, button): """called on dialog exit""" self.dialog.deactivate() if button != _('OK'): pass else: #print self.marks.get() # apply changes for o in self.items: change = 0 # ATOM if o.object_type == 'atom': a = self.atom_show.index( Pmw.SELECT) if a != 2: o.show = a change = 1 # positionning a = self.atom_pos.index( Pmw.SELECT) if a != 2: o.pos = ('center-first', 'center-last')[ a] change = 1 if self.atom_charge.get(): a = int( self.atom_charge.get()) if hasattr( o, 'charge') and o.charge != a: o.charge = a change = 1 # hydrogens a = int( self.atom_show_h.index( Pmw.SELECT)) if a != 2: o.show_hydrogens = a change = 1 # font is in common now # BOND elif o.object_type == 'bond': # width is in common now # bond_width d = Screen.any_to_px( self.bond_dist.getvalue()) if d: if d != abs( o.bond_width): o.bond_width = d * misc.signum( o.bond_width) change = 1 # wedge_width d = Screen.any_to_px( self.wedge_width.getvalue()) if d: if d != o.wedge_width: o.wedge_width = d change = 1 # ratio ratio = self.double_length_ratio.getvalue() if ratio: ratio = float( self.double_length_ratio.getvalue()) if ratio != o.double_length_ratio: o.double_length_ratio = ratio change = 1 # ARROW - most is in common now elif o.object_type == 'arrow': if self.arrow_start_changed: o.set_pins( start = self.arrow_start.get()) change = 1 if self.arrow_end_changed: o.set_pins( end = self.arrow_end.get()) change = 1 if self.spline_changed: o.spline = self.spline.get() change = 1 # TEXT - all is in common now # PLUS - all is in common now # VECTOR - all is in common now | 44901fd1160eff83e92d9cc5cce450b6cad5f742 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4298/44901fd1160eff83e92d9cc5cce450b6cad5f742/dialogs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2731,
12,
365,
16,
3568,
4672,
3536,
11777,
603,
6176,
2427,
8395,
365,
18,
12730,
18,
323,
10014,
1435,
309,
3568,
480,
389,
2668,
3141,
11,
4672,
1342,
469,
30,
468,
1188,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2731,
12,
365,
16,
3568,
4672,
3536,
11777,
603,
6176,
2427,
8395,
365,
18,
12730,
18,
323,
10014,
1435,
309,
3568,
480,
389,
2668,
3141,
11,
4672,
1342,
469,
30,
468,
1188,
365,
18,
1... |
super(SSLConnection, self).close() | if not ssl_want_read_or_write: super(SSLConnection, self).close() | def close(self): try: if isinstance(self.socket, ssl.SSLSocket): if self.socket._sslobj is not None: self.socket.unwrap() finally: super(SSLConnection, self).close() | 00595f64323fb5f6bc38944624405e22222f8a73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/00595f64323fb5f6bc38944624405e22222f8a73/test_ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
775,
30,
309,
1549,
12,
2890,
18,
7814,
16,
5832,
18,
1260,
25831,
4672,
309,
365,
18,
7814,
6315,
1049,
383,
441,
353,
486,
599,
30,
365,
18,
7814,
18,
318,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
775,
30,
309,
1549,
12,
2890,
18,
7814,
16,
5832,
18,
1260,
25831,
4672,
309,
365,
18,
7814,
6315,
1049,
383,
441,
353,
486,
599,
30,
365,
18,
7814,
18,
318,
41... |
re_automount = re.compile( '^none[ \t]+([^ \t]+) supermount dev=([^,]+)', re.I ) | re_automount = re.compile( '^none[ \t]+([^ \t]+).*supermount.*dev=([^,]+).*', re.I ) | def _debug_function_(s, level=1): if DEBUG < level: return # add the current trace to the string where = traceback.extract_stack(limit = 2)[0] s = '%s (%s): %s' % (where[0][where[0].rfind('/')+1:], where[1], s) # print debug message print s | 3306fab6cd2c709a80ec0441615f8629cd082b06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/3306fab6cd2c709a80ec0441615f8629cd082b06/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4148,
67,
915,
67,
12,
87,
16,
1801,
33,
21,
4672,
309,
6369,
411,
1801,
30,
327,
468,
527,
326,
783,
2606,
358,
326,
533,
1625,
273,
225,
10820,
18,
8004,
67,
3772,
12,
3595,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4148,
67,
915,
67,
12,
87,
16,
1801,
33,
21,
4672,
309,
6369,
411,
1801,
30,
327,
468,
527,
326,
783,
2606,
358,
326,
533,
1625,
273,
225,
10820,
18,
8004,
67,
3772,
12,
3595,
... |
utils.run_cmd("git push %s"%effective_branch) | utils.run_cmd("git push origin %s"%effective_branch) | def push(self): os.chdir(self.co_path) if (self.branch is not None): effective_branch = "remotes/origin/%s:%s" % (self.branch, self.branch) else: effective_branch = "" utils.run_cmd("git config remote.origin.url=%s"%self.git_repo) utils.run_cmd("git push %s"%effective_branch) | c091b1cce9bdf60f3242b5eb68e22e8f8b0f9645 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4427/c091b1cce9bdf60f3242b5eb68e22e8f8b0f9645/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1817,
12,
2890,
4672,
1140,
18,
343,
1214,
12,
2890,
18,
2894,
67,
803,
13,
309,
261,
2890,
18,
7500,
353,
486,
599,
4672,
11448,
67,
7500,
273,
315,
2764,
6366,
19,
10012,
5258,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1817,
12,
2890,
4672,
1140,
18,
343,
1214,
12,
2890,
18,
2894,
67,
803,
13,
309,
261,
2890,
18,
7500,
353,
486,
599,
4672,
11448,
67,
7500,
273,
315,
2764,
6366,
19,
10012,
5258,
87,
... |
if not bytesToRead: return | def doReadErr(self): """Runs in thread.""" try: buffer, bytesToRead, ignore = win32pipe.PeekNamedPipe(self.hStderrR, 0) if not bytesToRead: return hr, data = win32file.ReadFile(self.hStderrR, bytesToRead, None) except win32api.error: self.stderrClosed = 1 if self.stdoutClosed: return main.CONNECTION_LOST else: return self.handleError(data) | 738e86ae95b1bbf61033460a54f61f6a864ac772 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/738e86ae95b1bbf61033460a54f61f6a864ac772/win32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1994,
2524,
12,
2890,
4672,
3536,
9361,
316,
2650,
12123,
775,
30,
1613,
16,
1731,
23321,
16,
2305,
273,
5657,
1578,
14772,
18,
30950,
7604,
11546,
12,
2890,
18,
76,
31781,
54,
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,
741,
1994,
2524,
12,
2890,
4672,
3536,
9361,
316,
2650,
12123,
775,
30,
1613,
16,
1731,
23321,
16,
2305,
273,
5657,
1578,
14772,
18,
30950,
7604,
11546,
12,
2890,
18,
76,
31781,
54,
16,
... | |
msg = _("<b>%(plugin)s</b> requires feature <b>%(feature)s</b> which is provided by the following plugins:\n%(plugin_list)s") | msg = _("<b>%(plugin)s</b> requires feature <b>%(feature)s</b> " \ "which is provided by the following " \ "plugins:\n%(plugin_list)s") | def AskUser(self, plugin, conflict): msg = "" okMsg = "" cancelMsg = "" widgets = [] | 2a080987c01e5847885f1cb68af62c2935447601 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7062/2a080987c01e5847885f1cb68af62c2935447601/Conflicts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25747,
1299,
12,
2890,
16,
1909,
16,
7546,
4672,
1234,
273,
1408,
1529,
3332,
273,
1408,
3755,
3332,
273,
1408,
10965,
273,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25747,
1299,
12,
2890,
16,
1909,
16,
7546,
4672,
1234,
273,
1408,
1529,
3332,
273,
1408,
3755,
3332,
273,
1408,
10965,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
args.extend(['-faltivec']) | if intel: args.extend(['-msse3']) else: args.extend(['-faltivec']) | def calc_info(self): | 339afa63fa51f0dec49adfc5b700f2b30f60407a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/339afa63fa51f0dec49adfc5b700f2b30f60407a/system_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
1376,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
1376,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
tzinfo)) | tzinfo), view) | def importProcess(self, text, extension=None, item=None, changes=None, previousView=None, updateCallback=None): # the item parameter is so that a share item can be passed in for us # to populate. | ccabd5ee45f0dab450c75514d4c4c47d41a0b87c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ccabd5ee45f0dab450c75514d4c4c47d41a0b87c/ICalendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
2227,
12,
2890,
16,
977,
16,
2710,
33,
7036,
16,
761,
33,
7036,
16,
3478,
33,
7036,
16,
2416,
1767,
33,
7036,
16,
1089,
2428,
33,
7036,
4672,
468,
326,
761,
1569,
353,
1427,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
2227,
12,
2890,
16,
977,
16,
2710,
33,
7036,
16,
761,
33,
7036,
16,
3478,
33,
7036,
16,
2416,
1767,
33,
7036,
16,
1089,
2428,
33,
7036,
4672,
468,
326,
761,
1569,
353,
1427,
71... |
bot_users = ["/user/EdwardBot", "/user/ImportBot", "/user/WorkBot", "/user/AnandBot", "/user/StatsBot"] where += " AND t.author_id IN (SELECT id FROM thing WHERE key IN $bot_users)" | where += " AND t.author_id IN (SELECT thing_id FROM account WHERE bot == 't')" | def edits(self, today, tomorrow, bots=False): tables = 'version v, transaction t' where = 'v.transaction_id=t.id AND t.created >= date($today) AND t.created < date($tomorrow)' | 296908d2403ab0f9ca47ea52cfa5e267d259c6c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/296908d2403ab0f9ca47ea52cfa5e267d259c6c5/ol_infobase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24450,
12,
2890,
16,
10074,
16,
29998,
15318,
16,
2512,
87,
33,
8381,
4672,
4606,
273,
296,
1589,
331,
16,
2492,
268,
11,
1625,
273,
296,
90,
18,
7958,
67,
350,
33,
88,
18,
350,
4116... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24450,
12,
2890,
16,
10074,
16,
29998,
15318,
16,
2512,
87,
33,
8381,
4672,
4606,
273,
296,
1589,
331,
16,
2492,
268,
11,
1625,
273,
296,
90,
18,
7958,
67,
350,
33,
88,
18,
350,
4116... |
PYTHONV=`cat built/tmp/pythonversion` | def printUsage(): sys.exit("usage: maketarball [version]") | 8bd6db44da649dd6fdbc553d5d3c634af77202f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/8bd6db44da649dd6fdbc553d5d3c634af77202f2/maketarball.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
5357,
13332,
2589,
18,
8593,
2932,
9167,
30,
29796,
278,
23846,
306,
1589,
4279,
13,
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,... | [
1,
1,
1,
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,
1172,
5357,
13332,
2589,
18,
8593,
2932,
9167,
30,
29796,
278,
23846,
306,
1589,
4279,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
gen = RedirectGenerator(xmlFilename, namespaces, offset) | gen = RedirectGenerator(xmlFilename, namespaces, offset, moved_pages) | def main(): # read command line parameters # what the bot should do (either resolve double redirs, or delete broken # redirs) action = None # where the bot should get his infos from (either None to load the # maintenance special page from the live wiki, or the filename of a # local XML dump file) xmlFilename = None # Which namespace should be processed when using a XML dump # default to -1 which means all namespaces will be processed namespaces = [] # at which redirect shall we start searching double redirects again # (only with dump); default to -1 which means all redirects are checked offset = -1 always = False for arg in wikipedia.handleArgs(): if arg == 'double': action = 'double' elif arg == 'broken': action = 'broken' elif arg.startswith('-xml'): if len(arg) == 4: xmlFilename = wikipedia.input( u'Please enter the XML dump\'s filename: ') else: xmlFilename = arg[5:] elif arg.startswith('-namespace:'): try: namespaces.append(int(arg[11:])) except ValueError: namespaces.append(arg[11:]) elif arg.startswith('-offset:'): offset = int(arg[8:]) elif arg == '-always': always = True else: wikipedia.output(u'Unknown argument: %s' % arg) if not action: wikipedia.showHelp('redirect') else: gen = RedirectGenerator(xmlFilename, namespaces, offset) bot = RedirectRobot(action, gen, always) bot.run() | de6e626d0c58ba0a5dacbacc9addd266cc77d7d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/de6e626d0c58ba0a5dacbacc9addd266cc77d7d3/redirect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
855,
1296,
980,
1472,
468,
4121,
326,
2512,
1410,
741,
261,
73,
2927,
2245,
1645,
283,
8291,
16,
578,
1430,
12933,
468,
283,
8291,
13,
1301,
273,
599,
468,
1625,
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,
2774,
13332,
468,
855,
1296,
980,
1472,
468,
4121,
326,
2512,
1410,
741,
261,
73,
2927,
2245,
1645,
283,
8291,
16,
578,
1430,
12933,
468,
283,
8291,
13,
1301,
273,
599,
468,
1625,
326,
... |
groups = self.REQUEST.get('HTTP_KULPRIMONUMBER') | groups = self.REQUEST.get('HTTP_KULOUNUMBER') | def getGroupsForPrincipal(self, principal, request=None): """ get the group information from the REQUEST """ view_name = createViewName('getGroupsForPrincipal', principal.getId()) cached_info = self.ZCacheable_get(view_name) if cached_info is not None: return cached_info groups = [] authUser = getSecurityManager().getUser().name if authUser == principal.getId(): groups = self.REQUEST.get('HTTP_KULPRIMONUMBER') if groups: groups = groups.split(';') groups = tuple(groups) self.ZCacheable_set(groups, view_name) return groups | c0fdb9bbdd2f8489e5808e752abc21e6b7b5fe98 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5909/c0fdb9bbdd2f8489e5808e752abc21e6b7b5fe98/group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22708,
1290,
9155,
12,
2890,
16,
8897,
16,
590,
33,
7036,
4672,
3536,
336,
326,
1041,
1779,
628,
326,
12492,
3536,
1476,
67,
529,
273,
15193,
461,
2668,
588,
3621,
1290,
9155,
2187,
8897... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22708,
1290,
9155,
12,
2890,
16,
8897,
16,
590,
33,
7036,
4672,
3536,
336,
326,
1041,
1779,
628,
326,
12492,
3536,
1476,
67,
529,
273,
15193,
461,
2668,
588,
3621,
1290,
9155,
2187,
8897... |
seen[n[0]] = 1 | def getchangegroup(self, remote): m = self.changelog.nodemap search = [] fetch = [] seen = {} seenbranch = {} | 3832fb88ce2f811c47b456520408be17f4aae77b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/3832fb88ce2f811c47b456520408be17f4aae77b/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
3427,
1655,
12,
2890,
16,
2632,
4672,
312,
273,
365,
18,
24083,
12970,
18,
2159,
1458,
1623,
273,
5378,
2158,
273,
5378,
5881,
273,
2618,
5881,
7500,
273,
2618,
2,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3427,
1655,
12,
2890,
16,
2632,
4672,
312,
273,
365,
18,
24083,
12970,
18,
2159,
1458,
1623,
273,
5378,
2158,
273,
5378,
5881,
273,
2618,
5881,
7500,
273,
2618,
2,
-100,
-100,
-100,... | |
for mname, entrylist in Bindings.menudefs: menu = menudict.get(mname) if not menu: continue for entry in entrylist: if not entry: menu.add_separator() | tkversion = root.tk.eval('info patchlevel') if tkversion >= '8.4.14': Bindings.menudefs[0] = ('application', [ ('About IDLE', '<<about-idle>>'), None, ]) root.createcommand('::tk::mac::ShowPreferences', config_dialog) else: for mname, entrylist in Bindings.menudefs: menu = menudict.get(mname) if not menu: continue | def config_dialog(event=None): import configDialog configDialog.ConfigDialog(root, 'Settings') | 02fac48c8e64ef9d9635592db8d049f9f47a8ea4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/02fac48c8e64ef9d9635592db8d049f9f47a8ea4/macosxSupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
67,
12730,
12,
2575,
33,
7036,
4672,
1930,
642,
6353,
642,
6353,
18,
809,
6353,
12,
3085,
16,
296,
2628,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
642,
67,
12730,
12,
2575,
33,
7036,
4672,
1930,
642,
6353,
642,
6353,
18,
809,
6353,
12,
3085,
16,
296,
2628,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return self.map_algebraic_leaf(self, expr, *args, **kwargs) | return self.map_algebraic_leaf(expr, *args, **kwargs) | def map_call(self, expr, *args, **kwargs): return self.map_algebraic_leaf(self, expr, *args, **kwargs) | 09e43069cac10d8ab0821822fba140c7538c15b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12571/09e43069cac10d8ab0821822fba140c7538c15b2/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
1991,
12,
2890,
16,
3065,
16,
380,
1968,
16,
2826,
4333,
4672,
327,
365,
18,
1458,
67,
287,
29087,
335,
67,
12070,
12,
2890,
16,
3065,
16,
380,
1968,
16,
2826,
4333,
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,
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,
852,
67,
1991,
12,
2890,
16,
3065,
16,
380,
1968,
16,
2826,
4333,
4672,
327,
365,
18,
1458,
67,
287,
29087,
335,
67,
12070,
12,
2890,
16,
3065,
16,
380,
1968,
16,
2826,
4333,
13,
2,
... |
xelist[:-1] = ts[:] xelist[-1] = N.ceil(te) | xelist[:-1] = ts[:] - h xelist[-1] = N.floor(te.copy()/h)*h | def rkdriver_withks(vstart, simtstart, ts, te, allks, h, derivs): """Driver function for classical Runge Kutta 4th Order method. Starting at x1 and proceeding to x2 in nstep number of steps. Copes with multiple start times for different ks if they are sorted in terms of starting time.""" #set_trace() #Make sure h is specified if h is None: raise SimRunError("Need to specify h.") if allks is not None: if not isinstance(ts, N.ndarray): raise SimRunError("Need more than one start time for different k modes.") #Set up x results x1 = simtstart #Find simulation start time if not all(ts[ts.argsort()] == ts): raise SimRunError("ks not in order of start time.") #Sanity check xx = [] xx.append(x1) #Start x value #Set up start and end list for each section xslist = N.empty((len(ts)+1)) xslist[0] = simtstart xslist[1:] = ts[:] xelist = N.empty((len(ts)+1)) #create empty array (which will be written over) xelist[:-1] = ts[:] xelist[-1] = N.ceil(te) v = N.ones_like(vstart)*N.nan y = [] #start results list #First result is initial condition firstkix = N.where(x1>=ts)[0] for anix in firstkix: if N.any(N.isnan(v[:,anix])): v[:,anix] = vstart[:,anix] y.append(v.copy()) #Add first result #Need to start at different times for different k modes for xstart, xend in zip(xslist,xelist): #Set up initial values kix = N.where(xstart>=ts)[0] ks = allks[kix] for oneix in kix: if N.any(N.isnan(v[:,oneix])): v[:,oneix] = vstart[:,oneix] for x in N.arange(xstart, xend, h): dv = derivs(v[:,kix], x, ks) v[:,kix] = rk4stepks(x, v[:,kix], h, dv, ks, derivs) x = x + h xx.append(x.copy()) y.append(v.copy()) #Get results in right shape xx = N.array(xx) y = N.concatenate([y], 0) else: #No ks to iterate over nstep = N.ceil((te-ts)/h).astype(int) #Total number of steps to take xx = N.zeros(nstep+1) #initialize 1-dim array for x xx[0] = x = ts # set both first xx and x to ts v = vstart y = [v.copy()] #start results list ks = None for step in xrange(nstep): dv = derivs(v, x, ks) v = rk4stepks(x, v, h, dv, ks, derivs) x = xx[step+1] = x + h y.append(v.copy()) y = N.concatenate([y], 0) #Return results return xx, y | 94fd1819e64c8b94c68156c914db81ccd9b04828 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/94fd1819e64c8b94c68156c914db81ccd9b04828/rk4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28603,
7407,
67,
1918,
7904,
12,
90,
1937,
16,
3142,
88,
1937,
16,
3742,
16,
6489,
16,
777,
7904,
16,
366,
16,
9630,
87,
4672,
3536,
4668,
445,
364,
667,
1706,
1939,
908,
1475,
322,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28603,
7407,
67,
1918,
7904,
12,
90,
1937,
16,
3142,
88,
1937,
16,
3742,
16,
6489,
16,
777,
7904,
16,
366,
16,
9630,
87,
4672,
3536,
4668,
445,
364,
667,
1706,
1939,
908,
1475,
322,
... |
def tearDown(self): shutil.rmtree(self.path) | def tearDown(self): shutil.rmtree(self.path) | 8a0e74cdf5a9e11f9eb47b1154475dd6191d23b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12595/8a0e74cdf5a9e11f9eb47b1154475dd6191d23b0/test_dirdbm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
11060,
18,
86,
17371,
12,
2890,
18,
803,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
268,
2091,
4164,
12,
2890,
4672,
11060,
18,
86,
17371,
12,
2890,
18,
803,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
self.button_compute(cr, uid, ids, context={},set_total=True) | def action_move_create(self, cr, uid, ids, *args): ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') acc_obj = self.pool.get('account.account') for inv in self.browse(cr, uid, ids): if inv.move_id: continue self.button_compute(cr, uid, ids, context={},set_total=True) if inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0): raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe real total does not match the computed total.')) if not inv.date_invoice: self.write(cr, uid, [inv.id], {'date_invoice':time.strftime('%Y-%m-%d')}) company_currency = inv.company_id.currency_id.id # create the analytical lines line_ids = self.read(cr, uid, [inv.id], ['invoice_line'])[0]['invoice_line'] ils = self.pool.get('account.invoice.line').read(cr, uid, line_ids) # one move line per invoice line iml = self._get_analytic_lines(cr, uid, inv.id) # check if taxes are all computed compute_taxes = ait_obj.compute(cr, uid, inv.id) if not inv.tax_line: for tax in compute_taxes.values(): ait_obj.create(cr, uid, tax) else: tax_key = [] for tax in inv.tax_line: if tax.manual: continue key = (tax.tax_code_id.id, tax.base_code_id.id, tax.account_id.id) tax_key.append(key) if not key in compute_taxes: raise osv.except_osv(_('Warning !'), _('Global taxes defined, but not in invoice lines !')) base = compute_taxes[key]['base'] if abs(base - tax.base) > inv.company_id.currency_id.rounding: raise osv.except_osv(_('Warning !'), _('Tax base different !\nClick on compute to update tax base')) for key in compute_taxes: if not key in tax_key: raise osv.except_osv(_('Warning !'), _('Taxes missing !')) | 1babad50c2aa1b3a5aa960eeeef41754cc6698cc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/1babad50c2aa1b3a5aa960eeeef41754cc6698cc/invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
8501,
67,
2640,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
279,
305,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
16119,
18,
8066,
6134,
662,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
8501,
67,
2640,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
279,
305,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
16119,
18,
8066,
6134,
662,
67... | |
prefixes = ["/usr/lib", "/usr/local/lib", "/usr/lib64", "/usr/local/lib64", os.path.join(defs.PREFIX, "lib"), os.path.expanduser("~/.config")] | prefixes = ["/usr/lib", "/usr/local/lib", "/usr/lib64", "/usr/local/lib64"] install_prefix = os.path.join(defs.PREFIX, "lib") if install_prefix not in prefixes: prefixes.append(install_prefix) prefixes.append(os.path.expanduser("~/.config")) | def load_applets (self): self.make_appmodel () model = self.appmodel | 2fe9511282caa896151f16b0b3c4d40bbc5ec0b6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8416/2fe9511282caa896151f16b0b3c4d40bbc5ec0b6/awnApplet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
438,
20773,
261,
2890,
4672,
365,
18,
6540,
67,
2910,
2284,
1832,
938,
273,
365,
18,
2910,
2284,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
438,
20773,
261,
2890,
4672,
365,
18,
6540,
67,
2910,
2284,
1832,
938,
273,
365,
18,
2910,
2284,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if not self.ssh.CopyFileToNode(node, fname): | result = rpc.call_upload_file([node], fname) if not result[node]: | def Exec(self, feedback_fn): """Adds the new node to the cluster. | b5602d15cb500f8e5adc82563428fbea739e01e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/b5602d15cb500f8e5adc82563428fbea739e01e3/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3889,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
3655,
326,
394,
756,
358,
326,
2855,
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,
... | [
1,
1,
1,
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,
3889,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
3655,
326,
394,
756,
358,
326,
2855,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
shutdownData = self._evsys.receive(self._topic, self._timeout) while self._parent.isRunning() and shutdownData is None: | shutdownEvent = self._evsys.receiveEvent(self._topic, self._timeout) while self._parent.isRunning() and shutdownEvent is None: | def run(self): self._parent.logger.log(Log.DEBUG, "listening for shutdown event at %s s intervals" % self._pollintv) | 6744251e76af4ff8173b82a66826d28f4d2e4803 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6549/6744251e76af4ff8173b82a66826d28f4d2e4803/ProductionRunManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
365,
6315,
2938,
18,
4901,
18,
1330,
12,
1343,
18,
9394,
16,
315,
18085,
310,
364,
5731,
871,
622,
738,
87,
272,
10389,
6,
738,
365,
6315,
3915,
5671,
90,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
365,
6315,
2938,
18,
4901,
18,
1330,
12,
1343,
18,
9394,
16,
315,
18085,
310,
364,
5731,
871,
622,
738,
87,
272,
10389,
6,
738,
365,
6315,
3915,
5671,
90,
13,
2... |
if opts.fmt == 'mobi' and opts.output_profile.startswith("kindle"): | if opts.fmt == 'mobi' and opts.output_profile and opts.output_profile.startswith("kindle"): | def run(self, path_to_output, opts, db, notification=DummyReporter()): from calibre.utils.logging import Log | 4153a4e6471f22fecb873361b498b0946bd9c830 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/4153a4e6471f22fecb873361b498b0946bd9c830/catalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
589,
67,
869,
67,
2844,
16,
1500,
16,
1319,
16,
3851,
33,
20094,
13289,
1435,
4672,
628,
26139,
266,
18,
5471,
18,
11167,
1930,
1827,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
589,
67,
869,
67,
2844,
16,
1500,
16,
1319,
16,
3851,
33,
20094,
13289,
1435,
4672,
628,
26139,
266,
18,
5471,
18,
11167,
1930,
1827,
2,
-100,
-100,
-100,
-100,
-10... |
computed_taxes = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit, line.qty)['taxes'] for tax in computed_taxes: tax_amount += tax['amount'] if line.discount!=0.0: res[line.id][f] = line.price_unit * line.qty * (1 - (line.discount or 0.0) / 100.0) else: res[line.id][f] = line.price_unit * line.qty res[line.id][f] += tax_amount | price = line.price_unit * (1 - (line.discount or 0.0) / 100.0) computed_taxes = account_tax_obj.compute_all(cr, uid, taxes, price, line.qty) cur = line.order_id.pricelist_id.currency_id res[line.id][f] = self.pool.get('res.currency').round(cr, uid, cur, computed_taxes['total']) | def _amount_line_all(self, cr, uid, ids, field_names, arg, context): res = dict([(i, {}) for i in ids]) account_tax_obj = self.pool.get('account.tax') | 928d674dae1a25a5664fdabaa4fb2c374ca83d2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/928d674dae1a25a5664fdabaa4fb2c374ca83d2e/point_of_sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
67,
1369,
67,
454,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
1973,
16,
1501,
16,
819,
4672,
400,
273,
2065,
3816,
12,
77,
16,
2618,
13,
364,
277,
316,
3258,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
67,
1369,
67,
454,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
1973,
16,
1501,
16,
819,
4672,
400,
273,
2065,
3816,
12,
77,
16,
2618,
13,
364,
277,
316,
3258,
5... |
"WHERE time >= %s AND time < %s ORDER BY time", | "WHERE time >= %s AND time < %s ORDER BY time, rev DESC", | def get_changesets(self, start, stop): cursor = self.db.cursor() cursor.execute("SELECT rev FROM revision " "WHERE time >= %s AND time < %s ORDER BY time", (to_timestamp(start), to_timestamp(stop))) for rev, in cursor: try: if self.authz.has_permission_for_changeset(rev): yield self.get_changeset(rev) except NoSuchChangeset: pass # skip changesets currently being resync'ed | ccfea8017b255e56d31aaf7b5d2a40840884bcb5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/ccfea8017b255e56d31aaf7b5d2a40840884bcb5/cache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
6329,
2413,
12,
2890,
16,
787,
16,
2132,
4672,
3347,
273,
365,
18,
1966,
18,
9216,
1435,
3347,
18,
8837,
2932,
4803,
5588,
4571,
6350,
315,
315,
12299,
813,
1545,
738,
87,
411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6329,
2413,
12,
2890,
16,
787,
16,
2132,
4672,
3347,
273,
365,
18,
1966,
18,
9216,
1435,
3347,
18,
8837,
2932,
4803,
5588,
4571,
6350,
315,
315,
12299,
813,
1545,
738,
87,
411... |
z = self.gp().eval('Lseries(%s,,%s)'%(a,k-1)) if 'pole' in z: raise ArithmeticError, z elif 'Warning' in z: i = z.rfind('\n') msg = z[:i].replace('digits','decimal digits') | try: z = self.gp()('Vec(Lseries(%s,,%s))'%(a,k-1)) except TypeError, msg: raise RuntimeError, "%s\nUnable to compute Taylor expansion (try lowering the number of terms)"%msg r = repr(z) if 'pole' in r: raise ArithmeticError, r elif 'Warning' in r: i = r.rfind('\n') msg = r[:i].replace('digits','decimal digits') | def taylor_series(self, a=0, k=6, var='z'): """ Return the first k terms of the Taylor series expansion of the $L$-series about $a$. | 0b640327ada5fe8c86a2e457552d9cb350764b4d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/0b640327ada5fe8c86a2e457552d9cb350764b4d/dokchitser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
67,
10222,
12,
2890,
16,
279,
33,
20,
16,
417,
33,
26,
16,
569,
2218,
94,
11,
4672,
3536,
2000,
326,
1122,
417,
6548,
434,
326,
399,
528,
80,
280,
4166,
17965,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
67,
10222,
12,
2890,
16,
279,
33,
20,
16,
417,
33,
26,
16,
569,
2218,
94,
11,
4672,
3536,
2000,
326,
1122,
417,
6548,
434,
326,
399,
528,
80,
280,
4166,
17965,
4... |
numKeysLeft = len(keys) nextObjRef = None | numKeysLeft = len(keys) + 1 | def run(self): try: while True: # yield up here instead of at the end, since we skip back to the # top of the while loop from various points yield None #import pdb;pdb.set_trace() curObj = None if self._curObjRef is None: self._curObjRef = self._baseObjRef try: for result in self._curObjRef.getContainer(): yield None curObj = result except: self.notify.debug('lost current container: %s' % self._curObjRef) # that container is gone, try again self._curObjRef = None continue self.notify.debug('--> %s' % self._curObjRef) | d9560fa19bec29d4ea08e0b58cd1b7384659f9ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/d9560fa19bec29d4ea08e0b58cd1b7384659f9ff/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
775,
30,
1323,
1053,
30,
468,
2824,
731,
2674,
3560,
434,
622,
326,
679,
16,
3241,
732,
2488,
1473,
358,
326,
468,
1760,
434,
326,
1323,
2798,
628,
11191,
3143,
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,
1086,
12,
2890,
4672,
775,
30,
1323,
1053,
30,
468,
2824,
731,
2674,
3560,
434,
622,
326,
679,
16,
3241,
732,
2488,
1473,
358,
326,
468,
1760,
434,
326,
1323,
2798,
628,
11191,
3143,
2... |
self.body_pre_docinfo + self.docinfo + self.bodyContent + | self.body_pre_docinfo + self.docinfo + self.bodyContent + self.bodySuffix + | def astext(self): return ''.join([DocArticleText.contentStart, DocArticleText.headerStart] + self.headerContent + [DocArticleText.headerEnd, DocArticleText.bodyStart] + self.body_pre_docinfo + self.docinfo + self.bodyContent + [DocArticleText.bodyEnd, DocArticleText.contentEnd]) | b2e39b873a497ced8a1470204e7ded3bf23c12bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/b2e39b873a497ced8a1470204e7ded3bf23c12bb/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3364,
408,
12,
2890,
4672,
327,
875,
18,
5701,
3816,
1759,
7880,
1528,
18,
1745,
1685,
16,
3521,
7880,
1528,
18,
3374,
1685,
65,
397,
365,
18,
3374,
1350,
397,
306,
1759,
7880,
1528,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3364,
408,
12,
2890,
4672,
327,
875,
18,
5701,
3816,
1759,
7880,
1528,
18,
1745,
1685,
16,
3521,
7880,
1528,
18,
3374,
1685,
65,
397,
365,
18,
3374,
1350,
397,
306,
1759,
7880,
1528,
1... |
zfile = gzip.GzipFile(os.path.join(job.outputdir,'stderr.gz' )) | zfile = os.popen('zcat '+os.path.join(job.outputdir,'stderr.gz' )) | def collectStats(self): """Collect job statistics from different log files and fill dict Athena.stats""" import gzip, time, fileinput from Ganga.GPIDev.Lib.Job import Job job = self.getJobObject() | 748381bb0d116dbfdf831cccab99070c274aefd6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/748381bb0d116dbfdf831cccab99070c274aefd6/Athena.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3274,
4195,
12,
2890,
4672,
3536,
10808,
1719,
7691,
628,
3775,
613,
1390,
471,
3636,
2065,
432,
15991,
69,
18,
5296,
8395,
1930,
10331,
16,
813,
16,
585,
2630,
628,
611,
539,
69,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3274,
4195,
12,
2890,
4672,
3536,
10808,
1719,
7691,
628,
3775,
613,
1390,
471,
3636,
2065,
432,
15991,
69,
18,
5296,
8395,
1930,
10331,
16,
813,
16,
585,
2630,
628,
611,
539,
69,
18,
... |
print "\n%s" % e.stderr.strip() | options.stdout.write('\n%s\n' % e.stderr.strip()) | def _AttemptRebase(self, upstream, files, verbose=False, newbase=None, branch=None, printed_path=False): """Attempt to rebase onto either upstream or, if specified, newbase.""" files.extend(self._Run(['diff', upstream, '--name-only']).split()) revision = upstream if newbase: revision = newbase if not printed_path: print "\n_____ %s : Attempting rebase onto %s..." % (self.relpath, revision) printed_path = True else: print "Attempting rebase onto %s..." % revision | e603c688da503d6a6db9690684aa49a1b2a54706 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/e603c688da503d6a6db9690684aa49a1b2a54706/gclient_scm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7744,
426,
1969,
12,
2890,
16,
13505,
16,
1390,
16,
3988,
33,
8381,
16,
394,
1969,
33,
7036,
16,
3803,
33,
7036,
16,
14099,
67,
803,
33,
8381,
4672,
3536,
7744,
358,
283,
1969,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7744,
426,
1969,
12,
2890,
16,
13505,
16,
1390,
16,
3988,
33,
8381,
16,
394,
1969,
33,
7036,
16,
3803,
33,
7036,
16,
14099,
67,
803,
33,
8381,
4672,
3536,
7744,
358,
283,
1969,
... |
yield appdir + f, section, summary | yield os.path.join(appdir, f), section, summary | def output_files_gen(): for f in os.listdir(appdir): if 'output' in f and not '_pending' in f: m = re.search('output_(.*?)\.txt', f) if m: tag = m.group(1) else: tag = '_default' section_name_and_summary = wikipedia.translate(wikipedia.getSite(), msg_table)[tag] section = section_name_and_summary[0] summary = section_name_and_summary[1] yield appdir + f, section, summary | ee560014eadb0f06b6e83506babde39a58b65eed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/ee560014eadb0f06b6e83506babde39a58b65eed/copyright_put.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
2354,
67,
4507,
13332,
364,
284,
316,
1140,
18,
1098,
1214,
12,
2910,
1214,
4672,
309,
296,
2844,
11,
316,
284,
471,
486,
2070,
9561,
11,
316,
284,
30,
312,
273,
283,
18,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
2354,
67,
4507,
13332,
364,
284,
316,
1140,
18,
1098,
1214,
12,
2910,
1214,
4672,
309,
296,
2844,
11,
316,
284,
471,
486,
2070,
9561,
11,
316,
284,
30,
312,
273,
283,
18,
30... |
cfg.set(section_name, "publisher", "True") cfg.set(section_name, "url", share.getLocation()) | cfg[section_name][u"publisher"] = u"True" cfg[section_name][u"url"] = share.getLocation() | def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account" counter = 1 for account in sharing.WebDAVAccount.iterItems(rv): if account.username: # skip account if not configured section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "webdav account") cfg.set(section_name, "uuid", account.itsUUID) cfg.set(section_name, "title", account.displayName) cfg.set(section_name, "host", account.host) cfg.set(section_name, "path", account.path) cfg.set(section_name, "username", account.username) cfg.set(section_name, "password", account.password) cfg.set(section_name, "port", account.port) cfg.set(section_name, "usessl", account.useSSL) if account is currentAccount: cfg.set(section_name, "default", "True") counter += 1 # Subscriptions mine = schema.ns("osaf.pim", rv).mine section_prefix = "share" counter = 1 for col in pim.ContentCollection.iterItems(rv): share = sharing.getShare(col) if share: section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "share") cfg.set(section_name, "title", share.contents.displayName) cfg.set(section_name, "mine", col in mine.sources) uc = usercollections.UserCollection(col) if getattr(uc, "color", False): color = uc.color cfg.set(section_name, "red", color.red) cfg.set(section_name, "green", color.green) cfg.set(section_name, "blue", color.blue) cfg.set(section_name, "alpha", color.alpha) urls = sharing.getUrls(share) if sharing.isSharedByMe(share): cfg.set(section_name, "publisher", "True") cfg.set(section_name, "url", share.getLocation()) else: cfg.set(section_name, "publisher", "False") url = share.getLocation() cfg.set(section_name, "url", url) if url != urls[0]: cfg.set(section_name, "ticket", urls[0]) ticketFreeBusy = getattr(share.conduit, "ticketFreeBusy", None) if ticketFreeBusy: cfg.set(section_name, "freebusy", "True") counter += 1 # SMTP accounts section_prefix = "smtp_account" counter = 1 for account in pim.mail.SMTPAccount.iterItems(rv): if account.isActive and account.host: section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "smtp account") cfg.set(section_name, "uuid", account.itsUUID) cfg.set(section_name, "title", account.displayName) cfg.set(section_name, "host", account.host) cfg.set(section_name, "auth", account.useAuth) cfg.set(section_name, "username", account.username) cfg.set(section_name, "password", account.password) cfg.set(section_name, "name", account.fromAddress.fullName) cfg.set(section_name, "address", account.fromAddress.emailAddress) cfg.set(section_name, "port", account.port) cfg.set(section_name, "security", account.connectionSecurity) counter += 1 # IMAP accounts currentAccount = schema.ns("osaf.pim", rv).currentMailAccount.item section_prefix = "imap_account" counter = 1 for account in pim.mail.IMAPAccount.iterItems(rv): if account.isActive and account.host: section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "imap account") cfg.set(section_name, "uuid", account.itsUUID) cfg.set(section_name, "title", account.displayName) cfg.set(section_name, "host", account.host) cfg.set(section_name, "username", account.username) cfg.set(section_name, "password", account.password) cfg.set(section_name, "name", account.replyToAddress.fullName) cfg.set(section_name, "address", account.replyToAddress.emailAddress) cfg.set(section_name, "port", account.port) cfg.set(section_name, "security", account.connectionSecurity) if account.defaultSMTPAccount: cfg.set(section_name, "smtp", account.defaultSMTPAccount.itsUUID) if account is currentAccount: cfg.set(section_name, "default", "True") counter += 1 # POP accounts currentAccount = schema.ns("osaf.pim", rv).currentMailAccount.item section_prefix = "pop_account" counter = 1 for account in pim.mail.POPAccount.iterItems(rv): if account.isActive and account.host: section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "pop account") cfg.set(section_name, "uuid", account.itsUUID) cfg.set(section_name, "title", account.displayName) cfg.set(section_name, "host", account.host) cfg.set(section_name, "username", account.username) cfg.set(section_name, "password", account.password) cfg.set(section_name, "name", account.replyToAddress.fullName) cfg.set(section_name, "address", account.replyToAddress.emailAddress) cfg.set(section_name, "port", account.port) cfg.set(section_name, "security", account.connectionSecurity) cfg.set(section_name, "leave", account.leaveOnServer) if account.defaultSMTPAccount: cfg.set(section_name, "smtp", account.defaultSMTPAccount.itsUUID) if account is currentAccount: cfg.set(section_name, "default", "True") counter += 1 # Show timezones cfg.add_section("timezones") showTZ = schema.ns("osaf.app", rv).TimezonePrefs.showUI cfg.set("timezones", "type", "show timezones") cfg.set("timezones", "show_timezones", showTZ) # Visible hours cfg.add_section("visible_hours") cfg.set("visible_hours", "type", "visible hours") calPrefs = schema.ns("osaf.framework.blocks.calendar", rv).calendarPrefs cfg.set("visible_hours", "height_mode", calPrefs.hourHeightMode) cfg.set("visible_hours", "num_hours", calPrefs.visibleHours) # Event Logger cfg.add_section("event_logger") eventHook = schema.ns("eventLogger", rv).EventLoggingHook cfg.set("event_logger", "type", "event logger") active = eventHook.logging cfg.set("event_logger", "active", active) output = file(filename, "w") cfg.write(output) output.close() | 5fcc26e162e0c42f8a4ee0116787795eb4f10175 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5fcc26e162e0c42f8a4ee0116787795eb4f10175/settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
4962,
16,
1544,
4672,
3536,
4755,
3170,
1947,
1779,
16,
6508,
777,
21001,
9484,
471,
24123,
261,
3350,
2437,
9487,
578,
16445,
3631,
358,
392,
2120,
45,
585,
8395,
225,
2776,
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,
1923,
12,
4962,
16,
1544,
4672,
3536,
4755,
3170,
1947,
1779,
16,
6508,
777,
21001,
9484,
471,
24123,
261,
3350,
2437,
9487,
578,
16445,
3631,
358,
392,
2120,
45,
585,
8395,
225,
2776,
2... |
item = QtGui.QTableWidgetItem('%d'%(100*stats.njobs/totalJobs)) | item = QtGui.QTableWidgetItem('%.2f'%(100*stats.njobs/totalJobs)) | def updateTable(self, statsDict=None): if statsDict is None: statsDict = self.server.get_stats() | 9cbc17771151f6601f319c309053c27bdfe88556 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14949/9cbc17771151f6601f319c309053c27bdfe88556/ppjobstats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
1388,
12,
2890,
16,
3177,
5014,
33,
7036,
4672,
309,
3177,
5014,
353,
599,
30,
3177,
5014,
273,
365,
18,
3567,
18,
588,
67,
5296,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
1388,
12,
2890,
16,
3177,
5014,
33,
7036,
4672,
309,
3177,
5014,
353,
599,
30,
3177,
5014,
273,
365,
18,
3567,
18,
588,
67,
5296,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def createTableSQL(cls, createJoinTables=True): sql = cls._connection.createTableSQL(cls) | def createTableSQL(cls, createJoinTables=True, connection=None): conn = connection or cls._connection sql = conn.createTableSQL(cls) | def createTableSQL(cls, createJoinTables=True): sql = cls._connection.createTableSQL(cls) if createJoinTables: sql += '\n' + cls.createJoinTablesSQL() return sql | 5095cfa4c32001226e31b16fc79027c429b12d8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/5095cfa4c32001226e31b16fc79027c429b12d8b/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19565,
3997,
12,
6429,
16,
752,
4572,
6905,
33,
5510,
16,
1459,
33,
7036,
4672,
1487,
273,
1459,
578,
2028,
6315,
4071,
1847,
273,
1487,
18,
2640,
1388,
3997,
12,
6429,
13,
309,
752,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19565,
3997,
12,
6429,
16,
752,
4572,
6905,
33,
5510,
16,
1459,
33,
7036,
4672,
1487,
273,
1459,
578,
2028,
6315,
4071,
1847,
273,
1487,
18,
2640,
1388,
3997,
12,
6429,
13,
309,
752,
4... |
segment.segment_def_id AND \ | segment.segment_def_id AND segment_definer.name = Science \ | def getSciSegs(serverURL="ldbd://metaserver.phy.syr.edu:30015", ifo=None, gpsStart=None, gpsStop=None, cut=bool(False)): """ This method is designed to query the server specified by SERVERURL. The method will return the segments that are between and overlaping with the variable gpsStart and gpsStop. If the flag cut is specified to be True then the returned lists will be cut so that the times are between gpsStart and gpsStop inclusive. In addition to these required arguments you must also specify in a text string the IFO of interest. Valid entries are L1 H1 V1 , but only one IFO at a time can be specified. """ if sum([x==None for x in (ifo,gpsStart,gpsStop)])>0: os.stderr.write("Invalid arguments given to getSciSegs.\n") return None ifo=ifo.strip() queryString="SELECT \ segment_definer.ifos,segment_definer.name,\ | f96b2207d24da8314cd28e532c364d18d4d0ba98 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/f96b2207d24da8314cd28e532c364d18d4d0ba98/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
8450,
1761,
564,
12,
3567,
1785,
1546,
1236,
16410,
2207,
10578,
345,
12330,
18,
844,
93,
18,
9009,
86,
18,
28049,
30,
19249,
3600,
3113,
21479,
33,
7036,
16,
20985,
1685,
33,
7036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
8450,
1761,
564,
12,
3567,
1785,
1546,
1236,
16410,
2207,
10578,
345,
12330,
18,
844,
93,
18,
9009,
86,
18,
28049,
30,
19249,
3600,
3113,
21479,
33,
7036,
16,
20985,
1685,
33,
7036... |
usel = SelectUser() usel.setUsers(userlist) leftbox.pack_start(usel, False) | self.usel = SelectUser() self.usel.setUsers(userlist) leftbox.pack_start(self.usel, False) | def __init__(self, userlist): gtk.HBox.__init__(self, spacing=20) self.set_border_width(10) | d654e933ed048410fe4bbe162fed7ffafad09179 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2375/d654e933ed048410fe4bbe162fed7ffafad09179/luser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
26860,
4672,
22718,
18,
44,
3514,
16186,
2738,
972,
12,
2890,
16,
13259,
33,
3462,
13,
365,
18,
542,
67,
8815,
67,
2819,
12,
2163,
13,
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,
1001,
2738,
972,
12,
2890,
16,
26860,
4672,
22718,
18,
44,
3514,
16186,
2738,
972,
12,
2890,
16,
13259,
33,
3462,
13,
365,
18,
542,
67,
8815,
67,
2819,
12,
2163,
13,
2,
-100,
-100,
-... |
if not self.flat: node = self.get_node(tid) nc = self.node_n_children(node) i = 0 while i < nc: ch = self.node_nth_child(node,i) chid = ch.get_id() if chid in self.virtual_root: self.__root_update(chid,False) i += 1 | children_update = True | def __root_update(self,tid,inroot): if inroot: if tid not in self.virtual_root: self.virtual_root.append(tid) #We will also update the children of that node if not self.flat: node = self.get_node(tid) nc = self.node_n_children(node) i = 0 while i < nc: ch = self.node_nth_child(node,i) chid = ch.get_id() if chid in self.virtual_root: #the child was in the VR. It should not be #because its parent is in now self.__root_update(chid,False) i += 1 else: if tid in self.virtual_root: self.virtual_root.remove(tid) | fd9c9798734866b6b9909d8f114bf9c5905e42e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/fd9c9798734866b6b9909d8f114bf9c5905e42e3/filteredtree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3085,
67,
2725,
12,
2890,
16,
18081,
16,
267,
3085,
4672,
309,
316,
3085,
30,
309,
11594,
486,
316,
365,
18,
12384,
67,
3085,
30,
365,
18,
12384,
67,
3085,
18,
6923,
12,
18081,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3085,
67,
2725,
12,
2890,
16,
18081,
16,
267,
3085,
4672,
309,
316,
3085,
30,
309,
11594,
486,
316,
365,
18,
12384,
67,
3085,
30,
365,
18,
12384,
67,
3085,
18,
6923,
12,
18081,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.