rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
searchList = [{ 'tasks': tasks_str}]))
searchList = [parameters_dict]))
def export_generate(self): #Template loading and cutting if self.export_all_active.get_active(): #Export the active tasks in the current view (the ones visible in # the Task Browser model = self.plugin_api.get_task_modelsort() tasks_str = self.treemodel_to_TaskStr(model, model.get_iter_first()) elif self.export_finished_last_week.get_active() or \ self.export_all_finished.get_active(): #Export done tasks model = self.plugin_api.get_ctask_modelsort() #Step 1: # Generate the list of task_ids in the current browser view (if a # tag is selected, only the closed task with that tag will be #visible task_iter = model.get_iter_first() tids_list = [] while task_iter: task = model.get_value(task_iter, 1) # tagtree.COL_OBJ) task_iter = model.iter_next(task_iter) tids_list.append(task.get_id()) #Step 2: #Create the task list with all the root {"Done", "Dismissed"} #tasks, that is all the tasks whose parents' status is not one of #those, or which simply have no parent task_iter = model.get_iter_first() tids_set = set(tids_list) tasks_list = [] while task_iter: task = model.get_value(task_iter, 1) # tagtree.COL_OBJ) task_iter = model.iter_next(task_iter) if tids_set.isdisjoint(set(task.get_parents())): if task.get_status() == task.STA_DONE: tasks_list.append(task) if self.export_finished_last_week.get_active(): timespan = -7 else: timespan = None tasks_str = self.taskslist_to_TaskStr(tasks_list, timespan)
c09ecc741f6a8eac08afac2dc2bf567af6085136 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/c09ecc741f6a8eac08afac2dc2bf567af6085136/export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 7163, 12, 2890, 4672, 468, 2283, 7153, 471, 6391, 1787, 309, 365, 18, 6530, 67, 454, 67, 3535, 18, 588, 67, 3535, 13332, 468, 6144, 326, 2695, 4592, 316, 326, 783, 1476, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 7163, 12, 2890, 4672, 468, 2283, 7153, 471, 6391, 1787, 309, 365, 18, 6530, 67, 454, 67, 3535, 18, 588, 67, 3535, 13332, 468, 6144, 326, 2695, 4592, 316, 326, 783, 1476, 261,...
self.wolves_locked = 1
self.reply("Your decision is acknowledged.", from_private)
def kill(self, from_private, who): "Allow a werewolf to express intent to 'kill' somebody."
cf22a0bbd4d425772144825ce47bed9a688b4025 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3953/cf22a0bbd4d425772144825ce47bed9a688b4025/wolfbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 12, 2890, 16, 628, 67, 1152, 16, 10354, 4672, 315, 7009, 279, 22646, 359, 355, 74, 358, 16947, 10376, 358, 296, 16418, 11, 2690, 3432, 1199, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 8673, 12, 2890, 16, 628, 67, 1152, 16, 10354, 4672, 315, 7009, 279, 22646, 359, 355, 74, 358, 16947, 10376, 358, 296, 16418, 11, 2690, 3432, 1199, 2, -100, -100, -100, -100, -100, -100, ...
try: self.other - self.set self.fail("expected TypeError") except TypeError: pass try: self.set - self.other self.fail("expected TypeError") except TypeError: pass
self.assertRaises(TypeError, lambda: self.set - self.other) self.assertRaises(TypeError, lambda: self.other - self.set)
def test_difference(self): try: self.other - self.set self.fail("expected TypeError") except TypeError: pass try: self.set - self.other self.fail("expected TypeError") except TypeError: pass
6cca754c2085e4eb203855b7d67df4a11ff0f534 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6cca754c2085e4eb203855b7d67df4a11ff0f534/test_sets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 23444, 12, 2890, 4672, 775, 30, 365, 18, 3011, 300, 365, 18, 542, 365, 18, 6870, 2932, 3825, 3580, 7923, 1335, 3580, 30, 1342, 775, 30, 365, 18, 542, 300, 365, 18, 3011, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 23444, 12, 2890, 4672, 775, 30, 365, 18, 3011, 300, 365, 18, 542, 365, 18, 6870, 2932, 3825, 3580, 7923, 1335, 3580, 30, 1342, 775, 30, 365, 18, 542, 300, 365, 18, 3011, 36...
project =self.launchpad.projects[project]
project = self.launchpad.projects[project]
def getProject(self, project): project =self.launchpad.projects[project] return project
f90f8882d899529c1fced87490de5125e459331d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/f90f8882d899529c1fced87490de5125e459331d/crm_lp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11080, 12, 2890, 16, 1984, 4672, 1984, 273, 365, 18, 20738, 6982, 18, 13582, 63, 4406, 65, 327, 1984, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11080, 12, 2890, 16, 1984, 4672, 1984, 273, 365, 18, 20738, 6982, 18, 13582, 63, 4406, 65, 327, 1984, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
price = sale_price(product)
price = untaxed_sale_price(product)
def taxed_sale_price(product): """Returns the product unit price with the best auto discount applied and taxes included.""" taxer = satchmo_tax._get_taxprocessor() price = sale_price(product) price = price + taxer.by_price(product.taxClass, price) return price
31c1c4c1bfeb852b04c10c2dca8c0b3491367dd0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13656/31c1c4c1bfeb852b04c10c2dca8c0b3491367dd0/satchmo_discounts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5320, 329, 67, 87, 5349, 67, 8694, 12, 5896, 4672, 3536, 1356, 326, 3017, 2836, 6205, 598, 326, 3796, 3656, 12137, 6754, 471, 5320, 281, 5849, 12123, 5320, 264, 273, 272, 505, 8683, 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, 5320, 329, 67, 87, 5349, 67, 8694, 12, 5896, 4672, 3536, 1356, 326, 3017, 2836, 6205, 598, 326, 3796, 3656, 12137, 6754, 471, 5320, 281, 5849, 12123, 5320, 264, 273, 272, 505, 8683, 67, ...
next_action = '' if action_score != -1 and last_step == 1: next_action = Propose_Next_Action(doctype, action_score, access, current_level, indir) if last_step == 1: if uid_email != "" and uid_email != "guest" and rn != "": submission_exists = \ submission_exists_in_log(doctype, act, access, uid_email) if submission_exists == 1: update_submission_reference_and_status_in_log(doctype, act, access, uid_email, rn, "finished") else: log_new_completed_submission(doctype, act, access, uid_email, rn)
else: if action_score != -1 and last_step == 1: next_action = Propose_Next_Action(doctype, \ action_score, \ access, \ current_level, \ indir) if last_step == 1: if uid_email != "" and uid_email != "guest" and rn != "": submission_exists = \ submission_exists_in_log(doctype, act, access, uid_email) if submission_exists == 1: update_submission_reference_and_status_in_log(doctype, \ act, \ access, \ uid_email, \ rn, \ "finished") else: log_new_completed_submission(doctype, \ act, \ access, \ uid_email, \ rn)
def endaction(req, c=cdsname, ln=cdslang, doctype="", act="", startPg=1, indir="", access="", mainmenu="", fromdir="", file="", nextPg="", nbPg="", curpage=1, step=1, mode="U"): """Having filled-in the WebSubmit form created for metadata by the interface function, the user clicks a button to either "finish the submission" or to "proceed" to the next stage of the submission. At this point, a variable called "step" will be given a value of 1 or above, which means that this function is called by websubmit_webinterface. So, during all non-zero steps of the submission, this function is called. In other words, this function is called during the BACK-END phase of a submission, in which WebSubmit *functions* are being called. The function first ensures that all of the WebSubmit form field values have been saved in the current working submission directory, in text- files with the same name as the field elements have. It then determines the functions to be called for the given step of the submission, and executes them. Following this, if this is the last step of the submission, it logs the submission as "finished" in the journal of submissions. @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: @param file: @param nextPg: @param nbPg: @param curpage: (integer) - the current submission page number. Defaults to 1. @param step: (integer) - the current step of the submission. Defaults to 1. @param mode: """ global rn, sysno, dismode, curdir, uid, uid_email, last_step, action_score # load the right message language _ = gettext_set_language(ln) try: rn except NameError: rn = "" dismode = mode ln = wash_language(ln) sys.stdout = req t = "" # get user ID: try: uid = getUid(req) uid_email = get_email(uid) except Error, e: return errorMsg(e, req, c, ln) # 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) ## 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) ## retrieve the action and doctype data 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) # The following words are reserved and should not be used as field names reserved_words = ["stop", "file", "nextPg", "startPg", "access", "curpage", "nbPg", "act", \ "indir", "doctype", "mode", "step", "deleted", "file_path", "userfile_name"] # This defines the path to the directory containing the action data curdir = "%s/%s/%s/%s" % (storage, indir, doctype, access) # If the submission directory still does not exist, we create it if not os.path.exists(curdir): try: os.makedirs(curdir) except: return errorMsg(_("Cannot create submission directory."), req, c, ln) # retrieve the original main menu url ans 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,) ## 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 = "" # Now we test whether the user has already completed the action and # reloaded the page (in this case we don't want the functions to be called # once again # reloaded = Test_Reload(uid_email,doctype,act,access) # if the action has been completed #if reloaded: # return warningMsg("<b> Sorry, this action has already been completed. Please go back to the main menu to start a new action.</b>",req) ## Determine whether the action is finished ## (ie there are no other steps after the current one): finished = function_step_is_last(doctype, act, step) # 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"): if not os.path.exists("%s/files/%s" % (curdir, key)): try: os.makedirs("%s/files/%s" % (curdir, key)) except: return errorMsg("can't create submission directory", req, cdsname, 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 ## we 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) ## 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(" ", "&nbsp;") 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(" ", "&nbsp;") else: ## Unknown action: return errorMsg(_("Unknown action"), req, c, ln) ## Get the number of pages for this submission: subname = "%s%s" % (act, doctype) 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, cdsname, ln) ## Determine whether the action is finished ## (ie there are no other steps after the current one): last_step = function_step_is_last(doctype, act, step) # Prints the action details, returning the mandatory score action_score = action_details(doctype, act) current_level = get_level(doctype, act) # Calls all the function's actions function_content = '' try: function_content = print_function_calls(doctype=doctype, action=act, step=step, form=form, ln=ln) except functionError,e: return errorMsg(e.value, req, c, ln) except functionStop,e: if e.value is not None: function_content = e.value else: function_content = e # If the action was mandatory we propose the next mandatory action (if any) next_action = '' if action_score != -1 and last_step == 1: next_action = Propose_Next_Action(doctype, action_score, access, current_level, indir) # If we are in the last step of an action, we can update the "journal of submissions" if last_step == 1: if uid_email != "" and uid_email != "guest" and rn != "": ## 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 rn and status to finished for this submission in the log: update_submission_reference_and_status_in_log(doctype, act, access, uid_email, rn, "finished") else: ## Submission doesn't exist in log - create it: log_new_completed_submission(doctype, act, access, uid_email, rn) t = websubmit_templates.tmpl_page_endaction( ln = ln, weburl = weburl, # these fields are necessary for the navigation file = file, nextPg = nextPg, startPg = startPg, access = access, curpage = curpage, nbPg = nbPg, nbpages = nbpages, doctype = doctype, act = act, docname = docname, actname = actname, indir = indir, mainmenu = mainmenu, finished = finished, images = images, function_content = function_content, next_action = next_action, ) # start display: req.content_type = "text/html" req.send_http_header() p_navtrail = """<a href="/submit">""" + _("Submit") +\ """</a>&nbsp;>&nbsp;<a href="/submit?doctype=%(doctype)s">%(docname)s</a>""" % { 'doctype' : doctype, 'docname' : docname, } return page(title= actname, body = t, navtrail = p_navtrail, description="submit documents", keywords="submit", uid = uid, language = ln, req = req)
79b72d2f40eb18449af82cbba788018e2398f989 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/79b72d2f40eb18449af82cbba788018e2398f989/websubmit_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 1128, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 1128, 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...
elif 'cshlib' in y.features or 'cprogram' in y.features:
elif 'cshlib' in y.features:
def apply_lib_vars(self): """after apply_link because of 'link_task' after default_cc because of the attribute 'uselib'""" # after 'apply_core' in case if 'cc' if there is no link env = self.env # 1. the case of the libs defined in the project (visit ancestors first) # the ancestors external libraries (uselib) will be prepended self.uselib = self.to_list(self.uselib) names = self.to_list(self.uselib_local) seen = set([]) tmp = Utils.deque(names) # consume a copy of the list of names while tmp: lib_name = tmp.popleft() # visit dependencies only once if lib_name in seen: continue y = self.name_to_obj(lib_name) if not y: raise Utils.WafError('object %r was not found in uselib_local (required by %r)' % (lib_name, self.name)) y.post() seen.add(lib_name) # object has ancestors to process (shared libraries): add them to the end of the list if getattr(y, 'uselib_local', None): lst = y.to_list(y.uselib_local) if 'cshlib' in y.features or 'cprogram' in y.features: lst = [x for x in lst if not 'cstaticlib' in self.name_to_obj(x).features] tmp.extend(lst) # link task and flags if getattr(y, 'link_task', None): link_name = y.target[y.target.rfind(os.sep) + 1:] if 'cstaticlib' in y.features: env.append_value('STATICLIB', link_name) elif 'cshlib' in y.features or 'cprogram' in y.features: # WARNING some linkers can link against programs env.append_value('LIB', link_name) # the order if getattr(self, 'link_task', None): self.link_task.set_run_after(y.link_task) # for the recompilation dep_nodes = getattr(self.link_task, 'dep_nodes', []) self.link_task.dep_nodes = dep_nodes + y.link_task.outputs # add the link path too tmp_path = y.link_task.outputs[0].parent.bldpath(self.env) if not tmp_path in env['LIBPATH']: env.prepend_value('LIBPATH', tmp_path) # add ancestors uselib too - but only propagate those that have no staticlib for v in self.to_list(y.uselib): if not env['STATICLIB_' + v]: if not v in self.uselib: self.uselib.insert(0, v) # if the library task generator provides 'export_incdirs', add to the include path # the export_incdirs must be a list of paths relative to the other library if getattr(y, 'export_incdirs', None): for x in self.to_list(y.export_incdirs): node = y.path.find_dir(x) if not node: raise Utils.WafError('object %r: invalid folder %r in export_incdirs' % (y.target, x)) self.env.append_unique('INC_PATHS', node) # 2. the case of the libs defined outside for x in self.uselib: for v in self.p_flag_vars: val = self.env[v + '_' + x] if val: self.env.append_value(v, val)
a30a1968bec281dbd175ab3f17bada24c3d2e5b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/a30a1968bec281dbd175ab3f17bada24c3d2e5b5/ccroot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 2941, 67, 4699, 12, 2890, 4672, 3536, 5205, 2230, 67, 1232, 2724, 434, 296, 1232, 67, 4146, 11, 1839, 805, 67, 952, 2724, 434, 326, 1566, 296, 407, 30575, 11, 8395, 225, 468,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 2941, 67, 4699, 12, 2890, 4672, 3536, 5205, 2230, 67, 1232, 2724, 434, 296, 1232, 67, 4146, 11, 1839, 805, 67, 952, 2724, 434, 326, 1566, 296, 407, 30575, 11, 8395, 225, 468,...
result_list[n.ivalue] = R_values[value.ivalue]
result_list[n] = R_values[value]
def values(self): """ Returns a list of the values of this character on each integer between 0 and the modulus. EXAMPLES: sage: e = DirichletGroup(20)(1) sage: e.values() [0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1] sage: e = DirichletGroup(20).gen(0) sage: print e.values() [0, 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1] sage: e = DirichletGroup(20).gen(1) sage: e.values() [0, 1, 0, -zeta4, 0, 0, 0, zeta4, 0, -1, 0, 1, 0, -zeta4, 0, 0, 0, zeta4, 0, -1] sage: e = DirichletGroup(21).gen(0) ; e.values() [0, 1, -1, 0, 1, -1, 0, 0, -1, 0, 1, -1, 0, 1, 0, 0, 1, -1, 0, 1, -1] sage: e = DirichletGroup(21, base_ring=GF(37)).gen(0) ; e.values() [0, 1, 36, 0, 1, 36, 0, 0, 36, 0, 1, 36, 0, 1, 0, 0, 1, 36, 0, 1, 36] sage: e = DirichletGroup(21, base_ring=GF(3)).gen(0) ; e.values() [0, 1, 2, 0, 1, 2, 0, 0, 2, 0, 1, 2, 0, 1, 0, 0, 1, 2, 0, 1, 2] """ try: return self.__values except AttributeError: pass # Build cache of all values of the Dirichlet character. # I'm going to do it this way, since in my app the modulus # is *always* small and we want to evaluate the character # a *lot*. G = self.parent() R = G.base_ring() zero = R(0) one = R(1) mod = self.__modulus
1b50a849458fa113bb43949932f2bce94dce9625 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1b50a849458fa113bb43949932f2bce94dce9625/dirichlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 924, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 326, 924, 434, 333, 3351, 603, 1517, 3571, 3086, 374, 471, 326, 24770, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 425, 273, 8446, 135...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 924, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 326, 924, 434, 333, 3351, 603, 1517, 3571, 3086, 374, 471, 326, 24770, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 425, 273, 8446, 135...
for first in xrange(0, len(parents), binjfindjob.parents_per_binjfind):
while parents:
def make_binjfind_fragment(dag, parents, tag): nodes = [] for first in xrange(0, len(parents), binjfindjob.parents_per_binjfind): node = BinjfindNode(binjfindjob) node.set_name("ligolw_binjfind_%s_%d" % (tag, first)) for parent in parents[first:first + binjfindjob.parents_per_binjfind]: node.add_parent(parent) node.add_input_cache(parent.get_output_cache()) node.add_macro("macrocomment", tag) dag.add_node(node) nodes.append(node) return nodes
ee662f0e0f98d5035001147ea55c64f42fbc4ae9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/ee662f0e0f98d5035001147ea55c64f42fbc4ae9/power.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4757, 78, 4720, 67, 11956, 12, 30204, 16, 6298, 16, 1047, 4672, 2199, 273, 5378, 1323, 6298, 30, 756, 273, 16827, 78, 4720, 907, 12, 4757, 78, 4720, 4688, 13, 756, 18, 542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4757, 78, 4720, 67, 11956, 12, 30204, 16, 6298, 16, 1047, 4672, 2199, 273, 5378, 1323, 6298, 30, 756, 273, 16827, 78, 4720, 907, 12, 4757, 78, 4720, 4688, 13, 756, 18, 542, ...
-{-1/9,0}
-{8/9,1}
def modular_symbol(self, x, check=True): """ Create a modular symbol in this space.
3c580e8e31545dac681cd078ee6965d7da2ef81f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3c580e8e31545dac681cd078ee6965d7da2ef81f/ambient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 681, 2490, 67, 7175, 12, 2890, 16, 619, 16, 866, 33, 5510, 4672, 3536, 1788, 279, 681, 2490, 3273, 316, 333, 3476, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 681, 2490, 67, 7175, 12, 2890, 16, 619, 16, 866, 33, 5510, 4672, 3536, 1788, 279, 681, 2490, 3273, 316, 333, 3476, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.Track()
try: self.Track() except: pass print "Done tracking" if self.dowritesbfmf and self.movie.writesbfmf_isopen(): self.movie.writesbfmf_close(self.start_frame)
def DoAll(self):
0236d9b32c80ea668637bb2bddf83029f2dd0343 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2711/0236d9b32c80ea668637bb2bddf83029f2dd0343/algorithm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 1595, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 1595, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.errors.append((test, self._exc_info_to_string(err)))
self.errors.append((test, self._exc_info_to_string(err, test)))
def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as returned by sys.exc_info(). """ self.errors.append((test, self._exc_info_to_string(err)))
743436f26acbebc9e6dea9186e6c7cb7f3e517d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/743436f26acbebc9e6dea9186e6c7cb7f3e517d1/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9501, 12, 2890, 16, 1842, 16, 393, 4672, 3536, 8185, 1347, 392, 555, 711, 7841, 18, 296, 370, 11, 353, 279, 3193, 434, 924, 487, 2106, 635, 2589, 18, 10075, 67, 1376, 7675, 3536, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9501, 12, 2890, 16, 1842, 16, 393, 4672, 3536, 8185, 1347, 392, 555, 711, 7841, 18, 296, 370, 11, 353, 279, 3193, 434, 924, 487, 2106, 635, 2589, 18, 10075, 67, 1376, 7675, 3536, 365, ...
By default, the command will print `set_source_lang` and `set_translation`
By default, the command will print `set_source_file` and `set_translation`
def cmd_auto_find(argv, path_to_tx): "Automatically identify translation files." """ This command goes through all files in this directory and its subdirectories and tries to find matches to the expression given. The expression should contain '<lang>' to identify the language, or, if the --regex option is defined, should be a full regular expression. By default, the command will print `set_source_lang` and `set_translation` commands, which you can examine and run manually. If --execute is specified, the commands will be executed. """ usage="usage: %prog [tx_options] auto_find -r <resource> -l <language> [options] '<expression>'" description=("Walk through all files in subdirectories for files matching " "<expression> and auto-associate them with a language. You may " "use the keyword '<lang>' in your expression to signify the language " "locale, for example: 'po/<lang>.po'. Alternatively, you may use a " "full-powered regular expression with --regex.") parser = OptionParser(usage=usage, description=description) # Mandatory parser.add_option("-r","--resource", action="store", dest="resource_slug", default=None, help="Specify resource name") # Optional parser.add_option("-e","--execute", action="store_true", dest="execute", default=False, help="Execute the commands instead of just printing them.") parser.add_option("-E","--regex", action="store_true", dest="regex", default=False, help="Set if the expression is a POSIX regex.") parser.add_option("-l","--language", action="store", dest="slang", default="en", help="The language of the source file (default: 'en')") parser.add_option("-n","--no-source", action="store_true", dest="nosource", default=False, help="Disable searching for a source file.") (options, args) = parser.parse_args(argv) resource = options.resource_slug source_language = options.slang execute = options.execute if not resource: parser.error("Please specify a resource.") if len(args) != 1: parser.error("Please specify an expression.") expr = args[0] expr_re = '.*%s.*' % expr if not options.regex: # Force expr to be a valid regex expr (escaped) but keep <lang> intact expr_re = re.escape(expr) expr_re = re.sub(r"\\<lang\\>", '<lang>', expr_re) expr_re = re.sub(r"<lang>", '(?P<lang>[^/]+)', '.*%s' % expr_re) expr_rec = re.compile(expr_re) # The path everything will be relative to curpath = '.' if not execute: utils.MSG("Only printing the commands which will be run if the " "--execute switch is specified.") # First, let's construct a dictionary of all matching files. # Note: Only the last matching file of a language will be stored. source_file = None translation_files = {} for root, dirs, files in os.walk(curpath): for f in files: f_path = os.path.join(root, f) match = expr_rec.match(f_path) if match: lang = match.group('lang') if lang == source_language: source_file = f_path else: translation_files[lang] = f_path # The set_source_file commands needs to be handled first. # If source file search is enabled, go ahead and find it: if not options.nosource: if not source_file: parser.error(
c6baba017c0afac06b576744cee592be43b71243 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11326/c6baba017c0afac06b576744cee592be43b71243/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 6079, 67, 4720, 12, 19485, 16, 589, 67, 869, 67, 978, 4672, 315, 31910, 9786, 4794, 1390, 1199, 225, 3536, 1220, 1296, 13998, 3059, 777, 1390, 316, 333, 1867, 471, 2097, 31220,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 6079, 67, 4720, 12, 19485, 16, 589, 67, 869, 67, 978, 4672, 315, 31910, 9786, 4794, 1390, 1199, 225, 3536, 1220, 1296, 13998, 3059, 777, 1390, 316, 333, 1867, 471, 2097, 31220,...
return self.stylename
return self.stylename
def __str__(self):
b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1001, 701, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
import gui_thread_guts
import gui_thread_guts
def exit_gui_thread(last_exit = oldexitfunc): # don't wait on MS platforms -- it hangs. # On X11, we have to shut down the secondary thread. if running_in_second_thread and os.name != 'nt': import gui_thread_guts event_poster = gui_thread_guts.proxy_base() event_catcher = event_poster.catcher finished = threading.Event() evt = gui_thread_guts.proxy_event(event_catcher.Close, (),{},finished) event_poster.post(evt) # wait for event to get handled finished.wait() # wait for the gui_thread to die. gui_thread_finished.wait() if last_exit: last_exit()
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 67, 20292, 67, 5930, 12, 2722, 67, 8593, 273, 8793, 561, 305, 644, 4672, 468, 2727, 1404, 2529, 603, 9238, 17422, 1493, 518, 25733, 87, 18, 468, 2755, 1139, 2499, 16, 732, 1240, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 67, 20292, 67, 5930, 12, 2722, 67, 8593, 273, 8793, 561, 305, 644, 4672, 468, 2727, 1404, 2529, 603, 9238, 17422, 1493, 518, 25733, 87, 18, 468, 2755, 1139, 2499, 16, 732, 1240, ...
self.startSpeed = 4 self.speed = self.startSpeed
self.startVirtualSpeed = 4 self.virtualSpeed = self.startVirtualSpeed
def initGamePython(self):
14b2acc074530e8a6710261615202e97b1b8b23b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12485/14b2acc074530e8a6710261615202e97b1b8b23b/micropolisturbogearsengine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12496, 15774, 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, ...
[ 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, 1208, 12496, 15774, 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, ...
nl = ([self.cfg.GetMasterNode(), self.instance.primary_node] + list(self.instance.secondary_nodes))
nl = [self.cfg.GetMasterNode()] + list(self.instance.all_nodes)
def BuildHooksEnv(self): """Build hooks env.
6b12959c903240425485a91cdabf17247405be7c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/6b12959c903240425485a91cdabf17247405be7c/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3998, 13620, 3491, 12, 2890, 4672, 3536, 3116, 9153, 1550, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3998, 13620, 3491, 12, 2890, 4672, 3536, 3116, 9153, 1550, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def remove_redundant_vertices(self):
def remove_redundant_vertices(self, cdd_type = 'rational'):
def remove_redundant_vertices(self): """ Removes vertices from the description of the polyhedron which do not affect the convex hull. Now done automatically when a polyhedron is defined by vertices.
7ab998a6a116ce1d7e4f54b579cf78d8f8e877ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7ab998a6a116ce1d7e4f54b579cf78d8f8e877ba/polyhedra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 1118, 15362, 67, 17476, 12, 2890, 16, 276, 449, 67, 723, 273, 296, 7034, 287, 11, 4672, 3536, 20284, 6928, 628, 326, 2477, 434, 326, 7573, 18550, 1949, 1492, 741, 486, 13418, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1206, 67, 1118, 15362, 67, 17476, 12, 2890, 16, 276, 449, 67, 723, 273, 296, 7034, 287, 11, 4672, 3536, 20284, 6928, 628, 326, 2477, 434, 326, 7573, 18550, 1949, 1492, 741, 486, 13418, ...
self.add_latex_line(r"\newcounter{%s}"%interCounterName)
self.initialize_newwrite() self.initialize_counter()
def get_counter_value(self,counter_name,default_value=0): """ return the value of the (LaTeX) counter <name> at this point of the LaTeX file
a24a9d5061055b9ef0fc6697dcbfed8ef9a7abae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5111/a24a9d5061055b9ef0fc6697dcbfed8ef9a7abae/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7476, 67, 1132, 12, 2890, 16, 7476, 67, 529, 16, 1886, 67, 1132, 33, 20, 4672, 3536, 327, 326, 460, 434, 326, 261, 30745, 21575, 60, 13, 3895, 411, 529, 34, 622, 333, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7476, 67, 1132, 12, 2890, 16, 7476, 67, 529, 16, 1886, 67, 1132, 33, 20, 4672, 3536, 327, 326, 460, 434, 326, 261, 30745, 21575, 60, 13, 3895, 411, 529, 34, 622, 333, 1634, ...
self._pages.Enable(page, enabled)
self._pages.EnableTab(page, enabled)
def Enable(self, page, enabled=True): """ Enables or disables a tab. """
3a0b1f421ffd09b66f7f6a99913173fbe0ebb517 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12725/3a0b1f421ffd09b66f7f6a99913173fbe0ebb517/flatnotebook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9677, 12, 2890, 16, 1363, 16, 3696, 33, 5510, 4672, 3536, 1374, 1538, 578, 24960, 279, 3246, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9677, 12, 2890, 16, 1363, 16, 3696, 33, 5510, 4672, 3536, 1374, 1538, 578, 24960, 279, 3246, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
boto.log.exception('Caught exception reading instance data') time.sleep(2**i)
pass boto.log.exception('Caught exception reading instance data') time.sleep(2**i)
def retry_url(url): for i in range(0, 10): try: req = urllib2.Request(url) resp = urllib2.urlopen(req) return resp.read() except: boto.log.exception('Caught exception reading instance data') time.sleep(2**i) boto.log.error('Unable to read instance data, giving up') return ''
d1a278bb48873b8e73f203a363f38925c3543042 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/d1a278bb48873b8e73f203a363f38925c3543042/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 718, 12, 718, 4672, 364, 277, 316, 1048, 12, 20, 16, 1728, 4672, 775, 30, 1111, 273, 11527, 22, 18, 691, 12, 718, 13, 1718, 273, 11527, 22, 18, 295, 18589, 12, 3658, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 718, 12, 718, 4672, 364, 277, 316, 1048, 12, 20, 16, 1728, 4672, 775, 30, 1111, 273, 11527, 22, 18, 691, 12, 718, 13, 1718, 273, 11527, 22, 18, 295, 18589, 12, 3658, 13, ...
if (from_protocol == 'irc' and nickname == self.irc_connection.get_nickname()) or (from_protocol == 'xmpp' and nickname == self.xmpp_room.nickname):
if (from_protocol == 'irc' and nickname == self.bot.nickname) or (from_protocol == 'xmpp' and nickname == self.bot.nickname):
def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): """Add a participant to the bridge.""" if (from_protocol == 'irc' and nickname == self.irc_connection.get_nickname()) or (from_protocol == 'xmpp' and nickname == self.xmpp_room.nickname): self.bot.error('===> Debug: not adding self ('+self.bot.nickname+') to bridge "'+str(self)+'"', debug=True) return try: p = self.getParticipant(nickname) if p.protocol != from_protocol: if from_protocol == 'irc' and isinstance(p.irc_connection, ServerConnection) and p.irc_connection.really_connected == True and p.irc_connection.real_nickname == nickname or from_protocol == 'xmpp' and isinstance(p.xmpp_c, xmpp.client.Client) and isinstance(p.muc, xmpp.muc) and p.xmpp_c.nickname == nickname: if irc_id: p.irc_connection.irc_id = irc_id return p p.set_both_sides() return p except self.NoSuchParticipantException: pass if nickname == 'ChanServ' and from_protocol == 'irc': return self.lock.acquire() self.bot.error('===> Debug: adding participant "'+nickname+'" from "'+from_protocol+'" to bridge "'+str(self)+'"', debug=True) try: p = Participant(self, from_protocol, nickname, real_jid=real_jid) except IOError: self.bot.error('===> Debug: IOError while adding participant "'+nickname+'" from "'+from_protocol+'" to bridge "'+str(self)+'", reconnectiong ...', debug=True) p.xmpp_c.reconnectAndReauth() except: self.bot.error('===> Debug: unknown error while adding participant "'+nickname+'" from "'+from_protocol+'" to bridge "'+str(self)+'"', debug=True) traceback.print_exc() return self.participants.append(p) self.lock.release() if self.mode not in ['normal', 'bypass']: if from_protocol == 'xmpp': self.show_participants_list_on(protocols=['irc']) elif self.mode == 'minimal' and from_protocol == 'irc': self.show_participants_list_on(protocols=['xmpp']) return p
1640f287d8442c92907cfdb505ab3bfeae99b8c1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/1640f287d8442c92907cfdb505ab3bfeae99b8c1/bridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 22540, 12, 2890, 16, 628, 67, 8373, 16, 19570, 16, 2863, 67, 18252, 33, 7036, 16, 277, 1310, 67, 350, 33, 7036, 4672, 3536, 986, 279, 14188, 358, 326, 10105, 12123, 309, 261, 2080...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 22540, 12, 2890, 16, 628, 67, 8373, 16, 19570, 16, 2863, 67, 18252, 33, 7036, 16, 277, 1310, 67, 350, 33, 7036, 4672, 3536, 986, 279, 14188, 358, 326, 10105, 12123, 309, 261, 2080...
rng_state0 = numpy.random.RandomState(55)
rng_state0 = numpy.random.RandomState(utt.fetch_seed())
def test_basic_usage(self): rf = RandomFunction(numpy.random.RandomState.uniform, tensor.dvector) assert not rf.inplace assert getattr(rf, 'destroy_map', {}) == {}
d5701303093e5943cc4df89bc18c7fecc19b0be2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/d5701303093e5943cc4df89bc18c7fecc19b0be2/test_raw_random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13240, 67, 9167, 12, 2890, 4672, 9075, 273, 8072, 2083, 12, 15974, 18, 9188, 18, 8529, 1119, 18, 24120, 16, 8171, 18, 72, 7737, 13, 1815, 486, 9075, 18, 267, 964, 1815, 3869,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13240, 67, 9167, 12, 2890, 4672, 9075, 273, 8072, 2083, 12, 15974, 18, 9188, 18, 8529, 1119, 18, 24120, 16, 8171, 18, 72, 7737, 13, 1815, 486, 9075, 18, 267, 964, 1815, 3869,...
params={'filters':{'package': ''}}),
params={'filters':{'package': ''}, 'numericPager': True}),
def update_params(self, d): d['resource'] = 'bugzilla' d['resource_path'] = 'query_bugs' super(BugsGrid, self).update_params(d)
beab3d06bd7662c546c3f68a7050d40e8c8f8e45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12732/beab3d06bd7662c546c3f68a7050d40e8c8f8e45/bugs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2010, 12, 2890, 16, 302, 4672, 302, 3292, 3146, 3546, 273, 296, 925, 15990, 11, 302, 3292, 3146, 67, 803, 3546, 273, 296, 2271, 67, 19381, 11, 2240, 12, 31559, 6313, 16, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2010, 12, 2890, 16, 302, 4672, 302, 3292, 3146, 3546, 273, 296, 925, 15990, 11, 302, 3292, 3146, 67, 803, 3546, 273, 296, 2271, 67, 19381, 11, 2240, 12, 31559, 6313, 16, 365,...
def _bottom_combo_cb(self, arg=None):
def _stator_combo_cb(self, arg=None):
def _bottom_combo_cb(self, arg=None): """ Read value from stator combo box """ _bottom_dictionary = {_D: 'D', _DI: 'DI', _L: 'L2', _B: 'B', _K: 'K2', _S: 'S2', _T: 'T2', _LL0: 'LL02', _LLn: 'LLn2', _UD: 'custom2'} self.sr.active_stator = self.sr.name_to_stator(_bottom_dictionary[ _STATORS[self._bottom_combo.get_active()]]) function = self._predefined_function() if function is not None: function() else: self._function_combo.set_active(_FUNCTIONS.index(_UK)) self.set_stator() self.sr.update_slide_labels() self.sr.update_results_label()
53eee49e3fcce38adf97e3dc8198346f709dc071 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5595/53eee49e3fcce38adf97e3dc8198346f709dc071/SlideruleActivity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 334, 639, 67, 25053, 67, 7358, 12, 2890, 16, 1501, 33, 7036, 4672, 3536, 2720, 460, 628, 610, 280, 16778, 3919, 3536, 389, 9176, 67, 15556, 273, 288, 67, 40, 30, 296, 40, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 334, 639, 67, 25053, 67, 7358, 12, 2890, 16, 1501, 33, 7036, 4672, 3536, 2720, 460, 628, 610, 280, 16778, 3919, 3536, 389, 9176, 67, 15556, 273, 288, 67, 40, 30, 296, 40, 2187, ...
-1: "Unkown PKCS
-2: "Unkown PKCS
def flags2text(self): """ parse the L{flags} field and create a list of "CKF_*" strings corresponding to bits set in flags
dd776d3dc9fb3ff30d84ea5641f655f85c9b0170 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6899/dd776d3dc9fb3ff30d84ea5641f655f85c9b0170/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2943, 22, 955, 12, 2890, 4672, 3536, 1109, 326, 511, 95, 7133, 97, 652, 471, 752, 279, 666, 434, 315, 3507, 42, 67, 7388, 2064, 4656, 358, 4125, 444, 316, 2943, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2943, 22, 955, 12, 2890, 4672, 3536, 1109, 326, 511, 95, 7133, 97, 652, 471, 752, 279, 666, 434, 315, 3507, 42, 67, 7388, 2064, 4656, 358, 4125, 444, 316, 2943, 2, -100, -100, -100, ...
pylab.title("Log10[< Volume >] Mpc^3\n" + sys.argv[1] + "\n" + sys.argv[2],fontsize=14)
pylab.title("Log10[Volume \n" + sys.argv[1] + "/\n" + sys.argv[2] +']',fontsize=14)
def integrate_posterior(mu, post, conf): cumpost = post.cumsum()/post.sum() #if you can do it, maybe you can't cause the volume is zero try: val = [idx for idx in range(len(cumpost)) if cumpost[idx] >= conf][0] except: val = 0 return mu[val]
f4a1617c60d5c40fd3e5462767e1471867e050b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/f4a1617c60d5c40fd3e5462767e1471867e050b3/imr_volume_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23367, 67, 2767, 17818, 12, 13297, 16, 1603, 16, 2195, 4672, 14471, 2767, 273, 1603, 18, 28538, 1364, 1435, 19, 2767, 18, 1364, 1435, 468, 430, 1846, 848, 741, 518, 16, 6944, 1846, 848, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23367, 67, 2767, 17818, 12, 13297, 16, 1603, 16, 2195, 4672, 14471, 2767, 273, 1603, 18, 28538, 1364, 1435, 19, 2767, 18, 1364, 1435, 468, 430, 1846, 848, 741, 518, 16, 6944, 1846, 848, ...
if (sig.getAppearance() == RED) :
sigState = sig.getAppearance() if (sigState == RED) :
def cvtAppearanceIcon(self, sig) : rep = self.darkSignalIcon if (sig.getLit()) : if (sig.getAppearance() == RED) : rep = self.redSignalIcon elif (sig.getAppearance() == FLASHRED) : rep = self.redFlashSignalIcon elif (sig.getAppearance() == YELLOW) : rep = self.yellowSignalIcon elif (sig.getAppearance() == FLASHYELLOW) : rep = self.yellowFlashSignalIcon elif (sig.getAppearance() == GREEN) : rep = self.greenSignalIcon elif (sig.getAppearance() == FLASHGREEN) : rep = self.greenFlashSignalIcon else : rep = self.unknownSignalIcon #self.msgText("Found signal " + self.giveSignalName(sig) + " displaying: " + rep + "\n") return rep
ea0545abfec3c873ac30e3d94a5ae0a9a6e544ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1660/ea0545abfec3c873ac30e3d94a5ae0a9a6e544ba/RobotThrottle2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8951, 88, 1294, 27668, 5554, 12, 2890, 16, 3553, 13, 294, 2071, 273, 365, 18, 25045, 11208, 5554, 309, 261, 7340, 18, 588, 23707, 10756, 294, 3553, 1119, 273, 3553, 18, 588, 1294, 27668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8951, 88, 1294, 27668, 5554, 12, 2890, 16, 3553, 13, 294, 2071, 273, 365, 18, 25045, 11208, 5554, 309, 261, 7340, 18, 588, 23707, 10756, 294, 3553, 1119, 273, 3553, 18, 588, 1294, 27668,...
base.direct.widget.disableModeColor()
base.direct.widget.disabledModeColor()
def disableWidgetMove(self): self.fMovable = 0 if hasattr(base.direct, 'widget'): base.direct.widget.disableModeColor() else: self.objectHandles.disabledModeColor()
0955e1bd55a71619574f63ced110b20dca816600 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/0955e1bd55a71619574f63ced110b20dca816600/DirectManipulation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4056, 4609, 7607, 12, 2890, 4672, 365, 18, 74, 49, 1527, 429, 273, 374, 309, 3859, 12, 1969, 18, 7205, 16, 296, 6587, 11, 4672, 1026, 18, 7205, 18, 6587, 18, 9278, 2309, 2957, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4056, 4609, 7607, 12, 2890, 4672, 365, 18, 74, 49, 1527, 429, 273, 374, 309, 3859, 12, 1969, 18, 7205, 16, 296, 6587, 11, 4672, 1026, 18, 7205, 18, 6587, 18, 9278, 2309, 2957, 1435, ...
self.socket = start_SSL(self.socket)
self.socket = SSLSocket(self.socket)
def __init__(self, interface, port, secure=False): threading.Thread.__init__(self) self.socket = None if socket.has_ipv6: try: socket.getaddrinfo(interface or None, port, socket.AF_INET6) self.socket = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) except: pass if self.socket is None: self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) if secure: self.socket = start_SSL(self.socket) self.socket.bind((interface, port)) self.socket.listen(5) self.threads = [] self.secure = secure self.running = False
3dc6e2375bfb16060442146c792fdc9b50d7c95d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/3dc6e2375bfb16060442146c792fdc9b50d7c95d/netsvc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1560, 16, 1756, 16, 8177, 33, 8381, 4672, 17254, 18, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 18, 7814, 273, 599, 309, 2987, 18, 5332, 67, 10834, 26, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1560, 16, 1756, 16, 8177, 33, 8381, 4672, 17254, 18, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 18, 7814, 273, 599, 309, 2987, 18, 5332, 67, 10834, 26, ...
if relation!="parent" and cls.windowHasExtraIAccessibles(windowHandle):
if relation!="parent" and self.windowHasExtraIAccessibles(windowHandle):
def __init__(self,relation=None,windowHandle=None,IAccessibleObject=None,IAccessibleChildID=None,event_windowHandle=None,event_objectID=None,event_childID=None): """
3f261c11858bab84366fb36508cafcea86fa15ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/3f261c11858bab84366fb36508cafcea86fa15ea/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5488, 33, 7036, 16, 5668, 3259, 33, 7036, 16, 45, 10451, 921, 33, 7036, 16, 45, 10451, 1763, 734, 33, 7036, 16, 2575, 67, 5668, 3259, 33, 7036, 16, 257...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5488, 33, 7036, 16, 5668, 3259, 33, 7036, 16, 45, 10451, 921, 33, 7036, 16, 45, 10451, 1763, 734, 33, 7036, 16, 2575, 67, 5668, 3259, 33, 7036, 16, 257...
"""Convert the database value to a python value.""" if isinstance(value, PickledObject): return pickle.loads(str(value)) else:
""" B64decode and unpickle the object, optionally decompressing it. If an error is raised in de-pickling and we're sure the value is a definite pickle, the error is allowed to propogate. If we aren't sure if the value is a pickle or not, then we catch the error and return the original value instead. """ if value is not None:
def to_python(self, value): """Convert the database value to a python value.""" if isinstance(value, PickledObject): # If the value is a definite pickle; and an error is # raised in de-pickling it should be allowed to propogate. return pickle.loads(str(value)) else: try: return pickle.loads(str(value)) except Exception: # If an error was raised, just return the plain value return value
cb4d9f5f4dcec07525395cf3c5e8dbf3caadb214 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2024/cb4d9f5f4dcec07525395cf3c5e8dbf3caadb214/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 8103, 12, 2890, 16, 460, 4672, 3536, 2723, 326, 2063, 460, 358, 279, 5790, 460, 12123, 309, 1549, 12, 1132, 16, 23038, 1259, 921, 4672, 468, 971, 326, 460, 353, 279, 2217, 113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 8103, 12, 2890, 16, 460, 4672, 3536, 2723, 326, 2063, 460, 358, 279, 5790, 460, 12123, 309, 1549, 12, 1132, 16, 23038, 1259, 921, 4672, 468, 971, 326, 460, 353, 279, 2217, 113...
print 'Lookup for %r finished, got %d article(s)' % (word, len(articles))
log.debug('Lookup for %r finished, got %d article(s)', word, len(articles))
def word_lookup_finished(self, word, articles): print 'Lookup for %r finished, got %d article(s)' % (word, len(articles)) def key(article): return collation_key(article.title, TERTIARY).getByteArray() articles.sort(key=key) for k, g in groupby(articles, key): article_group = list(g) item = QListWidgetItem() item.setText(article_group[0].title) item.setData(Qt.UserRole, QVariant(article_group)) self.word_completion.addItem(item) self.select_word(unicode(word)) self.sidebar.setTabText(0, 'Lookup') self.current_lookup_thread = None
67a3086e42b74c3a053a1f3d5818584b41ba19d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14305/67a3086e42b74c3a053a1f3d5818584b41ba19d4/qtui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2076, 67, 8664, 67, 13527, 12, 2890, 16, 2076, 16, 15828, 4672, 613, 18, 4148, 2668, 6609, 364, 738, 86, 6708, 16, 2363, 738, 72, 7559, 12, 87, 13, 2187, 2076, 16, 562, 12, 16462, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2076, 67, 8664, 67, 13527, 12, 2890, 16, 2076, 16, 15828, 4672, 613, 18, 4148, 2668, 6609, 364, 738, 86, 6708, 16, 2363, 738, 72, 7559, 12, 87, 13, 2187, 2076, 16, 562, 12, 16462, 37...
shutil.copy(f, self.resourceFolder)
shutil.copy(f, os.path.join(self.packageResourceFolder, dst))
def _addResources(self): "Add Welcome/ReadMe/License files, .lproj folders and scripts."
d932aaa96ea8845f4755fa2da90712cb71b9e9c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d932aaa96ea8845f4755fa2da90712cb71b9e9c4/buildpkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 3805, 12, 2890, 4672, 315, 986, 678, 16312, 19, 1994, 4667, 19, 13211, 1390, 16, 263, 80, 17995, 9907, 471, 8873, 1199, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 3805, 12, 2890, 4672, 315, 986, 678, 16312, 19, 1994, 4667, 19, 13211, 1390, 16, 263, 80, 17995, 9907, 471, 8873, 1199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
a = self.dispatch['return'](self, self.cur[4], t)
a = self.dispatch['return'](self, self.cur[-2], t)
def simulate_cmd_complete(self): get_time = self.get_time t = get_time() - self.t while self.cur[5]: # We *can* cause assertion errors here if # dispatch_trace_return checks for a frame match! a = self.dispatch['return'](self, self.cur[4], t) t = 0 self.t = get_time() - t
9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20089, 67, 4172, 67, 6226, 12, 2890, 4672, 336, 67, 957, 273, 365, 18, 588, 67, 957, 268, 273, 336, 67, 957, 1435, 300, 365, 18, 88, 1323, 365, 18, 1397, 63, 25, 14542, 468, 1660, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20089, 67, 4172, 67, 6226, 12, 2890, 4672, 336, 67, 957, 273, 365, 18, 588, 67, 957, 268, 273, 336, 67, 957, 1435, 300, 365, 18, 88, 1323, 365, 18, 1397, 63, 25, 14542, 468, 1660, ...
if len(sys.argv) > 1: if sys.argv[1] == "download_daemon": launch_downloader_daemon() elif sys.argv[1] == "unittest": launch_unit_tests()
if "download_daemon" in sys.argv: launch_downloader_daemon() elif "unittest" in sys.argv: launch_unit_tests()
def endLoop(loop): del loop.pool
7b23881f18eea6cfd2e83506737e23656b2e732f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/7b23881f18eea6cfd2e83506737e23656b2e732f/Miro.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 6452, 12, 6498, 4672, 1464, 2798, 18, 6011, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 6452, 12, 6498, 4672, 1464, 2798, 18, 6011, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
"Invalid method: %s" % meth_name)
"Invalid method (for %s app): %s" % ( app.name, meth_name))
def response(code, output, json=True): self.send_response(code) mime_type = "application/json" if json else "text/plain" self.send_header("content-type", mime_type) self.end_headers()
d8ad43aee5e97b207554684a12624555cdd9d962 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/d8ad43aee5e97b207554684a12624555cdd9d962/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 766, 12, 710, 16, 876, 16, 1163, 33, 5510, 4672, 365, 18, 4661, 67, 2740, 12, 710, 13, 4892, 67, 723, 273, 315, 3685, 19, 1977, 6, 309, 1163, 469, 315, 955, 19, 7446, 6, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 766, 12, 710, 16, 876, 16, 1163, 33, 5510, 4672, 365, 18, 4661, 67, 2740, 12, 710, 13, 4892, 67, 723, 273, 315, 3685, 19, 1977, 6, 309, 1163, 469, 315, 955, 19, 7446, 6, 365, 18, ...
message['to'] = "abc3340@conference.%s" % ( CHATSERVER,)
message['to'] = "abc3340@conference.%s" % ( secret.CHATSERVER,)
def processMessagePC(self, elem): _from = jid.JID( elem["from"] ) # Intercept private messages via a chatroom, can't do that :) if (_from.host == "conference.%s" % (CHATSERVER,)): self.send_private_request( _from ) return
24fa6a8a683868db6a24e95e0b656f67ea1dbe8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11180/24fa6a8a683868db6a24e95e0b656f67ea1dbe8d/iemchatbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1079, 3513, 12, 2890, 16, 3659, 4672, 389, 2080, 273, 14201, 18, 46, 734, 12, 3659, 9614, 2080, 11929, 262, 468, 5294, 956, 3238, 2743, 3970, 279, 7916, 13924, 16, 848, 1404, 741, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1079, 3513, 12, 2890, 16, 3659, 4672, 389, 2080, 273, 14201, 18, 46, 734, 12, 3659, 9614, 2080, 11929, 262, 468, 5294, 956, 3238, 2743, 3970, 279, 7916, 13924, 16, 848, 1404, 741, ...
pass
if _deadstate is not None: self.returncode = _deadstate
def poll(self): """Check if child process has terminated. Returns returncode attribute.""" if self.returncode is None: try: pid, sts = os.waitpid(self.pid, os.WNOHANG) if pid == self.pid: self._handle_exitstatus(sts) except os.error: pass return self.returncode
091f97ac75923a9f8149f440cdb29114d4267997 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/091f97ac75923a9f8149f440cdb29114d4267997/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 12, 2890, 4672, 3536, 1564, 309, 1151, 1207, 711, 14127, 18, 225, 2860, 18125, 1566, 12123, 309, 365, 18, 2463, 710, 353, 599, 30, 775, 30, 4231, 16, 27099, 273, 1140, 18, 7048, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 12, 2890, 4672, 3536, 1564, 309, 1151, 1207, 711, 14127, 18, 225, 2860, 18125, 1566, 12123, 309, 365, 18, 2463, 710, 353, 599, 30, 775, 30, 4231, 16, 27099, 273, 1140, 18, 7048, ...
self.setup_fu_trig(cp, trig, ifo, type) def setup_fu_trig(self, cp, trig, ifo, type):
self.outputFileName = self.setup_fu_trig(cp, time, ifo, type) def setup_fu_trig(self, cp, time, ifo, type):
def __init__(self, job): pipeline.LSCDataFindNode(self,job,source, type=None,cp=None,trig=None,ifo=None) if source == 'futrig': self.setup_fu_trig(cp, trig, ifo, type)
3c3c3449c669fe5e88d5539740484529d04083fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/3c3c3449c669fe5e88d5539740484529d04083fb/fu_Condor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1719, 4672, 5873, 18, 48, 2312, 751, 3125, 907, 12, 2890, 16, 4688, 16, 3168, 16, 618, 33, 7036, 16, 4057, 33, 7036, 16, 313, 360, 33, 7036, 16, 20299,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1719, 4672, 5873, 18, 48, 2312, 751, 3125, 907, 12, 2890, 16, 4688, 16, 3168, 16, 618, 33, 7036, 16, 4057, 33, 7036, 16, 313, 360, 33, 7036, 16, 20299,...
log.info("restore hvm domain %d, mem=%d, apic=%d, pae=%d", dominfo.domid, hvm, apic, pae)
log.info("restore hvm domain %d, apic=%d, pae=%d", dominfo.domid, apic, pae)
def restore(xd, fd, dominfo = None, paused = False): signature = read_exact(fd, len(SIGNATURE), "not a valid guest state file: signature read") if signature != SIGNATURE: raise XendError("not a valid guest state file: found '%s'" % signature) l = read_exact(fd, sizeof_int, "not a valid guest state file: config size read") vmconfig_size = unpack("!i", l)[0] vmconfig_buf = read_exact(fd, vmconfig_size, "not a valid guest state file: config read") p = sxp.Parser() p.input(vmconfig_buf) if not p.ready: raise XendError("not a valid guest state file: config parse") vmconfig = p.get_val() if dominfo: dominfo.resume() else: dominfo = xd.restore_(vmconfig) store_port = dominfo.getStorePort() console_port = dominfo.getConsolePort() assert store_port assert console_port nr_pfns = (dominfo.getMemoryTarget() + 3) / 4 # if hvm, pass mem size to calculate the store_mfn image_cfg = dominfo.info.get('image', {}) is_hvm = dominfo.info.is_hvm() if is_hvm: hvm = dominfo.info['memory_static_min'] apic = int(dominfo.info['platform'].get('apic', 0)) pae = int(dominfo.info['platform'].get('pae', 0)) log.info("restore hvm domain %d, mem=%d, apic=%d, pae=%d", dominfo.domid, hvm, apic, pae) else: hvm = 0 apic = 0 pae = 0 try: l = read_exact(fd, sizeof_unsigned_long, "not a valid guest state file: pfn count read") max_pfn = unpack("L", l)[0] # native sizeof long if max_pfn > 16*1024*1024: # XXX raise XendError( "not a valid guest state file: pfn count out of range") shadow = dominfo.info['shadow_memory'] log.debug("restore:shadow=0x%x, _static_max=0x%x, _static_min=0x%x, " "nr_pfns=0x%x.", dominfo.info['shadow_memory'], dominfo.info['memory_static_max'], dominfo.info['memory_static_min'], nr_pfns) balloon.free(xc.pages_to_kib(nr_pfns) + shadow * 1024) shadow_cur = xc.shadow_mem_control(dominfo.getDomid(), shadow) dominfo.info['shadow_memory'] = shadow_cur cmd = map(str, [xen.util.auxbin.pathTo(XC_RESTORE), fd, dominfo.getDomid(), max_pfn, store_port, console_port, hvm, pae, apic]) log.debug("[xc_restore]: %s", string.join(cmd)) handler = RestoreInputHandler() forkHelper(cmd, fd, handler.handler, True) # We don't want to pass this fd to any other children -- we # might need to recover ths disk space that backs it. try: flags = fcntl.fcntl(fd, fcntl.F_GETFD) flags |= fcntl.FD_CLOEXEC fcntl.fcntl(fd, fcntl.F_SETFD, flags) except: pass if handler.store_mfn is None: raise XendError('Could not read store MFN') if not is_hvm and handler.console_mfn is None: raise XendError('Could not read console MFN') # get qemu state and create a tmp file for dm restore if is_hvm: qemu_signature = read_exact(fd, len(QEMU_SIGNATURE), "invalid device model signature read") if qemu_signature != QEMU_SIGNATURE: raise XendError("not a valid device model state: found '%s'" % qemu_signature) qemu_fd = os.open("/tmp/xen.qemu-dm.%d" % dominfo.getDomid(), os.O_WRONLY | os.O_CREAT | os.O_TRUNC) while True: buf = os.read(fd, dm_batch) if len(buf): write_exact(qemu_fd, buf, "could not write dm state to tmp file") else: break os.close(qemu_fd) os.read(fd, 1) # Wait for source to close connection dominfo.completeRestore(handler.store_mfn, handler.console_mfn) dominfo.waitForDevices() # Wait for backends to set up if not paused: dominfo.unpause() return dominfo except: dominfo.destroy() raise
02cb2d8016a6b918ac461d6297964349b6e90dd5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/02cb2d8016a6b918ac461d6297964349b6e90dd5/XendCheckpoint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 12, 7669, 16, 5194, 16, 4092, 1376, 273, 599, 16, 17781, 273, 1083, 4672, 3372, 273, 855, 67, 17165, 12, 8313, 16, 562, 12, 26587, 3631, 315, 902, 279, 923, 13051, 919, 585, 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, 5217, 12, 7669, 16, 5194, 16, 4092, 1376, 273, 599, 16, 17781, 273, 1083, 4672, 3372, 273, 855, 67, 17165, 12, 8313, 16, 562, 12, 26587, 3631, 315, 902, 279, 923, 13051, 919, 585, 30, ...
def func_matchedtracks(parser):
def func_matchedtracks(parser, arg):
def func_matchedtracks(parser): if parser.file: if parser.file.parent: return str(parser.file.parent.album.get_num_matched_tracks()) return "0"
fca91f432558924592c463bc97fc143586550abe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12415/fca91f432558924592c463bc97fc143586550abe/script.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 67, 11073, 21499, 12, 4288, 16, 1501, 4672, 309, 2082, 18, 768, 30, 309, 2082, 18, 768, 18, 2938, 30, 327, 609, 12, 4288, 18, 768, 18, 2938, 18, 25090, 18, 588, 67, 2107, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 67, 11073, 21499, 12, 4288, 16, 1501, 4672, 309, 2082, 18, 768, 30, 309, 2082, 18, 768, 18, 2938, 30, 327, 609, 12, 4288, 18, 768, 18, 2938, 18, 25090, 18, 588, 67, 2107, 67, ...
def set_state_name(self,ver,val,name): try: sql = "INSERT INTO state_vec (version,value,state) VALUES (%s,%s,%s)" self.cursor.execute(sql,(ver,val,name)) except _mysql_exceptions.IntegrityError, e: sql = "UPDATE state_vec SET state = '%s'" % name sql += "WHERE version = %s AND value = %s" % (ver,val) self.cursor.execute(sql) except Exception, e: msg = "Unable to state state name for state %s,%s : %s" % (ver,val,e) raise StateSegmentDatabaseException, msg def get_state_name(self,ver,val): """ Get the name of a state by version and value """ sql = "SELECT state from state_vec WHERE version = %s AND value = %s" % \ (ver,val) try: self.cursor.execute(sql) r = str(self.cursor.fetchall()[0][0]) except Excpetion, e: msg = "error getting state name : %s" % e raise StateSegmentDatabaseException, msg
def publish_state(self, ifo, start_time, start_time_ns, end_time, end_time_ns, ver, val ): """ Publish a state segment for a state vector in the database """
f244b54b9d47667fad81e311fc9edc9f74c51291 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/f244b54b9d47667fad81e311fc9edc9f74c51291/statedb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 67, 2019, 12, 2890, 16, 21479, 16, 787, 67, 957, 16, 787, 67, 957, 67, 2387, 16, 679, 67, 957, 16, 679, 67, 957, 67, 2387, 16, 1924, 16, 1244, 262, 30, 3536, 9761, 279, 919, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 67, 2019, 12, 2890, 16, 21479, 16, 787, 67, 957, 16, 787, 67, 957, 67, 2387, 16, 679, 67, 957, 16, 679, 67, 957, 67, 2387, 16, 1924, 16, 1244, 262, 30, 3536, 9761, 279, 919, ...
e.keysym_num = getint(N)
e.keysym_num = getint_event(N)
def _substitute(self, *args): """Internal function.""" if len(args) != len(self._subst_format): return args getboolean = self.tk.getboolean getint = int nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args # Missing: (a, c, d, m, o, v, B, R) e = Event() e.serial = getint(nsign) e.num = getint(b) try: e.focus = getboolean(f) except TclError: pass e.height = getint(h) e.keycode = getint(k) # For Visibility events, event state is a string and # not an integer: try: e.state = getint(s) except ValueError: e.state = s e.time = getint(t) e.width = getint(w) e.x = getint(x) e.y = getint(y) e.char = A try: e.send_event = getboolean(E) except TclError: pass e.keysym = K e.keysym_num = getint(N) e.type = T try: e.widget = self._nametowidget(W) except KeyError: e.widget = W e.x_root = getint(X) e.y_root = getint(Y) try: e.delta = getint(D) except ValueError: e.delta = 0 return (e,)
043bbc7da387f613f3ce60c20063e2a29baff372 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/043bbc7da387f613f3ce60c20063e2a29baff372/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 17207, 12, 2890, 16, 380, 1968, 4672, 3536, 3061, 445, 12123, 309, 562, 12, 1968, 13, 480, 562, 12, 2890, 6315, 1717, 334, 67, 2139, 4672, 327, 833, 336, 6494, 273, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 17207, 12, 2890, 16, 380, 1968, 4672, 3536, 3061, 445, 12123, 309, 562, 12, 1968, 13, 480, 562, 12, 2890, 6315, 1717, 334, 67, 2139, 4672, 327, 833, 336, 6494, 273, 365, 18,...
'Incomplete')
'Required')
def test_submit_invalid_number(self): browser.open(self.url) browser.wait_for_page_to_load("30000") browser.type('deformField1', 'notanumber') browser.click('submit') browser.wait_for_page_to_load("30000") self.failUnless(browser.is_element_present('css=.errorMsgLbl')) self.assertEqual(browser.get_text('css=#error-deformField1'), '"notanumber" is not a number') self.assertEqual(browser.get_text('css=#error-deformField3'), 'Required') self.assertEqual(browser.get_text('css=#error-deformField4'), 'Incomplete') self.assertEqual(browser.get_text('css=#captured'), 'None')
13cb71b44c6feb16905fb953ff7e20c1e115f87e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13087/13cb71b44c6feb16905fb953ff7e20c1e115f87e/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9297, 67, 5387, 67, 2696, 12, 2890, 4672, 4748, 18, 3190, 12, 2890, 18, 718, 13, 4748, 18, 7048, 67, 1884, 67, 2433, 67, 869, 67, 945, 2932, 23, 2787, 7923, 4748, 18, 723, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9297, 67, 5387, 67, 2696, 12, 2890, 4672, 4748, 18, 3190, 12, 2890, 18, 718, 13, 4748, 18, 7048, 67, 1884, 67, 2433, 67, 869, 67, 945, 2932, 23, 2787, 7923, 4748, 18, 723, ...
See also: AuthRoot
See also: L{AuthRoot}
def _authFail(self, result, d): d.callback(None)
9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1944, 3754, 12, 2890, 16, 563, 16, 302, 4672, 302, 18, 3394, 12, 7036, 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, ...
[ 1, 1, 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, 389, 1944, 3754, 12, 2890, 16, 563, 16, 302, 4672, 302, 18, 3394, 12, 7036, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print 'There are no articles in category ' + old_title
print 'There are no articles in category ' + old_cat_title
def rename_category(): old_title = wikipedia.input('Please enter the old name of the category: ') old_cat = catlib.CatLink(old_title) new_title = wikipedia.input('Please enter the new name of the category: ') new_cat = catlib.CatLink(new_title) # get edit summary message wikipedia.setAction(msg_change[wikipedia.chooselang(wikipedia.mylang,msg_change)] % old_title) articles = old_cat.articles(recurse = 0) if len(articles) == 0: print 'There are no articles in category ' + old_title else: for article in articles: change_category(article, old_cat, new_cat) subcategories = old_cat.subcategories(recurse = 0) if len(subcategories) == 0: print 'There are no subcategories in category ' + old_title else: for subcategory in subcategories: change_category(subcategory, old_cat, new_cat)
8fe4e1817561eb473c4b424b96ecd3c166227672 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/8fe4e1817561eb473c4b424b96ecd3c166227672/category.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6472, 67, 4743, 13332, 1592, 67, 2649, 273, 21137, 18, 2630, 2668, 8496, 6103, 326, 1592, 508, 434, 326, 3150, 30, 8624, 1592, 67, 2574, 273, 6573, 2941, 18, 11554, 2098, 12, 1673, 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, 6472, 67, 4743, 13332, 1592, 67, 2649, 273, 21137, 18, 2630, 2668, 8496, 6103, 326, 1592, 508, 434, 326, 3150, 30, 8624, 1592, 67, 2574, 273, 6573, 2941, 18, 11554, 2098, 12, 1673, 67, ...
self.logger.debug("RECORD_DICT %s:
if model._debug: self.logger.debug("RECORD_DICT %s:
def process_record(self, node): import osv record, fields = node.items()[0] model = self.get_model(record.model) if isinstance(model, osv.osv.osv_memory): record_dict=self.create_osv_memory_record(record, fields) else: self.validate_xml_id(record.id) if self.isnoupdate(record) and self.mode != 'init': id = self.pool.get('ir.model.data')._update_dummy(self.cr, self.uid, record.model, self.module, record.id) # check if the resource already existed at the last update if id: self.id_map[record] = int(id) return None else: if not self._coerce_bool(record.forcecreate): return None
037ce33d4fb3f29a0735e911a38da3a8e445152b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/037ce33d4fb3f29a0735e911a38da3a8e445152b/yaml_import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 3366, 12, 2890, 16, 756, 4672, 1930, 1140, 90, 1409, 16, 1466, 273, 756, 18, 3319, 1435, 63, 20, 65, 938, 273, 365, 18, 588, 67, 2284, 12, 3366, 18, 2284, 13, 309, 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, 1207, 67, 3366, 12, 2890, 16, 756, 4672, 1930, 1140, 90, 1409, 16, 1466, 273, 756, 18, 3319, 1435, 63, 20, 65, 938, 273, 365, 18, 588, 67, 2284, 12, 3366, 18, 2284, 13, 309, 1549, ...
opt['allowedTypes'] = [types.IntType, types.LongType, types.FloatType]
opt['allowedTypes'] = [int, long, float]
def addOption(self, pos=-1, **kwargs): ''' Append an entry to the parameter specification list. Dictionary entries should be specified as keyword arguments such as ``name='option'``. More specifically, you can specify parameters ``name`` (required), ``label``, ``default`` (required), ``description``, ``validator``, ``type``, and ``separator``. This option will have a name specified by ``name`` and an initial default value specified by ``default``.
0808dd362a5f2dd5d90d950500fd972461718062 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/0808dd362a5f2dd5d90d950500fd972461718062/simuOpt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12966, 12, 2890, 16, 949, 29711, 21, 16, 2826, 4333, 4672, 9163, 6181, 392, 1241, 358, 326, 1569, 7490, 666, 18, 16447, 3222, 1410, 506, 1269, 487, 4932, 1775, 4123, 487, 12176, 529, 221...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12966, 12, 2890, 16, 949, 29711, 21, 16, 2826, 4333, 4672, 9163, 6181, 392, 1241, 358, 326, 1569, 7490, 666, 18, 16447, 3222, 1410, 506, 1269, 487, 4932, 1775, 4123, 487, 12176, 529, 221...
% (name, rp.path), 6)
% (name, repr(rp.path)), 6)
def write_to_rp(self, rp): """Write extended attributes to rpath rp""" self.clear_rp(rp) for (name, value) in self.attr_dict.iteritems(): try: rp.conn.xattr.setxattr(rp.path, name, value) except IOError, exc: # Mac and Linux attributes have different namespaces, so # fail gracefully if can't call setxattr if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EACCES: log.Log("Warning: unable to write xattr %s to %s" % (name, rp.path), 6) continue else: raise
1a3b965ed028f2af11c9c1d9a82894cb61b65cbe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/783/1a3b965ed028f2af11c9c1d9a82894cb61b65cbe/eas_acls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 869, 67, 13832, 12, 2890, 16, 8715, 4672, 3536, 3067, 7021, 1677, 358, 436, 803, 8715, 8395, 365, 18, 8507, 67, 13832, 12, 13832, 13, 364, 261, 529, 16, 460, 13, 316, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 869, 67, 13832, 12, 2890, 16, 8715, 4672, 3536, 3067, 7021, 1677, 358, 436, 803, 8715, 8395, 365, 18, 8507, 67, 13832, 12, 13832, 13, 364, 261, 529, 16, 460, 13, 316, 365, ...
tui.Item('caller_results', show_label=False), tui.Item('file_inspector', show_label=False),
tui.UItem('caller_results'), tui.UItem('filename', style='readonly'), tui.UItem('code', editor=tui.CodeEditor(line='line')),
def getstats(cls, obj=None): self = cls(obj) return pstats.Stats(self)
1abb1fd080526092ab77808de73a8c00f92915ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/1abb1fd080526092ab77808de73a8c00f92915ef/sike.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5296, 12, 6429, 16, 1081, 33, 7036, 4672, 365, 273, 2028, 12, 2603, 13, 327, 293, 5296, 18, 4195, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5296, 12, 6429, 16, 1081, 33, 7036, 4672, 365, 273, 2028, 12, 2603, 13, 327, 293, 5296, 18, 4195, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.sap = sap self.debug = debug
self.sap = sap self.debug = debug
def __init__( self, outFolder='.', log=None, verbose=1, sap=1,
406e82ca95520c7badb9dbb830cadd182e043ec6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/406e82ca95520c7badb9dbb830cadd182e043ec6/Aligner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 596, 3899, 2218, 1093, 16, 613, 33, 7036, 16, 3988, 33, 21, 16, 18099, 33, 21, 16, 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, 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, 2738, 972, 12, 365, 16, 596, 3899, 2218, 1093, 16, 613, 33, 7036, 16, 3988, 33, 21, 16, 18099, 33, 21, 16, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return OrderedDict(self.data)
c = OrderedDict() for k, v in self.items(): c[k] = v return c
def copy(self): if self.__class__ is OrderedDict: return OrderedDict(self.data) import copy c = copy.copy(self) return c
8bb277ffae708f2c6654cd3c20482053f62fa8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/8bb277ffae708f2c6654cd3c20482053f62fa8a5/vocabulary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 4672, 309, 365, 16186, 1106, 972, 353, 9916, 30, 276, 273, 9916, 1435, 364, 417, 16, 331, 316, 365, 18, 3319, 13332, 276, 63, 79, 65, 273, 331, 327, 276, 1930, 1610, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 4672, 309, 365, 16186, 1106, 972, 353, 9916, 30, 276, 273, 9916, 1435, 364, 417, 16, 331, 316, 365, 18, 3319, 13332, 276, 63, 79, 65, 273, 331, 327, 276, 1930, 1610, ...
obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'node', obj_) self.content_.append(obj_) if hasattr(self, 'add_node'): self.add_node(obj_.value) elif hasattr(self, 'set_node'): self.set_node(obj_.value) elif nodeName_ == 'rootedge':
self.node.append(obj_) elif nodeName_ == 'rootedge':
def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'node': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <node> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'node', obj_) self.content_.append(obj_) if hasattr(self, 'add_node'): self.add_node(obj_.value) elif hasattr(self, 'set_node'): self.set_node(obj_.value) elif nodeName_ == 'rootedge': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <rootedge> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'rootedge', obj_) self.content_.append(obj_) if hasattr(self, 'add_rootedge'): self.add_rootedge(obj_.value) elif hasattr(self, 'set_rootedge'): self.set_rootedge(obj_.value) elif nodeName_ == 'edge': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <edge> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'edge', obj_) self.content_.append(obj_) if hasattr(self, 'add_edge'): self.add_edge(obj_.value) elif hasattr(self, 'set_edge'): self.set_edge(obj_.value) elif nodeName_ == 'set': obj_ = NodeAndRootEdgeAndEdgeSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractTree, self).buildChildren(child_, nodeName_, True)
9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4212, 12, 2890, 16, 1151, 67, 16, 7553, 67, 16, 628, 67, 10678, 33, 8381, 4672, 309, 7553, 67, 422, 296, 2159, 4278, 618, 67, 529, 67, 273, 1151, 27799, 14588, 18, 588, 2668, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4212, 12, 2890, 16, 1151, 67, 16, 7553, 67, 16, 628, 67, 10678, 33, 8381, 4672, 309, 7553, 67, 422, 296, 2159, 4278, 618, 67, 529, 67, 273, 1151, 27799, 14588, 18, 588, 2668, 9...
if not inCache: self._genobj._cache.write(cacheId, llist, True, False)
if not inCache: self._genobj._cache.write(cacheId, llist, memory=True, writeToFile=False)
def findAllResources(self, libraries, filter=None): """Find relevant resources/assets, implementing shaddowing of resources. Returns a list of resources, each a pair of [file_path, uri]""" result = [] # go through all libs (weighted) and collect necessary resources # fallback: take all resources libs = libraries[:] libs.reverse()
142b337f5bb954050e7d9c36ea777352d7e320ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/142b337f5bb954050e7d9c36ea777352d7e320ad/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11135, 3805, 12, 2890, 16, 14732, 16, 1034, 33, 7036, 4672, 3536, 3125, 9368, 2703, 19, 9971, 16, 19981, 699, 1289, 543, 310, 434, 2703, 18, 2860, 279, 666, 434, 2703, 16, 1517, 279, 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, 11135, 3805, 12, 2890, 16, 14732, 16, 1034, 33, 7036, 4672, 3536, 3125, 9368, 2703, 19, 9971, 16, 19981, 699, 1289, 543, 310, 434, 2703, 18, 2860, 279, 666, 434, 2703, 16, 1517, 279, 3...
gLogger.error(errStr,res['Value']['Successful'][lfn]) return S_ERROR("%s %s" % (errStr,res['Value']['Successful'][lfn]))
gLogger.error( errStr, res['Value']['Successful'][lfn] ) return S_ERROR( "%s %s" % ( errStr, res['Value']['Successful'][lfn] ) )
def putAndRegister(self,lfn,file,diracSE,guid=None,path=None,checksum=None,catalog=None): """ Put a local file to a Storage Element and register in the File Catalogues
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
return (1, rec_id)
return (1, int(rec_id))
def bibupload(record): """Main function: process a record and fit it in the tables bibfmt, bibrec, bibrec_bibxxx, bibxxx with proper record metadata. Return (error_code, recID) of the processed record. """ error = None # If there are special tags to proceed check if it exists in the record if options['tag'] is not None and not(record.has_key(options['tag'])): write_message(" Failed: Tag not found, enter a valid tag to update.", verbose=1, stream=sys.stderr) return (1, -1) # Extraction of the Record Id rec_id = retrieve_rec_id(record) if rec_id == -1: return (1, -1) else: write_message(" -Retrieve record Id (found %s): DONE." % rec_id, verbose=2) write_message(" -Check if the xml marc file is already in the database: DONE" , verbose=2) # Reference mode check if there are reference tag if options['mode'] == 'reference': error = extract_tag_from_record(record, CFG_BIBUPLOAD_REFERENCE_TAG) if error is None: write_message(" Failed: No reference tags has been found...", verbose=1, stream=sys.stderr) return (1, -1) else: error = None write_message(" -Check if reference tags exist: DONE", verbose=2) if options['mode'] == 'insert' or \ (options['mode'] == 'replace_or_insert' and rec_id is None): insert_mode_p = True # Insert the record into the bibrec databases to have a recordId rec_id = create_new_record() write_message(" -Creation of a new record id (%d): DONE" % rec_id, verbose=2) # we add the record Id control field to the record error = record_add_field(record, '001', '', '', rec_id, [], 0) if error is None: write_message(" Failed: " \ "Error during adding the 001 controlfield " \ "to the record", verbose=1, stream=sys.stderr) return (1, rec_id) else: error = None elif options['mode'] != 'insert' and options['mode'] != 'format' and options['stage_to_start_from'] != 5: insert_mode_p = False # Update Mode # Retrieve the old record to update rec_old = create_record(print_record(int(rec_id),'xm'), 2)[0] if rec_old is None: write_message(" Failed during the creation of the old record!", verbose=1, stream=sys.stderr) return (1, rec_id) else: write_message(" -Retrieve the old record to update: DONE", verbose=2) # Delete tags to correct in the record if options['mode'] == 'correct' or options['mode'] == 'reference': delete_tags_to_correct(record, rec_old) write_message(" -Delete the old tags to correct in the old record: DONE", verbose=2) # Append new tag to the old record and update the new record with the old_record modified if options['mode'] == 'append' or options['mode'] == 'correct' or options['mode'] == 'reference': record = append_new_tag_to_old_record(record, rec_old) write_message(" -Append new tags to the old record: DONE", verbose=2) # now we clear all the rows from bibrec_bibxxx from the old # record (they will be populated later (if needed) during # stage 4 below): delete_bibrec_bibxxx(rec_old, rec_id) write_message(" -Clean bibrec_bibxxx: DONE", verbose=2) write_message(" -Stage COMPLETED", verbose=2) # Have a look if we have FMT tags write_message("Stage 1: Start (Insert of FMT tags if exist).", verbose=2) if options['stage_to_start_from'] <= 1 and extract_tag_from_record(record, 'FMT') is not None: record = insert_fmt_tags(record, rec_id) if record is None: write_message(" Stage 1 failed: Error while inserting FMT tags", verbose=1, stream=sys.stderr) return (1, rec_id) elif record == 0: # Mode format finished stat['nb_records_updated'] += 1 return (0, rec_id) write_message(" -Stage COMPLETED", verbose=2) else: write_message(" -Stage NOT NEEDED", verbose=2) # Have a look if we have FFT tags write_message("Stage 2: Start (Process FFT tags if exist).", verbose=2) if options['stage_to_start_from'] <= 2 and extract_tag_from_record(record, 'FFT') is not None: if insert_mode_p or options['mode'] == 'append': record = insert_fft_tags(record, rec_id) else: record = update_fft_tag(record, rec_id) write_message(" -Stage COMPLETED", verbose=2) else: write_message(" -Stage NOT NEEDED", verbose=2) # Update of the BibFmt write_message("Stage 3: Start (Update bibfmt).", verbose=2) if options['stage_to_start_from'] <= 3: # format the single record as xml rec_xml_new = record_xml_output(record) # Update bibfmt with the format xm of this record if options['mode'] != 'format': error = update_bibfmt_format(rec_id, rec_xml_new, 'xm') if error == 1: write_message(" Failed: error during update_bibfmt_format", verbose=1, stream=sys.stderr) return (1, rec_id) write_message(" -Stage COMPLETED", verbose=2) # Update the database MetaData write_message("Stage 4: Start (Update the database with the metadata).", verbose=2) if options['stage_to_start_from'] <= 4: if options['mode'] == 'insert' or \ options['mode'] == 'replace' or \ options['mode'] == 'replace_or_insert' or \ options['mode'] == 'append' or \ options['mode'] == 'correct': update_database_with_metadata(record, rec_id) else: write_message(" -Stage NOT NEEDED in mode %s" % options['mode'], verbose=2) write_message(" -Stage COMPLETED", verbose=2) else: write_message(" -Stage NOT NEEDED", verbose=2) # Finally we update the bibrec table with the current date write_message("Stage 5: Start (Update bibrec table with current date).", verbose=2) if options['stage_to_start_from'] <= 5 and \ options['notimechange'] == 0 and \ not insert_mode_p: now = convert_datestruct_to_datetext(time.localtime()) write_message(" -Retrieved current localtime: DONE", verbose=2) update_bibrec_modif_date(now, rec_id) write_message(" -Stage COMPLETED", verbose=2) else: write_message(" -Stage NOT NEEDED", verbose=2) # Increase statistics if insert_mode_p: stat['nb_records_inserted'] += 1 else: stat['nb_records_updated'] += 1 # Upload of this record finish write_message("Record "+str(rec_id)+" DONE", verbose=1) return (0, rec_id)
0243ff56930f3eeeb8177dee05e1d171ad2cd8a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/0243ff56930f3eeeb8177dee05e1d171ad2cd8a8/bibupload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25581, 6327, 12, 3366, 4672, 3536, 6376, 445, 30, 1207, 279, 1409, 471, 4845, 518, 316, 326, 4606, 25581, 8666, 16, 25581, 3927, 16, 25581, 3927, 67, 70, 495, 18310, 16, 25581, 18310, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25581, 6327, 12, 3366, 4672, 3536, 6376, 445, 30, 1207, 279, 1409, 471, 4845, 518, 316, 326, 4606, 25581, 8666, 16, 25581, 3927, 16, 25581, 3927, 67, 70, 495, 18310, 16, 25581, 18310, 59...
"\\": "$\\backslash$", "\n" : "\\\\*\n",
"\\": "$\\backslash$", "\n" : "\\\\\n",
def TransformText(self, txt): """Transforms the given text into LaTeX format, by escaping all special characters and sequences. @param txt: text to transform @return: txt with all special characters transformed """ ch_map = { "#" : "\\#", "$" : "\\$", "^" : "\\^", "%" : "\\%", "&" : "\\&", "_" : "\\_", "{" : "\\{", "}" : "\\}", "~" : "\\~", "\\": "$\\backslash$", "\n" : "\\\\*\n", "@" : "$@$", "<" : "$<$", ">" : "$>$", "-" : "$-$", "|" : "$|$" } if ch_map.has_key(txt): return ch_map[txt] else: return txt
826c4d7d4eda720169c44f066328cdc8bd180194 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/826c4d7d4eda720169c44f066328cdc8bd180194/generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11514, 1528, 12, 2890, 16, 6463, 4672, 3536, 15236, 326, 864, 977, 1368, 21072, 21575, 60, 740, 16, 635, 20604, 777, 4582, 3949, 471, 8463, 18, 632, 891, 6463, 30, 977, 358, 2510, 632, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11514, 1528, 12, 2890, 16, 6463, 4672, 3536, 15236, 326, 864, 977, 1368, 21072, 21575, 60, 740, 16, 635, 20604, 777, 4582, 3949, 471, 8463, 18, 632, 891, 6463, 30, 977, 358, 2510, 632, ...
return idaapi.ExtraGet(ea, E_NEXT + num)
return idaapi.ExtraGet(ea, idaapi.E_NEXT + num)
def LineB(ea, num): """ Get posterior line @param ea: linear address @param num: number of posterior line (0..MAX_ITEM_LINES) @return: posterior line string """ return idaapi.ExtraGet(ea, E_NEXT + num)
6939f58f3c941e06747c6db91e8fa3b3aaf2c13e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6984/6939f58f3c941e06747c6db91e8fa3b3aaf2c13e/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5377, 38, 12, 24852, 16, 818, 4672, 3536, 968, 22089, 980, 225, 632, 891, 24164, 30, 9103, 1758, 632, 891, 818, 30, 1300, 434, 22089, 980, 261, 20, 838, 6694, 67, 12674, 67, 5997, 55, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5377, 38, 12, 24852, 16, 818, 4672, 3536, 968, 22089, 980, 225, 632, 891, 24164, 30, 9103, 1758, 632, 891, 818, 30, 1300, 434, 22089, 980, 261, 20, 838, 6694, 67, 12674, 67, 5997, 55, ...
(_check_duration, 'Error ! The duration of the Fiscal Year is invalid. ', ['date_stop'])
(_check_duration, 'Error ! The duration of the Fiscal Year is invalid. ', ['date_stop']), (_check_fiscal_year, 'Error ! This Fiscal Year overlaps an existing Fiscal Year',['date_start', 'date_stop'])
def _check_duration(self,cr,uid,ids): obj_fy=self.browse(cr,uid,ids[0]) if obj_fy.date_stop < obj_fy.date_start: return False return True
0d467eeea01a357ff900af7e3c1985980995335f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0d467eeea01a357ff900af7e3c1985980995335f/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 8760, 12, 2890, 16, 3353, 16, 1911, 16, 2232, 4672, 1081, 67, 74, 93, 33, 2890, 18, 25731, 12, 3353, 16, 1911, 16, 2232, 63, 20, 5717, 309, 1081, 67, 74, 93, 18, 712...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 67, 8760, 12, 2890, 16, 3353, 16, 1911, 16, 2232, 4672, 1081, 67, 74, 93, 33, 2890, 18, 25731, 12, 3353, 16, 1911, 16, 2232, 63, 20, 5717, 309, 1081, 67, 74, 93, 18, 712...
poll_fun (timeout, map)
poll_fun(timeout, map)
def loop (timeout=30.0, use_poll=0, map=None): if map is None: map = socket_map if use_poll: if hasattr (select, 'poll'): poll_fun = poll3 else: poll_fun = poll2 else: poll_fun = poll while map: poll_fun (timeout, map)
f7eb0d3f501f2e379b8719bda476d318d1e79160 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f7eb0d3f501f2e379b8719bda476d318d1e79160/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 261, 4538, 33, 5082, 18, 20, 16, 999, 67, 13835, 33, 20, 16, 852, 33, 7036, 4672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 225, 309, 999, 67, 13835, 30, 309, 3859, 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, 2798, 261, 4538, 33, 5082, 18, 20, 16, 999, 67, 13835, 33, 20, 16, 852, 33, 7036, 4672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 225, 309, 999, 67, 13835, 30, 309, 3859, 2...
self.message = repr(self)
def __init__(self, network, status, details): self.status = status self.details = details self.message = repr(self)
83bbe31b6656d9dbb03d26c06d278a468b8c730e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9926/83bbe31b6656d9dbb03d26c06d278a468b8c730e/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2483, 16, 1267, 16, 3189, 4672, 365, 18, 2327, 273, 1267, 365, 18, 6395, 273, 3189, 365, 18, 2150, 273, 8480, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2483, 16, 1267, 16, 3189, 4672, 365, 18, 2327, 273, 1267, 365, 18, 6395, 273, 3189, 365, 18, 2150, 273, 8480, 12, 2890, 13, 2, -100, -100, -100, -100, ...
server_version = "Python-urllib/%s" % __version__ self.addheaders = [('User-agent', server_version)]
client_version = "Python-urllib/%s" % __version__ self.addheaders = [('User-agent', client_version)]
def __init__(self): server_version = "Python-urllib/%s" % __version__ self.addheaders = [('User-agent', server_version)] # manage the individual handlers self.handlers = [] self.handle_open = {} self.handle_error = {} self.process_response = {} self.process_request = {}
ede67df1edd0500b9e1d733f9b42d47e7c2d506a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ede67df1edd0500b9e1d733f9b42d47e7c2d506a/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 1004, 67, 1589, 273, 315, 15774, 17, 718, 2941, 5258, 87, 6, 738, 1001, 1589, 972, 365, 18, 1289, 2485, 273, 306, 2668, 1299, 17, 5629, 2187, 1004, 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, 1001, 2738, 972, 12, 2890, 4672, 1004, 67, 1589, 273, 315, 15774, 17, 718, 2941, 5258, 87, 6, 738, 1001, 1589, 972, 365, 18, 1289, 2485, 273, 306, 2668, 1299, 17, 5629, 2187, 1004, 67,...
arguments = "''" req = "INSERT INTO JobCommands (JobID,Command,Arguments,ReceptionTime) "
arguments = "''" req = "INSERT INTO JobCommands (JobID,Command,Arguments,ReceptionTime) "
def setJobCommand(self,jobID,command,arguments=None): """ Store a command to be passed to the job together with the next heart beat """ ret = self._escapeString(jobID) if not ret['OK']: return ret jobID = ret['Value']
80754a3f17531def7cbc50d246e9e547c954723a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/80754a3f17531def7cbc50d246e9e547c954723a/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2278, 2189, 12, 2890, 16, 4688, 734, 16, 3076, 16, 7099, 33, 7036, 4672, 3536, 4994, 279, 1296, 358, 506, 2275, 358, 326, 1719, 9475, 598, 326, 1024, 3904, 485, 23795, 3536, 325, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2278, 2189, 12, 2890, 16, 4688, 734, 16, 3076, 16, 7099, 33, 7036, 4672, 3536, 4994, 279, 1296, 358, 506, 2275, 358, 326, 1719, 9475, 598, 326, 1024, 3904, 485, 23795, 3536, 325, ...
*host = strdup(address)
*host = land_strdup(address)
static def split_address(char const *address, char **host, int *port): char *colon = strrchr(address, ':') if colon: *host = land_calloc(colon - address + 1) strncpy(*host, address, colon - address) (*host)[colon - address] = '\0' *port = atoi(colon + 1) else: *host = strdup(address) *port = 0
4eb61e798256f12c03c487d14ad7817eac2632fa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/930/4eb61e798256f12c03c487d14ad7817eac2632fa/net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 760, 1652, 1416, 67, 2867, 12, 3001, 1866, 380, 2867, 16, 1149, 2826, 2564, 16, 509, 380, 655, 4672, 1149, 380, 22667, 273, 13736, 15182, 12, 2867, 16, 3921, 13, 309, 13336, 30, 380, 2564, 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, 760, 1652, 1416, 67, 2867, 12, 3001, 1866, 380, 2867, 16, 1149, 2826, 2564, 16, 509, 380, 655, 4672, 1149, 380, 22667, 273, 13736, 15182, 12, 2867, 16, 3921, 13, 309, 13336, 30, 380, 2564, 2...
self._errors["numberUnitsLost"] = self.error_class(["You have forgotten Loss reason"]) del cleaned_data["numberUnitsLost"] else: print 'ok' if my_damadged > 0: print 'hmm'
raise forms.ValidationError("You have forgotten to select the Loss Reason") return my_lr def clean_unitsDamagedReason(self): my_damage = self.cleaned_data.get('numberUnitsDamaged') my_dr = self.cleaned_data.get('unitsDamagedReason') if long(my_damage)>0: print 'hmm2'
def clean(self): cleaned_data = self.cleaned_data my_losses = cleaned_data.get('numberUnitsLost') my_lr = cleaned_data.get('unitsLostReason') my_damadged = cleaned_data.get('numberUnitsDamaged') my_dr = cleaned_data.get('unitsDamagedReason')
98959dbdb10174fc285daa151fcafa2459af00d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12559/98959dbdb10174fc285daa151fcafa2459af00d7/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 9426, 67, 892, 273, 365, 18, 6200, 329, 67, 892, 3399, 67, 30851, 273, 9426, 67, 892, 18, 588, 2668, 2696, 7537, 19024, 6134, 3399, 67, 10826, 273, 9426, 67, 892,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 9426, 67, 892, 273, 365, 18, 6200, 329, 67, 892, 3399, 67, 30851, 273, 9426, 67, 892, 18, 588, 2668, 2696, 7537, 19024, 6134, 3399, 67, 10826, 273, 9426, 67, 892,...
self.file.write(line1 + '\n')
nolint = '' if len(line1) > 80: nolint = ' // NOLINT' self.file.write(line1 + nolint + '\n')
def __WriteLine(self, line, ends_with_eol): """Given a signle line, writes it to a file, splitting if it's > 80 chars""" if len(line) >= 80: i = self.__FindSplit(line) if i > 0: line1 = line[0:i + 1] self.file.write(line1 + '\n') match = re.match("( +)", line1) indent = "" if match: indent = match.group(1) splitter = line[i] if not splitter == ',': indent = " " + indent self.__WriteLine(indent + line[i + 1:].lstrip(), True) return self.file.write(line) if ends_with_eol: self.file.write('\n')
0bfd9882d39c63727676616ef1401d7618fdd26c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/0bfd9882d39c63727676616ef1401d7618fdd26c/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3067, 1670, 12, 2890, 16, 980, 16, 3930, 67, 1918, 67, 30951, 4672, 3536, 6083, 279, 1573, 298, 980, 16, 7262, 518, 358, 279, 585, 16, 20347, 309, 518, 1807, 405, 8958, 5230, 839...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3067, 1670, 12, 2890, 16, 980, 16, 3930, 67, 1918, 67, 30951, 4672, 3536, 6083, 279, 1573, 298, 980, 16, 7262, 518, 358, 279, 585, 16, 20347, 309, 518, 1807, 405, 8958, 5230, 839...
sage: gap.eval('LoadPackage("hap")') 'true'
def cohomology(self, n, p = 0): r""" Computes the group cohomology H_n(G, F), where F = Z if p=0 and F = Z/pZ if p >0 is a prime. Wraps HAP's GroupHomology function, written by Graham Ellis.
2aab0e46e038cb99ddd82ff3767ef8540acf0c86 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2aab0e46e038cb99ddd82ff3767ef8540acf0c86/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1825, 17125, 4676, 12, 2890, 16, 290, 16, 293, 273, 374, 4672, 436, 8395, 14169, 281, 326, 1041, 1825, 17125, 4676, 670, 67, 82, 12, 43, 16, 478, 3631, 1625, 478, 273, 2285, 309, 293, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1825, 17125, 4676, 12, 2890, 16, 290, 16, 293, 273, 374, 4672, 436, 8395, 14169, 281, 326, 1041, 1825, 17125, 4676, 670, 67, 82, 12, 43, 16, 478, 3631, 1625, 478, 273, 2285, 309, 293, ...
self.dbLocks[ self.__getTableName( "bucket", typeName ) ].acquire() try: bucketStartTime = bucketInfo[0] bucketLength = bucketInfo[2] proportionalValues = [] for value in valuesList: proportionalValues.append( value * bucketInfo[1] ) retVal = self.__updateBucket( typeName, bucketStartTime, bucketLength, keyValues, proportionalValues, connObj = connObj ) if not retVal[ 'OK' ]: return retVal if retVal[ 'Value' ] == 0: retVal = self.__insertBucket( typeName, bucketStartTime, bucketLength, keyValues, proportionalValues, connObj = connObj ) if not retVal[ 'OK' ]: return retVal finally: self.dbLocks[ self.__getTableName( "bucket", typeName ) ].release()
bucketStartTime = bucketInfo[0] bucketLength = bucketInfo[2] proportionalValues = [] for value in valuesList: proportionalValues.append( value * bucketInfo[1] ) retVal = self.__insertBucket( typeName, bucketStartTime, bucketLength, keyValues, proportionalValues, connObj = connObj ) if retVal[ 'OK' ]: continue if retVal[ 'Message' ].find( 'Duplicate entry' ) == -1: return retVal retVal = self.__updateBucket( typeName, bucketStartTime, bucketLength, keyValues, proportionalValues, connObj = connObj ) if not retVal[ 'OK' ]: return retVal
def __splitInBuckets( self, typeName, startTime, endTime, valuesList, connObj = False ): """ Bucketize a record """ #Calculate amount of buckets buckets = self.calculateBuckets( typeName, startTime, endTime ) #Separate key values from normal values numKeys = len( self.dbCatalog[ typeName ][ 'keys' ] ) keyValues = valuesList[ :numKeys ] valuesList = valuesList[ numKeys: ] gLogger.verbose( "Splitting entry", " in %s buckets" % len( buckets ) ) for bucketInfo in buckets: self.dbLocks[ self.__getTableName( "bucket", typeName ) ].acquire() try: bucketStartTime = bucketInfo[0] bucketLength = bucketInfo[2] #Calculate proportional values proportionalValues = [] for value in valuesList: proportionalValues.append( value * bucketInfo[1] ) #Update! retVal = self.__updateBucket( typeName, bucketStartTime, bucketLength, keyValues, proportionalValues, connObj = connObj ) if not retVal[ 'OK' ]: return retVal #Check if we didn't update any row. If that's the case.. #INSERT! if retVal[ 'Value' ] == 0: retVal = self.__insertBucket( typeName, bucketStartTime, bucketLength, keyValues, proportionalValues, connObj = connObj ) if not retVal[ 'OK' ]: return retVal finally: self.dbLocks[ self.__getTableName( "bucket", typeName ) ].release() return S_OK()
13b41032681fed093279f250f41a8f53aa4fff7b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/13b41032681fed093279f250f41a8f53aa4fff7b/AccountingDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4939, 382, 14517, 12, 365, 16, 8173, 16, 8657, 16, 13859, 16, 924, 682, 16, 1487, 2675, 273, 1083, 262, 30, 3536, 7408, 554, 279, 1409, 3536, 468, 8695, 3844, 434, 9169, 9169, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4939, 382, 14517, 12, 365, 16, 8173, 16, 8657, 16, 13859, 16, 924, 682, 16, 1487, 2675, 273, 1083, 262, 30, 3536, 7408, 554, 279, 1409, 3536, 468, 8695, 3844, 434, 9169, 9169, 27...
complete_url = "http://%s%s" % ( Site.objects.get_current().domain, reverse('notification_notices'), )
complete_url = "%s://%s%s" % ( DEFAULT_HTTP_PROTOCOL, Site.objects.get_current().domain, reverse('notification_notices'), )
def feed_links(self, user): complete_url = "http://%s%s" % ( Site.objects.get_current().domain, reverse('notification_notices'), ) return ({'href': complete_url},)
bd95ae7ee579679f01d6c9166d74adf85c8b8cce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11515/bd95ae7ee579679f01d6c9166d74adf85c8b8cce/feeds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4746, 67, 7135, 12, 2890, 16, 729, 4672, 3912, 67, 718, 273, 2213, 87, 23155, 87, 9, 87, 6, 738, 261, 3331, 67, 3693, 67, 16850, 16, 9063, 18, 6911, 18, 588, 67, 2972, 7675, 4308, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4746, 67, 7135, 12, 2890, 16, 729, 4672, 3912, 67, 718, 273, 2213, 87, 23155, 87, 9, 87, 6, 738, 261, 3331, 67, 3693, 67, 16850, 16, 9063, 18, 6911, 18, 588, 67, 2972, 7675, 4308, ...
self.state = not(self.dbusObj.GetResourceState(self.resource))
self.state = True if self.dbusObj.GetResourcePolicy(self.resource) == "enabled" else False
def update(self): """ Set the object state to be opposite the current state of the resource Set the toggle to the object state """ self.state = not(self.dbusObj.GetResourceState(self.resource)) self.toggle.state_set(self.state)
288b28b5a57a8cc797a6e177ae7aa397d28a18c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11428/288b28b5a57a8cc797a6e177ae7aa397d28a18c3/shr_pm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 3536, 1000, 326, 733, 919, 358, 506, 20759, 326, 783, 919, 434, 326, 1058, 1000, 326, 10486, 358, 326, 733, 919, 3536, 365, 18, 2019, 273, 1053, 309, 365, 18, 196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3536, 1000, 326, 733, 919, 358, 506, 20759, 326, 783, 919, 434, 326, 1058, 1000, 326, 10486, 358, 326, 733, 919, 3536, 365, 18, 2019, 273, 1053, 309, 365, 18, 196...
if child.type == "commentsBefore" or child.type == "comments":
if child.type == "commentsBefore" or child.type == "comment":
def compileNode(node, level=0, enableNewLines=False, enableDebug=False): if enableDebug: indentPrint(level, "%s (%s)" % (node.type, node.get("line", False))) compString = "" ################################################################## # Opening... ################################################################## if node.type == "map": compString += "{" elif node.type == "array": compString += "[" elif node.type == "block": compString += "{" elif node.type == "params": compString += "(" elif node.type == "group": compString += "(" elif node.type == "case": compString += "case " elif node.type == "catch": compString += "catch" elif node.type == "finally": compString += "finally" elif node.type == "delete": compString += "delete " elif node.type == "break": compString += "break" if node.get("label", False): compString += " " + node.get("label", False) elif node.type == "continue": compString += "continue" if node.get("label", False): compString += " " + node.get("label", False) elif node.type == "elseStatement": # This was a (if)statement without a block around (a set of {}) if not node.parent.getChild("statement").hasChild("block"): if not compString.endswith(";") and not compString.endswith("\n"): compString += ";" if enableNewLines: compString += "\n" compString += "else" # This is a elseStatement without a block around (a set of {}) if not node.hasChild("block"): compString += " " elif node.type == "switch" and node.get("switchType") == "case": compString += "switch" elif node.type == "switch" and node.get("switchType") == "catch": compString += "try" elif node.type == "throw": compString += "throw " elif node.type == "instantiation": compString += "new " elif node.type == "return": compString += "return" if node.hasChildren(): compString += " " elif node.type == "definitionList": compString += "var " elif node.type == "default": compString += "default:" elif node.type == "try": compString += "try:" elif node.type == "keyvalue": keyString = node.get("key") keyQuote = node.get("quotation", False) if keyQuote != None: # print "USE QUOTATION" if keyQuote == "doublequotes": keyString = '"' + keyString + '"' else: keyString = "'" + keyString + "'" elif keyString in config.JSPROTECTED or not KEY.match(keyString): print "ATTENTION: Auto protect key: %s" % keyString keyString = "\"" + keyString + "\"" compString += keyString + ":" elif node.type == "expression": if node.parent.type == "loop": loopType = node.parent.get("loopType") if loopType == "DO": compString += "while" # open expression block of IF/WHILE/DO-WHILE/FOR statements compString += "(" elif node.parent.type == "catch": # open expression block of CATCH statement compString += "(" elif node.parent.type == "switch" and node.parent.get("switchType") == "case": # open expression block of SWITCH statement compString += "(" elif node.type == "loop": loopType = node.get("loopType") if loopType == "IF": compString += "if" elif loopType == "WHILE": compString += "while" elif loopType == "FOR": compString += "for" elif loopType == "DO": compString += "do" elif loopType == "WITH": compString += "with" else: print "UNKNOWN LOOP TYPE: %s" % loopType elif node.type == "function": functionDeclHasParams = False compString += "function" functionName = node.get("name", False) if functionName != None: compString += " %s" % functionName elif node.type == "identifier": name = node.get("name", False) if name != None: compString += name elif node.type == "call": callHasParams = False elif node.type == "definition": if node.parent.type != "definitionList": compString += "var " compString += node.get("identifier") elif node.type == "constant": if node.get("constantType") == "string": if node.get("detail") == "singlequotes": compString += "'" else: compString += '"' compString += node.get("value") if node.get("detail") == "singlequotes": compString += "'" else: compString += '"' else: compString += node.get("value") elif node.type == "third": if node.parent.type == "operation": if node.parent.get("operator") == "HOOK": compString += ":" else: print "Unknown third argument... Not a hook" elif node.type == "labelTerminator": compString += ":" ################################################################## # Children content ################################################################## if node.hasChildren(): childPosition = 1 childrenNumber = 0 # We need to ignore comment blocks # childrenNumber = len(node.children) for child in node.children: if not (child.type == "commentsBefore" or child.type == "comments"): childrenNumber += 1 previousType = None separators = [ "block", "assignment", "call", "operation", "definition", "definitionList", "return", "loop", "switch", "break", "continue", "default", "case", "delete", "accessor", "instantiation", "throw", "variable", "function" ] not_after = [ "case", "default" ] not_in = [ "definitionList", "statementList", "params", "variable", "array" ] for child in node.children: if child.type == "commentsBefore" or child.type == "comments": continue # Hints for close of node later if node.type == "call" and child.type == "params": callHasParams = True elif node.type == "function": if child.type == "params": functionDeclHasParams = True elif child.type == "body" and not functionDeclHasParams: # has no params before body, fix it here, and add body afterwards compString += "()" functionDeclHasParams = True elif node.type == "definition" and child.type == "assignment": oper = child.get("operator", False) if oper != None: compString += getTokenSource(oper) else: compString += "=" elif node.type == "accessor" and child.type == "key": compString += "[" elif node.type == "accessor" and child.type == "right": compString += "." elif node.type == "loop" and node.get("loopType") == "FOR": if child.type == "first": compString += "(" elif child.type == "statement": compString += ")" else: if child.type == "second" and node.getChild("first", False) == None: compString += "(" if child.type == "third" and node.getChild("first", False) == None and node.getChild("second", False) == None: compString += "(" if not compString.endswith(";") and not compString.endswith("\n"): compString += ";" if enableNewLines: compString += "\n" elif node.type == "operation" and node.get("left", False) == "true": op = node.get("operator") if op == "TYPEOF": compString += "typeof " elif op == None: print "BAD OPERATOR [A]: %s" % op else: compString += getTokenSource(op) # Separate execution blocks elif not node.type in not_in: if previousType in separators and child.type in separators: if not previousType in not_after: if not compString.endswith(";") and not compString.endswith("\n"): if enableDebug: compString += ";/*[Parent:%s|Previous:%s|Child:%s]*/" % (node.type, previousType, child.type) else: compString += ";" if enableNewLines: compString += "\n" # Add child compString += compileNode(child, level+1, enableNewLines, enableDebug) if node.type == "operation" and child.type == "first" and node.get("left", False) != "true": op = node.get("operator") if op == "IN": compString += " in " elif op == "INSTANCEOF": compString += " instanceof " elif op == None: print "BAD OPERATOR [B]: %s" % op else: compString += getTokenSource(op) elif node.type == "assignment" and child.type == "left": oper = node.get("operator", False) if oper != None: compString += getTokenSource(oper) else: compString += "=" elif node.type == "accessor" and child.type == "key": compString += "]" # Separate children in parent list if childPosition < childrenNumber: if node.type == "variable": compString += "." elif node.type == "map": compString += "," if enableNewLines: compString += "\n" elif node.type == "array": compString += "," if enableNewLines: compString += "\n" elif node.type == "definitionList": compString += "," if enableNewLines: compString += "\n" elif node.type == "params": compString += "," if enableNewLines: compString += "\n" elif node.type == "statementList": compString += "," if enableNewLines: compString += "\n" # Next... childPosition += 1 previousType = child.type ################################################################## # Closing... ################################################################## if node.type == "map": compString += "}" elif node.type == "array": compString += "]" elif node.type == "block": compString += "}" elif node.type == "params": compString += ")" elif node.type == "switch" and node.get("switchType") == "case": compString += "}" elif node.type == "group": compString += ")" elif node.type == "case": compString += ":" elif node.type == "call" and not callHasParams: compString += "()" elif node.type == "function" and not functionDeclHasParams: compString += "()" elif node.type == "expression": if node.parent.type == "loop": compString += ")" elif node.parent.type == "catch": compString += ")" elif node.parent.type == "switch" and node.parent.get("switchType") == "case": compString += "){" return compString
02e6638f8ae1d3519ce6bf9ec88036b41df3e636 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/02e6638f8ae1d3519ce6bf9ec88036b41df3e636/treecompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 907, 12, 2159, 16, 1801, 33, 20, 16, 4237, 1908, 5763, 33, 8381, 16, 4237, 2829, 33, 8381, 4672, 225, 309, 4237, 2829, 30, 3504, 5108, 12, 2815, 16, 2213, 87, 6142, 87, 2225, 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, 4074, 907, 12, 2159, 16, 1801, 33, 20, 16, 4237, 1908, 5763, 33, 8381, 16, 4237, 2829, 33, 8381, 4672, 225, 309, 4237, 2829, 30, 3504, 5108, 12, 2815, 16, 2213, 87, 6142, 87, 2225, 7...
if interval is None: return
if (interval is None) or isinstance(interval, Undefined): return
def extend_to_cluster(axis, interval): if interval is None: return assert universe.cell_active[axis] interval.sort() index_min = int(math.floor(interval[0])) index_max = int(math.ceil(interval[1]))
49f522a8b0b1b57c3d1903380f0a56cf685df77a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11052/49f522a8b0b1b57c3d1903380f0a56cf685df77a/universe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2133, 67, 869, 67, 7967, 12, 4890, 16, 3673, 4672, 309, 261, 6624, 353, 599, 13, 578, 1549, 12, 6624, 16, 22243, 4672, 327, 1815, 29235, 18, 3855, 67, 3535, 63, 4890, 65, 3673, 18, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2133, 67, 869, 67, 7967, 12, 4890, 16, 3673, 4672, 309, 261, 6624, 353, 599, 13, 578, 1549, 12, 6624, 16, 22243, 4672, 327, 1815, 29235, 18, 3855, 67, 3535, 63, 4890, 65, 3673, 18, 3...
subset = np.argwhere(mask)
subset = np.argwhere(mask).ravel()
def __init__(self, atoms, scale=1):
48896e1aeeac16eba1b21e288a75107c0bf5838f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/48896e1aeeac16eba1b21e288a75107c0bf5838f/atoms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9006, 16, 3159, 33, 21, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9006, 16, 3159, 33, 21, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 112) else quickfix.StringField.__init__(self, 112, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 23543, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 972, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 23543, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 972, ...
if self._eoln != '\n': import EasyDialogs ok = EasyDialogs.AskYesNoCancel('Warning: "%s" does not have Unix line-endings' % self.title, 1, yes='OK', no='') if not ok: return
def _run(self): if self.run_with_interpreter: if self.editgroup.editor.changed: import EasyDialogs import Qd; Qd.InitCursor() save = EasyDialogs.AskYesNoCancel('Save "%s" before running?' % self.title, 1) if save > 0: if self.domenu_save(): return elif save < 0: return if not self.path: raise W.AlertError, "Can't run unsaved file" self._run_with_interpreter() elif self.run_with_cl_interpreter: # Until universal newline support if self._eoln != '\n': import EasyDialogs ok = EasyDialogs.AskYesNoCancel('Warning: "%s" does not have Unix line-endings' % self.title, 1, yes='OK', no='') if not ok: return if self.editgroup.editor.changed: import EasyDialogs import Qd; Qd.InitCursor() save = EasyDialogs.AskYesNoCancel('Save "%s" before running?' % self.title, 1) if save > 0: if self.domenu_save(): return elif save < 0: return if not self.path: raise W.AlertError, "Can't run unsaved file" self._run_with_cl_interpreter() else: pytext = self.editgroup.editor.get() globals, file, modname = self.getenvironment() self.execstring(pytext, globals, globals, file, modname)
b77eb4a1b3abec0b16ec7aa39cc67bba67af6641 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b77eb4a1b3abec0b16ec7aa39cc67bba67af6641/PyEdit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 2890, 4672, 309, 365, 18, 2681, 67, 1918, 67, 2761, 11599, 30, 309, 365, 18, 4619, 1655, 18, 9177, 18, 6703, 30, 1930, 29442, 11885, 14072, 1930, 2238, 72, 31, 2238, 72,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 2890, 4672, 309, 365, 18, 2681, 67, 1918, 67, 2761, 11599, 30, 309, 365, 18, 4619, 1655, 18, 9177, 18, 6703, 30, 1930, 29442, 11885, 14072, 1930, 2238, 72, 31, 2238, 72,...
v="'%s'" % escape(unicode(v))
v=expand("%r", v)
def mass_insert(self, args=None, **columns): """ Starts a mass insert operation. When done adding rows, call commit_mass_insert to finalise the insert. """ if args: columns = args for k,v in columns.items(): ## _field means to pass the field if k.startswith("__"): v="_binary'%s'" % escape(v) k=k[2:] elif k.startswith('_'): k=k[1:] else: v="'%s'" % escape(unicode(v)) try: self.mass_insert_cache[k][self.mass_insert_row_count]=v except: self.mass_insert_cache[k]={ self.mass_insert_row_count: v}
f0b775399a715f59c0fdd3844b797af063579f88 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5568/f0b775399a715f59c0fdd3844b797af063579f88/DB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8039, 67, 6387, 12, 2890, 16, 833, 33, 7036, 16, 2826, 5112, 4672, 3536, 30620, 279, 8039, 2243, 1674, 18, 5203, 2731, 6534, 2595, 16, 745, 3294, 67, 10424, 67, 6387, 358, 727, 784, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8039, 67, 6387, 12, 2890, 16, 833, 33, 7036, 16, 2826, 5112, 4672, 3536, 30620, 279, 8039, 2243, 1674, 18, 5203, 2731, 6534, 2595, 16, 745, 3294, 67, 10424, 67, 6387, 358, 727, 784, 32...
self.shutdownAudio()
def stillFrame(self): """Tell the pipeline that a still frame was sent.""" gst.debug("still frame")
0895d5a15d65903df4f3bb9421f42a4d134a8e1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/0895d5a15d65903df4f3bb9421f42a4d134a8e1a/manager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4859, 3219, 12, 2890, 4672, 3536, 21009, 326, 5873, 716, 279, 4859, 2623, 1703, 3271, 12123, 314, 334, 18, 4148, 2932, 334, 737, 2623, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 4859, 3219, 12, 2890, 4672, 3536, 21009, 326, 5873, 716, 279, 4859, 2623, 1703, 3271, 12123, 314, 334, 18, 4148, 2932, 334, 737, 2623, 7923, 2, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(self, path, slow, allow_oom, tmflags, valgrind):
def __init__(self, path, slow, allow_oom, tmflags, error, valgrind):
def __init__(self, path, slow, allow_oom, tmflags, valgrind): """ path path to test file slow True means the test is slow-running allow_oom True means OOM should not be considered a failure valgrind True means test should run under valgrind """ self.path = path self.slow = slow self.allow_oom = allow_oom self.tmflags = tmflags self.valgrind = valgrind
e01f5d4040d56bba7d4c39d7dffd3bba721fd46a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/e01f5d4040d56bba7d4c39d7dffd3bba721fd46a/trace-test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 16, 11816, 16, 1699, 67, 4252, 16, 6118, 7133, 16, 555, 16, 1244, 3197, 728, 4672, 3536, 225, 589, 3639, 589, 358, 1842, 585, 11816, 3639, 1053, 469...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 16, 11816, 16, 1699, 67, 4252, 16, 6118, 7133, 16, 555, 16, 1244, 3197, 728, 4672, 3536, 225, 589, 3639, 589, 358, 1842, 585, 11816, 3639, 1053, 469...
show_error(error.message)
print "error:", error.message
def extract_iso(filename, dest): filename = os.path.abspath(filename) rename = None url = urlparse(dest) if not url[0]: try: os.makedirs(url[2]) except OSError: pass writer = FileWriter(dest) else: if url[0] == "ftp": tmp, ftp_ip = url[1].split("@") ftp_login, ftp_password = tmp.split(":") ftp_folder = url[2] if ftp_folder[-1] != "/": ftp_folder += "/" try: name = self.create_tmp_folder(ftp_ip,ftp_login,ftp_password,ftp_folder) except ExtractError, error: show_error(error.message) return rename = name writer = FTPWriter(ftp_ip, ftp_login, ftp_password, ftp_folder) print "creating temp folder:", name print "'%s' '%s' '%s' '%s'" % (username, password, hostname, folder) else: print "only ftp protocol is supported in URLs" return starttime = time.time() xiso = XisoExtractor(writer) thread.start_new_thread(xiso.extract, (filename,)) while xiso.active and not xiso.canceled: if xiso.write_position == 0: print "%s starting...\r" % (["\\","-","/","|"] [ int(time.time()) % 4 ]) else: if xiso.iso.size: fraction = 100.0 * float(xiso.write_position)/float(xiso.iso.size) mean_speed = xiso.write_position/(time.time()-starttime) / (1024.0*1024.0) print "%3.2f%% %3.2fMiB/s %s \r" % ( fraction, mean_speed, xiso.current_file ) time.sleep(1) if rename: try: writer = FTPWriter(ftp_ip, ftp_login, ftp_password, ftp_folder) writer.init() if xiso.canceled: log( "deleting: %s" % (ftp_base_folder+tmp_folder) ) ftp_delete_folder(writer.session, ftp_base_folder, tmp_folder) elif xiso.xbe_name: writer.chdir(ftp_base_folder) newname = self.xboxify_filename(xiso.xbe_name) log( "deleting: %s" % (ftp_base_folder+newname) ) ftp_delete_folder(writer.session, ftp_base_folder, newname) log( "renaming: %s -> %s" % (rename, newname) ) if not writer.rename(rename, newname): show_error( _("Cannot rename <i>%s</i> to <i>%s</i>") \ % (rename, newname) ) except ExtractError, error: show_error(error.message) if xiso.error: print "error: ", xiso.error elif not xiso.canceled: log( "done! (in %ds, %.3f MiB/s)" % (time.time()-starttime,xiso.write_position/(time.time()-starttime)/(1024*1024.0)))
6386e84181816a627a0dedb6b6df21ea08a8ac85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2692/6386e84181816a627a0dedb6b6df21ea08a8ac85/gxiso.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 9699, 12, 3459, 16, 1570, 4672, 225, 1544, 273, 1140, 18, 803, 18, 5113, 803, 12, 3459, 13, 6472, 273, 599, 225, 880, 273, 15185, 12, 10488, 13, 309, 486, 880, 63, 20, 1454...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 9699, 12, 3459, 16, 1570, 4672, 225, 1544, 273, 1140, 18, 803, 18, 5113, 803, 12, 3459, 13, 6472, 273, 599, 225, 880, 273, 15185, 12, 10488, 13, 309, 486, 880, 63, 20, 1454...
self.connectionInit = True
self.connectionInit = True self.defaultBufSize = 128*1024 self.socket = socket self.socketInfo = {"localip":"127.0.0.1","localport":0,"remoteip":"127.0.0.1","remoteport":0} self.readLock = getlock() self.writeLock = getlock() self.callbackFunction = None self.pendingSockets = {} self.referenceCounter = 0 self.virtualSockets = {} self.virtualSocketsLock = getlock() self.stopSocketReader = False for key, value in info.items(): self.socketInfo[key] = value settimer(0, self._socketReader, ()) else: raise ValueError, "Must pass in a valid socket!"
def __init__(self, socket): """ <Purpose> Initializes the Multiplexer object. <Arguments> socket: Socket like object that is used for multiplexing """ # Setup the socket self.socket = socket # If we are given a socket, assume it is setup if socket != None: self.connectionInit = True
c37b97bba15a8b09425588f9b67749b496d89933 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/c37b97bba15a8b09425588f9b67749b496d89933/Multiplexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2987, 4672, 3536, 411, 10262, 4150, 34, 10188, 3128, 326, 13531, 92, 264, 733, 18, 225, 411, 4628, 34, 2987, 30, 8758, 3007, 733, 716, 353, 1399, 364, 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, 1001, 2738, 972, 12, 2890, 16, 2987, 4672, 3536, 411, 10262, 4150, 34, 10188, 3128, 326, 13531, 92, 264, 733, 18, 225, 411, 4628, 34, 2987, 30, 8758, 3007, 733, 716, 353, 1399, 364, 30...
if len(add_members) > 0: try:
if len(add_members) > 0: try:
def updateShareOrDiscussion (self, host, blitz_id, share_id, message, add_members, rm_members, enable, expiration=None): sh = self.getShareService() sh.setDescription(long(share_id), message) sh.setExpiration(long(share_id), expiration) sh.setActive(long(share_id), enable) if len(add_members) > 0: sh.addUsers(long(share_id), add_members) if len(rm_members) > 0: sh.removeUsers(long(share_id), rm_members) #send email if avtive if settings.EMAIL_NOTIFICATION:
c1a7e81de1d84fefff2b48212730f46205314803 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/c1a7e81de1d84fefff2b48212730f46205314803/gateway.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 9535, 1162, 24393, 261, 2890, 16, 1479, 16, 2811, 305, 94, 67, 350, 16, 7433, 67, 350, 16, 883, 16, 527, 67, 7640, 16, 6692, 67, 7640, 16, 4237, 16, 7686, 33, 7036, 4672, 699, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9535, 1162, 24393, 261, 2890, 16, 1479, 16, 2811, 305, 94, 67, 350, 16, 7433, 67, 350, 16, 883, 16, 527, 67, 7640, 16, 6692, 67, 7640, 16, 4237, 16, 7686, 33, 7036, 4672, 699, ...
def item_cget(self, col, opt): return self.tk.call(self._w, 'item', 'cget', col, opt)
def item_cget(self, entry, col, opt): return self.tk.call(self._w, 'item', 'cget', entry, col, opt)
def item_cget(self, col, opt): return self.tk.call(self._w, 'item', 'cget', col, opt)
09839d0471d4c3a58d2a3d8901b9a51df575aa68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/09839d0471d4c3a58d2a3d8901b9a51df575aa68/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 761, 67, 71, 588, 12, 2890, 16, 225, 645, 16, 2153, 4672, 327, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 1726, 2187, 296, 71, 588, 2187, 645, 16, 2153, 13, 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, 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, 761, 67, 71, 588, 12, 2890, 16, 225, 645, 16, 2153, 4672, 327, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 1726, 2187, 296, 71, 588, 2187, 645, 16, 2153, 13, 2, -100, -1...
Otherwise, it adds the entity tag as as "ETag" header to the response so that consequetive requests can be cached.
Otherwise, it adds the entity tag as an "ETag" header to the response so that consecutive requests can be cached.
def check_modified(self, timesecs, extra=''): """Check the request "If-None-Match" header against an entity tag generated from the specified last modified time in seconds (`timesecs`), optionally appending an `extra` string to indicate variants of the requested resource. That `extra` parameter can also be a list, in which case the MD5 sum of the list content will be used.
cc71f2b76457ee37324fa62174da1dd773f5015a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/cc71f2b76457ee37324fa62174da1dd773f5015a/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 7342, 12, 2890, 16, 4124, 557, 87, 16, 2870, 2218, 11, 4672, 3536, 1564, 326, 590, 315, 2047, 17, 7036, 17, 2060, 6, 1446, 5314, 392, 1522, 1047, 4374, 628, 326, 1269, 1142, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 7342, 12, 2890, 16, 4124, 557, 87, 16, 2870, 2218, 11, 4672, 3536, 1564, 326, 590, 315, 2047, 17, 7036, 17, 2060, 6, 1446, 5314, 392, 1522, 1047, 4374, 628, 326, 1269, 1142, ...
if size == 0: return "".join(bufs)
if size == 0: return bufs
def readline(self, size=-1): if size < 0: size = sys.maxint bufs = [] readsize = min(100, size) # Read from the file in small chunks while True: if size == 0: return "".join(bufs) # Return resulting line
7f62a06ba6b9a436fe201b64c59bfdfc6725fa8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7f62a06ba6b9a436fe201b64c59bfdfc6725fa8c/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 309, 963, 411, 374, 30, 963, 273, 2589, 18, 1896, 474, 1681, 87, 273, 5378, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 565, 468, 2720, 62...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 309, 963, 411, 374, 30, 963, 273, 2589, 18, 1896, 474, 1681, 87, 273, 5378, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 565, 468, 2720, 62...
def __init__(self, callback, task, args=(), kwargs={}): super(UrkForker, self).__init__()
def callback(): self.callback(result, error)
5c1d008b0362cdd8ac89f42b22959944aaf3d071 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/5c1d008b0362cdd8ac89f42b22959944aaf3d071/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 13332, 365, 18, 3394, 12, 2088, 16, 555, 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, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 13332, 365, 18, 3394, 12, 2088, 16, 555, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
text = '\n'.join(s)
if enter_flag: s.append('') text = cr.join(s)
def _wrap(text, width, indent, firstindent): if not text: return '' text = text.strip() s = [] pos = 0 for i in rx.finditer(text): if i.start() > pos: s.extend(text[pos:i.start()].split()) s.append(i.group()) pos = i.end() if pos < len(text): s.extend(text[pos:].split()) ss = [s[0]] #get first element character is asian char flag flag = unicodedata.east_asian_width(s[0][0]) != 'Na' for i in range(1, len(s)): f = unicodedata.east_asian_width(s[i][0]) != 'Na' if f and f == flag: ss[-1] = ss[-1] + s[i] else: ss.append(s[i]) flag = f s = ss t = [] y = 0 buf = [] x = 0 while s: i = s.pop(0) if unicodedata.east_asian_width(i[0]) != 'Na': factor = 2 else: factor = 1 if x == 0: w = width - len(firstindent) step = firstindent else: w = width - len(indent) step = indent length = y + len(i)*factor + len(buf) if length == w: buf.append(i) t.append(step + ' '.join(buf)) x = 1 buf = [] y = 0 elif length > w: if factor == 2 or (factor==1 and len(i) * factor >= w): buf.append(i[:(w-y-len(buf)-1)/factor]) t.append(step + ' '.join(buf)) x = 1 s.insert(0, i[(w-y-len(buf)-1)/2:]) buf = [] y = 0 continue else: t.append(step + ' '.join(buf)) x = 1 s.insert(0, i) buf = [] y = 0 continue else: buf.append(i) y += factor * len(i) if buf: t.append(step + ' '.join(buf)) return '\n'.join(t)
625ef8966c5424095fde6fd1f2a787fb16a2ed8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/686/625ef8966c5424095fde6fd1f2a787fb16a2ed8e/wraptext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4113, 12, 955, 16, 1835, 16, 3504, 16, 1122, 9355, 4672, 309, 486, 977, 30, 327, 875, 977, 273, 977, 18, 6406, 1435, 272, 273, 5378, 949, 273, 374, 364, 277, 316, 8581, 18, 4720...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4113, 12, 955, 16, 1835, 16, 3504, 16, 1122, 9355, 4672, 309, 486, 977, 30, 327, 875, 977, 273, 977, 18, 6406, 1435, 272, 273, 5378, 949, 273, 374, 364, 277, 316, 8581, 18, 4720...
raw = unicode(self.current_tweaks.toPlainText()) raw = re.sub(r'(?m)^
raw = unicode(self.current_tweaks.toPlainText()).encode('utf-8')
def set_tweaks(self): raw = unicode(self.current_tweaks.toPlainText()) raw = re.sub(r'(?m)^#.*fileencoding.*', '# ', raw) try: exec raw except: import traceback error_dialog(self, _('Invalid tweaks'), _('The tweaks you entered are invalid, try resetting the' ' tweaks to default and changing them one by one until' ' you find the invalid setting.'), det_msg=traceback.format_exc(), show=True) return False write_tweaks(raw) return True
6eade64d807b9af1f254585eccd560eb10f68a5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/6eade64d807b9af1f254585eccd560eb10f68a5d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 88, 26008, 87, 12, 2890, 4672, 1831, 273, 5252, 12, 2890, 18, 2972, 67, 88, 26008, 87, 18, 869, 13360, 1528, 10756, 1831, 273, 283, 18, 1717, 12, 86, 11, 3680, 81, 13, 66, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 88, 26008, 87, 12, 2890, 4672, 1831, 273, 5252, 12, 2890, 18, 2972, 67, 88, 26008, 87, 18, 869, 13360, 1528, 10756, 1831, 273, 283, 18, 1717, 12, 86, 11, 3680, 81, 13, 66, ...
addStubMember(memberId, member)
addStubMember(memberId, member, traceable)
def getInterface(interfaceName, errorLoc): iface = interfacesByName.get(interfaceName) if iface is None: idlFile = findIDL(conf.includePath, conf.irregularFilenames, interfaceName) idl = loadIDL(parser, conf.includePath, idlFile) if not idl.hasName(interfaceName): raise UserError("The interface %s was not found " "in the idl file %r." % (interfaceName, idlFile)) iface = idl.getName(interfaceName, errorLoc) iface.stubMembers = [] interfaces.append(iface) interfacesByName[interfaceName] = iface return iface
02e311e09e016912c1edae8536a5044940633ef1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/02e311e09e016912c1edae8536a5044940633ef1/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1358, 12, 5831, 461, 16, 555, 1333, 4672, 9751, 273, 7349, 5911, 18, 588, 12, 5831, 461, 13, 309, 9751, 353, 599, 30, 612, 80, 812, 273, 1104, 734, 48, 12, 3923, 18, 6702, 743, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1358, 12, 5831, 461, 16, 555, 1333, 4672, 9751, 273, 7349, 5911, 18, 588, 12, 5831, 461, 13, 309, 9751, 353, 599, 30, 612, 80, 812, 273, 1104, 734, 48, 12, 3923, 18, 6702, 743, ...
def f11(self, n1, n2):
def f0E(self, n1, n2):
def f11(self, n1, n2): return n1 * n2
7eba157adce404243eac81b4d40f252393526f0a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3322/7eba157adce404243eac81b4d40f252393526f0a/db_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 20, 41, 12, 2890, 16, 290, 21, 16, 290, 22, 4672, 327, 290, 21, 380, 290, 22, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 20, 41, 12, 2890, 16, 290, 21, 16, 290, 22, 4672, 327, 290, 21, 380, 290, 22, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
transform = element._as_temporarily_immutable except AttributeError: pass else: element = transform() return element in self._data
return element in self._data except TypeError: transform = getattr(element, "_as_temporary_immutable", None) if transform is None: raise return transform() in self._data
def __contains__(self, element): """Report whether an element is a member of a set.
d127d135652c76445f1087e2553ee780b0dbb7cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d127d135652c76445f1087e2553ee780b0dbb7cf/sets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12298, 972, 12, 2890, 16, 930, 4672, 3536, 4820, 2856, 392, 930, 353, 279, 3140, 434, 279, 444, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12298, 972, 12, 2890, 16, 930, 4672, 3536, 4820, 2856, 392, 930, 353, 279, 3140, 434, 279, 444, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
filter_by(list_type_id=pd.list_type_id)
filter_by(list_type_id=pd.list_type_id).filter_by(min_distance=pd.min_distance).\ filter_by(min_MAF=pd.min_MAF).filter_by(get_closest=pd.get_closest).filter_by(test_type=pd.test_type)
def run_wilcox_test(self, pd): """ 2008-08-20 use pd to summarize all parameters 2008-08-15 fix option max_pvalue_per_gene, to have the choice to take the most significant SNP associated with one gene or not 2008-08-14 add min_MAF just prepareDataForRankTest(). 2008-07-24 fix a bug. still using self.list_type_id, rather than just list_type_id in one line 2008-07-17 split out as a standalone function so that MpiGeneListRankTest.py could call it more easily. """ if self.debug: sys.stderr.write("Running wilcox test ... ") if pd.results_type==1: ResultsClass = ResultsMethod RankTestResultClass = CandidateGeneRankSumTestResultMethod rm = ResultsClass.get(pd.results_id) min_distance = pd.min_distance min_MAF = pd.min_MAF get_closest = pd.get_closest elif pd.results_type==2: ResultsClass = ResultsByGene RankTestResultClass = CandidateGeneRankSumTestResult rm = ResultsClass.get(pd.results_id) min_distance = rm.min_distance min_MAF = rm.min_MAF get_closest = rm.get_closest else: sys.stderr.write("Invalid results type : %s.\n"%pd.results_type) return None if not rm: sys.stderr.write("No results method available for results_id=%s.\n"%pd.results_id) return None """ db_results = RankTestResultClass.query.filter_by(results_id=pd.results_id).\ filter_by(list_type_id=pd.list_type_id) if db_results.count()>0: #done before db_result = db_results.first() sys.stderr.write("It's done already. id=%s, results_id=%s, list_type_id=%s, pvalue=%s, statistic=%s.\n"%\ (db_result.id, db_result.results_by_gene_id, db_result.list_type_id, db_result.pvalue, db_result.statistic)) return None """ try: candidate_gene_list = self.getGeneList(pd.list_type_id) param_data = PassingData(results_directory=pd.results_directory, candidate_gene_list=candidate_gene_list, min_MAF=pd.min_MAF) if pd.test_type==1: passingdata = self.prepareDataForRankTestFromResultsByGene(rm, param_data) import rpy candidate_sample_size = len(passingdata.candidate_gene_pvalue_list) non_candidate_sample_size = len(passingdata.non_candidate_gene_pvalue_list) if candidate_sample_size>=pd.min_sample_size and non_candidate_sample_size>=pd.min_sample_size: #2008-08-14 w_result = rpy.r.wilcox_test(passingdata.candidate_gene_pvalue_list, passingdata.non_candidate_gene_pvalue_list, conf_int=rpy.r.TRUE) else: sys.stderr.write("Ignore. sample size less than %s. %s vs %s.\n"%(pd.min_sample_size, candidate_sample_size, non_candidate_sample_size)) return None statistic=w_result['statistic']['W'] pvalue=w_result['p.value'] elif pd.test_type==2: permData = self.prepareDataForPermutationRankTest(rm, pd.snps_context_wrapper, param_data) candidate_sample_size = len(permData.candidate_gene_snp_index_ls) non_candidate_sample_size = permData.no_of_snps - candidate_sample_size statistic = permData.rank_sum_stat-(candidate_sample_size*(candidate_sample_size-1))/2. if candidate_sample_size>=pd.min_sample_size and non_candidate_sample_size>=pd.min_sample_size: pvalue = self.getPermutationRankSumPvalue(permData.chr2rank_ls, permData.candidate_gene_snp_index_ls, permData.rank_sum_stat, \ permData.no_of_snps, permData.chr2no_of_snps, permutation_type=pd.permutation_type, \ no_of_permutations=pd.no_of_permutations) else: sys.stderr.write("Ignore. sample size less than %s. %s vs %s.\n"%(pd.min_sample_size, candidate_sample_size, non_candidate_sample_size)) return None else: return None except: sys.stderr.write("Exception happened for results_id=%s, list_type_id=%s.\n"%(pd.results_id, pd.list_type_id)) traceback.print_exc() sys.stderr.write('%s.\n'%repr(sys.exc_info())) return None candidate_gene_rank_sum_test_result = RankTestResultClass(list_type_id=pd.list_type_id, statistic=statistic,\ pvalue=pvalue) candidate_gene_rank_sum_test_result.results_id = pd.results_id candidate_gene_rank_sum_test_result.min_distance = min_distance candidate_gene_rank_sum_test_result.min_MAF = min_MAF candidate_gene_rank_sum_test_result.get_closest = get_closest candidate_gene_rank_sum_test_result.candidate_sample_size = candidate_sample_size candidate_gene_rank_sum_test_result.non_candidate_sample_size = non_candidate_sample_size if self.debug: sys.stderr.write("Done.\n") return candidate_gene_rank_sum_test_result
d2a16d467a466b03daa63dd27037a863a5827a2a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/d2a16d467a466b03daa63dd27037a863a5827a2a/GeneListRankTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 91, 330, 71, 2409, 67, 3813, 12, 2890, 16, 4863, 4672, 3536, 4044, 28, 17, 6840, 17, 3462, 999, 4863, 358, 28712, 777, 1472, 4044, 28, 17, 6840, 17, 3600, 2917, 1456, 943, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 91, 330, 71, 2409, 67, 3813, 12, 2890, 16, 4863, 4672, 3536, 4044, 28, 17, 6840, 17, 3462, 999, 4863, 358, 28712, 777, 1472, 4044, 28, 17, 6840, 17, 3600, 2917, 1456, 943, ...
super(SSLTransportWithCert, self).__init__(host, connect_timeout):
super(SSLTransportWithCert, self).__init__(host, connect_timeout)
def __init__(self, host, connect_timeout, ssl_cert=None, ssl_key=None): super(SSLTransportWithCert, self).__init__(host, connect_timeout): self.ssl_cert = ssl_cert self.ssl_key = ssl_key
72635ff83ecd4e9e2f7bed3d6825f301d826e044 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13694/72635ff83ecd4e9e2f7bed3d6825f301d826e044/amqplib_sslcert_patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 3077, 67, 4538, 16, 5832, 67, 7593, 33, 7036, 16, 5832, 67, 856, 33, 7036, 4672, 2240, 12, 6745, 6568, 1190, 5461, 16, 365, 2934, 972, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 3077, 67, 4538, 16, 5832, 67, 7593, 33, 7036, 16, 5832, 67, 856, 33, 7036, 4672, 2240, 12, 6745, 6568, 1190, 5461, 16, 365, 2934, 972, 2738, ...
self.unpack('llll', self.data[self.index:self.index+16])
self.unpack('iiii', self.data[self.index:self.index+16])
def Tag_sint32_box(self): new_tag = unpack('B', self.data[self.index])[0]
b6246092697acf4603a7a53de2b028120f095743 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/675/b6246092697acf4603a7a53de2b028120f095743/pxldis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4034, 67, 87, 474, 1578, 67, 2147, 12, 2890, 4672, 394, 67, 2692, 273, 6167, 2668, 38, 2187, 365, 18, 892, 63, 2890, 18, 1615, 5717, 63, 20, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4034, 67, 87, 474, 1578, 67, 2147, 12, 2890, 4672, 394, 67, 2692, 273, 6167, 2668, 38, 2187, 365, 18, 892, 63, 2890, 18, 1615, 5717, 63, 20, 65, 2, -100, -100, -100, -100, -100, -100...
return now - self._start
return now - self._timer_start
def elapsed(self, now=time.time()): return now - self._start
9d9d1e85bc07468cd0128a3c77a2bd08931e292b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3386/9d9d1e85bc07468cd0128a3c77a2bd08931e292b/context.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9613, 12, 2890, 16, 2037, 33, 957, 18, 957, 1435, 4672, 327, 2037, 300, 365, 6315, 1937, 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, 9613, 12, 2890, 16, 2037, 33, 957, 18, 957, 1435, 4672, 327, 2037, 300, 365, 6315, 1937, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
x_new = asarray(x_new)
x_new =np.asarray(x_new)
def _call_spline(self, x_new): x_new = asarray(x_new) result = spleval(self._spline,x_new.ravel()) return result.reshape(x_new.shape+result.shape[1:])
4db244857b87d5117eda833744edd6826d40a0ad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/4db244857b87d5117eda833744edd6826d40a0ad/interpolate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1991, 67, 13106, 558, 12, 2890, 16, 619, 67, 2704, 4672, 619, 67, 2704, 273, 6782, 18, 345, 1126, 12, 92, 67, 2704, 13, 563, 273, 1694, 298, 1125, 12, 2890, 6315, 13106, 558, 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, 389, 1991, 67, 13106, 558, 12, 2890, 16, 619, 67, 2704, 4672, 619, 67, 2704, 273, 6782, 18, 345, 1126, 12, 92, 67, 2704, 13, 563, 273, 1694, 298, 1125, 12, 2890, 6315, 13106, 558, 16...
self.handle_file(filename, context)
self.handle_file(filename, doctree, context)
def write_file(self, filename, doctree): destination = StringOutput(encoding='utf-8') doctree.settings = self.docsettings
7c86f6623279052ea372ff758c5fff2ebb8aac62 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1278/7c86f6623279052ea372ff758c5fff2ebb8aac62/builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 768, 12, 2890, 16, 1544, 16, 31263, 992, 4672, 2929, 273, 514, 1447, 12, 5999, 2218, 3158, 17, 28, 6134, 31263, 992, 18, 4272, 273, 365, 18, 2434, 4272, 2, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 768, 12, 2890, 16, 1544, 16, 31263, 992, 4672, 2929, 273, 514, 1447, 12, 5999, 2218, 3158, 17, 28, 6134, 31263, 992, 18, 4272, 273, 365, 18, 2434, 4272, 2, -100, -100, -100, ...
if tools.config['db_password']: logger.notifyChannel("web-service", netsvc.LOG_ERROR, 'DUMP DB: %s doesn\'t work with password' % (db_name,)) raise Exception, "Couldn't dump database with password"
def dump(self, password, db_name): security.check_super(password) logger = netsvc.Logger()
c8f2d23783990c0effac6b09c24a2305e6c155ef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/c8f2d23783990c0effac6b09c24a2305e6c155ef/web_services.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 2201, 16, 1319, 67, 529, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 2201, 16, 1319, 67, 529, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def test_expect_isalive1 (self):
def test_expect_isalive_dead_after_normal_termination (self):
def test_expect_isalive1 (self): p = pexpect.spawn('ls') p.expect(pexpect.EOF) time.sleep(1) # allow kernel status time to catch up with state. if p.isalive(): self.fail ('Child process is not dead. It should be.')
950eede6b04306e7d0827d2c5e890723eabfb3fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/950eede6b04306e7d0827d2c5e890723eabfb3fa/test_isalive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12339, 67, 291, 11462, 67, 22097, 67, 5205, 67, 6130, 67, 9505, 367, 261, 2890, 4672, 293, 273, 293, 12339, 18, 1752, 9533, 2668, 3251, 6134, 293, 18, 12339, 12, 30251, 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, 1842, 67, 12339, 67, 291, 11462, 67, 22097, 67, 5205, 67, 6130, 67, 9505, 367, 261, 2890, 4672, 293, 273, 293, 12339, 18, 1752, 9533, 2668, 3251, 6134, 293, 18, 12339, 12, 30251, 18, 1...
Fixture.__init__(self)
AspyFixture.__init__(self)
def __init__(self): Fixture.__init__(self) self.title = "Music player tests"
43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5169/43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd/aspyplayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 432, 30884, 26392, 16186, 2738, 972, 12, 2890, 13, 365, 18, 2649, 273, 315, 49, 14894, 7291, 7434, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 432, 30884, 26392, 16186, 2738, 972, 12, 2890, 13, 365, 18, 2649, 273, 315, 49, 14894, 7291, 7434, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...