query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Sets the conduit_committee_name of this ScheduleH4.
def conduit_committee_name(self, conduit_committee_name): self._conduit_committee_name = conduit_committee_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def committee_name(self, committee_name):\n\n self._committee_name = committee_name", "def conduit_committee_id(self, conduit_committee_id):\n\n self._conduit_committee_id = conduit_committee_id", "def filer_committee_name(self, filer_committee_name):\n\n self._filer_committee_name = filer...
[ "0.77482176", "0.7141524", "0.7136189", "0.63460493", "0.61785597", "0.61785597", "0.61785597", "0.6031465", "0.59681857", "0.5967726", "0.5699891", "0.56887984", "0.5580852", "0.54702", "0.5454579", "0.52425987", "0.51757437", "0.5139292", "0.51063955", "0.50215757", "0.4993...
0.86799264
0
Sets the conduit_committee_state of this ScheduleH4.
def conduit_committee_state(self, conduit_committee_state): self._conduit_committee_state = conduit_committee_state
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conduit_committee_id(self, conduit_committee_id):\n\n self._conduit_committee_id = conduit_committee_id", "def conduit_committee_city(self, conduit_committee_city):\n\n self._conduit_committee_city = conduit_committee_city", "def conduit_committee_name(self, conduit_committee_name):\n\n ...
[ "0.7156371", "0.68858725", "0.6772937", "0.63529396", "0.60473347", "0.60473347", "0.60473347", "0.6045688", "0.58877355", "0.55363166", "0.55143744", "0.5462163", "0.5223086", "0.5087054", "0.50544846", "0.50430536", "0.5034526", "0.501296", "0.5004156", "0.5001992", "0.4999...
0.8586378
0
Sets the direct_candidate_support_activity_indicator of this ScheduleH4.
def direct_candidate_support_activity_indicator(self, direct_candidate_support_activity_indicator): self._direct_candidate_support_activity_indicator = direct_candidate_support_activity_indicator
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fundraising_activity_indicator(self, fundraising_activity_indicator):\n\n self._fundraising_activity_indicator = fundraising_activity_indicator", "def administrative_voter_drive_activity_indicator(self, administrative_voter_drive_activity_indicator):\n\n self._administrative_voter_drive_activit...
[ "0.53970444", "0.4921528", "0.4673871", "0.4625631", "0.46162537", "0.4601503", "0.44262964", "0.4349391", "0.4349391", "0.41860858", "0.41860366", "0.41784045", "0.4177939", "0.41052574", "0.40899307", "0.40881228", "0.4085439", "0.40844572", "0.40773526", "0.40740776", "0.4...
0.86985934
0
Sets the disbursement_amount of this ScheduleH4.
def disbursement_amount(self, disbursement_amount): self._disbursement_amount = disbursement_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disbursement_type(self, disbursement_type):\n\n self._disbursement_type = disbursement_type", "def discharge(self, discharge):\n\n self._discharge = discharge", "def decommission_date(self, decommission_date):\n\n self._decommission_date = decommission_date", "def discharge_average(s...
[ "0.6694625", "0.6485071", "0.63406897", "0.54306424", "0.5417668", "0.53472793", "0.53472793", "0.53472793", "0.52432656", "0.50361097", "0.50040555", "0.4983379", "0.4971328", "0.49674204", "0.4955599", "0.49269584", "0.49234164", "0.4903902", "0.4900116", "0.48599207", "0.4...
0.84438515
0
Sets the disbursement_type of this ScheduleH4.
def disbursement_type(self, disbursement_type): self._disbursement_type = disbursement_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disbursement_type_full(self, disbursement_type_full):\n\n self._disbursement_type_full = disbursement_type_full", "def disbursement_amount(self, disbursement_amount):\n\n self._disbursement_amount = disbursement_amount", "def set_add_dispute_dispute_type(self, dispute_type):\n self.sin...
[ "0.6508999", "0.62576604", "0.5969846", "0.5683785", "0.5683785", "0.5388614", "0.53767896", "0.52616864", "0.5248832", "0.52066183", "0.5180994", "0.50266206", "0.4946491", "0.4860413", "0.48476627", "0.4841776", "0.4789637", "0.47692448", "0.47646564", "0.47541112", "0.4746...
0.86441326
0
Sets the disbursement_type_full of this ScheduleH4.
def disbursement_type_full(self, disbursement_type_full): self._disbursement_type_full = disbursement_type_full
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disbursement_type(self, disbursement_type):\n\n self._disbursement_type = disbursement_type", "def schedule_type_full(self, schedule_type_full):\n\n self._schedule_type_full = schedule_type_full", "def report_type_full(self, report_type_full):\n\n self._report_type_full = report_type_f...
[ "0.70126575", "0.67698973", "0.5783323", "0.52821314", "0.5236421", "0.500775", "0.48232296", "0.4790313", "0.45048228", "0.45008752", "0.44764844", "0.43844232", "0.43814078", "0.4376955", "0.43642122", "0.4331589", "0.43060312", "0.42939708", "0.42939708", "0.42856246", "0....
0.8890745
0
Sets the entity_type of this ScheduleH4.
def entity_type(self, entity_type): self._entity_type = entity_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def entity_type(self, entity_type: str):\n\n self._entity_type = entity_type", "def entity_type(self, entity_type):\n self._entity_type = entity_type", "def entity_type_desc(self, entity_type_desc):\n\n self._entity_type_desc = entity_type_desc", "async def set_async(self, type_name, ent...
[ "0.80743533", "0.79995155", "0.6393473", "0.6260215", "0.6155374", "0.6155374", "0.6033165", "0.5960835", "0.590003", "0.5867562", "0.5867562", "0.5857917", "0.58184916", "0.57780516", "0.56655025", "0.5624213", "0.5622742", "0.55970466", "0.55545324", "0.55436593", "0.553781...
0.80337536
1
Sets the entity_type_desc of this ScheduleH4.
def entity_type_desc(self, entity_type_desc): self._entity_type_desc = entity_type_desc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def entity_type(self, entity_type: str):\n\n self._entity_type = entity_type", "def entity_type(self, entity_type):\n\n self._entity_type = entity_type", "def entity_type(self, entity_type):\n self._entity_type = entity_type", "def descricao_tipo_endereco(self, descricao_tipo_endereco):\...
[ "0.690705", "0.6726478", "0.6701359", "0.61601025", "0.5686869", "0.55825686", "0.541486", "0.5375184", "0.53386724", "0.53386724", "0.5294436", "0.5283382", "0.528295", "0.52197075", "0.5218361", "0.5218361", "0.5210642", "0.51946115", "0.51946115", "0.51767486", "0.5163399"...
0.859362
0
Sets the event_purpose_category_type of this ScheduleH4.
def event_purpose_category_type(self, event_purpose_category_type): self._event_purpose_category_type = event_purpose_category_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def event_purpose_category_type_full(self, event_purpose_category_type_full):\n\n self._event_purpose_category_type_full = event_purpose_category_type_full", "def event_purpose_name(self, event_purpose_name):\n\n self._event_purpose_name = event_purpose_name", "def event_purpose_description(self,...
[ "0.70437974", "0.6079526", "0.6063525", "0.60193014", "0.5695404", "0.5669505", "0.56140196", "0.5593443", "0.5540903", "0.5517989", "0.54252404", "0.5366691", "0.5366691", "0.5280768", "0.5199562", "0.51960534", "0.5144348", "0.51372355", "0.51274747", "0.51158786", "0.51134...
0.89458203
0
Sets the event_purpose_category_type_full of this ScheduleH4.
def event_purpose_category_type_full(self, event_purpose_category_type_full): self._event_purpose_category_type_full = event_purpose_category_type_full
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def event_purpose_category_type(self, event_purpose_category_type):\n\n self._event_purpose_category_type = event_purpose_category_type", "def schedule_type_full(self, schedule_type_full):\n\n self._schedule_type_full = schedule_type_full", "def category_code_full(self, category_code_full):\n\n ...
[ "0.79017866", "0.58224773", "0.5698206", "0.56570387", "0.5641722", "0.55137336", "0.53330326", "0.5280659", "0.5175853", "0.48065042", "0.4625165", "0.4624614", "0.45800406", "0.4533693", "0.45330572", "0.44772592", "0.44168895", "0.44038478", "0.44015345", "0.44015345", "0....
0.8856136
0
Sets the event_purpose_name of this ScheduleH4.
def event_purpose_name(self, event_purpose_name): self._event_purpose_name = event_purpose_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def event_purpose_description(self, event_purpose_description):\n\n self._event_purpose_description = event_purpose_description", "def event_purpose_date(self, event_purpose_date):\n\n self._event_purpose_date = event_purpose_date", "def event_name(self, event_name):\n self['event_name'] =...
[ "0.69751066", "0.68308455", "0.6519658", "0.64717394", "0.6449144", "0.635606", "0.6114011", "0.6114011", "0.5822369", "0.58208203", "0.57642555", "0.57174087", "0.5683334", "0.5619885", "0.54921377", "0.5480626", "0.5375278", "0.51986986", "0.5177055", "0.5170452", "0.516422...
0.8847332
0
Sets the exempt_activity_indicator of this ScheduleH4.
def exempt_activity_indicator(self, exempt_activity_indicator): self._exempt_activity_indicator = exempt_activity_indicator
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def amendment_indicator(self, amendment_indicator):\n\n self._amendment_indicator = amendment_indicator", "def set_inactive(self):\n self.active = False", "def administrative_voter_drive_activity_indicator(self, administrative_voter_drive_activity_indicator):\n\n self._administrative_voter...
[ "0.5271137", "0.50777537", "0.49430394", "0.47934103", "0.47384223", "0.47323325", "0.47289428", "0.47267002", "0.46640995", "0.4619556", "0.458192", "0.4520891", "0.44623137", "0.44511178", "0.44391552", "0.4428266", "0.44180897", "0.4412017", "0.437296", "0.4329601", "0.432...
0.8067446
0
Sets the filer_committee_name of this ScheduleH4.
def filer_committee_name(self, filer_committee_name): self._filer_committee_name = filer_committee_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def committee_name(self, committee_name):\n\n self._committee_name = committee_name", "def conduit_committee_name(self, conduit_committee_name):\n\n self._conduit_committee_name = conduit_committee_name", "def team_name(self, team_name):\n\n self._team_name = team_name", "def treasurer_n...
[ "0.7299823", "0.7107418", "0.56729794", "0.56381255", "0.5568009", "0.5568009", "0.5568009", "0.5558933", "0.54853", "0.5476719", "0.53943807", "0.53354186", "0.53298557", "0.53278315", "0.52383345", "0.5234101", "0.5234101", "0.5217771", "0.5194962", "0.5184873", "0.5180884"...
0.86866987
0
Sets the fundraising_activity_indicator of this ScheduleH4.
def fundraising_activity_indicator(self, fundraising_activity_indicator): self._fundraising_activity_indicator = fundraising_activity_indicator
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def amendment_indicator(self, amendment_indicator):\n\n self._amendment_indicator = amendment_indicator", "def direct_candidate_support_activity_indicator(self, direct_candidate_support_activity_indicator):\n\n self._direct_candidate_support_activity_indicator = direct_candidate_support_activity_in...
[ "0.5357158", "0.52375144", "0.50455433", "0.4849235", "0.46624404", "0.46029878", "0.45876354", "0.45129263", "0.44739544", "0.44496655", "0.4403652", "0.43511182", "0.43348247", "0.43312594", "0.43226117", "0.43226117", "0.427218", "0.4269127", "0.42600682", "0.42499956", "0...
0.8282337
0
Sets the memo_code of this ScheduleH4.
def memo_code(self, memo_code): self._memo_code = memo_code
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def memo_code_description(self, memo_code_description):\n\n self._memo_code_description = memo_code_description", "def code(self, code):\n if self.__code_is_set:\n raise MemoryPermissionsError(\"The code section can only be initialized and not written\")\n\n self.__code_is_set = T...
[ "0.73074394", "0.5781624", "0.575327", "0.5738319", "0.5710112", "0.5632186", "0.5569398", "0.5444355", "0.542544", "0.5402212", "0.52453303", "0.5218158", "0.5218158", "0.51972955", "0.5166588", "0.5161621", "0.515877", "0.515877", "0.5119036", "0.5070056", "0.5044283", "0...
0.8234389
0
Sets the memo_code_description of this ScheduleH4.
def memo_code_description(self, memo_code_description): self._memo_code_description = memo_code_description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def memo_code(self, memo_code):\n\n self._memo_code = memo_code", "def set_description(self, data):\n self._description = self._uni(data)", "def set_description(self, desc: str) -> None:\n self.metadata.data[\"description\"] = desc", "def set_description(self, room_description):\n ...
[ "0.7294136", "0.62507194", "0.606508", "0.6019985", "0.59329134", "0.59261626", "0.5894316", "0.5882073", "0.5862476", "0.585939", "0.58412933", "0.5691836", "0.56801933", "0.56801933", "0.56801933", "0.56801933", "0.56801933", "0.56801933", "0.56801933", "0.56801933", "0.568...
0.86766505
0
Sets the memo_text of this ScheduleH4.
def memo_text(self, memo_text): self._memo_text = memo_text
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_text(self, text):\n self.clear()\n r = self.add_run()\n r.text = _to_unicode(text)", "def set_text(self):\n pass", "def set_text(self, texto):\n self.entry.set_text(texto)", "def set_text(self, text):\n\n self.text = text", "def setText(self, text=\"\"):\n...
[ "0.61259747", "0.6091394", "0.60853094", "0.6041027", "0.60365677", "0.5991039", "0.591978", "0.5906793", "0.58951813", "0.5814749", "0.5814749", "0.5814749", "0.5814749", "0.5814749", "0.5814749", "0.57955426", "0.5793698", "0.57769525", "0.5776704", "0.5715959", "0.5686173"...
0.80681956
0
Sets the original_sub_id of this ScheduleH4.
def original_sub_id(self, original_sub_id): self._original_sub_id = original_sub_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sub_id(self, sub_id):\n\n self._sub_id = sub_id", "def sub_id(self, sub_id):\n\n self._sub_id = sub_id", "def set_subgroup(self, subgroup):\n self.schedule['subgroup'] = subgroup", "def sub_device_id(self, sub_device_id):\n\n self._sub_device_id = sub_device_id", "def set(se...
[ "0.6794899", "0.6794899", "0.5769394", "0.5706719", "0.565435", "0.54378855", "0.53391635", "0.530853", "0.5303545", "0.5286363", "0.5285439", "0.5243204", "0.5214798", "0.52001375", "0.52001375", "0.52001375", "0.51968265", "0.5192732", "0.51415795", "0.5122911", "0.5082619"...
0.85463935
0
Sets the payee_first_name of this ScheduleH4.
def payee_first_name(self, payee_first_name): self._payee_first_name = payee_first_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_first_name(self, first_name):\n self.first_name = first_name", "def first_name(self, name):\n self._first_name = name", "def first_name(self, first_name):\n\n self._first_name = first_name", "def first_name(self, first_name):\n\n self._first_name = first_name", "def firs...
[ "0.8139123", "0.7860997", "0.7855808", "0.7855808", "0.7855808", "0.7855808", "0.7855808", "0.7855808", "0.7855808", "0.7855808", "0.7855808", "0.75638556", "0.75638556", "0.7274108", "0.7241184", "0.7228904", "0.7034764", "0.6867692", "0.6746506", "0.6746506", "0.6687502", ...
0.88109654
0
Sets the payee_last_name of this ScheduleH4.
def payee_last_name(self, payee_last_name): self._payee_last_name = payee_last_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_last_name(self, last_name):\n self.last_name = last_name", "def last_name(self, last_name):\n\n self._last_name = last_name", "def last_name(self, last_name):\n\n self._last_name = last_name", "def last_name(self, last_name):\n\n self._last_name = last_name", "def last_n...
[ "0.8052822", "0.78435844", "0.78435844", "0.78435844", "0.78435844", "0.78435844", "0.78435844", "0.78435844", "0.78435844", "0.78435844", "0.78435844", "0.76688296", "0.75724715", "0.7570741", "0.72736883", "0.709855", "0.709855", "0.707382", "0.6888787", "0.6525726", "0.650...
0.8757493
0
Sets the payee_middle_name of this ScheduleH4.
def payee_middle_name(self, payee_middle_name): self._payee_middle_name = payee_middle_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def middle_name(self, middle_name):\n\n self._middle_name = middle_name", "def middle_name(self, middle_name):\n\n self._middle_name = middle_name", "def treasurer_middle_name(self, treasurer_middle_name):\n\n self._treasurer_middle_name = treasurer_middle_name", "def candidate_middle_na...
[ "0.7585551", "0.7585551", "0.7337469", "0.7087126", "0.6228888", "0.6080189", "0.6022654", "0.5965136", "0.58149284", "0.5727444", "0.55989444", "0.54812735", "0.5258861", "0.5245364", "0.5221316", "0.5217563", "0.5216218", "0.5139458", "0.5133731", "0.5095062", "0.50810254",...
0.86091405
0
Sets the payee_name of this ScheduleH4.
def payee_name(self, payee_name): self._payee_name = payee_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def payee_first_name(self, payee_first_name):\n\n self._payee_first_name = payee_first_name", "def payee_last_name(self, payee_last_name):\n\n self._payee_last_name = payee_last_name", "def payee_prefix(self, payee_prefix):\n\n self._payee_prefix = payee_prefix", "def type_payee_name(sel...
[ "0.64867944", "0.6390147", "0.6282291", "0.62474155", "0.6209484", "0.6160877", "0.6109466", "0.6109466", "0.610619", "0.6105535", "0.60959506", "0.6039826", "0.6039826", "0.6023433", "0.6023433", "0.5984883", "0.5984883", "0.5984386", "0.5984386", "0.5984386", "0.5984386", ...
0.8165018
0
Sets the payee_suffix of this ScheduleH4.
def payee_suffix(self, payee_suffix): self._payee_suffix = payee_suffix
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suffix(self, suffix):\n\n self._suffix = suffix", "def suffix(self, suffix):\n\n self._suffix = suffix", "def suffix(self, suffix):\n\n self._suffix = suffix", "def suffix(self, suffix):\n\n self._suffix = suffix", "def setSuffix(self, value):\n return self._set(suffi...
[ "0.7034943", "0.7034943", "0.7034943", "0.7034943", "0.6758897", "0.66525275", "0.641746", "0.6234195", "0.6199792", "0.5856726", "0.56503403", "0.55810905", "0.5536533", "0.54862946", "0.54862946", "0.5473938", "0.5472949", "0.5462233", "0.5462233", "0.5462233", "0.54372054"...
0.8545019
0
Sets the published_committee_reference_parity_check of this ScheduleH4.
def published_committee_reference_parity_check(self, published_committee_reference_parity_check): self._published_committee_reference_parity_check = published_committee_reference_parity_check
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def portpreserveparity(self, portpreserveparity) :\n\t\ttry :\n\t\t\tself._portpreserveparity = portpreserveparity\n\t\texcept Exception as e:\n\t\t\traise e", "def set_reference(self, reference):\n\t\tif ((reference == 0) or (reference == 1)):\n\t\t\tself._reference = reference\n\t\telse:\n\t\t\tsys.stderr.writ...
[ "0.47889638", "0.47024512", "0.45419285", "0.45131928", "0.44590962", "0.44356823", "0.4362536", "0.4362536", "0.4294875", "0.42637226", "0.4245323", "0.41793063", "0.41659793", "0.4113436", "0.40754282", "0.40720707", "0.40538433", "0.4048833", "0.40451497", "0.40319338", "0...
0.8764338
0
Sets the report_type of this ScheduleH4.
def report_type(self, report_type): self._report_type = report_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def report_type(self, report_type):\n if self.local_vars_configuration.client_side_validation and report_type is None: # noqa: E501\n raise ValueError(\"Invalid value for `report_type`, must not be `None`\") # noqa: E501\n\n self._report_type = report_type", "def schedule_type(self, sc...
[ "0.76731884", "0.6482862", "0.6482862", "0.62164646", "0.62164646", "0.59303284", "0.5860143", "0.5846038", "0.5780583", "0.5767597", "0.5765788", "0.57567644", "0.57512176", "0.57512176", "0.56984043", "0.56937325", "0.5663443", "0.55828303", "0.5575337", "0.55152506", "0.55...
0.82974154
2
Sets the schedule_type_full of this ScheduleH4.
def schedule_type_full(self, schedule_type_full): self._schedule_type_full = schedule_type_full
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def report_type_full(self, report_type_full):\n\n self._report_type_full = report_type_full", "def disbursement_type_full(self, disbursement_type_full):\n\n self._disbursement_type_full = disbursement_type_full", "def schedule_type(self, schedule_type):\n allowed_values = [\"one_off\"] # ...
[ "0.6477062", "0.6242939", "0.5908145", "0.56809217", "0.56809217", "0.5678212", "0.5244721", "0.49797583", "0.4918937", "0.46945277", "0.46789658", "0.4644155", "0.4625272", "0.46200266", "0.4573312", "0.45384058", "0.45359772", "0.4519641", "0.45167306", "0.44889185", "0.447...
0.8856441
0
Sets the sub_id of this ScheduleH4.
def sub_id(self, sub_id): self._sub_id = sub_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_subgroup(self, subgroup):\n self.schedule['subgroup'] = subgroup", "def sub_device_id(self, sub_device_id):\n\n self._sub_device_id = sub_device_id", "def sub_vendor_id(self, sub_vendor_id):\n\n self._sub_vendor_id = sub_vendor_id", "def original_sub_id(self, original_sub_id):\n\...
[ "0.7162782", "0.7039491", "0.66880023", "0.65190613", "0.6086576", "0.60505795", "0.5870315", "0.5810081", "0.5752432", "0.5752432", "0.5752432", "0.5689063", "0.5602119", "0.5585904", "0.5574889", "0.5537252", "0.5468483", "0.5444905", "0.5425382", "0.5376004", "0.5369573", ...
0.8298078
1
Sets the transaction_id of this ScheduleH4.
def transaction_id(self, transaction_id): self._transaction_id = transaction_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transaction_id(self, transaction_id):\n if transaction_id is None:\n raise ValueError(\"Invalid value for `transaction_id`, must not be `None`\") # noqa: E501\n\n self._transaction_id = transaction_id", "def set_merchant_transaction_id(self, transaction_id):\n self.merchant_t...
[ "0.74677116", "0.69050086", "0.6683296", "0.6612919", "0.61834", "0.58228606", "0.5802374", "0.57805324", "0.57735837", "0.5732281", "0.5604118", "0.5557261", "0.55010206", "0.54928696", "0.5480169", "0.53548723", "0.5351549", "0.53386515", "0.53244525", "0.53047097", "0.5293...
0.7934782
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, ScheduleH4): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, ScheduleH4): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.84568954", "0.83923674", "0.81447554", "0.81407183", "0.81326675", "0.80941343", "0.8092415", "0.8092415", "0.8092415", "0.8085536", "0.8085536", "0.8076502", "0.8076502", "0.8066026", "0.80427635", "0.80427635", "0.80427635", "0.80427635", "0.80427635", "0.80427635", "0.8...
0.0
-1
Returns pandas series by label
def __getitem__(self, col_name): return self.data[self.cols[col_name]]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def labels(self) -> pd.Series:\n return self.data.apply(to_label, axis=1)", "def fromLabel(name):\n return Data.labels.index(name)", "def get_by_label(self, label):\n # label = label.replace(\"-\", \"\") FLB: problem with - in variable\n # Check for name in all categories in self\n for c...
[ "0.6410875", "0.630018", "0.5782614", "0.574475", "0.5656771", "0.5625905", "0.56049025", "0.55670375", "0.5411498", "0.5397952", "0.53785235", "0.5364798", "0.53357077", "0.53343123", "0.53299665", "0.5294054", "0.5271805", "0.5261562", "0.52400243", "0.52400243", "0.5240024...
0.0
-1
Cosine decay schedule with warm up period.
def cosine_decay_with_warmup(global_step, learning_rate_base, total_steps, warmup_learning_rate=0.0, warmup_steps=0, hold_base_rate_steps=0): if total_steps < warmup_steps: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def schedule(epoch):\n return alpha / (1 + (decay_rate * epoch))", "def cosine_decay(base_lr, max_iteration, cur_step):\n return base_lr * (math.cos( (7*math.pi*cur_step) / (16*max_iteration) ))", "def get_cosine_schedule_with_warmup(optimizer, num_warmup_steps, num_training_steps, num_cycles=.5, las...
[ "0.6320161", "0.62945265", "0.6014468", "0.6014468", "0.5992535", "0.5947948", "0.594646", "0.59023297", "0.5854784", "0.58509827", "0.5842494", "0.582645", "0.5814702", "0.57450205", "0.5581755", "0.550415", "0.5404061", "0.5401594", "0.5377699", "0.53299034", "0.53131723", ...
0.5425403
16
Callable to compute the learning rate.
def eager_decay_rate(): learning_rate = 0.5 * learning_rate_base * (1 + tf.cos( np.pi * (tf.cast(global_step, tf.float32) - warmup_steps - hold_base_rate_steps ) / float(total_steps - warmup_steps - hold_base_rate_steps))) if hold_base_rate_steps > 0: learning_rate = tf.where( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def learning_rate(epoch):\n self.lr = self.lr / 1.00000001\n return self.lr", "def __call__(self, epoch):\n # Compute the new dynamic learning rate, log in onto TensorBoard and\n # return the result for the training process\n learning_rate = self.schedule(epoch)\n ...
[ "0.8017138", "0.8015899", "0.77871585", "0.7787025", "0.77286345", "0.7575419", "0.7575419", "0.73909295", "0.7386087", "0.7383489", "0.7357151", "0.7334362", "0.73055756", "0.7290091", "0.7195071", "0.70888054", "0.70372975", "0.69462717", "0.6942799", "0.6942799", "0.688722...
0.0
-1
Opens a new database connection if there is none yet for the current application context.
def get_db(): if not hasattr(g, 'sqlite_db'): g.sqlite_db = connect_db() return g.sqlite_db
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def db_open():\n if not hasattr(g, 'sqlite_db'):\n g.sqlite_db = db_connect()\n return g.sqlite_db", "def open_database(self):\n if self._conn is None:\n self._conn = sqlite3.connect(self._db_path)", "def open_db(db_name: str = DB_NAME) -> DBConnection:\n return sqlite3.connec...
[ "0.7737639", "0.7582971", "0.73180443", "0.71693045", "0.70220166", "0.6966687", "0.6954785", "0.69486743", "0.6897534", "0.6842663", "0.68292314", "0.68191963", "0.680592", "0.67950195", "0.67697805", "0.6762173", "0.6751266", "0.6746273", "0.67316663", "0.670031", "0.668866...
0.640242
76
Creates and saves a superuser with the given email and password.
def create_superuser(self, username, email, password): return self.create_user(username, email, password, is_staff = True, is_superuser= True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createsuperuser():\n\n email = prompt('User E-Mail')\n email_confirm = prompt('Confirm E-Mail')\n\n if not email == email_confirm:\n sys.exit('\\nCould not create user: E-Mail did not match')\n\n if not EMAIL_REGEX.match(email):\n sys.exit('\\nCould not create user: Invalid E-Mail add...
[ "0.83345544", "0.82813346", "0.8258201", "0.8249415", "0.8248188", "0.8223905", "0.82129776", "0.8210377", "0.8180428", "0.8175924", "0.8174477", "0.8159496", "0.81555283", "0.8152179", "0.8147241", "0.8146682", "0.81466043", "0.81466043", "0.81466043", "0.81454295", "0.81319...
0.77798975
92
Check to see if the given word is in the GTree. Useful to check whether secondary words created by a Move are valid.
def has_word(self, word)->bool: if len(word) == 1: chars = word + GNode.CHAR_EOW else: chars = word[0] + GNode.CHAR_REV + word[1:] + GNode.CHAR_EOW cursor = self.root for c in chars.lower(): if c not in cursor.children: return False ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_word(self, word):\n\n return self.graph.is_in(word)", "def checkWord(self, word):\n\t\treturn self.root.checkString(u' ' + word);", "def search(self, word: str) -> bool:\n curr = self.root\n for ch in word:\n curr = curr.children.get(ch)\n if...
[ "0.7920516", "0.74676573", "0.74598885", "0.74367374", "0.7415477", "0.73906636", "0.7369761", "0.7356023", "0.7338562", "0.7313003", "0.73071223", "0.72841096", "0.7276888", "0.7268402", "0.7254783", "0.7230803", "0.72286004", "0.71886283", "0.7172623", "0.7167454", "0.71566...
0.7887562
1
Returns if loan can be accessed with owner, in_charge and manager
def check_access(self, loan_id): is_owner = False is_agent = False is_manager = False if not self.this_user: return False loan_owner = self.get_loan_owner(loan_id) if ( ("farmer_id" in self.this_user.keys()) and loan_owner and (len(l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_permission(self, request, view):\n if settings.ENHANCED_ORG_ADMIN and request.user.admin:\n return True\n\n if not request.user.access:\n return False\n\n if request.method in permissions.SAFE_METHODS:\n rates_read = request.user.access.get(\"cost_model...
[ "0.66236806", "0.64210117", "0.6311027", "0.6307953", "0.62412035", "0.6153218", "0.6147563", "0.61213475", "0.6108038", "0.6104726", "0.60805255", "0.6060512", "0.6025922", "0.6024105", "0.6023593", "0.6009854", "0.6007719", "0.6007226", "0.6006344", "0.6006344", "0.6006344"...
0.75899476
0
Get the numbers of subscribers by subreddit given
def number_of_subscribers(subreddit): url_rsubs = "https://api.reddit.com/r/{}/about".format(subreddit) headers = {'User-Agent': 'Python3'} response = requests.get(url_rsubs, headers=headers, allow_redirects=False) if str(response) != "<Response [200]>": return 0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def number_of_subscribers(subreddit):\n header = {'User-Agent': 'Chrome/90.0.4430.212 Safari/537.36'}\n req = requests.get('https://www.reddit.com/r/{}/about.json'\n .format(subreddit), allow_redirects=False,\n headers=header)\n if req.status_code == 200:\n ...
[ "0.8490423", "0.84789795", "0.8472054", "0.84718156", "0.8430605", "0.8423917", "0.84174234", "0.84051615", "0.8377163", "0.8359802", "0.834576", "0.8345094", "0.83327657", "0.82934207", "0.8291314", "0.8259399", "0.8227686", "0.82248443", "0.811115", "0.8103725", "0.80300665...
0.80407387
20
Given a document (represented as a string), return a list of all of the words in that document, in order. Process document by coverting all words to lowercase, and removing any punctuation or English stopwords.
def tokenize(document): token = nltk.word_tokenize(document) output = [word.lower() for word in token if (word not in string.punctuation and word not in nltk.corpus.stopwords.words("english"))] return output
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tokenize(document):\n raw_words=[word.lower() for word in nltk.word_tokenize(document) if word.isalpha()]\n raw_words=[word.lower() for word in raw_words]\n final_words=[]\n for word in raw_words:\n if word not in string.punctuation and word not in nltk.corpus.stopwords.words(\"english\"):\n...
[ "0.7944706", "0.7897472", "0.7753601", "0.7734003", "0.7724046", "0.7665464", "0.7385881", "0.73396957", "0.7287463", "0.7226143", "0.7073865", "0.7041255", "0.70223826", "0.7018411", "0.7018411", "0.6992188", "0.6972868", "0.69672", "0.6963836", "0.6948829", "0.6944835", "...
0.79201806
1
Return minus operation result
def minus(self, a, b): return a - b
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subtract(self):\n return self._do_calc(self.subtracter)", "def subtract(self):\n return self._do_calc(self.subtracter)", "def subtract(self):\n return self._do_calc(self.subtracter)", "def subtractor(a,b): \n return a-b # i output a value by using the return statement", "def s...
[ "0.810548", "0.810548", "0.810548", "0.78136826", "0.7713255", "0.7713255", "0.7653602", "0.760963", "0.7589479", "0.7519421", "0.749767", "0.749767", "0.749767", "0.7474957", "0.74736327", "0.747167", "0.7448722", "0.74468887", "0.74079674", "0.73643583", "0.7363822", "0.7...
0.7889797
3
Return package version as listed in `__version__` in `init.py`.
def get_version(package): init_py = open(os.path.join(package, '__init__.py')).read() return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_version_from_package() -> str:\n path = join(dirname(__file__), \"__init__.py\")\n path = normpath(abspath(path))\n with open(path) as f:\n for line in f:\n if line.startswith(\"__version__\"):\n token, version = line.split(\" = \", 1)\n version = ve...
[ "0.84893894", "0.83908445", "0.83863354", "0.8380136", "0.8379423", "0.83694756", "0.83582735", "0.8357903", "0.835638", "0.8078477", "0.7975143", "0.7938866", "0.78928864", "0.78928864", "0.78928864", "0.78029025", "0.7722147", "0.7697877", "0.7694654", "0.7689602", "0.76594...
0.8370828
9
Split a list of values in to chunks of length n.
def _chunk(self, l, n): for i in range(0, len(l) + 1, n): yield l[i:i + n]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_into_chunks(x, n):\n csize = int(np.ceil(len(x) / n))\n out = list()\n \n i = 0\n while i * csize < len(x):\n out.append(x[(i * csize):(i * csize + csize)])\n i += 1\n\n return out", "def make_chunks(l, n):\n return [l[i:i+n] for i in range(0, len(l), n)]", "def chu...
[ "0.8387839", "0.8212129", "0.8143817", "0.8142659", "0.81366885", "0.81366885", "0.8112388", "0.8101674", "0.8099729", "0.8089274", "0.8087609", "0.8086768", "0.8081652", "0.8075022", "0.8073566", "0.8072232", "0.8072232", "0.8063776", "0.8063776", "0.8063776", "0.8063776", ...
0.0
-1
Get a mocked out StateStore.
def state_store(decoy: Decoy) -> StateStore: return decoy.mock(cls=StateStore)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _teststore():\n return Store(config['server_store'][0], config['server_store'][1],\n environ={'tiddlyweb.config': config})", "def get_store(store_name: str):\n return store_handler.get_store(store_name)", "def _get_store(self):\n return self._store", "def get_store(cls):\n ...
[ "0.66887575", "0.6294844", "0.62550336", "0.60824025", "0.58432704", "0.5791422", "0.57431036", "0.56512076", "0.5630741", "0.562875", "0.55750155", "0.5507959", "0.54545426", "0.54472023", "0.54128647", "0.5405051", "0.53504306", "0.533692", "0.53132176", "0.5307044", "0.530...
0.8507832
0
Get a mocked out CommandExecutor.
def command_executor(decoy: Decoy) -> CommandExecutor: return decoy.mock(cls=CommandExecutor)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_execute(self):\n with patch('command_executor.subprocess.Popen') as mock_subproc_popen:\n communicate_mock = Mock()\n attrs = {'communicate.return_value': (OUTPUT_RESULT,\n OK_MESSAGE),\n 'returncode': OK_RET...
[ "0.62798905", "0.5978929", "0.5622126", "0.54604053", "0.53436667", "0.5340127", "0.5312084", "0.52986234", "0.5275714", "0.5233759", "0.5217693", "0.520509", "0.51869804", "0.5186935", "0.5174801", "0.5154721", "0.51462096", "0.5125251", "0.5118645", "0.51016855", "0.5089516...
0.8555553
0
Get a QueueWorker instance.
def subject( state_store: StateStore, command_executor: CommandExecutor, ) -> QueueWorker: return QueueWorker(state_store=state_store, command_executor=command_executor)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_worker(self):\n worker = self.worker(job_id=self.job_id, spider=self.spider,\n http_session={'url': self.url, 'timeout': self.timeout},\n **self.kwargs)\n return worker", "def get_worker(self):\n return self.worker", "def getW...
[ "0.757261", "0.74305445", "0.69714624", "0.6947031", "0.68656486", "0.68036014", "0.6799237", "0.6774149", "0.6572462", "0.65341556", "0.65341556", "0.63784325", "0.63784325", "0.63784325", "0.63784325", "0.63784325", "0.63784325", "0.63784325", "0.63784325", "0.63784325", "0...
0.6354658
26
Change to pytestprovided temporary directory
def chdir(tmpdir): tmpdir.chdir()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_workdir():\n return tempfile.mkdtemp(dir=\"/tmp\", prefix=\"python-fleure-tests-\")", "def pytest_tempdir_basename():\n return \"saltfactories\"", "def make_temp_file():\n global TEST_DATA_PATH\n TEST_DATA_PATH = tempfile.mkstemp()", "def get_new_temp_dir(self):\n return self.use...
[ "0.7774853", "0.7424518", "0.73482054", "0.73420954", "0.7143102", "0.7104657", "0.70685387", "0.70386714", "0.7021875", "0.698674", "0.6978907", "0.6956433", "0.69469136", "0.6937268", "0.6922698", "0.68958", "0.68957144", "0.68957144", "0.68957096", "0.68845713", "0.6879186...
0.0
-1
Returns Bar Chart for overview persons
def BarOverview(data): return dcc.Graph(id="BarOverview", className="bar", figure=dict( data=[go.Bar( x=data["frequencies"], y=data["names"], orientation='h', marker={ 'color': '#ff4058' }, )], layout=dict( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BarSpecific():\n return dcc.Graph(id=\"PersChart\", className=\"bar\", figure=dict(\n data=[go.Bar(\n x=[1],\n y=[\"Persons\"],\n orientation='h',\n marker={\n 'color': '#ff4058',\n },\n )],\n layout=dict(\n ...
[ "0.6908702", "0.67368", "0.6569197", "0.6536271", "0.6143183", "0.61247706", "0.60930926", "0.6084446", "0.6065475", "0.6053874", "0.6000203", "0.59914804", "0.5970162", "0.59693563", "0.59630877", "0.59128714", "0.5903602", "0.5894206", "0.58846414", "0.5868265", "0.5866464"...
0.7162784
0
Get root of dataset directory
def _get_default_path(self): return os.path.join(cfg.DATA_DIR, 'vehicles_dataset_v{}'.format(self._version))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def root_dir():\r\n return Path(__file__).parent.parent", "def data_directory(self):\n\n return self.get_raw(\"data_directory\")", "def rootdir():\n return util.path(__file__).parent.parent.abspath()", "def root_dir():\n return dirname(dirname(__file__))", "def get_root():\n\n return 'da...
[ "0.7602105", "0.75925225", "0.7543893", "0.7490736", "0.7483152", "0.74829733", "0.7426339", "0.7426339", "0.74064034", "0.74048996", "0.7400454", "0.7400266", "0.7395905", "0.7345742", "0.7313125", "0.72754765", "0.7231418", "0.7209495", "0.7198532", "0.71868736", "0.7129481...
0.6974898
34
Checks if user is admin
def is_admin(self): return Role.query.get(2) in self.roles
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_admin(user):\n return user.is_authenticated and user.id == app.config.get('ADMIN')", "def is_admin_user(self):\n if \"is_admin\" in self._properties and self.is_admin == 'YES':\n return True\n return False", "def is_admin(self, user):\n return user.name in self.adm...
[ "0.86450386", "0.8565266", "0.8558795", "0.854185", "0.84534395", "0.84437406", "0.8402829", "0.8377039", "0.833414", "0.8330509", "0.8330509", "0.83226144", "0.8315359", "0.8307544", "0.8292756", "0.8286495", "0.8210262", "0.81752855", "0.81674933", "0.8107433", "0.8090118",...
0.7497303
58
Get lr on each step with steps scheduler (on 0.3 and 0.7 steps) and with warmup
def get_lr_decay(lr_init, lr_max, total_steps, warmup_steps): decay_epoch_index = [0.3 * total_steps, 0.7 * total_steps] lr_each_step = [] for i in range(total_steps): if i < warmup_steps: lr = lr_init + (lr_max - lr_init) * i / warmup_steps else: if i < decay_epoch_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lr_scheduler(self, lr_init, global_step):\n pass", "def lr_schedule(epoch):\n lr = 1e-3\n return lr", "def lr(self):\n pass", "def get_scheduler(optimizer, opt):\n \n epochs_no_decay = opt.epochs - opt.lr_linear\n lr_policy = opt.lr_policy\n \n if lr_policy == 'linear':\n ...
[ "0.7549523", "0.73578423", "0.7322432", "0.730336", "0.7162698", "0.7117049", "0.70928997", "0.7076428", "0.70555246", "0.7020419", "0.7017421", "0.6968778", "0.6967481", "0.69629556", "0.6962733", "0.6955579", "0.6955579", "0.6955579", "0.6955579", "0.6942765", "0.6927597", ...
0.6458525
59
Get lr on each step with constant scheduler and with warmup
def get_lr_constant(lr_init, lr_max, total_steps, warmup_steps): lr_each_step = [] for i in range(total_steps): if i < warmup_steps: lr = lr_init + (lr_max - lr_init) * i / warmup_steps else: lr = lr_max lr_each_step.append(lr) lr_each_step = np.array(lr_each_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lr_scheduler(self, lr_init, global_step):\n pass", "def lr_schedule(epoch):\n lr = 1e-3\n return lr", "def scheduler(epoch_idx, lr):\n new_lr = lr\n if (epoch_idx == 60 or epoch_idx == 120 or epoch_idx == 160\n or epoch_idx == 260 or epoch_idx == 320 or epoch_idx == 360):\n ...
[ "0.78062254", "0.7545352", "0.7405641", "0.73626333", "0.7324679", "0.71946764", "0.71707034", "0.71380925", "0.7129344", "0.7106519", "0.7082601", "0.7081485", "0.70547515", "0.7039119", "0.70009387", "0.69995546", "0.6998454", "0.6996066", "0.6981025", "0.6980811", "0.69801...
0.66815764
41
Return the input of the network that was used in the last bounds computation. Converts back from the conditioned input domain to the original one. Assumes that the last layer is a single neuron.
def get_lower_bound_network_input(self): assert self.store_bounds_primal assert self.bounds_primal.shape[1] in [1, 2], "the last layer must have a single neuron" l_0 = self.input_domain.select(-1, 0) u_0 = self.input_domain.select(-1, 1) net_input = (1/2) * (u_0 - l_0) * self.bou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def input_layer(self, input_layer):\n x = self._from_nhwc(input_layer)\n x = tf.cast(x, self.dtype)\n # Rescale and shift to [-1,1]\n x = x * (1./127.5) - 1\n return x", "def forward(self, input=None):\n if (input is not None) and (self.result is None):\n self...
[ "0.60658866", "0.60620844", "0.6035128", "0.6033774", "0.59089", "0.58805656", "0.58053535", "0.578124", "0.578124", "0.5754239", "0.5720725", "0.5719103", "0.57141757", "0.5674636", "0.56131506", "0.55656415", "0.55637515", "0.55558205", "0.5534919", "0.55330503", "0.5522377...
0.7332507
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, FilterKeys): return False return self.__dict__ == other.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.84568954", "0.83923674", "0.81447554", "0.81407183", "0.81326675", "0.80941343", "0.8092415", "0.8092415", "0.8092415", "0.8085536", "0.8085536", "0.8076502", "0.8076502", "0.8066026" ]
0.0
-1
Pads the array with the last entry so the last batch would be same length as all others. Should not affect the evaluation as evaluation is only done on steps specified explicitly by user/sum(seq_lens).
def pad_arrays(arrays, batch_size): rows_needed = batch_size - len(arrays["y"]) % batch_size return {k: np.pad(v, [(0,rows_needed)] + [(0,0)]*(len(v.shape)-1), "edge") for k,v in arrays.items()}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trim_and_pad_batch(self, batch):\n\t\tmaxlength = min(self.MAXLENGTH, max([len(x) for x in batch]))\n\t\t\t\t\n\t\tbatch = [x[:maxlength] for x in batch]\n\t\tbatch = [np.concatenate([x, np.zeros(maxlength - x.shape[0])]) for x in batch]\n\n\t\treturn batch", "def pad_sequence(self, arr, max_length_tweet):\n...
[ "0.66055554", "0.6546967", "0.6545602", "0.6533263", "0.65310144", "0.64928067", "0.6488625", "0.64306164", "0.62983304", "0.62332", "0.6196322", "0.61617965", "0.6160891", "0.61348253", "0.61316234", "0.6128534", "0.61240035", "0.61042464", "0.6086439", "0.6080504", "0.60360...
0.612729
16
Gets string id to use for asset generation.
def GetSwivelAssetId(self, swivel_manifest): datestr = GetCompactDateString() if not swivel_manifest.HasField("scan_station"): raise errors.ConfigError("Missing required scan_station metadata") ss_id = swivel_manifest.scan_station.id # Additional 'K' precedes the Katamari ID in case the speci...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def asset_id(self) -> str:\n return self.__asset_id", "def asset_id(self) -> str:\n return self._asset_id", "def get_id(self):\n #return self.__str__().__hash__()\n object_type = self['object_type']\n shortname = self.get_description()\n object_name = self['name']\n ...
[ "0.79520345", "0.7934846", "0.7526269", "0.7503756", "0.7503756", "0.74583185", "0.7353895", "0.73428816", "0.73230255", "0.72918576", "0.7279631", "0.7277211", "0.72325623", "0.7229718", "0.7229718", "0.7229718", "0.7229718", "0.7229718", "0.7229718", "0.7229718", "0.7229718...
0.0
-1
Gets string id to use for calibration asset generation.
def GetCalibrationAssetId(self, swivel_manifest, suffix): datestr = GetCompactDateString() if not swivel_manifest.HasField("scan_station"): raise errors.ConfigError("Missing required scan_station metadata") ss_id = swivel_manifest.scan_station.id # Additional 'K' precedes the Katamari ID in c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def asset_id(self) -> str:\n return self._asset_id", "def asset_id(self) -> str:\n return self.__asset_id", "def get_id(self): # real signature unknown; restored from __doc__\n return \"\"", "def id(self) -> str:\n return self._pipeline_definition.get(\"id\")", "def get_id(self)...
[ "0.68446386", "0.6840572", "0.67591494", "0.6697385", "0.66770977", "0.66768277", "0.66768277", "0.66632265", "0.66512", "0.66512", "0.66512", "0.66512", "0.6649387", "0.6649387", "0.6649387", "0.6649387", "0.6649387", "0.6649387", "0.6649387", "0.6649387", "0.6649387", "0....
0.69528854
0
Gets timestamp in compact date format.
def GetCompactDateString(): utc_time = pytz.UTC.localize(datetime.datetime.utcnow()) pac_time = utc_time.astimezone(PACIFIC) is_dst = time.localtime().tm_isdst if is_dst: return pac_time.strftime("%Y%m%d-%Hd%M%S") else: return pac_time.strftime("%Y%m%d-%Hs%M%S")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_timestamp():\n return time.strftime('%Y-%m-%d %H:%M:%S')", "def timestamp():\n return datetime.now().strftime(\"%Y%m%dT%H%M%S\")", "def _timestamp():\n moment = time.time()\n moment_us = repr(moment).split(\".\")[1]\n return time.strftime(\"%Y-%m-%d-%H-%M-%S-{}\".format(moment_us...
[ "0.7109529", "0.69747543", "0.6953498", "0.6952795", "0.6900494", "0.6842051", "0.6779726", "0.67512435", "0.6729233", "0.67032075", "0.6683389", "0.6634136", "0.6575083", "0.65436673", "0.6541782", "0.6483122", "0.6452655", "0.6452655", "0.64502144", "0.644585", "0.64028215"...
0.62711006
31
Constructor. Calls ``add()`` method to save named input variables. See ``add()`` method for further details.
def __init__(self, print_precision=9, **kwargs): SpecPrinter.print_precision = print_precision self.add(**kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, **variables):\n vars(self).update(variables)", "def addVariable(self, name, value, save = False):\r\n setattr(self, name, value)\r\n if save and name not in self.variables:\r\n self.variables.append(name)", "def __add__(self,_VariablesList):\n\n\t\t#Call the add method\n\t\tself.a...
[ "0.6488665", "0.6459382", "0.6442173", "0.635423", "0.63403153", "0.63308156", "0.6214932", "0.6193942", "0.613739", "0.6106023", "0.61014843", "0.60681236", "0.60399294", "0.6039332", "0.6037341", "0.60124356", "0.58936733", "0.5890349", "0.588095", "0.58741134", "0.5862258"...
0.0
-1
Returns option's right as a string. This is a getter method that hides direct access to the right attribute. Returns str 'call', 'put', or 'other' indicating the right of this option object
def get_right(self): if getattr(self, '_right') is None: warnings.warn('Hmmm... I will use "call" right, since you did not provide any', UserWarning) self._right = 'call' return self._right
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def right(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"right\")", "def right(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"right\")", "def right(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"right\")", "def get_right(self):\n ...
[ "0.7023511", "0.7023511", "0.7023511", "0.6680357", "0.66067255", "0.6431627", "0.6426254", "0.6326773", "0.6320514", "0.62908655", "0.628868", "0.6247416", "0.6216752", "0.62056696", "0.62056696", "0.6189449", "0.61827576", "0.60695106", "0.6011772", "0.60001814", "0.5965341...
0.71041524
0
Compiles option series name. Compiles an option series name (as a string), including option style (European, American, ...) Returns str Option series name Examples >>> from qfrm import >>> OptionSeries(ref=Stock(S0=50, vol=0.3), K=51, right='call').series '51 call' >>> OptionSeries(ref=Stock(S0=50, vol=0.3, tkr='IBM'),...
def series(self): try: tkr = self.ref.tkr + ' ' except: tkr = '' K = str(getattr(self, 'K', '')) + ' ' T = '' if getattr(self, 'T', None) is None else str(self.T) + 'yr ' style = self.style + ' ' right = str(getattr(self, 'right', '')) + ' ' # K = '' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_series(series):\n if series == 'acs1':\n return census.acs1dp\n elif series == 'acs5':\n return census.acs5\n elif series == 'sf1':\n return census.sf1\n elif series == 'sf3':\n return census.sf3\n else:\n return None...
[ "0.60522217", "0.56913024", "0.5199576", "0.5184276", "0.51206285", "0.51204544", "0.5080162", "0.49079984", "0.4879284", "0.4805213", "0.47694468", "0.47557062", "0.47539178", "0.47463524", "0.47428912", "0.4732721", "0.4716588", "0.4711892", "0.47106114", "0.47005865", "0.4...
0.58374655
1
Computes the Gini impurity of the provided distribution
def gini(y): # YOUR CODE HERE if len(y) == 0: return 0. pk = np.mean(y, axis=0) return 1 - np.sum(pk * pk)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gini_impurity(data):\n\n prob = []\n n = len(data.index) # total data points\n classes = sorted(data.iloc[:,-1].unique()) # get classes (avoids div by 0 problem later on)\n\n # iterate over classes and find probabilities for each class\n for c in classes:\n prob.append(len(data[data.iloc[...
[ "0.7249946", "0.7028352", "0.6914374", "0.6834624", "0.68131775", "0.6544139", "0.6540904", "0.6495463", "0.6470616", "0.6397314", "0.63340884", "0.63078785", "0.6180598", "0.6024935", "0.5997738", "0.59947205", "0.59308714", "0.59099895", "0.5898333", "0.5881061", "0.5870646...
0.6435781
9
Sets the current position as the zero position.
def _set_zero_position(self): self.logger.debug("Simulator cannot set zero position") return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_zero(self, loc=None):\n loc = dtloc2pos(loc, self.X)\n return super().set_zero(loc=loc)", "def moveToZero(self):\n\t\tself.grp.a.t.v = [0,0,0]\n\t\tself.grp.a.r.v = [0,0,0]", "def reset_position(self):\n self.goto(STARTING_POSITION)", "def reset(self):\n self._x = 0\n ...
[ "0.7611404", "0.76087314", "0.72625387", "0.7216044", "0.7182739", "0.71516633", "0.71515536", "0.7149229", "0.7111964", "0.7047033", "0.7027829", "0.7027829", "0.69736475", "0.69304883", "0.68991387", "0.68814534", "0.6829983", "0.68235457", "0.6816298", "0.6806998", "0.6793...
0.7428017
2
Return an executable string representation. This method returns a string so that ``eval(self.vrepr())`` and ``self`` have the same content.
def vrepr(self): if len(self.input_prop) == 1: id_vrepr = self.input_prop[0].vrepr() else: id_vrepr = f"[{', '.join([d.vrepr() for d in self.input_prop])}]" return f"{self.__class__.__name__}({id_vrepr})"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n klass = self.__class__.__qualname__\n cmd = \" \".join(sys.argv)\n cmd_ = f\"$ {cmd}\"\n args = pformat(self.get_args())\n repr_ = \"\\n\".join((klass, cmd_, args))\n return f\"<{repr_}>\"", "def __repr__(self):\n s = \"\"\n for v in s...
[ "0.7017763", "0.6475414", "0.6417316", "0.6396472", "0.6396472", "0.6396472", "0.6386466", "0.6311731", "0.63022745", "0.6260393", "0.620612", "0.6200736", "0.6158979", "0.6141146", "0.6137648", "0.61311936", "0.611683", "0.61006606", "0.60966456", "0.6083821", "0.6044182", ...
0.59422773
33
Return the weight constraint for a given output `Property` and weight `Variable`. The weight constraint is a bitvector expression that depends on the input property `OpModel.input_prop`, the output property ``output_prop`` and the weight variable ``weight_variable``. This expression is True if and only if the weight (n...
def weight_constraint(self, output_prop, weight_variable): if weight_variable.width != self.weight_width(): raise ValueError("invalid weight_variable width") return operation.BvComp(weight_variable, self.bv_weight(output_prop))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bv_weight(self, output_prop):\n raise NotImplementedError(\"subclasses need to override this method\")", "def external_vars_weight_constraint(self, output_prop, weight_variable):\n return []", "def computeW(self):\n E = np.where(self.v > 0, 1, -1)\n # theshold the connections to...
[ "0.65918314", "0.636133", "0.53623974", "0.5352152", "0.52442163", "0.5211414", "0.52017826", "0.51775444", "0.51696765", "0.51688975", "0.5168634", "0.5132458", "0.5130514", "0.5101396", "0.50884116", "0.50744873", "0.50607586", "0.50573415", "0.5017677", "0.501442", "0.4998...
0.7880478
0
Return the maximum value the weight variable can achieve in `OpModel.weight_constraint`.
def max_weight(self): raise NotImplementedError("subclasses need to override this method")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compare_max(values, weights):\n return np.max(values.numpy())", "def get_max(self):\n\t\tif self.right:\n\t\t\treturn self.right.get_max()\n\t\treturn self.value", "def greedy_policy(self):\n # print(self.weights)\n policy = defaultdict(lambda: 0)\n\n for entry, values in self.weigh...
[ "0.7017285", "0.67708", "0.6770738", "0.67654264", "0.66850084", "0.66663367", "0.66415334", "0.6608449", "0.6608449", "0.6608449", "0.6608449", "0.6608449", "0.6608449", "0.6608449", "0.6608449", "0.65997744", "0.65997744", "0.65997744", "0.65997744", "0.65997744", "0.659977...
0.77612287
0
Return the width of the weight variable used `OpModel.weight_constraint`.
def weight_width(self): raise NotImplementedError("subclasses need to override this method")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kernel_width(self):\n\t\treturn self.kernel_shape_param('W')", "def weight(self) -> int:\n return pulumi.get(self, \"weight\")", "def width(self):\n return self._get_mean_and_samples_attribute('width')", "def weight(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"weight\")", ...
[ "0.73769975", "0.71921265", "0.7112556", "0.7098718", "0.7092615", "0.7070433", "0.70176995", "0.7004581", "0.7004581", "0.7004581", "0.69866383", "0.6984598", "0.6984598", "0.69775504", "0.6953276", "0.6948602", "0.69149375", "0.69060946", "0.6900611", "0.68790853", "0.68556...
0.7670364
0
Return an executable string representation. This method returns a string so that ``eval(self.vrepr())`` and ``self`` have the same content.
def vrepr(self): fa_vrepr = ', '.join([str(a) if not isinstance(a, core.Term) else a.vrepr() for a in self.__class__.op.fixed_args]) fa_vrepr = f"({fa_vrepr})" if len(self.input_prop) == 1: id_vrepr = self.input_prop[0].vrepr() else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n klass = self.__class__.__qualname__\n cmd = \" \".join(sys.argv)\n cmd_ = f\"$ {cmd}\"\n args = pformat(self.get_args())\n repr_ = \"\\n\".join((klass, cmd_, args))\n return f\"<{repr_}>\"", "def __repr__(self):\n s = \"\"\n for v in s...
[ "0.7018145", "0.6477069", "0.64172035", "0.63971454", "0.63971454", "0.63971454", "0.6388076", "0.63116056", "0.63024914", "0.6261274", "0.62052304", "0.62013125", "0.6159504", "0.6140785", "0.61381567", "0.6131289", "0.6117788", "0.6102013", "0.6096905", "0.6084888", "0.6045...
0.0
-1
Return the partial property model of the given bitvector partial operation. The argument ``abstract_partial_op_model`` is an (abstract) subclass of `PartialOpModel` containing the base operator. The argument ``fixed_args`` is a `tuple`, with the same length as the number of operands of the base operator, containing ``N...
def make_partial_op_model(abstract_partial_op_model, fixed_args): assert issubclass(abstract_partial_op_model, PartialOpModel) assert not hasattr(abstract_partial_op_model, "op") or abstract_partial_op_model.op is None partial_op = operation.make_partial_operation(abstract_partial_op_model.base_op, fixed_a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_partial(self):\n self.partial_corr_ = prec_to_partial_corr(self.prec_)\n return self", "def vrepr(self):\n fa_vrepr = ', '.join([str(a) if not isinstance(a, core.Term) else a.vrepr()\n for a in self.__class__.op.fixed_args])\n fa_vrepr = f\"({f...
[ "0.45916218", "0.4448776", "0.42783934", "0.4178841", "0.406159", "0.4002965", "0.39904478", "0.39830816", "0.397688", "0.397688", "0.397688", "0.397688", "0.397688", "0.397688", "0.397688", "0.397688", "0.397688", "0.39518076", "0.3948712", "0.39350298", "0.38851538", "0.3...
0.7581364
0
Get an existing Mesh resource's state with the given name, id, and optional extra properties used to qualify the lookup.
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None) -> 'Mesh': opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = MeshArgs.__new__(MeshArgs) __props__.__dict__["create_time"] = None ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def a_state(id):\n state = storage.get(State, id)\n if state is not None:\n return jsonify(state.to_dict())\n abort(404)", "def get_state_by_id(state_id):\r\n response = Response(json.dumps(json_error(ResponsesREST.INVALID_INPUT.value)),\r\n status=ResponsesREST.INVALID_...
[ "0.604182", "0.60233325", "0.60072935", "0.5975294", "0.59730387", "0.5965345", "0.59206206", "0.58817697", "0.5876661", "0.5759387", "0.5729384", "0.5721861", "0.56877637", "0.56514364", "0.56391776", "0.5616498", "0.5556746", "0.5551728", "0.55502445", "0.55399793", "0.5515...
0.65903026
0
Creates and saves a User with the given email, name and password.
def create_user(self, email, name, password=None): if not email: raise ValueError('Users must have an email address') user = self.model( email=self.normalize_email(email), name=name, ) user.set_password(password) user.save(using=self._db) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_user(self, name, email, password):\n new_user = User(name=name, email=email, password=password)\n db.session.add(new_user)\n db.session.commit()", "def Create_user(self, email, name, password):\n\n #validating user inputs\n if not email:\n raise ValueError...
[ "0.8653544", "0.84595716", "0.8407364", "0.83747774", "0.8356107", "0.8351158", "0.8340033", "0.8333739", "0.8327296", "0.83213323", "0.8309048", "0.83002204", "0.8287927", "0.828347", "0.82388484", "0.8210397", "0.82081515", "0.8204733", "0.81991744", "0.8190116", "0.8187645...
0.8205194
17
Creates and saves a superuser with the given email, name and password.
def create_superuser(self, email, name, password): user = self.create_user(email, password=password, name=name, ) user.is_superuser = True user.is_staff = True user.save(using=self._db) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_superuser(self, email, name, password):\n\n user = self.create_user(email, name, password)\n\n # Make this user an admin.\n user.is_superuser = True\n user.is_staff = True\n user.save(using=self._db)\n\n return user", "def create_superuser(self, email, name, password):\n # Cre...
[ "0.8250751", "0.8201887", "0.8198129", "0.81916875", "0.8148566", "0.81479436", "0.8147817", "0.8141224", "0.81400895", "0.81088233", "0.81088233", "0.8107052", "0.8075192", "0.80553377", "0.80343205", "0.80323786", "0.8016082", "0.80055004", "0.80050945", "0.7985282", "0.798...
0.81314534
9
Converts a pandas Timedelta to an IBKR duration string. This is used by `get_hist_bars` to convert the request range to a duration string. This assume that the time_delta is a multiple of a number of days.
def _time_delta_to_duration_str(time_delta: pd.Timedelta) -> str: time_delta = time_delta.ceil("D") if time_delta < pd.Timedelta("1 day"): raise ValueError("Time delta has to be at least 1 day long") if time_delta % pd.Timedelta("1 W") == pd.Timedelta(0): return f"{time_delta // pd.Timedelta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _time_delta_to_bar_size_str( # pylint: disable=too-many-return-statements\n time_delta: pd.Timedelta,\n) -> Optional[str]:\n if time_delta < pd.Timedelta(1, unit=\"min\"):\n count = int(time_delta.total_seconds())\n if count not in {1, 5, 10, 15, 30}:\n return None\n retu...
[ "0.71623176", "0.6664823", "0.6602239", "0.6385999", "0.6372259", "0.62984926", "0.6179764", "0.596313", "0.5946608", "0.5874282", "0.5872524", "0.58558184", "0.5803796", "0.5785788", "0.5772253", "0.5725008", "0.5688072", "0.5660523", "0.5657484", "0.5606951", "0.5565926", ...
0.81945133
0
Converts a pandas Timedelta to an IBKR bar size string.
def _time_delta_to_bar_size_str( # pylint: disable=too-many-return-statements time_delta: pd.Timedelta, ) -> Optional[str]: if time_delta < pd.Timedelta(1, unit="min"): count = int(time_delta.total_seconds()) if count not in {1, 5, 10, 15, 30}: return None return f"{count} s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _convert_bar_width(x, width=1, ncols=1):\n # WARNING: This will fail for non-numeric non-datetime64 singleton\n # datatypes but this is good enough for vast majority of cases.\n x_test = np.atleast_1d(_to_ndarray(x))\n if len(x_test) >= 2:\n x_step = x_test[1:] - x_test[:-1]\n x_step ...
[ "0.5869315", "0.58496547", "0.5787857", "0.57450724", "0.5723937", "0.56263685", "0.5603121", "0.56017953", "0.56003565", "0.5572498", "0.55397195", "0.55225664", "0.5491198", "0.5487834", "0.5455142", "0.5439741", "0.54388636", "0.54370916", "0.5419836", "0.5419788", "0.5344...
0.7964745
0
Return a mask of values within the given sigma range
def sigma_clip(data, max_sigma): mn = np.mean(data) std = np.std(data) diff = data - mn sigmas = diff / std mask = np.abs(sigmas) < max_sigma return mask
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gaussian(size,sigma):\n a,b=np.ogrid[-size/2:size/2,-size/2:size/2]\n mask = a**2+b**2\n mask = np.exp(-mask.astype('float')/(2*float(sigma**2)))\n return mask", "def maskBySigmas(self, sigma=2):\n\t\t# set up masking criteria\n\t\tself.avgFlux = np.mean(self.flux)\n\t\tself.stdFlux = np.std(self...
[ "0.7285997", "0.7164267", "0.7067671", "0.6913724", "0.6837227", "0.66784173", "0.6475348", "0.63905185", "0.63319415", "0.62105596", "0.61961675", "0.61780393", "0.6140154", "0.60946155", "0.6076678", "0.60550267", "0.6052057", "0.6039146", "0.6001455", "0.597798", "0.595701...
0.73821896
0
Get the time axis for magnitude measurements. By default the start value is set to zero, set `zero_start=False` to avoid this. Units are probably in days.
def get_time_ax(self, zero_start=True): t_ax = self._data[time_name].copy() if zero_start: t_ax -= t_ax[0] return t_ax
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def t0(self):\n return self._time_axis.start", "def time_axis(self):\n if self.axes_wcs.wcs.ctype[0] not in ['TIME', 'UTC']:\n raise cu.CubeError(1, 'No time axis present')\n delta = self.axes_wcs.wcs.cdelt[0]\n crpix = self.axes_wcs.wcs.crpix[0]\n crval = self.axes_...
[ "0.6990094", "0.68851626", "0.60663354", "0.5830776", "0.58270764", "0.5774968", "0.575404", "0.5732198", "0.5718807", "0.57135075", "0.5698805", "0.5671586", "0.5636641", "0.56318414", "0.5627889", "0.5589794", "0.55474985", "0.5518086", "0.5424226", "0.5417328", "0.54155374...
0.67987144
2
Returns a list of sentences, each being a list of tokens.
def make_dialogue(self, seeds): acts = self.make_speech_bits(seeds) seq_map = self.simplify(acts) sents = self.report_seq(seq_map) return(sents)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sentences(self) -> List[str]:\n\t\treturn [self.text[start:end] for start, end in self.tokenizations]", "def sentences(self) -> List[str]:\n\t\treturn [self.text[start:end] for start, end in self.tokenizations]", "def sentences(self) -> List[str]:\n\t\treturn [sentence for sentence in re.split('(?<=[.!?])'...
[ "0.88124806", "0.88124806", "0.81411946", "0.79590833", "0.75703377", "0.75239265", "0.75239265", "0.7513965", "0.7480075", "0.74130505", "0.7390637", "0.737783", "0.7347298", "0.7291053", "0.7259382", "0.7245952", "0.7206297", "0.71873325", "0.7169405", "0.7148355", "0.71456...
0.0
-1
Computes elementwise hard sigmoid of x.
def hard_sigmoid(x): x = (0.2 * x) + 0.5 x = F.threshold(-x, -1, -1) x = F.threshold(-x, 0, 0) return x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sigmoid(x):\r\n\r\n return 1 / (1 + np.exp(-x))", "def sigmoid(x):\n return 1 / (1 + exp(-x))", "def sigmoid(x):\n return 1 / (1 + exp(-x))", "def sigmoid(x):\r\n return 1 / (1 + np.exp(-x))", "def sigmoid(x):\n return 1 / (1 + np.exp(-x))", "def sigmoid(x):\n return 1 / (1 + np.exp...
[ "0.8867134", "0.8830171", "0.8830171", "0.8818319", "0.87644", "0.87644", "0.87644", "0.87644", "0.87644", "0.87644", "0.87597674", "0.8757305", "0.8754178", "0.874423", "0.8725865", "0.8725865", "0.8723728", "0.872368", "0.87226784", "0.8722669", "0.87167203", "0.8713388",...
0.8616838
31
Add features for each token. The feature name is prepended with the string "token=". Note that the feats dict is modified in place, so there is no return value.
def token_features(tokens, feats): ###TODO for token in tokens : t = 'token=' + token if t not in feats.keys() : feats.setdefault(t,1) else : feats[t] += 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def token_features(tokens, feats):\n \n count = Counter(tokens)\n for i in count:\n feats[\"token=\"+i] = count[i]", "def featurize(self, tokens):\n features = []\n \n nrc_hashtag_emotion_features = self.nrc_hashtag_emotion(tokens)\n nrc_affect_intensity_features = sel...
[ "0.7930725", "0.67358553", "0.6532235", "0.6444605", "0.6015557", "0.60151446", "0.6004291", "0.59806234", "0.595767", "0.5954078", "0.5875263", "0.58720523", "0.58400655", "0.58214444", "0.58212966", "0.5755487", "0.5722171", "0.5713578", "0.57007575", "0.5689967", "0.568504...
0.7464478
1
Uploads the specified team to the server and validates for the format specified by battle_format.
async def validate_team( self, team, battle_format, *, delay=0, lifespan=math.inf ): battle_format = utils.name_to_id(battle_format) team = team or "null" await self.upload_team(team, delay=delay, lifespan=lifespan) await self.add_output( "|/vtm {}".format(battle_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def upload_team(self, team, *, delay=0, lifespan=math.inf):\n team_str = utils.to_team_str(team)\n await self.add_output(\n \"|/utm {}\".format(team_str), delay=delay, lifespan=lifespan\n )", "def test_teams_save_team_v1(self):\n pass", "async def send_challenge(sel...
[ "0.6763715", "0.59493613", "0.5708513", "0.5620283", "0.5561562", "0.5514085", "0.5351409", "0.52959603", "0.52096206", "0.5202296", "0.5187988", "0.5075524", "0.5063468", "0.5053455", "0.504441", "0.50439674", "0.5026394", "0.50071126", "0.5006769", "0.49538544", "0.4916582"...
0.74801
0
Makes the client join the room specified by the given room_id.
async def join(self, room_id, *, delay=0, lifespan=math.inf): assert type(room_id) is str, "Paramater room_id should be a string." await self.add_output( "|/join {}".format(room_id), delay=delay, lifespan=lifespan )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def joinroom(self, the_id):\r\n the_id = Client.toroomid(the_id)\r\n self.tx_cmd(FCTYPE.JOINCHAN, 0, the_id, FCCHAN.JOIN)", "async def join_room(self, room_id):\n print(\"PublicChatConsumer\", \"join_room\", self.scope[\"user\"])\n if self.scope[\"user\"].is_authenticated:\n ...
[ "0.8260018", "0.78121597", "0.7212561", "0.71340704", "0.6809174", "0.6809174", "0.6779003", "0.67185414", "0.6711822", "0.6636836", "0.6615745", "0.66056454", "0.6590447", "0.6550439", "0.6530421", "0.6512816", "0.65127367", "0.6347421", "0.6328372", "0.62318796", "0.6182464...
0.74705166
2
Makes client leave the room specified by the given room_id.
async def leave(self, room_id, *, delay=0, lifespan=math.inf): assert type(room_id) is str, "Parameter room_id should be a string." await self.add_output( "{}|/leave".format(room_id), delay=delay, lifespan=lifespan )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def leave_room(self, room_id):\n # Зарегистрированный пользователь находится в нашей области благодаря аутентификации ASGI middleware\n room = await get_room_or_error(room_id, self.scope[\"user\"])\n # Отправить сообщение, если оно включено\n if settings.NOTIFY_USERS_ON_ENTER_OR_L...
[ "0.8450771", "0.76553005", "0.76171887", "0.7067363", "0.70129687", "0.690158", "0.6603551", "0.65803605", "0.6487911", "0.64766216", "0.64178026", "0.63466126", "0.6217122", "0.6126345", "0.6126345", "0.6126345", "0.6126345", "0.6076701", "0.6067983", "0.60396206", "0.584019...
0.77922904
1
Reject a challenge from the player specified by user_id
async def reject_challenge(self, user_id, *, delay=0, lifespan=math.inf): await self.user_command( "", "reject", user_id, delay=delay, lifespan=lifespan )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reject_connection(self, user_id):\n logging.debug('ConnectionsClient/reject_connection()')\n url = '/pod/v1/connection/reject'\n data = {'userId': user_id}\n return self.bot_client.execute_rest_call('POST', url, json=data)", "def admin_reject(user):\n if user.comments in (None ...
[ "0.67874485", "0.6288358", "0.6252356", "0.62501436", "0.6161123", "0.61546993", "0.6110542", "0.60393184", "0.60283077", "0.59605694", "0.595761", "0.5857941", "0.5836884", "0.581536", "0.5774283", "0.57723176", "0.5768792", "0.57658994", "0.5743096", "0.56967866", "0.567546...
0.83441037
0
Queries the server for a list of public rooms. The result will appear as a query response with type 'rooms'.
async def query_rooms(self, *, delay=0, lifespan=math.inf): await self.add_output("|/cmd rooms", delay=delay, lifespan=lifespan)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rooms(self):\n def closure(cur):\n cur.execute(\"\"\"\n SELECT id, name\n FROM rooms\n \"\"\")\n ret = [ ]\n for r in cur.fetchall():\n ret.append({ 'id': r[0], 'name': r[1] })\n return ret\n\n ret...
[ "0.720892", "0.7158485", "0.6987795", "0.6819884", "0.6729563", "0.6572337", "0.65384835", "0.65204924", "0.65133923", "0.64745575", "0.6466381", "0.6400365", "0.633063", "0.62740505", "0.6247208", "0.6232285", "0.62012285", "0.61951077", "0.6178236", "0.6144771", "0.614084",...
0.6955535
3
Get the front element.
def peek(self): if len(self.s2)!=0: return self.s2[-1] while len(self.s1)!=0: self.s2.append(self.s1.pop()) return self.s2[-1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getFront(self):\n\t\tfront = self.queue[self.front]\n\t\treturn front\n\t\tpass", "def getFront(self):\n if not self.isEmpty():\n return self._data[0]\n else:\n return -1", "def front(self):\n return self.queue[0] if not self.empty() else None", "def peek_front(...
[ "0.82009244", "0.79261875", "0.7852642", "0.7791182", "0.77886623", "0.75723046", "0.752337", "0.7510604", "0.7478953", "0.7379256", "0.7379256", "0.734284", "0.7323573", "0.7320296", "0.7291721", "0.72772557", "0.7269801", "0.72657627", "0.7253295", "0.72355044", "0.72213495...
0.0
-1
Returns whether the queue is empty.
def empty(self): if len(self.s1)==0 and len(self.s2)==0: return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_empty(self):\n return len(self.the_queue) == 0", "def is_empty(self):\n return len(self.__queue) > 0", "def is_empty(self):\n return len(self.queue) == 0", "def is_empty(self):\n return len(self.queue) == 0", "def is_empty(self):\n return self.queue == []", "def ...
[ "0.9269721", "0.92503", "0.92358637", "0.92358637", "0.915549", "0.9098092", "0.9094519", "0.9092212", "0.9072709", "0.9053566", "0.8920166", "0.8913699", "0.8877523", "0.8843482", "0.8843482", "0.88358456", "0.88035", "0.8757838", "0.87572837", "0.87309694", "0.86455876", ...
0.0
-1
Returns if the word is in the trie.
def search(self, word: str) -> bool: node=self.root for c in word: if c not in node: return False else: node = node[c] if self.end_of_words in node: return True else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def in_trie(self, trie, word):\n current_dict = trie\n for letter in word:\n if letter in current_dict:\n current_dict = current_dict[letter]\n else:\n return False\n else:\n if '_end_' in current_dict:\n return curr...
[ "0.838632", "0.8150416", "0.8123471", "0.7856802", "0.7830664", "0.77935004", "0.7792806", "0.77642965", "0.7753436", "0.7747724", "0.7711298", "0.76816714", "0.7677101", "0.7664614", "0.76506114", "0.76338875", "0.76114196", "0.7577657", "0.75695884", "0.756079", "0.75591743...
0.7628353
16
Produce embedding indices for a list of preprocessed statements.
def encode(self, preprocessed: List[str]) -> List[int]: return [ self.vocab.get(statement, self.unknown_vocab_element) for statement in preprocessed ]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prepare_inputs(token_mapping, w2v_W, w2v_U, sentences):\n tokens = [tokenize(token_mapping, sentence) for sentence in sentences] \n \n depth = len(token_mapping)\n one_hot_tokens = []\n for sentence in tokens:\n one_hot_sentence = []\n for i, token in enumerate(sentence):\n ...
[ "0.57834685", "0.5775676", "0.5737177", "0.57327384", "0.56545436", "0.5589195", "0.5539876", "0.5523593", "0.55075264", "0.5504808", "0.5500654", "0.54996943", "0.5499042", "0.5464342", "0.54420805", "0.54317135", "0.5418249", "0.5400666", "0.54001045", "0.5399012", "0.53871...
0.6394351
0
Produce a matrix of embeddings from a list of encoded statements.
def embed(self, encoded: List[int]) -> np.ndarray: return np.vstack([self.embeddings[index] for index in encoded])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_embedding_matrix(self):\n # get all the embeddings\n all_embs = np.stack(list(self.embeddings.values()))\n\n # mean and standard deviation of the embedding values\n emb_mean, emb_std = all_embs.mean(), all_embs.std()\n\n # Find the number of words the the train set\n...
[ "0.60938096", "0.60071254", "0.5975837", "0.58715266", "0.5829537", "0.580297", "0.57977766", "0.5758727", "0.57282346", "0.5613052", "0.5538483", "0.5533514", "0.5511162", "0.55038464", "0.5453487", "0.5424891", "0.5403161", "0.53379923", "0.53318715", "0.5327793", "0.530701...
0.585379
4
Takes in a list of NewsStorys. Returns only those stories for whom a trigger in triggerlist fires.
def filter_stories(stories, triggerlist): # TODO: Problem 10 filteredStories = [] ## print 'stories:', stories ## print 'triggerlist:', triggerlist for story in stories: for trig in triggerlist: if trig.evaluate(story): filteredStories.append(story) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filter_stories(stories,trigger_dict_eng,trigger_dict_span,num_line):\n# trig_story = []\n temp_stories = stories[:num_line]\n for index, story in enumerate(temp_stories):\n print('\\n'+str(index),end=' ')\n #print(story.get_gevent_id(),story.get_dateAdded())\n story.clean_text()\n...
[ "0.5301178", "0.5258836", "0.51131994", "0.5067293", "0.4957427", "0.49514115", "0.49152994", "0.47681034", "0.4715318", "0.4714527", "0.47067872", "0.47067872", "0.46904266", "0.46602738", "0.46592495", "0.46423256", "0.4636263", "0.4629904", "0.4601316", "0.4600417", "0.459...
0.80982894
0
Format the dump as string to be printed in console.
def _format(self): output = f"\n{color('>>> DUMP')} from {self.filename}: {color(f'L{self.line}')} in {color(f'{self.method}()')}" for name, obj in self.objects.items(): output += f"\n\n{color(f' - {name}:')}\n" output += f" {pformat(obj, width=110, indent=4)}" output...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_dump(self):\n s = []\n for k in self.keys():\n if isinstance(self[k], int) or isinstance(self[k], long):\n s.append(\"%s=%d\" % (k, self[k]))\n elif isinstance(self[k], float):\n s.append(\"%s=%f\" % (k, self[k]))\n else:\n ...
[ "0.67384756", "0.66444474", "0.6580235", "0.6503241", "0.64541423", "0.62861216", "0.6285701", "0.6258678", "0.6256454", "0.6214378", "0.6188233", "0.6188233", "0.6188233", "0.6188233", "0.6188233", "0.6188233", "0.6188233", "0.6188233", "0.6188233", "0.6188233", "0.6188233",...
0.6741831
0
Constructor of a Map.
def __init__(self, name, content): self.name = name is_valid, message = self.is_valid(content.upper()) if not is_valid: raise ValueError(message.format(self.name)) # Remove "X"s in the map if there are some. # The initial position of the players is now compu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init___0(self, map):\n super(LongObjectHashMap, self).__init__()\n self.__init__()\n putAll(map)", "def __init__(self, mapElement=None):\n super().__init__() # init real Map stuff. absolutely necessary\n self._create_new_mindmap_hierarchy() # initialize a new instance\n...
[ "0.73174", "0.7111495", "0.7023372", "0.70019084", "0.6983769", "0.6970548", "0.69650024", "0.67997974", "0.6692054", "0.66696364", "0.6657748", "0.6617819", "0.66169107", "0.65856856", "0.65630895", "0.6548366", "0.6540625", "0.6501796", "0.6424519", "0.63854825", "0.6385239...
0.0
-1
Close all existing sessions for the authenticated user.
def logout(connection, verbose=False): response = requests.post(url=connection.base_url + '/auth/logout', headers={'X-MSTR-AuthToken': connection.auth_token}, cookies=connection.cookies, verify=connection.ssl_verify) if verbo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close_all(cls) -> None:\n\n close_all_sessions()", "def close_all_sessions() -> None:\n\n for sess in _sessions.values():\n sess.close()", "def close(self):\n for session in self.sessions.copy().values():\n session.close(SessionCloseErrorCode.SESSION_DIED)", "def close_...
[ "0.8003658", "0.778256", "0.76431173", "0.7635575", "0.7537218", "0.74287647", "0.72763443", "0.7178877", "0.71736574", "0.71488726", "0.71488726", "0.71488726", "0.705257", "0.7010701", "0.6903569", "0.6896234", "0.6886439", "0.68455344", "0.6843238", "0.68339217", "0.679310...
0.0
-1
Adds a kit to a software profile. This is a dataonly operation, as no pre/post enable actions are called.
def _add_component_to_software_profile(self, kit, comp_name, comp_version, software_profile): best_match_component = \ self._component_db_api.getBestMatchComponent( comp_name, comp_version, software_profile.getOsInfo(), kit.g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _enable_os_kit_component(self, kit, comp_name, comp_version,\n software_profile):\n return self._add_component_to_software_profile(\n kit, comp_name, comp_version, software_profile)", "def add_product(usr, guid, toolkit):\n if toolkit == 'add':\n gr...
[ "0.6760672", "0.58279485", "0.570564", "0.5676499", "0.54903096", "0.5481912", "0.53903425", "0.5284416", "0.52587765", "0.52013624", "0.51703095", "0.5127256", "0.51196337", "0.5040072", "0.5012244", "0.49181786", "0.49113995", "0.48955652", "0.48793674", "0.4854465", "0.483...
0.53300905
7
Get line style for line label.
def get_line_style(label): lower = label.lower() if plottype in ['gw-baselines', 'gw-all-baselines']: if 'dr' in lower and 'wdr' not in lower: style = LineStyle('-', 'c', 2, alpha=0.35) if 'ris' in lower: style.width = 5 style.style = '--' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def line_style(self):\n return self.container['line_style']", "def line_style(self, line_style=None):\n\n if line_style is None:\n return self._line_style\n else:\n if not isinstance(line_style, str):\n raise TypeError(\"Line style must be str, not '%s'\"...
[ "0.8201973", "0.6977813", "0.6864147", "0.6732428", "0.65510446", "0.6472576", "0.6412413", "0.64102453", "0.6297983", "0.62788844", "0.62545073", "0.6216358", "0.6021154", "0.5940282", "0.58916306", "0.5882554", "0.58030516", "0.5757873", "0.5697752", "0.5697752", "0.5655424...
0.791088
1
Truncate data to energy range in order to normalize intensity in range to 1
def _truncate_data(self): trunc_idx = np.argsort(self.energies) trunc_intensities = self.intensities[trunc_idx] norm_by = np.amax(trunc_intensities) return norm_by
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _normalize(self):\r\n self.dataframe['norm_intensity'] = self.dataframe['intensity']\r\n self.dataframe['norm_intensity'] -= self.dataframe['norm_intensity'].min()\r\n self.dataframe['norm_intensity'] /= self.dataframe['norm_intensity'].max() * 0.01", "def normali...
[ "0.7371033", "0.6918143", "0.68941313", "0.679682", "0.66422325", "0.6637562", "0.66041946", "0.65659225", "0.6563556", "0.6520912", "0.64764863", "0.644092", "0.6419768", "0.6419768", "0.64068025", "0.6405692", "0.63811153", "0.63811153", "0.6374199", "0.6357406", "0.6353873...
0.68157476
3
Given 2 angles, this returns the shortest angular difference. The inputs and ouputs are of course radians. The result would always be pi <= result <= pi. Adding the result to "from" will always get you an equivelent angle to "to".
def shortest_angular_distance(from_angle, to_angle): return normalize_angle(to_angle-from_angle)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def angle_diff(a1, a2):\n a = a1 - a2\n if abs(a) > 180:\n return np.sign(a)*360 - a\n else:\n return a", "def angle_difference(θ1, θ2):\n ordinary_diff = (θ2 - θ1) % np.pi\n return (np.pi / 2) - np.abs(ordinary_diff - (np.pi / 2))", "def angle_diff(self, a, b):\n a = self.a...
[ "0.7074115", "0.69208306", "0.6850059", "0.68374187", "0.68034786", "0.6770577", "0.6770577", "0.67169636", "0.6700987", "0.6656163", "0.6656163", "0.65957737", "0.65877265", "0.6574986", "0.6573484", "0.6501354", "0.64919496", "0.64877665", "0.64856946", "0.6477915", "0.6461...
0.7564937
0
Return timestamp of the last oplog.
def last_optime(self): return self._last_optime
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def last_timestamp(self):\n return self._last_timestamp", "def get_last_timestamp(self):\n return self._frame_timestamp", "def test_get_last_oplog_timestamp(self):\n\n #test empty oplog\n test_oplog, primary_conn, oplog_coll = self.get_oplog_thread()\n self.assertEqual(test_o...
[ "0.72502875", "0.7160799", "0.71143615", "0.71117795", "0.696325", "0.6942144", "0.6901495", "0.6770311", "0.67633086", "0.676241", "0.67477864", "0.6720322", "0.6711646", "0.66765994", "0.6675615", "0.6615601", "0.6615601", "0.65701926", "0.6557187", "0.65518045", "0.6506952...
0.62893754
47
Cross entropy computed from unnormalised log probabilities (logits).
def weighted_cross_entropy_with_logits(pos_weight=1., label_smoothing=0): # @tf.function def loss(y_true, y_pred): labels = tf.cast(y_true, tf.float32) logits = tf.cast(y_pred, tf.float32) if label_smoothing > 0: # label smoothing between binary classes (Szegedy et al. 2015...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_entropy_loss(logits):\n policy = F.softmax(logits, dim=-1)\n log_policy = F.log_softmax(logits, dim=-1)\n return torch.sum(policy * log_policy)", "def entropy(x):\n nz = np.nonzero(x)[0]\n return -np.sum(x[nz]*np.log2(x[nz]))", "def entropy(self, logits):\n probs = torch.exp(l...
[ "0.77795404", "0.76487845", "0.758155", "0.7479526", "0.74625707", "0.746151", "0.7456714", "0.7449077", "0.74196434", "0.7390624", "0.73720306", "0.7366804", "0.7355907", "0.7318736", "0.73141026", "0.7257448", "0.72419834", "0.7237871", "0.7237084", "0.72338945", "0.722236"...
0.0
-1
Computes the triplet loss with semihard negative mining. The loss encourages the positive distances (between a pair of embeddings with the same labels) to be smaller than the minimum negative distance among which are at least greater than the positive distance plus the margin constant (called semihard negative) in the ...
def loss(labels, embeddings): # sourced from: # https://github.com/tensorflow/tensorflow/blob/r1.14/tensorflow/contrib/losses/python/metric_learning/metric_loss_ops.py#L160-L239 labels = tf.cast(labels, tf.int32) embeddings = tf.cast(embeddings, tf.float32) embeddings = tf.nn.l2_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def triplet_semihard_loss(margin=1.0, metric=\"cosine\"):\n assert metric in [\"cosine\", \"euclidean\", \"squared_euclidean\"]\n\n @tf.function\n def loss(labels, embeddings):\n # sourced from:\n # https://github.com/tensorflow/tensorflow/blob/r1.14/tensorflow/contrib/losses/python/metric_l...
[ "0.73636913", "0.69421583", "0.6877951", "0.66988295", "0.66958654", "0.66768014", "0.6617469", "0.6552386", "0.6530451", "0.63874584", "0.638708", "0.633313", "0.6239477", "0.6239117", "0.62100947", "0.62047166", "0.6166328", "0.6161945", "0.616041", "0.6158271", "0.61065584...
0.5769901
37