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 additional_data of this SalesDataCreditmemoItemInterface. Additional data.
def additional_data(self, additional_data): self._additional_data = additional_data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_data(self, extra_data):\n self._data.update(extra_data)\n return self", "def custom_data(self, custom_data):\n\n self._custom_data = custom_data", "def additional_data(self, additional_data):\n # type: (string_types) -> None\n\n if additional_data is not None:\n ...
[ "0.6648476", "0.65542525", "0.6529989", "0.61054826", "0.59772915", "0.58949465", "0.5847657", "0.5818036", "0.5802691", "0.5784014", "0.56307364", "0.56307364", "0.55894053", "0.55641526", "0.556014", "0.55515665", "0.55441076", "0.553895", "0.5511732", "0.5502228", "0.54949...
0.7789671
0
Sets the base_cost of this SalesDataCreditmemoItemInterface. The base cost for a credit memo item.
def base_cost(self, base_cost): if base_cost is None: raise ValueError("Invalid value for `base_cost`, must not be `None`") self._base_cost = base_cost
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_price(self, base_price):\n if base_price is None:\n raise ValueError(\"Invalid value for `base_price`, must not be `None`\")\n\n self._base_price = base_price", "def base_cost(self):\n return self._base_cost", "def base_currency(self, base_currency):\n\n self._ba...
[ "0.6026279", "0.57101846", "0.5645863", "0.5485359", "0.5470886", "0.5357647", "0.533405", "0.52592117", "0.52309394", "0.52308166", "0.51556003", "0.51540625", "0.5091373", "0.5032197", "0.5022048", "0.49958792", "0.4964995", "0.4923693", "0.48984647", "0.48935014", "0.47375...
0.7898242
0
Sets the base_discount_tax_compensation_amount of this SalesDataCreditmemoItemInterface. The base discount tax compensation amount for a credit memo item.
def base_discount_tax_compensation_amount(self, base_discount_tax_compensation_amount): self._base_discount_tax_compensation_amount = base_discount_tax_compensation_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_discount_amount(self, base_discount_amount):\n\n self._base_discount_amount = base_discount_amount", "def discount_tax_compensation_amount(self, discount_tax_compensation_amount):\n\n self._discount_tax_compensation_amount = discount_tax_compensation_amount", "def base_discount_tax_compe...
[ "0.7105169", "0.6847032", "0.6727763", "0.658473", "0.6530759", "0.62953085", "0.59046227", "0.5856251", "0.5682381", "0.55873156", "0.5587194", "0.5562147", "0.531033", "0.5297911", "0.5200243", "0.51941013", "0.5064536", "0.49487388", "0.4948641", "0.48972246", "0.4875316",...
0.8419751
0
Sets the base_price of this SalesDataCreditmemoItemInterface. The base price for a credit memo item.
def base_price(self, base_price): if base_price is None: raise ValueError("Invalid value for `base_price`, must not be `None`") self._base_price = base_price
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_currency(self, base_currency):\n\n self._base_currency = base_currency", "def base_cost(self, base_cost):\n if base_cost is None:\n raise ValueError(\"Invalid value for `base_cost`, must not be `None`\")\n\n self._base_cost = base_cost", "def base_price_incl_tax(self, b...
[ "0.6123708", "0.6043308", "0.58209795", "0.56283754", "0.55911696", "0.5544747", "0.54071695", "0.5370436", "0.52910906", "0.5248721", "0.5229654", "0.5223123", "0.518584", "0.51723737", "0.51665473", "0.5092648", "0.5055626", "0.50291115", "0.50152814", "0.48878062", "0.4872...
0.7746505
0
Gets the base_row_total of this SalesDataCreditmemoItemInterface. Base row total.
def base_row_total(self): return self._base_row_total
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_row_total(self, base_row_total):\n\n self._base_row_total = base_row_total", "def base_row_total_incl_tax(self):\n return self._base_row_total_incl_tax", "def row_total(self):\n return self._row_total", "def base_row_total_incl_tax(self, base_row_total_incl_tax):\n\n self...
[ "0.70343465", "0.6922449", "0.69104916", "0.61959344", "0.6042105", "0.5923826", "0.58872044", "0.55408806", "0.55248755", "0.5413179", "0.53839964", "0.527299", "0.52660894", "0.5260363", "0.5252777", "0.5241753", "0.51972187", "0.5194791", "0.51902986", "0.5174507", "0.5151...
0.82643104
0
Sets the base_row_total of this SalesDataCreditmemoItemInterface. Base row total.
def base_row_total(self, base_row_total): self._base_row_total = base_row_total
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_row_total_incl_tax(self, base_row_total_incl_tax):\n\n self._base_row_total_incl_tax = base_row_total_incl_tax", "def base_row_total(self):\n return self._base_row_total", "def row_total(self, row_total):\n\n self._row_total = row_total", "def base_currency_total_amount(self, ba...
[ "0.70156693", "0.69706744", "0.6525741", "0.59654754", "0.5756201", "0.5446652", "0.54001945", "0.53169715", "0.5299966", "0.5204254", "0.4951891", "0.4951891", "0.4951891", "0.4951891", "0.4951891", "0.4951891", "0.4951891", "0.4951891", "0.49402767", "0.48408067", "0.479712...
0.8565581
0
Gets the base_row_total_incl_tax of this SalesDataCreditmemoItemInterface. Base row total including tax.
def base_row_total_incl_tax(self): return self._base_row_total_incl_tax
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_row_total_incl_tax(self, base_row_total_incl_tax):\n\n self._base_row_total_incl_tax = base_row_total_incl_tax", "def row_total_incl_tax(self):\n return self._row_total_incl_tax", "def base_row_total(self):\n return self._base_row_total", "def basket_total_incl_tax(self):\n ...
[ "0.81289405", "0.80007213", "0.7219322", "0.7212295", "0.69358575", "0.6931542", "0.6873861", "0.63710797", "0.63505054", "0.61193347", "0.61124325", "0.607129", "0.6063451", "0.6046823", "0.5994482", "0.5987426", "0.5904419", "0.5860147", "0.580211", "0.57896084", "0.5756768...
0.86079806
0
Sets the base_row_total_incl_tax of this SalesDataCreditmemoItemInterface. Base row total including tax.
def base_row_total_incl_tax(self, base_row_total_incl_tax): self._base_row_total_incl_tax = base_row_total_incl_tax
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def row_total_incl_tax(self, row_total_incl_tax):\n\n self._row_total_incl_tax = row_total_incl_tax", "def base_row_total_incl_tax(self):\n return self._base_row_total_incl_tax", "def base_row_total(self, base_row_total):\n\n self._base_row_total = base_row_total", "def base_price_incl_t...
[ "0.7793704", "0.7706938", "0.7279899", "0.7223726", "0.68723786", "0.67229927", "0.67001796", "0.6326898", "0.6262155", "0.6209424", "0.615307", "0.6122798", "0.60270005", "0.5681213", "0.56384593", "0.54740894", "0.5438696", "0.5330614", "0.53133446", "0.52712387", "0.524730...
0.9024028
0
Gets the base_tax_amount of this SalesDataCreditmemoItemInterface. Base tax amount.
def base_tax_amount(self): return self._base_tax_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tax_amount(self):\n return self._tax_amount", "def base_row_total_incl_tax(self):\n return self._base_row_total_incl_tax", "def base_tax_amount(self, base_tax_amount):\n\n self._base_tax_amount = base_tax_amount", "def base_price_incl_tax(self):\n return self._base_price_incl_...
[ "0.7018257", "0.69213575", "0.6919618", "0.69092697", "0.6780898", "0.67272514", "0.6710368", "0.6679132", "0.630591", "0.6236545", "0.6186792", "0.6129092", "0.60964435", "0.5924122", "0.58745384", "0.5871341", "0.5856527", "0.5822354", "0.57552844", "0.569817", "0.56743526"...
0.8116957
0
Sets the base_weee_tax_applied_amount of this SalesDataCreditmemoItemInterface. Base WEEE tax applied amount.
def base_weee_tax_applied_amount(self, base_weee_tax_applied_amount): self._base_weee_tax_applied_amount = base_weee_tax_applied_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weee_tax_applied_amount(self, weee_tax_applied_amount):\n\n self._weee_tax_applied_amount = weee_tax_applied_amount", "def base_weee_tax_applied_amount(self):\n return self._base_weee_tax_applied_amount", "def base_weee_tax_applied_row_amnt(self, base_weee_tax_applied_row_amnt):\n\n se...
[ "0.7481685", "0.7343742", "0.69560313", "0.6929817", "0.64950657", "0.6306306", "0.6222316", "0.60711294", "0.6012792", "0.59232044", "0.58487177", "0.58332247", "0.57676816", "0.5709076", "0.56500626", "0.5573373", "0.54126143", "0.5390683", "0.5390259", "0.52063596", "0.505...
0.8743144
0
Sets the base_weee_tax_disposition of this SalesDataCreditmemoItemInterface. Base WEEE tax disposition.
def base_weee_tax_disposition(self, base_weee_tax_disposition): self._base_weee_tax_disposition = base_weee_tax_disposition
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_weee_tax_row_disposition(self, base_weee_tax_row_disposition):\n\n self._base_weee_tax_row_disposition = base_weee_tax_row_disposition", "def weee_tax_disposition(self, weee_tax_disposition):\n\n self._weee_tax_disposition = weee_tax_disposition", "def base_weee_tax_disposition(self):\n ...
[ "0.7781097", "0.70986724", "0.7072497", "0.6355997", "0.6310274", "0.59579027", "0.5597186", "0.559397", "0.55555254", "0.5357347", "0.53067446", "0.5185961", "0.5185719", "0.5145141", "0.51395965", "0.51354146", "0.5092062", "0.5029836", "0.50201976", "0.46827078", "0.457474...
0.8682726
0
Gets the base_weee_tax_row_disposition of this SalesDataCreditmemoItemInterface. Base WEEE tax row disposition.
def base_weee_tax_row_disposition(self): return self._base_weee_tax_row_disposition
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_weee_tax_disposition(self):\n return self._base_weee_tax_disposition", "def weee_tax_row_disposition(self):\n return self._weee_tax_row_disposition", "def base_weee_tax_row_disposition(self, base_weee_tax_row_disposition):\n\n self._base_weee_tax_row_disposition = base_weee_tax_ro...
[ "0.78180426", "0.76425", "0.7584106", "0.69481015", "0.6748301", "0.6719586", "0.6258727", "0.5947542", "0.55819255", "0.55237263", "0.5482551", "0.54486567", "0.5309209", "0.52852553", "0.5175243", "0.5099763", "0.48826978", "0.4874494", "0.48656547", "0.48154193", "0.480647...
0.8490926
0
Sets the base_weee_tax_row_disposition of this SalesDataCreditmemoItemInterface. Base WEEE tax row disposition.
def base_weee_tax_row_disposition(self, base_weee_tax_row_disposition): self._base_weee_tax_row_disposition = base_weee_tax_row_disposition
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_weee_tax_disposition(self, base_weee_tax_disposition):\n\n self._base_weee_tax_disposition = base_weee_tax_disposition", "def base_weee_tax_row_disposition(self):\n return self._base_weee_tax_row_disposition", "def weee_tax_row_disposition(self, weee_tax_row_disposition):\n\n self...
[ "0.7798133", "0.71967304", "0.6947672", "0.6572177", "0.6473657", "0.63096166", "0.6036534", "0.59194607", "0.58535075", "0.5729029", "0.52993566", "0.52777535", "0.51083374", "0.50990266", "0.5065263", "0.49898353", "0.48307782", "0.4785986", "0.46864748", "0.4682383", "0.45...
0.8606149
0
Gets the description of this SalesDataCreditmemoItemInterface. Description.
def description(self): return self._description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_description(self):\r\n return self.__description", "def get_description(self):\n return self.__description", "def description(self) :\n\t\ttry :\n\t\t\treturn self._description\n\t\texcept Exception as e:\n\t\t\traise e", "def description(self) :\n\t\ttry :\n\t\t\treturn self._descripti...
[ "0.70290726", "0.7028892", "0.6982736", "0.6982736", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", "0.69567704", ...
0.6931987
52
Sets the description of this SalesDataCreditmemoItemInterface. Description.
def description(self, description): self._description = description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_desc(self, item_desc):\r\n self.description = item_desc", "def set_description(self, description):\r\n self.__description = description", "def set_description(self, description):\n self.__description = description", "def set_description(self, description):\n self._description ...
[ "0.7295275", "0.7288686", "0.72784424", "0.72739005", "0.72726536", "0.7164833", "0.71166563", "0.7094985", "0.7034874", "0.6991564", "0.6991564", "0.6991564", "0.6991564", "0.69664925", "0.69455546", "0.6918965", "0.6918965", "0.6918965", "0.6918965", "0.6860249", "0.6801377...
0.6996396
26
Gets the entity_id of this SalesDataCreditmemoItemInterface. Credit memo item ID.
def entity_id(self): return self._entity_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def item_id(self):\n return self._item_id", "def order_item_id(self):\n return self._order_item_id", "def entity_id(self) -> str:\n return self._entity_id", "def GetItemIdentity(self, item):\n\n return self.GetIndexOfItem(item)", "def GetId(self,item):\r\n id = self.item_...
[ "0.65976864", "0.61661625", "0.6024641", "0.60157764", "0.5860955", "0.57089794", "0.5701797", "0.5682917", "0.5668368", "0.558213", "0.5579894", "0.55606216", "0.5490343", "0.5477784", "0.5416996", "0.5416996", "0.5414114", "0.54117966", "0.54071057", "0.5400764", "0.5400764...
0.6418878
3
Sets the entity_id of this SalesDataCreditmemoItemInterface. Credit memo item ID.
def entity_id(self, entity_id): if entity_id is None: raise ValueError("Invalid value for `entity_id`, must not be `None`") self._entity_id = entity_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def entity_id(self, entity_id):\n\n self._entity_id = entity_id", "def entity_id(self, entity_id: str):\n\n self._entity_id = entity_id", "def entities_id(self, entities_id):\n\n self._entities_id = entities_id", "def set_EntityID(self, value):\n super(EntityOverviewInputSet, self...
[ "0.701472", "0.68806636", "0.59454215", "0.59170216", "0.5901311", "0.5901311", "0.5901311", "0.56690156", "0.56020695", "0.5526423", "0.53669393", "0.5357325", "0.5348359", "0.53201836", "0.5299365", "0.5288586", "0.52742475", "0.5272569", "0.52260613", "0.5222159", "0.52221...
0.67304766
2
Gets the discount_tax_compensation_amount of this SalesDataCreditmemoItemInterface. Discount tax compensation amount.
def discount_tax_compensation_amount(self): return self._discount_tax_compensation_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_discount_tax_compensation_amount(self):\n return self._base_discount_tax_compensation_amount", "def discount_tax_compensation_amount(self, discount_tax_compensation_amount):\n\n self._discount_tax_compensation_amount = discount_tax_compensation_amount", "def discount_amount(self):\n ...
[ "0.75510585", "0.69652236", "0.6750248", "0.64017856", "0.6303859", "0.6213796", "0.599646", "0.5796588", "0.57680243", "0.56560105", "0.5572535", "0.5470463", "0.53379196", "0.5287031", "0.5285753", "0.5275953", "0.5261223", "0.5258905", "0.5216622", "0.52060014", "0.5132971...
0.81742895
0
Gets the name of this SalesDataCreditmemoItemInterface. Name.
def name(self): return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_item_name(self):\n return self.__item_name", "def name(self):\r\n return self._name", "def name(self):\r\n return self._name", "def name(self):\r\n return self._name", "def name(self):\r\n return self._name", "def name(self):\r\n return self._name", "de...
[ "0.7404835", "0.6997893", "0.6997893", "0.6997893", "0.6997893", "0.6997893", "0.6997893" ]
0.69552904
92
Sets the name of this SalesDataCreditmemoItemInterface. Name.
def name(self, name): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, item_name):\r\n self.name = item_name", "def SetName(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name...
[ "0.7403169", "0.7387061", "0.735223", "0.735223", "0.735223", "0.735223", "0.735223", "0.73452765", "0.7289304", "0.7269441", "0.7264426", "0.7264426", "0.72572666", "0.72355044", "0.72355044", "0.7210897", "0.7169052", "0.71448636", "0.713499", "0.713499", "0.713499", "0.7...
0.69855785
90
Gets the order_item_id of this SalesDataCreditmemoItemInterface. Order item ID.
def order_item_id(self): return self._order_item_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getWorkflowIdByOrderItemId(self, session, order_item_id):\n code = self.getWorkflowByOrderItemId(session, order_item_id)\n return self.workflows.getId(code)", "def item_id(self):\n return self._item_id", "def order_item_id(self, order_item_id):\n if order_item_id is None:\n ...
[ "0.70464903", "0.67819405", "0.6768034", "0.67003524", "0.6445846", "0.63562196", "0.6309324", "0.5995626", "0.59477687", "0.5927667", "0.57709396", "0.57279474", "0.56732196", "0.5618754", "0.557926", "0.5573514", "0.54973775", "0.5479609", "0.5479534", "0.5399774", "0.53971...
0.8287791
0
Sets the order_item_id of this SalesDataCreditmemoItemInterface. Order item ID.
def order_item_id(self, order_item_id): if order_item_id is None: raise ValueError("Invalid value for `order_item_id`, must not be `None`") self._order_item_id = order_item_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def order_id(self, order_id):\n\n self._order_id = order_id", "def order_id(self, order_id):\n\n self._order_id = order_id", "def order_id(self, order_id):\n\n self._order_id = order_id", "def order_item_id(self):\n return self._order_item_id", "def item_id(self, item_id):\n\n ...
[ "0.67962354", "0.67962354", "0.67962354", "0.6644129", "0.6544953", "0.6544953", "0.6544953", "0.64274573", "0.6354698", "0.60366243", "0.60035104", "0.598444", "0.5831983", "0.5744806", "0.57121354", "0.5423643", "0.53595674", "0.53595674", "0.5311812", "0.53099686", "0.5184...
0.84978944
0
Gets the parent_id of this SalesDataCreditmemoItemInterface. Parent ID.
def parent_id(self): return self._parent_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parent_id(self) -> int:\n return self._parent_id", "def get_parent_id(self):\n return self._parent_id", "def parent_id(self) -> pulumi.Output[int]:\n return pulumi.get(self, \"parent_id\")", "def parent_id(self) -> str:\n return self._db_data.parent_id", "def parent_id(self)...
[ "0.80583256", "0.80115473", "0.7696977", "0.76609635", "0.7657169", "0.7657169", "0.7352494", "0.7163019", "0.70898134", "0.7075747", "0.7065261", "0.70255107", "0.70014495", "0.698195", "0.6976396", "0.6976396", "0.6976396", "0.6976396", "0.6938258", "0.6933353", "0.6933353"...
0.8069933
0
Gets the price of this SalesDataCreditmemoItemInterface. Price.
def price(self): return self._price
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_price(self):\n return self._price", "def price(self) -> float:\n return self._price", "def getPrice(self):\n return self.price", "def get_price(self):\n return self.price", "def get_price(self):\n return self.price", "def get_price(self):\n return self.pr...
[ "0.7233369", "0.7226121", "0.69903636", "0.69444585", "0.69444585", "0.69444585", "0.68837035", "0.68552685", "0.67837167", "0.67489463", "0.6572403", "0.63834894", "0.63591486", "0.6234348", "0.6226459", "0.61041754", "0.60968053", "0.6089243", "0.60819227", "0.6047825", "0....
0.71119225
2
Sets the price of this SalesDataCreditmemoItemInterface. Price.
def price(self, price): self._price = price
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_price(self, price):\n assert isinstance(price, float), 'Price must be a float'\n self._price = price", "def price(self, price: float):\n\n self._price = price", "def set_price(self, _price):\n self.price = _price\n return self.price", "def setPrice(self, val):\n ...
[ "0.75619984", "0.73657405", "0.7349466", "0.73317313", "0.7286012", "0.6678412", "0.6490411", "0.63689816", "0.6020063", "0.59649515", "0.59217715", "0.5846319", "0.5828293", "0.5806622", "0.57005006", "0.5655526", "0.5611654", "0.5609667", "0.5598726", "0.54536176", "0.54346...
0.72462183
6
Gets the price_incl_tax of this SalesDataCreditmemoItemInterface. Price including tax.
def price_incl_tax(self): return self._price_incl_tax
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_price_incl_tax(self):\n return self._base_price_incl_tax", "def price_incl_tax(self, price_incl_tax):\n\n self._price_incl_tax = price_incl_tax", "def basket_total_incl_tax(self):\n return self.total_incl_tax - self.shipping_incl_tax - self.surcharge_incl_tax", "def row_total_in...
[ "0.78509426", "0.7141259", "0.70867556", "0.6959369", "0.68811095", "0.68332446", "0.6795912", "0.6473147", "0.6324999", "0.62962854", "0.6137917", "0.60876673", "0.60876", "0.60766083", "0.600958", "0.60059583", "0.6000058", "0.5953937", "0.58543694", "0.5749706", "0.5734992...
0.8360489
0
Gets the product_id of this SalesDataCreditmemoItemInterface. Product ID.
def product_id(self): return self._product_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def product_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"product_id\")", "def product_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"product_id\")", "def product_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"product_id\")", "def get_produ...
[ "0.7057706", "0.6894861", "0.68484294", "0.6294289", "0.61784875", "0.6162534", "0.60943073", "0.6053444", "0.5940589", "0.5873513", "0.5868137", "0.58320624", "0.58271915", "0.58107555", "0.57683223", "0.57683223", "0.5726723", "0.5726723", "0.57031316", "0.56533676", "0.561...
0.76605815
1
Sets the product_id of this SalesDataCreditmemoItemInterface. Product ID.
def product_id(self, product_id): self._product_id = product_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def product_id(self, product_id):\n self._product_id = product_id", "def product_id(self, product_id):\n if product_id is None:\n raise ValueError(\"Invalid value for `product_id`, must not be `None`\") # noqa: E501\n\n self._product_id = product_id", "def product(self, product...
[ "0.80264276", "0.7583323", "0.6665592", "0.662069", "0.662069", "0.6455344", "0.64183086", "0.63256365", "0.63256365", "0.63256365", "0.63256365", "0.6286484", "0.61201143", "0.60445756", "0.60445756", "0.5968364", "0.5955566", "0.5945393", "0.5918245", "0.58312935", "0.58096...
0.8085936
0
Gets the qty of this SalesDataCreditmemoItemInterface. Quantity.
def qty(self): return self._qty
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def quantity(self):\n return self._quantity", "def quantity(self) -> int:\n return self._quantity", "def quantity(self) -> int:\n if self._cached_items is not None:\n return sum([item.quantity for item in self._cached_items])\n aggr = self.items.aggregate(quantity=models....
[ "0.7243956", "0.7212622", "0.6928063", "0.68019", "0.6770866", "0.67574584", "0.67536575", "0.65517163", "0.64424807", "0.6287603", "0.6278461", "0.6252748", "0.62308574", "0.61909914", "0.618323", "0.60377944", "0.60377944", "0.5957677", "0.58733207", "0.58696234", "0.581884...
0.80315286
1
Gets the row_total of this SalesDataCreditmemoItemInterface. Row total.
def row_total(self): return self._row_total
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_row_total(self):\n return self._base_row_total", "def total_rows(self):\n total_rows = self._properties.get(\"totalRows\")\n if total_rows is not None:\n return int(total_rows)", "def row_total_incl_tax(self):\n return self._row_total_incl_tax", "def total_rows...
[ "0.7386892", "0.7034809", "0.62115866", "0.6170991", "0.61473817", "0.6060215", "0.60063255", "0.59999496", "0.5998373", "0.59507287", "0.5889154", "0.58668464", "0.58640414", "0.57964045", "0.56702465", "0.5639668", "0.562019", "0.55956554", "0.5576943", "0.5557872", "0.5534...
0.7944998
0
Sets the row_total of this SalesDataCreditmemoItemInterface. Row total.
def row_total(self, row_total): self._row_total = row_total
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_row_total(self, base_row_total):\n\n self._base_row_total = base_row_total", "def row_total(self):\n return self._row_total", "def row_total_incl_tax(self, row_total_incl_tax):\n\n self._row_total_incl_tax = row_total_incl_tax", "def base_row_total(self):\n return self._b...
[ "0.71573853", "0.62855923", "0.60870093", "0.5954386", "0.5945556", "0.5945556", "0.5945556", "0.5945556", "0.5945556", "0.5945556", "0.5945556", "0.5945556", "0.5645901", "0.5605544", "0.5590327", "0.5548921", "0.54655784", "0.54007816", "0.5349135", "0.53354275", "0.5329225...
0.8158432
0
Gets the row_total_incl_tax of this SalesDataCreditmemoItemInterface. Row total including tax.
def row_total_incl_tax(self): return self._row_total_incl_tax
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_row_total_incl_tax(self):\n return self._base_row_total_incl_tax", "def row_total_incl_tax(self, row_total_incl_tax):\n\n self._row_total_incl_tax = row_total_incl_tax", "def base_row_total_incl_tax(self, base_row_total_incl_tax):\n\n self._base_row_total_incl_tax = base_row_total...
[ "0.8209233", "0.75764936", "0.7379198", "0.7359875", "0.6604158", "0.6549618", "0.65268195", "0.639893", "0.6361839", "0.63167113", "0.6238019", "0.62010175", "0.6017378", "0.59596694", "0.5905294", "0.5847262", "0.5825788", "0.58223933", "0.5759085", "0.571893", "0.5679795",...
0.8529321
0
Sets the row_total_incl_tax of this SalesDataCreditmemoItemInterface. Row total including tax.
def row_total_incl_tax(self, row_total_incl_tax): self._row_total_incl_tax = row_total_incl_tax
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_row_total_incl_tax(self, base_row_total_incl_tax):\n\n self._base_row_total_incl_tax = base_row_total_incl_tax", "def row_total_incl_tax(self):\n return self._row_total_incl_tax", "def base_row_total_incl_tax(self):\n return self._base_row_total_incl_tax", "def price_incl_tax(se...
[ "0.81365985", "0.7439624", "0.72124463", "0.6245481", "0.6206099", "0.61980677", "0.61185354", "0.6111757", "0.6100685", "0.59576285", "0.5948824", "0.55520105", "0.5515196", "0.5504141", "0.548741", "0.54049873", "0.53834844", "0.5381674", "0.5381674", "0.5371273", "0.536416...
0.8832384
0
Gets the sku of this SalesDataCreditmemoItemInterface. SKU.
def sku(self): return self._sku
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sku(self) -> pulumi.Output['outputs.IotHubDpsSku']:\n return pulumi.get(self, \"sku\")", "def sku(self) -> pulumi.Output['outputs.SkuResponse']:\n return pulumi.get(self, \"sku\")", "def sku(self) -> 'outputs.SkuResponse':\n return pulumi.get(self, \"sku\")", "def sku(self) -> 'outpu...
[ "0.776764", "0.7733385", "0.7607328", "0.7607328", "0.7594456", "0.7594456", "0.7453689", "0.7453689", "0.73903996", "0.73903996", "0.7384048", "0.73748845", "0.7301742", "0.71958226", "0.71848404", "0.7161589", "0.6963246", "0.6963246", "0.6963246", "0.6960397", "0.6871326",...
0.79760146
0
Sets the sku of this SalesDataCreditmemoItemInterface. SKU.
def sku(self, sku): self._sku = sku
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sku_uuid(self, sku_uuid):\n if sku_uuid is None:\n raise ValueError(\"Invalid value for `sku_uuid`, must not be `None`\") # noqa: E501\n\n self._sku_uuid = sku_uuid", "def sku(self) -> pulumi.Input['IotHubDpsSkuArgs']:\n return pulumi.get(self, \"sku\")", "def sku(self) -> ...
[ "0.66556674", "0.6402845", "0.6226774", "0.6199446", "0.6138448", "0.6072551", "0.6039654", "0.6039654", "0.599344", "0.59861255", "0.59861255", "0.5888354", "0.5888354", "0.5835188", "0.5806514", "0.5771892", "0.5738134", "0.5738134", "0.5738134", "0.57168883", "0.5689062", ...
0.80268776
0
Sets the tax_amount of this SalesDataCreditmemoItemInterface. Tax amount.
def tax_amount(self, tax_amount): self._tax_amount = tax_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_tax_amount(self, base_tax_amount):\n\n self._base_tax_amount = base_tax_amount", "def base_currency_tax_amount(self, base_currency_tax_amount):\n\n self._base_currency_tax_amount = base_currency_tax_amount", "def tax_id(self, tax_id):\n\n self._tax_id = tax_id", "def tax_id(self...
[ "0.7138632", "0.71245885", "0.675843", "0.65878576", "0.6578362", "0.6430527", "0.63932866", "0.62059003", "0.6181891", "0.5929916", "0.58346426", "0.5790762", "0.5772467", "0.57562596", "0.57345885", "0.57169974", "0.5711364", "0.55943817", "0.54827917", "0.5446161", "0.5352...
0.80188644
0
Sets the weee_tax_applied_amount of this SalesDataCreditmemoItemInterface. WEEE tax applied amount.
def weee_tax_applied_amount(self, weee_tax_applied_amount): self._weee_tax_applied_amount = weee_tax_applied_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weee_tax_applied(self, weee_tax_applied):\n\n self._weee_tax_applied = weee_tax_applied", "def base_weee_tax_applied_amount(self, base_weee_tax_applied_amount):\n\n self._base_weee_tax_applied_amount = base_weee_tax_applied_amount", "def weee_tax_applied_row_amount(self, weee_tax_applied_row_...
[ "0.7975564", "0.7344134", "0.6978691", "0.6877086", "0.63714015", "0.60796523", "0.6001319", "0.56003594", "0.48556224", "0.48556224", "0.47565642", "0.4746736", "0.47198895", "0.47016641", "0.4690297", "0.46176982", "0.44991532", "0.43433583", "0.43288705", "0.43285277", "0....
0.8463849
0
Gets the weee_tax_applied_row_amount of this SalesDataCreditmemoItemInterface. WEEE tax applied row amount.
def weee_tax_applied_row_amount(self): return self._weee_tax_applied_row_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weee_tax_applied_amount(self):\n return self._weee_tax_applied_amount", "def weee_tax_applied_row_amount(self, weee_tax_applied_row_amount):\n\n self._weee_tax_applied_row_amount = weee_tax_applied_row_amount", "def base_weee_tax_applied_amount(self):\n return self._base_weee_tax_appli...
[ "0.77344495", "0.7501163", "0.71697605", "0.6672802", "0.65627384", "0.65289426", "0.63015956", "0.59198153", "0.5891419", "0.58732355", "0.58515936", "0.5699864", "0.543594", "0.5252718", "0.5215197", "0.5063173", "0.49616405", "0.49488592", "0.49454534", "0.49425924", "0.49...
0.84448296
0
Sets the weee_tax_applied_row_amount of this SalesDataCreditmemoItemInterface. WEEE tax applied row amount.
def weee_tax_applied_row_amount(self, weee_tax_applied_row_amount): self._weee_tax_applied_row_amount = weee_tax_applied_row_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weee_tax_applied_amount(self, weee_tax_applied_amount):\n\n self._weee_tax_applied_amount = weee_tax_applied_amount", "def weee_tax_applied(self, weee_tax_applied):\n\n self._weee_tax_applied = weee_tax_applied", "def weee_tax_applied_row_amount(self):\n return self._weee_tax_applied_r...
[ "0.77741754", "0.7231101", "0.7069089", "0.66989446", "0.6541933", "0.63821644", "0.58991754", "0.58923304", "0.57445073", "0.54583967", "0.5088031", "0.48261583", "0.4748188", "0.468741", "0.468741", "0.44710252", "0.4464723", "0.44304964", "0.43845904", "0.43190882", "0.430...
0.8506182
0
Gets the weee_tax_row_disposition of this SalesDataCreditmemoItemInterface. WEEE tax row disposition.
def weee_tax_row_disposition(self): return self._weee_tax_row_disposition
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_weee_tax_row_disposition(self):\n return self._base_weee_tax_row_disposition", "def weee_tax_disposition(self):\n return self._weee_tax_disposition", "def weee_tax_row_disposition(self, weee_tax_row_disposition):\n\n self._weee_tax_row_disposition = weee_tax_row_disposition", "d...
[ "0.79320765", "0.7353437", "0.71688044", "0.70003444", "0.64207697", "0.5953334", "0.5775061", "0.56985086", "0.5424323", "0.5336248", "0.51824474", "0.49090448", "0.48912004", "0.48805615", "0.47695032", "0.46280083", "0.4572082", "0.4543244", "0.44909158", "0.44707417", "0....
0.8341837
0
Sets the weee_tax_row_disposition of this SalesDataCreditmemoItemInterface. WEEE tax row disposition.
def weee_tax_row_disposition(self, weee_tax_row_disposition): self._weee_tax_row_disposition = weee_tax_row_disposition
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_weee_tax_row_disposition(self, base_weee_tax_row_disposition):\n\n self._base_weee_tax_row_disposition = base_weee_tax_row_disposition", "def weee_tax_disposition(self, weee_tax_disposition):\n\n self._weee_tax_disposition = weee_tax_disposition", "def weee_tax_row_disposition(self):\n ...
[ "0.72133183", "0.71071655", "0.6755139", "0.6413006", "0.603336", "0.5564357", "0.54715955", "0.53115267", "0.52927244", "0.5035155", "0.48815647", "0.48040435", "0.47486624", "0.46950567", "0.45673335", "0.43665877", "0.43665877", "0.43359652", "0.42153084", "0.41642252", "0...
0.8323727
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, SalesDataCreditmemoItemInterface): 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.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Dump the detection results to a json file.
def results2json(self, results, outfile_prefix): result_files = dict() if isinstance(results[0], list): json_results = self._det2json(results) result_files['bbox'] = '{}.{}.json'.format(outfile_prefix, 'bbox') result_files['proposal'] = '{}.{}.json'.format( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _dump_json(self):\n if not self._current_id == len(self._img_ids):\n warnings.warn(\n 'Recorded {} out of {} validation images, incomplete results'.format(\n self._current_id, len(self._img_ids)))\n try:\n with open(self._filename, 'w') as f...
[ "0.7485278", "0.6980189", "0.6920951", "0.6876131", "0.6839121", "0.67509454", "0.6707654", "0.649388", "0.64624584", "0.6436951", "0.64177805", "0.6417267", "0.6407214", "0.63596034", "0.6275019", "0.6272109", "0.6270959", "0.62649834", "0.6183499", "0.6165267", "0.61650366"...
0.5978123
31
Create a map from supercell indices to cell+atom indices.
def id2ind(ngrid,nspecies,filename): ntot=ngrid[0]*ngrid[1]*ngrid[2]*nspecies np_icell=np.empty((3,ntot),dtype=np.intc) np_ispecies=np.empty(ntot,dtype=np.intc) icell=np_icell ispecies=np_ispecies f=StringIO.StringIO() for ii in xrange(ntot): tmp,ispecies[ii]=divmod(ii,nspecies...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_cell_map(dim):\n for cell, faces in cell_face_map.iteritems():\n \n for face in faces:\n nds = face_list[face - 1][1]\n \n if not cell in cell_map:\n cell_map[cell] = copy(nds)\n \n else:\n cell...
[ "0.6773924", "0.6425187", "0.6413371", "0.63686776", "0.62227666", "0.6170512", "0.6117207", "0.6109963", "0.59253305", "0.59118426", "0.5879733", "0.5866969", "0.5823949", "0.5804459", "0.57437575", "0.57106847", "0.5672465", "0.5671654", "0.5671654", "0.56591254", "0.565173...
0.0
-1
Set up the sensor platform.
async def async_setup_platform( hass: HomeAssistantType, config: ConfigType, async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None, ): component_config = hass.data[DOMAIN][DOMAIN_CONFIG] source_entity = config[CONF_ENTITY_ID] source_entity_domain, source_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_sensors(self, configs):\n self.__sensors = self.setup_components(configs, 'scale_client.sensors')", "def setup_platform(\n hass: HomeAssistant,\n config: ConfigType,\n add_entities: AddEntitiesCallback,\n discovery_info: DiscoveryInfoType | None = None,\n) -> None:\n name = config...
[ "0.7161053", "0.7153387", "0.7075047", "0.7040154", "0.6979527", "0.6920127", "0.6885005", "0.6857596", "0.68458396", "0.6802712", "0.680186", "0.677836", "0.67364186", "0.67142266", "0.67105585", "0.6710512", "0.6702681", "0.6694298", "0.6671031", "0.6669839", "0.6637563", ...
0.0
-1
Return entity state attributes.
def extra_state_attributes(self): return { ATTR_SOURCE_ENTITY: self._source_entity, ATTR_SOURCE_DOMAIN: self._source_domain, }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_attributes(self):\n return self._attributes", "def state_attributes(self):\n return self._attributes", "def state_attributes(self):\n return self._vehicle.data", "def device_state_attributes(self):\r\n return self.attributes", "def extra_state_attributes(self):\n re...
[ "0.8041726", "0.8041726", "0.76568705", "0.7608634", "0.7565971", "0.7475615", "0.74507964", "0.7420712", "0.7408376", "0.7408376", "0.73997754", "0.736207", "0.736207", "0.73488045", "0.7347999", "0.7347999", "0.7347999", "0.7347999", "0.7347999", "0.7347999", "0.7347999", ...
0.7047493
42
Return the name of the sensor.
def name(self): return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self._sensor.name", "def get_sensor_name(self):\n return self.data[1]", "def name(self):\n return self.device.device_data[self.device_id]['name'] + \\\n f' {self._sensor_type}'", "def name(self):\n return f\"{self._name} {SENSOR_TYPES[self.senso...
[ "0.91896784", "0.9168378", "0.890185", "0.8770976", "0.8511273", "0.8479953", "0.844435", "0.8299758", "0.8186503", "0.8105667", "0.8079737", "0.8066149", "0.8049647", "0.7700968", "0.7612295", "0.7611456", "0.7600605", "0.7600605", "0.7600605", "0.75392073", "0.75166553", ...
0.0
-1
Return the state attributes of the acceleration sensor.
def extra_state_attributes(self) -> dict[str, Any]: state_attr = super().extra_state_attributes state_attr[ATTR_SOURCE_ENTITY] = self._powercalc_source_entity state_attr[ATTR_SOURCE_DOMAIN] = self._powercalc_source_domain return state_attr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_state_attributes(self):\n return self._emeter_params", "def device_state_attributes(self):\r\n return self.attributes", "def device_state_attributes(self):\r\n return self._attributes", "def device_state_attributes(self):\n return self.attr", "def device_state_attribu...
[ "0.7585081", "0.74907184", "0.7377615", "0.7334053", "0.7334053", "0.7315807", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7313242", "0.7310904", "0.7306046", ...
0.0
-1
Method to get the X coordinates of the 2D point cloud.
def x(self): self._sort_measurements() return self._distances*np.cos(self._angles)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def x_points(self):\n return self._x_points", "def x(self):\n return _libsbml.Point_x(self)", "def get_x(self):\n return self.coords[0]", "def x(self):\n return self.coords[0]", "def x(self):\n if self._x is None:\n self.compute_coordinates()\n return se...
[ "0.74554855", "0.72680354", "0.7023877", "0.6965493", "0.6936362", "0.6923121", "0.69049615", "0.68742484", "0.6858923", "0.6854406", "0.68191195", "0.6800628", "0.6716758", "0.67120814", "0.6691107", "0.66714466", "0.664067", "0.66038847", "0.65865475", "0.65834314", "0.6579...
0.0
-1
Method to get the Y coordinates of the 2D point cloud.
def y(self): self._sort_measurements() return self._distances*np.sin(self._angles)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def y_points(self):\n return self._y_points", "def get_y(self):\n return self.coords[1]", "def y(self):\n return self.coords[1]", "def y(self):\n return self._coords[1]", "def get_y_position(self):\n return self.actual_coordinates[1]", "def y(self):\n return _lib...
[ "0.757068", "0.7509765", "0.74566513", "0.7367678", "0.7306514", "0.7302302", "0.7191246", "0.7189406", "0.7169672", "0.7150352", "0.7085721", "0.70303065", "0.70303065", "0.70178944", "0.70115936", "0.70115936", "0.70030725", "0.69987893", "0.69906336", "0.6973126", "0.69540...
0.64199406
83
Find the distance between the two nearest eigenvalues. dn_j = min |lambda_j(N1) lamda_i(N2)| / sigma_j k in [1, N2]
def nearest_difference(evs1, evs2): sigma = calc_sigma(evs1) nearestDiff = zeros((vecLen-1), dtype='d') for j in range(vecLen-1): minimum = infty for i in range(vecLen2): diff = absolute(evs1[j] - evs2[i]) / sigma[j] if diff < minimum: minimum = diff ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lambda_dist(A1, A2, k=None, p=2, kind=\"laplacian\"):\n # ensure valid k\n n1, n2 = [A.shape[0] for A in [A1, A2]]\n N = min(n1, n2) # minimum size between the two graphs\n if k is None or k > N:\n k = N\n\n # form matrices\n L1, L2 = [laplacian_matrix(A) for A in [A1, A2]]\n # get...
[ "0.6916875", "0.6248177", "0.62059265", "0.61837155", "0.61533964", "0.6138138", "0.609502", "0.6066514", "0.6063088", "0.60610825", "0.60440654", "0.60339147", "0.6011793", "0.5965527", "0.59459984", "0.5944676", "0.5939683", "0.59371704", "0.59359956", "0.5934642", "0.59321...
0.6426528
1
Computes the accuracy over the k top predictions for the specified values of k
def accuracy(output, target, topk=(1,)): with torch.no_grad(): maxk = max(topk) batch_size = target.size(0) _, pred = output.topk(maxk, 1, True, True) # print(_) pred = pred.t() # print(pred) correct = pred.eq(target.view(1, -1).expand_as(pred)) res ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def topk_accuracy(y, y_pred, k=2):\n pred = []\n for i in range(len(y)):\n if y[i] in y_pred[i][:k]:\n pred.append(1)\n else:\n pred.append(0)\n return sum(pred) / len(pred)", "def accuracy(y_pred, y_actual, topk=(1, )):\n maxk = max(topk)\n batch_size = y_actua...
[ "0.8331214", "0.8284662", "0.82381004", "0.8229767", "0.82202226", "0.81864446", "0.81847763", "0.8175173", "0.8171541", "0.81699467", "0.81664646", "0.81645083", "0.81637454", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "...
0.7871788
65
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
72
Primitive version of just_burn_layer, where ds_out has already been created. It is the callers responsibility to supply a properly filtered layer, e.g. by setting a client side spatial filter, or by using a dataprovider side filter, e.g. in layersql.
def rasterize_layer(layer, ds_out, attr=None, burn3d=False, all_touched=True): options = [] if all_touched: options.append('ALL_TOUCHED=TRUE') if attr is not None and burn3d: raise ValueError("attr and burn3d keywords incompatible.") if attr is not None: # we want to burn an attr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def just_burn_layer(layer, georef, shape, attr=None, nd_val=0,\n dtype=np.bool, all_touched=True, burn3d=False,\n output_srs=None):\n if burn3d and attr is not None:\n raise ValueError(\"burn3d and attr can not both be set\")\n mem_driver = gdal.GetDriverByName(\"...
[ "0.6465441", "0.5389565", "0.51935273", "0.51445055", "0.51409614", "0.51217425", "0.5069709", "0.5043455", "0.504285", "0.50344855", "0.503377", "0.50037825", "0.49773207", "0.49498302", "0.49100477", "0.4908837", "0.4900176", "0.48904392", "0.48765898", "0.48612988", "0.484...
0.6249017
1
Custom app's index string
def customize_index_string(app, url): app.index_string = env.get_template("dash_layout.html").render( top_menu_items=get_top_menu_items(url) )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index():\n return render_template(\n 'index_t.html',\n call_counter=str(get_model().call_counter),\n app_version=str(app.config.get('GIT_HASH', None))\n )", "async def index():\n return \"Index\"", "def admin_index():\n return 'Super-seekrit admin page.'", "def app_index(...
[ "0.6900129", "0.6817589", "0.67987037", "0.6780246", "0.67567384", "0.6667487", "0.6604017", "0.65435874", "0.65226454", "0.65130556", "0.648694", "0.6481801", "0.647468", "0.6469965", "0.6465853", "0.64484626", "0.6424604", "0.64114815", "0.6365855", "0.6361939", "0.63546723...
0.75796944
0
Create a Dash app with customized index layout
def create_dash_app(server, url_rule, url_base_pathname): app = dash.Dash(name=__name__, server=server, url_base_pathname=url_base_pathname) customize_index_string(app, url_rule) add_route(app, url_rule) return app
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_app() -> Dash:\n app = Dash(__name__)\n app.index_string = build_template_index()\n app.layout = html.Div(\n html.Div([\n dcc.Interval(\n id='interval-component',\n interval=UPDATE_INTERVAL,\n n_intervals=0,\n ),\n ...
[ "0.69023657", "0.6864342", "0.685731", "0.6839443", "0.6808027", "0.6643755", "0.6629337", "0.6624986", "0.66192967", "0.6595166", "0.6595166", "0.6594368", "0.6591873", "0.65839773", "0.65734863", "0.6572495", "0.65717125", "0.65314686", "0.65314686", "0.65199006", "0.651990...
0.6254455
100
Removes annual mean from data set
def remove_annual_mean(data,data_obs,lats,lons,lats_obs,lons_obs): ### Import modulates import numpy as np import calc_Utilities as UT ### Create 2d grid lons2,lats2 = np.meshgrid(lons,lats) lons2_obs,lats2_obs = np.meshgrid(lons_obs,lats_obs) ### Calculate weighted average an...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_temporal_mean(self):\n if not hasattr(self, 'detrended_data'):\n self.detrend_data()\n self.mean_removed_data = self.detrended_data - \\\n np.mean(self.detrended_data, axis=-1, keepdims=True)", "def demeaned(self):\n return self.data - self.mean", "def remo...
[ "0.7158292", "0.6480982", "0.6441694", "0.62169176", "0.62169176", "0.62166506", "0.6138837", "0.6135686", "0.6083054", "0.6083054", "0.6081954", "0.6052996", "0.6018813", "0.6004493", "0.5902682", "0.58981025", "0.58981025", "0.58981025", "0.58588576", "0.58416796", "0.58404...
0.75173366
0
Removes annual mean from data set
def remove_merid_mean(data, data_obs): ### Import modulates import numpy as np ### Move mean of latitude data = data - np.nanmean(data,axis=2)[:,:,np.newaxis,:] data_obs = data_obs - np.nanmean(data_obs,axis=1)[:,np.newaxis,:] return data,data_obs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_annual_mean(data,data_obs,lats,lons,lats_obs,lons_obs):\n \n ### Import modulates\n import numpy as np\n import calc_Utilities as UT\n \n ### Create 2d grid\n lons2,lats2 = np.meshgrid(lons,lats)\n lons2_obs,lats2_obs = np.meshgrid(lons_obs,lats_obs)\n \n ### Calculate weig...
[ "0.75173366", "0.7158292", "0.6480982", "0.62169176", "0.62169176", "0.62166506", "0.6138837", "0.6135686", "0.6083054", "0.6083054", "0.6081954", "0.6052996", "0.6018813", "0.6004493", "0.5902682", "0.58981025", "0.58981025", "0.58981025", "0.58588576", "0.58416796", "0.5840...
0.6441694
3
Find the unique elements of an array. Returns the sorted unique elements of an array. There are two optional
def unique(ar, return_index=False, return_inverse=False, return_counts=False): ar = np.asanyarray(ar).flatten() optional_indices = return_index or return_inverse optional_returns = optional_indices or return_counts if ar.size == 0: if not optional_returns: ret = ar else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unique_of_an_array(an_array):\n temp_array=an_array.copy()\n u=[]\n for i in range(temp_array.shape[0]):\n for j in range(temp_array.shape[1]):\n if temp_array[i][j] not in u:\n u.append(temp_array[i][j])\n return sorted(u)", "def get_uniques(array):\n uniques ...
[ "0.78936493", "0.77469856", "0.7625371", "0.75452256", "0.7208437", "0.7039363", "0.69538933", "0.68958324", "0.67599595", "0.67003244", "0.66023004", "0.6549027", "0.652586", "0.64997864", "0.64487034", "0.63934505", "0.63845", "0.6380664", "0.6339992", "0.63123", "0.6243976...
0.6504827
13
Get the path of the results directory of the most recent training run.
def latest_experiment() -> Path: experiment_dirs = [] for algorithm in OUT_PATH.iterdir(): if not algorithm.is_dir(): continue for experiment in algorithm.iterdir(): if not experiment.is_dir(): continue experiment_dirs.append((experiment.stat().st_mtime, experiment)) ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_results_path(self):\n # if we already have the results path set, please return it\n if self._results_path is not None:\n return self._results_path\n\n self._validate_results_path()\n\n path = self.results_path\n\n if path is None:\n for i in range(1...
[ "0.7666133", "0.72197515", "0.7058776", "0.70271647", "0.69694823", "0.6954462", "0.694537", "0.69244766", "0.68875206", "0.68246484", "0.67965746", "0.6741048", "0.6693113", "0.66828954", "0.6570363", "0.6535139", "0.6462206", "0.6423316", "0.6375466", "0.6351676", "0.633591...
0.65019035
16
Get the leaderboard for a single speed or variant (a.k.a. perfType). There is no leaderboard for correspondence or puzzles.
async def get_one_leaderboard(self, variant: 'VariantTypes', limit: int = 10) -> 'Response': headers = { 'Content-Type': 'application/json', 'Accept': 'application/vnd.lichess.v3+json' } response = await self._client.request(method=RequestMethods.GET, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getLeaderboard(self, **kwargs):\n board = []\n scores = sorted(self._players, key=lambda score: score.dct_net['total'])\n pos = 1\n prev_total = None\n for sc in scores:\n score_dct = {\n 'player': sc.doc,\n 'total' : sc.dct_net['total'],\n }\n if prev_total != None ...
[ "0.6119767", "0.55652505", "0.5563287", "0.53986543", "0.5389442", "0.5354264", "0.53434765", "0.53249997", "0.52740854", "0.52740854", "0.5220087", "0.5185168", "0.5158743", "0.510518", "0.5092565", "0.50562376", "0.5037624", "0.50235844", "0.50030607", "0.500283", "0.500086...
0.57177633
1
Computes the Euclidian distance between two points on a plane
def _get_distance(a, b): return np.sqrt(np.sum((a - b) ** 2))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def distance(d1, d2):\n projection_onto_plane = d2 - projection(d1, d2)\n dist = np.linalg.norm(projection_onto_plane)\n\n return dist", "def euclidean_distance(point_one, point_two):\n return np.linalg.norm(point_one-point_two)", "def eucl_dist(x_0, y_0, x_1, y_1):\n return sqrt((x_1 - x_0)**2 ...
[ "0.7591941", "0.7515873", "0.74975914", "0.7452323", "0.7415577", "0.7395137", "0.73893905", "0.73764634", "0.737364", "0.73187315", "0.7308061", "0.7295079", "0.72853744", "0.7281497", "0.7268039", "0.7255063", "0.7238039", "0.7209405", "0.7206392", "0.71988726", "0.7190423"...
0.6893277
77
verify a given plaintext password against the users passwd hash.
def check_password(self, plaintext_password): return verify_password(plaintext_password, self.passwd_hash)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_password(self, password):\n return check_password_hash(self.password_hash, password)", "def verify_password(stored_passwd, provided_passwd):\n salt = stored_passwd[:64]\n stored_password = stored_passwd[64:]\n pwdhash = hashlib.pbkdf2_hmac(\n 'sha512', provided_passwd.encode('utf-8'...
[ "0.791974", "0.774115", "0.7695923", "0.7596751", "0.7509275", "0.75058484", "0.7481911", "0.7471336", "0.7471336", "0.7471336", "0.7471336", "0.7471336", "0.7471336", "0.7471336", "0.7457787", "0.74565774", "0.7439147", "0.743072", "0.7412534", "0.74102193", "0.7390144", "...
0.7984776
0
Store a hash of a given plaintext passwd for the user.
def password(self): raise RuntimeError("Password can not be read, only set")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def store_password(self, passwd):\n passwd = passwd.strip('\\r\\n')\n if len(passwd) < 8 or len(passwd) > 63:\n return\n pw_h1 = PasswordStore.h1_list[hash(passwd) & 0xFF]\n if self.unique_check:\n pw_bucket = self.pwbuffer.setdefault(pw_h1, set())\n pw_...
[ "0.75514424", "0.75292575", "0.74720615", "0.7362401", "0.6992945", "0.6729173", "0.6567701", "0.65446115", "0.6536014", "0.65317625", "0.6520117", "0.64966005", "0.6349349", "0.6338398", "0.6301995", "0.62941724", "0.6264765", "0.6250834", "0.6247853", "0.6246135", "0.623288...
0.0
-1
Store a hash of a given plaintext passwd for the user.
def wifi_password(self): raise RuntimeError("Password can not be read, only set")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def store_password(self, passwd):\n passwd = passwd.strip('\\r\\n')\n if len(passwd) < 8 or len(passwd) > 63:\n return\n pw_h1 = PasswordStore.h1_list[hash(passwd) & 0xFF]\n if self.unique_check:\n pw_bucket = self.pwbuffer.setdefault(pw_h1, set())\n pw_...
[ "0.75514424", "0.75292575", "0.74720615", "0.7362401", "0.6992945", "0.6729173", "0.6567701", "0.65446115", "0.6536014", "0.65317625", "0.6520117", "0.64966005", "0.6349349", "0.6338398", "0.6301995", "0.62941724", "0.6264765", "0.6250834", "0.6247853", "0.6246135", "0.623288...
0.0
-1
Tries to interpret the next 8 bytes of the data as a 64bit signed integer.
def readLong(data): high, low = struct.unpack(">ll", data[0:8]) big = (long(high) << 32) + low rest = data[8:] return (big, rest)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unpack_int64(data):\n value = unpack(DecodeUtils.INT64_BYTE_FORMAT, data[:8])[0]\n return value, 8", "def unpack64(data):\n\treturn struct.unpack('<Q', data)[0]", "def ReadInt64(self, endian=\"<\"):\n return self.unpack('%sq' % endian, 8)", "def u64(value: bytes, endian: str = \"litt...
[ "0.7762289", "0.6874778", "0.6861906", "0.6823929", "0.67483824", "0.67478263", "0.67311347", "0.6671411", "0.6650291", "0.65823555", "0.65785366", "0.65479016", "0.6543078", "0.6530274", "0.6509419", "0.64365715", "0.6430369", "0.6430369", "0.63791484", "0.6332406", "0.63261...
0.67806673
4
Numpy implementation of the Frechet Distance. The Frechet distance between two multivariate Gaussians X_1 ~ N(mu_1, C_1) and X_2 ~ N(mu_2, C_2) is d^2 = ||mu_1 mu_2||^2 + Tr(C_1 + C_2 2sqrt(C_1C_2)). Stable version by Dougal J. Sutherland.
def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6): mu1 = np.atleast_1d(mu1) mu2 = np.atleast_1d(mu2) sigma1 = np.atleast_2d(sigma1) sigma2 = np.atleast_2d(sigma2) assert mu1.shape == mu2.shape, \ 'Training and test mean vectors have different lengths' assert sigma1.sh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6):\r\n\r\n mu1 = np.atleast_1d(mu1)\r\n mu2 = np.atleast_1d(mu2)\r\n\r\n sigma1 = np.atleast_2d(sigma1)\r\n sigma2 = np.atleast_2d(sigma2)\r\n\r\n assert mu1.shape == mu2.shape, \\\r\n 'Training and test mean vectors have differ...
[ "0.7606642", "0.76047564", "0.7596849", "0.758205", "0.74625677", "0.70021045", "0.6696189", "0.6650844", "0.6601313", "0.6413701", "0.63804895", "0.62471896", "0.61484945", "0.61449146", "0.60775137", "0.5980089", "0.5975887", "0.5942996", "0.59068", "0.5879746", "0.5871435"...
0.75782436
5
Takes in coordinates and returns the area of pixels on sun. Each pixel is projected onto the sun, and therefore pixels close to the limbs have vastly greater areas. This function uses a closed form solution to a spherical area integral to calulate the area based on the heliographic coordinates of the lowerleft(LL) part...
def eoa(self, *args): #Assume coordinate is in center of pixel. #Information on pixel standard is in this article. #http://www.aanda.org/component/article?access=bibcode&bibcode=&bibcode=2002A%2526A...395.1061GFUL if isinstance(args[0], np.ndarray): lonUL, latUL = self.heliographic(args[0], -.5, -.5) lon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def grid_area(ulon,ulat):\n R = 6371. * 1000. # radius of Earth in meters\n dlon = N.diff(ulon)\n dlat = N.diff(ulat)\n dx = N.outer(deg2rad * R * N.cos(deg2rad * ulat),dlon) # dx (meters)\n dy = 60. * 1852. * dlat # dy (meters)\n area = (dx[1:] + dx[:-1])...
[ "0.67975366", "0.66884923", "0.66695815", "0.6659636", "0.65655416", "0.65527797", "0.6506777", "0.6471387", "0.64333546", "0.64294434", "0.6427059", "0.6422193", "0.63669795", "0.63507694", "0.6345721", "0.6344514", "0.63430935", "0.63162535", "0.63162535", "0.6286479", "0.6...
0.0
-1
Returns a datetime instance representing the first meeting past the provided quarter_start
def find_first_meeting(quarter_start, meeting_days, meeting_start_td): # Find DOW numeric_meeting_days = [NUMERIC_DAY_BY_LETTER[day] for day in meeting_days] first_meeting_day = next(date for date in date_candidates(quarter_start) if date.weekday() in numeric_meeting_days) # first_meeting_day is a datetime w/ t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_quarter_start(x: Optional[Date] = None) -> Date:\n asof = x or get_today()\n return asof.replace(month=(asof.month - 1) // 3 * 3 + 1, day=1)", "def get_quarter_end(x: Optional[Date] = None) -> Date:\n return get_quarter_start(x or get_today()) + relativedelta(months=+3, days=-1)", "def current...
[ "0.71675307", "0.66916436", "0.6593046", "0.6352651", "0.59731543", "0.59262675", "0.58177525", "0.5748472", "0.5748472", "0.5693033", "0.5684989", "0.56649774", "0.55997807", "0.5589633", "0.55467314", "0.53396", "0.52527684", "0.51756823", "0.51695263", "0.49352407", "0.485...
0.46866482
34
Fits symmetric Gaussian to x, y, z.
def fit_gaussian(x, y, z): def sym_gaussian(p): """ Returns a Gaussian function: a**2 * exp(-((x - x_0)**2 + (y - y_0)**2) / (2 * sigma**2)) p = [a, x_0, y_0, sigma] """ a, x_0, y_0, sigma = p return a**2 \ * np.exp(-((x - x_0)**2 + (y - y_0)*...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fitSymmetricGaussian3D(data, sigma):\n params = [np.min(data),\n np.max(data),\n 0.5 * data.shape[0],\n 0.5 * data.shape[1],\n 0.5 * data.shape[2],\n 2.0 * sigma[0],\n 2.0 * sigma[1]]\n\n [result, good] = fitAFunctionLS(data, p...
[ "0.6493564", "0.6344277", "0.6110739", "0.6071792", "0.57935226", "0.57306504", "0.5623523", "0.561106", "0.55969065", "0.5572526", "0.55665076", "0.5480784", "0.54594976", "0.54272217", "0.5422381", "0.5411583", "0.5387107", "0.5386327", "0.53731763", "0.5357165", "0.5314036...
0.52317464
31
Determines the position of bead in image in units of pixels with subpixel accuracy.
def bead_position_pix(im, selem): # The x, y coordinates of pixels are nonzero values in selem y, x = np.nonzero(selem) x = x - selem.shape[1] // 2 y = y - selem.shape[0] // 2 # Find the center of the bead to pixel accuracy peak_flat_ind = np.argmax(im) peak_j = peak_flat_ind % im.shape[0] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_pos_in_pixels(self):\n pixelpos = Vector(self.pos.x * 32, -self.pos.y * 32)\n return pixelpos + self.offset", "def get_pixel_pos(self):\n\n c = self.get_center()\n\n return Tank.three_by_three(c[0],c[1])", "def find_position(self, focal_length, real_height):\n height_...
[ "0.6128447", "0.58875567", "0.57903653", "0.575624", "0.57380664", "0.57142186", "0.56217515", "0.5609452", "0.5591921", "0.5526939", "0.5519604", "0.55186164", "0.5506014", "0.54987293", "0.5477852", "0.54706377", "0.5454367", "0.5443622", "0.5439463", "0.5404059", "0.539897...
0.6677721
0
Show 404 page not found
def page_error(e): return render_template('404.html')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def page_not_found(e):\n return render_template(\"404.html\"), 404", "def page_not_found():\n return render_template(\"errors/404.html\"), 404", "def page_not_found(e):\n return render_template('404.html'), 404", "def page_not_found(e):\n return render_template('404.html'), 404", "def page_not_...
[ "0.85550284", "0.8537595", "0.8537151", "0.8537151", "0.85093874", "0.84980124", "0.84952337", "0.8478795", "0.84391016", "0.8376464", "0.835231", "0.8345506", "0.8345506", "0.8345506", "0.8345506", "0.8345506", "0.8345506", "0.8345506", "0.83203936", "0.83203936", "0.8320393...
0.7690007
71
Calculate the 1D Tibaldi index as the zonal mean maximum index value.
def tibaldi_index_1d(tibaldi_ds, time_field=DEFAULT_TIME_FIELD, lon_field=DEFAULT_LON_FIELD, clim_start_year=None, clim_end_year=None, southern_hemisphere=False): if southern_hemisphere: index_field = 'GHGN' else: index_field = 'GHGS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def idx_z(self, zval):\r\n iz = np.around((zval - self.oz) / self.dz)\r\n return int(iz)", "def bias_index(self):\n return _div(abs(self.FN - self.FP), self.grand_total)", "def max_index_in_focal_zone(z, zone):\n _max = -1e32\n imax = None\n for i, zz in enumerate(z):\n if ...
[ "0.63090926", "0.6211651", "0.6081796", "0.59250283", "0.5881445", "0.5840772", "0.583639", "0.583639", "0.583639", "0.5818739", "0.57943267", "0.57201403", "0.5673211", "0.56695855", "0.563869", "0.5632067", "0.56154203", "0.5593752", "0.55519366", "0.55101067", "0.54728377"...
0.0
-1
Should be a HTTP Not Found if no user found /user/exists/
def test_user_not_found(self): data = {'email': 'unmatched email'} response = self.client.post(self.url, data=data) expected_response_code = 200 self.assertEqual(expected_response_code, response.status_code) self.assertFalse(response.data.get('exists'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_user_404(self):\n resp = self.app.get('/users/thisuserdoesntexist')\n assert resp.status_code == 404", "def test_returns_404_if_user_doesnt_exist(self):\n # Act\n response = self.client.get(\"/api/v2/projects/queries/non_existent/touched/\")\n self.assertEqual(resp...
[ "0.75424385", "0.73289776", "0.7220065", "0.72035664", "0.72026694", "0.7154039", "0.7081041", "0.7051961", "0.7026979", "0.6995859", "0.6973285", "0.6966012", "0.6932261", "0.68997127", "0.68735164", "0.68678415", "0.684813", "0.68361294", "0.683299", "0.6822222", "0.6794909...
0.70250833
9
Given a model, returns a list of translated field names for it. The returned list excludes the extra field created for the default language.
def translated_fields(model): options = translator.get_options_for_model(model) fields = [f.name for l in options.fields.values() for f in l] for i, f in enumerate(fields): if f.endswith(settings.MODELTRANSLATION_DEFAULT_LANGUAGE): del fields[i] return fields
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_multilingual_fields(model):\n\n # Gets translation model from generic relation\n try:\n trans_model = model.translations.field.rel.to\n except AttributeError:\n # Unrecognized class or field\n return []\n\n try: # customization hook, this try allows the\n return tran...
[ "0.7969844", "0.69096655", "0.6670378", "0.66633004", "0.65251344", "0.64372575", "0.6409351", "0.6382468", "0.6259908", "0.6166673", "0.6105312", "0.61020726", "0.592334", "0.5883798", "0.58336943", "0.58305687", "0.577085", "0.57489395", "0.57062685", "0.5686937", "0.559510...
0.87681097
0
Reset user star tokens list and update timestamp.
async def reset_st(self, user: discord.User): async with self.config.user(user).todays_st() as todays_st: todays_st.clear() time_now = datetime.utcnow() epoch = datetime(1970, 1, 1) # get timestamp in UTC timestamp = (time_now - epoch).total_seconds() await ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_user_tokens() -> None:\n asyncio.run(clean_old_user_tokens())", "def resetUsers():\n global pollResults\n pollResults = dict()\n emitResults()", "def unstar(request):\n account = models.Account.current_user_account\n account.user_has_selected_nickname() # This will preserve account.fre...
[ "0.6415995", "0.62342906", "0.61301756", "0.6107854", "0.59576285", "0.589924", "0.57762784", "0.5733225", "0.5711327", "0.5599885", "0.5584188", "0.5577342", "0.5550727", "0.5550727", "0.5550727", "0.54463756", "0.54302835", "0.53808653", "0.5365025", "0.5341649", "0.5325117...
0.62931603
1
Return string with trailing whitespaces from each line removed.
def trim_value(value): return '\n'.join((row.rstrip() for row in value.split('\n')))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _strip(lines: Sequence[str]) -> Sequence[str]:\n lines = [i.rstrip() for i in lines]\n return lines", "def strip_trailing_spaces(self):\n for paragraph in self.paragraphs:\n for item in paragraph:\n lines = paragraph[item].split(\"\\n\")\n paragraph[item]...
[ "0.7313975", "0.7131752", "0.69677407", "0.69132537", "0.6850565", "0.6843681", "0.6839277", "0.67566806", "0.66830236", "0.66518056", "0.664262", "0.66326636", "0.66256857", "0.66037107", "0.65539575", "0.6545357", "0.6479206", "0.6409129", "0.6404226", "0.63920116", "0.6386...
0.67753655
7
Return properly quoted string according its content.
def quote(value): single = value.find("'") double = value.find('"') multiline = value.find('\n') != -1 if multiline or ((single != -1) and (double != -1)): if value.find('"""') == -1 and value[0] != '"' and value[-1] != '"': s = '"""%s"""' % value else: s = "'''%s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def quoted_string(content: str) -> str:\n if not (QCONTENT > set(content)):\n raise ValueError(f\"bad content for quoted-string {content!r}\")\n return not_qtext_re.sub(lambda x: \"\\\\\" + x.group(0), content)", "def quoted(val: str) -> str:\n return f'\"{val}\"' if ' ' in val else val", "...
[ "0.76456565", "0.7104577", "0.6711368", "0.66348326", "0.6634781", "0.6594546", "0.65905684", "0.6590563", "0.65543264", "0.65324664", "0.6501285", "0.6499878", "0.6499878", "0.6466871", "0.6395854", "0.63604605", "0.63085455", "0.62894225", "0.6244198", "0.6219105", "0.62152...
0.6823635
2
Returns platforms supported by this test version as list of platform names.
def get_platforms(self): if self.platform == 'All': return PLATFORMS else: return self.platform.split(':')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def platforms(self):\n logger.debug(\"Get platforms\")\n return self._raw_api.platforms.get()", "def Platforms():\n return platforms", "def list_platforms(self):\n return self.do_rpc('list_platforms')", "def platforms(self) -> Any:\n\n return search_api(\"platforms\")", "def ...
[ "0.81936604", "0.8184968", "0.8015468", "0.79159737", "0.77861863", "0.7577894", "0.7395076", "0.7306986", "0.7078193", "0.6980133", "0.6839485", "0.681425", "0.6779934", "0.6684272", "0.66075003", "0.65998095", "0.65983886", "0.6546191", "0.65073466", "0.6495718", "0.6485029...
0.8524877
0
Reduce spaces in string
def space_strip(string): string= re.sub("(?m)^\s+", "", string) return re.sub("(?m)\s+$", "", string)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reduce_spaces(tweet):\r\n text = tweet.strip()\r\n text = \" \".join(text.split())\r\n return re.sub(' +', ' ', text)", "def normalize_space (text):\n return RE_WS.sub (' ', text.strip ())", "def strip_space(string):\n return string.replace(' ', '')", "def _clean(self, string):\n re...
[ "0.7713972", "0.7655764", "0.75689626", "0.7506324", "0.7485759", "0.7441859", "0.73619103", "0.7324475", "0.7279956", "0.72709185", "0.7189409", "0.7169477", "0.716941", "0.7159498", "0.7119745", "0.71166676", "0.7091076", "0.7091076", "0.7086721", "0.7069232", "0.7062797", ...
0.70721096
19
Set QA person identification.
def set_person(self, person): if person.upper() == UNKNOWN.upper(): self.person_name = UNKNOWN self.person_id = 'XX' else: self.person_name = person.lower() self.person_id = person.upper()[:2]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setQ(self,Q):\n self.Q = Q", "def set_identifier(self, uid):\n\n self.uid = uid\n\n self.set_unique_metadata('DC', 'identifier', self.uid, {'id': self.IDENTIFIER_ID})", "def set_iqpt(self, iqpt, fine=False):\n self._iqpt = iqpt\n\n if fine:\n self.set_iqpt_fine...
[ "0.5865096", "0.5669497", "0.563178", "0.55642587", "0.5522604", "0.5522604", "0.5492002", "0.5367029", "0.53240484", "0.5287204", "0.52844167", "0.5253261", "0.5176143", "0.5172125", "0.516879", "0.51476824", "0.51169777", "0.5066335", "0.50216264", "0.50195754", "0.50096023...
0.5112277
17
Find the index keys that match this item.
def _select_index_from_item(item): for index in index_keys: if all(item[key] == value for key, value in index.items()): return index raise Exception("Index key not found in item.")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_indexes(self):\n return set(k.index for k in self if k.has_index)", "def get_indexes_for_key (self,key):\r\n\r\n if self.using_database:\r\n aprint('GETTING INDEXES FOR KEY')\r\n value_tuple = (notebookname,key,)\r\n db_cursor.execute(\"SELECT note_index\"\r...
[ "0.66022", "0.64414644", "0.63782066", "0.6350837", "0.63234204", "0.6273477", "0.62097746", "0.61347777", "0.61215395", "0.6086946", "0.60838264", "0.60321844", "0.6015062", "0.60064054", "0.59954405", "0.5980051", "0.59768474", "0.59600514", "0.5917612", "0.5910595", "0.591...
0.65687174
1
Yield successive nsized chunks from l.
def batches(l, n): for i in xrange(0, len(l), n): yield l[i:i+n]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _chunk(self, l, n):\n for i in range(0, len(l) + 1, n):\n yield l[i:i + n]", "def chunks(self, l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]", "def __chunks(l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]", "def get_chunks(self, ...
[ "0.8038813", "0.79248375", "0.7923423", "0.7885103", "0.78773195", "0.7815877", "0.77655786", "0.77556044", "0.77441615", "0.7731815", "0.77288336", "0.772473", "0.77028215", "0.76889825", "0.76889825", "0.7664208", "0.76570904", "0.7655856", "0.7655856", "0.76458347", "0.764...
0.0
-1
Find a given point in the given self. Although two points are considered equal if they have the same coordinates, their names and dependencies may differ. This information can sometimes be useful. So we can return the equivalent point within a self.
def find_point(self, point: Point): for internal_point in self.points: if internal_point == point: return internal_point return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FindClosestPoint(self, ):\n ...", "def find_list_for_new_point(self, point):\n hash_code = get_parent_hash(point)\n for i, _ in enumerate(self._points):\n for point_move in self._points[i]:\n if hash_graphics_point(point_move) == hash_code:\n ...
[ "0.6723117", "0.6562698", "0.6418497", "0.62754685", "0.625017", "0.62269497", "0.6198741", "0.6187556", "0.6182174", "0.6177206", "0.6149904", "0.61100227", "0.6095407", "0.6091073", "0.60865194", "0.6080962", "0.6068925", "0.60588104", "0.6043362", "0.6039136", "0.60195917"...
0.8113691
0
Add a line to the self with the given generating points.
def add_line(self, point1: Point, point2: Point, counts_as_step=True, interesting=False) -> Line: line = Line(point1=point1, point2=point2) self.add_step_premade(line, counts_as_step=counts_as_step, interesting=interesting) return line
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_to_plot(self, line_name, points):\n points = [x * 100 for x in points]\n plt.plot(points, label=line_name)", "def line(canvas, points, line_width, line_color):\n \n # duplicate first point in case only one point was given\n points = points[0], points\n canvas.create_line(points,...
[ "0.7142497", "0.7053521", "0.6990352", "0.6957143", "0.6896777", "0.6881594", "0.6827307", "0.6744022", "0.6696884", "0.6690399", "0.666218", "0.6657351", "0.66534287", "0.6649793", "0.6645143", "0.66305345", "0.66138536", "0.66065556", "0.6603971", "0.65981203", "0.6579088",...
0.71835595
0
Add a point to a self.
def add_point(self, point: Point, interesting=False) -> Point: if point not in self.points: if not point.name: point.name = alphabet(len(self.points)) self.points.add(point) if interesting: self.interesting_points.add(point) self.add_po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add(self, point):\n if not isinstance(point, Point):\n raise ValueError('Argument point should be an Point instance')\n self.x = self.x + point.x\n self.y = self.y + point.y", "def add(self, point):\n self.points.append(point)", "def addPoint(self, point):\n se...
[ "0.8708597", "0.8583319", "0.8492661", "0.8289741", "0.82735544", "0.814395", "0.81109136", "0.80611295", "0.79458964", "0.79289097", "0.7878554", "0.76147735", "0.76147735", "0.7552446", "0.75125396", "0.7491625", "0.7468086", "0.7467434", "0.74060905", "0.7383697", "0.73765...
0.75885385
13
Finds all the valid actions (lines/circles) that can be drawn on a given self. If focus_points is defined then this will find all distinct pairs of points where the first point is in focus_points, and the second point is in self.points. No pair can have the same point twice. Otherwise, it iterates over all pairs of dis...
def update_valid_actions(self, force_calculate=False) -> {Union[Line, Circle]}: legal_lines: {Line} = set() # Set of lines showing legal lines legal_circles: {Circle} = set() # Set of circles showing legal circles # Determine the combinations of points to focus on. # Since self._actio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def valid_moves(self):\n valid = set()\n\n # If the center is filled, so unlimited movement is allowed\n if self._unlimited is True:\n\n # For each value of filled, add that value to the center until the value is out of bounds\n # to acquire each movement point that can...
[ "0.63998675", "0.5834542", "0.5561146", "0.5451739", "0.5376462", "0.5339154", "0.5324753", "0.5324216", "0.53120184", "0.53090864", "0.52796817", "0.52713287", "0.521698", "0.52007246", "0.519436", "0.5188638", "0.51779383", "0.5176884", "0.5107986", "0.5103409", "0.5079147"...
0.7179051
0
Generate a numpy array that has only the points in image space.
def _numpy_points(self, boundary_radius: int, resolution: int, point_set: {Point}) -> np.array: points_array = np.zeros((resolution, resolution), dtype=np.int16) # Encodes all the intersection points # 1st layer is a grid representing the space. Pixels containing an intersection point has value 1, oth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def points(self):\n return np.vstack((self.x(), self.y()))", "def _points_array_non_empty(dtype):\n return PointArray([\n [1, 0],\n [1, 2]\n ], dtype=dtype)", "def points(self):\n return self._arr.T.ravel().view(\n dtype=[('x', self.dtype), ('y', self.dtype), ('z...
[ "0.7012033", "0.68032676", "0.6720397", "0.6532416", "0.6453707", "0.6419632", "0.63973147", "0.63673085", "0.6366211", "0.6309618", "0.63083684", "0.6306068", "0.61972386", "0.61446893", "0.61272717", "0.6114696", "0.6108518", "0.6081481", "0.6080994", "0.607687", "0.604972"...
0.5897648
34
Pick a point not on the line for when we do not care about which side.
def pick_point_not_on_line(line: Line): return line.point1 + line.get_perpendicular_at_point(line.point1).get_direction_vector()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pick_point_not_on_line_on_side(line: Line, side: Point, same_side=True):\n point2 = line.point1 + line.get_perpendicular_at_point(line.point1).get_direction_vector()\n if Construction.check_if_points_on_same_side(line, side, point2) == same_side:\n return point2\n else:\n ...
[ "0.75310117", "0.60683984", "0.60293597", "0.5920633", "0.58626366", "0.5828283", "0.5824111", "0.5812272", "0.5808151", "0.57216823", "0.5718737", "0.57087034", "0.56988865", "0.5698721", "0.56866926", "0.56826246", "0.56800944", "0.56745654", "0.5657663", "0.56521356", "0.5...
0.777403
0
Pick a point that is not on the line, but we do care which side.
def pick_point_not_on_line_on_side(line: Line, side: Point, same_side=True): point2 = line.point1 + line.get_perpendicular_at_point(line.point1).get_direction_vector() if Construction.check_if_points_on_same_side(line, side, point2) == same_side: return point2 else: retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pick_point_not_on_line(line: Line):\n return line.point1 + line.get_perpendicular_at_point(line.point1).get_direction_vector()", "def test_point_positive_on_one_line(self):\n a = Point(1, 0)\n b = Point(34, 0)\n c = Point(42, 0)\n\n self.assertTrue(Point.on_one_line(a, b, c...
[ "0.78572965", "0.62134755", "0.61347246", "0.60863435", "0.6076175", "0.6073065", "0.606666", "0.59992987", "0.59933746", "0.59892696", "0.5981542", "0.59732044", "0.5946983", "0.5911837", "0.59097207", "0.58822894", "0.58811975", "0.58391845", "0.5829601", "0.5824545", "0.58...
0.7706756
1
Renders the profile update view.
def profile_update(request): LOGGER.info('Rendering WMT16 profile update view.') errors = None project_choices = Project.objects.all().values_list('name', flat=True).order_by('id') project_status = set() languages = set() focus_input = 'id_projects' if request.method == "POST":...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def viewprofile():\n user = current_user\n form = UserUpdateForm(obj=user)\n form.populate_obj(user)\n if form.validate_on_submit():\n form.populate_obj(user)\n\n db.session.commit()\n\n flash('You have successfully edited your profile!')\n return render_template('user/user.html...
[ "0.7887845", "0.7331172", "0.70882446", "0.7033038", "0.70310277", "0.6964268", "0.68233854", "0.68144554", "0.680335", "0.6791899", "0.678633", "0.672792", "0.6699336", "0.6693618", "0.6683789", "0.6680405", "0.66794324", "0.6634255", "0.65887934", "0.65861017", "0.65254235"...
0.5824788
67
>>> [f() for f in test_lambda(3)] [0, 1, 2]
def test_lambda(n): return [lambda v=i: v for i in range(n)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_lambda(n):\n for i in range(n):\n yield lambda : i", "def one():\n return lambda f: lambda x: f(x)", "def create_graph_from_lambda(f, xrange):\n out = []\n for x in xrange:\n out.append(f(x))\n return out", "def lambda_eval(v):\n return v() if hasattr(v, '__call__') e...
[ "0.75509787", "0.6416851", "0.6375263", "0.63424426", "0.62837076", "0.6253615", "0.6212753", "0.6199147", "0.6176822", "0.6153272", "0.61437297", "0.61206543", "0.60897195", "0.607826", "0.6043381", "0.6032705", "0.6022831", "0.6013003", "0.597396", "0.5970009", "0.5968511",...
0.8110326
0
Return whether two objects are equal.
def __eq__(self, other): if type(other) is not type(self): return False if self._sample_rate != other._sample_rate: return False if self._samples.shape != other._samples.shape: return False if np.any(self.samples != other._samples): return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_equal(self, a, b):\n return a is b", "def is_equal(o1: object, o2: object) -> bool:\n if o1 is None and o2 is None:\n return True\n if o1 is None:\n return False\n return o1 == o2", "def is_equal(self, a, b):\n return a == b", "def __eq__(self, ...
[ "0.8108815", "0.80764437", "0.80681884", "0.77784616", "0.7777904", "0.7777904", "0.77769184", "0.77769184", "0.7724161", "0.77177024", "0.77038914", "0.7679476", "0.7677192", "0.7677192", "0.761559", "0.7609168", "0.7598634", "0.7597623", "0.7573386", "0.7573386", "0.7573386...
0.0
-1
Return whether two objects are unequal.
def __ne__(self, other): return not self.__eq__(other)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __ne__ (self, other):\n ...
[ "0.8104915", "0.80062646", "0.79549354", "0.7953275", "0.79275596", "0.7904115", "0.7904115", "0.7892746", "0.7892746", "0.7892746", "0.78863424", "0.78604776", "0.7854513", "0.7854513", "0.7854513", "0.7854513", "0.7854513", "0.7854513", "0.7854513", "0.7854513", "0.7854513"...
0.0
-1
Return perchannel RMS value.
def rms_db(self): mean_square = np.mean(self._samples ** 2, axis=0) return 10 * np.log10(mean_square)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Get_Meas_Res_RMS(self, mode, ch=1):\n rdStr = self.query(f':MEAS{ch}:RES:RMS? {mode}')\n return rdStr", "def get_vrms(self, ch: int) -> float:\n cmd = \":measure:vrms? cycle,ac,channel{0}\".format(ch)\n return float(self.query(cmd))", "def get_channel_sampling_rate(self)->float:...
[ "0.705619", "0.67309535", "0.60756165", "0.6040144", "0.601837", "0.6000538", "0.59767526", "0.59117776", "0.5892031", "0.5864159", "0.58525836", "0.58320147", "0.5811991", "0.5803221", "0.58003163", "0.57701397", "0.57701397", "0.5767168", "0.57640874", "0.5728319", "0.57279...
0.5706487
22
Add zero padding to the sample. The pad size is given in number of samples. If symmetric=True, `pad_size` will be added to both sides. If false, `pad_size` zeros will be added only to the end.
def pad(self, pad_size, symmetric=False): samples_ndim = self._samples.ndim if samples_ndim == 1: pad_width = pad_size if symmetric else (0, pad_size) elif samples_ndim == 2: # pad samples, keep channels pad_width = ((pad_size, pad_size), (0, 0)) if symmetric ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _zero_pad(self, kernel, size):\n if len(size) != kernel.ndim:\n size = kernel.shape[:1] + tuple(size) + kernel.shape[-1:]\n padsize = np.array(size) - np.array(kernel.shape)\n paddown = padsize // 2\n padup = padsize - paddown\n padarray = np.concatenate((padup[......
[ "0.63327855", "0.6212466", "0.6200771", "0.6016086", "0.59918934", "0.5942032", "0.5921949", "0.5892491", "0.57770705", "0.57701486", "0.57694304", "0.5755059", "0.5751473", "0.57243156", "0.5721849", "0.5677065", "0.56757087", "0.5667317", "0.5640145", "0.56379604", "0.56357...
0.8261078
0
Given the root of a tree and a rule, attach the rule to the node it is supposed to act on and update the rules position to (), meaning self If this is not possible (for dependencies on locations not added to the tree yet), the rule remains at the root
def add_rule_to_tree(self, root, rule): try: root[rule.action_location.treeposition] position = rule.action_location.treeposition rule.action_location.original_treeposition = position rule.action_location.treeposition = () root[position].rules += [rul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_rule(self, rule: interpreter.Rule) -> None:\n\n if rule.target not in self.rules:\n self.rules[rule.target] = rule\n else:\n self.rules[rule.target] |= rule", "def add_rule(self, rule) -> None:\n self.add_rules([rule])", "def add_rule(rule):\n global RULE_D...
[ "0.64519495", "0.6001292", "0.5890836", "0.5890072", "0.5872481", "0.58165056", "0.58144027", "0.5809377", "0.57994944", "0.5793646", "0.57908213", "0.5782569", "0.57802767", "0.5727579", "0.5583402", "0.55493844", "0.55299103", "0.5501821", "0.5501821", "0.5501821", "0.55018...
0.8380413
0
Redefine this object in terms of a polymorphic subclass. Returns a new PropComparator from which further criterion can be evaluated.
def of_type(self, class_): return self.operate(PropComparator.of_type_op, class_)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def of_type(self, class_: _EntityType[Any]) -> PropComparator[_PT]:\n return RelationshipProperty.Comparator(\n self.prop,\n self._parententity,\n adapt_to_entity=self._adapt_to_entity,\n of_type=class_,\n extra_criteria=self._ex...
[ "0.6614173", "0.5422012", "0.5384622", "0.51787674", "0.51591825", "0.5091058", "0.50781673", "0.488756", "0.48849702", "0.4858805", "0.47269228", "0.4725458", "0.45985967", "0.45851415", "0.45551562", "0.4549366", "0.45434722", "0.45420173", "0.44620404", "0.44378528", "0.44...
0.43432114
24
Return true if this element references a member which meets the given criterion. The usual implementation of ``has()`` is
def has(self, criterion=None, **kwargs): return self.operate(PropComparator.has_op, criterion, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has(\n self,\n criterion: Optional[_ColumnExpressionArgument[bool]] = None,\n **kwargs: Any,\n ) -> ColumnElement[bool]:\n if self.property.uselist:\n raise sa_exc.InvalidRequestError(\n \"'has()' not implemented for collectio...
[ "0.73391116", "0.6676869", "0.6667153", "0.6485507", "0.64035225", "0.6350734", "0.6350734", "0.6348474", "0.63360614", "0.63329923", "0.6324319", "0.63063383", "0.6286007", "0.6266508", "0.62041783", "0.6196339", "0.618894", "0.6174179", "0.61349326", "0.61304414", "0.612624...
0.6885668
1