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 get inbound statement details issued date functionality
def get_inbound_statement_details_issued_date(self): return self.get_text_from_element(self.inbound_statements_details_issued_date_locator, True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_inbound_statement_details_begin_date(self):\n return self.get_text_from_element(self.inbound_statements_details_begin_date_locator, True)", "def get_inbound_statement_details_created_date(self):\n return self.get_text_from_element(self.inbound_statements_details_created_date_locator, False)...
[ "0.6644743", "0.6612863", "0.6514749", "0.61226314", "0.5922644", "0.5845797", "0.5797592", "0.5788889", "0.57415855", "0.5692384", "0.5688184", "0.5524073", "0.5438372", "0.5431158", "0.53535825", "0.53249586", "0.52885437", "0.5242009", "0.524165", "0.52229464", "0.51713824...
0.7633969
0
Implementing get inbound statement details statement received date functionality
def get_inbound_statement_details_statement_received_date(self): return self.get_text_from_element(self.inbound_statements_details_statement_received_date_locator, True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_inbound_statement_details_created_date(self):\n return self.get_text_from_element(self.inbound_statements_details_created_date_locator, False)", "def get_inbound_statement_details_issued_date(self):\n return self.get_text_from_element(self.inbound_statements_details_issued_date_locator, Tru...
[ "0.64317024", "0.6387759", "0.62609845", "0.60436785", "0.5898735", "0.5844208", "0.57048786", "0.55630356", "0.5549851", "0.54501367", "0.54043657", "0.54011166", "0.5386708", "0.53680587", "0.5367785", "0.5343143", "0.5235321", "0.5233955", "0.52187574", "0.5214069", "0.519...
0.6836692
0
Implementing get inbound statement details received due date functionality
def get_inbound_statement_details_received_due_date(self): return self.get_text_from_element(self.inbound_statements_details_received_due_date_locator, True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_inbound_statement_details_statement_received_date(self):\n return self.get_text_from_element(self.inbound_statements_details_statement_received_date_locator, True)", "def get_inbound_statement_details_issued_date(self):\n return self.get_text_from_element(self.inbound_statements_details_iss...
[ "0.6566689", "0.6467899", "0.6422852", "0.6170778", "0.6075083", "0.5902964", "0.58539736", "0.58045554", "0.56273556", "0.55742633", "0.5549154", "0.55393153", "0.54786336", "0.54679906", "0.5460753", "0.5451677", "0.54350936", "0.5319935", "0.5319432", "0.53143615", "0.5299...
0.716619
0
Implementing get inbound statement details payment terms due date functionality
def get_inbound_statement_details_payment_terms_due_date(self): return self.get_text_from_element(self.inbound_statements_details_payment_terms_due_date_locator, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_inbound_statement_details_received_due_date(self):\n return self.get_text_from_element(self.inbound_statements_details_received_due_date_locator, True)", "def get_inbound_statement_details_final_payment_due_date(self):\n return self.get_text_from_element(self.inbound_statements_details_fina...
[ "0.6378335", "0.6317771", "0.5936278", "0.57501996", "0.54051614", "0.53849566", "0.5320892", "0.53182757", "0.5303908", "0.52439433", "0.52154887", "0.5214278", "0.5211992", "0.51907694", "0.5186796", "0.5179462", "0.5156884", "0.5151838", "0.51469404", "0.51415354", "0.5131...
0.75358033
0
Implementing get inbound statement details exchange rate functionality
def get_inbound_statement_details_exchange_rate(self): return self.get_text_from_element(self.inbound_statements_details_exchange_rate_locator, True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exchange_rate(self):\n res = r.get(self.url + self.current_rate)\n return self.execute(res)", "def get_realtime_exchange_rate(from_currency, to_currency) :\n\turl = f\"{BASE_URL}function={settings.CURRENCY_EXCHANGE_RATE}&from_currency={from_currency}&to_currency={to_currency}&apikey={API_KEY}\"...
[ "0.6675931", "0.6399433", "0.6187007", "0.59491825", "0.5887757", "0.5875268", "0.5786735", "0.57281286", "0.57242393", "0.5718924", "0.57107985", "0.56563634", "0.5591873", "0.5583545", "0.55541134", "0.55514807", "0.5542017", "0.5511413", "0.5477034", "0.5475491", "0.545767...
0.74215657
0
Implementing get inbound statement details created date functionality
def get_inbound_statement_details_created_date(self): return self.get_text_from_element(self.inbound_statements_details_created_date_locator, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_inbound_statement_details_issued_date(self):\n return self.get_text_from_element(self.inbound_statements_details_issued_date_locator, True)", "def get_inbound_statement_details_begin_date(self):\n return self.get_text_from_element(self.inbound_statements_details_begin_date_locator, True)", ...
[ "0.65643066", "0.6495818", "0.6348197", "0.58951235", "0.5828727", "0.5750155", "0.5733768", "0.572782", "0.571421", "0.56468433", "0.5627618", "0.56275856", "0.55790424", "0.55715305", "0.5533522", "0.5531823", "0.5528823", "0.5522985", "0.55076754", "0.5490748", "0.5478177"...
0.75651443
0
Implementing get inbound statement details last modified date functionality
def get_inbound_statement_details_last_modified_date(self): return self.get_text_from_element(self.inbound_statements_details_last_modified_date_locator, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_outbound_statement_summary_last_modified_date(self):\n return self.get_text_from_element(self.outbound_statements_summary_last_modified_date_date_locator, False)", "def svn_info_t_last_changed_date_get(svn_info_t_self): # real signature unknown; restored from __doc__\n pass", "def get_last_mo...
[ "0.68646926", "0.65002453", "0.64303523", "0.63738024", "0.63060594", "0.625314", "0.62359077", "0.6194862", "0.61817497", "0.6148717", "0.61392915", "0.60958284", "0.60958284", "0.6029631", "0.5994779", "0.59804463", "0.5980382", "0.59648824", "0.59648824", "0.59648824", "0....
0.78521156
0
Implementing click create new adjustment folder button functionality
def click_create_new_adjustment_folder_button(self): self.click_element(self.create_new_adjustment_folder_button_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_assign_to_new_folder_button(self):\n self.click_element(self.assign_to_new_folder_button_locator)", "def createFolder(self):\n raise NotImplementedError", "def set_adjustment_folder_name_to_create_new_one(self, folder_name_prefix):\n global adjustment_folder_name\n adjustm...
[ "0.7348643", "0.64314157", "0.6412817", "0.63929933", "0.6378814", "0.63623595", "0.6287299", "0.6223923", "0.6219286", "0.6181619", "0.6170063", "0.61579686", "0.6144277", "0.61358535", "0.61323196", "0.60429984", "0.60080516", "0.59786385", "0.5976761", "0.5962509", "0.5953...
0.83255225
0
Implementing set adjustment folder name to create new one functionality
def set_adjustment_folder_name_to_create_new_one(self, folder_name_prefix): global adjustment_folder_name adjustment_folder_name = folder_name_prefix + self.random_string_generator(size=4) self.set_value_into_input_field(self.adjustment_folder_name_textbox_locator, adjustment_folder_name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_created_adjustment_folder_name(self):\n global adjustment_folder_name\n return adjustment_folder_name", "def create_folder(self):\n cur_dir=os.getcwd()\n unique=False\n dirlist= [item for item in os.listdir(cur_dir) if os.path.isdir(os.path.join(cur_dir,item))]\n ...
[ "0.6775794", "0.6754034", "0.6693888", "0.667524", "0.65101945", "0.6490604", "0.6394866", "0.63924867", "0.637372", "0.63506985", "0.63446516", "0.6285629", "0.6277569", "0.6265376", "0.6249144", "0.624596", "0.6242175", "0.6229442", "0.6213231", "0.620889", "0.6204149", "...
0.78886664
0
Implementing get created adjustment folder name functionality
def get_created_adjustment_folder_name(self): global adjustment_folder_name return adjustment_folder_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_adjustment_folder_name_to_create_new_one(self, folder_name_prefix):\n global adjustment_folder_name\n adjustment_folder_name = folder_name_prefix + self.random_string_generator(size=4)\n self.set_value_into_input_field(self.adjustment_folder_name_textbox_locator, adjustment_folder_name...
[ "0.69372344", "0.6564424", "0.6486758", "0.6274307", "0.62730044", "0.62044674", "0.61887026", "0.6137288", "0.61335665", "0.6089088", "0.59776574", "0.5959493", "0.59256935", "0.59181863", "0.5896911", "0.58788073", "0.58714545", "0.5840282", "0.57765394", "0.57729536", "0.5...
0.8163525
0
Implementing set bill account from single selection kendo dropdown functionality
def set_bill_account_from_single_selection_kendo_dropdown(self, bill_account): self.single_selection_from_kendo_dropdown(self.bill_account_single_selection_kendo_dropdown_locator, bill_account)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_account(self, account_list):\n self.multiple_items_selection_from_kendo_dropdown(self.account_kendo_dropdown_locator, account_list)\n self.wait_for_ajax_spinner_load()", "def set_bill_account(self, bill_account_list):\n self.multiple_items_selection_from_kendo_dropdown(self.bill_acco...
[ "0.64191467", "0.6293899", "0.6283104", "0.6059929", "0.5904655", "0.5837555", "0.570753", "0.56952137", "0.56536853", "0.5601393", "0.5428841", "0.52832174", "0.52769345", "0.5203933", "0.5188566", "0.5130959", "0.51235753", "0.507439", "0.4996422", "0.49956647", "0.49856684...
0.77899486
0
Implementing set calender year functionality
def set_calender_year(self, year): self.single_selection_from_kendo_dropdown(self.calender_year_kendo_dropdown_locator, year)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setYear(self, *args):\n return _libsbml.Date_setYear(self, *args)", "def increment_year(self):", "def set_year (self, year):\n self.year = year", "def set_start_year(self, year):\n return self.form.set_value(\"output period \\\"year from\\\"\", str(year))", "def set_Year(self, valu...
[ "0.7802009", "0.76509064", "0.7498565", "0.7375197", "0.7301019", "0.72833806", "0.7109304", "0.70969546", "0.7014504", "0.6932101", "0.69308245", "0.68096346", "0.6780478", "0.6681213", "0.66766685", "0.6635149", "0.6606445", "0.6420779", "0.6352426", "0.6293491", "0.6283581...
0.82477546
0
Implementing get created charge name functionality
def get_created_charge_name(self): global charge_name return charge_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_name():", "def name(self):\n return f\"Octopus Energy Intelligent Charge Limit\"", "def get_name(self):", "def get_name(self):", "def set_charges_grid_charge_name(self, charges_name_prefix):\n global charge_name\n if charges_name_prefix is None:\n charge_name = self.rand...
[ "0.66006494", "0.6386357", "0.63829523", "0.63829523", "0.6289007", "0.6242058", "0.6154625", "0.6154625", "0.6154625", "0.61420286", "0.6121448", "0.6056892", "0.6019961", "0.6019961", "0.6019961", "0.6019961", "0.6019961", "0.6019961", "0.59566134", "0.5956348", "0.5935019"...
0.8297832
0
Implementing set outbound statements grid dropdown value functionality
def set_outbound_statements_grid_dropdown_value(self, column_name, column_value): self.single_selection_from_kendo_in_grid(self.outbound_statements_grid_div_id, column_name, column_value, self.outbound_statement_grid_data_grid_name) self.click_element(self.page_header_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_transactions_grid_dropdown_value(self, column_name, column_value):\n self.single_selection_from_kendo_in_grid(self.transactions_grid_div_id, column_name, column_value, self.transactions_data_grid_name)\n self.click_element(self.page_header_locator)", "def set_value_in_resolution_grid_dropdo...
[ "0.6576135", "0.6407762", "0.5916738", "0.5860857", "0.5860857", "0.566794", "0.56531745", "0.5652502", "0.56422955", "0.5562199", "0.54553616", "0.5404444", "0.5351278", "0.5337365", "0.5313777", "0.5281826", "0.5242197", "0.5232884", "0.52061397", "0.52053916", "0.51899034"...
0.734133
0
Implementing click outbound statements grid save changes button functionality
def click_outbound_statements_grid_save_changes_button(self): self.click_element(self.outbound_statements_grid_save_changes_button_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_internal_statement_grid_save_changes_button(self):\n self.click_element(self.internal_statement_grid_save_changes_button_locator)\n try:\n self.wait().until(EC.visibility_of_element_located(self.success_message_locator), 'save changes success message locator not found before spec...
[ "0.6827275", "0.6451908", "0.6419039", "0.6282576", "0.616352", "0.6114757", "0.6049616", "0.6034491", "0.60210353", "0.6011015", "0.59895664", "0.59483606", "0.58855754", "0.5837982", "0.58197516", "0.58190084", "0.580792", "0.5801699", "0.5785847", "0.5755247", "0.5749051",...
0.7921441
0
Implementing is delete checkbox enabled in transactions grid functionality
def is_delete_checkbox_enabled_in_transactions_grid(self): checkbox_element = self.wait().until(EC.presence_of_element_located(self.transactions_grid_first_row_delete_checkbox_locator), 'checkbox locator not found before specified time out') return checkbox_element.is_enabled()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def beforeDelete(self):", "def can_delete(self):\r\n return True", "def is_delete(self) -> bool:\n return self.statement.is_dml and self.statement.is_delete", "def delete_checkbox(self):\n wanna_delete = mb.askyesno(\n \"Warning\",\n f'Delete checkbox for column \"{...
[ "0.608438", "0.605686", "0.5903825", "0.5839405", "0.57958126", "0.56866574", "0.5678521", "0.56297237", "0.56249154", "0.55682456", "0.5534374", "0.55254066", "0.5504737", "0.5484159", "0.54781586", "0.54541314", "0.5443518", "0.5443161", "0.5405396", "0.53989816", "0.536943...
0.66491157
0
Implementing is non recurring charge populated in the grid funcationality
def is_non_reccuring_charge_populated_in_the_grid(self, charge_name): status = None try: charge_name_locator = (By.XPATH, "//div[contains(@id, 'divTrafficGrid_') and @data-grid-name='NonUsageChargesGrid']/descendant::span[text()=%s]" %(charge_name)) self.wait().until(EC.presence_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _cal_potential_grids(self, nc_handle):\n for name in self._grid_func_names:\n print(\"calculating %s grid\"%name)\n charges = self._get_charges(name)\n grid = c_cal_potential_grid(name, self._crd, \n self._grid[\"x\"], self._grid[\"...
[ "0.5969391", "0.57183474", "0.5714206", "0.5584928", "0.55716836", "0.5556945", "0.5532467", "0.54827005", "0.54634494", "0.54505724", "0.5442972", "0.5407792", "0.53863686", "0.5373817", "0.532333", "0.5281536", "0.5268303", "0.5268113", "0.5246229", "0.5232359", "0.5206899"...
0.58739334
1
Implementing is specific column present in workflow tab functionality
def is_specific_column_present_in_workflow_tab(self, column_name): column_locator = (By.XPATH, "//div[contains(@id, 'divOutboundWorkFlowGrid_')]/descendant::div[@class='k-grid-header']/descendant::th[@data-title='%s']" % column_name) return self.is_element_present(column_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_expected_grid_column_present(self, expected_column_name):\n grid_column_locator = (By.XPATH, \"//th[@data-title='%s']\" %(expected_column_name))\n return self.is_element_present(grid_column_locator)", "def IsColumnMode(self):\n return self.VertEdit.Enabled", "def test_display_custom...
[ "0.56757313", "0.56469274", "0.55376875", "0.55209535", "0.55143285", "0.55143285", "0.5461072", "0.5455176", "0.54249567", "0.5396204", "0.53779584", "0.53615177", "0.5357772", "0.5322225", "0.5318432", "0.53024274", "0.52849036", "0.52832943", "0.5270736", "0.52524155", "0....
0.7276345
0
Implementing get outbound statement grid amount column value functionality
def get_outbound_statement_grid_amount_column_value(self): self.grid_row_details_dictionary = self.get_outbound_statement_grid_row_data() amount = self.grid_row_details_dictionary[self.outbound_statement_grid_amount_column_name] return amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_inbound_statements_grid_amount(self):\n return self.get_specific_column_value_from_grid(self.inbound_statement_grid_div_id, self.inbound_statements_grid_row_count, self.inbound_statements_grid_amount_column_name)", "def get_outbound_statements_grid_amount_idr(self):\n return self.get_specif...
[ "0.756628", "0.7301683", "0.713117", "0.70018065", "0.6746678", "0.66313076", "0.6475089", "0.6473938", "0.63806224", "0.6355086", "0.6303404", "0.6279073", "0.62689173", "0.60462475", "0.597169", "0.59300613", "0.5874127", "0.5853391", "0.57868", "0.578056", "0.577805", "0...
0.8054038
0
Implementing is statement status error message pop up present functionality
def is_statement_status_error_message_pop_up_present(self): is_present = None try: self.wait(10).until(EC.presence_of_element_located(self.statement_status_message_locator)) is_present = True self.click_element(self.ok_button_locator) except: is_pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_test_statements_error_message_given(self):\n try:\n self.wait().until(EC.visibility_of_element_located(self.test_statements_error_message_locator), 'test statements error message locator not found before specified time out')\n self.click_element(self.ok_button_locator)\n ...
[ "0.6596223", "0.6576535", "0.644565", "0.64064366", "0.6384189", "0.6366241", "0.62447935", "0.62313104", "0.62079215", "0.6203716", "0.61906517", "0.61629236", "0.6162044", "0.61441743", "0.61403555", "0.61060303", "0.6082808", "0.60726994", "0.6049762", "0.6046553", "0.6013...
0.7264916
0
Implementing get non traffic charge specific column kendo dropdown first item name functionality
def get_non_traffic_charge_specific_column_kendo_dropdown_first_item_name(self, column_name): column_locator = (By.XPATH, "//th[@data-title='%s']" % column_name) column_element = self.wait().until(EC.presence_of_element_located(column_locator), 'column locator not found before specified time out') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def selectnamesD(data):\n col = []\n for name in list(data):\n if name.startswith('hyperactive_'):\n col.append(name)\n else:\n col = col\n \n return col", "def cell(self,row_no,column_no): \n if row_no == 0:\n if self.serialize and column_no == 0:\n ...
[ "0.52557284", "0.5160781", "0.5160709", "0.51571274", "0.5141618", "0.5117691", "0.5088928", "0.50875413", "0.5071711", "0.4996896", "0.49916312", "0.49915016", "0.49750966", "0.493128", "0.49304378", "0.49244142", "0.48960567", "0.48937654", "0.48622578", "0.48461425", "0.48...
0.7376979
0
Implementing set first value in move to column in non traffic charge grid functionality
def set_first_value_in_move_to_column_in_non_traffic_charge_grid(self): first_item_locator = (By.XPATH, "//ul[@id='MoveTo_listbox']/descendant::li[1]") self.click_element(first_item_locator) self.click_element(self.page_header_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_received_charges_grid_first_row_column(self, column_name, column_value):\n self.single_selection_from_kendo_in_grid(self.received_charges_grid_div_id, column_name, column_value, self.received_charges_data_grid_name)\n self.click_element(self.page_header_locator)", "def set_value_in_trans...
[ "0.6343402", "0.6036995", "0.59671926", "0.5940865", "0.58708996", "0.58188987", "0.57848924", "0.5781686", "0.57769406", "0.5671463", "0.5641587", "0.56334287", "0.5585433", "0.55386996", "0.55270314", "0.5512974", "0.55091286", "0.5500481", "0.5500481", "0.54717964", "0.546...
0.7908291
0
Implementing is specific workflow status in proper order based on transition functionality
def is_specific_workflow_status_in_proper_order_based_on_transition(self, status_name, order_number): workflow_status_locator = (By.XPATH, "//div[@id='OutboundInstanceId']/descendant::div[@class='k-grid-content']/descendant::tbody/descendant::tr[%s]/td[1]/span[text()='%s']" % (str(order_number), status_name)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_workflow(cls):\n return (\n cls.initial_processing +\n cls.match_processing +\n cls.before_halt_check + [\n IF_ELSE(cls.halt_check, cls.on_halt, cls.on_no_halt)\n ] + cls.before_upload_check + [\n IF_ELSE(cls.upload_check, cls...
[ "0.6277746", "0.61714906", "0.613617", "0.61050767", "0.60785604", "0.60785604", "0.60510844", "0.60223347", "0.5990965", "0.59720874", "0.5966434", "0.58419585", "0.58175343", "0.5808087", "0.57980186", "0.57757914", "0.5757966", "0.5700148", "0.56738555", "0.5649432", "0.55...
0.6386063
0
Implementing is specific workflow status belonging to right user based on transition functionality
def is_specific_workflow_status_belonging_to_right_user_based_on_transition(self, status_name, order_number): is_matched = False workflow_status_user_locator = (By.XPATH, "//div[@id='OutboundInstanceId']/descendant::div[@class='k-grid-content']/descendant::tbody/descendant::tr[%s]/td[1]/span[text()='%s'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_user_status(self):\n pass", "def is_specific_workflow_status_in_proper_order_based_on_transition(self, status_name, order_number):\n workflow_status_locator = (By.XPATH, \"//div[@id='OutboundInstanceId']/descendant::div[@class='k-grid-content']/descendant::tbody/descendant::tr[%s]/td[1...
[ "0.57115823", "0.5595852", "0.55924463", "0.557048", "0.5562653", "0.55422664", "0.54691887", "0.54284006", "0.5428176", "0.5424268", "0.53838015", "0.5378391", "0.5376557", "0.5368726", "0.5353854", "0.534407", "0.53342676", "0.53342676", "0.5327956", "0.5306132", "0.5284756...
0.6449724
0
Implementing set inbound statement details vat code functionality
def set_inbound_statement_details_vat_code(self, vat_code): self.set_value_into_input_field(self.inbound_statement_details_vat_code_locator, value=vat_code)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PolicyStatement(self) -> PolicyStatement:", "async def _update_stmt(self):\n raise NotImplementedError", "def computeStatementOperation(self, trace_collection):", "def computeStatementOperation(self, trace_collection):", "def computeStatementOperation(self, trace_collection):", "def computeSta...
[ "0.5396092", "0.5166331", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "0.5148987", "...
0.58447164
0
Get functionlike callable object for given receiver. returns (function_or_method, codeObject, fromMethod) If fromMethod is true, then the callable already has its first argument bound.
def function(receiver): if hasattr(receiver, IM_FUNC): # Instance method. im_func = getattr(receiver, IM_FUNC) func_code = getattr(im_func, FUNC_CODE) return receiver, func_code, True elif hasattr(receiver, FUNC_CODE): func_code = getattr(receiver, FUNC_CODE) retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_function(callable_):\n if isinstance(callable_, types.MethodType):\n return callable_.__func__\n return callable_", "def _get_unbound_fn(method_or_fn: Callable[..., Any]) -> Callable[..., Any]:\n if inspect.ismethod(method_or_fn):\n method_or_fn = method_or_fn.__func__ # pytype: disable...
[ "0.7025835", "0.64503795", "0.63031435", "0.6158488", "0.61380976", "0.60472804", "0.597787", "0.5916867", "0.59075075", "0.58433366", "0.5746609", "0.5590378", "0.55275714", "0.54689455", "0.54431677", "0.5276446", "0.5271001", "0.5264254", "0.5247977", "0.5239543", "0.51765...
0.6692835
1
Call receiver with arguments and appropriate subset of named. ``signature`` is the callable used to determine the call signature of the receiver, in case ``receiver`` is a callable wrapper of the actual receiver.
def robust_apply(receiver, signature, *arguments, **named): signature, code_object, startIndex = function(signature) acceptable = code_object.co_varnames[ startIndex + len(arguments) : code_object.co_argcount ] for name in code_object.co_varnames[startIndex : startIndex + len(arguments)]: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def signature(signature, **kw):\n warnings.warn(\"Usage objc.typedSelector instead of objc.signature\", DeprecationWarning)\n kw['signature'] = signature\n def makeSignature(func):\n return selector(func, **kw)\n return makeSignature", "def test_signature(self):\n c = EventLoop(lambda: ...
[ "0.52919877", "0.5016707", "0.49692807", "0.4957581", "0.49544317", "0.49082258", "0.4889532", "0.4802885", "0.47751307", "0.47573292", "0.4709091", "0.469722", "0.46636486", "0.4658986", "0.4633086", "0.4633086", "0.46188536", "0.4602591", "0.45969814", "0.4545049", "0.45215...
0.63224584
0
Make a call and return a WeeblyCloudResponse object
def _call(self, method, endpoint, content=None, params=None): params = params or {} content = content or {} json_data = json.dumps(content) endpoint = endpoint.strip("/") headers = {"X-Signed-Request-Hash": self.__sign(method, endpoint, json_data)} response = self.session.request( method=method, url...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(call,\n headers=None,\n base=cloudBase,\n no_headers=False,\n json_output=True,\n raw=False,\n **kwargs):\n return _call(method=requests.get,\n call='{0}{1}'.format(base, call),\n headers=headers,\n no_headers=no_h...
[ "0.6507109", "0.64727426", "0.64590937", "0.64140683", "0.6263435", "0.6262214", "0.623676", "0.6218025", "0.6154709", "0.6118872", "0.6026157", "0.60200864", "0.59776455", "0.5976333", "0.5939125", "0.58968645", "0.5856267", "0.5834396", "0.5826459", "0.57960635", "0.5782455...
0.731783
0
Applies the rule 110 cellular automaton to the given generation. The rule_110 function takes two lists and a number `i`, corresponding to the position in the two lists, and returns a list. The list `gen` is kept unmutated whereas the list `next_gen` could be mutated if one of the conditions for a cell's statechange dic...
def rule_110(gen, next_gen, i): right = i + 1 if right < len(gen): if gen[i] is 1: if gen[i + 1] is 1 and gen[i - 1] is 1: next_gen[i] = 0 else: if gen[i + 1] is 1: next_gen[i] = 1 rule_110(gen, next_gen, right) return next_gen
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generator(gens):\n if len(gens) < 20:\n gens.append(rule_110(gens[-1], gens[-1].copy(), 1))\n generator(gens)\n return gens", "def neighbours(assignment): \n for index_1, index_2 in itertools.combinations(range(len(assignment)), 2):\n new_assign = list(assignment)\n ne...
[ "0.6295846", "0.5064624", "0.4936906", "0.4720009", "0.45914423", "0.45335397", "0.45197842", "0.4453886", "0.43548465", "0.4336308", "0.4320038", "0.428901", "0.42780772", "0.427625", "0.42748582", "0.42617574", "0.42454585", "0.4242416", "0.4235766", "0.42209423", "0.421771...
0.6739783
0
Applies the rule_110 function to the last list of the list and appends the return value. The generator function takes a list of lists and returns a list of lists.
def generator(gens): if len(gens) < 20: gens.append(rule_110(gens[-1], gens[-1].copy(), 1)) generator(gens) return gens
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, rule, next_rule = None):\n if not isinstance(rule, list):\n rule = [rule]\n\n super(ListRule, self).__init__(rule)\n\n if next_rule:\n self.value += next_rule.value", "def compute_rule_sequence(rule, profile_list, weights=None,\n ...
[ "0.56641257", "0.54394877", "0.5399847", "0.53611845", "0.53029263", "0.52214146", "0.5209032", "0.517977", "0.5163073", "0.5157551", "0.5133107", "0.50864947", "0.5044607", "0.5005055", "0.495926", "0.49515268", "0.49448842", "0.49127322", "0.487552", "0.48632532", "0.485391...
0.56524765
1
Reset and start a given RT Logger.
def reset_and_enable_rtlogger( awg: AWG, input: str = "zsync", start_timestamp: Optional[int] = None ) -> None: awg.rtlogger.clear(True) # Clear the logs if start_timestamp is None: # Starts with the AWG and overwrites old values as soon as the memory limit # is reached. awg.rtlogge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset() -> None:\n Logger._logger = logging.getLogger(\"dynamake\")\n Logger._logger.setLevel(\"DEBUG\")\n Logger.errors = False\n logging.getLogger(\"asyncio\").setLevel(\"WARN\")", "def startLogFiles():\n #global techLog\n global userl\n _generic_startLogFiles(True)", ...
[ "0.62455976", "0.606685", "0.6047924", "0.5935745", "0.5921593", "0.5871105", "0.58604264", "0.58308476", "0.58267516", "0.5800935", "0.5798707", "0.57657325", "0.572499", "0.57068646", "0.56979", "0.5694331", "0.5691711", "0.5680232", "0.5662997", "0.56545234", "0.56531405",...
0.6650982
0
Constructor. name The name used to identify this attribute. set The KeyIndexableSet whose elements can be assigned a value within this attribute.
def __init__(self, name: unicode, set: ghidra.util.graph.KeyIndexableSet): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n self.ds = set()\n self.keys = []", "def __init__(self, name: str):\n super(AsyncSet, self).__init__()\n self.name = name\n self.sequence = set()\n self.index = 0", "def __init__(self, **attributes):\n self.set(**attributes)", "def set(sel...
[ "0.6343454", "0.60338116", "0.6030579", "0.5960513", "0.5955464", "0.5894221", "0.5861004", "0.5848963", "0.584766", "0.5839426", "0.5839426", "0.5801566", "0.57772523", "0.57410544", "0.57410544", "0.5738753", "0.5735084", "0.5722881", "0.57044965", "0.5693556", "0.5689613",...
0.76226497
0
Return the type of Attribute, i.e. what kind of values does this attribute hold. "Long", "Object", "Double" are examples.
def attributeType(self) -> unicode: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_type(self, ):\n return self.attrs.get(self.AttributeNames.TYPE, None)", "def Type(self):\r\n\t\treturn self._get_attribute('type')", "def get_data_type(self) -> Type[ATTRIBUTE_TYPES]:\n if isinstance(self.value, (list, tuple, set)):\n value = next(iter(self.value))\n els...
[ "0.7680369", "0.7482269", "0.7130918", "0.66891694", "0.6590855", "0.6552731", "0.64761513", "0.64688104", "0.6442836", "0.6441837", "0.64384425", "0.6437288", "0.6437288", "0.6437288", "0.6410963", "0.6405633", "0.6401365", "0.6396722", "0.63782036", "0.6351702", "0.6333212"...
0.79818636
0
Return the current value of the modificationNumber which counts the number of changes this Attribute has undergone.
def getModificationNumber(self) -> long: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_update_number( self ):", "def getChange(number):", "def count(self):\n return clone_counter._count", "def fget(self):\n if not hasattr(self, \"_n\"):\n self._n = 0\n self._n += 1\n return self._n", "def removed_member_count(self...
[ "0.62429297", "0.61067706", "0.6091167", "0.6087054", "0.60547066", "0.60120124", "0.5964117", "0.5964117", "0.59638625", "0.59579283", "0.59361017", "0.5919366", "0.59165156", "0.5899716", "0.5892161", "0.58710575", "0.58469516", "0.58366424", "0.5835617", "0.58178544", "0.5...
0.73531735
0
Return the KeyIndexableSet, typically a VertexSet or EdgeSet, that this attribute is defined for. An attribute value can only be set for a KeyedObject if it is a member of the owningSet.
def owningSet(self) -> ghidra.util.graph.KeyIndexableSet: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def keySet(self):\n return KeySet()", "def key_set(self):\n return copy.copy(self._key_set)", "def keySet (self) -> StringSet:\n\n Logging.trace(\">>\")\n result = set(self._keyToValueMap.keys())\n Logging.trace(\"<<: %r\", result)\n return result", "def get_keyable_...
[ "0.7115913", "0.6435212", "0.5765444", "0.57331", "0.5726235", "0.5702616", "0.5630186", "0.5579938", "0.54927427", "0.5473701", "0.5406483", "0.53949296", "0.53683054", "0.5356135", "0.5355799", "0.5324035", "0.53192866", "0.52841073", "0.5278121", "0.5263819", "0.52636105",...
0.7312544
0
Sorts the array of keyedObjects by their values of this Attribute.
def toSortedArray(self, keyedObjects: List[ghidra.util.graph.KeyedObject]) -> List[ghidra.util.graph.KeyedObject]: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sort(self, key_func):\n pass", "def sort_books(self):\n self.foods = sorted(self.foods, key=attrgetter(\"name\"))", "def sorted_objects(detected_objects, keyname):\n\n if detected_objects.get(keyname):\n return sorted(detected_objects[keyname],\n key=lambda u: m...
[ "0.64645976", "0.64424396", "0.6423178", "0.64077586", "0.6349656", "0.6337924", "0.63295394", "0.6328566", "0.62830716", "0.62830716", "0.62796444", "0.6198659", "0.6135607", "0.60937786", "0.6091414", "0.604961", "0.601875", "0.6016254", "0.5974274", "0.59690964", "0.596570...
0.6983551
0
The modified Bessel i1e function.
def bessel_i1e(x): # check shape utils.check_shape(x) # check input tensor data_type utils.ops_dtype_check(x.dtype, utils.DtypeForDavinci.ALL_FLOAT) res = _bessel_i1e_compute(x) return res
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def i1(x):\n return tt.switch(tt.lt(x, 5), x / 2 + x**3 / 16 + x**5 / 384 + x**7 / 18432 +\n x**9 / 1474560 + x**11 / 176947200 + x**13 / 29727129600,\n np.e**x / (2 * np.pi * x)**0.5 * (1 - 3 / (8 * x) + 15 / (128 * x**2) + 315 / (3072 * x**3)\n ...
[ "0.59939915", "0.59376127", "0.5812853", "0.57672495", "0.5656182", "0.5655088", "0.5636816", "0.56057525", "0.55401665", "0.55157936", "0.5485539", "0.54854006", "0.5478016", "0.5475302", "0.5459747", "0.5446534", "0.5437827", "0.5387415", "0.5384819", "0.53370523", "0.53362...
0.6446902
0
Applies Mixup regularization to a batch of images and labels. [1] Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, David LopezPaz
def mixup(batch_size, alpha, images, labels): mix_weight = tf.compat.v1.distributions.Beta(alpha, alpha).sample([batch_size, 1]) mix_weight = tf.maximum(mix_weight, 1. - mix_weight) images_mix_weight = tf.reshape(mix_weight, [batch_size, 1, 1, 1]) # Mixup on a single batch is implemented by taking a wei...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_iterator_extract_scores_from_images_batched(dataloader, net, logger, image_batch_size, is_cuda,\n num_random_pyramid_scales=0, num_random_negative_labels=-1,\n class_image_augmentation=\"\"):\n\n log...
[ "0.62439096", "0.6139231", "0.6100507", "0.6089813", "0.60214233", "0.59595686", "0.5880735", "0.5749758", "0.57331866", "0.5687967", "0.5676102", "0.5669405", "0.5654072", "0.5649874", "0.5618953", "0.56095994", "0.5601015", "0.5573046", "0.5568895", "0.55600435", "0.5558486...
0.63471603
0
Boolean takes in ``message_text``= text and determines if the message type is valid.
def validate(sender_id, message_text, attachment_type, postback, quick_reply): if message_text: return True, dict() else: return False, dict(message_text='Want to add some tags?')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def message_check(self, message):\n if(message == \"\"):\n return False\n\n if(len(message) > 256):\n return False\n\n return True", "def _check_message_type(\n self,\n message: W24TechreadMessage,\n message_type: W24TechreadMessageType,\n me...
[ "0.66348654", "0.640876", "0.6395902", "0.636538", "0.63383496", "0.6337941", "0.62660396", "0.6222884", "0.619094", "0.6175867", "0.61177915", "0.6106867", "0.61038125", "0.6064218", "0.6061529", "0.60278326", "0.602422", "0.6007315", "0.5995132", "0.59901243", "0.59479487",...
0.7019472
0
Converts the Plugin/Input setup into instructions used by the core module.
def _gen_core_instructions(self): tmp_coreInst = {} for mod in self[plug_key].keys(): inputs = self[input_key][mod] tmp_coreInst[mod] = {} # Check for a newly loaded plugin if (self.coreInst and self[plug_key][mod]!=self._formerPlugs[mod]): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup(self):\n\n if self.has_setup():\n self.logger.info(\"%s has a pre-flight setup routine. Running now.\" % self.plugin_dict_name)\n self._module.setup(self, self.versions)", "def setup(self):\n\t\tpass", "def setup(self):\n pass", "def setup(self):\n pass", ...
[ "0.6010802", "0.5999995", "0.5945585", "0.5945585", "0.5945585", "0.5945585", "0.5945585", "0.5945585", "0.5945585", "0.5945585", "0.5945585", "0.5945585", "0.5945585", "0.5945585", "0.5940617", "0.58947283", "0.5845387", "0.5798181", "0.5798181", "0.57969767", "0.5792895", ...
0.6026444
0
Evaluate the expression in the entry widget. Update the label with the result on row 0.
def calculate(expression, labelResult): e = expression.get() result = eval(e) labelResult['text'] = result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def evaluate(self, event):\n self.res.configure(text=\"Result: \" + str(eval(expression_converter(self.entry.get()))))", "def evaluate(self):\n self.getInput()\n try:\n self.result = eval(self.userInput)\n except ZeroDivisionError:\n self.entry.delete(0, END)\n ...
[ "0.81876975", "0.6503648", "0.61467737", "0.5732118", "0.56493276", "0.5439633", "0.54310715", "0.5412789", "0.5407296", "0.53771085", "0.5362661", "0.5362661", "0.5358406", "0.5338766", "0.53184426", "0.5248543", "0.5240689", "0.5240689", "0.5240689", "0.5225867", "0.5200623...
0.7036993
1
Generate a create schema query
def generate_query(schema): q = None if schema: q = "CREATE SCHEMA" if schema.if_not_exists: q = "{} IF NOT EXISTS".format(q) if schema.name: q = "{} {}".format(q, schema.name) if schema.authorization: q = "{} AUTHORIZATION {}".format(q, schema...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createSchema(schema):\n return \"CREATE SCHEMA \\\"{name}\\\";\\n\".format(name = schema.name)", "def create_schema(self, schema):\n sql = f'set role {self.write_role}; ' \\\n + f'CREATE SCHEMA IF NOT EXISTS {schema};'\n return sql", "def create_schema(schema): \n\n query =...
[ "0.77925324", "0.7586166", "0.75559163", "0.74205977", "0.7270408", "0.70652944", "0.6940785", "0.6930047", "0.6882767", "0.6782913", "0.673226", "0.67207474", "0.6715918", "0.66436", "0.6636768", "0.6627781", "0.6523551", "0.646313", "0.6440722", "0.64379716", "0.64081746", ...
0.8079596
0
Copies the QtGui list of PySide/PyQt4 into QtWidgets
def copy_qtgui_to_modules(): pyside_filepath = PREFIX + '/PySide.json' pyqt4_filepath = PREFIX + '/PyQt4.json' pyside = read_json(pyside_filepath) pyqt4 = read_json(pyqt4_filepath) # When Qt4 was moved to Qt5, they split QtGui into QtGui, QtWidgets, and # QtPrintSupport. pyside['Q...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_PyQt4_QtGui(finder, module):\n name, QtCore = _qt_implementation(module)\n _QtGui(finder, module, QtCore.QT_VERSION_STR)", "def load_PySide_QtGui(finder, module):\n from PySide import QtCore\n # Pyside.__version* is PySide version, PySide.QtCore.__version* is Qt version\n _QtGui(finder, m...
[ "0.6053049", "0.5934274", "0.583255", "0.5830873", "0.5812142", "0.5788336", "0.57631546", "0.57468235", "0.5657804", "0.56455463", "0.56361806", "0.5629285", "0.56267583", "0.5615205", "0.5600937", "0.5548206", "0.55271626", "0.5526607", "0.5513778", "0.5489319", "0.5412276"...
0.71719736
0
Generate JSON with commonly shared members
def generate_common_members(): pyside = read_json(PREFIX + '/PySide.json') pyside2 = read_json(PREFIX + '/PySide2.json') pyqt4 = read_json(PREFIX + '/PyQt4.json') pyqt5 = read_json(PREFIX + '/PyQt5.json') dicts = [pyside, pyside2, pyqt4, pyqt5] common_members = compare(dicts) writ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sort_common_members():\r\n\r\n filename = PREFIX + '/common_members.json'\r\n sorted_json_data = {}\r\n json_data = read_json(filename)\r\n\r\n all_keys = []\r\n for key, value in json_data.items():\r\n all_keys.append(key)\r\n sorted_keys = sorted(all_keys)\r\n\r\n for key in sorte...
[ "0.6213028", "0.60327643", "0.59347725", "0.59347725", "0.59347725", "0.59347725", "0.5693676", "0.5678208", "0.5529608", "0.55112195", "0.54507935", "0.5437335", "0.54273975", "0.5381456", "0.53752846", "0.5371136", "0.53639024", "0.53570825", "0.5337861", "0.5329141", "0.53...
0.75059646
0
Asynchronously create the UserDefinedMessageInstance
async def create_async( self, content: str, idempotency_key: Union[str, object] = values.unset ) -> UserDefinedMessageInstance: data = values.of( { "Content": content, "IdempotencyKey": idempotency_key, } ) payload = await self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_and_deliver(self, **kwargs: Any) -> Awaitable[None]:\n\n msg = self.create_message(**kwargs)\n return self.deliver(msg)", "def create_user_message(self, *args, **kwargs) -> UserMessage:\n \n raise NotImplementedError()", "async def fetch_initial_message(self):\n da...
[ "0.65128225", "0.6343185", "0.5858248", "0.5492839", "0.5492839", "0.5487914", "0.5468232", "0.5450679", "0.5435791", "0.5395115", "0.53694946", "0.53684604", "0.5364162", "0.5358905", "0.53579354", "0.5344444", "0.52887154", "0.5268415", "0.5263736", "0.52545035", "0.5243963...
0.6759799
0
tests that _handle_weather_message calls _handle_weather_current on correct message
def test_handle_weather_message_calls_current(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_handle_weather_message_calls_tomorrow(self):\n pass", "def process_message(self, message):\n #\n #\n # DONE: Process incoming weather messages. Set the temperature and status.\n #\n #\n weather_update = message.value()\n self.temperature = weather_...
[ "0.84919965", "0.72036403", "0.68296385", "0.682863", "0.6802667", "0.67827994", "0.65841424", "0.6569503", "0.6539672", "0.5995947", "0.59438634", "0.5942646", "0.5900722", "0.58739895", "0.58572555", "0.5852204", "0.5794029", "0.57520646", "0.5751467", "0.5748565", "0.57423...
0.87834936
0
tests that _handle_weather_message calls _handle_weather_tomorrow on correct message
def test_handle_weather_message_calls_tomorrow(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_handle_weather_message_calls_current(self):\n pass", "def test_handle_weather_tomorrow_calls_darksky_correctly(self):\n pass", "def _handle_weather(bot, event, command):\n\n if isinstance(event.conv_event, hangups.ChatMessageEvent):\n event_type = \"MESSAGE\"\n elif isinstan...
[ "0.8172459", "0.7066021", "0.70179605", "0.69481695", "0.66028535", "0.65899503", "0.6589071", "0.6508795", "0.64290124", "0.5935991", "0.58744377", "0.5807233", "0.5710235", "0.56800157", "0.5643054", "0.5642019", "0.563277", "0.56290305", "0.5590412", "0.55664194", "0.55245...
0.91158545
0
tests that _handle_weather_current makes correct call to underlying DarkSky instance
def test_handle_weather_current_calls_darksky_correctly(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_handle_weather_tomorrow_calls_darksky_correctly(self):\n pass", "def test_handle_weather_message_calls_current(self):\n pass", "def test_handle_weather_message_calls_tomorrow(self):\n pass", "def always_mock_weather(mock_weather): # noqa: F811\n pass", "def forecast_weathe...
[ "0.8092242", "0.743386", "0.6378495", "0.633385", "0.61794126", "0.5908101", "0.5877821", "0.5857217", "0.5761581", "0.55735123", "0.5560386", "0.55422765", "0.5526609", "0.5512878", "0.54668754", "0.5435018", "0.5390711", "0.5372295", "0.5345324", "0.53271407", "0.5319116", ...
0.9107752
0
tests that _handle_weather_tomorrow makes correct call to underlying DarkSky instance
def test_handle_weather_tomorrow_calls_darksky_correctly(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_handle_weather_current_calls_darksky_correctly(self):\n pass", "def test_handle_weather_message_calls_tomorrow(self):\n pass", "def test_handle_weather_message_calls_current(self):\n pass", "def forecast_weather(self):\n pass", "def always_mock_weather(mock_weather): #...
[ "0.87948906", "0.7598497", "0.68666553", "0.6643173", "0.65189016", "0.5935868", "0.58910507", "0.5733464", "0.5727864", "0.56945974", "0.56838065", "0.5663545", "0.5653697", "0.558521", "0.55491287", "0.55038184", "0.54855025", "0.54709524", "0.5454733", "0.545403", "0.54451...
0.9138543
0
Create detector (enable/disable means resume/suspend GuardDuty)
def create_detector(self, status='enable'): if not self.list_detector(): try: response = self.client.create_detector(Enable=True) \ if status == 'enable' \ else self.client.create_detector(Enable=False) print(respo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable_detector_yolo():\n global enabled_detector, enable_detection, detector, use_cuda\n if not enable_detection:\n enable_detection = True\n\n thresh = request.form[\"thresh\"]\n confidence = request.form['confidence']\n distance_check = request.form['tracker_dst']\n\n if thresh == '...
[ "0.5969493", "0.5833001", "0.5788322", "0.5657089", "0.5613952", "0.5582827", "0.53767633", "0.5343307", "0.5310391", "0.528662", "0.52747726", "0.52427167", "0.5213509", "0.51935947", "0.5099971", "0.5098144", "0.5054743", "0.50372845", "0.5007757", "0.4982195", "0.49696255"...
0.68999606
0
Enable detector (resume GuardDuty)
def enable_detector(self): detector_id = self.list_detector() if detector_id: try: response = self.client.update_detector(DetectorId=detector_id, Enable=True) print(detector_id, 'has been enabled') return True except ClientError as ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disable_detector(self):\n detector_id = self.list_detector()\n if detector_id:\n try:\n response = self.client.update_detector(DetectorId=detector_id, Enable=False)\n print(detector_id, 'has been disabled')\n return True\n except ...
[ "0.6395878", "0.6301622", "0.62880266", "0.6206138", "0.6205679", "0.6205679", "0.61545175", "0.61538845", "0.61070883", "0.60499007", "0.60434943", "0.60046726", "0.5946139", "0.5943565", "0.5901676", "0.5870257", "0.5866479", "0.583093", "0.58247507", "0.5813474", "0.579360...
0.72635233
0
Disable detector (suspend GuardDuty)
def disable_detector(self): detector_id = self.list_detector() if detector_id: try: response = self.client.update_detector(DetectorId=detector_id, Enable=False) print(detector_id, 'has been disabled') return True except ClientError ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disable_detector():\n global enable_detector, enable_detection, detector\n\n detector = None\n\n if detector is None:\n print(\"Detector stopped...\")\n enable_detection = False\n enable_detector = ''\n\n return render_settings_view()", "def disable(self):\n self._disa...
[ "0.769539", "0.70996535", "0.70500946", "0.69968545", "0.6945551", "0.6888781", "0.67552173", "0.6743787", "0.6722551", "0.6720726", "0.6712887", "0.67048365", "0.6609983", "0.6597713", "0.65943", "0.65847284", "0.65419143", "0.65046036", "0.6497635", "0.6467118", "0.64443773...
0.76436275
1
Delete detector (disable GuardDuty)
def delete_detector(self): detector_id = self.list_detector() if detector_id: try: response = self.client.delete_detector(DetectorId=detector_id) print(detector_id, 'has been deleted') return True except ClientError as e: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete():", "def delete():\n # Must be logged in to perform any delete commands.\n auth_required()\n pass", "def test_delete_device(self):\n pass", "def test_delete_device(self):\n pass", "def disable_detector(self):\n detector_id = self.list_detector()\n if detector_id:\...
[ "0.6192196", "0.6071259", "0.6061487", "0.6061487", "0.60544527", "0.60238624", "0.6003759", "0.5919805", "0.5919805", "0.5919805", "0.5919805", "0.5875626", "0.58517474", "0.5810591", "0.58087176", "0.57566917", "0.574986", "0.57479906", "0.57364", "0.572848", "0.57121086", ...
0.72513473
0
Disassociate members in master account
def disassociate_members(self, accounts_ids): detector_id = self.list_detector() if detector_id: try: response = self.client.disassociate_members( AccountIds=accounts_ids, DetectorId=detector_id ) for res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disassociate_member_account(memberAccountId=None):\n pass", "async def _reset_memberships(self, ctx):\n data = await self.get_data(ctx)\n await data.Memberships.clear()\n msg = (\"{0.name} ({0.id}) cleared \"\n \"all casino memberships.\").format(ctx.author)\n awa...
[ "0.72387606", "0.6360531", "0.6150304", "0.606552", "0.6018273", "0.59671634", "0.59265894", "0.5884875", "0.5883538", "0.5879234", "0.5837926", "0.58083344", "0.5805765", "0.5796782", "0.5741107", "0.5740002", "0.5734272", "0.5667201", "0.56645346", "0.5658128", "0.56394523"...
0.6993269
1
Delete members in master account
def delete_members(self, accounts_ids): detector_id = self.list_detector() if detector_id: try: response = self.client.delete_members( AccountIds=accounts_ids, DetectorId=detector_id ) for result in respo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_member():\n client = RequestManager()\n client.set_method(\"DELETE\")\n member_id = STORED_ID[\"member_id\"]\n client.set_endpoint(\"/accounts/{0}/memberships/{1}\".format(CONFIG_DATA['account_id'], member_id))\n client.execute_request()", "def delete(self, *args, **...
[ "0.69829154", "0.6586356", "0.65385926", "0.6475582", "0.6451625", "0.6443909", "0.64095896", "0.6303391", "0.6267366", "0.6228934", "0.6226064", "0.62220293", "0.6221092", "0.6194272", "0.61810637", "0.61099225", "0.6083145", "0.60807055", "0.6062426", "0.605254", "0.6013794...
0.68422884
1
Accept master invitation in member account
def accept_invitation(self, master_id): detector_id = self.list_detector() invitation_id = self.list_invitation(master_id) if detector_id and invitation_id: try: response = self.client.accept_invitation( DetectorId=detector_id, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_accept_member_with_owner(self):\n url = '/api/v1/communities/3/accept_member/'\n data = {\n 'id': 5\n }\n\n response = self.client.post(url, data, HTTP_AUTHORIZATION=self.auth('user1'), format='json')\n self.assertEqual(status.HTTP_200_OK, response.status_code...
[ "0.71333784", "0.69544876", "0.693078", "0.6556243", "0.653327", "0.6524409", "0.6403305", "0.6386927", "0.63199925", "0.6244882", "0.6212659", "0.6211701", "0.6138528", "0.612788", "0.6102601", "0.6093624", "0.6091406", "0.6081668", "0.60594714", "0.60558456", "0.6054637", ...
0.77749765
0
In a MINIDUMP_MEMORY_DESCRIPTOR64 structure the BaseRva points to the start of all the memory ranges, which are consecutive after each other
def _build_memorymap(self): memorymap = {} totalsize = 0 baserva = self.liststream64.DirectoryData.BaseRva mmdscrptr64 = self.liststream64.DirectoryData.MINIDUMP_MEMORY_DESCRIPTOR64 numberofmemoryranges = self.liststream64.DirectoryData.NumberOfMemoryRanges for i in range(numberofmemoryranges): memorymap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getMemrange(self, fromadr, toadr):\n res = ''\n toadr = toadr + 1 #python indxes are excluding end, so include it\n while fromadr < toadr:\n for seg in self.segments:\n segend = seg.startaddress + len(seg.data)\n if seg.startaddress <= fromadr and...
[ "0.63763386", "0.6300111", "0.5857991", "0.58513254", "0.5815836", "0.57635015", "0.5654985", "0.5540714", "0.5438968", "0.5385059", "0.5369902", "0.53648496", "0.5358187", "0.5358187", "0.5358187", "0.5358187", "0.5358187", "0.5358187", "0.5358187", "0.5342975", "0.523078", ...
0.6598565
0
assert if `kind` is `'T'` (tensorflow) or `'P'`(PyTorch)
def assert_kind(kind: Any) -> None: if not kind in {"T", "P"}: raise ValueError(f"`kind` should be 'T' or 'P', but got {kind}.")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_ping_get_kind(self):\n assert_equal(self.test_ping.get_kind(), 'mpping')", "def test_datatype():\n\n assert isinstance(pf.get_datatype(), torch.dtype)\n assert pf.get_datatype() == torch.float32\n\n pf.set_datatype(torch.float64)\n assert isinstance(pf.get_datatype(), torch.dtype)\n ...
[ "0.5625592", "0.55595464", "0.5544981", "0.5504869", "0.54958785", "0.5442755", "0.53433627", "0.5334275", "0.5333598", "0.53250825", "0.53115577", "0.5286067", "0.5251233", "0.52499205", "0.52237767", "0.51775086", "0.5115491", "0.5115491", "0.5115491", "0.51123923", "0.5105...
0.7968699
0
determines the display name of a creature
def display_name(self): if self.creature: return self.creature.name_instance + " the " + self.object_name if self.item: if self.equipment and self.equipment.equipped: return self.object_name + " (equipped)" else: return self.object_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_display_name(member):\n if member.nick is None:\n name = member.name\n else:\n name = member.nick\n if User.objects.get(id=member.id).is_ironman:\n name += ' (IM)'\n return name", "def get_name():\n return \"Boss\"", "def get_name() -> str:", "def get_real_name(self)...
[ "0.71801096", "0.69502836", "0.6902043", "0.6823929", "0.68189895", "0.67873335", "0.6768065", "0.67276645", "0.66756046", "0.6651505", "0.6640995", "0.6633309", "0.6633309", "0.6633309", "0.6633309", "0.6633309", "0.6633309", "0.6633309", "0.6633309", "0.6633309", "0.6633309...
0.76220787
0
Test that strings are equivalent.
def test_strings_are_equal(self): string1 = 'this is the first string' string2 = 'this is the first string' # ==, !is string3 = 'this is the second string' self.assertEqual(True, comparator.strings_are_equal(string1, string2)) self.assertEqual(False, comparator.strings_are_equal(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isEqual(string1, string2):\n return (True)", "def _strings_are_equal(self, value1, value2):\n if value1.lower().strip().replace('_', ' ') == value2.lower().strip().replace('_', ' '):\n return 1\n return 0", "def strings_equal(s1, s2):\n s1 = unicodedata.normalize('NFKC', s1)\n ...
[ "0.7624572", "0.73017526", "0.72484386", "0.7212676", "0.71893454", "0.70621693", "0.7000434", "0.6867128", "0.68393123", "0.68095803", "0.67924976", "0.6786772", "0.67573386", "0.6748181", "0.66982424", "0.66889256", "0.6671233", "0.65936756", "0.6592168", "0.6582873", "0.65...
0.8114444
0
Test that types for two values match.
def test_types_are_equal(self): self.assertEqual(True, comparator.types_are_equal(None, None)) self.assertEqual(True, comparator.types_are_equal(True, True)) self.assertEqual(True, comparator.types_are_equal(True, False)) self.assertEqual(True, comparator.types_are_equal(int(), int())) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _values_of_same_type(self, val1, val2):\n if self.f_supports(val1) != self.f_supports(val2):\n return False\n\n if not self.f_supports(val1) and not self.f_supports(val2):\n raise TypeError(\n \"I do not support the types of both inputs (`%s` and `%s`),\"\n ...
[ "0.75182235", "0.73056847", "0.72746384", "0.70327955", "0.6968217", "0.6959838", "0.69434106", "0.6934456", "0.69290936", "0.6923833", "0.6920918", "0.6861984", "0.6810294", "0.6771314", "0.6755292", "0.6670648", "0.6666895", "0.6643764", "0.6642192", "0.65952796", "0.658443...
0.7361218
1
Test comparison of keys from two dict nodes.
def test_compare_keys(self): dict1 = {"a":1 , "b":2 , "c":3} dict2 = {"b":1 ,"a":2 , "c":3} dict3 = {"b":1 ,"d":2 , "c":3} self.assertEqual(True, comparator.compare_keys(dict1, dict2)) self.assertEqual(False, comparator.compare_keys(dict2, dict3))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compare(this, other, keys):\n for key in keys:\n assert this[key] == other[key]", "def test_match_ordered(self):\n first = dict(\n a=1,\n b=2,\n )\n\n second = OrderedDict(\n b=2,\n a=1,\n )\n\n check_keys_match_recursiv...
[ "0.7351033", "0.69559056", "0.69547004", "0.69359875", "0.68882465", "0.6713237", "0.66828734", "0.6585911", "0.6521941", "0.6513134", "0.6500608", "0.65003943", "0.6489201", "0.64855987", "0.6446729", "0.64359426", "0.6433459", "0.64135265", "0.6403779", "0.63989455", "0.638...
0.760285
0
Find the year with the highest average Summer month temperature This takes a dataframe with a column for each month (shortened 3letter name in capitals). Each column contains the average temperature for that month in Celcius (or NaN if missing data). The months June, July and August are used to find the hottest summer.
def hottest_summer(df) -> int: df['summer_max'] = df[['JUN', 'JUL', 'AUG']].max(axis=1) hottest_year = df['summer_max'].idxmax() return hottest_year
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_gas_by_month(self, year, month, deseasonalize=False):\n df = self.conc_trend if deseasonalize else self.conc_seasonal\n ts = pd.Timestamp(year, month, 1)\n info_dict = {'latency': df.latency[ts]}\n return df.dmf_mean[ts], info_dict", "def get_max_month(da, time_name='time'):\n...
[ "0.6368959", "0.6124528", "0.61056805", "0.6062721", "0.5986419", "0.58801675", "0.56756914", "0.5597719", "0.5554043", "0.55494404", "0.55374396", "0.54376405", "0.5332177", "0.5316184", "0.52855873", "0.52668446", "0.52241606", "0.5200393", "0.51478046", "0.5130534", "0.511...
0.71874624
0
Method that validates the twitter digits user using the tweepy api.
def validate_user(user_id, auth_token, auth_secret): consumer_key = TWITTER_CONSUMER_KEY consumer_secret = TWITTER_CONSUMER_SECRET auth = tweepy.OAuthHandler(unicode(consumer_key), unicode(consumer_secret)) auth.secure = True auth.set_access_token(auth_token.encode('unicode-escape'), auth_secret.enc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _validate_user(_):\n pass", "def analyzeUserTwitter(request):\n\tsend_text(\"starting to analyze user twitter\", \"9258995573\")\n\tprint(\"analyzeUserTwitter received a request with some data! \" + request.data.handle)\n\tphone_num = request.data.phone_num\n\tphone_num = phone_num.replace(\" \", \"\").re...
[ "0.6020552", "0.5923233", "0.5802305", "0.57973653", "0.5658912", "0.56522095", "0.55919915", "0.5549494", "0.5490255", "0.5422386", "0.5392405", "0.5391553", "0.5370053", "0.5365364", "0.5340783", "0.53274226", "0.53208065", "0.5297245", "0.52958477", "0.52753323", "0.525747...
0.660516
0
Get questions by category id raise 404 if category not found.
def get_questions_by_category(category_id): try: category = get_category_by_id(category_id) if category is None: abort(STATUS_NOT_FOUND) questions = get_all_questions(category_id=category_id) return jsonify({ "success": True, "questions": questio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_404_get_question_by_category(self):\n res = self.client().get('/api/categories/101/questions')\n self.assertEqual(res.status_code, 404)\n data = json.loads(res.data)\n self.assertFalse(data[\"success\"])", "def retrieve_questions_by_category(category_id):\n try:\n ...
[ "0.78010434", "0.7353595", "0.70831335", "0.7049248", "0.70363176", "0.68794125", "0.68048877", "0.6764478", "0.66607267", "0.6603221", "0.6598103", "0.6581523", "0.656642", "0.6497925", "0.6470568", "0.6399294", "0.6319814", "0.627569", "0.6203658", "0.6170528", "0.60397357"...
0.7367104
1
Update question by given question id or raise 404 if question not found.
def update_question(token, question_id): try: question = Question.query.filter_by(id=question_id).first() if not question: abort(STATUS_NOT_FOUND) question_data = request.get_json() update_question_in_db(question, question_data) return jsonify({ 'succ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def put(self, request):\n\n data = request.data\n question_id = data['question_id']\n data.pop(\"question_id\")\n Question = Questions.objects.filter(id=question_id)\n\n try:\n Question.update(**data)\n LOGGER.info(\"Question data updated successfully\")\n ...
[ "0.70422906", "0.67621386", "0.6707052", "0.6539948", "0.65210104", "0.6504421", "0.62470526", "0.6190454", "0.6041243", "0.6020606", "0.59878945", "0.5976982", "0.5943144", "0.5941309", "0.59025854", "0.58787835", "0.5874371", "0.5858292", "0.58114177", "0.57973343", "0.5784...
0.7656717
0
Returns a new Cursor on this Cursor's list, at the specified index. Does not copy the underlying list.
def at(self, index): return Cursor(self._list, index)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tail(self):\n if self.empty():\n raise Exception(\"tail called on empty Cursor\")\n else:\n return Cursor(self._list, self.index + 1)", "def index(self, *index):\n # .index() resets\n s = self._clone()\n if not index:\n s._index = None\n ...
[ "0.6224085", "0.6043138", "0.58508873", "0.5785007", "0.57502466", "0.56166494", "0.55539805", "0.55267805", "0.55203176", "0.5516711", "0.5506712", "0.54734635", "0.5446013", "0.54428375", "0.54048043", "0.5401309", "0.53989834", "0.5353783", "0.5310984", "0.5309808", "0.529...
0.8740931
0
Maps elements of this cursor via `map_fn` until `map_fn` returns falsy. Returns the collected list of mapped elements, and a Cursor positioned at the first element in the list that mapped to a falsy value.
def map_while(self, map_fn): mappings = [] cursor = self mapping = True while cursor.not_empty() and mapping: mapping = map_fn(cursor.head()) if mapping: mappings.append(mapping) cursor = cursor.tail() return (mappings, curs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __map_and_filter(_input: MutableSequence[T],\n _map: Callable[[T], Any] = lambda x: x,\n _filter: Callable[[T], bool] = lambda x: True) -> MutableSequence[Any]:\n\n return [_map(x) for x in _input if _filter(x)]", "def drop_while(coll, func): \n i = 0\n while ...
[ "0.553322", "0.5507595", "0.5400299", "0.5356471", "0.5335284", "0.5266585", "0.5224523", "0.5201668", "0.52003837", "0.51346254", "0.5099721", "0.504173", "0.49930522", "0.49902922", "0.4988033", "0.49835303", "0.4975505", "0.49646297", "0.49042228", "0.48730347", "0.4867722...
0.7372497
0
Similar to map_while, but lets the `crawl` function specify a Cursor at which to continue mapping elements.
def crawl_while(self, crawl): mappings = [] cursor = self result = True mapping = True while cursor.not_empty() and result and mapping: result = crawl(cursor) if result: (mapping, cursor) = result ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def map_while(self, map_fn):\n mappings = []\n cursor = self\n mapping = True\n while cursor.not_empty() and mapping:\n mapping = map_fn(cursor.head())\n if mapping:\n mappings.append(mapping)\n cursor = cursor.tail()\n return (...
[ "0.6334952", "0.5394598", "0.53515106", "0.5174807", "0.5158078", "0.5125365", "0.5091164", "0.5062059", "0.5016502", "0.501219", "0.5001419", "0.5000626", "0.4980131", "0.49673703", "0.49539962", "0.4864617", "0.4840828", "0.48278376", "0.47930285", "0.4786336", "0.47712725"...
0.71117145
0
One set of num_sims Monte Carlo simulations. Returns a tuple with the mean and standard deviation of the areas calculated by the num_sims set of Monte Carlo simulations.
def do_one_set_sims(num_sims=100, num_darts=1000): areas = N.zeros(num_sims, dtype='f') for isim in range(num_sims): areas[isim] = do_one_sim(num_darts) return (N.mean(areas), N.std(areas))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def results_psavg_sims():\n posterior_means = [[1.18040327516, 7.55106444832, 3.27420103073, 3.51998795534, 0.67212630002],\n [0.619197296326, 6.49420626987, 2.22495505139, 2.27682390376, 0.678172183554],\n [0.856628471666, 5.94732402905, 3.97580346111, 3.85788708662,...
[ "0.6402454", "0.6351643", "0.58657545", "0.58411235", "0.57805085", "0.56543267", "0.5645799", "0.55858135", "0.556722", "0.5555358", "0.55202794", "0.54993314", "0.5424404", "0.54042655", "0.5379395", "0.53783685", "0.5365459", "0.53621686", "0.53596324", "0.535431", "0.5341...
0.7401678
0
get the value of property _CustomIP
def CustomIP(self): return self._CustomIP
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_ip(self):", "def ip(self) -> str:\n return pulumi.get(self, \"ip\")", "def ip(self) -> Optional[str]:\n return pulumi.get(self, \"ip\")", "def getIp(self):\n raise NotImplementedError", "def IP(self):\r\n return self._ip", "def __str__(self):\n return self.the_i...
[ "0.7496947", "0.703932", "0.7005589", "0.69365996", "0.69138277", "0.68434656", "0.6806781", "0.6788522", "0.6788522", "0.6707243", "0.6707243", "0.66324013", "0.66324013", "0.65678173", "0.6564476", "0.6556145", "0.65413713", "0.6541365", "0.6540901", "0.6540901", "0.6540901...
0.8236841
0
Test case for root_get
def test_root_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_root(self) -> object:", "def test_get_root_html1(self):\n pass", "def getRoot(obj):", "def test_get_root_html3(self):\n pass", "def test_root(self):\n rv = self.root()\n self.assertEquals(rv.status_code, 200)\n self.assertIn('Welcome to Word Play', rv.get_data(as_...
[ "0.7236514", "0.68726784", "0.67435837", "0.67068154", "0.6692084", "0.66914946", "0.6636584", "0.6590458", "0.65752065", "0.6451421", "0.6438269", "0.6397928", "0.6387331", "0.6379321", "0.62763053", "0.62191945", "0.6200195", "0.61965424", "0.618055", "0.6142378", "0.613747...
0.91675997
1
Test case for scenes_get
def test_scenes_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_scenes_scene_id_get(self):\n pass", "def scenes(**kwargs):\n return get('/scenes', **kwargs)", "def getScene():\n #print \"servers direct scenes are \",soya.IDLER.scenes[:]\n \n return soya.IDLER.scenes[0]", "def test_get_game_content(self):\n pass", "def test_plays_get(s...
[ "0.81103206", "0.69314545", "0.68408906", "0.6338247", "0.6261292", "0.61465126", "0.6088704", "0.6044028", "0.59937966", "0.59587514", "0.5953596", "0.59451574", "0.5943973", "0.58542013", "0.58508736", "0.5844131", "0.5839615", "0.5782823", "0.5773369", "0.57673377", "0.576...
0.8782144
0
Test case for scenes_scene_id_activate_post
def test_scenes_scene_id_activate_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scene_activated(self, scene_id):\n if self.hass is None:\n return\n\n self.hass.bus.fire(\n EVENT_SCENE_ACTIVATED,\n {\n ATTR_ENTITY_ID: self.entity_id,\n ATTR_NODE_ID: self.node.node_id,\n ATTR_SCENE_ID: scene_id,\n ...
[ "0.63475084", "0.6024765", "0.59442997", "0.58429325", "0.5815998", "0.56762594", "0.56193185", "0.5588597", "0.5583932", "0.55636597", "0.55587304", "0.55401456", "0.55316466", "0.5513848", "0.54964775", "0.5438876", "0.5335564", "0.52623343", "0.5246572", "0.52464396", "0.5...
0.91841435
0
Test case for scenes_scene_id_get
def test_scenes_scene_id_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_scenes_get(self):\n pass", "def get_scene(self, id):\n if not isinstance(id, int):\n id = int(id)\n payload = self.get('data_request?id=scene&action=list&scene=%d&output_format=json' % id)\n return payload", "def test_racetracks_id_get(self):\n pass", "d...
[ "0.73028684", "0.6892685", "0.6704559", "0.6593178", "0.644193", "0.6420814", "0.63298213", "0.6138988", "0.6107773", "0.6057135", "0.59946454", "0.58758706", "0.5841985", "0.5797588", "0.57972497", "0.5773772", "0.5747525", "0.5717691", "0.5697504", "0.5696755", "0.5687805",...
0.9337296
0
Calculate information gain given a data set, column to split on, and target
def calc_information_gain(data, split_name, target_name): # Calculate the original entropy original_entropy = calc_entropy(data[target_name]) # Find the median of the column we're splitting column = data[split_name] median = column.median() # Make two subsets of the data, based on the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_information_gain(data, split_name, target_name):\r\n # Calculate the original entropy\r\n original_entropy = calc_entropy(data[target_name])\r\n \r\n # Find the median of the column we're splitting\r\n column = data[split_name]\r\n median = column.median()\r\n \r\n # Make two subse...
[ "0.70924956", "0.6515813", "0.6441753", "0.63655055", "0.6326586", "0.6291628", "0.60909885", "0.60886633", "0.60279304", "0.60110843", "0.59989804", "0.5876363", "0.57439005", "0.5711638", "0.5586981", "0.5543046", "0.55292976", "0.55008405", "0.5468721", "0.5462936", "0.546...
0.7154671
0
Increase the x axis by given (small) amount
def increase_x(self, state_amount): pos_amount = state_amount / self.space_subdivisions self.pos_x = (self.pos_x + pos_amount) % 1.0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_axis_x(self, new_axis_point):\r\n self.__x_axis = new_axis_point", "def set_x(self, new_x):\r\n self.x = new_x", "def set_x(self, x: float):\n self.x = x", "def xaxis(self,label,units):\n if units != \"\": label = label + \" (\" + units + \")\"\n self.subplot.set_xl...
[ "0.69238037", "0.6655569", "0.64960665", "0.6365482", "0.63411194", "0.6300832", "0.62850904", "0.62567544", "0.6249823", "0.6240627", "0.62281793", "0.6187409", "0.6184643", "0.61636907", "0.61391294", "0.60861695", "0.6085875", "0.60456353", "0.60337", "0.60330117", "0.6001...
0.7263529
0
typedef struct _UUID { unsigned long Data1; // 32Bit Unsigned Integer (little endian) unsigned short Data2; // 16Bit Unsigned Integer (little endian) unsigned short Data3; // 16Bit Unsigned Integer (little endian) unsigned char Data4 [8]; // 8Bit Uint8Array [8] (little endian) } PACKED PUUID;
def __init__(self, payload): self.raw_uuid = unpack('<LHH8B', payload) self.formatted_uuid = "%08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x" % ( self.raw_uuid[0], self.raw_uuid[1], self.raw_uuid[2], self.raw_uuid[3], self.raw_uuid[4], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unpack_uuid(data):\n return data[:16], 16", "def pack(self):\n\n #define UID_SIZE 6\n\t#typedef struct {\n # uint8_t userId[UID_SIZE];\n # uint16_t sessionCtr;\t\t# NOTE: this is use_ctr\n # uint24_t timestamp;\n # uint8_t sessionUse;\t\t# NOTE: this is session_c...
[ "0.7007948", "0.5999785", "0.5787913", "0.5748168", "0.5637039", "0.55509454", "0.5477711", "0.543272", "0.5430686", "0.542466", "0.53803235", "0.5351449", "0.53471404", "0.5330633", "0.53229356", "0.5303777", "0.52976704", "0.52869457", "0.5278001", "0.5265241", "0.5262359",...
0.6269947
1
Helper function to freeze weights of the base model Args
def _freeze_base_model(self, modality, freeze_mode): if freeze_mode == "all": print("Freezing the Base model.") for param in getattr(self, "Base_{}".format(modality)).parameters(): param.requires_grad = False elif freeze_mode == "partialbn" and self.base_model_na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def freeze_model(self):\n # BN layers need to be freezed explicitly since they cannot be freezed via '.requires_grad=False'\n for module in self.modules():\n if isinstance(module, (nn.BatchNorm2d, nn.GroupNorm)):\n module.eval()\n \n # freeze all parameters\n ...
[ "0.71988785", "0.67592853", "0.6753739", "0.6696791", "0.66212523", "0.6581039", "0.6574347", "0.65439975", "0.63393384", "0.6324345", "0.63032305", "0.6297751", "0.62899", "0.6275054", "0.6209337", "0.62070376", "0.6198616", "0.61924076", "0.61850953", "0.618357", "0.6178196...
0.74430555
0
calculation dynamic window based on current state x
def calc_dynamic_window(x): # Dynamic window from robot specification Vs = [Config.min_speed, Config.max_speed, -Config.max_yaw_rate, Config.max_yaw_rate] # Dynamic window from motion model Vd = [x[3] - Config.max_accel * Config.dt, x[3] + Config.max_accel * Config.dt, x[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def window(windowX, windowY, occurrency):\n\tdef window0(dx, dy, dz):\n\n\t\tresizeXY(windowX,windowY,occurrency, dx, dz)\n\n\t\tmodel = []\n\t\tfor xIndex in range(len(windowX)):\n\t\t\tyQuotes = []\n\t\t\txSum = sum(windowX[:xIndex])\n\t\t\tfor yIndex in range(len(windowY)):\n\t\t\t\tif(occurrency[xIndex][yIndex...
[ "0.63669324", "0.62459564", "0.62014186", "0.6117535", "0.6057547", "0.60043156", "0.5924197", "0.583172", "0.58167094", "0.5773689", "0.56931704", "0.56590337", "0.56212485", "0.5574399", "0.557364", "0.5526888", "0.552024", "0.5509571", "0.5491859", "0.54850256", "0.5479201...
0.6465836
0
predict trajectory with the same input during predction time
def predict_trajectory(x_init, v, yaw_dot): x = np.array(x_init) trajectory = [x] time = 0 while time <= Config.predict_time: x = motion(x, [v, yaw_dot], Config.dt) trajectory.append(x) time += Config.dt return np.array(trajectory)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def predict(self, dt=1):\n self.kf.predict()\n if self.time_since_update > 0: # there was missed detections\n self.continuing_hits = 0\n self.time_since_update += 1\n return self.kf.x[:self.dim_z].squeeze()", "def predict():\n import trace\n trace.predict()", "def ...
[ "0.6869812", "0.68659353", "0.68521804", "0.679221", "0.6783903", "0.671453", "0.6701794", "0.6693573", "0.6693573", "0.6681448", "0.6676317", "0.662764", "0.66116774", "0.66037667", "0.66037667", "0.66037667", "0.65773726", "0.65773726", "0.65773726", "0.6565415", "0.6546653...
0.6960092
0
calc to goal cost with angle difference
def calc_to_goal_cost(trajectory, goal): ind = -1 dx = goal[0] - trajectory[ind, 0] dy = goal[1] - trajectory[ind, 1] error_angle = math.atan2(dy, dx) cost_angle = error_angle - trajectory[ind, 2] cost = abs(math.atan2(math.sin(cost_angle), math.cos(cost_angle))) return cost
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def h(self,pos_0,pos_1,n):\r\n \r\n cost=((pos_0-self.goal[0])**2+(pos_1-self.goal[1])**2)**(1/2) #+ ( (n - floor(atan2((self.goal[1] - self.start[1]), (self.goal[0] - self.start[0])))) / 30)\r\n \r\n return cost", "def _angle_of_attack(self, rel_wind, blade_chord):\n ...
[ "0.72361547", "0.6536483", "0.64864576", "0.64290494", "0.64238423", "0.6337866", "0.6337375", "0.63369316", "0.6322777", "0.6317604", "0.6304999", "0.6302159", "0.6294626", "0.62757635", "0.62519634", "0.6218893", "0.62160814", "0.61859214", "0.6181446", "0.6163898", "0.6162...
0.7528086
0
Returns the alignment of the text displayed in the modal dialog. The default is { SwingConstantsCENTER}. For status updates where the initial portion of the text does not change, { SwingConstantsLEADING} is recommended. To change the default value, simply override this method and return one of { SwingConstants} CENTER,...
def getStatusTextAlignment(self) -> int: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def text_align_mode(self):\n return self._text_align_mode", "def GetAlignment(self):\r\n\r\n return self.alignment", "def vertical_alignment(self):\n self.update()\n return self._vertical_alignment", "def align(self):\n return self[\"align\"]", "def align(self):\n ...
[ "0.61355335", "0.5937268", "0.5932479", "0.588772", "0.588772", "0.588772", "0.58773184", "0.58539104", "0.5798816", "0.55889934", "0.54580736", "0.5307451", "0.52739394", "0.52739394", "0.5236385", "0.5169333", "0.5167099", "0.5167099", "0.5167099", "0.5167099", "0.51101357"...
0.6940686
1
Get the title associated with the task String title shown in the dialog
def getTaskTitle(self) -> unicode: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_title(self):\n return self.run_command('get_title')[0]", "def get_fedcm_dialog_title(self):\n pass", "def title(self):\n return self.run_command('title')[0]", "def title(self):\n return win32gui.GetWindowText(self.hwnd)", "def title(self):\n return self.get(self._names[\"...
[ "0.7223436", "0.71462864", "0.70932907", "0.70818305", "0.7077054", "0.7077054", "0.6941914", "0.6898052", "0.68854356", "0.6875041", "0.6865029", "0.6865029", "0.6865029", "0.6852153", "0.68437827", "0.6838227", "0.6836106", "0.6836106", "0.6836106", "0.6836106", "0.6836106"...
0.8039313
1
Every n steps, recalculate deltas in the sumtree
def heap_update(self): print 'SumTree pre-update:', self.replay.tree[0].sum last_ixs = self.replay.last_ixs(True) while True: if len(last_ixs) == 0: break if len(last_ixs) < 10000: ixs = last_ixs last_ixs = [] el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_tree(root, executed_acts, total_rew):\n root.value = max(total_rew, root.value)\n root.visits += 1\n new_nodes = 0\n\n node = root\n for step, act in enumerate(executed_acts):\n if act not in node.children:\n node.children[act] = Node()\n new_nodes += 1\n ...
[ "0.5997195", "0.5933146", "0.5644054", "0.5639185", "0.5587976", "0.55448055", "0.5474487", "0.535356", "0.5310786", "0.53078264", "0.53038704", "0.5301367", "0.52970815", "0.52935046", "0.52826476", "0.5275964", "0.5273755", "0.5258038", "0.5244969", "0.52339673", "0.5226505...
0.6142654
0
Use glob strings to populate the filename arrays
def populate(self, dr=None): if dr is not None: self.directory = dr for k in OM.glob_strings: string =self.directory+"/"+OM.glob_strings[k] print("OM::populate -- Checking ",k," (",string,")", end="") fnames = glob.glob(string) print("... found",l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_files(file_name, ran, file_extension):\r\n \"\"\"Specifiy the exact file name and the number of files --> file_name_(range) e.g file_name=chickens ,ran=16\"\"\"\r\n answer_file_rep = [file_name + str(number) for number in range(1, ran)]\r\n answer_files = [file + \"{}\".format(file_extensio...
[ "0.6708004", "0.66248333", "0.6599604", "0.65667784", "0.64914995", "0.64086264", "0.64006215", "0.6400386", "0.63704574", "0.63550645", "0.63517845", "0.63273066", "0.6324143", "0.6314046", "0.62936217", "0.6292466", "0.6274865", "0.62584984", "0.62556833", "0.62468326", "0....
0.662741
1
return a list of all nonMcNugget numbers
def non_mcnugget(): nugget = [0, 6, 9, 20] mcnugget = set([6, 9, 20]) while True: mcnugget = set([m+n for m in mcnugget for n in nugget]) for m in mcnugget: found = all([m+j in mcnugget for j in range(6)]) if found: return [k for k in range(1, m) if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_not_in_icd_set(lenoforginalset, numbers_set):\r\n originalset = [str(i) for i in range(1, lenoforginalset+1, 1)]\r\n\r\n numbers_not_in_set = list(set(originalset)-set(numbers_set))\r\n numbers_not_in_set = sorted([int(num) for num in numbers_not_in_set])\r\n numbers_not_in_set = [str(num) for...
[ "0.64446", "0.6244337", "0.62271965", "0.6212061", "0.5948921", "0.59368867", "0.5931783", "0.5884198", "0.57521045", "0.5736464", "0.56413054", "0.56371206", "0.5621899", "0.5617521", "0.5614004", "0.5596087", "0.5584506", "0.55744284", "0.55680376", "0.55633056", "0.5561591...
0.7055849
0
Extracts a file from the input stream.
def __extract_file(cls, stream, path, size): block_size = 0x4000 with open(path, 'wb') as f: while size > 0: if block_size > size: block_size = size block = stream.read(block_size) if len(block) != block_size: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extract_file(path):", "def extract(file, fileFormat):\n\tspeech.speak(\"Extracting files in \" + file + \".\")\n\tpatoolib.extract_archive(file)", "def extract(input, verbose = 1):\n\n if type(input) == type('string'):\n fname = input\n try: input = open(fname)\n except IOError, (er...
[ "0.7351519", "0.6226322", "0.618267", "0.61609685", "0.6132039", "0.6005972", "0.5996443", "0.5996443", "0.59898514", "0.59578395", "0.59220254", "0.5895131", "0.5813181", "0.5752604", "0.57260215", "0.5685013", "0.56486064", "0.5634776", "0.56178594", "0.56011546", "0.559586...
0.65052027
1
Converts label sequence from BILOU to IOB format
def bilou_to_iob(labels: List[str]) -> List[str]: result = [] last = '' for label in labels: if label == 'O': result.append(label) last = label continue prefix, cls = label.split('-') new_prefix = prefix if prefix in ('L', 'I'): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iob_to_bio(labels: List[str]) -> List[str]:\n result = []\n last = ''\n for label in labels:\n if label.startswith('I-') and last not in (label, 'B-' + label[2:]):\n result.append('B-' + label[2:])\n else:\n result.append(label)\n last = label\n return res...
[ "0.73466444", "0.66529614", "0.6504615", "0.6399004", "0.63811535", "0.6330432", "0.6330432", "0.621312", "0.609933", "0.6062239", "0.585793", "0.5855681", "0.5805347", "0.5777711", "0.57603616", "0.5748905", "0.5723197", "0.56906414", "0.5681144", "0.5672361", "0.56146044", ...
0.74893415
0
Converts label sequence from IOB to BIO format
def iob_to_bio(labels: List[str]) -> List[str]: result = [] last = '' for label in labels: if label.startswith('I-') and last not in (label, 'B-' + label[2:]): result.append('B-' + label[2:]) else: result.append(label) last = label return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bio_to_bioes(labels):\n label_len = len(labels)\n labels_bioes = []\n for idx, label in enumerate(labels):\n next_label = labels[idx + 1] if idx < label_len - 1 else 'O'\n if label == 'O':\n labels_bioes.append('O')\n elif label.startswith('B-'):\n if next_la...
[ "0.69646704", "0.63667107", "0.63667107", "0.6303643", "0.6265978", "0.6262807", "0.6168818", "0.6166346", "0.608188", "0.60721046", "0.6020932", "0.5995093", "0.5871253", "0.58599377", "0.58364576", "0.5744363", "0.56388426", "0.56177014", "0.560196", "0.558821", "0.55739576...
0.7216875
0
ensures "My Work" box is checked, regardless of current state
def checkMyWorkBox(self): self.util.waitForElementToBePresent(self.element.my_work_checkbox) checkbox = self.util.driver.find_element_by_xpath(self.element.my_work_checkbox) if not checkbox.is_selected(): self.util.clickOn(self.element.my_work_checkbox)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_state(self):\n if (self.stock_checker.isChecked() or self.future_checker.isChecked()) and self.name.buddy.text():\n self.btn_ok.setEnabled(True)\n self.btn_ok.setDefault(True)\n else:\n self.btn_ok.setEnabled(False)", "def uncheckMyWorkBox(self):\n ...
[ "0.7065386", "0.6821148", "0.6643333", "0.64944065", "0.64944065", "0.64944065", "0.64399946", "0.6334524", "0.61874926", "0.6138576", "0.6119669", "0.6051003", "0.6039053", "0.60072863", "0.6003005", "0.5981361", "0.5930498", "0.5930498", "0.5930498", "0.59141135", "0.589307...
0.7931039
0
ensures "My Work" box is UNchecked, regardless of current state
def uncheckMyWorkBox(self): self.util.waitForElementToBePresent(self.element.my_work_checkbox) checkbox = self.util.driver.find_element_by_xpath(self.element.my_work_checkbox) if checkbox.is_selected(): self.util.clickOn(self.element.my_work_checkbox)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _onCheckBox(self, widget):\n widget.setStateCheck(not widget.getStateCheck())", "def checkMyWorkBox(self):\n self.util.waitForElementToBePresent(self.element.my_work_checkbox)\n checkbox = self.util.driver.find_element_by_xpath(self.element.my_work_checkbox)\n if not checkbox.is_s...
[ "0.7067471", "0.68273073", "0.6554604", "0.6392642", "0.63483685", "0.6238995", "0.6238012", "0.6198542", "0.619635", "0.61154264", "0.6089437", "0.60754544", "0.60077447", "0.5997986", "0.5941363", "0.5939678", "0.5939678", "0.5939678", "0.58629227", "0.5857054", "0.5853213"...
0.79475856
0
url() can handle list parameters, with unicode too
def test_list(): create_request("/") value = url('/', foo=['bar', u'\N{LATIN SMALL LETTER A WITH GRAVE}']), assert '/?foo=bar&foo=%C3%A0' in value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FormatUrl(params):\n input_list = []\n for item in sorted(params.iteritems(), key=lambda x: x[0]):\n input_list.append('%s=%s' % (item[0], UrlEscape(item[1])))\n return '&'.join(input_list)", "def _unicode_urlencode(params):\n if isinstance(params, dict):\n params = list(params.items(...
[ "0.65472764", "0.6362666", "0.6266913", "0.61413383", "0.6127703", "0.61059195", "0.6105513", "0.6105271", "0.6098263", "0.60697573", "0.5993145", "0.59697276", "0.5878318", "0.5874981", "0.5850073", "0.58344215", "0.5815388", "0.5795706", "0.5794673", "0.57939553", "0.578719...
0.65879536
0
It inserts the start button
def insert_start_button(note): txt_start_button = open(PATH_UTILS + 'run_selected_cells.py', 'r', encoding='utf-8').read() note['cells'] += [nb.v4.new_code_cell(txt_start_button)] note.cells[-1].metadata = {"init_cell": True}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, parent):\n super(StartButton, self).__init__(parent=parent)\n self.setText('START')\n self.setFocusPolicy(QtCore.Qt.NoFocus)\n self.setStyleSheet('padding:30px; background-color:#993333;')", "def startButtonPressed(self):\n self.showtime = time.time()\n\n ...
[ "0.7432226", "0.7204523", "0.7071737", "0.6892608", "0.6827293", "0.67915696", "0.67121446", "0.66862535", "0.6665243", "0.665573", "0.66113013", "0.65904313", "0.65258014", "0.6476981", "0.64742494", "0.64672333", "0.6455872", "0.6455872", "0.6445157", "0.6430127", "0.640085...
0.7445488
0
It inserts the HTML script to hide the input of code cells
def insert_hide_code(note): txt = open(PATH_UTILS + 'hide_code.py', 'r', encoding='utf-8').read() note['cells'] += [nb.v4.new_code_cell(txt)] note.cells[-1].metadata = {"editable": False, "deletable": False, "tags": ['run_start']} return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hide_code(hidden=True):\n html(\"\"\"\\\n <script>\n code_show=%s;\n function code_toggle() {\n if (code_show){\n $('div.input').hide();\n } else {\n $('div.input').show();\n }\n ...
[ "0.7606513", "0.61921626", "0.6104554", "0.5776925", "0.57426924", "0.55152065", "0.55124116", "0.55013716", "0.5450207", "0.54150563", "0.52774173", "0.52489215", "0.52297086", "0.52290076", "0.5228187", "0.5192827", "0.5175627", "0.51495206", "0.5130291", "0.50331473", "0.5...
0.7162146
1
It reads a yaml file and save its content in a dictionary
def read_exercise_yaml(path_yaml): exer_dict = {} with open(path_yaml, 'r') as stream: try: exer_dict = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) return exer_dict
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_yaml_file(filepath: str) -> Dict:\n return yaml.safe_load(read_file(filepath))", "def load():\n with open(SAVE_FILE_NAME, 'r') as save_file:\n dikt = yaml.safe_load(save_file)\n if dikt is None:\n dikt = {}\n return dikt", "def load_yaml(path: str) -> Dict[str, An...
[ "0.73253566", "0.73003614", "0.72664326", "0.72557545", "0.72312653", "0.7183163", "0.7165842", "0.71449727", "0.7132905", "0.70694476", "0.7043127", "0.69310355", "0.69127893", "0.6912488", "0.6812008", "0.6783101", "0.6696629", "0.66688174", "0.6641983", "0.6628247", "0.662...
0.7554577
0
It inserts the header and the exercise title
def insert_heading(note, exer_title): txt = open(PATH_UTILS + 'heading.md', 'r', encoding='utf-8').read() content_title = txt.replace('?title?', exer_title) note['cells'] += [nb.v4.new_markdown_cell(content_title)] note.cells[-1].metadata = {"init_cell": True, "editable": False, "deletable": False, "tag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_header():\n print('------------------------------------')\n print(' Lesson04')\n print(' Kata Fourteen Assignment')\n print('------------------------------------\\n')", "def section_header(text):\n\n print \"---- %s ----\" % text", "def visit_title(self, node):\n\n ...
[ "0.7138238", "0.6567827", "0.6405807", "0.63849694", "0.63643414", "0.628697", "0.62025195", "0.6119311", "0.60810155", "0.6039649", "0.6012451", "0.59923023", "0.5972391", "0.5969329", "0.5952039", "0.5944243", "0.5943545", "0.5929732", "0.5922061", "0.5901488", "0.58987325"...
0.7014145
1
It adds the description1 to the notebook
def insert_description1(note, exer_descr1, exam_date, path_ex_folder): download_button_lib = open(PATH_UTILS + 'download_button.py', 'r', encoding='utf-8').read() img_check = False if look_for_img(exer_descr1) == 1: exer_descr1 = exer_descr1.replace("img_" + exam_date, "img") pattern = re.c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert_description2(note, exer_descr2):\n note['cells'] += [nb.v4.new_markdown_cell(exer_descr2)]\n note.cells[-1].metadata = {\"init_cell\": True, \"editable\": False, \"deletable\": False}\n return", "def add_description(self, desc):\n self.description = desc", "def description():", "de...
[ "0.7517143", "0.7057159", "0.68686324", "0.68538874", "0.6721407", "0.6680417", "0.66046345", "0.6542309", "0.6529604", "0.6507733", "0.6478275", "0.6394861", "0.6387115", "0.6368809", "0.6368809", "0.6368809", "0.6368809", "0.6345686", "0.6329632", "0.63208646", "0.63190407"...
0.7240526
1
It adds the description2 to the notebook
def insert_description2(note, exer_descr2): note['cells'] += [nb.v4.new_markdown_cell(exer_descr2)] note.cells[-1].metadata = {"init_cell": True, "editable": False, "deletable": False} return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_description(self, desc):\n self.description = desc", "def description(self, newDescription=None):\n pass", "def insert_description1(note, exer_descr1, exam_date, path_ex_folder):\n download_button_lib = open(PATH_UTILS + 'download_button.py', 'r', encoding='utf-8').read()\n img_chec...
[ "0.72211033", "0.6983322", "0.6953328", "0.6941441", "0.68417627", "0.6732445", "0.6707307", "0.6669868", "0.6668248", "0.6598378", "0.6580307", "0.656601", "0.6520903", "0.6509578", "0.6475231", "0.6475231", "0.6475231", "0.6475231", "0.64190966", "0.6414284", "0.6410718", ...
0.8006623
0
It inserts the user bar as a code cell
def insert_user_bar_cell(note): user_bar_call = open(PATH_UTILS + 'user_bar_call.md').read() note['cells'] += [nb.v4.new_code_cell(user_bar_call)] note.cells[-1].metadata = {"init_cell": True, "editable": False, "deletable": False, "tags": ['run_start']} return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_code_cell(code='', where='below'):\n encoded_code = base64.b64encode(code.encode()).decode()\n display(IPython.display.Javascript(\"\"\"\n var code = IPython.notebook.insert_cell_{0}('code');\n code.set_text(atob(\"{1}\"));\n \"\"\".format(where, encoded_code)))", "def insert_us...
[ "0.6461481", "0.6407513", "0.60885465", "0.5847765", "0.5663463", "0.54923844", "0.5481361", "0.54548115", "0.54443955", "0.5432855", "0.5397862", "0.5373618", "0.5369922", "0.53125495", "0.53008217", "0.5296444", "0.5267681", "0.5267218", "0.52660066", "0.525048", "0.5212337...
0.75321937
0