query
stringlengths
9
9.05k
document
stringlengths
10
222k
negatives
listlengths
19
20
metadata
dict
Implementing click search mcc mnc arrow button functionality
def click_search_mcc_mnc_arrow_button(self): self.click_element(self.search_mcc_mnc_arrow_button_locator)
[ "def on_searchButton_clicked(self):\n self.__search()", "def click_using_class(self, text, search_text, delay=3, is_button=False):", "def __searchButtonClicked(self):\n self.__setupCompleterMenu()\n self.__completer.complete()", "def onSearch(self):\n self.mainGrid.showSearchPopup(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set re analysis status functionality
def set_re_analysis_status(self, status_list): self.multiple_items_selection_from_kendo_dropdown(self.multiselect_status_dropdown_locator, status_list)
[ "def setstatus(self,statusin):\n if self.status in self.statuserrors:\n print \"Action forbidden.\"\n self.inputstatus.setEntry(self.status)\n return \n if statusin == None: status=self.inputstatus.getEntry()\n else: status=statusin\n if status not in self.statuses:\n print \"Unknown status:\",statu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click buy and sell deal management link functionality
def click_buy_and_sell_deal_management_link(self): self.select_static_tab(self.buy_and_sell_deal_management_locator, message="buy and sell deal management locator not found before specified time out")
[ "def click_buy_and_sell_deal_bulk_edit_button(self):\n self.click_element(self.buy_and_sell_deal_bulk_edit_button_lcoator, True)", "def click_buy_and_sell_deal_create_button(self):\n self.click_element(self.save_vendor_profile_locator)", "async def _vis_buy(self, ctx, *args):\n if has_post_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click request new buy and sell deal functionality
def click_request_new_buy_and_sell_deal(self): self.click_element(self.request_new_buy_and_sell_deal_locator, error_message="request new buy and sell deal locator not found before specified time out")
[ "def click_buy_and_sell_deal_create_button(self):\n self.click_element(self.save_vendor_profile_locator)", "def click_request_new_deal_button(self):\n self.click_element(self.request_new_deal_button_locator)", "def make_manual_bid(self,initial_price = None,initial_quantity = None):\n\n self...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is buy and sell deal details screen status dropdown visible functionality
def is_buy_and_sell_deal_details_screen_status_dropdown_visible(self): return self.is_element_present(self.buy_and_sell_deal_details_screen_status_dropdown_locator)
[ "def _show_purchase_button(self):\n check = False\n if self.products_type == 'stationery' and self.state in ('waiting', 'confirmed'):\n for line in self.move_lines:\n if line.product_uom_qty > line.reserved_availability:\n check = True\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is end date date picker visible functionality
def is_end_date_text_box_visible(self): return self.is_element_visible(self.end_date_date_picker_locator)
[ "def custom_end_date_hook(selected_variable):\n end_date = ael_variables.get('end_date')\n end_date_custom = ael_variables.get('end_date_custom')\n\n if end_date.value == 'Custom Date':\n end_date_custom.enabled = True\n else:\n end_date_custom.enabled = False", "def is_end_date_column_p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is auto expire checkbox visible functionality
def is_auto_expire_checkbox_visible(self): return self.is_element_visible(self.auto_expire_checkbox_locator)
[ "def autoPublishOrHide(self):", "def check_content_expiry_date(self):\n\n if self.expire_date < datetime.now():\n self.state = 'disabled'", "def OnLive(self,event):\n ##self.RefreshButton.Enabled = not self.LiveCheckBox.Value\n if self.LiveCheckBox.Value == True: self.keep_alive(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing proposed deal summary table column name verification functionality
def verify_proposed_deal_summary_table_column_name(self, column_name): column_name_locator = (By.XPATH, "//div[@id='grdProposedDealSummary']/descendant::span[text()='%s']" %(column_name.strip())) return self.is_element_visible(column_name_locator)
[ "def _validate_column_name(self, name, purpose):\n if purpose == 'order_by':\n return name in self.columns and\\\n self.columns[name].sortable\n else:\n return True", "def test_validate_column_names(self):\n cmd = csv_worker.Command()\n self.asse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click request new deal button functionality
def click_request_new_deal_button(self): self.click_element(self.request_new_deal_button_locator)
[ "def click_request_new_buy_and_sell_deal(self):\n self.click_element(self.request_new_buy_and_sell_deal_locator, error_message=\"request new buy and sell deal locator not found before specified time out\")", "def click_buy_and_sell_deal_create_button(self):\n self.click_element(self.save_vendor_prof...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set buy and sell deal name functionality
def set_buy_and_sell_deal_name(self, buy_and_sell_deal_prefix): global buy_and_sell_deal buy_and_sell_deal = buy_and_sell_deal_prefix + self.random_string_generator(size=4) self.set_value_into_input_field(self.buy_and_sell_deal_textbox_locator, buy_and_sell_deal)
[ "def get_buy_and_sell_deal_name(self):\n global buy_and_sell_deal\n return buy_and_sell_deal", "def buy_commodity(umid, id1, val1, cur=tradeables.find_one({'baseCurrency': True})['name']):\n # todo: rework for DJango and new Classes\n currency = tradeables.find_one({'name': cur})['_id']\n v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set buy sell deal account functionality
def set_buy_sell_deal_account(self, account_list): self.multiple_items_selection_from_kendo_dropdown(self.buy_sell_deal_account_dropdown_locator, account_list) self.wait_for_ajax_spinner_load()
[ "def buy(user_id, ticker, amount, price):\r\n pass", "def Trading(Seller,Buyer):\n if Seller.has_sold == False:\n if Buyer.like_buy >= Seller.like_sell:\n Seller.has_sold = True\n Buyer.has_bought = True\n Seller.sold_objects += 1\n Buyer.bought_objects +...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set vendor functionality
def set_vendor(self, vendor_list): self.multiple_items_selection_from_kendo_dropdown(self.vendor_dropdown_locator, vendor_list) self.wait_for_ajax_spinner_load()
[ "def vendor(self, vendor):\n\n self._vendor = vendor", "def bs_vendor(self, bs_vendor):\n self._bs_vendor = bs_vendor", "def vendors(self, vendors):\n\n self._vendors = vendors", "def get_vendor(self):\n\n raise NotImplementedError", "def vendor_specific(self, vendor_specific):\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click buy and sell deal create button functionality
def click_buy_and_sell_deal_create_button(self): self.click_element(self.save_vendor_profile_locator)
[ "def click_buy_and_sell_deal_bulk_edit_button(self):\n self.click_element(self.buy_and_sell_deal_bulk_edit_button_lcoator, True)", "def make_manual_bid(self,initial_price = None,initial_quantity = None):\n\n self.graph_selected = \"place bid mode\"\n resource = self.resourceSelected()\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing get buy and sell deal name functionality
def get_buy_and_sell_deal_name(self): global buy_and_sell_deal return buy_and_sell_deal
[ "def set_buy_and_sell_deal_name(self, buy_and_sell_deal_prefix):\n global buy_and_sell_deal\n buy_and_sell_deal = buy_and_sell_deal_prefix + self.random_string_generator(size=4)\n self.set_value_into_input_field(self.buy_and_sell_deal_textbox_locator, buy_and_sell_deal)", "def buy_commodity(u...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click buy and sell deal save button functionality
def click_buy_and_sell_deal_save_button(self): self.click_element(self.save_vendor_profile_locator, True) try: self.wait().until(EC.visibility_of_element_located(self.confirmation_popup_locator), 'confirmation popup locator not found before specified time out') self.click_element...
[ "def click_buy_and_sell_deal_create_button(self):\n self.click_element(self.save_vendor_profile_locator)", "def click_buy_and_sell_deal_bulk_edit_button(self):\n self.click_element(self.buy_and_sell_deal_bulk_edit_button_lcoator, True)", "def save_btn(self):\n if self.item_name.get():\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set start date functionality
def set_start_date(self, start_date): self.set_value_into_input_field(self.start_date_inputbox_locator, start_date)
[ "def set_start_date(self, date):\n pass", "def start_date(self, start_date):\n \n self._start_date = start_date", "def start_date(self, start_date):\n\n self._start_date = start_date", "def set_begin_date(self, begin_date):\n self.set_value_into_input_field(self.begin_date_i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set buy and sell management grid settings functionality
def set_buy_and_sell_management_grid_settings(self, grid_settings): self.set_grid_settings(self.buy_and_sell_management_grid_div_id, grid_settings)
[ "def set_vendor_price_lists_grid_settings(self, grid_settings):\n self.set_grid_settings(self.view_price_list_div_id, grid_settings)", "def set_vendor_price_list_detail_grid_settings(self, grid_settings):\n self.wait_for_ajax_spinner_load(300)\n self.set_grid_settings(self.vendor_price_list_d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing sort buy and sell management grid column functionality
def sort_buy_and_sell_management_grid_column(self, column_name, descending_order): self.sort_grid_column(self.buy_and_sell_management_grid_div_id, column_name, descending_order)
[ "def OnColumnClick(self, event):\r\n columns = self.data.getParam('columns')\r\n self.SortItems(columns[event.GetColumn()],'INVERT')", "def sort_vendor_price_lists_grid_column(self, column_name, descending_order):\n self.sort_grid_column(self.view_price_list_div_id, column_name, descending_or...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing get all rows of specific column from buy and sell management grid functionality
def get_all_rows_of_specific_column_from_buy_and_sell_management_grid(self, column_name): self.all_row_data = self.get_all_rows_of_specific_column_from_grid(self.buy_and_sell_management_grid_div_id, column_name, self.get_grid_row_count(self.buy_and_sell_management_grid_count_span_locator, 2)) return sel...
[ "def get_all_rows_of_rate_increase_violation_column_from_vendor_price_list_detail_grid(self, column_name):\n self.all_row_data = []\n self.wait_for_ajax_spinner_load()\n row_count = len(self.wait().until(EC.presence_of_all_elements_located(self.vendor_price_list_detail_row_locator), 'vendor pri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing drag buy and sell management grid column functionality
def drag_buy_and_sell_management_grid_column(self, source_column, destination_column): self.drag_grid_column(self.buy_and_sell_management_grid_div_id, source_column, destination_column)
[ "def drag_vendor_price_lists_grid_column(self, source_column, destination_column):\n self.drag_grid_column(self.view_price_list_div_id, source_column, destination_column)", "def drag_vendor_price_list_detail_grid_column(self, source_column, destination_column):\n self.wait_for_ajax_spinner_load(300)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing get buy and sell management grid column names by order functionality
def get_buy_and_sell_management_grid_column_names_by_order(self): self.column_name_list = self.get_grid_column_names_by_order(self.buy_and_sell_management_grid_div_id) return self.column_name_list
[ "def get_vendor_price_lists_grid_column_names_by_order(self):\n self.column_name_list = self.get_grid_column_names_by_order(self.view_price_list_div_id)\n return self.column_name_list", "def get_vendor_price_list_detail_grid_column_names_by_order(self):\n self.wait_for_ajax_spinner_load(300)\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click buy and sell management grid export to excel button functionality
def click_buy_and_sell_management_grid_export_to_excel_button(self): self.click_grid_export_to_excel_button(self.buy_and_sell_management_grid_div_id)
[ "def click_vendor_price_list_detail_rates_grid_export_to_excel_button(self):\n self.click_grid_export_to_excel_button(self.vendor_price_list_detail_rates_grid_div_id)", "def click_vendor_price_list_detail_reference_rates_grid_export_to_excel_button(self):\n self.click_grid_export_to_excel_button(sel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing select buy and sell deal management grid first row checkbox functionality
def select_buy_and_sell_deal_management_grid_first_row_checkbox(self): self.select_grid_row_checkbox(self.buy_and_sell_management_grid_div_id, None, self.buy_and_sell_management_grid_checkbox_column_number, True)
[ "def select_target_buy_list_overrides_grid_row_checkbox(self):\n for i in range(2):\n target_buy_list_overrides_grid_checkbox_locator = (By.XPATH, \"(//div[@data-grid-name='%s']/descendant::input[@type='checkbox'])[%s]\" % (self.target_buy_list_overrides_data_grid_name, str(i + 2)))\n s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click buy and sell deal bulk edit button functionality
def click_buy_and_sell_deal_bulk_edit_button(self): self.click_element(self.buy_and_sell_deal_bulk_edit_button_lcoator, True)
[ "def edit_tools(self, e):\n #GETTING SELECTION\n\n self.selected_item = self.user_inventory.selection()\n self.select_name = self.user_inventory.item([i for i in self.selected_item], \"values\")[0]\n self.select_entdate = self.user_inventory.item([i for i in self.selected_item], \"values...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set bulk edit end date functionality
def set_bulk_edit_end_date(self, end_date, future_date): if future_date is True: end_date = self.get_date(future_date=True, number_of_days_to_add=30) self.set_value_into_input_field(self.bulk_edit_end_date_inputbox_locator, end_date)
[ "def set_bulk_add_end_date(self, end_date):\n global bulk_add_begin_date\n if end_date != \"\" and datetime.datetime.strptime(end_date, \"%m/%d/%Y\") > bulk_add_begin_date:\n self.set_value_into_input_field(self.bulk_add_end_date_inputbox_locator, str(end_date))\n elif end_date == \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click bulk edit submit button functionality
def click_bulk_edit_submit_button(self): self.click_element(self.bulk_edit_submit_button_locator)
[ "def click_bulk_edit_submit_button(self):\n self.click_element(self.bulk_edit_submit_button_locator, True)", "def click_bulk_edit_button(self):\n self.click_element(self.bulk_edit_button_locator, True)", "def click_statement_fields_bulk_edit_button(self):\n self.click_element(self.statement...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click buy and sell deal management grid first row inline action button functionality
def click_buy_and_sell_deal_management_grid_first_row_inline_action_button(self): self.click_inline_action_button(self.buy_and_sell_management_grid_div_id, None, self.buy_and_sell_management_grid_inline_action_column_number, True)
[ "def click_buy_and_sell_deal_bulk_edit_button(self):\n self.click_element(self.buy_and_sell_deal_bulk_edit_button_lcoator, True)", "def click_target_buy_policy_grid_first_row_inline_action_button(self):\n self.click_inline_action_button(self.target_buy_policies_grid_div_id, None, column_number=2, fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is account label displayed correctly functionality
def is_account_label_displayed_correctly(self): is_displayed_correctly = False if self.get_text_from_element(self.account_label_locator) == self.account_label: is_displayed_correctly = True return is_displayed_correctly
[ "def is_account_manager_label_displayed_correctly(self):\n is_displayed_correctly = False\n if self.get_text_from_element(self.account_manager_label_locator) == self.account_manager_label:\n is_displayed_correctly = True\n return is_displayed_correctly", "def Label(self) -> str:", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is account manager label displayed correctly functionality
def is_account_manager_label_displayed_correctly(self): is_displayed_correctly = False if self.get_text_from_element(self.account_manager_label_locator) == self.account_manager_label: is_displayed_correctly = True return is_displayed_correctly
[ "def is_account_label_displayed_correctly(self):\n is_displayed_correctly = False\n if self.get_text_from_element(self.account_label_locator) == self.account_label:\n is_displayed_correctly = True\n return is_displayed_correctly", "def _add_user_label(self):\n user_label = tk.La...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click vendor grid add destination button functionality
def click_vendor_grid_add_destination_button(self): self.click_element(self.vendor_grid_add_destination_locator)
[ "def click_customer_grid_add_destination_button(self):\n self.click_element(self.customer_grid_add_destination_locator)", "def set_destination_to_add_destination(self, destination):\n self.multiple_items_selection_from_kendo_dropdown(self.destination_multiple_kendo_dropdown_locator, destination)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set source to add destination functionality
def set_source_to_add_destination(self, source_name): self.single_selection_from_static_kendo_dropdown(self.source_kendo_dropdown_arrow_locator, source_name)
[ "def add_destination(self):\n pass", "def set_source_to_destination(\n self, source: SourcePosition, dest: DestinationPosition\n ) -> AndStatus:\n return self.sources[source].set(dest)", "def set_source(self, source):\n self.data['source'] = source", "def set_destination_to_add_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set destination to add destination functionality
def set_destination_to_add_destination(self, destination): self.multiple_items_selection_from_kendo_dropdown(self.destination_multiple_kendo_dropdown_locator, destination) self.click_element(self.new_destination_header_locator)
[ "def add_destination(self):\n pass", "def destination(self, destination):\n self._destination = destination", "def destination(self, destination):\n\n self._destination = destination", "def set_destination(self, obj_or_id):\n\n self._generic_baseobject_to_id_property_setter('destin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set deal rate to add destination functionality
def set_deal_rate_to_add_destination(self, deal_rate): self.set_value_into_input_field(self.deal_rate_textbox_locator, deal_rate, use_win32com=True) self.click_element(self.new_destination_header_locator)
[ "def set_rates_destination(self):\n self.set_value_into_input_field(self.rates_tab_destination_textbox_locator, self.buy_page_excel_data_dictionary[\"Destination\"])", "def Rate(self, rate):\n for bi in self.BudgetItems:\n bi.Rate = rate\n for part in self.ResourceParts:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click customer grid add destination button functionality
def click_customer_grid_add_destination_button(self): self.click_element(self.customer_grid_add_destination_locator)
[ "def click_vendor_grid_add_destination_button(self):\n self.click_element(self.vendor_grid_add_destination_locator)", "def set_destination_to_add_destination(self, destination):\n self.multiple_items_selection_from_kendo_dropdown(self.destination_multiple_kendo_dropdown_locator, destination)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click add destination save button functionality
def click_add_destination_save_button(self): self.click_element(self.add_destination_save_button_locator, True) try: self.wait().until(EC.visibility_of_element_located(self.confirmation_popup_locator), 'confirmation popup locator not found before specified time out') self.click_e...
[ "def click_vendor_grid_add_destination_button(self):\n self.click_element(self.vendor_grid_add_destination_locator)", "def add_destination(self):\n pass", "def click_customer_grid_add_destination_button(self):\n self.click_element(self.customer_grid_add_destination_locator)", "def onSave(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing compare vendor price list detail rates grid destination functionality
def compare_vendor_price_list_detail_rates_grid_destination(self): self.buy_page_excel_data_dictionary = self.get_excel_data_dictionary() is_compared = False rates_grid_destination = self.get_specific_column_value_from_grid(self.vendor_price_list_detail_rates_grid_div_id, 1, self.destination_col...
[ "def compare_vendor_price_list_detail_rates_grid_rate(self):\n self.buy_page_excel_data_dictionary = self.get_excel_data_dictionary()\n is_compared = False\n rates_grid_rate_column_element = self.wait().until(EC.presence_of_element_located(self.rates_grid_rate_column_locator))\n if self....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing compare vendor price list detail dial digits grid destination functionality
def compare_vendor_price_list_detail_dial_digits_grid_destination(self): self.buy_page_excel_data_dictionary = self.get_excel_data_dictionary() is_compared = False dial_digits_grid_destination = self.get_specific_column_value_from_grid(self.vendor_price_list_detail_dial_digits_grid_div_id, 1, se...
[ "def compare_vendor_price_list_detail_rates_grid_destination(self):\n self.buy_page_excel_data_dictionary = self.get_excel_data_dictionary()\n is_compared = False\n rates_grid_destination = self.get_specific_column_value_from_grid(self.vendor_price_list_detail_rates_grid_div_id, 1, self.destina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing compare vendor price list detail rates grid rate functionality
def compare_vendor_price_list_detail_rates_grid_rate(self): self.buy_page_excel_data_dictionary = self.get_excel_data_dictionary() is_compared = False rates_grid_rate_column_element = self.wait().until(EC.presence_of_element_located(self.rates_grid_rate_column_locator)) if self.buy_page_...
[ "def compare_rates_with_excel_data(self):\n is_compared = True\n self.grid_row_data.clear()\n self.grid_row_data.update({\"Rate1\": \"\", \"Rate2\": \"\", \"Rate3\": \"\", \"Begin Date\": \"\", \"Rating Method\": \"\"})\n self.buy_page_excel_data_dictionary[\"Rating Method\"] = self.buy_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing get reference rates tab analyzed rate functionality
def get_reference_rates_tab_analyzed_rate(self): return self.get_text_from_element(self.reference_rates_tab_analyzed_tab_column_locator)
[ "def select_reference_rates_tab(self):\n self.select_static_tab(self.reference_rates_tab_locator, True)", "def calculateDataRate(self):\n pass", "def calculate_rate_and_current(rate):\n nom = (cm / tau_m) * (v_thresh - v_rest)\n denom = 1.0\n if rate != 0.0:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing get reference rates tab effective date functionality
def get_reference_rates_tab_effective_date(self): return self.get_specific_column_value_from_grid(self.vendor_price_list_detail_reference_rates_grid_div_id, 1, column_name=self.effective_date_column_name)
[ "def _rate_dates(self, common_object):\n if common_object.IsKindOf(acm.FCashFlow):\n start_date = common_object.StartDate()\n elif common_object.IsKindOf(acm.FReset):\n start_date = common_object.Day()\n else:\n message = \"Rate dates for {0} object are not defi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is target buy policies tab displayed functionality
def is_target_buy_policies_tab_displayed(self): return self.is_element_visible(self.target_buy_policies_tab_locator)
[ "def select_target_buy_policies_tab(self):\n self.select_static_tab(self.target_buy_policies_tab_locator, 'target buy policies tab locator not found before specified time out')", "def click_buy_and_sell_deal_management_link(self):\n self.select_static_tab(self.buy_and_sell_deal_management_locator, m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing select target buy policies tab functionality
def select_target_buy_policies_tab(self): self.select_static_tab(self.target_buy_policies_tab_locator, 'target buy policies tab locator not found before specified time out')
[ "def click_edit_target_buy_policy_button(self):\n self.click_element(self.edit_target_buy_policy_button_locator)", "def set_target_buy_policy_type(self, type):\n self.single_selection_from_kendo_dropdown(self.target_buy_policy_type_kendo_dropdown_locator, type)", "def select_buy_dashboard_tab(self...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is target buy policies grid column present functionality
def is_target_buy_policies_grid_column_present(self, column_name): column_locator = (By.XPATH, "//div[contains(@id, '%s')]/descendant::th[@data-title='%s']" % (self.target_buy_policies_grid_div_id, column_name)) return self.is_element_present(column_locator)
[ "def get_target_buy_policy_grid_row_details(self):\n self.grid_row_data.clear()\n self.grid_row_data = {\"Status\":\"\", \"Target Buy Policy Type\":\"\", \"Call Type\":\"\", \"Route Class\":\"\"}\n return self.get_grid_row_details(self.target_buy_policies_grid_div_id, self.grid_row_data, data_g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click target buy policies grid first row inline action button functionality
def click_target_buy_policies_grid_first_row_inline_action_button(self): self.click_inline_action_button(self.target_buy_policies_grid_div_id, None, self.target_buy_policies_grid_inline_action_column_number, first_row=True)
[ "def click_target_buy_policy_grid_first_row_inline_action_button(self):\n self.click_inline_action_button(self.target_buy_policies_grid_div_id, None, column_number=2, first_row=True)\n self.wait_for_ajax_spinner_load()", "def click_buy_and_sell_deal_management_grid_first_row_inline_action_button(sel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is inline action item present functionality
def is_inline_action_item_present(self, item_name): inline_action_item_locator = (By.XPATH, "//ul[@id='Actions_listbox']/li[text()='%s']" % item_name) return self.is_element_present(inline_action_item_locator)
[ "def action(self):\n pass", "def __actions__(self, obj):\n primary_fields = self.__provider__.get_primary_fields(self.__entity__)\n pklist = '/'.join(map(lambda x: str(getattr(obj, x)), primary_fields))\n #if has_permission('manage'):############\n \n historial = DBSessio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click create new target buy policy button functionality
def click_create_new_target_buy_policy_button(self): self.click_element(self.create_new_target_buy_policy_button_locator, script_executor=True, error_message='create new target buy policy button locator not found before specified time out')
[ "def click_buy_and_sell_deal_create_button(self):\n self.click_element(self.save_vendor_profile_locator)", "def click_edit_target_buy_policy_button(self):\n self.click_element(self.edit_target_buy_policy_button_locator)", "def click_save_target_buy_policy_button(self):\n self.click_element(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set target buy policy name functionality
def set_target_buy_policy_name(self, prefix): global target_buy_policy target_buy_policy = (prefix + self.random_string_generator(size=4)) self.set_value_into_input_field(self.target_buy_policy_input_field_locator, value=target_buy_policy)
[ "def set_target_buy_policy_abbreviation(self, prefix):\n self.set_value_into_input_field(self.target_buy_policy_abbreviation_input_field_locator, value=(prefix + self.random_string_generator(size=4)))", "def set_target_buy_policy_type(self, type):\n self.single_selection_from_kendo_dropdown(self.tar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing get target buy policy functionality
def get_target_buy_policy(self): global target_buy_policy return target_buy_policy
[ "def select_target_buy_policies_tab(self):\n self.select_static_tab(self.target_buy_policies_tab_locator, 'target buy policies tab locator not found before specified time out')", "def test_get_policy(self):\n pass", "def target_buy_price(self):\n if self.period_tick == 0:\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set target buy policy abbreviation functionality
def set_target_buy_policy_abbreviation(self, prefix): self.set_value_into_input_field(self.target_buy_policy_abbreviation_input_field_locator, value=(prefix + self.random_string_generator(size=4)))
[ "def set_target_buy_policy_name(self, prefix):\n global target_buy_policy\n target_buy_policy = (prefix + self.random_string_generator(size=4))\n self.set_value_into_input_field(self.target_buy_policy_input_field_locator, value=target_buy_policy)", "def set_target_buy_policy_type(self, type):...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set route class to create new target buy policy functionality
def set_route_class_to_create_new_target_buy_policy(self, route_class): self.single_selection_from_static_kendo_dropdown(self.route_class_single_kendo_dropdown_arrow_locator, route_class)
[ "def __init__(self, source_node, source_gate_name, target_node, target_slot_name, weight=1):\n self.link(source_node, source_gate_name, target_node, target_slot_name, weight)", "def process_create_policy_target(self, session, data, result):\n pass", "def test_add_policy(self):\n pass", "d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click include cli checkbox functionality
def click_include_cli_checkbox(self): self.click_element(self.include_cli_checkbox_locator)
[ "def click_guarantee_cli_checkbox(self):\n self.click_element(self.guarantee_cli_checkbox_locator)", "def add_checkbutton(self, cnf={}, **kw):\n self.add('checkbutton', cnf or kw)", "def click_automate_generation_checkbox(self):\n self.click_element(self.automate_generation_checkbox_locator...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click automate generation checkbox functionality
def click_automate_generation_checkbox(self): self.click_element(self.automate_generation_checkbox_locator)
[ "def click_guarantee_cli_checkbox(self):\n self.click_element(self.guarantee_cli_checkbox_locator)", "def _create_checkbox(text, checked):\n\n checkbox = Gtk.CheckButton(label=text)\n checkbox.set_active(checked)\n return checkbox", "def click_include_cli_checkbox(self):\n sel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click save target buy policy button functionality
def click_save_target_buy_policy_button(self): self.click_element(self.save_target_buy_policy_button_locator, error_message='save target buy policy button locator not found before specified time out') self.click_element(self.confirmation_popup_locator, error_message='success message locator not found be...
[ "def click_save_edited_target_buy_policy_button(self):\n self.click_element(self.save_edited_target_buy_policy_button_locator)\n self.click_element(self.confirmation_popup_locator, error_message='success message locator not found before specified time out')\n self.click_element(self.ok_button_l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is target buy list overrides screen loaded functionality
def is_target_buy_list_overrides_screen_loaded(self): return self.is_element_visible(self.target_buy_list_overrides_page_header_locator)
[ "def set_target_buy_list(self, item_name, is_first_item):\n if is_first_item is True:\n self.single_selection_from_static_kendo_dropdown(self.target_buy_list_kendo_dropdown_arrow_locator, first_item=True)\n else:\n self.single_selection_from_static_kendo_dropdown(self.target_buy_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is expected dropdown list control visible functionality
def is_expected_dropdown_list_control_visible_in_target_buy_overrides_screen(self, expected_list_control_name): list_control_locator = (By.XPATH, "//select[@name='%s']" %(expected_list_control_name)) return self.is_element_present(list_control_locator)
[ "def is_view_dropdown_visible(self):\n return self.is_element_visible(self.view_dropdown_locator)", "def update(self):\n\n if self.dropdown_presented:\n self.set_needs_display()", "def is_dropdown_expanded(self):\n return self.dropdown.element(class_name=\"dropdown-focus\").exists", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is destination input textbox visible functionality
def is_destination_input_textbox_visible(self): return self.is_element_visible(self.destination_input_textbox_locator)
[ "def is_destination_textbox_visible(self):\n return self.is_element_visible(self.reference_rates_destination_textbox_locator)", "def is_input_field(self):\n return False", "def get_input(self):\n self.input_param.show()", "def Visible(self) -> bool:", "def do_focus_in_event(self, wi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is expected grid column present functionality
def is_expected_grid_column_present(self, expected_column_name): grid_column_locator = (By.XPATH, "//th[@data-title='%s']" %(expected_column_name)) return self.is_element_present(grid_column_locator)
[ "def test_get_columns(self):\n pass", "def test_visible_columns(self):\n self.datasource.set_visible_columns(['last_name'])\n self.assertEqual(self.datasource.get_visible_columns(), ['last_name'])", "def test_column_template(self):\r\n f = self.ManageFinder()\r\n\r\n self.asse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing select target buy list overrides grid row checkbox functionality
def select_target_buy_list_overrides_grid_row_checkbox(self): for i in range(2): target_buy_list_overrides_grid_checkbox_locator = (By.XPATH, "(//div[@data-grid-name='%s']/descendant::input[@type='checkbox'])[%s]" % (self.target_buy_list_overrides_data_grid_name, str(i + 2))) self.click_...
[ "def select_vendor_price_list_grid_row_checkbox(self):\n for row in range(0,2):\n column_locator = (By.XPATH, \"//div[@id='%s']/descendant::th[@data-title='%s']\" % (self.vendor_price_list_grid_div_id, self.price_list_column_name))\n column_element = self.wait().until(EC.presence_of_ele...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is target buy details section present in vendor profile page functionality
def is_target_buy_details_section_present_in_vendor_profile_page(self): return self.is_element_present(self.target_buy_details_section_locator)
[ "def is_specific_field_on_target_buy_details_section_present(self, field_name):\n field_locator = (By.XPATH, \"//div[contains(@id, 'divcustomerProfileDetails_')]/descendant::label[text()='%s']\" % field_name)\n return self.is_element_present(field_locator)", "def is_target_buy_policies_tab_displayed...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing is specific field on target buy details section present functionality
def is_specific_field_on_target_buy_details_section_present(self, field_name): field_locator = (By.XPATH, "//div[contains(@id, 'divcustomerProfileDetails_')]/descendant::label[text()='%s']" % field_name) return self.is_element_present(field_locator)
[ "def is_target_buy_details_section_present_in_vendor_profile_page(self):\n return self.is_element_present(self.target_buy_details_section_locator)", "def _on_detail_page(self):\n return sel.is_displayed('//div[@class=\"dhtmlxInfoBarLabel-2\"][contains(., \"%s\")]'\n % ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set target buy distribution link code functionality
def set_target_buy_distribution_link_code(self): self.set_value_into_input_field(self.target_buy_distribution_link_code_textbox_locator, self.random_string_generator(6)) self.wait_for_ajax_spinner_load()
[ "def setTargets(self):", "def _set_link(\n meta: Dict,\n link: Optional[Union[type(None), str, bool, KEChainPages]] = None,\n link_value: Optional[CardWidgetLinkValue] = None,\n link_target: Optional[Union[str, LinkTargets]] = LinkTargets.SAME_TAB,\n **kwargs,\n) -> Dict:\n meta[\"linkTarget\"] ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set target buy distribution receiving member functionality
def set_target_buy_distribution_receiving_member(self, member_prefix): member_name = member_prefix + self.random_string_generator(size=4) self.set_value_into_input_field(self.target_buy_distribution_receiving_member_textbox_locator, member_name) self.wait_for_ajax_spinner_load()
[ "def handle_buy_property(state):\n\tcurrentPlayerId = state.getCurrentPlayerId()\n\tplayerPosition = state.getPosition(currentPlayerId)\n\tplayerCash = state.getCash(currentPlayerId)\n\tspace = board[playerPosition]\n\n\t# if we reach here, player is assured to have the money required\n\tstate.setPropertyOwner(play...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set target buy list functionality
def set_target_buy_list(self, item_name, is_first_item): if is_first_item is True: self.single_selection_from_static_kendo_dropdown(self.target_buy_list_kendo_dropdown_arrow_locator, first_item=True) else: self.single_selection_from_static_kendo_dropdown(self.target_buy_list_kend...
[ "def set_target_stocks_list(self, list_of_stocks):\n self.target_stocks = list_of_stocks", "def setBuyList(self, buyList):\n parsedBuyList = []\n for bought in buyList:\n if hasattr(bought, \"unitType\"):\n parsedBuyList.append(bought)\n elif isinstance(bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set target buy list number plan functionality
def set_target_buy_list_number_plan(self, item_name, is_first_item): if is_first_item is True: self.single_selection_from_static_kendo_dropdown(self.target_buy_list_number_plan_kendo_dropdown_arrow_locator, first_item=True) else: self.single_selection_from_static_kendo_dropdown(s...
[ "def target_no(self, target_no):\n\n self._target_no = target_no", "def set_target_buy_list(self, item_name, is_first_item):\n if is_first_item is True:\n self.single_selection_from_static_kendo_dropdown(self.target_buy_list_kendo_dropdown_arrow_locator, first_item=True)\n else:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing set target buy policy type functionality
def set_target_buy_policy_type(self, type): self.single_selection_from_kendo_dropdown(self.target_buy_policy_type_kendo_dropdown_locator, type)
[ "def set_target_buy_policy_name(self, prefix):\n global target_buy_policy\n target_buy_policy = (prefix + self.random_string_generator(size=4))\n self.set_value_into_input_field(self.target_buy_policy_input_field_locator, value=target_buy_policy)", "def get_target_buy_policy(self):\n g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing get target buy policy grid row details functionality
def get_target_buy_policy_grid_row_details(self): self.grid_row_data.clear() self.grid_row_data = {"Status":"", "Target Buy Policy Type":"", "Call Type":"", "Route Class":""} return self.get_grid_row_details(self.target_buy_policies_grid_div_id, self.grid_row_data, data_grid_name=self.target_buy...
[ "def get_outbound_statement_grid_row_data(self):\n self.grid_row_details_dictionary.clear()\n self.grid_row_details_dictionary = {\"Bill Account\": \"\", \"Begin Date\": \"\", \"End Date\": \"\", \"Amount ( EUR )\": \"\"}\n self.outbound_statement_grid_row_data = self.get_grid_row_details(self....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click target buy policy grid first row inline action button functionality
def click_target_buy_policy_grid_first_row_inline_action_button(self): self.click_inline_action_button(self.target_buy_policies_grid_div_id, None, column_number=2, first_row=True) self.wait_for_ajax_spinner_load()
[ "def click_target_buy_policies_grid_first_row_inline_action_button(self):\n self.click_inline_action_button(self.target_buy_policies_grid_div_id, None, self.target_buy_policies_grid_inline_action_column_number, first_row=True)", "def click_buy_and_sell_deal_management_grid_first_row_inline_action_button(se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click edit target buy policy button functionality
def click_edit_target_buy_policy_button(self): self.click_element(self.edit_target_buy_policy_button_locator)
[ "def click_buy_and_sell_deal_bulk_edit_button(self):\n self.click_element(self.buy_and_sell_deal_bulk_edit_button_lcoator, True)", "def click_cancel_edited_target_buy_policy_button(self):\n self.click_element(self.cancel_edited_target_buy_policy_button_locator)", "def click_save_edited_target_buy_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click save edited target buy policy button functionality
def click_save_edited_target_buy_policy_button(self): self.click_element(self.save_edited_target_buy_policy_button_locator) self.click_element(self.confirmation_popup_locator, error_message='success message locator not found before specified time out') self.click_element(self.ok_button_locator, ...
[ "def click_edit_target_buy_policy_button(self):\n self.click_element(self.edit_target_buy_policy_button_locator)", "def click_save_target_buy_policy_button(self):\n self.click_element(self.save_target_buy_policy_button_locator, error_message='save target buy policy button locator not found before sp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing click cancel edited target buy policy button functionality
def click_cancel_edited_target_buy_policy_button(self): self.click_element(self.cancel_edited_target_buy_policy_button_locator)
[ "def click_edit_target_buy_policy_button(self):\n self.click_element(self.edit_target_buy_policy_button_locator)", "def click_cancel(self):\n self.click_element(self.cancel_button_selector)", "def click_save_edited_target_buy_policy_button(self):\n self.click_element(self.save_edited_target...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Try to update null parameters from environment_params_path, or DEFAULT_PARAMS
def update_custom_environment_params(self): allowed_parameter_keys = [ k for k, v in signature(Environment).parameters.items() if v.kind == v.KEYWORD_ONLY ] for k in allowed_parameter_keys: if getattr(self, k) is None: setattr(self, k, self.DEFAULT_PARAMS...
[ "def overwrite_hyperparams(self):\n try:\n default_hyperparams = self.hyperparams\n for key in default_hyperparams:\n try:\n flag = self.FLAGS[key]\n param_value = flag.value\n if param_value is not None:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a key to describe the current Environment's crossexperiment parameters
def generate_cross_experiment_key(self): parameters = dict( metrics_params=self.metrics_params, cv_params=self.cv_params, target_column=self.target_column, id_column=self.id_column, do_predict_proba=self.do_predict_proba, prediction_formatt...
[ "def _create_key(chip):\n try:\n suffix = chip['version'][0]\n except IndexError:\n suffix = ''\n\n if chip['classification'] == 'secret':\n classification = 'z'\n else:\n classification = chip['classification'][0]\n\n return '%s-%s%s%s' % (chip['game'], classification, ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a `DatasetSentinel` representing an Experiment's `fold_train_input` Returns
def train_input(self): return DatasetSentinel("train_input", **self._dataset_sentinel_helper())
[ "def validation_input(self):\n return DatasetSentinel(\"validation_input\", **self._dataset_sentinel_helper())", "def train_target(self):\n return DatasetSentinel(\"train_target\", **self._dataset_sentinel_helper())", "def validation_target(self):\n return DatasetSentinel(\"validation_targe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a `DatasetSentinel` representing an Experiment's `fold_train_target` Returns
def train_target(self): return DatasetSentinel("train_target", **self._dataset_sentinel_helper())
[ "def validation_target(self):\n return DatasetSentinel(\"validation_target\", **self._dataset_sentinel_helper())", "def train_input(self):\n return DatasetSentinel(\"train_input\", **self._dataset_sentinel_helper())", "def holdout_target(self):\n return DatasetSentinel(\n \"holdo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a `DatasetSentinel` representing an Experiment's `fold_validation_input` Returns
def validation_input(self): return DatasetSentinel("validation_input", **self._dataset_sentinel_helper())
[ "def train_input(self):\n return DatasetSentinel(\"train_input\", **self._dataset_sentinel_helper())", "def validation_target(self):\n return DatasetSentinel(\"validation_target\", **self._dataset_sentinel_helper())", "def holdout_input(self):\n return DatasetSentinel(\n \"holdou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a `DatasetSentinel` representing an Experiment's `fold_validation_target` Returns
def validation_target(self): return DatasetSentinel("validation_target", **self._dataset_sentinel_helper())
[ "def train_target(self):\n return DatasetSentinel(\"train_target\", **self._dataset_sentinel_helper())", "def validation_input(self):\n return DatasetSentinel(\"validation_input\", **self._dataset_sentinel_helper())", "def train_input(self):\n return DatasetSentinel(\"train_input\", **self....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a `DatasetSentinel` representing an Experiment's `holdout_input_data` Returns
def holdout_input(self): return DatasetSentinel( "holdout_input", self.cross_experiment_key.parameters["holdout_dataset"] )
[ "def holdout_target(self):\n return DatasetSentinel(\n \"holdout_target\", self.cross_experiment_key.parameters[\"holdout_dataset\"]\n )", "def train_input(self):\n return DatasetSentinel(\"train_input\", **self._dataset_sentinel_helper())", "def validation_input(self):\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a `DatasetSentinel` representing an Experiment's `holdout_target_data` Returns
def holdout_target(self): return DatasetSentinel( "holdout_target", self.cross_experiment_key.parameters["holdout_dataset"] )
[ "def holdout_input(self):\n return DatasetSentinel(\n \"holdout_input\", self.cross_experiment_key.parameters[\"holdout_dataset\"]\n )", "def train_target(self):\n return DatasetSentinel(\"train_target\", **self._dataset_sentinel_helper())", "def validation_target(self):\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create `holdout_set` (if necessary) by loading a DataFrame from a .csv file, or by separating `train_set`, and return the updated (`train_set`, `holdout_set`) pair
def define_holdout_set( train_set: pd.DataFrame, holdout_set: Union[pd.DataFrame, callable, str, None], target_column: Union[str, List[str]], ) -> Tuple[pd.DataFrame, Optional[pd.DataFrame]]: #################### Update `holdout_set` #################### if callable(holdout_set): train_set, ...
[ "def get_holdout_sets(filename, target_pats, y_target):\n\n if os.path.exists(filename):\n print \"File exists, loading now.\"\n with open(filename, 'rb') as f:\n subjects_train, subjects_test = pickle.load(f)\n return subjects_train, subjects_test\n else:\n print \"File...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate contents of blacklist. For most values, the corresponding file is saved upon completion of the experiment. See the "Notes" section below for details on some special cases
def validate_file_blacklist(blacklist): valid_values = [ # 'checkpoint', "description", "heartbeat", "predictions_holdout", "predictions_in_fold", "predictions_oof", "predictions_test", "script_backup", "tested_keys", "current_heartbeat...
[ "def load_blacklist(experiment):\n blacklist = np.loadtxt('../Slip_Property_Data/%s_blacklist.txt'%experiment)\n return blacklist", "def save_blacklist(blacklist, output_dir):\n output_filepath = os.path.join(output_dir, 'blacklist.txt')\n print('[INFO] Writing blacklist to {}...'.format(output_filepa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the scsi data, and vtd mapping data and output in the fomat viosname,lunid,disk,vtdname,partitionid
def getVIOSmappings(vios,csvFile=''): """ We need the cec this vios is running to be able to map the lpar names """ cec = nim_attribute(vios,"mgmt_profile").split()[2] """ ssh comms all ok?? """ isOK = ssh_output(vios,"echo OK") if isOK == None or isOK == False: error_message("Unable to c...
[ "def print_vscsi_attributes(self,objects):\n print(\"\\n\")\n print((\"LocalPartitionID\".ljust(35),\":\",objects.LocalPartitionID.value()))\n print((\"VirtualSlotNumber\".ljust(35),\":\",objects.VirtualSlotNumber.value()))\n print((\"RequiredAdapter\".ljust(35),\":\",objects.RequiredAda...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ensures that a websafe key is valid and of the desired kind.
def _raiseIfWebsafeKeyNotValid(websafeKey, kind): # Check that websafeKey is not None if not websafeKey: raise endpoints.BadRequestException( "Websafe key not provided for '%s'" % kind) # Try to decode the websafe key into a real key try: key = ndb.Key(urlsafe=websafeKey) ...
[ "def sanity_check_key(self,key):\n\t\tif not isinstance(key,str):\n\t\t\traise ValueError('Key should be of type string')", "def is_valid_key(cls, key: str):\n pass", "def validate_key(self, key):\n\t\treturn key", "def test_trust_key(self):\n self.fail(\"test not implemented\")", "def check_k...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create Announcement & assign to memcache; used by memcache cron job & putAnnouncement().
def _cacheAnnouncement(): confs = Conference.query(ndb.AND( Conference.seatsAvailable <= 5, Conference.seatsAvailable > 0) ).fetch(projection=[Conference.name]) if confs: # If there are conferences close to being sold out, # format announcement and...
[ "def _cacheAnnouncement():\n confs = Conference.query(ndb.AND(\n Conference.seatsAvailable <= 5,\n Conference.seatsAvailable > 0)\n ).fetch(projection=[Conference.name])\n\n if confs:\n # If there are almost sold out conferences,\n # format announceme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register or unregister user for selected conference.
def _conferenceRegistration(self, request, reg=True): retval = None # Get user profile prof = self._getProfileFromUser() # Check if conference given in the websafeConferenceKey exists wsck = request.websafeConferenceKey conf = _getEntityByWebsafeKey(wsck, 'Conference') ...
[ "def _conferenceRegistration(self, request, reg=True):\n retval = None\n prof = self._getProfileFromUser() # get user Profile\n\n # check if conf exists given websafeConfKey\n # get conference; check that it exists\n wsck = request.websafeConferenceKey\n conf = ndb.Key(urls...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copy relevant fields from Conference to ConferenceForm.
def _copyConferenceToForm(self, conf, displayName): cf = ConferenceForm() for field in cf.all_fields(): if hasattr(conf, field.name): # Convert Date to date string; just copy others if field.name.endswith('Date'): setattr(cf, field.name, st...
[ "def _copyConferenceToForm(self, conf, displayName):\n cf = ConferenceForm()\n for field in cf.all_fields():\n if hasattr(conf, field.name):\n # convert Date to date string; just copy others\n if field.name.endswith('Date'):\n setattr(cf, fie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create or update a conference, returning ConferenceForm/request.
def _createConferenceObject(self, request): # Preload necessary data items user = endpoints.get_current_user() if not user: raise endpoints.UnauthorizedException('Authorization required') user_id = user.email() if not request.name: raise endpoints.BadReque...
[ "def _createConferenceObject(self, request):\n # preload necessary data items\n user = endpoints.get_current_user()\n if not user:\n raise endpoints.UnauthorizedException('Authorization required')\n user_id = getUserId(user)\n\n if not request.name:\n raise e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve all conferences matching one or more given topics.
def _getConferencesByTopicSearch(self, request): # Generate list of filters from the topic arguments filters = [Conference.topics == topic for topic in request.topics] if not filters: raise endpoints.BadRequestException( 'At least one topic must be specified' ...
[ "def getConferencesByTopicSearch(self, request):\n conferences = self._getConferencesByTopicSearch(request)\n # Need to fetch organiser displayName from profiles\n # Get all keys and use get_multi for speed\n organisers = [\n (ndb.Key(Profile, conf.organizerUserId)) for conf i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return Announcement from memcache.
def getAnnouncement(self, request): announcement = memcache.get(MEMCACHE_ANNOUNCEMENTS_KEY) or "" return StringMessage(data=announcement)
[ "def getAnnouncement(self, request):\n return StringMessage(\n data=memcache.get(MEMCACHE_ANNOUNCEMENTS_KEY) or \"\")", "def getAnnouncement(self, request):\n return StringMessage(data=memcache.get(MEMCACHE_ANNOUNCEMENTS_KEY) or \"\")", "def getAnnouncement(self, request):\n #...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return requested conference (by websafeConferenceKey).
def getConference(self, request): # Get Conference object from request; bail if not found conf = _getEntityByWebsafeKey(request.websafeConferenceKey, 'Conference') prof = conf.key.parent().get() # Return ConferenceForm return self._copyConfer...
[ "def getConference(self, request):\n # get Conference object from request; bail if not found\n conf = ndb.Key(urlsafe=request.websafeConferenceKey).get()\n if not conf:\n raise endpoints.NotFoundException(\n 'No conference found with key: %s' % request.websafeConferenceKey)\n prof = co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get list of conferences matching one or more of the given topics.
def getConferencesByTopicSearch(self, request): conferences = self._getConferencesByTopicSearch(request) # Need to fetch organiser displayName from profiles # Get all keys and use get_multi for speed organisers = [ (ndb.Key(Profile, conf.organizerUserId)) for conf in conferen...
[ "def _getConferencesByTopicSearch(self, request):\n # Generate list of filters from the topic arguments\n filters = [Conference.topics == topic for topic in request.topics]\n if not filters:\n raise endpoints.BadRequestException(\n 'At least one topic must be specified...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return conferences created by user.
def getConferencesCreated(self, request): # Make sure user is authenticated user = endpoints.get_current_user() if not user: raise endpoints.UnauthorizedException('Authorization required') user_id = user.email() # Create ancestor query for all key matches for this use...
[ "def get_conferences_created(self, request):\n # make sure user is authed\n user = endpoints.get_current_user()\n if not user:\n raise endpoints.UnauthorizedException('Authorization required')\n user_id = self.auth.get_user_id(user)\n\n # create ancestor query for all k...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register user for selected conference.
def registerForConference(self, request): return self._conferenceRegistration(request)
[ "def register_for_conference(self, request):\n return self.conference_registration(request)", "def conference_registration(self, request, reg=True):\n prof = self.profile_service.get_profile_from_user() # get user Profile\n\n # check if conf exists given websafeConfKey\n # get confere...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unregister user for selected conference.
def unregisterFromConference(self, request): return self._conferenceRegistration(request, reg=False)
[ "def unregister_from_conference(self, request):\n return self.conference_registration(request, reg=False)", "def unsubscribeAuthenticatedMember():", "def unregister_user(self, uid):\n try:\n del self._users[uid]\n except KeyError:\n pass", "def _unregister(self, user...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update conference with provided fields and return updated info.
def updateConference(self, request): return self._updateConferenceObject(request)
[ "def updateConference(self, request):\n return self._updateConferenceObject(request)", "def update_conference(self, request):\n return self.conference_service.update_conference_object(request)", "def update_conference(self, title, summary, date, hour, conference_id):\n self.sql = \"UPDATE confe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copy relevant fields from Speaker to SpeakerForm.
def _copySpeakerToForm(self, speaker): sf = SpeakerForm() for field in sf.all_fields(): if hasattr(speaker, field.name): setattr(sf, field.name, getattr(speaker, field.name)) elif field.name == "websafeKey": setattr(sf, field.name, speaker.key.urls...
[ "def _copySpeakerToForm(self, spea):\n sf = SpeakerForm()\n for field in sf.all_fields():\n if hasattr(spea, field.name):\n setattr(sf, field.name, getattr(spea, field.name))\n elif field.name == \"websafeKey\":\n setattr(sf, field.name, spea.key.url...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a speaker, returning SpeakerForm/request.
def _createSpeakerObject(self, request): # Preload necessary data items user = endpoints.get_current_user() if not user: raise endpoints.UnauthorizedException('Authorization required') user_id = user.email() if not request.name: raise endpoints.BadRequestE...
[ "def createSpeaker(self, request):\n\n # make sure user is logged in.\n user = endpoints.get_current_user()\n if not user:\n raise endpoints.UnauthorizedException('Authorization required')\n\n # copy request data into a dictionary.\n data = {field.name: getattr(request,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the specified speaker is speaking at multiple sessions in the specified conference, and create memcache entry if so.
def _updateFeaturedSpeaker(websafeSpeakerKey, websafeConferenceKey): # Validate the websafe key arguments. Exception is raised if either # call fails. speaker = _getEntityByWebsafeKey(websafeSpeakerKey, 'Speaker') confKey = _raiseIfWebsafeKeyNotValid(websafeConferenceKey, ...
[ "def addFeaturedSession(speaker, sessionName, confKey):\n if not speaker:\n return\n\n c_key = ndb.Key(urlsafe=confKey)\n speakerSessionQuant = Session.query(\n ancestor=c_key).filter(Session.speaker == speaker).count()\n if speakerSessionQuant > 1:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the current featured speaker message from memcache.
def getFeaturedSpeaker(self, request): message = memcache.get(MEMCACHE_FEATURED_SPEAKER_KEY) or "" return StringMessage(data=message)
[ "def get_featured_speaker(self, request):\n return StringMessage(\n data=memcache.get(MEMCACHE_FEATURED_SPEAKER_KEY) or \"\")", "def getFeaturedSpeaker(self, request):\n msg = memcache.get(MEMCACHE_FEATURED_SPEAKER_PRE_KEY+request.websafeConferenceKey)\n if not msg or msg == '':\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a session to the user's wishlist, returning a boolean.
def _addSessionToWishlist(self, request): # Preload necessary data items user = endpoints.get_current_user() if not user: raise endpoints.UnauthorizedException('Authorization required') # Verify that the session actually exists session = _getEntityByWebsafeKey(request...
[ "def addSessionToWishlist(self, request):\n # get user Profile\n prof = self._getProfileFromUser()\n # get session; check that it exists\n # check if session exists given websafeSessionKey\n websafeSessionKey = request.websafeSessionKey\n session = ndb.Key(urlsafe=websafeSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copy relevant fields from Session to SessionForm.
def _copySessionToForm(self, session): sf = SessionForm() for field in sf.all_fields(): if hasattr(session, field.name): # Convert date field to date string if field.name == 'date': setattr(sf, field.name, str(getattr(session, field.name)))...
[ "def _copySessionToForm(self, session):\n sf = SessionForm()\n for field in sf.all_fields():\n if hasattr(session, field.name):\n if field.name == 'typeOfSession':\n setattr(sf,\n field.name,\n getattr(T...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }