query stringlengths 9 9.05k | document stringlengths 10 222k | metadata dict | negatives listlengths 30 30 | negative_scores listlengths 30 30 | document_score stringlengths 4 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_start_date(self, date):\n pass",
"def start_date(self, start_date):\n self._start_date = start_date",
"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 start_date(sel... | [
"0.86141276",
"0.80457026",
"0.7868022",
"0.7836363",
"0.7836363",
"0.7836363",
"0.7836363",
"0.7836363",
"0.7836363",
"0.7836363",
"0.7836363",
"0.7836363",
"0.7739041",
"0.749863",
"0.74370885",
"0.7398391",
"0.729659",
"0.7160086",
"0.70503116",
"0.70105284",
"0.69417137",... | 0.80691314 | 1 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.6398558",
"0.604387",
"0.59920263",
"0.5793335",
"0.56829715",
"0.56757975",
"0.5573747",
"0.5565601",
"0.5519586",
"0.54784703",
"0.54700017",
"0.54370415",
"0.5375229",
"0.53743625",
"0.5347664",
"0.53292626",
"0.53240794",
"0.52728754",
"0.52641976",
"0.52620107",
"0.52... | 0.79892987 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.6722339",
"0.65786284",
"0.6452577",
"0.6041004",
"0.6005217",
"0.5994471",
"0.5969092",
"0.5801106",
"0.5778006",
"0.57584304",
"0.57022667",
"0.55251795",
"0.5473172",
"0.5456213",
"0.5440098",
"0.54038495",
"0.53848374",
"0.5352643",
"0.5340399",
"0.5331021",
"0.5279471... | 0.70848614 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.6735556",
"0.6720651",
"0.67186683",
"0.6640583",
"0.65773517",
"0.6404575",
"0.6303615",
"0.5945554",
"0.5850497",
"0.58364195",
"0.57948834",
"0.57733727",
"0.57243025",
"0.56459594",
"0.56439763",
"0.5600407",
"0.5567689",
"0.547445",
"0.5463407",
"0.54597545",
"0.54290... | 0.7284325 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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)... | [
"0.68649036",
"0.6444064",
"0.63804555",
"0.63166463",
"0.62582725",
"0.61420965",
"0.61303335",
"0.59818137",
"0.5775787",
"0.56232387",
"0.5621364",
"0.5609542",
"0.5536238",
"0.55356735",
"0.53799516",
"0.5366732",
"0.53493655",
"0.5324431",
"0.52932245",
"0.525854",
"0.52... | 0.7623682 | 0 |
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 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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)\... | [
"0.7173671",
"0.7164694",
"0.6961585",
"0.67937434",
"0.66460264",
"0.64222735",
"0.63047063",
"0.6221156",
"0.61231023",
"0.5842353",
"0.58139414",
"0.57718784",
"0.5757523",
"0.56256413",
"0.5614401",
"0.56115836",
"0.5588756",
"0.55571264",
"0.55410564",
"0.55111706",
"0.5... | 0.75991935 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.750306",
"0.74308896",
"0.7306206",
"0.7060795",
"0.68989515",
"0.68989515",
"0.6491007",
"0.6120849",
"0.591677",
"0.5913262",
"0.58993304",
"0.56994367",
"0.569883",
"0.56973416",
"0.5684809",
"0.56796527",
"0.56629676",
"0.5620759",
"0.5603418",
"0.55868685",
"0.5576812... | 0.86254066 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.63728535",
"0.6276276",
"0.62166536",
"0.61831915",
"0.6053796",
"0.59584445",
"0.5842777",
"0.5797149",
"0.57607424",
"0.5707139",
"0.5612971",
"0.5531448",
"0.5506551",
"0.5497594",
"0.5481814",
"0.54728425",
"0.54640925",
"0.5431332",
"0.538145",
"0.5380802",
"0.5379458... | 0.80763716 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.66338634",
"0.66057515",
"0.6131386",
"0.60525894",
"0.59958154",
"0.58884054",
"0.58270955",
"0.5821739",
"0.57709527",
"0.5718494",
"0.57100034",
"0.5659034",
"0.56481487",
"0.56460947",
"0.5622122",
"0.55970424",
"0.55949754",
"0.5559805",
"0.5537368",
"0.5531731",
"0.5... | 0.8322212 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 == \"... | [
"0.7402478",
"0.7031963",
"0.67778796",
"0.6563116",
"0.64243233",
"0.63864547",
"0.63864547",
"0.63864547",
"0.63864547",
"0.63864547",
"0.63864547",
"0.63864547",
"0.63864547",
"0.63433135",
"0.629675",
"0.6284176",
"0.61299545",
"0.604149",
"0.6033477",
"0.59961516",
"0.59... | 0.74479747 | 0 |
Implementing click bulk edit submit button functionality | def click_bulk_edit_submit_button(self):
self.click_element(self.bulk_edit_submit_button_locator) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.80722886",
"0.7676083",
"0.72128063",
"0.6668404",
"0.6572236",
"0.65535694",
"0.63675964",
"0.63469726",
"0.63170797",
"0.62994254",
"0.6182403",
"0.61548156",
"0.61191946",
"0.6086712",
"0.60528755",
"0.60109603",
"0.59184855",
"0.5897436",
"0.58945984",
"0.58505696",
"0... | 0.8029734 | 1 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.7165491",
"0.69654083",
"0.69372815",
"0.69077474",
"0.66696733",
"0.6508445",
"0.6368367",
"0.6347989",
"0.63158387",
"0.627581",
"0.6269957",
"0.61755913",
"0.61733496",
"0.6149201",
"0.6137883",
"0.6119374",
"0.58740306",
"0.5799829",
"0.57629937",
"0.57190955",
"0.5663... | 0.8185726 | 0 |
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 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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:",
... | [
"0.6368619",
"0.6344278",
"0.6144431",
"0.61396897",
"0.6069333",
"0.5957378",
"0.591541",
"0.5847986",
"0.5835125",
"0.5799273",
"0.5767016",
"0.57317346",
"0.5720798",
"0.5717911",
"0.5690789",
"0.5643161",
"0.5638978",
"0.5619242",
"0.5607045",
"0.5593206",
"0.55726165",
... | 0.74997246 | 0 |
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 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.660459",
"0.6117637",
"0.5810706",
"0.579244",
"0.5719326",
"0.5605203",
"0.55454856",
"0.55295485",
"0.5480238",
"0.5474781",
"0.5458673",
"0.5429711",
"0.541652",
"0.54080826",
"0.53880817",
"0.5370094",
"0.53372633",
"0.533329",
"0.53238416",
"0.5259748",
"0.5249081",
... | 0.74036354 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 ... | [
"0.8016771",
"0.646783",
"0.62058467",
"0.59663063",
"0.5802453",
"0.5654677",
"0.558464",
"0.55153704",
"0.5512954",
"0.54436165",
"0.5412148",
"0.5398465",
"0.5385228",
"0.5373527",
"0.5345784",
"0.53445095",
"0.53421956",
"0.53135604",
"0.5309377",
"0.5302662",
"0.52934057... | 0.8421994 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_destination(self):\n pass",
"def set_source(self, source):\n self.data['source'] = source",
"def attach(self, destination): \r\n self.destination= destination",
"def source(self, other):\n raise NotImplementedError",
"def set_destination_to_add_destination(self, d... | [
"0.7595484",
"0.68353415",
"0.6798214",
"0.67796534",
"0.67778414",
"0.67471397",
"0.67426056",
"0.6698542",
"0.64227223",
"0.64126635",
"0.63714236",
"0.6344426",
"0.6306878",
"0.628486",
"0.6280195",
"0.6280195",
"0.62796885",
"0.62796885",
"0.62796885",
"0.62796885",
"0.62... | 0.71872395 | 1 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_destination(self):\n pass",
"def attach(self, destination): \r\n self.destination= destination",
"def attach(self, destination): \r\n self.destination=destination",
"def destination(self, destination):\n\n self._destination = destination",
"def do_destinati... | [
"0.8411674",
"0.7463169",
"0.7400204",
"0.7207934",
"0.70057255",
"0.6809444",
"0.6675045",
"0.66749346",
"0.66615766",
"0.6569928",
"0.65571934",
"0.6486881",
"0.64785564",
"0.64413476",
"0.6326941",
"0.631957",
"0.63072693",
"0.630284",
"0.61267376",
"0.6122438",
"0.6116038... | 0.7659271 | 1 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 __call__(self, rate:'kW'):\n self.rate = rate\n self.cost = self.price * rate",
"def _do_set_rate(self, rate):\n ... | [
"0.66945755",
"0.6256623",
"0.58632624",
"0.56280166",
"0.5582999",
"0.5560925",
"0.5540805",
"0.5522839",
"0.5397975",
"0.5368135",
"0.5368135",
"0.53364104",
"0.5259004",
"0.5257495",
"0.52336127",
"0.52244794",
"0.5215375",
"0.5210986",
"0.5177353",
"0.51745504",
"0.516315... | 0.74631596 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 ... | [
"0.80682164",
"0.6506563",
"0.611456",
"0.56259584",
"0.5613796",
"0.56112826",
"0.55190563",
"0.55092216",
"0.5477043",
"0.54032",
"0.5402372",
"0.53741306",
"0.53735375",
"0.5371906",
"0.5339226",
"0.52918637",
"0.5284191",
"0.5281223",
"0.52697504",
"0.52324903",
"0.520353... | 0.8646041 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 set_des... | [
"0.6717724",
"0.67038506",
"0.6494957",
"0.64152914",
"0.6392956",
"0.62395084",
"0.6176817",
"0.6160083",
"0.6086105",
"0.6084194",
"0.60714966",
"0.6068572",
"0.60467327",
"0.60467327",
"0.60467327",
"0.60467327",
"0.60467327",
"0.60350305",
"0.599849",
"0.5995645",
"0.5976... | 0.712687 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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.... | [
"0.7282243",
"0.66426474",
"0.63583803",
"0.6355037",
"0.5928445",
"0.58797383",
"0.57747257",
"0.57692534",
"0.5715802",
"0.567752",
"0.5522854",
"0.5438436",
"0.54336697",
"0.54138416",
"0.5389457",
"0.5359198",
"0.5304087",
"0.52684253",
"0.5221472",
"0.5190703",
"0.518978... | 0.7443731 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.69088066",
"0.66299367",
"0.6117149",
"0.6081349",
"0.60306233",
"0.5784268",
"0.5770761",
"0.5732137",
"0.5709735",
"0.54425746",
"0.53622025",
"0.53092676",
"0.5295223",
"0.5292526",
"0.5235184",
"0.5194165",
"0.51922876",
"0.51855004",
"0.5147623",
"0.51423776",
"0.5084... | 0.7398431 | 0 |
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_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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_... | [
"0.63370734",
"0.60845774",
"0.60595584",
"0.602486",
"0.58634794",
"0.5762692",
"0.5760641",
"0.5752293",
"0.57230544",
"0.56713235",
"0.56500137",
"0.5597601",
"0.5579603",
"0.55513275",
"0.5518962",
"0.551297",
"0.5499407",
"0.5466408",
"0.546308",
"0.54610395",
"0.5433152... | 0.7548665 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rates(self):\n raise NotImplementedError(\"Must be implemented by subclass.\")",
"def get_current_rate(self):\n pass",
"def select_reference_rates_tab(self):\n self.select_static_tab(self.reference_rates_tab_locator, True)",
"def calculateDataRate(self):\n pass",
"def rate(self)... | [
"0.6990552",
"0.66156983",
"0.6201779",
"0.61440897",
"0.6085955",
"0.59836334",
"0.598278",
"0.58565754",
"0.57975405",
"0.5742415",
"0.5740475",
"0.56852716",
"0.56798387",
"0.56295514",
"0.5606371",
"0.56015044",
"0.5600266",
"0.5587584",
"0.5586825",
"0.55694264",
"0.5565... | 0.7216807 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.61450714",
"0.6118674",
"0.59151864",
"0.570882",
"0.54793197",
"0.5440474",
"0.5394293",
"0.53898215",
"0.53862345",
"0.5362355",
"0.53242594",
"0.5290705",
"0.5275283",
"0.5234759",
"0.5224288",
"0.52232665",
"0.5206688",
"0.52063805",
"0.51902455",
"0.5173077",
"0.51618... | 0.8118622 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.70824105",
"0.6161778",
"0.6106716",
"0.5919944",
"0.57483226",
"0.57384634",
"0.5682125",
"0.5653956",
"0.5572523",
"0.55241346",
"0.55241346",
"0.5510905",
"0.5445419",
"0.54413915",
"0.5437206",
"0.5395717",
"0.5387464",
"0.53720695",
"0.53677285",
"0.5356148",
"0.53158... | 0.750019 | 0 |
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') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.6704803",
"0.6659049",
"0.62752223",
"0.612902",
"0.6105099",
"0.60682184",
"0.5983011",
"0.59394455",
"0.59090525",
"0.58154",
"0.579811",
"0.5768202",
"0.57265127",
"0.57265127",
"0.5684236",
"0.56841564",
"0.55653906",
"0.55247366",
"0.55149025",
"0.5494688",
"0.5454117... | 0.76746756 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.65470636",
"0.5555432",
"0.5375789",
"0.53040683",
"0.5265732",
"0.5251825",
"0.52483046",
"0.5247218",
"0.52333355",
"0.5223402",
"0.5211076",
"0.51632774",
"0.5090065",
"0.50898117",
"0.5086829",
"0.5062219",
"0.5055388",
"0.50354195",
"0.50350845",
"0.50128216",
"0.5012... | 0.6384165 | 1 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.8105151",
"0.794805",
"0.73137873",
"0.7264641",
"0.7102072",
"0.7087844",
"0.70674783",
"0.7059369",
"0.7035884",
"0.70264035",
"0.68555933",
"0.6739181",
"0.67389554",
"0.6670417",
"0.65871423",
"0.6563748",
"0.6447696",
"0.64369726",
"0.6267657",
"0.61293465",
"0.599655... | 0.81812817 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def action(self,item):\r\n pass",
"def _action(self):\n pass",
"def action(self):\n pass",
"def action(self):\n pass",
"def onShowed(self):\n self.parent.actionTagTwo=\"\"\n pass",
"def __actions__(self, obj):\n primary_fields = self.__provider__.get_prima... | [
"0.7179313",
"0.6199474",
"0.6192554",
"0.6192554",
"0.6180556",
"0.61662686",
"0.6146612",
"0.6127133",
"0.604029",
"0.6010713",
"0.6008397",
"0.6008368",
"0.58624053",
"0.5829709",
"0.5829346",
"0.5829346",
"0.5772425",
"0.57424104",
"0.5731849",
"0.56981766",
"0.56816936",... | 0.70441365 | 1 |
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') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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(... | [
"0.7408507",
"0.7157741",
"0.6822164",
"0.6584997",
"0.65837705",
"0.627723",
"0.6117332",
"0.6084861",
"0.60220706",
"0.59835017",
"0.5927379",
"0.5761761",
"0.57569414",
"0.57379687",
"0.5736414",
"0.5709918",
"0.5691938",
"0.56675476",
"0.5583201",
"0.5517948",
"0.5517535"... | 0.7672479 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 use(target, name):\n return \"You use the \" + name + \" to pay \" + target.name",
"def se... | [
"0.70902216",
"0.65581495",
"0.6447595",
"0.63000184",
"0.6270888",
"0.6120589",
"0.6120589",
"0.6109877",
"0.604",
"0.5914904",
"0.5862381",
"0.58405066",
"0.5839304",
"0.5839304",
"0.56366056",
"0.55916286",
"0.5582298",
"0.556557",
"0.55630815",
"0.5550732",
"0.55316234",
... | 0.79451764 | 0 |
Implementing get target buy policy functionality | def get_target_buy_policy(self):
global target_buy_policy
return target_buy_policy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def policy(agent):",
"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 getAction(self, state):\n # Pick Action\n legalActions = self.getLegalActions(state)\n act... | [
"0.62555337",
"0.6185256",
"0.61499",
"0.61307913",
"0.60904336",
"0.6055906",
"0.595635",
"0.5928054",
"0.5914833",
"0.5885227",
"0.58382344",
"0.5782354",
"0.5782354",
"0.57409716",
"0.5726041",
"0.56711364",
"0.5637255",
"0.563183",
"0.56234705",
"0.5622425",
"0.5594815",
... | 0.7827906 | 0 |
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))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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):... | [
"0.6439152",
"0.5870092",
"0.5696178",
"0.5516288",
"0.53760064",
"0.53070027",
"0.52721477",
"0.51333565",
"0.51169074",
"0.51167685",
"0.50744283",
"0.5036501",
"0.50308836",
"0.49818993",
"0.49748594",
"0.49631476",
"0.49574703",
"0.49414706",
"0.49384534",
"0.49269494",
"... | 0.70045894 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 policy(agent):",
"def apply_policy(self, policy):\n tenant_name = policy['tenant_name']\n fw_id = policy['fw_... | [
"0.57578945",
"0.56873965",
"0.5348911",
"0.5346214",
"0.5319583",
"0.53184915",
"0.53172463",
"0.52937037",
"0.52722543",
"0.5266859",
"0.52648765",
"0.525317",
"0.52372414",
"0.52235234",
"0.51925033",
"0.51838106",
"0.5182945",
"0.5146547",
"0.5137112",
"0.51151454",
"0.50... | 0.66891956 | 0 |
Implementing click include cli checkbox functionality | def click_include_cli_checkbox(self):
self.click_element(self.include_cli_checkbox_locator) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def click_guarantee_cli_checkbox(self):\n self.click_element(self.guarantee_cli_checkbox_locator)",
"def click_automate_generation_checkbox(self):\n self.click_element(self.automate_generation_checkbox_locator)",
"def CheckBoxClicked(self,chkb):\r\n\r\n print(\"{} Selecionado.\", format(ch... | [
"0.7180335",
"0.633742",
"0.6186127",
"0.61447966",
"0.60904425",
"0.6061627",
"0.6051627",
"0.597381",
"0.59416974",
"0.59316313",
"0.5918221",
"0.58853",
"0.58538675",
"0.58538675",
"0.5849901",
"0.5836241",
"0.58296305",
"0.58069646",
"0.5802643",
"0.57914114",
"0.57344997... | 0.82027 | 0 |
Implementing click automate generation checkbox functionality | def click_automate_generation_checkbox(self):
self.click_element(self.automate_generation_checkbox_locator) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def click_guarantee_cli_checkbox(self):\n self.click_element(self.guarantee_cli_checkbox_locator)",
"def on_checkBox_kongtoukai_clicked(self, checked):\n # TODO: not implemented yet\n raise NotImplementedError",
"def _add_checkbox(self, text, state_changed, tooltip, checked=True,\n ... | [
"0.67904496",
"0.6535885",
"0.65002245",
"0.6481565",
"0.6431148",
"0.63907903",
"0.63848615",
"0.6366873",
"0.6341021",
"0.63073826",
"0.63037425",
"0.62903464",
"0.62731963",
"0.620092",
"0.6196953",
"0.6037659",
"0.6002369",
"0.591591",
"0.5890406",
"0.58776736",
"0.58606"... | 0.7924865 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.7729644",
"0.72661537",
"0.6927698",
"0.69045794",
"0.6451391",
"0.6321213",
"0.6035302",
"0.6026688",
"0.5929195",
"0.5800937",
"0.5781004",
"0.572054",
"0.56928444",
"0.56849253",
"0.56754345",
"0.5626255",
"0.56152767",
"0.5538557",
"0.552185",
"0.55135155",
"0.5491271"... | 0.7788845 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def listctrl_switch_loadout(self, source):\n if source == self.active_loadout:\n return False\n\n self.gear_slots[self.active_loadout.name] = self.create_blrevive_weapon()\n\n if source.name in self.gear_slots:\n self.load_blrevive_weapon(self.gear_slots[source.name])\n\n... | [
"0.6001915",
"0.5983745",
"0.58766633",
"0.5687606",
"0.567117",
"0.56279045",
"0.5524678",
"0.5523005",
"0.54764086",
"0.542335",
"0.5407171",
"0.53916734",
"0.5346383",
"0.531239",
"0.5288447",
"0.52460074",
"0.524296",
"0.523115",
"0.5228215",
"0.5227995",
"0.5221563",
"... | 0.72665113 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_view_dropdown_visible(self):\n return self.is_element_visible(self.view_dropdown_locator)",
"def is_dropdown_expanded(self):\n return self.dropdown.element(class_name=\"dropdown-focus\").exists",
"def is_visible(self):",
"def is_discrepancy_dropdown_visible(self):\n return self.is_ele... | [
"0.6721152",
"0.62846535",
"0.6274534",
"0.62375015",
"0.62283164",
"0.62241983",
"0.6187858",
"0.60083485",
"0.5904933",
"0.58766943",
"0.5875189",
"0.57837415",
"0.576537",
"0.5752084",
"0.57505965",
"0.5628871",
"0.56188196",
"0.5590547",
"0.5584492",
"0.55437773",
"0.5531... | 0.699368 | 0 |
Implementing is destination input textbox visible functionality | def is_destination_input_textbox_visible(self):
return self.is_element_visible(self.destination_input_textbox_locator) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_destination_textbox_visible(self):\n return self.is_element_visible(self.reference_rates_destination_textbox_locator)",
"def is_visible(self):",
"def visible(self, show):",
"def ev_textinput(self, event: TextInput) -> None:",
"def show(self): \n InputItem.show(self)\n self.input... | [
"0.7082717",
"0.6056446",
"0.58619386",
"0.5751972",
"0.5742402",
"0.5742402",
"0.5723534",
"0.5681438",
"0.5681438",
"0.5649161",
"0.55968016",
"0.5532368",
"0.5513671",
"0.547241",
"0.5431309",
"0.53958184",
"0.53434575",
"0.53434575",
"0.5325499",
"0.52807295",
"0.5265454"... | 0.788917 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def columns(self):\n \n pass",
"def is_specific_column_present(self, grid_div_id, column_name):\n specific_column_locator = (By.XPATH, \"//div[contains(@id, '%s')]/descendant::th[@data-field='%s']\" % (grid_div_id, column_name))\n return self.is_element_present(specific_column_locator)",
... | [
"0.6262402",
"0.6219727",
"0.6189594",
"0.61687696",
"0.6151684",
"0.6127107",
"0.6107462",
"0.610121",
"0.60943484",
"0.6070248",
"0.60317606",
"0.5992439",
"0.59751236",
"0.5942852",
"0.59316164",
"0.5924672",
"0.591986",
"0.5913953",
"0.58789116",
"0.5877305",
"0.5858077",... | 0.711884 | 0 |
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_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.6595565",
"0.6579554",
"0.64243436",
"0.6204201",
"0.61319244",
"0.59698147",
"0.5958927",
"0.595838",
"0.59310436",
"0.59297544",
"0.5927377",
"0.58760035",
"0.5861238",
"0.58487624",
"0.58487624",
"0.58440185",
"0.58437294",
"0.5766345",
"0.5711271",
"0.56679034",
"0.566... | 0.7345537 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.64984775",
"0.59864783",
"0.5873134",
"0.5831746",
"0.57233775",
"0.56565744",
"0.56486034",
"0.56228536",
"0.5586765",
"0.5521409",
"0.546854",
"0.54677045",
"0.5465543",
"0.5402681",
"0.53863895",
"0.53619283",
"0.53444225",
"0.52923024",
"0.52921027",
"0.5267506",
"0.52... | 0.76688296 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 get_details(self):",
"def enable_details(self):\n self.cs.detail = True",
"def purchase(self, item_type):",
"def input_payment_details(self)... | [
"0.6218292",
"0.58803385",
"0.57047385",
"0.55989105",
"0.5592674",
"0.5399362",
"0.5347198",
"0.531534",
"0.5296534",
"0.5213632",
"0.5194612",
"0.5192922",
"0.5177318",
"0.51669794",
"0.5142594",
"0.5140994",
"0.5122961",
"0.5118239",
"0.5090551",
"0.5051972",
"0.50412834",... | 0.6910262 | 0 |
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() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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\"] = check_enum(link_target, L... | [
"0.57581264",
"0.57360834",
"0.5704888",
"0.57009506",
"0.56327444",
"0.5612569",
"0.5577209",
"0.5577209",
"0.55430907",
"0.5542682",
"0.5497914",
"0.5482014",
"0.5472685",
"0.5469825",
"0.54515964",
"0.54339606",
"0.54190713",
"0.5416186",
"0.5416186",
"0.54143345",
"0.5406... | 0.7068939 | 0 |
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() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def target_sell_price(self):\n return super(Player, self).target_sell_price",
"async def _vis_buy(self, ctx, *args):\n if has_post_permission(ctx.guild.id, ctx.channel.id):\n number, item = ch.parse_number_and_name(args)\n if item:\n await ctx.send(vis_helpers.s... | [
"0.5813365",
"0.57899123",
"0.5756613",
"0.57438093",
"0.5740053",
"0.5614278",
"0.56005937",
"0.5541609",
"0.5541609",
"0.55083424",
"0.550767",
"0.54989284",
"0.54829466",
"0.5476783",
"0.5433824",
"0.5425738",
"0.54128516",
"0.54126567",
"0.5404454",
"0.53718203",
"0.53610... | 0.68895245 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.6495771",
"0.62618667",
"0.60916185",
"0.5946068",
"0.5715191",
"0.567597",
"0.56602305",
"0.5574808",
"0.5572295",
"0.5452745",
"0.5394016",
"0.5347834",
"0.5309349",
"0.53008556",
"0.5293746",
"0.5289541",
"0.527092",
"0.5261056",
"0.5248171",
"0.5235941",
"0.51916426",
... | 0.66756034 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plans():",
"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_dropdow... | [
"0.57999843",
"0.5784943",
"0.5556903",
"0.55306053",
"0.53336537",
"0.533109",
"0.5294177",
"0.5224904",
"0.5156525",
"0.51557237",
"0.5153142",
"0.514415",
"0.5124864",
"0.51236206",
"0.51054424",
"0.51054424",
"0.51011217",
"0.50561494",
"0.5020014",
"0.5019802",
"0.501817... | 0.69643253 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.6160238",
"0.6142805",
"0.5944419",
"0.5795669",
"0.577346",
"0.5734563",
"0.56611264",
"0.5657722",
"0.5645191",
"0.5593953",
"0.5516085",
"0.5394442",
"0.53024334",
"0.5253677",
"0.51763785",
"0.5144148",
"0.51351786",
"0.51129127",
"0.50925",
"0.5092124",
"0.5087189",
... | 0.8053538 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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.... | [
"0.575327",
"0.56671774",
"0.54983485",
"0.5497504",
"0.54278195",
"0.53913313",
"0.5331615",
"0.5325904",
"0.5314808",
"0.53105533",
"0.5297771",
"0.52571106",
"0.52271354",
"0.52199143",
"0.519113",
"0.5143383",
"0.5140523",
"0.5123071",
"0.51150763",
"0.50886685",
"0.50832... | 0.8331571 | 0 |
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() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.8202686",
"0.80335456",
"0.74357104",
"0.74149716",
"0.72845346",
"0.72829384",
"0.72605",
"0.72499174",
"0.7216867",
"0.7202817",
"0.70367014",
"0.69755983",
"0.68936044",
"0.68760645",
"0.6781373",
"0.6636045",
"0.6578328",
"0.6401699",
"0.636651",
"0.6061604",
"0.602482... | 0.8149763 | 1 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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_... | [
"0.72049874",
"0.71058124",
"0.6989213",
"0.6368108",
"0.631195",
"0.6140118",
"0.61324686",
"0.60960543",
"0.6026939",
"0.58555514",
"0.585286",
"0.57779235",
"0.5776125",
"0.5776095",
"0.5768035",
"0.57594347",
"0.55886054",
"0.55702305",
"0.5557164",
"0.55496216",
"0.55267... | 0.8397314 | 0 |
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, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.7632212",
"0.7429682",
"0.6681149",
"0.6559746",
"0.6546259",
"0.6481419",
"0.6439012",
"0.5897788",
"0.5761528",
"0.5743864",
"0.5709328",
"0.5687823",
"0.5661773",
"0.5654063",
"0.56287414",
"0.5625229",
"0.5610592",
"0.5592306",
"0.5590449",
"0.55888796",
"0.5561194",
... | 0.78032136 | 0 |
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) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.7026351",
"0.68475145",
"0.66155964",
"0.6442423",
"0.6418752",
"0.638268",
"0.63307065",
"0.63213784",
"0.6320915",
"0.6320915",
"0.6320915",
"0.6234889",
"0.623244",
"0.62140983",
"0.6192419",
"0.61831707",
"0.61803746",
"0.6167173",
"0.61546427",
"0.61361396",
"0.613442... | 0.8608011 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 ... | [
"0.6267459",
"0.60361874",
"0.6005112",
"0.59332246",
"0.5914079",
"0.58198893",
"0.578207",
"0.57676196",
"0.57331485",
"0.57331485",
"0.56856215",
"0.5666313",
"0.5595226",
"0.5546338",
"0.55456305",
"0.5544343",
"0.55403894",
"0.55393416",
"0.5523232",
"0.5497067",
"0.5467... | 0.6903751 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _course_key(self):\r\n return \"slashes:{org}+{number}+{run}\".format(**self._course_dict)",
"def _key(\n service=None, # type: Optional[str]\n env=None, # type: Optional[str]\n ):\n # type: (...) -> str\n service = service or \"\"\n env = env or \"\"\n r... | [
"0.6446606",
"0.61374927",
"0.60621893",
"0.5975565",
"0.5934612",
"0.5891562",
"0.5889384",
"0.5880724",
"0.58526766",
"0.5810926",
"0.57407105",
"0.5730642",
"0.5688418",
"0.56631047",
"0.56109715",
"0.55618995",
"0.5547926",
"0.5547926",
"0.5547926",
"0.5547926",
"0.554792... | 0.70411134 | 0 |
Get a `DatasetSentinel` representing an Experiment's `fold_train_input` Returns | def train_input(self):
return DatasetSentinel("train_input", **self._dataset_sentinel_helper()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.7197259",
"0.7058317",
"0.6581115",
"0.63265425",
"0.62734795",
"0.61224383",
"0.61224383",
"0.609924",
"0.59627235",
"0.5961343",
"0.58399856",
"0.5539047",
"0.55349284",
"0.5525194",
"0.54774237",
"0.54644793",
"0.5406239",
"0.540372",
"0.5370397",
"0.5369286",
"0.535446... | 0.81839544 | 0 |
Get a `DatasetSentinel` representing an Experiment's `fold_train_target` Returns | def train_target(self):
return DatasetSentinel("train_target", **self._dataset_sentinel_helper()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.72998613",
"0.713837",
"0.66336054",
"0.6162712",
"0.5902305",
"0.57828236",
"0.5423811",
"0.5414221",
"0.53984654",
"0.5350862",
"0.52556276",
"0.52556276",
"0.5214808",
"0.5211418",
"0.51941895",
"0.51866794",
"0.5174885",
"0.5166052",
"0.51568496",
"0.5156731",
"0.51362... | 0.81183374 | 0 |
Get a `DatasetSentinel` representing an Experiment's `fold_validation_input` Returns | def validation_input(self):
return DatasetSentinel("validation_input", **self._dataset_sentinel_helper()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.7417075",
"0.7251253",
"0.6297536",
"0.6207659",
"0.5739387",
"0.5739387",
"0.57109046",
"0.5591265",
"0.55240226",
"0.54016316",
"0.53963184",
"0.5390611",
"0.5354384",
"0.5352668",
"0.52997166",
"0.50982046",
"0.509454",
"0.5057065",
"0.50273144",
"0.49092582",
"0.488593... | 0.79688627 | 0 |
Get a `DatasetSentinel` representing an Experiment's `fold_validation_target` Returns | def validation_target(self):
return DatasetSentinel("validation_target", **self._dataset_sentinel_helper()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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.... | [
"0.7272191",
"0.7040783",
"0.65106875",
"0.6453621",
"0.58669484",
"0.52230227",
"0.52210194",
"0.5189654",
"0.5189253",
"0.5166722",
"0.50729924",
"0.5023478",
"0.4998633",
"0.4998633",
"0.49692518",
"0.4958584",
"0.4885863",
"0.4881906",
"0.48708826",
"0.4870653",
"0.486606... | 0.80776197 | 0 |
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"]
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 ... | [
"0.7605484",
"0.70850253",
"0.65761745",
"0.62563837",
"0.58847857",
"0.5119277",
"0.49333444",
"0.48865077",
"0.48654017",
"0.48275244",
"0.48057696",
"0.47976065",
"0.47965127",
"0.4744823",
"0.47400033",
"0.47386026",
"0.47028476",
"0.4699324",
"0.46962723",
"0.4694681",
"... | 0.8473368 | 0 |
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"]
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 ... | [
"0.7770308",
"0.7121358",
"0.64517236",
"0.6015566",
"0.54749423",
"0.5369748",
"0.5230045",
"0.52188426",
"0.5049947",
"0.49974164",
"0.49770722",
"0.49149367",
"0.48960745",
"0.48660335",
"0.4858429",
"0.47984567",
"0.47667906",
"0.47544086",
"0.47335964",
"0.47325793",
"0.... | 0.84920114 | 0 |
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, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_train_set(addition_to_filename = ''):\n df = f.create_df()\n print('original df size is ', df.shape)\n print('original df columns ', df.columns)\n\n df = f.calculate_missing_prices_for_train_set(df)\n print('df size after averaging price ', df.shape)\n df = f.downcast_dtypes(df)\n d... | [
"0.6308423",
"0.6136544",
"0.60832155",
"0.60303485",
"0.59481156",
"0.5926183",
"0.58851606",
"0.5858881",
"0.5792204",
"0.57012284",
"0.56984967",
"0.569597",
"0.56708777",
"0.5638815",
"0.56349504",
"0.56267476",
"0.56263214",
"0.5608293",
"0.55986565",
"0.55914485",
"0.55... | 0.6827967 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_blacklist(experiment):\n blacklist = np.loadtxt('../Slip_Property_Data/%s_blacklist.txt'%experiment)\n return blacklist",
"def load_blacklist(experiment):\n blacklist = np.loadtxt('../Slip_Property_Data/%s_blacklist.txt'%experiment)\n return blacklist",
"def save_blacklist(blacklist, outpu... | [
"0.6533181",
"0.6533181",
"0.6494651",
"0.64306563",
"0.6377956",
"0.61511934",
"0.6121788",
"0.5941797",
"0.5909957",
"0.5882721",
"0.5851798",
"0.5822298",
"0.56683594",
"0.5648593",
"0.5628515",
"0.55158484",
"0.54681826",
"0.54313976",
"0.5406495",
"0.5349667",
"0.5342094... | 0.804985 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.6226752",
"0.62065095",
"0.613328",
"0.5941464",
"0.58446807",
"0.5758732",
"0.57254314",
"0.5669364",
"0.5603092",
"0.5584567",
"0.55693907",
"0.5547329",
"0.553814",
"0.55317974",
"0.55209994",
"0.5405666",
"0.5393464",
"0.5392122",
"0.5388479",
"0.5382682",
"0.53686225"... | 0.69272226 | 0 |
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)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isValidKey(key):\n return True",
"def validate_key(key):\r\n try:\r\n secret.Secret(key)\r\n except secret.Secret.InvalidSecret as e:\r\n raise KeyIsInvalid(e.message)",
"def _check_key(self, key):\n raise NotImplementedError",
"def test_valid_key(self):\n f = lws.valid... | [
"0.66728324",
"0.6390312",
"0.6318158",
"0.62363094",
"0.6178258",
"0.61090034",
"0.59969664",
"0.59606546",
"0.59150714",
"0.5909401",
"0.5852684",
"0.5826533",
"0.5803395",
"0.5795646",
"0.5785924",
"0.5733037",
"0.5733037",
"0.57124954",
"0.57062685",
"0.56519485",
"0.5633... | 0.8084664 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getAnnouncement(self, request):\n announcement = memcache.get(MEMCACHE_ANNOUNCEMENTS_KEY) or \"\"\n return StringMessage(data=announcement)",
"def cache_announcement():\n confs = Conference.query(ndb.AND(\n Conference.seatsAvailable <= 5, Conference.seatsAvailable > 0\n ... | [
"0.6307641",
"0.624139",
"0.61396885",
"0.5956356",
"0.5670804",
"0.5596737",
"0.5565057",
"0.5479931",
"0.5426172",
"0.5361342",
"0.5328143",
"0.5242326",
"0.51843905",
"0.5149838",
"0.50455034",
"0.5040873",
"0.50037575",
"0.4943809",
"0.49090248",
"0.4906064",
"0.4883745",... | 0.6339458 | 0 |
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')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 conference; check that it exists\n wsck = request.websafeConferenceKey\n conf = ndb.Key(urlsafe=... | [
"0.6628083",
"0.64813596",
"0.6294456",
"0.6073893",
"0.58963567",
"0.5738126",
"0.55700624",
"0.55217904",
"0.54235077",
"0.541907",
"0.5362311",
"0.53576905",
"0.5338589",
"0.52861226",
"0.5157034",
"0.51566017",
"0.5153176",
"0.5135656",
"0.5130247",
"0.5127976",
"0.510271... | 0.67306554 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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, field.name, str(getattr(con... | [
"0.7727503",
"0.6019656",
"0.5861441",
"0.57970494",
"0.57781494",
"0.57305723",
"0.5715702",
"0.56819946",
"0.5602228",
"0.5507136",
"0.5495653",
"0.5426627",
"0.5412202",
"0.53416955",
"0.5293119",
"0.5292693",
"0.5292534",
"0.5275663",
"0.52391994",
"0.52208537",
"0.521184... | 0.77495456 | 0 |
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'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.6711613",
"0.6230136",
"0.61121726",
"0.60039115",
"0.5985098",
"0.5940796",
"0.58975244",
"0.58861005",
"0.5882982",
"0.5880553",
"0.5836876",
"0.58033025",
"0.57397395",
"0.5726651",
"0.5705699",
"0.5686112",
"0.56527764",
"0.56140727",
"0.54820526",
"0.5472352",
"0.5471... | 0.790961 | 0 |
Return Announcement from memcache. | def getAnnouncement(self, request):
announcement = memcache.get(MEMCACHE_ANNOUNCEMENTS_KEY) or ""
return StringMessage(data=announcement) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_announcement(self, request):\n return StringMessage(\n data=memcache.get(MEMCACHE_ANNOUNCEMENTS_KEY) or \"\")",
"def _cacheAnnouncement():\n confs = Conference.query(ndb.AND(\n Conference.seatsAvailable <= 5,\n Conference.seatsAvailable > 0)\n ).fetch... | [
"0.74955446",
"0.7363284",
"0.705641",
"0.58456796",
"0.5752198",
"0.56402856",
"0.56222874",
"0.5593154",
"0.5495106",
"0.5467809",
"0.54591787",
"0.54124725",
"0.5330662",
"0.53072345",
"0.5287989",
"0.527153",
"0.52640253",
"0.523533",
"0.52221245",
"0.52221245",
"0.521772... | 0.78246075 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.78688127",
"0.7338922",
"0.6852561",
"0.66271746",
"0.6565396",
"0.6170011",
"0.59663105",
"0.59223247",
"0.58999187",
"0.58343786",
"0.57726926",
"0.57710207",
"0.56881297",
"0.5676969",
"0.56550586",
"0.55980533",
"0.5535486",
"0.5489521",
"0.5484447",
"0.5409856",
"0.53... | 0.73678344 | 1 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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... | [
"0.80247796",
"0.6207768",
"0.6082327",
"0.60714567",
"0.60658276",
"0.5967323",
"0.5963362",
"0.59466356",
"0.59359396",
"0.59351933",
"0.5891676",
"0.5859516",
"0.5841561",
"0.5830634",
"0.57371825",
"0.5714454",
"0.57058376",
"0.56997335",
"0.5605298",
"0.54814893",
"0.542... | 0.67396516 | 1 |
Register user for selected conference. | def registerForConference(self, request):
return self._conferenceRegistration(request) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def register_for_conference(self, request):\n return self.conference_registration(request)",
"def register_user():\n pass",
"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 w... | [
"0.7278912",
"0.6624827",
"0.6584575",
"0.65791625",
"0.6362521",
"0.61771995",
"0.61010563",
"0.6078329",
"0.6028847",
"0.60168606",
"0.6004366",
"0.60029817",
"0.59709775",
"0.5970334",
"0.5965763",
"0.59528124",
"0.5946669",
"0.5870501",
"0.5858669",
"0.58469427",
"0.58424... | 0.70775634 | 1 |
Unregister user for selected conference. | def unregisterFromConference(self, request):
return self._conferenceRegistration(request, reg=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unregister_from_conference(self, request):\n return self.conference_registration(request, reg=False)",
"async def unregister(self):\n\t\tif self.group != None:\n\t\t\tif self.group.in_game:\n\t\t\t\tfor team in self.group.game.teams:\n\t\t\t\t\tif self in team:\n\t\t\t\t\t\tself.group.game.teams.remov... | [
"0.7598682",
"0.6543255",
"0.6435641",
"0.63821507",
"0.63548124",
"0.63164395",
"0.61379206",
"0.6102971",
"0.60985017",
"0.6050816",
"0.59991133",
"0.597415",
"0.59388",
"0.5870086",
"0.5869279",
"0.58567876",
"0.5786231",
"0.57730377",
"0.5772766",
"0.5762881",
"0.5759947"... | 0.7392909 | 1 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def copyform(form, settings):\r\n for name, value in form.iteritems():\r\n setattr(settings, name, value)\r\n settings.commit()",
"def _copySessionToForm(self, session):\n sf = SessionForm()\n for field in sf.all_fields():\n if hasattr(session, field.name):\n ... | [
"0.5991479",
"0.5911988",
"0.58958936",
"0.5770801",
"0.57492906",
"0.5703371",
"0.56609124",
"0.5593124",
"0.5583714",
"0.5578275",
"0.55456966",
"0.5397008",
"0.53902537",
"0.5387579",
"0.5369967",
"0.53496546",
"0.5334173",
"0.5330454",
"0.530139",
"0.5282616",
"0.51898223... | 0.8053849 | 0 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create(self, validated_data):\n return Speaker.objects.create(**validated_data)",
"def _copySpeakerToForm(self, speaker):\n sf = SpeakerForm()\n for field in sf.all_fields():\n if hasattr(speaker, field.name):\n setattr(sf, field.name, getattr(speaker, field.nam... | [
"0.7516256",
"0.6617961",
"0.6517369",
"0.60076547",
"0.58922905",
"0.58491045",
"0.5713825",
"0.57095647",
"0.5580512",
"0.5575898",
"0.5537071",
"0.54411596",
"0.54135704",
"0.54083437",
"0.53903764",
"0.5356573",
"0.53268087",
"0.5320126",
"0.5311113",
"0.53081363",
"0.529... | 0.7869294 | 0 |
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,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _getSessionsBySpeaker(self, request):\n # Ensure that the speaker key is valid and that the speaker exists\n speaker = _getEntityByWebsafeKey(request.websafeSpeakerKey, 'Speaker')\n # Return all of the speaker's sessions\n return ndb.get_multi(speaker.sessions)",
"def _getConferen... | [
"0.5446472",
"0.51810056",
"0.5084203",
"0.5033835",
"0.49242762",
"0.48869962",
"0.4859192",
"0.48236132",
"0.4786593",
"0.47050533",
"0.46819773",
"0.46688312",
"0.46350497",
"0.45954737",
"0.45568752",
"0.4550118",
"0.45501018",
"0.4542919",
"0.45304805",
"0.452583",
"0.45... | 0.56610495 | 0 |
Return the current featured speaker message from memcache. | def getFeaturedSpeaker(self, request):
message = memcache.get(MEMCACHE_FEATURED_SPEAKER_KEY) or ""
return StringMessage(data=message) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_featured_speaker(self, request):\n return StringMessage(\n data=memcache.get(MEMCACHE_FEATURED_SPEAKER_KEY) or \"\")",
"def _updateFeaturedSpeaker(websafeSpeakerKey, websafeConferenceKey):\n # Validate the websafe key arguments. Exception is raised if either\n # call fails... | [
"0.7784476",
"0.58692867",
"0.58229965",
"0.5695719",
"0.56409705",
"0.5568219",
"0.54920876",
"0.54669094",
"0.5427401",
"0.5424601",
"0.5384481",
"0.5369317",
"0.5333994",
"0.5280963",
"0.5277826",
"0.5231841",
"0.5128428",
"0.50919986",
"0.50889385",
"0.50869083",
"0.50726... | 0.7579103 | 1 |
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... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_session_to_wishlist(self, request):\n return self.wishlist_service.add_session_to_wishlist(\n request.websafeSessionKey, endpoints.get_current_user())",
"def add_session_to_wishlist(self, websafe_session_key, user):\n wl_key = self.get_wishlist_key(user)\n\n wishlist = wl_... | [
"0.8124176",
"0.7818929",
"0.7583546",
"0.6178471",
"0.6127408",
"0.5941033",
"0.5855412",
"0.581283",
"0.57922465",
"0.57513714",
"0.57402354",
"0.56839013",
"0.5678189",
"0.56736964",
"0.5617717",
"0.5528249",
"0.5518363",
"0.5493492",
"0.54671645",
"0.54640555",
"0.5460476... | 0.83459866 | 0 |
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)))... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def form_valid(self, form):\n label = form.cleaned_data[\"label\"]\n\n if \"objects\" not in self.request.session:\n self.request.session[\"objects\"] = OrderedDict()\n if \"forms\" not in self.request.session:\n self.request.session[\"forms\"] = OrderedDict()\n\n ... | [
"0.6098217",
"0.6088412",
"0.6072761",
"0.60642654",
"0.6026982",
"0.59829164",
"0.5759055",
"0.5618044",
"0.561432",
"0.55417347",
"0.5487526",
"0.54755",
"0.544686",
"0.5294741",
"0.52286774",
"0.52258146",
"0.5166349",
"0.5164965",
"0.51523036",
"0.51498306",
"0.5126769",
... | 0.85230947 | 0 |
Retrieve all sessions associated with a conference. | def _getConferenceSessions(self, request):
# Ensure that websafeConferenceKey is a valid conference key
confKey = _raiseIfWebsafeKeyNotValid(request.websafeConferenceKey,
'Conference')
# Retrieve all sessions that have a matching conference key
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_conference_sessions(self, request):\n return self.session_service.get_conference_sessions(\n request.websafeConferenceKey)",
"def get_sessions_by_type(self, request):\n return self.session_service.get_conference_sessions_by_type(\n request.websafeConferenceKey, request... | [
"0.8155603",
"0.72048026",
"0.7024871",
"0.7000029",
"0.69593084",
"0.6693818",
"0.66356134",
"0.66315794",
"0.65811247",
"0.6544365",
"0.64583755",
"0.643887",
"0.64130956",
"0.63868886",
"0.63120866",
"0.62812674",
"0.6271837",
"0.6205866",
"0.6112134",
"0.6100491",
"0.6069... | 0.800364 | 1 |
Retrieve all sessions associated with a conference, by type. | def _getConferenceSessionsByType(self, request):
# Ensure that websafeConferenceKey is a valid conference key
confKey = _raiseIfWebsafeKeyNotValid(request.websafeConferenceKey,
'Conference')
# Retrieve all sessions that have a matching conference key,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_sessions_by_type(self, request):\n return self.session_service.get_conference_sessions_by_type(\n request.websafeConferenceKey, request.sessionType)",
"def get_sessions_by_type_and_filters(self, request):\n return self.session_service.get_sessions_by_type_and_filters(\n ... | [
"0.839267",
"0.76810974",
"0.74179673",
"0.72810936",
"0.7257645",
"0.6629272",
"0.6575053",
"0.6291302",
"0.61481535",
"0.60031515",
"0.59337205",
"0.5886013",
"0.5719723",
"0.57138413",
"0.57089686",
"0.5639327",
"0.5602851",
"0.5507092",
"0.5500614",
"0.54822844",
"0.54750... | 0.83530176 | 1 |
Retrieve all sessions matching one or more given highlights. | def _getSessionsByHighlightSearch(self, request):
# Generate list of filters from the highlight arguments
filters = [Session.highlights == hl for hl in request.highlights]
if not filters:
raise endpoints.BadRequestException(
'At least one highlight must be specified'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getSessionsByHighlightSearch(self, request):\n sessions = self._getSessionsByHighlightSearch(request)\n # Return individual SessionForm object per Session\n return SessionForms(\n items=[self._copySessionToForm(session) for session in sessions]\n )",
"def get(self, requ... | [
"0.64075655",
"0.51973224",
"0.5143006",
"0.5126674",
"0.49887824",
"0.49578515",
"0.49377143",
"0.48807254",
"0.48346448",
"0.47855932",
"0.47821313",
"0.47626352",
"0.47079334",
"0.4697971",
"0.46542692",
"0.46254164",
"0.46242422",
"0.4623829",
"0.46137628",
"0.45952874",
... | 0.80607086 | 0 |
Retrieve all sessions given by a particular speaker. | def _getSessionsBySpeaker(self, request):
# Ensure that the speaker key is valid and that the speaker exists
speaker = _getEntityByWebsafeKey(request.websafeSpeakerKey, 'Speaker')
# Return all of the speaker's sessions
return ndb.get_multi(speaker.sessions) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_speaker_sessions(self, request):\n return self.session_service.get_speaker_sessions(\n request.websafeSpeakerKey)",
"def getSessionsBySpeaker(self, request):\n sessions = self._getSessionsBySpeaker(request)\n # Return individual SessionForm object per Session\n retu... | [
"0.78710306",
"0.7094641",
"0.67780095",
"0.67494416",
"0.67155963",
"0.6615327",
"0.64614207",
"0.6425885",
"0.6333383",
"0.6315707",
"0.6194976",
"0.61806315",
"0.6179548",
"0.61346084",
"0.61164176",
"0.60324794",
"0.60129184",
"0.5877937",
"0.58242875",
"0.5822374",
"0.58... | 0.8179627 | 0 |
Retrieve all sessions in the user's wishlist. | def _getSessionsInWishlist(self):
user = endpoints.get_current_user()
if not user:
raise endpoints.UnauthorizedException('Authorization required')
profile = self._getProfileFromUser()
# Fetch the entities and return them
return ndb.get_multi(profile.sessionWishlist) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wishlist_sessions(self, user):\n wishlist_key = self.get_wishlist_key(user)\n session_keys = [ndb.Key(urlsafe=wsck) for wsck in\n wishlist_key.get().sessionKeys]\n sessions = ndb.get_multi(session_keys)\n return sessions",
"def get_sessions_in_wishlist(self,... | [
"0.851661",
"0.79517555",
"0.7718727",
"0.7539904",
"0.74082303",
"0.69785184",
"0.6908265",
"0.6861531",
"0.6479205",
"0.6430566",
"0.61952454",
"0.6161288",
"0.61303025",
"0.6128384",
"0.6097037",
"0.6083551",
"0.60752475",
"0.5979322",
"0.59384423",
"0.5929593",
"0.5898026... | 0.8228693 | 1 |
Removes a session from the user's wishlist, returning a boolean. | def _removeSessionFromWishlist(self, request):
# Preload necessary data items
user = endpoints.get_current_user()
if not user:
raise endpoints.UnauthorizedException('Authorization required')
profile = self._getProfileFromUser()
# Get actual session key from websafe ke... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_session_from_wishlist(self, request):\n return self.wishlist_service.remove_session_from_wishlist(\n request.websafeSessionKey, endpoints.get_current_user())",
"def removeSessionFromWishlist(self, request):\n return self._removeSessionFromWishlist(request)",
"def remove_sess... | [
"0.81915665",
"0.76984537",
"0.76317555",
"0.6835183",
"0.6607075",
"0.6478658",
"0.6209266",
"0.61053085",
"0.6085781",
"0.6084388",
"0.6060252",
"0.5823839",
"0.57571155",
"0.57422817",
"0.57323414",
"0.57050776",
"0.5699716",
"0.56986994",
"0.5697193",
"0.5694112",
"0.5676... | 0.8256191 | 0 |
Get list of sessions matching one or more of the given highlights. | def getSessionsByHighlightSearch(self, request):
sessions = self._getSessionsByHighlightSearch(request)
# Return individual SessionForm object per Session
return SessionForms(
items=[self._copySessionToForm(session) for session in sessions]
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _getSessionsByHighlightSearch(self, request):\n # Generate list of filters from the highlight arguments\n filters = [Session.highlights == hl for hl in request.highlights]\n if not filters:\n raise endpoints.BadRequestException(\n 'At least one highlight must be s... | [
"0.79675597",
"0.5494635",
"0.5191284",
"0.5032431",
"0.5007258",
"0.49804562",
"0.48610216",
"0.4822324",
"0.48123288",
"0.47999722",
"0.47981682",
"0.47678235",
"0.47661048",
"0.47624898",
"0.47622135",
"0.47583574",
"0.4731185",
"0.4729603",
"0.46977532",
"0.4695372",
"0.4... | 0.6377008 | 1 |
Copy relevant fields from Profile to ProfileForm. | def _copyProfileToForm(self, prof):
pf = ProfileForm()
for field in pf.all_fields():
if hasattr(prof, field.name):
# Convert t-shirt string to Enum; just copy others
if field.name == 'teeShirtSize':
setattr(pf, field.name,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_form_kwargs(self):\n kwargs = super(ProfileUpdate, self).get_form_kwargs()\n self.profile = self.get_object()\n extra_kwargs = {'profile': self.profile}\n kwargs.update(extra_kwargs)\n return kwargs",
"def _doProfile(self, save_request=None):\n prof = self._getPr... | [
"0.6958025",
"0.68784887",
"0.64856434",
"0.63592464",
"0.6284996",
"0.6272869",
"0.6269607",
"0.6214233",
"0.62111384",
"0.6183875",
"0.6135155",
"0.612614",
"0.61004287",
"0.6085827",
"0.60856766",
"0.6062952",
"0.59629256",
"0.58970684",
"0.5893775",
"0.5886109",
"0.587434... | 0.79479015 | 0 |
Return Profile from datastore, creating new one if nonexistent. | def _getProfileFromUser(self):
# Make sure user is authenticated
user = endpoints.get_current_user()
if not user:
raise endpoints.UnauthorizedException('Authorization required')
# Get Profile from datastore
user_id = user.email()
p_key = ndb.Key(Profile, user_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get(self, name='default'):\r\n if name not in self._cache:\r\n full_path = os.path.join(self._base_folder, name)\r\n self._create_if_needed(full_path)\r\n self._cache[name] = Profile(full_path, name)\r\n return self._cache[name]",
"def create_or_update_profile(s... | [
"0.67713064",
"0.6432612",
"0.638044",
"0.6346034",
"0.6343368",
"0.62816966",
"0.6173148",
"0.61137223",
"0.61025006",
"0.61001056",
"0.6060391",
"0.6048729",
"0.60413766",
"0.601181",
"0.5955292",
"0.5921494",
"0.5829891",
"0.58183765",
"0.5805473",
"0.5801193",
"0.5772561"... | 0.70515484 | 0 |
Create our CRITsDBAPI object. You may specify a full mongodb uri or the arguments individually. | def __init__(self,
mongo_uri='',
mongo_host='localhost',
mongo_port=27017,
mongo_user='',
mongo_pass='',
db_name='crits'):
# If the user provided a URI, we will use that. Otherwise we will build
# a URI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_mongodb(config):\n\n \n mongo_url = \"mongodb://\"\n mongo_url += \",\".join(map(lambda srv: srv['host'] + \":\" + str(srv['port']), config['data']['mongoServers']))\n \n if 'replica' in config['data']:\n mongo_url += \"/?replicaSet={0}\".format(config['data']['replica'])\n\n ... | [
"0.66846025",
"0.6621965",
"0.65577734",
"0.6492812",
"0.64823735",
"0.6253829",
"0.61448485",
"0.6078013",
"0.5876883",
"0.5867382",
"0.58658755",
"0.5850278",
"0.58107173",
"0.5787932",
"0.57878685",
"0.57876056",
"0.5785224",
"0.5769064",
"0.5743249",
"0.57387024",
"0.5737... | 0.6649437 | 1 |
Search a collection for the query provided. Just a raw interface to mongo to do any query you want. | def find(self, collection, query):
obj = getattr(self.db, collection)
result = obj.find(query)
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find(self, collection, query=None, filter=None):\n return self.__db[collection].find(query, filter)",
"def find_document(collection: str, query: dict = None, regex: list = None) -> dict:\n if query is not None:\n return DB[collection].find_one(query)\n if regex is not None:\n r... | [
"0.7252133",
"0.7012578",
"0.6853299",
"0.6789239",
"0.66799027",
"0.6665288",
"0.6664408",
"0.65937394",
"0.6434959",
"0.6420416",
"0.6398617",
"0.62957525",
"0.628199",
"0.6266347",
"0.625643",
"0.62044865",
"0.6122247",
"0.6091136",
"0.6090586",
"0.60842377",
"0.6064155",
... | 0.76442003 | 0 |
Search a collection for all available items. | def find_all(self, collection):
obj = getattr(self.db, collection)
result = obj.find()
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_all(collection):\n data = []\n for item in collection.find({}):\n data.append(item)\n return data",
"def searchItems(name, allPages = False):\n return Gw2Spidy._paginatedRequest(allPages, 'item-search', name)",
"def searchCollection(self, limit=100, **kwargs):\n ... | [
"0.66130906",
"0.6577022",
"0.6503677",
"0.64557165",
"0.62310874",
"0.61904126",
"0.6143242",
"0.6072285",
"0.60007083",
"0.59808266",
"0.5948115",
"0.59253854",
"0.58733493",
"0.5871716",
"0.5857312",
"0.58287",
"0.582313",
"0.5817589",
"0.57799107",
"0.57534194",
"0.575075... | 0.6775198 | 0 |
Search a collection for the query provided and return one result. Just a raw interface to mongo to do any query you want. | def find_one(self, collection, query):
obj = getattr(self.db, collection)
result = obj.find_one(query)
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find(self, collection, query):\n obj = getattr(self.db, collection)\n result = obj.find(query)\n return result",
"def find(self, collection, query=None, filter=None):\n return self.__db[collection].find(query, filter)",
"def find_document(collection: str, query: dict = None,... | [
"0.79049706",
"0.75223446",
"0.7400582",
"0.7219015",
"0.7148035",
"0.7044073",
"0.70365006",
"0.6900449",
"0.68693525",
"0.6687954",
"0.66815037",
"0.6643801",
"0.6433155",
"0.6354233",
"0.6272778",
"0.62644094",
"0.61989784",
"0.61437243",
"0.6137244",
"0.612182",
"0.609625... | 0.7865692 | 1 |
Search a collection for the distinct key values provided. | def find_distinct(self, collection, key):
obj = getattr(self.db, collection)
result = obj.distinct(key)
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _filter_search_values(key: str, values: list, collection: list):\n return_data = []\n for item in collection:\n if any(val in values for val in item[key]):\n return_data.append(item)\n return return_data",
"def distinct(self, key):\n return self.database.command({'distinct':... | [
"0.69668233",
"0.58777803",
"0.5819709",
"0.5781459",
"0.5655128",
"0.5622824",
"0.56214416",
"0.56086063",
"0.5562973",
"0.5557258",
"0.5502194",
"0.5408141",
"0.5392551",
"0.53712016",
"0.5323929",
"0.5288685",
"0.5286743",
"0.52866507",
"0.5135332",
"0.51346934",
"0.513088... | 0.72450334 | 0 |
Adds an embedded campaign to the TLO. | def add_embedded_campaign(self, id, collection, campaign, confidence,
analyst, date, description):
if type(id) is not ObjectId:
id = ObjectId(id)
# TODO: Make sure the object does not already have the campaign
# Return if it does. Add it if it doesn't
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_campaign(self, campaign):\n self._campaigns += [campaign]",
"def _set_campaign(self, campaign):\n if isinstance(campaign, str):\n campaign = TrackedCampaign.objects.create(name=campaign)\n\n campaign.save()\n\n self.campaign = campaign",
"def campaign(self, campai... | [
"0.7053185",
"0.55294055",
"0.5502619",
"0.53983206",
"0.53974485",
"0.53938943",
"0.5390333",
"0.5346445",
"0.51280814",
"0.51132816",
"0.5100033",
"0.5023265",
"0.4961767",
"0.49532866",
"0.49409008",
"0.49400547",
"0.49252018",
"0.49178767",
"0.48796228",
"0.48726276",
"0.... | 0.7287195 | 0 |
Removes an item from the bucket list | def remove_bucket_list_item(self, id, collection, item):
if type(id) is not ObjectId:
id = ObjectId(id)
obj = getattr(self.db, collection)
result = obj.update(
{'_id': id},
{'$pull': {'bucket_list': item}}
)
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove(self, item):\n try:\n entry = self.set.pop(item)\n entry[-1] = self.REMOVED\n except KeyError:\n print(\"Can't remove a non-existing item\")",
"def remove(self, item):\n del self._dict[item]",
"def _bucket_delitem(self, j, k):\n pass",
"def ... | [
"0.791302",
"0.7706514",
"0.7652778",
"0.75784016",
"0.7561372",
"0.7506943",
"0.74443907",
"0.7405826",
"0.7405826",
"0.73899317",
"0.73899317",
"0.73878163",
"0.73668784",
"0.7335001",
"0.7286636",
"0.7273813",
"0.72560424",
"0.72402847",
"0.72392786",
"0.72225547",
"0.7219... | 0.8045885 | 0 |
Adds an item to the bucket list | def add_bucket_list_item(self, id, collection, item):
if type(id) is not ObjectId:
id = ObjectId(id)
obj = getattr(self.db, collection)
result = obj.update(
{'_id': id},
{'$addToSet': {'bucket_list': item}}
)
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add(self, item):",
"def add_item(self, item):\n self.items.append(item)",
"def add_to_bag(self, item):\n self._bag.append(item)",
"def add(self, item):\n\n if item not in self:\n self._index_map[item] = len(self._list)\n self._list.append(item)",
"def add(self... | [
"0.7640922",
"0.75756705",
"0.751956",
"0.74900144",
"0.7369312",
"0.7361309",
"0.7332356",
"0.7283963",
"0.7280235",
"0.72764546",
"0.72698563",
"0.7263061",
"0.72285056",
"0.72285056",
"0.72285056",
"0.72285056",
"0.72285056",
"0.71988684",
"0.7163348",
"0.7156221",
"0.7156... | 0.77858466 | 0 |
Returns a list of all valid campaign names | def get_campaign_name_list(self):
campaigns = self.find('campaigns', {})
campaign_names = []
for campaign in campaigns:
if 'name' in campaign:
campaign_names.append(campaign['name'])
return campaign_names | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_get_existent_campaigns_returns_campaigns_list(self):\n test_campaign = return_canned_campaign()\n test_campaign.create()\n response = self.client.get(self.endpoint_url)\n response_body = response.get_json()\n self.assertEqual(response.status_code, 200)\n self.asse... | [
"0.5988995",
"0.5805326",
"0.5684534",
"0.5676261",
"0.5601181",
"0.55940896",
"0.5530269",
"0.5515312",
"0.5460801",
"0.5450627",
"0.5449519",
"0.54434097",
"0.54434097",
"0.54434097",
"0.542792",
"0.5424966",
"0.54231083",
"0.54181385",
"0.53910905",
"0.5375468",
"0.5351693... | 0.7925846 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.